]> sourceware.org Git - newlib-cygwin.git/blob - winsup/cygwin/ChangeLog
* cygheap.cc (_csbrk): More left coercion cleanup.
[newlib-cygwin.git] / winsup / cygwin / ChangeLog
1 2003-09-07 Christopher Faylor <cgf@redhat.com>
2
3 * cygheap.cc (_csbrk): More left coercion cleanup.
4 * fhandler_tty.cc (fhandler_tty_slave::read): Ditto.
5 (fhandler_tty_slave::write): Ditto.
6 * fhandler_windows.cc (fhandler_windows::read): Ditto.
7 * heap.cc (sbrk): Ditto.
8
9 2003-09-07 Pierre Humblet <pierre.humblet@ieee.org>
10
11 * signal.cc (nanosleep): Improve test for valid values. Round delay up
12 to resolution. Fix test for negative remainder. Use timeGetTime
13 through gtod.
14 (sleep): Round up return value.
15
16 2003-09-07 Pierre Humblet <pierre.humblet@ieee.org>
17 Christopher Faylor <cgf@redhat.com>
18
19 * hires.h (HIRES_DELAY_MAX): Define.
20 (hires_ms::minperiod): Declare static.
21 (hires_ms::resolution): New.
22 (hires_ms::dmsecs): New.
23 (hires_ms::prime): Return UINT.
24 (gtod): Declare.
25 * times.cc (hires_ms::prime): Always calculate minperiod and set it to
26 1 in case of failure. Return minperiod.
27 (hires_ms::resolution): Define.
28 (hires_ms::~hires_ms): Delete.
29 (hires_ms::usecs): Check minperiod to prime.
30 (gtod) Define as global.
31
32 2003-09-06 Christopher Faylor <cgf@redhat.com>
33
34 Remove left coercion throughout.
35
36 2003-09-04 Pierre Humblet <pierre.humblet@ieee.org>
37
38 * hires.h (hires_ms::~hires_ms): Delete declaration.
39 * times.cc (hires_ms::~hires_ms): Delete definition..
40
41 2003-09-04 Christopher Faylor <cgf@redhat.com>
42
43 * dcrt0.cc (__argc_safe): New variable.
44 (dll_crt0_1): Store argc in __argc_safe, which will theoretically
45 remain untouched by the user.
46 * fhandler_console.cc (fhandler_console::read): Silence some compiler
47 warnings.
48 * fhandler_raw.cc (fhandler_dev_raw::raw_read): Ditto.
49 * pinfo.cc (_pinfo::commune_recv): Carefully bound argv scan and check
50 for potentially bad pointers since user could have set argv cell to
51 anythinw.
52 * cygheap.h (CYGHEAPSIZE): Bump up size.
53
54 2003-09-04 Corinna Vinschen <corinna@vinschen.de>
55
56 * sysconf.cc (sysconf): Return more accurate value for _SC_AVPHYS_PAGES.
57
58 2003-09-04 Corinna Vinschen <corinna@vinschen.de>
59
60 * mmap.cc: Restructure. Add, remove and rewrite comments throughout
61 for better readability. Change function names for better
62 understanding.
63 (MAP_SET): Accomodate name change from map_map_ to page_map_.
64 (MAP_CLR): Ditto.
65 (MAP_ISSET): Ditto.
66 (mmap_record::page_map_): Rename from page_map_.
67 (mmap_record::get_map): Remove.
68 (mmap_record::alloc_page_map): Rename from alloc_map. Return bool
69 indicating success of cygheap memory allocation.
70 (mmap_record::free_page_map): Rename from free_map.
71 (mmap_record::fixup_page_map): Rename from fixup_map.
72 (mmap_record::find_unused_pages): Rename from find_empty.
73 (mmap_record::map_pages): Rename from map_map.
74 (mmap_record::unmap_pages): Rename from unmap_map.
75 (class list): Make all class members private.
76 (list::list): Remove.
77 (list::~list): Remove.
78 (list::get_fd): New attribute reader.
79 (list::get_hash): Ditto.
80 (list::get_record): Ditto.
81 (list::add_record): Manage all allocation for mmap_records. Check
82 for failed memory allocation and return NULL if so.
83 (list::set): New function.
84 (list::del_record): Rename from erase. Return true if last mmap_record
85 has been deleted, false otherwise. Check for legal incoming index
86 value.
87 (list::erase): Remove erase/0.
88 (list::search_record): Rename from match.
89 (map::map): Remove.
90 (map::~map): Remove.
91 (map::add_list): Manage all allocation for lists. Check for failed
92 memory allocation and return NULL if so.
93 (map::get_list): New method.
94 (map::del_list): Rename from erase. Check for legal incoming index
95 value.
96 (mmap64): Check for failed mmap_record memory allocation. Return
97 with MAP_FAILED and errno set to ENOMEM if so.
98 (munmap): Rearrange loop using new list and mmap_record accessor
99 functions. Rename loop index variables for better understanding.
100 Check if list can be deleted after last mmap_record in it has been
101 deleted.
102 (msync): Rearrange loop using new list and mmap_record accessor
103 functions. Rename loop index variables for better understanding.
104 (fixup_mmaps_after_fork): Ditto.
105
106 2003-09-03 Christopher Faylor <cgf@redhat.com>
107
108 * cxx.cc (new): Fix formatting. Just return result of ccalloc rather
109 than calling memset explicitly.
110
111 2003-09-03 Christopher Faylor <cgf@redhat.com>
112
113 * exceptions.cc (set_process_mask): Set pending signals only when
114 signals become unmasked.
115 * sigproc.cc (pending_signals): Flip back to a global.
116 (wait_sig): Don't set pending signals when there is an armed semaphore
117 or signal is blocked.
118
119 * shared.cc (shared_info::initialize): Add a username parameter for
120 user-mode mounts. Reorganize to try to avoid startup race.
121 (memory_init): Move some stuff into shared_info::initialize.
122 * shared_info.h (shared_info::initialize): Change declaration.
123 (CURR_SHARED_MAGIC): Update.
124
125 2003-09-01 Christopher Faylor <cgf@redhat.com>
126
127 * include/cygwin/version.h: Bump DLL minor number to 4.
128
129 2003-09-01 Christopher Faylor <cgf@redhat.com>
130
131 * net.cc (dup_ent): Restore check for NULL input.
132
133 2003-08-31 Christopher Faylor <cgf@redhat.com>
134
135 * include/sys/cygwin.h: Don't define cygwin-specific things if
136 !__CYGWIN__.
137
138 2003-08-31 Christopher Faylor <cgf@redhat.com>
139
140 * cygheap.cc (cygheap_init): Allocate space for sigaction array in
141 cygheap.
142 * cygheap.h (cygheap_types): Add HEAP_SIGS.
143 * exceptions.cc (signal_fixup_after_exec): Remove from this file.
144 * pinfo.h (pinfo::getsig): Just return global_sigs array.
145 (pinfo::sigs): Delete.
146 * sigproc.cc (signal_fixup_after_exec): Move it here.
147 (global_sigs): New global array, moved from pinfo structure.
148 (sigalloc): New function. Allocate global sigaction array here.
149 (proc_subproc): Remove copysigs call. It's automatic now.
150 * include/sys/cygwin.h (PID_NOCLDSTOP): New value.
151 * signal.cc (sigaction): Set myself->PID_NODCLDSTOP when appropriate.
152 * sigproc.h (sigalloc): Declare.
153
154 * fnmatch.c (fnmatch): Use C90 parameters.
155 (rangematch): Ditto.
156
157 * fhandler.cc (fhandler_base::raw_read): Use right coercion to avoid a
158 compiler warning.
159
160 2003-08-31 Christopher Faylor <cgf@redhat.com>
161
162 * net.cc (dup_ent): Make debugging output consistent.
163
164 2003-08-31 Christopher Faylor <cgf@redhat.com>
165
166 Use dup_ent rather than specific dup_*_ptr functions throughout.
167 * (gen_ent): Delete.
168 (dup_ent): Subsume gen_ent functionality.
169 (dup_host_ptr): Delete.
170 (dup_proto_ptr): Ditto.
171 (dup_servent_ptr): Ditto.
172
173 2003-08-31 Christopher Faylor <cgf@redhat.com>
174
175 * net.cc (gen_ent): Invert sense of null check so that debug output
176 makes sense.
177
178 2003-08-31 Christopher Faylor <cgf@redhat.com>
179
180 * net.cc (free_char_list): Delete.
181 (dup_addr_list): Delete.
182 (dup_char_list): Delete.
183 (free_hostent_ptr): Delete.
184 (free_protoent_ptr): Delete.
185 (free_servent_ptr): Delete.
186 (DWORD_round): New function.
187 (strlen_round): New function. Returns strlen rounded up to word size.
188 (dup_ent): New, generic function to duplicate a {host,proto,serv}ent
189 structure.
190 (gen_ent): New macro. Generates a generic dup_{host,proto,serv}ent_ptr
191 function.
192 (cygwin_getservbyname): Remove call to free_servent_ptr, pass
193 servent_buf to dup_servent_ptr.
194 (cygwin_getservbyport): Ditto.
195 (cygwin_gethostbyname): Ditto for hostent.
196 (cygwin_gethostbyaddr): Ditto.
197 (cygwin_getprotobyname): Ditto for protoent.
198 (cygwin_getprotobynumber): Ditto.
199
200 2003-08-31 Christopher Faylor <cgf@redhat.com>
201
202 * Makefile.in (MALLOC_OFILES): Always fill in with correct malloc
203 object.
204 * configure.in: Fill in MALLOC_OFILES with either debugging or regular
205 malloc.
206 * configure: Regenerate.
207 * dlmalloc.c: Make various fruitless changes to attempt to get to work.
208 * dlmalloc.h: Ditto.
209 * malloc.cc (free): Check malloc pool when debugging.
210
211 * path.cc (win32_device_name): Eliminate compiler warning.
212
213 * sigproc.cc (sig_dispatch_pending): Remove use of was_pending. Let
214 thisframe.call_signal_handler decide if handler should be called rather
215 than using bogus was_pending check.
216
217 * exceptions.cc (interrupt_setup): Remove accidentally checked in
218 debugging code.
219
220 2003-08-30 Christopher Faylor <cgf@redhat.com>
221
222 * heap.cc (sbrk): Save rounded addess in user_heap_max.
223
224 2003-08-30 Christopher Faylor <cgf@redhat.com>
225
226 * sigproc.cc (sig_dispatch_pending): Remove explicit call to
227 thisframe.call_signal_handler.
228
229 2003-08-30 Christopher Faylor <cgf@redhat.com>
230
231 Remove some cygserver files.
232
233 2003-08-28 Christopher Faylor <cgf@redhat.com>
234
235 * sigproc.h: Make some functions regparm.
236 * sigproc.cc (checkstate): Make regparm.
237 (getevent): Change parameters in declaration, rename from getsem, make regparm.
238 (sig_send): Recognize that nosync is now an event. Remove some old
239 cruft from previous interrupt anywhere signal handler.
240 (getevent): Change parameters in definition, rename from getsem.
241 Allocate event rather than semaphore.
242 (wait_sig): Treat sigcatch_nosync as an event.
243
244 2003-08-28 Christopher Faylor <cgf@redhat.com>
245
246 * exceptions.cc (sigreturn): Fix problem where old return address was
247 not properly restored for a nested signal.
248
249 2003-08-27 Christopher Faylor <cgf@redhat.com>
250
251 * autoload.cc (SwitchToThread): Declare as autoload function.
252 * cygthread.h (cygthread::main_thread_id): Make public.
253 * exceptions.cc (setup_handler): Remove unneeded priority stuff.
254 Rename label to reflect what it does. Add debugging for idiotic
255 Windows NT problem. Change debugging output to include signal number.
256 * miscfuncs.cc (low_priority_sleep): If available, use SwitchToThread
257 function to give time slice to other threads.
258 * wincap.cc: Properly define have_switch_to_thread throughout.
259 * wincap.h (wincap::switch_to_thread): New element.
260
261 2003-08-27 Christopher Faylor <cgf@redhat.com>
262
263 * syscalls.cc (mount): Don't check win32_path when doing cygdrive
264 mount.
265
266 2003-08-27 Christopher Faylor <cgf@redhat.com>
267
268 * specdir: Correctly remove temporary directory prior to use.
269
270 2003-08-27 Christopher Faylor <cgf@redhat.com>
271
272 * sigproc.cc (wait_sig): Count number of iterations through
273 'more_signals' loop and issue a warning if DEBUGGING and excessive.
274 (WFSO): When debugging and infinite timeout, loop.
275
276 2003-08-26 Corinna Vinschen <corinna@vinschen.de>
277
278 * include/cygwin/stat.h: Allow definition of internal stat structures
279 also when compiling newlib.
280
281 2003-08-25 Christopher Faylor <cgf@redhat.com>
282
283 Throughout, change USE_CYGSERVER to USE_SERVER.
284 * Makefile.in (LIBSERVER): Define and use.
285 * configure.in: Set LIBSERVER as appropriate.
286 * configure: Regenerate.
287 * acconfig.h: Regenerate.
288 * environ.cc: Rename allow_daemon to allow_server. Only recognize when
289 USE_SERVER is defined.
290
291 2003-08-23 Christopher Faylor <cgf@redhat.com>
292
293 * syscalls.cc (_remove_r): Define.
294
295 2003-08-22 Corinna Vinschen <corinna@vinschen.de>
296
297 * cygheap.h (enum cygheap_types): Add HEAP_MMAP.
298 (CYGHEAPSIZE): Add another 64K.
299 * mmap.cc: Use cmalloc, ccalloc and crealloc with HEAP_MMAP type
300 throughout.
301
302 2003-08-22 Christopher Faylor <cgf@redhat.com>
303
304 * cygheap.cc (user_heap_info::max): New field.
305 * heap.cc (heap_init): Save pointer to end of heap reserved memory.
306 (sbrk): Don't attempt to commit memory beyond end of heap reserved
307 memory. Attempt to honor comment and reserve commitbytes if heapchunk
308 fails.
309
310 2003-08-20 Pierre Humblet <pierre.humblet@ieee.org>
311
312 * exceptions.cc (sigreturn): Don't clobber ebp in recursive signal
313 calls.
314
315 2003-08-22 Christopher Faylor <cgf@redhat.com>
316
317 * exceptions.cc (sig_handle): Change so that default signals indicate
318 success.
319
320 2003-08-21 Christopher Faylor <cgf@redhat.com>
321
322 * sigproc.cc (wait_sig): Remove redundant test in do/while.
323
324 2003-08-21 Christopher Faylor <cgf@redhat.com>
325
326 * sigproc.cc (wait_sig): Avoid infinite loop.
327
328 2003-08-20 Christopher Faylor <cgf@redhat.com>
329
330 * speclib: Reenable removal of temp files.
331
332 2003-08-20 Christopher Faylor <cgf@redhat.com>
333
334 * miscfuncs.cc (low_priority_sleep): Sleep at same priority as main
335 thread.
336 * sigproc.cc (wait_sig): Keep looping if there are more signals to
337 consider and we are flushing signals.
338 (sig_send): Put nonsync signals in the correct bucket.
339
340 2003-08-20 Christopher Faylor <cgf@redhat.com>
341
342 * speclib: Fix created lib to avoid "File truncated" problems.
343
344 2003-08-20 Pierre Humblet <pierre.humblet@ieee.org>
345
346 * exceptions.cc (interrupt_setup): Set sigsave.sig last to avoid a
347 race.
348
349 2003-08-20 Christopher Faylor <cgf@redhat.com>
350
351 * sigproc.cc (wait_sig): Ensure that myself->getsigtodo array is
352 flushed on a __SIGFLUSH.
353
354 2003-08-20 Pierre Humblet <pierre.humblet@ieee.org>
355 Christopher Faylor <cgf@redhat.com>
356
357 * exceptions.cc (_sigreturn): Handle nested signals without growing the
358 stack.
359
360 2003-08-19 Christopher Faylor <cgf@redhat.com>
361
362 * exceptions.cc (pending_signals): Remove unneeded declaration.
363 * sigproc.cc (pending_signals): Make static.
364 (wait_sig): Use defined values rather than integers for rc. Never scan
365 both todo arrays as this could cause hangs if signals arrive from two
366 different sources. Rename saw_pending_signals to saw_failed_interrupt.
367 Exit loop when signal found. Enter low-priority sleep, if necessary,
368 after finished signalling completion. Set pending_signals when blocked
369 (from Pierre Humblet).
370
371 2003-08-19 Christopher Faylor <cgf@redhat.com>
372
373 * signal.cc (sigpending): Move.
374 * sigproc.cc (sigpending): To here.
375 (getlocal_sigtodo): Return process-local signal array.
376 (sigpending): Accommodate new process-local signal array.
377 (sig_send): Ditto.
378 (sig_set_pending): Ditto.
379 (wait_sig): Ditto.
380
381 2003-08-19 Christopher Faylor <cgf@redhat.com>
382
383 Throughout, eliminate argument to sig_dispatch_pending.
384 * exceptions.cc (setup_handler): Move non-interruptible condition
385 handling (back) to wait_sig.
386 (set_process_mask): Don't worry about calling sig_dispatch_pending from
387 sigthread since it is detected in the function anyway.
388 (sig_handle): Eliminate thisproc arg. Don't call sig_dispatch_pending
389 on SIGCONT since that should happen automatically.
390 * sigproc.cc (sig_dispatch_pending): Eliminate justwake argument. Just
391 return when called from sigthread.
392 (wait_sig): Change some variables to bool. Change inner while to an
393 if. Move uninterruptible signal handling here.
394 (sigproc_terminate): Don't call sig_dispatch_pending. Just increment
395 semaphore on exit.
396
397 * speclib: Use slightly different (but still flawed) method for
398 determining symbols to extract from libraries.
399
400 2003-08-18 Christopher Faylor <cgf@redhat.com>
401
402 * exceptions.cc (sigdelayed): Fix race where signal handler could get
403 the wrong mask (as suggested by Pierre Humblet).
404
405 2003-08-18 Christopher Faylor <cgf@redhat.com>
406
407 * path.cc (mount): Add null/empty check for input parameters.
408 (umount): Add null/empty check for input parameters.
409
410 2003-08-17 Pierre Humblet <pierre.humblet@ieee.org>
411
412 * grp.cc (read_group): Revert previous change.
413 * uinfo.cc (pwdgrp::load): Always reset curr_lines.
414
415 2003-08-17 Corinna Vinschen <corinna@vinschen.de>
416
417 * errno.cc (errmap): Map ERROR_INVALID_BLOCK_LENGTH to EIO.
418 * fhandler_raw.cc (fhandler_dev_raw::raw_read): Set more accurate
419 errnos instead of EACCES.
420 (fhandler_dev_raw::raw_write): Ditto.
421
422 2003-08-17 Christopher Faylor <cgf@redhat.com>
423
424 * path.cc (special_name): Accommodate all special names with
425 extensions.
426
427 2003-08-15 Corinna Vinschen <corinna@vinschen.de>
428
429 * mmap.cc (mmap64): Avoid crash if file size is less than requested
430 map length.
431
432 2003-08-13 Igor Pechtchanski <pechtcha@cs.nyu.edu>
433
434 * path.cc (special_name): Add checks for some specials followed by
435 a "." and a FIXME comment.
436
437 2003-08-13 Corinna Vinschen <corinna@vinschen.de>
438
439 * cygwin.din: Accommodate change from cygwin_lstat to lstat.
440 * syscalls.cc: Add defines to avoid declaration issues when
441 renaming cygwin_lstat back to lstat.
442 (lstat): Reverted name change from cygwin_lstat.
443
444 2003-08-12 Corinna Vinschen <corinna@vinschen.de>
445
446 * include/sys/param.h (NBBY): Define if not defined.
447
448 2003-08-12 Nicholas Wourms <nwourms@netscape.net>
449
450 * include/sys/param.h (setbit): Add new bitmap related macro.
451 (clrbit): Likewise.
452 (isset): Likewise.
453 (isclr): Likewise.
454 (howmany): Add new counting/rounding macro.
455 (rounddown): Likewise.
456 (roundup): Likewise.
457 (roundup2): Likewise.
458 (powerof2): Likewise
459 (MIN): Add macro for calculating min.
460 (MAX): Add macro for calculating max.
461
462 2003-08-09 Christopher Faylor <cgf@redhat.com>
463
464 * include/cygwin/version.h: Bump DLL minor number to 3.
465
466 2003-08-08 Gerrit P. Haase <gp@familiehaase.de>
467
468 * include/stdint.h: Correctly define INT32_MIN.
469
470 2003-08-08 David Rothenberger <daveroth@acm.org>
471
472 * grp.cc (read_group): Set __group32.gr_mem pointer back to &null_ptr
473 after free() is called.
474
475 2003-08-05 Christopher Faylor <cgf@redhat.com>
476
477 * Makefile.in: Rework to accommodate new speclib arguments.
478 * speclib: Rework to extract everything from libcygwin.a rather than
479 building things from existing object files.
480
481 2003-08-05 Pavel Tsekov <ptsekov@gmx.net>
482
483 * path.cc (cygdrive_getmntent): Do not skip over drives of type
484 DRIVE_REMOVABLE.
485
486 2003-08-05 Christopher Faylor <cgf@redhat.com>
487
488 * fhandler.cc (fhandler_base::lseek): Be more paranoid when
489 constructing offsets from 64 bit value.
490 * syscalls.cc (logout): Avoid temp buffer memcpy since new scheme does
491 not require it.
492 (utmp_data): Rework as a macro which returns a pointer into a buffer.
493 (getutent): Use new buffer allocation mechanism to grab a utmp buffer.
494 (getutid): Ditto.
495 (pututline): Ditto.
496
497 2003-08-05 Pavel Tsekov <ptsekov@gmx.net>
498
499 * fhandler_disk_file.cc (fhandler_cygdrive::readdir): Do not change
500 'errno' if end of directory condition is encountered as per SUSv2.
501 * fhandler_proc.cc (fhandler_proc::readdir): Ditto.
502 * fhandler_process (fhandler_process::readdir): Ditto.
503 * fhandler_registry (fhandler_registry::readdir): Ditto.
504
505 2003-07-30 Christopher Faylor <cgf@redhat.com>
506
507 * dcrt0.cc (_dll_crt0): Move strace.microseconds initialization to
508 after pthread initialization.
509 (dll_crt0_1): i.e., here.
510
511 2003-07-28 Christopher Faylor <cgf@redhat.com>
512
513 * fhandler_base.cc (fhandler_base::readv): Rework to properly return
514 number of bytes from read.
515
516 2003-07-28 Christopher Faylor <cgf@redhat.com>
517
518 * include/cygwin/version.h: Bump DLL minor number to 2.
519
520 2003-07-26 Christopher Faylor <cgf@redhat.com>
521
522 * exceptions.cc (ctrl_c_handler): Send SIGHUP when events occur only if
523 there is a tty associated with the process. Send SIGHUP on
524 CTRL_LOGOFF_EVENT.
525
526 * fhandler_tty.cc (fhandler_tty_slave::open): Adjust console open
527 handle counter regardless of whether this is a pty or tty.
528 (fhandler_tty_slave::open): Ditto.
529 (fhandler_tty_slave::dup): Ditto.
530 (fhandler_tty_common::set_close_on_exec): Ditto.
531 (fhandler_tty_master::init_console): Decrement console open handle
532 counter after init since it will now be handled by all tty open.
533 * syscalls.cc (setsid): Rework debugging output slightly.
534
535 2003-07-25 Christopher Faylor <cgf@redhat.com>
536
537 * configure.in: Use 'install-sh -c'.
538 * configure: Regenerate.
539
540 2003-07-25 Christopher Faylor <cgf@redhat.com>
541
542 * configure.in: Always use install-sh.
543 * configure: Regenerate.
544
545 2003-07-25 Christopher Faylor <cgf@redhat.com>
546
547 * include/cygwin/socket.h: Conditionalize [AP]F_INET6 define.
548
549 2003-07-25 Christopher Faylor <cgf@redhat.com>
550
551 * Makefile.in (OBSOLETE_FUNCTION): Add fdopen.
552
553 2003-07-25 Christopher Faylor <cgf@redhat.com>
554
555 * cygwin.din: Export _fdopen64
556 * Makefile.in (NEW_FUNCTIONS): Add _fdopen64 -> fdopen translation.
557 * include/cygwin/version.h: Bump api minor number.
558
559 * ntdll.h: Remove (now) duplicate FILE_SYNCHRONOUS_IO_NONALERT
560 definition.
561
562 2003-07-24 Christopher Faylor <cgf@redhat.com>
563
564 * environ.cc (check_case_init): Use strncasematch.
565
566 * cygwin.din: Export __mempcpy.
567 * cygwin/version.h: Bump api minor number.
568
569 2003-07-21 Pavel Tsekov <ptsekov@gmx.net>
570
571 * mmap.cc: Use proper format specifiers for _off64_t and size_t in
572 format strings passed to syscall_printf () and debug_printf ()
573 throughout.
574
575 2003-07-18 Pierre Humblet <pierre.humblet@ieee.org>
576
577 * security.cc (verify_token): Fix white space and style.
578 Use type bool instead of BOOL and char. Use alloca
579 instead of malloc and free for my_grps.
580
581 2003-07-17 Corinna Vinschen <corinna@vinschen.de>
582
583 * sysconf.cc (sysconf): Fix OPEN_MAX patch. Return page size on
584 _SC_PAGESIZE again.
585
586 2003-07-14 Corinna Vinschen <corinna@vinschen.de>
587
588 * cygheap.h (class cygheap_user): Use INVALID_HANDLE_VALUE as invalid
589 value for tokens.
590 * syscalls.cc (seteuid32): Ditto. Set new_token to process token if
591 process token is suitable.
592 * uinfo.cc (uinfo_init): Initialize tokens in cygheap user info
593 to INVALID_HANDLE_VALUE.
594
595 2003-07-14 Pierre Humblet <pierre.humblet@ieee.org>
596
597 * cygheap.h (enum impersonation): Delete.
598 (cygheap_user::impersonation_state): Delete.
599 (cygheap_user::current_token): New.
600 (cygheap_user::issetuid): Modify to use current_token.
601 (cygheap_user::token): Ditto.
602 (cygheap_user::deimpersonate): Ditto.
603 (cygheap_user::reimpersonate): Ditto.
604 (cygheap_user::has_impersonation_tokens): Ditto.
605 (cygheap_user::close_impersonation_tokens): Ditto.
606 * security.cc (cygwin_set_impersonation_token): Always set the token.
607 (verify_token): Change type of gsid to cygpsid.
608 (get_file_attribute): Use the effective ids.
609 * syscalls.cc (seteuid32): Modify to use cygheap_user::current_token.
610 * uinfo.cc (uinfo_init) Do not set cygheap->user.impersonation_state.
611
612 2003-07-12 Christopher Faylor <cgf@redhat.com>
613
614 * pinfo.cc (_pinfo::commune_send): Fix bounds test so that poll of
615 communicating pid actually stops eventually.
616
617 2003-07-10 Christopher Faylor <cgf@redhat.com>
618
619 * path.cc (get_device_number): Remove special com? consideration.
620 (special_chars): Make static.
621 (special_introducers): New.
622 (special_char): Allow specified valid_chars args.
623 (fnunmunge): Handle aux-like filenames correctly.
624 (special_name): Add con, conin$, conout$.
625 (mount_item::fnmunge): Use __small_sprintf return value to calculate
626 increments.
627
628 2003-07-09 Christopher Faylor <cgf@redhat.com>
629
630 * include/cygwin/version.h: Bump DLL minor number to 1.
631
632 2003-07-09 Christopher Faylor <cgf@redhat.com>
633
634 * fhandler_proc.cc (format_proc_stat): Use correctly sized constants
635 for filling in zeros on 98.
636
637 2003-07-09 Christopher Faylor <cgf@redhat.com>
638
639 * fhandler_proc.cc (fhandler_proc::fill_filebuf): Allocate more space
640 for stat buffer.
641 (format_proc_stat): Reorganize to accumulate and report on all cpus.
642
643 2003-07-09 Christopher Faylor <cgf@redhat.com>
644
645 * sysconf.cc (sysconf): Return processors online rather than bitmask
646 for _SC_NPROCESSORS_ONLN.
647
648 2003-07-08 Christopher Faylor <cgf@redhat.com>
649
650 * cygheap.cc (creturn): Set appropriate errno when out of memory.
651 (ccalloc): Only issue system_printf when debugging.
652 * dtable.cc (dtable::extend): Only allocate 100 * the incremental growth
653 size max. Set errno appropriately.
654 (dtable::build_fhandler): Check for error from set_name.
655 * fhandler.cc (fhandler_base::set_name): Set errno and return error on OOM.
656 * fhandler.h (fhandler_base::set_name): Change to bool.
657 * fhandler_process.cc (format_process_stat): Fix formatting.
658 * resource.cc (getrlimit): Return greater of OPEN_MAX or fd table size.
659 * sysconf.cc (sysconf): Ditto.
660
661 2003-07-07 Christopher Faylor <cgf@redhat.com>
662
663 * rmsym: Don't use ranlib.
664
665 2003-07-07 Christopher Faylor <cgf@redhat.com>
666
667 * newsym: Reenable removal of tmp directory. Just use ar to generate
668 archive index.
669 * Makefile.in: Don't send ranlib to newsym or rmsym.
670
671 2003-07-07 Christopher Faylor <cgf@redhat.com>
672
673 * newsym: Create objects that are closer to those created by dlltool so
674 as not to confuse --export-all-symbols.
675 * rmsym: Be a little more accepting of object filenames now that
676 dlltool can create different format files.
677
678 2003-07-06 Christopher Faylor <cgf@redhat.com>
679
680 * newsym: Oops. Revert below change.
681
682 2003-07-06 Christopher Faylor <cgf@redhat.com>
683
684 * newsym: Use correct prefix for generating imports.
685 * pinfo.cc (_pinfo::commune_send): Don't wait forever for a response
686 from another process.
687
688 2003-07-06 Christopher Faylor <cgf@redhat.com>
689
690 * syscalls.cc (gethostid): Set thread affinity so that results are
691 predictable.
692
693 2003-07-05 Corinna Vinschen <corinna@vinschen.de>
694
695 * mmap.cc (list::match): Add parameters to return valid address and
696 length back to munmap(). Evaluate intersection between given
697 area and mapped area and return it, if any.
698 (mmap64): On regular files, don't allow mappings beginning beyond
699 EOF. Return with errno set to ENXIO instead.
700 (munmap): Rewrite SUSv3 conformant. Check if given memory area is
701 valid. Unmap all maps inside given memory area. Don't return error
702 if no mapping has been unmapped.
703
704 2003-07-05 N Stephens <nigel@mips.com>
705
706 * fhandler.h (fhandler_socket::get_connect_state): New method to
707 return socket connection state.
708 * fhandler_socket.cc (dup): Copy socket connect state to new file
709 handle.
710 * net.cc (cygwin_rcmd): Mark file handles of sockets returned by
711 rcmd() as CONNECTED state.
712 (cygwin_rexec): Similarly for rexec().
713 (socketpair): Mark both ends of a new socket pair as CONNECTED.
714
715 2003-07-04 Corinna Vinschen <corinna@vinschen.de>
716
717 * mmap.cc (fhandler_disk_file::mmap): Fix address test.
718
719 2003-07-03 Christopher Faylor <cgf@redhat.com>
720
721 * path.cc (fillout_mntent): Change "posix" to "managed".
722
723 2003-07-02 Christopher Faylor <cgf@redhat.com>
724
725 * fhandler.h (FH_ENC): New enum.
726 (fhandler_base::get_encoded): New function.
727 (fhandler_base::set_encoded): Ditto.
728 * fhandler_disk_file.cc (fhandler_disk_file::opendir): Set encoded flag
729 in fhandler, as appropriate.
730 (fhandler_disk_file::readdir): Unmunge filename as appropriate based on
731 new encoding flag.
732 * path.cc (normalize_posix_path): Don't punt on files with colons.
733 (special_char): New function.
734 (mount_item::fnmunge): Ditto.
735 (fnunmunge): Ditto.
736 (special_name): Ditto.
737 (mount_item::build_win32): Avoid drive considerations when file is
738 encoded.
739 (mount_info::conv_to_win32_path): Handle encoded filenames.
740 (mount_info::conv_to_posix_path): Ditto.
741 (fillout_mntent): Add posix string when directory is encoded.
742 * path.h (fnunmunge): Declare.
743 (path_conv::is_encoded): Declare.
744
745 2003-07-03 Christopher Faylor <cgf@redhat.com>
746
747 * fhandler_tty.cc (fhandler_tty_slave::open): Conditionalize a little
748 more of the cygserver stuff so that ttys actually work.
749
750 2003-07-03 Corinna Vinschen <corinna@vinschen.de>
751
752 * mmap.cc (mmap64): Allow MAP_FIXED with pagesize granularity (4K).
753 If a non-zero addr is given, align it to the next lower 64K boundary.
754 (fhandler_disk_file::mmap): If a non-zero address is given, try
755 mapping using the given address first. If it fails and flags is not
756 MAP_FIXED, try again with NULL address.
757
758 2003-07-01 Christopher Faylor <cgf@redhat.com>
759
760 * thread.cc: Remove _MT_SAFE conditional.
761
762 2003-07-01 Christopher Faylor <cgf@redhat.com>
763
764 * configure.in: Fix --enable-server option.
765 * configure: Regenerate.
766
767 2003-07-01 Christopher Faylor <cgf@redhat.com>
768
769 * Makefile.in: Remove cygserver stuff.
770 * acconfig.h: Add USE_CYGSERVER define.
771 * config.h.in: Regenerate.
772 * configure.in: Add --enable-server setting.
773 * configure: Regenerate.
774 * fhandler_tty.cc (fhandler_tty_slave::open): Conditionalize
775 compilation of cygserver stuff.
776 * fork.cc (fork_child): Ditto.
777 * shm.cc: Ditto.
778 * tty.cc (tty::common_init): Ditto.
779
780 * dcrt0.cc: Use bool rather than BOOL for CYGWIN environment variable
781 definitions.
782 * environ.cc: Ditto.
783 * ntea.cc: Ditto.
784 * security.cc: Ditto.
785 * security.h: Ditto.
786 * syscalls.cc (check_posix_perm): Remove externs that were already
787 declared in a header.
788 * winsup.h: Ditto. Declare _MT_SAFE here. Delete it someday since
789 cygwin should always be _MT_SAFE.
790
791 2003-07-01 Christopher Faylor <cgf@redhat.com>
792
793 * thread.cc: Remove _MT_SAFE conditional.
794
795 2003-07-01 Christopher Faylor <cgf@redhat.com>
796
797 * configure.in: Fix --enable-server option.
798 * configure: Regenerate.
799
800 2003-07-01 Christopher Faylor <cgf@redhat.com>
801
802 * Makefile.in: Remove cygserver stuff.
803 * acconfig.h: Add USE_CYGSERVER define.
804 * config.h.in: Regenerate.
805 * configure.in: Add --enable-server setting.
806 * configure: Regenerate.
807 * fhandler_tty.cc (fhandler_tty_slave::open): Conditionalize
808 compilation of cygserver stuff.
809 * fork.cc (fork_child): Ditto.
810 * shm.cc: Ditto.
811 * tty.cc (tty::common_init): Ditto.
812
813 * dcrt0.cc: Use bool rather than BOOL for CYGWIN environment variable
814 definitions.
815 * environ.cc: Ditto.
816 * ntea.cc: Ditto.
817 * security.cc: Ditto.
818 * security.h: Ditto.
819 * syscalls.cc (check_posix_perm): Remove externs that were already
820 declared in a header.
821 * winsup.h: Ditto. Declare _MT_SAFE here. Delete it someday since
822 cygwin should always be _MT_SAFE.
823
824 2003-06-30 Pierre Humblet <pierre.humblet@ieee.org>
825
826 * cygheap.h (enum impersonation): New enum.
827 (cygheap_user::token): Delete.
828 (cygheap_user::impersonated): Delete.
829 (cygheap_user::external_token): New member.
830 (cygheap_user::internal_token): New member.
831 (cygheap_user::impersonation_state): New member.
832 (cygheap_user::issetuid): Modify.
833 (cygheap_user::token): New method.
834 (cygheap_user::deimpersonate): New method.
835 (cygheap_user::reimpersonate): New method.
836 (cygheap_user::has_impersonation_tokens): New method.
837 (cygheap_user::close_impersonation_tokens): New method.
838 * dtable.cc (dtable::vfork_child_dup): Use new cygheap_user methods.
839 * fhandler_socket.cc (fhandler_socket::dup): Ditto.
840 * fork.cc (fork_child): Ditto.
841 (fork_parent): Ditto.
842 * grp.cc (internal_getgroups): Ditto.
843 * security.cc (verify_token): Ditto.
844 (check_file_access): Ditto.
845 (cygwin_set_impersonation_token): Detect conflicts. Set
846 user.external_token.
847 * spawn.cc (spawn_guts): Use new cygheap_user methods.
848 * syscalls.cc (seteuid32): Rearrange to use the two tokens
849 in cygheap_user.
850 (setegid32): Use new cygheap_user methods.
851 * uinfo.cc: (internal_getlogin): Ditto.
852
853 2003-06-25 Doru Carastan <doru.carastan@mvista.com>
854
855 * Makefile.in: Use INSTALL_PROGRAM to install the cygwin DLL.
856
857 2003-06-24 Thomas Pfaff <tpfaff@gmx.net>
858
859 * thread.cc (MTinterface::fixup_after_fork): Fix thread list after
860 fork.
861 (pthread::threads): Instantiate.
862 (pthread::pthread): Initialize running and suspendend.
863 Initialize next with NULL.
864 Add thread to thread list if it is not the null_pthread.
865 (pthread::~pthread): Remove thread from thread list if it is
866 not the null_pthread.
867 (pthread::postcreate): Set running flag.
868 (pthread::exit): Reset running flag.
869 (pthread::cancel): Try to cancel thread only if still running.
870 (pthread::_fixup_after_fork): Implement.
871 (pthread::detach): Check if thread is still running before detach.
872 * thread.h (pthread::running): New member.
873 (pthread::next): Ditto.
874 (pthread::fixup_after_fork): New static method.
875 (pthread::threads): New static method.
876 (pthread::_fixup_after_fork): New method.
877
878 2003-06-20 Christopher Faylor <cgf@redhat.com>
879
880 * pinfo.cc (_pinfo::commune_send): Don't attempt to communicate with a
881 pure windows process.
882
883 2003-06-18 Pierre Humblet <pierre.humblet@ieee.org>
884
885 * autoload.cc (GetNetworkParams): Add.
886 * net.cc (getdomainname): Call GetNetworkParams and read the
887 DhcpDomain registry value if warranted.
888
889 2003-06-17 Christopher Faylor <cgf@redhat.com>
890
891 * path.cc (mount): Do more strict checking on posix path arguments.
892
893 2003-06-15 Christopher Faylor <cgf@redhat.com>
894
895 Throughout, remove "include <errno.h>" from files which already include
896 cygerrno.h.
897
898 2003-06-15 Thomas Pfaff <tpfaff@gmx.net>
899
900 * include/cygwin/config.h (__DYNAMIC_REENT__): Define.
901 * include/cygwin/version.h: Bump API minor version.
902 * cygwin.din: Export __getreent
903 * cygerrno.h: Include errno.h. Fix places where _impure_ptr is used
904 directly to store the errno value.
905 * debug.cc (__set_errno): Ditto.
906 * errno.cc: Remove _RRENT_ONLY define to get errno.cc compiled.
907 * signal.cc: Rename _reent_clib to _REENT throughout.
908 * thread.h (reent_clib): Remove prototype.
909 * thread.cc (reent_clib): Rename reent_clib to __getreent. Return
910 _impure_ptr until MTinterface is initialized.
911 (reent_winsup): Fix a possible SEGV when _r == NULL. Return NULL
912 instead.
913 * MTinterface::fixup_after_fork: Switch reent back to _impure_ptr to
914 keep signal handling running when fork is called from a thread other
915 than the mainthread.
916
917 2003-06-12 Thomas Pfaff <tpfaff@gmx.net>
918
919 * thread.cc (pthread_attr_init): Revert change from 2003-06-11
920 to return 0 if attribute is already initialized back to EBUSY.
921 (pthread_condattr_init): Ditto.
922 (pthread_rwlockattr_init): Ditto.
923 (pthread_mutexattr_init): Ditto.
924
925 2003-06-12 Corinna Vinschen <corinna@vinschen.de>
926
927 * exceptions.cc (ctrl_c_handler): Don't send a signal on
928 CTRL_SHUTDOWN_EVENT. Add a comment to rationalize the patch.
929
930 2003-06-11 Thomas Pfaff <tpfaff@gmx.net>
931
932 * thread.cc (pthread_attr_init): Return 0 if attribute is already
933 initialized.
934 Fix return code if out of memory.
935 (pthread_condattr_init): Ditto.
936 (pthread_rwlockattr_init): Ditto.
937 (pthread_mutexattr_init): Return 0 if attribute is already
938 initialized.
939
940 2003-06-09 Pierre Humblet <pierre.humblet@ieee.org>
941
942 * spawn.cc (spawn_guts): Call CreateProcess while impersonated,
943 when the real {u,g}ids and the groups are original.
944 Move RevertToSelf and ImpersonateLoggedOnUser to the main line.
945 * uinfo.cc (uinfo_init): Reorganize. If CreateProcess was called
946 while impersonated, preserve the uids and gids and call
947 ImpersonateLoggedOnUser. Preserve the uids and gids on Win9X.
948
949 * exceptions.cc (error_start_init): Quote the pgm in the command.
950
951 2003-06-07 Christopher Faylor <cgf@redhat.com>
952
953 * poll.cc: Define FD_SETSIZE to ridiculously large number so that there
954 will be no artificially small limits.
955
956 2003-06-07 Christopher Faylor <cgf@redhat.com>
957
958 * fhandler_tty.cc (fhandler_tty_slave::close): Free the console when
959 last tty closes.
960
961 2003-06-07 Thomas Pfaff <tpfaff@gmx.net>
962
963 * fhandler_socket.cc (fhandler_socket::connect): Change error
964 handling for nonblocking connects to return EALREADY when
965 connect is called more than once for the same socket.
966
967 2003-06-06 Corinna Vinschen <corinna@vinschen.de>
968
969 * cygwin.din: Add vsyslog.
970 * fhandler.cc (fhandler_base::write): Only make file sparse if the
971 seeked area is >= 128K.
972 * syslog.cc (vsyslog): New function, overtaking functionality from
973 syslog.
974 (syslog): Just call vsyslog.
975 * include/cygwin/version.h: Bump API minor.
976 * include/sys/syslog.h: Add vsyslog declaration.
977
978 2003-06-05 Christopher Faylor <cgf@redhat.com>
979
980 * cygthread.cc (cygthread::terminate_thread): Change system_printf to
981 debug_printf.
982
983 2003-06-04 Christopher Faylor <cgf@redhat.com>
984
985 * shared.cc (shared_info::heap_chunk_size): Be really defensive about
986 making sure that heap_chunk is set.
987
988 2003-06-04 Christopher Faylor <cgf@redhat.com>
989
990 * path.cc (conv_path_list): Use correct value when calculating length
991 to avoid a potential SEGV.
992
993 2003-06-03 Pierre Humblet <pierre.humblet@ieee.org>
994
995 * fhandler_disk_file.cc (fhandler_disk_file::fstat): Mark the pc
996 as non-executable if the file cannot be opened for read. Retry query
997 open only if errno is EACCES. Never change the mode, even if it is 000
998 when query open() fails.
999
1000 2003-06-03 Christopher Faylor <cgf@redhat.com>
1001
1002 * configure.in: Allow any i?86 variant.
1003 * configure: Regenerate.
1004
1005 2003-06-03 Corinna Vinschen <corinna@vinschen.de>
1006 Thomas Pfaff <tpfaff@gmx.net>
1007
1008 * fhandler_socket.cc (connect_thread): Remove.
1009 (accept_thread): Remove.
1010 (fhandler_socket::connect): Remove all special blocking handling.
1011 (fhandler_socket::accept): Ditto.
1012 * net.cc (cygwin_connect): Make blocking sockets temporarily
1013 non-blocking and call cygwin_select on them to be interruptible.
1014 (cygwin_accept): Ditto.
1015
1016 2003-06-02 Christopher Faylor <cgf@redhat.com>
1017
1018 * spawn.cc (spawn_guts): Don't hang around if the parent doesn't exist.
1019
1020 2003-06-02 Christopher Faylor <cgf@redhat.com>
1021
1022 * cygthread.h (cygthread::terminate_thread): Mark private.
1023 * cygthread.cc (cygthread::terminate_thread): Deallocate free_range
1024 thread stuff.
1025
1026 2003-06-02 Corinna Vinschen <corinna@vinschen.de>
1027
1028 * fhandler_socket.cc (fhandler_socket::accept): Rename `signalled'
1029 to `interrupted' as used in fhandler_socket::connect.
1030
1031 2003-06-02 Corinna Vinschen <corinna@vinschen.de>
1032
1033 * fhandler_socket.cc (fhandler_socket::connect): Simplify previous
1034 patch.
1035 (fhandler_socket::accept): Ditto.
1036
1037 2003-06-02 Corinna Vinschen <corinna@vinschen.de>
1038
1039 * fhandler_socket.cc: Include cygthread.h.
1040 (class sock_event): Remove.
1041 (thread_connect): New function.
1042 (thread_accept): Ditto.
1043 (fhandler_socket::connect): Use cygthread instead of socket event
1044 handling for blocking sockets.
1045 (fhandler_socket::accept): Ditto.
1046
1047 2003-06-02 Christopher Faylor <cgf@redhat.com>
1048
1049 * fhandler.cc (fhandler_base::write): Correct minor printf formatting
1050 style glitch.
1051
1052 2003-06-01 Pierre Humblet <pierre.humblet@ieee.org>
1053
1054 * fhandler_disk_file.cc (fhandler_disk_file::fstat_by_name): Assume
1055 an existing directory is a root if FindFirstFile fails.
1056
1057 2003-05-30 Christopher Faylor <cgf@redhat.com>
1058
1059 * path.cc (mount_info::conv_to_win32_path): gcc warning about chroot_ok
1060 was actually valid. Fix it.
1061
1062 2003-05-30 Christopher Faylor <cgf@redhat.com>
1063
1064 * cygheap.cc (init_cheap): Temporarily remove inline that newer gcc's
1065 have problems with.
1066
1067 * path.cc (path_conv::check): Rework has_acls logic slightly. Uncouple
1068 exec tests away from filesystem tests.
1069
1070 2003-05-30 Corinna Vinschen <corinna@vinschen.de>
1071
1072 * include/sys/param.h: Add DEV_BSIZE.
1073
1074 2003-05-29 Pierre Humblet <pierre.humblet@ieee.org>
1075 Corinna Vinschen <corinna@vinschen.de>
1076
1077 * fhandler_socket.cc (fhandler_socket::dup): Rearrange. Fix
1078 conditional.
1079
1080 2003-05-28 Christopher Faylor <cgf@redhat.com>
1081
1082 * mkvers.sh: Avoid "-dontuse" tags.
1083
1084 * path.cc (path_conv::check): Set exec state based on known situations.
1085
1086 * path.cc (mount_item::fnmunge): New function.
1087 (mount_item::build_win32): New function.
1088 (mount_info::conv_to_win32_path): Use build_win32 to build windows
1089 path.
1090 * path.h (mount_item::fnmunge): Declare new function.
1091 (mount_item::build_win32): Ditto.
1092 * sys/mount.h (MOUNT_ENC): Define.
1093
1094 2003-05-28 Corinna Vinschen <corinna@vinschen.de>
1095
1096 * fhandler_socket.cc (fhandler_socket::dup): If running impersonated,
1097 revert to original account before calling fixup_before_fork_exec
1098 and impersonate again afterwards. Change comment accordingly.
1099 Clean up error handling and debug output.
1100
1101 2003-05-27 Thomas Pfaff <tpfaff@gmx.net>
1102
1103 * fhandler_socket.cc (sock_event::~sock_event): New method.
1104 (sock_event::load): Change to void. Check if winsock2 is available.
1105 (socke_event::wait): Return 0 if interruptible mode is not available.
1106 (fhandler_socket::connect): Remove checks for winsock2 availability.
1107 (fhandler_socket::accept): Ditto.
1108
1109 2003-05-27 Corinna Vinschen <corinna@vinschen.de>
1110
1111 * fhandler_socket.cc (fhandler_socket::dup): First try duplicating
1112 using WSADuplicateSocket/WSASocket, if that fails, try DuplicateHandle.
1113
1114 2003-05-27 Bill C. Riemers <cygwin@docbill.net>
1115
1116 * fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): Filter
1117 permissions through umask on FAT or if ntsec is off.
1118
1119 2003-05-26 Pierre Humblet <pierre.humblet@ieee.org>
1120
1121 * syscalls.cc (statfs): Call GetDiskFreeSpaceEx before GetDiskFreeSpace.
1122
1123 2003-05-26 Corinna Vinschen <corinna@vinschen.de>
1124
1125 * fhandler.cc (is_at_eof): Fix conditional. Use INVALID_FILE_SIZE
1126 instead of numeric constant.
1127
1128 2003-05-26 Corinna Vinschen <corinna@vinschen.de>
1129
1130 * fhandler_socket.cc (fhandler_socket::connect): Guard calls to
1131 sock_event methods by a check for WinSock2 availability.
1132 (fhandler_socket::accept): Ditto.
1133
1134 2003-05-26 Corinna Vinschen <corinna@vinschen.de>
1135
1136 * fhandler.h: Rename FH_W95LSBUG flag to FH_LSEEKED.
1137 (fhandler_base::set_did_lseek): Rename from set_check_win95_lseek_bug.
1138 (fhandler_base::get_did_lseek): Rename from get_check_win95_lseek_bug.
1139 (fhandler_base::set_fs_flags): New method.
1140 (fhandler_base::get_fs_flags): Ditto.
1141 * fhandler.cc (fhandler_base::write): Make 64 bit clean. Convert file
1142 to a "sparse" file when writing after a long lseek (>64K) beyond EOF.
1143 (fhandler_base::lseek): Call set_did_lseek() instead of
1144 set_check_win95_lseek_bug().
1145 (fhandler_base::fhandler_base): Initialize fs_flags to 0.
1146 * fhandler_disk_file.cc (fhandler_disk_file::open): Don't create files
1147 as "sparse" unconditionally. Set fs_flags member.
1148
1149 2003-05-25 Pierre Humblet <pierre.humblet@ieee.org>
1150
1151 * autoload.cc (GetDiskFreeSpaceEx): Add.
1152 * syscalls.cc (statfs): Call full_path.root_dir() instead of
1153 rootdir(full_path). Use GetDiskFreeSpaceEx when available and
1154 report space available in addition to free space.
1155 * fhandler_disk_file.cc (fhandler_disk_file::fstat_by_name):
1156 Do not call FindFirstFile for disk root directories.
1157
1158 2003-05-24 Joe Buehler <jhpb@draco.hekimian.com>
1159
1160 * fhandler_process.cc (format_process_stat): Use PagefileUsage
1161 instead of VirtualSize.
1162 (get_mem_values): Ditto.
1163
1164 2003-05-21 Corinna Vinschen <corinna@vinschen.de>
1165
1166 * shared_info.h: Match shared_name declaration with below change.
1167 * shared.cc (shared_name): Use incoming char * parameter instead of
1168 local static buffer.
1169 (open_shared): Accommodate new calling convention for shared_name.
1170 * exceptions.cc (events_init): Ditto.
1171 * sigproc.cc (getsem): Ditto.
1172 * syscalls.cc (login): Ditto.
1173 (logout): Ditto.
1174 (pututline): Ditto.
1175
1176 2003-05-20 Corinna Vinschen <corinna@vinschen.de>
1177
1178 * fhandler_socket.cc (secret_event_name): Return void. Use incoming
1179 char * parameter instead of local static buffer.
1180 (fhandler_socket::create_secret_event): Accommodate new calling
1181 convention for secret_event_name.
1182 (fhandler_socket::close_secret_event): Ditto.
1183
1184 2003-05-20 Corinna Vinschen <corinna@vinschen.de>
1185
1186 * fhandler_socket.cc (SECRET_EVENT_NAME): Remove.
1187 (ENTROPY_SOURCE_NAME): Ditto.
1188 (secret_event_name): New static function. Create shared event name
1189 with "Global\" prefix on systems supporting terminal services.
1190 (fhandler_socket::set_connect_secret): Fix conditional.
1191 (fhandler_socket::create_secret_event): Create secret event using
1192 secret_event_name().
1193 (fhandler_socket::close_secret_event): Ditto.
1194 * shared.cc (shared_name): Create shared object name with "Global\"
1195 prefix on systems supporting terminal services.
1196 * wincap.cc: Set has_terminal_services capability throughout.
1197 (wincap_2003): New global object representing Windows 2003 Server
1198 capabilities.
1199 (wincapc::init): Accommodate Windows 2003 Server.
1200 * wincap.h (struct wincaps): Add has_terminal_services capability.
1201
1202 2003-05-20 Charles Wilson <cygwin@cwilson.fastmail.fm>
1203
1204 * winsup/cygwin/include/cygwin/version.h: Bump API minor version.
1205 * winsup/cygwin/include/cygwin/types.h: Define key_t as long long.
1206 * winsup/cygwin/cygwin.din: Add ftok, _ftok.
1207 * winsup/cygwin/ipc.cc (ftok): Rework implementation.
1208
1209 2003-05-18 Joe Buehler <jhpb@hekimian.com>
1210
1211 * spawn.cc (spawn_guts): Show more of command line in strace output.
1212
1213 2003-05-15 Thomas Pfaff <tpfaff@gmx.net>
1214
1215 * thread.h (pthread::init_mainthread): Remove function parameter.
1216 (MTinterface::Init): Ditto.
1217 * thread.cc (MTinterface::Init): Remove function parameter.
1218 Always initialize reent_key.
1219 (pthread::init_mainthread): Remove function parameter.
1220 (MTinterface::fixup_after_fork): Fix pthread::init_mainthread call.
1221 * dcrt0.cc (dll_crt_0_1) Fix calls to MTinterface::Init and
1222 pthread::init_mainthread.
1223 Call pthread::init_mainthread only when not forked.
1224
1225 2003-05-15 Corinna Vinschen <corinna@vinschen.de>
1226
1227 * fhandler_proc.cc (format_proc_meminfo): Make swap memory output
1228 Linux style values.
1229
1230 2003-05-13 Corinna Vinschen <corinna@vinschen.de>
1231
1232 * include/cygwin/config.h: Define __USE_INTERNAL_STAT64 appropriately.
1233
1234 2003-05-12 Corinna Vinschen <corinna@vinschen.de>
1235
1236 * Makefile.in (CYGWIN_START): Define as crt0.o. Add to TARGET_LIBS.
1237 * fhandler.h (fhandler_virtual::fstat): Remove useless declaration.
1238 * fhandler_virtual.cc: Remove _COMPILING_NEWLIB define.
1239 * ipc.cc (ftok): Use stat64.
1240 * syscalls.cc (_fstat64): Remove alias.
1241 (_fstat): Ditto.
1242 (_stat): Ditto.
1243 (_fstat64_r): New function.
1244 (_fstat_r): Ditto.
1245 (_stat64_r): Ditto.
1246 (stat_r): Ditto.
1247 * crt0.o: New file, moved from newlib.
1248 * include/sys/param.h: Ditto.
1249 * include/sys/utime.h: Ditto.
1250 * include/sys/utmp.h: Ditto.
1251 * include/sys/dirent.h: Ditto. Expose different struct dirent,
1252 dependening of the environment.
1253
1254 2003-05-11 Corinna Vinschen <corinna@vinschen.de>
1255
1256 Replace ino_t by __ino64_t throughout.
1257
1258 2003-05-11 Corinna Vinschen <corinna@vinschen.de>
1259
1260 * include/cygwin/types.h: Add key_t typedef.
1261
1262 2003-05-10 Christopher Faylor <cgf@redhat.com>
1263
1264 * dir.cc (readdir): Fill out new old_d_ino field.
1265 * fhandler.h (fhandler_base::namehash): Define as ino_t.
1266 (fhandler_base::get_namehash): Ditto.
1267 * fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): Accommodate
1268 new 64 bit st_ino.
1269 * fhandler_socket.cc (fhandler_socket::fstat): Ditto.
1270 * path.cc (hash_path_name): Return ino_t.
1271 * syscalls.cc (stat64_to_stat32): Convert 64 bit inode to 32 bit.
1272 * winsup.h (hash_path_name): Declare as returning ino_t.
1273 * include/cygwin/stat.h (__stat32): Use 32 bit st_ino.
1274 (__stat64): Use 64 bit st_ino.
1275 * include/cygwin/types.h (__ino64_t): Define.
1276 (__ino32_t): Ditto.
1277 (ino_t): Define appropriately.
1278
1279 2003-05-10 Corinna Vinschen <corinna@vinschen.de>
1280
1281 * Makefile.in (NEW_FUNCTIONS): All 32/64 from 0.79 API get
1282 leading underscore.
1283 * cygwin.din: Ditto.
1284 * include/cygwin/version.h: Bump API minor number.
1285
1286 2003-05-09 Corinna Vinschen <corinna@vinschen.de>
1287
1288 * include/cygwin/config.h: New file.
1289
1290 2003-05-09 Christopher Faylor <cgf@redhat.com>
1291
1292 * cygthread.cc (cygthread::detach): Prioritize waiting for I/O
1293 completion over waiting for signal delivery.
1294
1295 2003-05-06 Thomas Pfaff <tpfaff@gmx.net>
1296
1297 * signal.cc (nanosleep): Do not wait twice for signal arrival.
1298
1299 2003-05-03 Corinna Vinschen <corinna@vinschen.de>
1300
1301 * include/cygwin/types.h: Fix erroneous definition of ino_t from
1302 2003-04-28.
1303
1304 2003-05-03 Corinna Vinschen <corinna@vinschen.de>
1305
1306 * syscalls.cc (chown_worker): Allow chown'ing of socket files.
1307
1308 2003-04-30 Thomas Pfaff <tpfaff@gmx.net>
1309
1310 * Makefile.in: Revert patch from 2003-04-17.
1311
1312 2003-04-28 Brian Ford <ford@vss.fsi.com>
1313
1314 * profil.h (PROFADDR): Prevent overflow when text segments are larger
1315 than 256k.
1316 * profil.c (profthr_func): Raise thread priority for more accurate
1317 sampling.
1318
1319 2003-04-26 Christopher Faylor <cgf@redhat.com>
1320
1321 * path.cc (hash_path_name): Use ino_t as type.
1322
1323 2003-04-26 Christopher Faylor <cgf@redhat.com>
1324
1325 * errno.cc (_sys_nerr): Fix compile error erroneously checked in on
1326 2003-04-23.
1327
1328 2003-04-25 Corinna Vinschen <corinna@vinschen.de>
1329
1330 * include/netinet/ip.h: Include netinet/in_systm.h and netinet/in.h
1331 to allow standalone usage (autoconf).
1332
1333 2003-04-23 Christopher Faylor <cgf@redhat.com>
1334
1335 * fork.cc: Change SLOW_PID_REUSE to NO_SLOW_PID_REUSE and invert ifdef
1336 sense throughout.
1337
1338 2003-04-22 Christopher Faylor <cgf@redhat.com>
1339
1340 * select.cc (fhandler_pipe::ready_for_read): Assure that get_guard is
1341 called for successful non-blocking pipe reads.
1342
1343 2003-04-22 Corinna Vinschen <corinna@vinschen.de>
1344
1345 * include/inttypes.h: New file.
1346 * include/stdint.h: New file.
1347 * include/cygwin/in.h: Include stdint.h instead of sys/types.h.
1348 * include/cygwin/types.h: Include stdint.h. Remove typedefs for
1349 intN_t and uintN_t since these are defined in stdint.h now.
1350
1351 2003-04-21 Christopher Faylor <cgf@redhat.com>
1352
1353 * include/cygwin/version.h: Bump DLL major number to 1005. Change DLL
1354 minor number to 0. Bump API minor number.
1355
1356 2003-04-20 Corinna Vinschen <corinna@vinschen.de>
1357
1358 * autoload.cc (CreateWindowStationA): Add.
1359 (SetProcessWindowStation): Add.
1360
1361 2003-04-19 Christopher Faylor <cgf@redhat.com>
1362
1363 * wincap.h (wincaps:pty_needs_alloc_console): New element.
1364 (wincapc:pty_needs_alloc_console): New function.
1365 * wincap.cc: Add pty_needs_alloc_console throughout.
1366 * fhandler_tty.cc (fhandler_tty_slave::open): Open an "invisible"
1367 console on first pty allocation.
1368
1369 2003-04-18 Christopher Faylor <cgf@redhat.com>
1370
1371 * fhandler_tty.cc (fhandler_tty_slave::open): Allocate a console
1372 whenever a pty is allocated.
1373
1374 2003-04-18 Christopher Faylor <cgf@redhat.com>
1375
1376 * Makefile.in: Use ${nostdlib} variable.
1377
1378 2003-04-18 Diego Biurrun <diego@biurrun.de>
1379
1380 * fhandler_proc.cc (format_proc_cpuinfo): Change /proc/cpuinfo "vendor
1381 id" string to "vendor_id" to conform with Linux systems.
1382
1383 2003-04-17 Christopher Faylor <cgf@redhat.com>
1384
1385 * syscalls.cc (setsid): Don't call FreeConsole if ctty is already < 0.
1386
1387 2003-04-17 Thomas Pfaff <tpfaff@gmx.net>
1388
1389 * Makefile.in: Add finline-functions optimization to CXXFLAGS.
1390 * autoload.cc (LoadDLLprime): Rename std_dll_init to
1391 _std_dll_init.
1392 (std_dll_init): Remove name mangling prototype. Add attributes
1393 used and noinline.
1394 (wsock_init): Ditto.
1395 Change wsock_init to _wsock_init in wsock32 and ws2_32
1396 LoadDLLprime.
1397 * exceptions.cc (unused_sig_wrapper): Remove prototype. Add
1398 attributes used and noinline.
1399 * pwdgrp.h ((pwdgrp (passwd *&)): Remove inline code.
1400 (pwdgrp (__group32 *&)): Ditto.
1401 * grp.cc (pwdgrp (passwd *&)): Outline constructor.
1402 (pwdgrp (__group32 *&)): Ditto.
1403
1404 2003-04-17 Thomas Pfaff <tpfaff@gmx.net>
1405
1406 * thread.h (pthread::equal): New static method.
1407 * thread.cc: Rename pthread_equal to pthread::equal throughout.
1408 (pthread_equal): Use pthread::equal to compare threads ids.
1409
1410 2003-04-15 Christopher Faylor <cgf@redhat.com>
1411
1412 * termios.cc (setspeed): New function.
1413 (cfsetospeed): Use setspeed to set speed.
1414 (cfsetispeed): Use setspeed to set speed.
1415
1416 2003-04-15 Chris January <chris@atomice.net>
1417
1418 * autoload.cc: Add load statement for UuidCreate, and
1419 UuidCreateSequential.
1420 * cpuid.h: New file.
1421 * cygwin.din: Export gethostid.
1422 * fhandler_proc.cc (cpuid): Move to cpuid.h.
1423 (can_set_flag): Move to cpuid.h.
1424 * syscalls.cc (gethostid): New function.
1425 * version.h: Bump api minor version number to 83.
1426
1427 2003-04-15 Thomas Pfaff <tpfaff@gmx.net>
1428
1429 * thread.h (pthread_rwlock::release): New method.
1430 * thread.cc (pthread_rwlock::unlock): Use release to signal waiting
1431 threads.
1432 (pthread_rwlock::rdlock_cleanup): Signal waiting threads after a
1433 cancelation.
1434 (pthread_rwlock::wrlock_cleanup): Ditto.
1435
1436 2003-04-13 Pierre Humblet <pierre.humblet@ieee.org>
1437
1438 * mkvers.sh: Prefix day with 0 in date only when day < 10.
1439
1440 2003-04-11 Pierre Humblet <pierre.humblet@ieee.org>
1441
1442 * security.cc (get_info_from_sd): New function.
1443 (get_nt_attribute): Only call read_sd and get_info_from_sd.
1444 Return void.
1445 (get_file_attribute): Move sd error handling to get_info_from_sd.
1446 and symlink handling to fhandler_disk_file::fstat_helper.
1447 (get_nt_object_attribute): Only call read_sd and get_info_from_sd.
1448 Return void.
1449 (get_object_attribute): Remove symlink handling and simply return -1
1450 when ntsec is off.
1451 * fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): For
1452 symlinks set the attribute, call get_file_attribute to get the ids
1453 and return. In the normal case call get_file_attribute with the
1454 addresses of the buffer ids and do not recheck if the file is a socket.
1455
1456 2003-04-10 Christopher Faylor <cgf@redhat.com>
1457
1458 * cygthread.cc (cygthread::stub): Initialize stack pointer earlier.
1459 (cygthread::simplestub): Initialize stack pointer.
1460 (cygthread::terminate_thread): Account for possibility that stack
1461 pointer has not been set. Issue warnings for unusual conditions.
1462
1463 2003-04-10 Corinna Vinschen <corinna@vinschen.de>
1464
1465 * regex/regex.h: Define regoff_t as _off_t.
1466 * regex/regex2.h: Ditto.
1467
1468 2003-04-10 Corinna Vinschen <corinna@vinschen.de>
1469
1470 * cygwin.din: Export wcscoll, wcswidth and wcwidth.
1471 * include/cygwin/version.h: Bump API minor number.
1472
1473 2003-04-10 Christopher Faylor <cgf@redhat.com>
1474
1475 * cygthread.h: Change 'avail' cygthread element to 'inuse' throughout.
1476 * cygthread.cc: Ditto.
1477 (cygthread::stub): Don't initialize already initialized events.
1478 (cygthread::freerange): Don't create thread here.
1479 (cygthread::cygthread): Create thread here. Die if thread not created.
1480 (cygthread::operator new): Simplify. Just grab a thread structure from
1481 the pool. Don't try to start the thread.
1482 (cygthread::terminate_thread): Don't close event handles. Just reuse
1483 them. Call MEM_RELEASE rather than MEM_DECOMMIT (from Joe uehler).
1484
1485 2003-04-08 Bob Cassels <bcassels@abinitio.com>
1486
1487 * fhandler_console.cc (fhandler_console::read) Handle certain key up
1488 events, to allow pasting accented characters and typing them using the
1489 "alt + numerics" sequences.
1490
1491 2003-04-07 Christopher Faylor <cgf@redhat.com>
1492
1493 * include/limits.h (IOV_MAX): Set to a number which is small enough to
1494 use in an array.
1495
1496 2003-04-04 Christopher Faylor <cgf@redhat.com>
1497
1498 * cygthread.h (cygthread::avail): Make LONG for easier use with
1499 Interlocked* functions.
1500 * cygthread.cc (cygthread::init): Eliminate unneeded muto.
1501 (cygthread::operator new): Don't lock. Instead change use of avail
1502 variable into tri-state: available (1), not available (-1),
1503 uninitialized (0).
1504 (cygthread::terminate_thread): Set avail to uninitialized.
1505 (cygthread::detach): Eliminate local 'avail'. Always set avail to 1
1506 unless signalled.
1507
1508 2003-04-04 Christopher Faylor <cgf@redhat.com>
1509
1510 * cygthread.cc (cygthread::operator new): Be more defensive when messing with
1511 threads that are marked "unavailable".
1512
1513 2003-04-03 Christopher Faylor <cgf@redhat.com>
1514
1515 * fhandler_console.cc (CONVERT_LIMIT): Use a size for the 21st century.
1516
1517 2003-04-03 Corinna Vinschen <corinna@vinschen.de>
1518
1519 * external.cc (check_ntsec): Return general ntsec state on NULL
1520 filename. Check wincap.is_security() additionally.
1521
1522 2003-04-02 Christopher Faylor <cgf@redhat.com>
1523
1524 * Makefile.in (EXTRA_OFILES): Remove debugging object.
1525
1526 2003-04-02 Jason Tishler <jason@tishler.net>
1527 Christopher Faylor <cgf@redhat.com>
1528
1529 * external.cc (check_ntsec): New function.
1530 (cygwin_internal): Add CW_CHECK_NTSEC handling to call check_ntsec()
1531 from applications.
1532 * include/cygwin/version.h: Bump API minor number.
1533 * include/sys/cygwin.h (cygwin_getinfo_types): Add CW_CHECK_NTSEC.
1534
1535 2003-04-02 Christopher Faylor <cgf@redhat.com>
1536
1537 * cygthread.cc (cygthread::new): Add more defensive debugging.
1538
1539 2003-04-01 Pierre Humblet <pierre.humblet@ieee.org>
1540
1541 * fhandler.cc (fhandler_base::fstat): Set the uid and gid fields
1542 from the current effective ids.
1543 * fhandler_socket.cc (fhandler_socket::fstat): Keep the uid and gid set
1544 by fhandler_base::fstat.
1545 * security.cc (get_nt_attribute): Do not test wincap.has_security ().
1546 (get_nt_object_attribute): Ditto.
1547 (get_file_attribute): Add test for wincap.has_security ().
1548 (get_object_attribute): Ditto.
1549
1550 2003-04-01 Corinna Vinschen <corinna@vinschen.de>
1551
1552 * dir.cc: Change __off32_t to _off_t and __off64_t to _off64_t
1553 throughout.
1554 * fhandler.cc: Ditto.
1555 * fhandler.h: Ditto.
1556 * fhandler_clipboard.cc: Ditto.
1557 * fhandler_disk_file.cc: Ditto.
1558 * fhandler_dsp.cc: Ditto.
1559 * fhandler_floppy.cc: Ditto.
1560 * fhandler_mem.cc: Ditto.
1561 * fhandler_proc.cc: Ditto.
1562 * fhandler_process.cc: Ditto.
1563 * fhandler_random.cc: Ditto.
1564 * fhandler_registry.cc: Ditto.
1565 * fhandler_tape.cc: Ditto.
1566 * fhandler_termios.cc: Ditto.
1567 * fhandler_virtual.cc: Ditto.
1568 * fhandler_zero.cc: Ditto.
1569 * mmap.cc: Ditto.
1570 * pipe.cc: Ditto.
1571 * syscalls.cc: Ditto.
1572 * winsup.h: Ditto.
1573 * include/cygwin/stat.h: Ditto.
1574 * include/cygwin/types.h: Ditto. Remove definition of __off32_t
1575 and __off64_t.
1576
1577 2003-03-31 Christopher Faylor <cgf@redhat.com>
1578
1579 * exceptions.cc (setup_handler): Make sure winapi lock is released when
1580 exiting loop.
1581
1582 2003-03-30 Christopher Faylor <cgf@redhat.com>
1583
1584 * include/cygwin/fs.h: Remove unneeded include.
1585 * include/cygwin/in.h: Include sys/types.h rather than cygwin/types.h.
1586
1587 2003-03-29 Corinna Vinschen <corinna@vinschen.de>
1588
1589 * syscalls.cc (login): Fix comment.
1590 (logout): Ditto.
1591
1592 2003-03-29 Corinna Vinschen <corinna@vinschen.de>
1593
1594 * syscalls.cc: Slightly cleanup all utmp functions.
1595 (login): Use mutex to secure against concurrent access to wtmp file.
1596 (logout): Rewrite using POSIX calls.
1597 (utmp_fd): Initialized to -1 now. Any value < 0 is treated as closed
1598 in subsequent functions.
1599 (utmp_readonly): New variable, indicating utmp file open for reading
1600 only.
1601 (internal_setutent): New function implementing setutent().
1602 (setutent): Call internal_setutent now.
1603 (endutent): Reset utmp_readonly.
1604 (getutent): Return immediately if utmp file can't be opened.
1605 (getutid): Ditto.
1606 (getutline): Ditto.
1607 (pututline): Ditto. Use mutex to secure against concurrent access to
1608 utmp file.
1609
1610 2003-03-28 Christopher Faylor <cgf@redhat.com>
1611
1612 * Makefile.in: Remove EXE_LDFLAGS. Fix fhandler_CFLAGS typo. Recognize .s suffix.
1613 * configure.in: Remove EXE_LDFLAGS.
1614 * configure: Regenerate.
1615
1616 2003-03-28 Christopher Faylor <cgf@redhat.com>
1617
1618 * include/sys/cygwin.h: Declare cygwin_internal as unsigned long.
1619 * external.cc (cygwin_internal): Define as unsigned long.
1620
1621 2003-03-27 Christopher Faylor <cgf@redhat.com>
1622
1623 * include/sys/cygwin.h: Move cygwin_internal outside of WINVER
1624 conditional.
1625
1626 2003-03-27 Thomas Pfaff <tpfaff@gmx.net>
1627
1628 * thread.cc: Change 1==foo equations to foo==1 throughout.
1629
1630 2003-03-27 Thomas Pfaff <tpfaff@gmx.net>
1631
1632 * thread.h: Change class names, methods, members and local vars
1633 according to the GNU coding style.
1634 * thread.cc: Ditto.
1635 * dcrt0.cc (dll_crt0_1): Rename pthread::initMainThread call to
1636 pthread::init_mainthread.
1637 * pthread.cc (pthead_getsequence_np): Rename pthread::isGoodObject
1638 call to pthread::is_good_object.
1639
1640 2003-03-27 Joe Buehler <jhpb@draco.hekimian.com>
1641
1642 * autoload.cc: Add RegGetKeySecurity().
1643 * security.cc (get_nt_object_attribute): Use RegGetKeySecurity() for
1644 performance.
1645
1646 2003-03-25 Christopher Faylor <cgf@redhat.com>
1647 Joe Buehler <jhpb@draco.hekimian.com>
1648
1649 * fork.cc (fork_parent): Don't copy signals from parent to child here.
1650 * sigproc.cc (proc_subproc): Copy signals from parent to child pinfo
1651 here.
1652
1653 2003-03-23 Thomas Pfaff <tpfaff@gmx.net>
1654
1655 * thread.h (class List): Move inline code inside class declaration.
1656 (List::forEach): Change callback parameter to template class member
1657 function pointer.
1658 (pthread_keys::fixup_before_fork): Change to inline. Use List::forEach
1659 to fixup keys.
1660 (pthread_keys::fixup_after_fork): Ditto.
1661 (pthread_keys::runAllDestructors): Ditto.
1662 (pthread_key::saveAKey): Remove.
1663 (pthread_key::restoreAKey): Ditto.
1664 (pthread_key::destroyAKey): Ditto.
1665 (pthread_key::run_destructor): Rename to runDestructor.
1666 (pthread_mutex::fixup_after_fork): Change to inline. Use List::forEach
1667 to fixup mutexes after a fork.
1668 (pthread_mutex::FixupAfterFork): New method.
1669 (pthread_mutex::mutexes): New member.
1670 (pthread_cond::fixup_after_fork): Change to inline. Use List::forEach
1671 to fixup conds after a fork.
1672 (pthread_cond::FixupAfterFork): New method.
1673 (pthread_cond::conds): New member.
1674 (pthread_rwlock::fixup_after_fork): Change to inline. Use
1675 List::forEach to fixup rwlocks after a fork.
1676 (pthread_rwlock::FixupAfterFork): New method.
1677 (pthread_rwlock::rwlocks): New member.
1678 (semaphore::fixup_after_fork): Change to inline. Use List::forEach to
1679 fixup mutexes after a fork.
1680 (semaphore::FixupAfterFork): New method.
1681 (semaphore::semaphores): New member.
1682 (MTinterface::mutexs): Remove.
1683 (MTinterface::conds): Ditto.
1684 (MTinterface::rwlocks): Ditto.
1685 (MTinterface::semaphores): Ditto.
1686 (pthread_equal): Add extern "C".
1687 (pthread_mutex_lock): Ditto.
1688
1689 * thread.cc (MTinterface::fixup_after_fork): Change fixup_after_fork
1690 calls for pthread objects.
1691 (semaphore::conds): Instantiate.
1692 (pthread_cond::pthread_cond): Use List::Insert rather than custom list
1693 code.
1694 (pthread_cond::~pthread_cond): Use List::Remove rather than custom list
1695 code.
1696 (pthread_cond::fixup_after_fork): Rename to FixupAfterFork.
1697 (pthread_rwlock::rwlocks): Instantiate.
1698 (pthread_rwlock::pthread_crwlock): Use List::Insert rather than custom
1699 list code.
1700 (pthread_rwlock::~pthread_rwlock): Use List::Remove rather than custom
1701 list code.
1702 (pthread_rwlock::fixup_after_fork): Rename to FixupAfterFork.
1703 (pthread_key::saveAKey): Remove.
1704 (pthread_key::fixup_before_fork): Ditto.
1705 (pthread_key::restoreAKey): Ditto.
1706 (pthread_key::fixup_after_fork): Ditto.
1707 (pthread_key::destroyAKey): Ditto.
1708 (pthread_key::runAllDestructors): Ditto.
1709 (pthread_key::run_destructor): Rename to runDestructor.
1710 (pthread_mutex::mutexes): Instantiate.
1711 (pthread_mutex::pthread_mutex): Use List::Insert rather than custom
1712 list code.
1713 (pthread_mutex::~pthread_mutex): Use List::Remove rather than custom
1714 list code.
1715 (pthread_mutex::fixup_after_fork): Rename to FixupAfterFork.
1716 (semaphore::conds): Instantiate.
1717 (semaphore::semaphore): Use List::Insert rather than custom list code.
1718 (semaphores::~semaphore): Use List::Remove rather than custom list
1719 code.
1720 (semaphore::fixup_after_fork): Rename to FixupAfterFork.
1721
1722 2003-03-22 Christopher Faylor <cgf@redhat.com>
1723
1724 * pipe.cc (fhandler_pipe::dup): Don't dup input_handle if it doesn't
1725 exist.
1726
1727 2003-03-22 Christopher Faylor <cgf@redhat.com>
1728
1729 * syscalls.cc (unlink): Be more defensive when SetFileAttributes is
1730 called. Fix typo in debugging output.
1731
1732 2003-03-21 Christopher Faylor <cgf@redhat.com>
1733
1734 * fork.cc: Conditionalize use of slow_pid_reuse throughout. It's not
1735 necessary for newer versions of bash.
1736
1737 2003-03-20 Corinna Vinschen <corinna@vinschen.de>
1738
1739 * fhandler_socket.cc (fhandler_socket::sendto): Restrict EPIPE and
1740 SIGPIPE handling to connection oriented sockets. Add comment.
1741
1742 2003-03-19 Christopher Faylor <cgf@redhat.com>
1743
1744 * sigproc.h (signal_fixup_after_exec): Eliminate argument in declaration.
1745 * exceptions.cc (signal_fixup_after_exec): Eliminate argument in
1746 definition. Don't reset signal handlers after spawm. Just treat like
1747 fork/exec.
1748 * dcrt0.cc (dll_crt0_1): Don't pass PROC_SPAWN argument to
1749 signal_fixup_after_exec.
1750 * syscalls.cc (unlink): Don't change attributes of file if not readonly/system.
1751 Ditto for resetting of arguments.
1752
1753 2003-03-19 Corinna Vinschen <corinna@vinschen.de>
1754
1755 * glob.c: Eliminate __INSIDE_CYGWIN__ preprocessor conditionals
1756 throughout.
1757
1758 2003-03-19 Corinna Vinschen <corinna@vinschen.de>
1759
1760 * fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): Fix
1761 wrong usage of S_IFDIR.
1762 * security.cc (get_attribute_from_acl): Ditto.
1763 (get_file_attribute): Fix wrong usage of S_IFLNK.
1764 (get_object_attribute): Ditto.
1765 (alloc_sd): Fix wrong usage of S_IFDIR.
1766 * syscalls.cc (chmod): Allow chmod'ing of socket files.
1767
1768 2003-03-19 Corinna Vinschen <corinna@vinschen.de>
1769
1770 * include/cygwin/version.h (CYGWIN_VERSION_CHECK_FOR_USING_BIG_TYPES):
1771 Define.
1772 * glob.c (g_lstat): Use CYGWIN_VERSION_CHECK_FOR_USING_BIG_TYPES
1773 instead of numerical constants.
1774 (g_stat): Ditto.
1775
1776 2003-03-18 Thomas Pfaff <tpfaff@gmx.net>
1777
1778 * pthread.cc (pthread_attr_init): Remove
1779 (pthread_attr_destroy): Ditto.
1780 (pthread_attr_setdetachstate): Ditto.
1781 (pthread_attr_getdetachstate): Ditto.
1782 (pthread_attr_setstacksize): Ditto.
1783 (pthread_attr_getstacksize): Ditto.
1784 (pthread_attr_setinheritsched): Ditto.
1785 (pthread_attr_getinheritsched): Ditto.
1786 (pthread_attr_setschedparam): Ditto.
1787 (pthread_attr_getschedparam): Ditto.
1788 (pthread_attr_setschedpolicy): Ditto.
1789 (pthread_attr_getschedpolicy): Ditto.
1790 (pthread_attr_setscope): Ditto.
1791 (pthread_attr_getscope): Ditto.
1792 (pthread_attr_setstackaddr): Ditto.
1793 (pthread_attr_getstackaddr): Ditto.
1794 (pthread_key_create): Ditto.
1795 (pthread_key_delete): Ditto.
1796 (pthread_setspecific): Ditto.
1797 (pthread_getspecific): Ditto.
1798 (pthread_kill): Ditto.
1799 (pthread_sigmask): Ditto.
1800 (pthread_equal): Ditto.
1801 (pthread_mutex_lock): Ditto.
1802 (pthread_mutex_trylock): Ditto.
1803 (pthread_mutex_unlock): Ditto.
1804 (pthread_mutex_destroy): Ditto.
1805 (pthread_mutex_setprioceiling): Ditto.
1806 (pthread_mutex_getprioceiling): Ditto.
1807 (pthread_mutexattr_destroy): Ditto.
1808 (pthread_mutexattr_getprioceiling): Ditto.
1809 (pthread_mutexattr_getprotocol): Ditto.
1810 (pthread_mutexattr_getpshared): Ditto.
1811 (pthread_mutexattr_gettype): Ditto.
1812 (pthread_mutexattr_init): Ditto.
1813 (pthread_mutexattr_setprioceiling): Ditto.
1814 (pthread_mutexattr_setprotocol): Ditto.
1815 (pthread_mutexattr_setpshared): Ditto.
1816 (pthread_mutexattr_settype): Ditto.
1817 (pthread_cond_destroy): Ditto.
1818 (pthread_cond_signal): Ditto.
1819 (pthread_cond_broadcast): Ditto.
1820 (pthread_condattr_init): Ditto.
1821 (pthread_condattr_destroy): Ditto.
1822 (pthread_condattr_getpshared): Ditto.
1823 (pthread_condattr_setpshared): Ditto.
1824 (pthread_rwlock_destroy): Ditto.
1825 (pthread_rwlock_rdlock): Ditto.
1826 (pthread_rwlock_tryrdlock): Ditto.
1827 (pthread_rwlock_wrlock): Ditto.
1828 (pthread_rwlock_trywrlock): Ditto.
1829 (pthread_rwlock_unlock): Ditto.
1830 (pthread_rwlockattr_init): Ditto.
1831 (pthread_rwlockattr_getpshared): Ditto.
1832 (pthread_rwlockattr_setpshared): Ditto.
1833 (pthread_rwlockattr_destroy): Ditto.
1834 (pthread_getconcurrency): Ditto.
1835 (pthread_setconcurrency): Ditto.
1836 (pthread_getschedparam): Ditto.
1837 (pthread_setschedparam): Ditto.
1838
1839 * thread.h (__pthread_attr_init): Remove prototype.
1840 (__pthread_attr_destroy): Ditto.
1841 (__pthread_attr_setdetachstate): Ditto.
1842 (__pthread_attr_getdetachstate): Ditto.
1843 (__pthread_attr_setstacksize): Ditto.
1844 (__pthread_attr_getstacksize): Ditto.
1845 (__pthread_attr_setinheritsched): Ditto.
1846 (__pthread_attr_getinheritsched): Ditto.
1847 (__pthread_attr_setschedparam): Ditto.
1848 (__pthread_attr_getschedparam): Ditto.
1849 (__pthread_attr_setschedpolicy): Ditto.
1850 (__pthread_attr_getschedpolicy): Ditto.
1851 (__pthread_attr_setscope): Ditto.
1852 (__pthread_attr_getscope): Ditto.
1853 (__pthread_attr_setstackaddr): Ditto.
1854 (__pthread_attr_getstackaddr): Ditto.
1855 (__pthread_key_create): Ditto.
1856 (__pthread_key_delete): Ditto.
1857 (__pthread_setspecific): Ditto.
1858 (__pthread_getspecific): Ditto.
1859 (__pthread_kill): Ditto.
1860 (__pthread_sigmask): Ditto.
1861 (__pthread_equal): Ditto.
1862 (__pthread_mutex_lock): Ditto.
1863 (__pthread_mutex_trylock): Ditto.
1864 (__pthread_mutex_unlock): Ditto.
1865 (__pthread_mutex_destroy): Ditto.
1866 (__pthread_mutex_setprioceiling): Ditto.
1867 (__pthread_mutex_getprioceiling): Ditto.
1868 (__pthread_mutexattr_destroy): Ditto.
1869 (__pthread_mutexattr_getprioceiling): Ditto.
1870 (__pthread_mutexattr_getprotocol): Ditto.
1871 (__pthread_mutexattr_getpshared): Ditto.
1872 (__pthread_mutexattr_gettype): Ditto.
1873 (__pthread_mutexattr_init): Ditto.
1874 (__pthread_mutexattr_setprioceiling): Ditto.
1875 (__pthread_mutexattr_setprotocol): Ditto.
1876 (__pthread_mutexattr_setpshared): Ditto.
1877 (__pthread_mutexattr_settype): Ditto.
1878 (__pthread_cond_destroy): Ditto.
1879 (__pthread_cond_signal): Ditto.
1880 (__pthread_cond_broadcast): Ditto.
1881 (__pthread_condattr_init): Ditto.
1882 (__pthread_condattr_destroy): Ditto.
1883 (__pthread_condattr_getpshared): Ditto.
1884 (__pthread_condattr_setpshared): Ditto.
1885 (__pthread_rwlock_destroy): Ditto.
1886 (__pthread_rwlock_rdlock): Ditto.
1887 (__pthread_rwlock_tryrdlock): Ditto.
1888 (__pthread_rwlock_wrlock): Ditto.
1889 (__pthread_rwlock_trywrlock): Ditto.
1890 (__pthread_rwlock_unlock): Ditto.
1891 (__pthread_rwlockattr_init): Ditto.
1892 (__pthread_rwlockattr_getpshared): Ditto.
1893 (__pthread_rwlockattr_setpshared): Ditto.
1894 (__pthread_rwlockattr_destroy): Ditto.
1895 (__pthread_getconcurrency): Ditto.
1896 (__pthread_setconcurrency): Ditto.
1897 (__pthread_getschedparam): Ditto.
1898 (__pthread_setschedparam): Ditto.
1899
1900 * thread.cc: Rename __pthread_equal to pthread_equal throughout.
1901 Change pthread_self parameter appropriate.
1902 (__pthread_attr_init): Remove __ prefix. Change to extern "C".
1903 (__pthread_attr_destroy): Ditto.
1904 (__pthread_attr_setdetachstate): Ditto.
1905 (__pthread_attr_getdetachstate): Ditto.
1906 (__pthread_attr_setstacksize): Ditto.
1907 (__pthread_attr_getstacksize): Ditto.
1908 (__pthread_attr_setinheritsched): Ditto.
1909 (__pthread_attr_getinheritsched): Ditto.
1910 (__pthread_attr_setschedparam): Ditto.
1911 (__pthread_attr_getschedparam): Ditto.
1912 (__pthread_attr_setschedpolicy): Ditto.
1913 (__pthread_attr_getschedpolicy): Ditto.
1914 (__pthread_attr_setscope): Ditto.
1915 (__pthread_attr_getscope): Ditto.
1916 (__pthread_attr_setstackaddr): Ditto.
1917 (__pthread_attr_getstackaddr): Ditto.
1918 (__pthread_key_create): Ditto.
1919 (__pthread_key_delete): Ditto.
1920 (__pthread_setspecific): Ditto.
1921 (__pthread_getspecific): Ditto.
1922 (__pthread_kill): Ditto.
1923 (__pthread_sigmask): Ditto.
1924 (__pthread_equal): Ditto.
1925 (__pthread_mutex_lock): Ditto.
1926 (__pthread_mutex_trylock): Ditto.
1927 (__pthread_mutex_unlock): Ditto.
1928 (__pthread_mutex_destroy): Ditto.
1929 (__pthread_mutex_setprioceiling): Ditto.
1930 (__pthread_mutex_getprioceiling): Ditto.
1931 (__pthread_mutexattr_destroy): Ditto.
1932 (__pthread_mutexattr_getprioceiling): Ditto.
1933 (__pthread_mutexattr_getprotocol): Ditto.
1934 (__pthread_mutexattr_getpshared): Ditto.
1935 (__pthread_mutexattr_gettype): Ditto.
1936 (__pthread_mutexattr_init): Ditto.
1937 (__pthread_mutexattr_setprioceiling): Ditto.
1938 (__pthread_mutexattr_setprotocol): Ditto.
1939 (__pthread_mutexattr_setpshared): Ditto.
1940 (__pthread_mutexattr_settype): Ditto.
1941 (__pthread_cond_destroy): Ditto.
1942 (__pthread_cond_signal): Ditto.
1943 (__pthread_cond_broadcast): Ditto.
1944 (__pthread_condattr_init): Ditto.
1945 (__pthread_condattr_destroy): Ditto.
1946 (__pthread_condattr_getpshared): Ditto.
1947 (__pthread_condattr_setpshared): Ditto.
1948 (__pthread_rwlock_destroy): Ditto.
1949 (__pthread_rwlock_rdlock): Ditto.
1950 (__pthread_rwlock_tryrdlock): Ditto.
1951 (__pthread_rwlock_wrlock): Ditto.
1952 (__pthread_rwlock_trywrlock): Ditto.
1953 (__pthread_rwlock_unlock): Ditto.
1954 (__pthread_rwlockattr_init): Ditto.
1955 (__pthread_rwlockattr_getpshared): Ditto.
1956 (__pthread_rwlockattr_setpshared): Ditto.
1957 (__pthread_rwlockattr_destroy): Ditto.
1958 (__pthread_getconcurrency): Ditto.
1959 (__pthread_setconcurrency): Ditto.
1960 (__pthread_getschedparam): Ditto.
1961 (__pthread_setschedparam): Ditto.
1962
1963 2003-03-18 Thomas Pfaff <tpfaff@gmx.net>
1964
1965 * cygwin.din: Add pthread_rwlock_destroy, pthread_rwlock_init,
1966 pthread_rwlock_rdlock, pthread_rwlock_tryrdlock,
1967 pthread_rwlock_wrlock, pthread_rwlock_trywrlock,
1968 pthread_rwlock_unlock, pthread_rwlockattr_init,
1969 pthread_rwlockattr_getpshared, pthread_rwlockattr_setpshared,
1970 and pthread_rwlockattr_destroy.
1971 * include/cygwin/version.h: Bump API minor number.
1972 * include/pthread.h (PTHREAD_RWLOCK_INITIALIZER): Define a
1973 reasonable value.
1974 Add prototypes for pthread_rwlock_destroy, pthread_rwlock_init,
1975 pthread_rwlock_rdlock, pthread_rwlock_tryrdlock,
1976 pthread_rwlock_wrlock, pthread_rwlock_trywrlock,
1977 pthread_rwlock_unlock, pthread_rwlockattr_init,
1978 pthread_rwlockattr_getpshared, pthread_rwlockattr_setpshared,
1979 and pthread_rwlockattr_destroy.
1980 * thread.h (PTHREAD_ONCE_MAGIC): Remove superflous semicolon.
1981 (PTHREAD_RWLOCK_MAGIC): New define.
1982 (PTHREAD_RWLOCKATTR_MAGIC): Ditto.
1983 (pthread_rwlockattr): New class.
1984 (pthread_rwlock): Ditto.
1985 (MTinterface::rwlocks): New member.
1986 (MTinterface::MTinterface): Initialize rwlocks.
1987 Add prototypes for __pthread_rwlock_destroy,
1988 __pthread_rwlock_wrlock, __pthread_rwlock_trywrlock,
1989 __pthread_rwlock_unlock, __pthread_rwlockattr_init,
1990 __pthread_rwlockattr_getpshared, __pthread_rwlockattr_setpshared,
1991 and __pthread_rwlockattr_destroy.
1992 * thread.cc (MTinterface::Init): Initialize rwlock internal mutex.
1993 (MTinterface::fixup_after_fork): Fixup rwlocks after fork.
1994 (pthread_rwlockattr::isGoodObject): Implement.
1995 (pthread_rwlockattr::pthread_rwlockattr): Ditto.
1996 (pthread_rwlockattr::~pthread_rwlockattr): Ditto.
1997 (pthread_rwlock::initMutex): Ditto.
1998 (pthread_rwlock::pthread_rwlock): Ditto.
1999 (pthread_rwlock::~pthread_rwlock): Ditto.
2000 (pthread_rwlock::RdLock): Ditto.
2001 (pthread_rwlock::TryRdLock): Ditto.
2002 (pthread_rwlock::WrLock): Ditto.
2003 (pthread_rwlock::TryWrLock): Ditto.
2004 (pthread_rwlock::UnLock): Ditto.
2005 (pthread_rwlock::addReader): Ditto.
2006 (pthread_rwlock::removeReader): Ditto.
2007 (pthread_rwlock::lookupReader): Ditto.
2008 (pthread_rwlock::RdLockCleanup): Ditto.
2009 (pthread_rwlock::WrLockCleanup): Ditto.
2010 (pthread_rwlock::fixup_after_fork): Ditto.
2011 (pthread_rwlock::isGoodObject): Ditto.
2012 (pthread_rwlock::isGoodInitializer): Ditto.
2013 (pthread_rwlock::isGoodInitializerOrObject): Ditto.
2014 (pthread_rwlock::isGoodInitializerOrBadObject): Ditto.
2015 (__pthread_rwlock_destroy): Ditto.
2016 (pthread_rwlock::init): Ditto.
2017 (__pthread_rwlock_rdlock): Ditto.
2018 (__pthread_rwlock_tryrdlock): Ditto.
2019 (__pthread_rwlock_wrlock): Ditto.
2020 (__pthread_rwlock_trywrlock): Ditto.
2021
2022 2003-03-18 Thomas Pfaff <tpfaff@gmx.net>
2023
2024 * thread.h (pthread_cond::ExitingWait): Remove.
2025 (pthread_cond::mutex): Ditto.
2026 (pthread_cond::cond_access): Ditto.
2027 (pthread_cond::win32_obj_id): Ditto.
2028 (pthread_cond::TimedWait): Ditto.
2029 (pthread_cond::BroadCast): Ditto.
2030 (pthread_cond::Signal): Ditto.
2031 (pthread_cond::waiting): Change type to unsigned long.
2032 (pthread_cond::pending): New member.
2033 (pthread_cond::semWait): Ditto.
2034 (pthread_cond::mtxIn): Ditto.
2035 (pthread_cond::mtxOut): Ditto.
2036 (pthread_cond::mtxCond): Ditto.
2037 (pthread_cond::UnBlock): New method.
2038 (pthread_cond::Wait): Ditto.
2039 * thread.cc: Update list of cancellation points.
2040 (pthread_cond::pthread_cond): Rewrite.
2041 (pthread_cond::~pthread_cond): Ditto.
2042 (pthread_cond::TimedWait): Remove.
2043 (pthread_cond::BroadCast): Ditto.
2044 (pthread_cond::Signal): Ditto.
2045 (pthread_cond::UnBlock): Implement.
2046 (pthread_cond::Wait): Ditto.
2047 (pthread_cond::fixup_after_fork): Rewrite.
2048 (pthread_mutex::fixup_after_fork): Remove DETECT_BAD_APP
2049 conditional.
2050 (__pthread_cond_broadcast): Just return 0 if the condition is
2051 not initialized. Call pthread_cond::UnBlock to release blocked
2052 threads.
2053 (__pthread_cond_signal): Ditto.
2054 (__pthread_cond__dowait): Rewrite.
2055 (pthread_cond_timedwait): Add pthread_testcancel call. Fix
2056 waitlength calculation.
2057 (pthread_cond_wait): Add pthread_testcancel call.
2058
2059 2003-03-18 Thomas Pfaff <tpfaff@gmx.net>
2060
2061 * include/pthread.h (PTHREAD_MUTEX_NORMAL): New define.
2062 * thread.cc: Remove errno.h include.
2063 (pthread::precreate): Change internal mutex type to normal.
2064 (pthread_mutex::canBeUnlocked): Implement.
2065 (pthread_mutex::pthread_mutex): Initialize lock_counter with 0.
2066 (pthread_mutex::Lock): Rename to _Lock. Add self parameter.
2067 Change lock_counter logic. Update SetOwner call.
2068 (pthread_mutex::TryLock): Rename to _TryLock. Add self parameter.
2069 Change lock_counter logic. Update SetOwner call.
2070 (pthread_mutex::UnLock): Rename to _UnLock. Add self parameter.
2071 Change lock_counter logic.
2072 (pthread_mutex::Destroy): Rename to _Destroy. Update TryLock call.
2073 (pthread_mutex::SetOwner): Move to thread.h as inline.
2074 (pthread_mutex::LockRecursive): Ditto.
2075 (pthread_mutex::fixup_after_fork): Change lock_counter logic.
2076 (__pthread_mutexattr_settype): Add PTHREAD_MUTEX_NORMAL to valid
2077 types check.
2078 * thread.h: Include errno.h and limits.h.
2079 (MUTEX_LOCK_COUNTER_INITIAL): Remove.
2080 (MUTEX_OWNER_ANONYMOUS): New define.
2081 (pthread_mutex::canBeUnlocked): New static method.
2082 (pthread_mutex::lock_counter): Change type to unsigned long.
2083 (pthread_mutex::GetPthreadSelf): New method.
2084 (pthread_mutex::Lock): Call _Lock with pthread_self pointer.
2085 (pthread_mutex::TryLock): Call _TryLock with pthread_self pointer.
2086 (pthread_mutex::UnLock): Call _UnLock with pthread_self pointer.
2087 (pthread_mutex::Destroy): Call _Destroy with pthread_self pointer.
2088 (pthread_mutex::SetOwner): Moved from thread.cc as inline.
2089 (pthread_mutex::LockRecursive): Ditto.
2090 (pthread_mutex::_Lock): New method.
2091 (pthread_mutex::_TryLock): New method.
2092 (pthread_mutex::_UnLock): New method.
2093 (pthread_mutex::_Destroy): New method.
2094
2095 2003-03-18 Christopher January <chris@atomice.net>
2096
2097 * fhandler_proc.cc (format_proc_cpuinfo): Use IsProcessorFeaturePresent
2098 only on Windows NT. Read CPU Mhz value only on NT. Revert previous
2099 change so cpuid instruction is called even on non-NT systems.
2100
2101 2003-03-17 Corinna Vinschen <corinna@vinschen.de>
2102
2103 * glob.c (g_lstat): Change API minor test to match API minor number
2104 change in previous patch.
2105 (g_stat): Ditto.
2106
2107 2003-03-17 Christopher Faylor <cgf@redhat.com>
2108
2109 * include/cygwin/version.h: Reorganize last two api versions so that
2110 btowc and trunc exports show up before previous bump since there has
2111 been no exported version of the DLL with the 64 bit changes yet but
2112 1.3.22 will have the btowc and trunc.
2113
2114 2003-03-17 Christopher Faylor <cgf@redhat.com>
2115
2116 * cygwin.din: Export btowc, trunc.
2117 * include/cygwin/version.h: Reflect new exports.
2118 * syscalls.cc (_stat): Rename to stat to avoid newlib wrapper.
2119 * syscalls.cc (_fstat): Ditto.
2120
2121 2003-03-16 Christopher Faylor <cgf@redhat.com>
2122
2123 * fhandler_console.cc (fhandler_console::close): Correct check for
2124 current tty. Add debugging output when console is freed.
2125 (set_console_state_for_spawn): Add debugging output.
2126 * fhandler_tty.cc (fhandler_tty_slave::open): Don't decrement console
2127 open flag when vforking.
2128 * sigproc.cc (sigproc_terminate): Fix debugging output.
2129 * spawn.cc (handle): Eliminate second argument.
2130 (spawn_guts): Reflect elimination of argument change to handle.
2131 * syscalls.cc (setsid): Add debugging output when console is freed.
2132
2133 2003-03-14 Christopher Faylor <cgf@redhat.com>
2134
2135 * syscalls.cc (rename): Revert assumption that DELETE_ON_CLOSE works on
2136 Win9x.
2137
2138 2003-03-13 Christopher Faylor <cgf@redhat.com>
2139
2140 * include/cygwin/version.h: Bump DLL minor number to 23.
2141
2142 2003-03-13 Corinna Vinschen <corinna@vinschen.de>
2143
2144 * autoload.cc (IsProcessorFeaturePresent): Add.
2145 * fhandler_proc.cc (format_proc_cpuinfo): Add case for 9x systems.
2146
2147 2003-03-13 Corinna Vinschen <corinna@vinschen.de>
2148
2149 * fhandler_proc.cc (format_proc_cpuinfo): Fix vendor id in cpuid case.
2150
2151 2003-03-13 Corinna Vinschen <corinna@vinschen.de>
2152
2153 * net.cc (cygwin_rcmd): Use correct file descriptor in call to fdsock.
2154 (cygwin_rexec): Ditto.
2155
2156 2003-03-13 Christopher Faylor <cgf@redhat.com>
2157
2158 * fhandler_tty.cc (fhandler_tty_slave::close): Fix typo in debug
2159 output.
2160
2161 * syscalls.cc (rename): Assume that DELETE_ON_CLOSE works on Win9x.
2162
2163 2003-03-11 Corinna Vinschen <corinna@vinschen.de>
2164
2165 * fhandler_socket.cc (fhandler_socket::dup): Don't call
2166 fhandler_base::dup() but call DuplicateHandle directly instead to have
2167 control over socket inheritence.
2168
2169 2003-03-11 Corinna Vinschen <corinna@vinschen.de>
2170
2171 * fhandler_socket.cc (fhandler_socket::dup): On NT systems avoid
2172 using WinSock2 socket duplication methods. Add comment.
2173
2174 2003-03-11 Pierre Humblet <pierre.humblet@ieee.org>
2175
2176 * fhandler_socket.cc (fhandler_socket::fixup_after_fork):
2177 Set io_handle to INVALID_SOCKET in case of failure.
2178 (fhandler_socket::dup): Return 0 if the io_handle is valid.
2179
2180 2003-03-10 Corinna Vinschen <corinna@vinschen.de>
2181
2182 * sec_acl.cc (setacl): Don't handle DELETE flag specially.
2183 * security.cc (alloc_sd): Ditto.
2184
2185 2003-03-09 Corinna Vinschen <corinna@vinschen.de>
2186
2187 * winver.rc: Change Copyright hint to include 2003.
2188
2189 2003-03-09 Corinna Vinschen <corinna@vinschen.de>
2190
2191 Switch to 32/64 datatypes:
2192 * Makefile.in (OBSOLETE_FUNCTIONS): Add open acl aclcheck aclfrommode
2193 aclfrompbits aclfromtext aclsort acltomode acltopbits acltotext chown
2194 facl fchown fgetpos fopen freopen fseeko fsetpos fstat ftello
2195 ftruncate getegid geteuid getgid getgrent getgrgid getgrnam getgroups
2196 getpwuid getpwuid_r getuid initgroups lchown lseek lstat mknod mmap
2197 seekdir setegid seteuid setgid setgroups setregid setreuid setuid stat
2198 telldir truncate.
2199 (NEW_FUNCTIONS): Add _open64 acl32 aclcheck32 aclfrommode32
2200 aclfrompbits32 aclfromtext32 aclsort32 acltomode32 acltopbits32
2201 acltotext32 chown32 facl32 fchown32 fgetpos64 fopen64 freopen64
2202 fseeko64 fsetpos64 fstat64 ftello64 ftruncate64 getegid32 geteuid32
2203 getgid32 getgrent32 getgrgid32 getgrnam32 getgroups32 getpwuid32
2204 getpwuid_r32 getuid32 initgroups32 lchown32 lseek64 lstat64 mknod32
2205 mmap64 seekdir64 setegid32 seteuid32 setgid32 setgroups32 setregid32
2206 setreuid32 setuid32 stat64 telldir64 truncate64 to substitute the
2207 above.
2208 * cygserver_shm.h (class client_request_shm): Change uid_t and gid_t
2209 members to __uid32_t and __gid32_t.
2210 * cygwin.din: Add symbols acl32 aclcheck32 aclfrommode32
2211 aclfrompbits32 aclfromtext32 aclsort32 acltomode32 acltopbits32
2212 acltotext32 facl32 fgetpos64 fopen64 freopen64 fseeko64 fsetpos64
2213 _fstat64 ftello64 _lseek64 mknod32 _open64.
2214 * glob.c: Include perprocess.h.
2215 (globtilde): Call getpwuid32 and getuid32 instead of getpwuid and
2216 getuid.
2217 (g_lstat): Check for applications API version to call the appropriate
2218 typed gl_lstat function.
2219 (g_stat): Ditto for gl_stat.
2220 * shm.cc (client_request_shm::client_request_shm): Call geteuid32
2221 and getegid32 instead of geteuid and getegid throughout.
2222 * syscalls.cc (_open64): New alias for open.
2223 (_lseek64): New alias for lseek64.
2224 (_fstat64): New alias for fseek64.
2225 (mknod32): New function.
2226 (mknod): Calls mknod32 now.
2227 * winsup.h: Make function declarations for getuid32, geteuid32,
2228 and getpwuid32 accessible for plain C sources. Add declarations
2229 for getegid32 and getpwnam.
2230 * include/cygwin/version.h: Bum API minor number to 78.
2231 * include/sys/cygwin.h: Guard C++ specific members of struct
2232 per_process against inclusion in plain C sources.
2233 * include/sys/mman.h (mman): Add guard to avoid type clash when
2234 compiling Cygwin.
2235
2236 2003-03-09 Christopher Faylor <cgf@redhat.com>
2237
2238 * include/cygwin/version.h: Bump DLL minor number to 22.
2239
2240 2003-03-09 Christopher Faylor <cgf@redhat.com>
2241
2242 Do some minor reformatting of 'extern "C"' use throughout.
2243
2244 2003-03-06 Christopher January <chris@atomice.net>
2245
2246 * autoload.cc (GetSystemTimes): Define new autoload function.
2247 * fhandler_proc.cc (proc_listing): Add cpuinfo and partitions entries.
2248 (fhandler_proc::fill_filebuf): Add PROC_CPUINFO and PROC_PARTITIONS
2249 cases.
2250 (format_proc_uptime): Use GetSystemTimes if available.
2251 (read_value): New macro.
2252 (print): New macro.
2253 (cpuid): New function.
2254 (can_set_flag): New function.
2255 (format_proc_cpuinfo): New function.
2256 (format_proc_partitions): New function.
2257
2258 2003-03-09 Christopher Faylor <cgf@redhat.com>
2259
2260 * syscalls.cc (unlink): Attempt to be more clever about setting
2261 attributes of file. Only open file in query mode to avoid having to
2262 mess with security stuff for reading.
2263
2264 2003-03-09 Corinna Vinschen <corinna@vinschen.de>
2265
2266 * rmsym: Fix regular expression.
2267
2268 2003-03-09 Christopher Faylor <cgf@redhat.com>
2269
2270 * Makefile.in: Change from using new-* to cygwin0 for temporary
2271 targets.
2272
2273 2003-03-09 Corinna Vinschen <corinna@vinschen.de>
2274
2275 * include/cygwin/socket.h: Set SOMAXCONN to Winsock2 value.
2276
2277 2003-03-08 Christopher Faylor <cgf@redhat.com>
2278
2279 * syscalls.cc (unlink): Always attempt to use FILE_FLAG_CLOSE_ON_DELETE
2280 to delete files since this allows us to preserve the protection of hard
2281 linked files.
2282 (link): Generate full path for potentially recalculated .lnk target.
2283
2284 2003-03-08 Christopher Faylor <cgf@redhat.com>
2285
2286 Revert below changes regarding _pinfo::cmdline.
2287
2288 2003-03-08 Corinna Vinschen <corinna@vinschen.de>
2289
2290 * external.cc (cygwin_internal): Change n to __off64_t to match change
2291 of _pinfo::cmdline.
2292 * fhandler.h (class fhandler_virtual): Change filesize member to
2293 __off64_t.
2294 * fhandler_proc.cc (format_proc_meminfo): Change to return __off64_t.
2295 (format_proc_stat): Ditto.
2296 (format_proc_uptime): Ditto.
2297 * fhandler_process.cc (format_process_stat): Ditto.
2298 (format_process_status): Ditto.
2299 (format_process_statm): Ditto.
2300 * pinfo.cc (_pinfo::cmdline): Expect __off64_t parameter.
2301 * pinfo.h (class _pinfo): Change declaration of cmdline accordingly.
2302
2303 2003-03-07 Christopher Faylor <cgf@redhat.com>
2304
2305 * path.h (PATH_LNK): New enum val.
2306 (path_conv::is_lnk_symlink): New function. True if path represents
2307 .lnk style symlink.
2308 * path.cc (check_shortcut): Set PATH_LNK in pflags when appropriate.
2309 (symlink_info::check): Ditto. Remove PATH_LNK from pflags initially.
2310 * syscalls.cc (unlink): Always remove readonly attribute from a symlink
2311 regardless of type.
2312 (link): (from Corinna Vinschen) Allow links to symlinks. Reset
2313 attributes on a symlink after successful link creation.
2314 (chmod): Use is_lnk_symlink where appropriate.
2315 (rename): Ditto.
2316
2317 2003-03-07 Pierre Humblet <pierre.humblet@ieee.org>
2318
2319 * tty.cc (create_tty_master): Call GetComputerName instead of
2320 cygwin_gethostname. Set ut_id.
2321 * syscalls.cc (login): Call endutent.
2322 (setutent): Do not seek after a fresh open.
2323
2324 2003-03-07 Corinna Vinschen <corinna@vinschen.de>
2325
2326 * syscalls.cc (seteuid32): Fix formatting.
2327
2328 2003-03-04 Thomas Pfaff <tpfaff@gmx.net>
2329
2330 * thread.cc (MTinterface::fixup_after_fork): Initialize mainthread
2331 prior to pthread objects.
2332
2333 2003-03-04 Jason Tishler <jason@tishler.net>
2334
2335 * fhandler_socket.cc (fhandler_socket::dup): Initialize type.
2336
2337 2003-03-03 Christopher Faylor <cgf@redhat.com>
2338
2339 * fhandler.h (fhandler_tty_slave::close): Declare new function.
2340 (fhandler_tty_slave::dup): Declare new function.
2341 (fhandler_tty_slave::fixup_after_function): Declare new function.
2342 * fhandler_tty.cc (fhandler_tty_slave_open): Only increment
2343 fhandler_console::open_fhs when associated with a pty.
2344 (fhandler_tty_slave::close): Define new function. Decrement
2345 fhandler_console::open_fhs when associated with a pty.
2346 (fhandler_tty_slave::dup): Define new function. Increment
2347 fhandler_console::open_fhs when associated with a pty.
2348 (fhandler_tty_slave::fixup_after_fork): Define new function. Increment
2349 fhandler_console::open_fhs when associated with a pty.
2350
2351 2003-03-03 Christopher Faylor <cgf@redhat.com>
2352
2353 * fhandler_tty.cc (fhandler_pty_slave::open): Grudgingly increment
2354 fhandler_console::open_fhs here.
2355 (fhandler_pty_slave::close): Ditto for close.
2356
2357 2003-03-02 Christopher Faylor <cgf@redhat.com>
2358
2359 * lib/getopt.c: Refresh from NetBSD sources.
2360
2361 2003-03-02 Christopher Faylor <cgf@redhat.com>
2362
2363 * fhandler_console.cc (fhandler_console::close): Don't decrement
2364 in use counter if in vfork fixup stage.
2365
2366 2003-03-02 Christopher Faylor <cgf@redhat.com>
2367
2368 * lib/getopt.c: Nuke use of unneeded BSDisms.
2369
2370 2003-03-02 Christopher Faylor <cgf@redhat.com>
2371
2372 * dll_init.cc (dll_list::load_after_fork): Don't revert to LoadLibrary
2373 if LoadLibraryEx fails.
2374 * dtable.cc (dtable::dec_console_fds): Eliminate.
2375 (dtable::release): Don't treat console specially.
2376 (dtable::build_fhandler): Ditto.
2377 * dtable.h (console_fds): Eliminate.
2378 (dtable::dec_console_fds): Eliminate.
2379 (dtable::inc_console_fds): Eliminate.
2380 * fhandler.h (fhandler_console::open_fhs): New static element.
2381 * fhandler_console.cc (fhandler_console::open): Increment open_fs.
2382 (fhandler_console::close): Call FreeConsole if no more open consoles
2383 and ctty is not associated with the console.
2384 * syscalls.cc (setsid): Simplify check for when to call FreeConsole.
2385 (check_pty_fds): Eliminate definition.
2386 * winsup.h (check_pty_fds): Eliminate declaration.
2387
2388 2003-03-02 Christopher Faylor <cgf@redhat.com>
2389
2390 * dll_init.cc (dll_list::load_after_fork): Fix typo where result of
2391 LoadLibrary was ignored.
2392
2393 2003-03-01 Corinna Vinschen <corinna@vinschen.de>
2394
2395 * fhandler_socket.cc (fhandler_socket::bind): Open and write socket
2396 file using Win32 calls.
2397
2398 2003-03-01 Corinna Vinschen <corinna@vinschen.de>
2399
2400 * fhandler_socket.cc (get_inet_addr): Open and read socket file using
2401 Win32 calls.
2402
2403 2003-02-28 Christopher Faylor <cgf@redhat.com>
2404
2405 * cygwin.din: Wrap atexit and exit with cygwin, thread-safe functions.
2406 * dcrt0.cc (cygwin_atexit): New function.
2407 (cygwin_exit): Ditto.
2408
2409 2003-02-28 Pierre Humblet <pierre.humblet@ieee.org>
2410
2411 * syscalls.cc (fstat64): Pass get_name () to pc.
2412 (access): Pass fn to stat_worker.
2413
2414 2003-03-27 Corinna Vinschen <corinna@vinschen.de>
2415
2416 * fhandler_socket.cc (class sock_event): New class managing Winsock
2417 events for interruptible socket calls.
2418 (fhandler_socket::connect): Move support for interruptible call to
2419 class sock_event. Use class object instead.
2420 (fhandler_socket::accept): Ditto. Remove useless casts.
2421
2422 2003-03-27 Thomas Pfaff <tpfaff@gmx.net>
2423
2424 * fhandler_socket.cc (fhandler_socket::connect): Add support for
2425 an interruptable connect.
2426
2427 2003-02-27 Pierre Humblet <pierre.humblet@ieee.org>
2428
2429 * uinfo.cc (internal_getlogin): Only update user.groups.pgsid
2430 if the call to set the primary group succeeds.
2431
2432 2003-02-27 Christopher Faylor <cgf@redhat.com>
2433
2434 * cygthread::detach: Improve error message.
2435
2436 2003-02-26 Pierre Humblet <pierre.humblet@ieee.org>
2437
2438 * sec_helper.cc (get_sids_info): debug_print owner_sid and group_sid.
2439
2440 2003-02-25 Corinna Vinschen <corinna@vinschen.de>
2441
2442 * mmap.cc (mmap64): Fix returned address by taking the granularity
2443 into account.
2444
2445 2003-02-23 Pierre Humblet <pierre.humblet@ieee.org>
2446
2447 * syslog.cc (syslog): Do not unlock the file before closing it
2448 and remove debug_printf about stream errors.
2449
2450 2003-02-22 Christopher Faylor <cgf@redhat.com>
2451
2452 * cygmalloc.h: Remove MORECORE_CANNOT_TRIM. It's not true.
2453 # cygwin.din: Export mallinfo.
2454 # malloc_wrapper.cc (mallinfo): New function.
2455
2456 2003-02-22 Pierre Humblet <pierre.humblet@ieee.org>
2457
2458 * syslog.cc (syslog): Do not print the Windows pid. Print the Cygwin
2459 pid as an unsigned decimal. On Win95 print a timestamp and attempt to
2460 lock the file up to four times in 3 ms.
2461
2462 2003-02-21 Corinna Vinschen <corinna@vinschen.de>
2463
2464 * fhandler_socket.cc (fhandler_socket::fhandler_socket): Fix compiler
2465 warning.
2466 (fhandler_socket::fstat): Simplify. Set st_uid/st_gid to effective
2467 uid/gid of current process in case of open sockets.
2468
2469 2003-02-21 Corinna Vinschen <corinna@vinschen.de>
2470
2471 * dtable.cc (dtable::build_fhandler_from_name): Set some fhandler
2472 data on sockets to evaluate AF_LOCAL sockets correctly.
2473 (dtable::build_fhandler): Set unit number on sockets.
2474 * fhandler.h (fhandler_socket): Add unit number.
2475 (fhandler_socket::get_unit): New method.
2476 * fhandler_socket.cc (fhandler_socket::fhandler_socket): Set unit
2477 number.
2478 (fhandler_socket::fstat): Reorganize to return more Linux-like
2479 values.
2480 * net.cc: include ctype.h.
2481 (fdsock): Set unit number when building fhandler.
2482 * path.cc (path_conv::check): Set device type to FH_SOCKET if file
2483 is a AF_UNIX socket.
2484 (get_devn): Evaluate unit for virtual socket devices.
2485 (win32_device_name): Set windows path for sockets to unix_path with
2486 just backslashes to keep the different names.
2487 * syscalls.cc (fstat64): Don't override st_ino, st_dev and st_rdev
2488 for sockets.
2489 (stat_worker): Ditto.
2490
2491 2003-02-21 Pierre Humblet <pierre.humblet@ieee.org>
2492
2493 * autoload.cc (AccessCheck): Add.
2494 (DuplicateToken): Add.
2495 * security.h (check_file_access): Declare.
2496 * syscalls.cc (access): Convert path to Windows, check existence
2497 and readonly attribute. Call check_file_access instead of acl_access.
2498 * security.cc (check_file_access): Create.
2499 * sec_acl (acl_access): Delete.
2500
2501 2003-02-19 Christopher Faylor <cgf@redhat.com>
2502
2503 * fhandler.cc (fhandler_base::open): Move some filesystem specific
2504 stuff.
2505 (fhandler_disk_file::open): Accept some filesystem specific stuff.
2506 * sigproc.cc (wait_for_sigthread): Become slightly more thread safe.
2507 (sig_send): Don't assume that signal thread is ready.
2508
2509 2003-02-20 Corinna Vinschen <corinna@vinschen.de>
2510
2511 * wincap.h (wincap): Remove unnecessary definition of
2512 supports_sparse_files.
2513 * wincap.cc: Ditto.
2514
2515 2003-02-20 Corinna Vinschen <corinna@vinschen.de>
2516
2517 * fhandler_disk_file.cc (fhandler_disk_file::opendir): Check descriptor
2518 created by cygheap_fdnew constructor.
2519 * fhandler_virtual.cc (fhandler_virtual::opendir): Ditto.
2520 * fhandler_socket.cc (fhandler_socket::accept): Ditto and move
2521 creation of file descriptor behind blocking OS call.
2522 * net.cc (cygwin_socket): Ditto.
2523 (cygwin_rcmd): Ditto.
2524 (cygwin_rresvport): Ditto.
2525 (cygwin_rexec): Ditto.
2526 (socketpair): Ditto.
2527
2528 2003-02-20 Corinna Vinschen <corinna@vinschen.de>
2529
2530 * autoload.cc (GetCompressedFileSize): Add.
2531 * fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): Compute
2532 st_blocks value from GetCompressedFileSize() if available.
2533
2534 2003-02-18 Vaclav Haisman <V.Haisman@sh.cvut.cz>
2535
2536 * wincap.h (wincaps::supports_sparse_files): New flag.
2537 (wincapc::supports_sparse_files): New method.
2538 * wincap.cc (wincap_unknown): Define value for the new flag.
2539 (wincap_95): Ditto.
2540 (wincap_95osr2): Ditto.
2541 (wincap_98): Ditto.
2542 (wincap_98se): Ditto.
2543 (wincap_me): Ditto.
2544 (wincap_nt3): Ditto.
2545 (wincap_nt4): Ditto.
2546 (wincap_nt4sp4): Ditto.
2547 (wincap_2000): Ditto.
2548 (wincap_xp): Ditto.
2549 * path.h (path_conv::fs_flags): New method.
2550 * fhandler_disk_file.cc: Include winioctl.h for DeviceIoControl.
2551 (fhandler_disk_file::open): Set newly created and truncated files as
2552 sparse on platforms that support it.
2553
2554 2003-02-17 Pierre Humblet <pierre.humblet@ieee.org>
2555
2556 * grp.cc (internal_getgroups): Handle properly tokens with
2557 no groups. Fix bug introduced on 2003-02-04.
2558
2559 2003-02-16 Christopher Faylor <cgf@redhat.com>
2560
2561 * cygwin.din: Export all appropriate newlib libm functions. Sort.
2562 * include/cygwin/version.h: Bump API minor number.
2563
2564 2003-02-15 Christopher Faylor <cgf@redhat.com>
2565
2566 * cygwin.din: Export all appropriate newlib libc functions.
2567 * include/cygwin/version.h: Bump API minor number.
2568
2569 2003-02-14 Jason Tishler <jason@tishler.net>
2570
2571 * mmap.cc (mprotect): Add missing break.
2572
2573 2003-02-13 Christopher Faylor <cgf@redhat.com>
2574
2575 * exceptions.cc (try_to_debug): Don't reset priority when returning
2576 from non-waitloop call.
2577
2578 2003-02-13 Vaclav Haisman <V.Haisman@sh.cvut.cz>
2579 Christopher Faylor <cgf@redhat.com>
2580
2581 * fhandler_console.cc (fhandler_console::write_normal): Use MessageBeep
2582 for bell sound.
2583 * autoload.cc (MessageBeep): Add.
2584
2585 2003-02-13 Christopher Faylor <cgf@redhat.com>
2586
2587 * include/cygwin/types.h: Use correct ifdef guard for u_ definitions.
2588
2589 2003-02-13 Christopher Faylor <cgf@redhat.com>
2590
2591 * environ.cc (environ_init): Use strechr.
2592
2593 2003-02-13 Christopher Faylor <cgf@redhat.com>
2594
2595 * include/cygwin/in.h (sockaddr_in): Fix typo.
2596
2597 2003-02-12 Christopher Faylor <cgf@redhat.com>
2598
2599 * path.h (path_conv): Reorganize slightly.
2600
2601 2003-02-12 Christopher Faylor <cgf@redhat.com>
2602
2603 * fhandler_tty.cc (process_input): Add sanity check to ensure that
2604 console typeahead is cleared on signal.
2605
2606 2003-02-12 Christopher Faylor <cgf@redhat.com>
2607
2608 * spawn.cc (linebuf::~linebuf): Resurrect commented out (for
2609 debugging?) code.
2610
2611 2003-02-10 Ralf Habacker <ralf.habacker@freenet.de>
2612
2613 * include/cygwin/in.h (in_attr_t): Define new type.
2614 * include/arpa/inet.h (inet_addr): Change return type to in_addr_t.
2615 (inet_lnaof): Ditto.
2616 (inet_netof): Ditto.
2617 (inet_network): Ditto.
2618
2619 2003-02-10 Christopher Faylor <cgf@redhat.com>
2620
2621 * include/cygwin/types.h: Move many *_t typedefs here. Protect them
2622 with ifdefs.
2623 * fhandler_disk_file.cc (fhandler_disk_file::fstat): Change ntsec_atts to mode_t.
2624 * security.cc (get_attribute_from_acl): Accept mode_t attribute.
2625 (get_nt_attribute): Ditto.
2626 (get_file_attribute): Ditto.
2627 (get_nt_object_attribute): Ditto.
2628 (get_object_attribute): Ditto.
2629 * security.h: Reflect above changes.
2630 * syscalls.cc (chown_worker): Change attrib to mode_t.
2631
2632 2003-02-08 Christopher Faylor <cgf@redhat.com>
2633
2634 * include/cygwin/version.h: Bump DLL minor number to 21.
2635
2636 2003-02-07 Christopher Faylor <cgf@redhat.com>
2637
2638 * malloc.cc (DEFAULT_MMAP_THRESHOLD): Bump down to 16MB thanks to below
2639 changes.
2640
2641 2003-02-07 Corinna Vinschen <corinna@vinschen.de>
2642
2643 * mmap.cc (mmap_record::alloc_map): De-inline. Add offset and length
2644 parameter. Only protect pages actually unused currently. Do job
2645 of map_map() when initializing a map.
2646 (mmap_record::map_map): Reduce functionality for the reuse case
2647 of private anonymous mapping.
2648 (mmap_record::fixup_map): Format change.
2649 (list::add_record): Add offset and length parameter to call
2650 mmap_record::alloc_map() correctly.
2651 (mmap64): Rename `l' variable to `map_list'. Accommodate above changes.
2652 (munmap): Rename `l' variable to `map_list'.
2653 (msync): Ditto.
2654 (fhandler_disk_file::mmap): Streamline code.
2655 (mprotect): Ditto.
2656 (fixup_mmaps_after_fork): Rename `l' variable to `map_list'.
2657
2658 2003-02-07 Vaclav Haisman <V.Haisman@sh.cvut.cz>
2659 Christopher Faylor <cgf@redhat.com>
2660
2661 * exceptions.cc (try_to_debug): Set priority of current thread rather
2662 than the main thread. Make busy waiting loop less busy. Restore
2663 priority when function returns.
2664
2665 2003-02-07 Christopher Faylor <cgf@redhat.com>
2666
2667 * malloc.cc (DEFAULT_MMAP_THRESHOLD): Set high to avoid mmaps.
2668
2669 2003-02-07 Christopher Faylor <cgf@redhat.com>
2670
2671 * pipe.cc (fhandler_pipe::close): Avoid extraneous this->.
2672
2673 2003-02-06 Christopher Faylor <cgf@redhat.com>
2674
2675 * heap.cc (heap_init): Remove debugging code.
2676
2677 2003-02-06 Pierre Humblet <pierre.humblet@ieee.org>
2678
2679 * security.h: Introduce names UNKNOWN_UID and UNKNOWN_GID and delete
2680 declaration of is_grp_member.
2681 * uinfo.cc (internal_getlogin): Use UNKNOWN_GID.
2682 * passwd.cc (pwdgrp::read_passwd): Use UNKNOWN_UID.
2683 * grp.cc (pwdgrp::read_group): Change group name to provide better
2684 feedback.
2685 (getgrgid): Use gid16togid32.
2686 * sec_helper.cc (is_grp_member): Delete.
2687
2688 2003-02-05 Christopher Faylor <cgf@redhat.com>
2689
2690 * path.cc: Change 'to_posix_p' to 'to_posix' throughout.
2691 (conv_path_list_buf_size): Accommodate relative paths.
2692
2693 2003-02-05 Christopher Faylor <cgf@redhat.com>
2694
2695 * path.cc (etc::dir_changed): Fix debug printf.
2696
2697 2003-02-05 Corinna Vinschen <corinna@vinschen.de>
2698
2699 * sec_acl.cc (setacl): Move all permission settings to beginning of
2700 loop. Set default rights to same values as in alloc_sd(). Set DELETE
2701 for owner and default owner only if S_IWOTH is given.
2702
2703 2003-02-05 Pierre Humblet <pierre.humblet@ieee.org>
2704
2705 * sec_acl.cc: Change all __aclent16_t to __aclent32_t except in
2706 wrapper function definitions. Replace call to the aclXYZ functions by
2707 calls aclXYZ32.
2708 (searchace): Change type of third argument to __uid32_t and use
2709 ILLEGAL_UID instead of -1;
2710 (setacl): Remove some initializations. Only give STANDARD_RIGHTS_WRITE
2711 for S_IWOTH. Replace -1 by ILLEGAL_UID.
2712 (getacl): Change type of owner_sid, group_sid and ace_sid to cygpsid.
2713 In last else clause, suppress second call to ace_sid.get_id and use
2714 TRUE in first call. Replace EqualSid by ==.
2715 (acl_access): Call internal_getgroups in USER and GROUP cases.
2716 (acecmp: Define static.
2717 (acl32): Create from 16 bit type.
2718 (facl32): Ditto.
2719 (lacl32): Ditto.
2720 (aclcheck32): Ditto.
2721 (aclsort32): Ditto.
2722 (acltomode32): Ditto.
2723 (aclfrommode32): Ditto.
2724 (acltopbits32): Ditto.
2725 (aclfrompbits32): Ditto.
2726 (acltotext32): Ditto.
2727 (aclfromtext32): Ditto, and use strechr.
2728 (acl16to32): Create.
2729 (acl): Make it a wrapper function.
2730 (facl): Ditto.
2731 (lacl): Ditto.
2732 (aclcheck): Ditto.
2733 (aclsort): Ditto.
2734 (acltomode): Ditto.
2735 (aclfrommode): Ditto.
2736 (acltopbits): Ditto.
2737 (aclfrompbits): Ditto.
2738 (acltotext): Ditto.
2739 (aclfromtext): Ditto.
2740 * security.cc (write_sd): Call set_process_privilege and check
2741 ownership.
2742 (alloc_sd): Remove call to set_process_privilege and the owner check.
2743
2744 2003-02-05 Christopher Faylor <cgf@redhat.com>
2745
2746 * include/sys/cygwin.h: Use C-style comments.
2747
2748 2003-02-05 Pierre Humblet <pierre.humblet@ieee.org>
2749
2750 * sec_helper.cc (get_sids_info): New function.
2751 * security.cc (extract_nt_dom_user): Simplify with strechr.
2752 (get_user_groups): Initialize glen to MAX_SID_LEN.
2753 (get_user_local_groups): Ditto.
2754 (get_attribute_from_acl): Define ace_sid as cygpsid.
2755 (get_nt_attribute): Define owner_sid and group_sid as cygpsid.
2756 Call get_sids_info instead of cygsid.get_{u,g}id and is_grp_member.
2757 (get_nt_object_attribute): Ditto.
2758 (alloc_sd): Define ace_sid as cygpsid.
2759
2760 2003-02-04 Thomas Pfaff <tpfaff@gmx.net>
2761
2762 * syscalls.cc (struct system_cleanup_args): New struct.
2763 (system_cleanup): New function.
2764 (system): Use pthread_cleanup_push and _pop to save and restore
2765 signal handlers and sigprocmask.
2766
2767 2003-02-04 Corinna Vinschen <corinna@vinschen.de>
2768
2769 * path.cc (symlink): Create security attributes so that only the
2770 user can modify the symlink.
2771 * security.cc (set_security_attribute): Remove symlink special
2772 handling.
2773
2774 2003-02-04 Pierre Humblet <pierre.humblet@ieee.org>
2775
2776 * grp.cc (internal_getgroups): Do not return without closing
2777 the process handle.
2778
2779 2003-02-04 Pierre Humblet <pierre.humblet@ieee.org>
2780
2781 * security.h (class cygpsid): New class.
2782 (class cygsid): Use cygpsid as base. Remove members psid, get_id,
2783 get_uid, get_gid, string, debug_printf and the == and != operators.
2784 (cygsidlist::clear_supp): Only do work if setgroups has been called.
2785 * sec_helper.cc: Define sid_auth NO_COPY.
2786 (cygpsid::operator==): New operator.
2787 (cygpsid::get_id): New function.
2788 (cygpsid::string): New function.
2789 (cygsid::string): Delete.
2790 (cygsid::get_id): Delete.
2791 * pwdgrp.h: Change arguments of internal_getpwsid,
2792 internal_getgrsid and internal_getgroups to cygpsid.
2793 * passwd.cc (internal_getpwsid): Change argument from cygsid to cygpsid.
2794 * grp.cc (internal_getgrsid): Ditto.
2795 (internal_getgroups): Ditto.
2796
2797 2003-02-03 Christopher Faylor <cgf@redhat.com>
2798
2799 Eliminate most unneeded this-> pointers throughout.
2800
2801 2003-02-03 Pierre Humblet <pierre.humblet@ieee.org>
2802
2803 * security.h: Add third argument to set_process_privilege.
2804 * autoload.cc: Add OpenThreadToken.
2805 * sec_helper.cc (set_process_privilege): Add and use use_thread
2806 argument.
2807 * security.cc (alloc_sd): Modify call to set_process_privilege.
2808 Remember the result in each process. If failed and file owner is not
2809 the user, fail.
2810
2811 2003-02-03 Corinna Vinschen <corinna@vinschen.de>
2812
2813 * fhandler_socket.cc (fhandler_socket::recvfrom): Return buffer
2814 length and don't set errno in case of WSAEMSGSIZE error.
2815 (fhandler_socket::recvmsg): Ditto.
2816
2817 2003-02-01 Christopher Faylor <cgf@redhat.com>
2818
2819 * grp.cc (getgrent32): Only refresh group entries when at beginning.
2820 (internal_getgrsid): Only refresh if uninitialized.
2821 (internal_getgrent): Ditto.
2822 * passwd.cc (getpwent): Only refresh passwd entries when at beginning.
2823 (pwdgrp::read_passwd): linebuf *cannot* be NO_COPY.
2824 (internal_getpwsid): Only refresh if uninitialized.
2825 (getpass): No need to refresh passwd data here.
2826 * pwdgrp.h (refresh): Eliminate default.
2827
2828 2003-01-31 Christopher Faylor <cgf@redhat.com>
2829
2830 * dlfcn.cc (dlerror): Only report load errors once per error.
2831
2832 2003-01-31 Christopher Faylor <cgf@redhat.com>
2833
2834 * fhandler_serial.cc (fhandler_serial::open): Avoid extraneous setting
2835 of res.
2836
2837 * termios.cc (tcsetattr): Correctly record errno after tcsetattr call.
2838
2839 2003-01-31 Troy Curtiss <troyc@usa.net>
2840
2841 * fhandler_serial.cc (fhandler_serial::tcsetattr): Add error-checking
2842 so that if any Win32 SetComm*() calls fail, errno gets set to EINVAL
2843 and tcsetattr() returns -1. Catch invalid bitrates, mostly. If baud
2844 rate setting is B0, just drop DTR and leave Win32 DCB bitrate as-is
2845 since 0 is not a valid Win32 setting.
2846 (fhandler_serial::tcgetattr): If DTR is low, populate the bitrate as
2847 B0, otherwise get it from the DCB.
2848
2849 2003-01-31 Christopher Faylor <cgf@redhat.com>
2850
2851 * passwd.cc (pwdgrp::read_passwd): linebuf *must* be static (from
2852 Pierre Humblet).
2853 * pwdgrp.h (pwdgrp::refresh): Avoid calling read function if we already
2854 have lock since that means we are in the process of reading the file.
2855
2856 2003-01-31 Jason Tishler <jason@tishler.net>
2857
2858 * shared.cc (shared_info::heap_chunk_size): Use correct variable when
2859 reading HKLM.
2860
2861 2003-01-30 Christopher Faylor <cgf@redhat.com>
2862
2863 * fhandler_registry.cc (fhandler_registry::exists): Fix off-by-one
2864 error when inspecting path.
2865
2866 2003-01-29 Christopher Faylor <cgf@redhat.com>
2867
2868 * lib/getopt.c: Allow environment variable control of POSIXLY_INCORRECT
2869 behavior.
2870
2871 2003-01-28 Corinna Vinschen <corinna@vinschen.de>
2872
2873 * fhandler_socket.cc (fhandler_socket::accept): On successful execution
2874 set connection state of returned socket to CONNECTED.
2875
2876 2003-01-27 Christopher Faylor <cgf@redhat.com>
2877
2878 * passwd.cc (pwdgrp::parse_passwd): Be more unforgiving about
2879 non-numeric fields.
2880
2881 2003-01-26 Christopher Faylor <cgf@redhat.com>
2882
2883 * uinfo.cc (pwdgrp::next_num): Remove check for NULL since it is no
2884 longer a valid return from next_str.
2885 (pwdgrp::add_line): Duh. Revert to use strchr.
2886
2887 2003-01-26 Christopher Faylor <cgf@redhat.com>
2888
2889 * string.h (strechr): New function.
2890 * uinfo.cc (pwdgrp::next_str): Search only for input char in string.
2891 Return EOS on failure. Don't check for NULL since it shouldn't be
2892 possible.
2893 (pwdgrp::add_line): Revert to replacing '\n' in input line with '\0'.
2894 (pwdgrp::next_num): Pass explicit separator character to next_str.
2895 * grp.cc (pwdgrp::parse_group): Ditto.
2896 * passwd.cc (pwdgrp::parse_passwd): Ditto. Revamp test for garbage
2897 input.
2898 * pwdgrp.h (pwdgrp::next_str): Don't use default parameter.
2899
2900 2003-01-26 Christopher Faylor <cgf@redhat.com>
2901
2902 * uinfo.cc (pwdgrp::load): Regularize strace output. Add warning for
2903 CreateFile failure.
2904
2905 2003-01-26 Christopher Faylor <cgf@redhat.com>
2906
2907 * passwd.cc (pwdgrp::parse_passwd): Eliminate use of memset. The
2908 structure should always be completely filled out.
2909 * grp.cc (pwdgrp::parse_group): Ditto.
2910
2911 2003-01-26 Christopher Faylor <cgf@redhat.com>
2912
2913 * grp.cc (pwdgrp::parse_group): Fix off-by-one problem in allocating
2914 gr_mem.
2915
2916 2003-01-26 Christopher Faylor <cgf@redhat.com>
2917
2918 * include/sys/strace.h (paranoid_printf): Define as not being part of
2919 "all" output.
2920
2921 2003-01-25 Christopher Faylor <cgf@redhat.com>
2922
2923 * pwdgrp.h (pwdgrp::next_num): Rename from next_int. Returns
2924 true/false if parse operation succeeded.
2925 (pwdgrp::reparse): Remove.
2926 (pwdgrp::raw_ptr): New function. Returns pointer in line.
2927 (pwdgrp::next_num): New functions for parsing other than unsigned long.
2928 * grp.cc (pwdgrp::parse_group): Reinstate previous parsing behavior.
2929 Don't fill in fields with NULL and assign empty gr_mem to known pointer
2930 rather than doing a pointless calloc. Streamline gr_mem parsing.
2931 Don't increment curr_lines here.
2932 * passwd.cc (pwdgrp::parse_passwd): Use new behavior of next_num.
2933 Don't increment curr_lines here.
2934 * uinfo.cc (pwdgrp::next_str): Keep returning EOL if out of data.
2935 (pwdgrp::reparse): Remove.
2936 (pwdgrp::next_num): Rename from next_int. Return bool indicating
2937 success of parse, argument returns value parsed.
2938 (pwdgrp::add_line): Increment curr_lines here on successful parse.
2939 (pwdgrp::load): (from Pierre Humblet) Don't return status. Just report
2940 it here.
2941
2942 2003-01-25 Christopher Faylor <cgf@redhat.com>
2943
2944 * pwdgrp.cc (pwdgrp::reparse): Declare.
2945 * uinfo.cc (pwdgrp::reparse): Define.
2946 * grp.cc (pwdgrp::parse_group): Use reparse.
2947
2948 2003-01-25 Pierre Humblet <pierre.humblet@ieee.org>
2949
2950 * syscalls.cc (seteuid32): On Win95 get the pw entry. If it exists
2951 update the euid and call cygheap->user.set_name. Remove special
2952 handling of ILLEGAL_UID.
2953 (setgid32): Add a debug_printf. On Win95, always set the egid.
2954 Remove special handling of ILLEGAL_GID. Do not compare gid and gr_gid.
2955 * child_info.h (class cygheap_exec_info): Remove uid.
2956 * spawn.cc (spawn_guts): Do not set ciresrv.moreinfo->uid.
2957 * dcrto.cc (dll_crt0_1): Always call uinfo_init.
2958 * uinfo.cc (uinfo_init): Reorganize and close handle if needed.
2959 (cygheap_user::ontherange): Do not call internal_getpwnam if pw is NULL.
2960
2961 2003-01-24 Christopher Faylor <cgf@redhat.com>
2962
2963 * fhandler_console.cc (fhandler_console::send_winch_maybe): Reset
2964 scroll region if size changes.
2965
2966 2003-01-24 Pierre Humblet <pierre.humblet@ieee.org>
2967 Jason Tishler <jason@tishler.net>
2968
2969 * cygwin.din: Export setreuid32, setreuid, setregid32, setregid.
2970 * syscalls.cc (setreuid32): New function.
2971 (setreuid): Ditto.
2972 (setregid32): Ditto.
2973 (setregid): Ditto.
2974 * include/cygwin/version.h: Bump API minor number.
2975
2976 2003-01-23 Christopher Faylor <cgf@redhat.com>
2977
2978 * pwdrp.h (pwdgrp::refresh): Lock entire test prior to reading.
2979
2980 2003-01-23 Christopher Faylor <cgf@redhat.com>
2981
2982 * grp.cc (pwdgrp::parse_group): Eliminate arg and use class member
2983 instead. Use next_str and next_int to parse arguments.
2984 * passwd.cc (pwdgrp::parse_passwd): Ditto.
2985 (grab_string): Eliminate.
2986 (grab_int): Ditto.
2987 * pwdgrp.h (pwdgrp::parse): Eliminate input arg.
2988 (pwdgrp::parse_passwd): Reflect above change.
2989 (pwdgrp::parse_group): Reflect above change.
2990 (pwdgrp::next_str): New function.
2991 (pwdgrp::next_int): Ditto.
2992 (pwdgrp::gets): Eliminate.
2993 * uinfo.cc (pwdgrp::next_str): New function.
2994 (pwdgrp::next_int): Ditto.
2995 (pwdgrp::add_line): Subsume gets.
2996 (pwdgrp::gets): Eliminate.
2997 (pwdgrp::load): Just call add_line to parse input buffer.
2998
2999 2003-01-22 Thomas Pfaff <tpfaff@gmx.net>
3000
3001 * include/pthread.h (PTHREAD_MUTEX_RECURSIVE): Revert changes from
3002 2003-01-09 mutex patch.
3003 (PTHREAD_MUTEX_ERRORCHECK): Ditto.
3004
3005 2003-01-22 Corinna Vinschen <corinna@vinschen.de>
3006
3007 * cygrun.c: Move from here to ../testsuite.
3008 * Makefile.in: Remove cygrun.exe dependencies.
3009
3010 2003-01-21 Jason Tishler <jason@tishler.net>
3011
3012 * cygwin.din: Export nanosleep().
3013 * signal.cc (nanosleep): New function.
3014 (sleep): Move old functionality to nanosleep(). Call nanosleep().
3015 (usleep): Remove old functionality. Call nanosleep().
3016 * include/cygwin/version.h: Bump API minor number.
3017
3018 2003-01-21 Christopher Faylor <cgf@redhat.com>
3019
3020 * grp.cc: Call gr.refresh() rather than doing isunitialized tests
3021 throughout.
3022 (gr): Use constructor (sigh).
3023 (pwdgrp::parse_group): Rename from parse_grp.
3024 (pwdgrp::read_group): Rename from read_etc_group. Just call gr.load
3025 with a single argument.
3026 * passwd.cc: Call pr.refresh() rather than doing isunitialized tests
3027 throughout.
3028 (pr): Use constructor (sigh).
3029 (pwdgrp::parse_passwd): Rename from "parse_pwd".
3030 (pwdgrp::read_passwd): Rename from read_etc_passwd. Just call pr.load
3031 with a single argument.
3032 * pwdgrp.h (pwdgrp_state): Eliminate.
3033 (pwdgrp): Reflect above renamings.
3034 (pwdgrp::etc_ix): Rename from pwd_ix.
3035 (pwdgrp::read): New element.
3036 (pwdgrp::lock): New element.
3037 (pwdgrp::refresh): New function.
3038 (pwdgrp::load): Eliminate variations which take buffer arguments.
3039 (pwdgrp::pwdgrp): New constructors. Initialize mutex here.
3040 * uinfo.cc (pwdgrp::load): Accommodate pwd_ix -> etc_ix renaming.
3041 (pwdgrp::load): Set initialized state to true rather than setting state
3042 to loaded.
3043
3044 2003-01-21 Christopher Faylor <cgf@redhat.com>
3045
3046 * include/cygwin/version.h: Bump DLL minor number.
3047
3048 2003-01-21 Pierre Humblet <pierre.humblet@ieee.org>
3049
3050 * path.h (etc::change_possible): Revert the type to bool.
3051 (etc::set_last_modified): Remove obsolete function.
3052 * path.cc (etc::change_possible): Revert type to bool.
3053 (etc::test_file_change): Do not test for negative values of
3054 change_possible and do not set it to -res.
3055 (etc::dir_changed): When the handle is NULL, call memset instead of
3056 test_file_changed. When the handle is invalid, return true. Detect
3057 filename change in /etc.
3058 (etc::file_changed): Remove unneeded check for !fn[n].
3059 * uinfo.cc (pwdgrp::load): Eliminate spurious setting of fh to NULL.
3060 * pwdgrp.h (pwdgrp::operator =): Eliminate.
3061
3062 2003-01-19 Christopher Faylor <cgf@redhat.com>
3063
3064 * pwdgrp.h (etc): Move to path.h.
3065 (pwdgrp::max_lines): New field.
3066 (pwdgrp::curr_lines): New field.
3067 (pwdgrp::pwdgrp_buf): Ditto.
3068 (pwdgrp_buf_elem_size): Ditto.
3069 (pwdgrp_parse): Ditto.
3070 (pwdgrp::gets): Just declare here.
3071 (pwdgrp::load): Ditto. Just take one argument.
3072 (pwdgrp::load): Define overloaded function accepting passwd buf.
3073 (pwdgrp::load): Define overloaded function accepting group buf.
3074 * grp.cc: Use pwdgrp elements rather than standalone static variables
3075 throughout.
3076 (curr_lines): Eliminate.
3077 (max_lines): Ditto.
3078 (add_grp_line): Ditto.
3079 (parse_grp): Define as returning boolean. Accept void * arg and line
3080 count. Coerce first argument into __group32 buf reference. Increment
3081 curr_line as appropriate.
3082 (read_etc_group): Pass pwdgrp buffer to gr.load.
3083 * passwd.cc: Use pwdgrp elements rather than standalone static variables
3084 throughout.
3085 (curr_lines): Eliminate.
3086 (max_lines): Ditto.
3087 (add_grp_line): Ditto.
3088 (parse_passwd): Define as returning boolean. Accept void * arg and line
3089 count. Coerce first argument into passwd buf reference. Increment
3090 curr_line as appropriate.
3091 (read_etc_group): Pass pwdgrp buffer to pr.load.
3092 * path.cc (etc::fn): Extend buffer size to allow index by 1 rather than
3093 zero.
3094 (etc::last_modified): Ditto.
3095 (etc::change_possible): Ditto. Renamed from sawchange. Change to
3096 signed char since elements are now tri-state.
3097 (etc::init): Assume "handle" is 1 based rather than 0.
3098 (etc::test_file_change): New function. Sets change_possible based on
3099 file date comparison.
3100 (etc::dir_changed): Check file states immediately after changed_h is
3101 initialized to avoid a race.
3102 (etc::file_changed): Use test_file_change to detect if file needs to be
3103 updated.
3104 * path.h (etc): Move class here from pwdgrp.h.
3105 * uinfo.cc: Move etc:: functions to path.cc. Move pwdgrp functions
3106 here.
3107 (pwdgrp::gets): Eliminate buf checks. Just check eptr and set lptr.
3108 (pwdgrp::add_line): New function.
3109 (pwdgrp::load): Call generic add_line function which will call correct
3110 parser.
3111
3112 2003-01-17 Christopher Faylor <cgf@redhat.com>
3113
3114 * cygheap.cc: Change most 'int's to 'unsigned's.
3115 (_cmalloc): Only check for size of malloced region when calculating
3116 bucket. Add overhead when performing the sbrk. Previous change broke
3117 _crealloc.
3118
3119 2003-01-17 Christopher Faylor <cgf@redhat.com>
3120
3121 * dcrt0.cc (initialize_env): Use colon for CYGWIN_DEBUG separator.
3122 * grp.cc: Change most statics to NO_COPY throughout.
3123 * passwd.cc: Ditto.
3124
3125 2003-01-17 Christopher Faylor <cgf@redhat.com>
3126
3127 * pwdgrp.h: Change some BOOLs to bools.
3128 (pwdgrp::pwdgrp): Remove unneeded constructor.
3129 * passwd.cc: Change BOOL to bool throughout.
3130
3131 2003-01-17 Corinna Vinschen <corinna@vinschen.de>
3132
3133 * cygwin.din: Add strerror_r.
3134 * include/cygwin/version.h: Bump API minor number.
3135
3136 2003-01-17 Christopher Faylor <cgf@redhat.com>
3137
3138 * uinfo.cc (etc::dir_changed): Don't print a warning if can't open
3139 /etc, unless debugging.
3140
3141 2003-01-17 Pierre Humblet <pierre.humblet@ieee.org>
3142
3143 * grp.cc (read_etc_group): On NT, add a line for gid = -1. Change name
3144 "unknown" to "mkgroup".
3145 (internal_getgrgid): Do not return default in nontsec case.
3146 (internal_getgroups): Add argument srchsid and look for it in groups if
3147 not NULL.
3148 * passwd.cc (read_etc_passwd): On NT, add a line for uid = -1. Use
3149 same default uid for Win95 and NT. Call cygheap_user::ontherange to
3150 initialize HOME.
3151
3152 2003-01-16 Christopher Faylor <cgf@redhat.com>
3153
3154 * cygheap.cc (init_cygheap::etc_changed): Move to uinfo.cc.
3155 * cygheap.h (init_cygheap::etc_changed_h): Remove.
3156 (init_cygheap::etc_changed): Ditto.
3157 * grp.cc (group_state): Remove. Use gr instead throughout.
3158 (gr): Define as class pwdgrp.
3159 (read_etc_group): Remove gr definition. Remove calls to
3160 set_last_modified and close. Pass add_grp to gr.load to load file.
3161 * passwd.cc (passwd_state): Remove. Use pr instead, throughout.
3162 (pr): Define as class pwdgrp.
3163 (read_etc_passwd): Remove pr definition. Remove calls to
3164 set_last_modified and close. Pass add_pwd_line to pr.load to load
3165 file.
3166 * pwdgrp.h (etc): New helper class for pwdgrp.
3167 (pwdgrp): Combine pwdgrp_check and pwdgrp_read into one class. Remove
3168 file_w32 and last_modified fields.
3169 (pwdgrp::set_last_modified): Remove.
3170 (pwdgrp::isinitializing): Remove FindFirstFile stuff. Move to
3171 etc::file_changed.
3172 (pwdgrp::load): Rename from 'open'. Call etc::init to initialize etc
3173 scanning. Close file handle after reading buffer into memory. Parse
3174 buffer by calling second argument.
3175 (pwdgrp::gets): Reorganize slightly to rely on eptr starting at
3176 beginning of buffer.
3177 (pwdgrp::close): Remove.
3178 * uinfo.cc (etc::dir_changed): New function.
3179 (etc::init): Ditto.
3180 (etc::file_changed): Ditto.
3181 (etc::set_last_modified): Ditto.
3182
3183 2003-01-16 Jason Tishler <jason@tishler.net>
3184
3185 * mmap.cc (fixup_mmaps_after_fork): Add ERROR_NOACCESS to the list of
3186 ReadProcessMemory() error codes that trigger a retry with temporary
3187 PAGE_READONLY access. Note that this can occur on NT 4.0.
3188
3189 2003-01-15 Christopher Faylor <cgf@redhat.com>
3190
3191 * path.cc (normalize_posix_path): Convert win32 path separators to
3192 slashes when full path is specified.
3193
3194 2003-01-15 Pierre Humblet <pierre.humblet@ieee.org>
3195
3196 * cmalloc.cc (_cmalloc): Fix memory leak.
3197
3198 2003-01-15 Corinna Vinschen <corinna@vinschen.de>
3199
3200 * autoload.cc: Fix copyright date.
3201 * fhandler_dsp.cc: Ditto.
3202 * mmap.cc: Ditto.
3203 * net.cc: Ditto.
3204 * ntdll.h: Ditto.
3205 * signal.cc: Ditto.
3206 * syscalls.cc: Ditto.
3207 * uname.cc: Ditto.
3208 * wait.cc: Ditto.
3209
3210 2003-01-14 Corinna Vinschen <corinna@vinschen.de>
3211
3212 * mmap.cc (fixup_mmaps_after_fork): Copy protection to child process.
3213 Change ambiguous debug output.
3214
3215 2003-01-14 Corinna Vinschen <corinna@vinschen.de>
3216
3217 * mmap.cc (mmap_record::access): Change argument type to caddr_t
3218 for strictness.
3219 (mprotect): Protect against calling VirtualProtect() for shared
3220 pages on 9x/Me.
3221 (fixup_mmaps_after_fork): If ReadProcessMemory() fails, try to
3222 change protection of parent page to PAGE_READONLY, then try again.
3223 Revert protection afterwards.
3224
3225 2003-01-14 Thomas Pfaff <tpfaff@gmx.net>
3226
3227 * syscalls.cc (system): Add pthread_testcancel call.
3228 * thread.cc: Update list of cancellation points.
3229
3230 2003-01-14 Thomas Pfaff <tpfaff@gmx.net>
3231
3232 * wait.cc: Include thread.h
3233 (wait4): Add pthread_testcancel call.
3234 Wait for child process and cancellation event.
3235 * thread.cc: Update list of cancellation points.
3236
3237 2003-01-14 Thomas Pfaff <tpfaff@gmx.net>
3238
3239 * signal.cc (sleep): Add pthread_testcancel call.
3240 Wait for signal and cancellation event.
3241 (usleep): Ditto.
3242
3243 2003-01-14 Thomas Pfaff <tpfaff@gmx.net>
3244
3245 * exceptions.cc (handle_sigsuspend): Add pthread_testcancel call.
3246 Wait for signal and cancellation event.
3247 * thread.cc: Update list of cancellation points.
3248
3249 2003-01-14 David Huang <davehzhr@hotmail.com>
3250
3251 * fhandler_dsp.cc (fhandler_dsp::ioctl): Add limited support for
3252 SNDCTL_DSP_GETFMTS.
3253
3254 2003-01-12 Christopher Faylor <cgf@redhat.com>
3255
3256 * ntdll.h: Fix typo.
3257
3258 2003-01-12 Corinna Vinschen <corinna@vinschen.de>
3259
3260 * uname.cc (uname): Use cygwin_gethostname() to retrieve hostname.
3261
3262 2003-01-12 Pierre Humblet <pierre.humblet@ieee.org>
3263
3264 * sec_acl.cc (search_ace): Use id == -1, instead of < 0, as wildcard.
3265 (setacl): Start the search for a matching default at the next entry.
3266 Invalidate the type of merged entries instead of clearing it.
3267 Use well_known_creator for default owner and owning group and do
3268 not try to merge non-default and default entries in these cases.
3269 (getacl): Recognize well_known_creator for default owner and group.
3270 (acl_worker): Improve errno settings and streamline the nontsec case.
3271 * security.cc (write_sd): Remove the call to set_process_privilege.
3272 (alloc_sd): If the owner changes, call set_process_privilege and return
3273 immediately on failure. Change inheritance rules: on new directories add
3274 inherit only allow ACEs for creator_owner, creator_group and everyone.
3275 Preserve all inheritances through chmod and chown calls. Introduce
3276 isownergroup to implement the uid == gid case, to keep the inheritance
3277 code simple. Do not initialize owner_sid and group_sid and stop using
3278 the variable psd.
3279
3280 2003-01-10 Christopher Faylor <cgf@redhat.com>
3281
3282 * net.cc: Use gethostname define from winsock2.h.
3283
3284 2003-01-10 Christopher Faylor <cgf@redhat.com>
3285
3286 * path.cc: Unrevert below reversion except for
3287 mount_info::conv_to_posix_path part.
3288
3289 2003-01-10 Corinna Vinschen <corinna@vinschen.de>
3290
3291 * path.cc: Revert patch from 2003-01-09 to normalize a windows path
3292 rather than converting to posix.
3293
3294 2003-01-10 Corinna Vinschen <corinna@vinschen.de>
3295
3296 * autoload.cc (gethostname): Make call optional, return 1 if function
3297 can't get loaded.
3298 * net.cc (cygwin_gethostname): Call GetComputerName if return value
3299 of gethostname is non-zero.
3300
3301 2003-01-10 Charles Wilson <cwilson@ece.gatech.edu>
3302
3303 * cygwin.din: Add asprintf and vasprintf, as well as the reentrant
3304 versions and underscore variants.
3305 * include/cygwin/version.h: Bump CYGWIN_VERSION_API_MINOR.
3306
3307 2003-01-10 Corinna Vinschen <corinna@vinschen.de>
3308
3309 * net.cc (cygwin_gethostname): Fix call to wsock function gethostname.
3310
3311 2003-01-09 Christopher Faylor <cgf@redhat.com>
3312
3313 * cygthread.cc (cygthread::cygthread): Be more noisy about odd
3314 condition.
3315 * miscfuncs.cc (low_priority_sleep): Sleep in regular priority if
3316 that's what we're currently running at.
3317
3318 2003-01-09 Thomas Pfaff <tpfaff@gmx.net>
3319
3320 * include/semaphore.h: Modify typedef for sem_t.
3321 * include/cygwin/types.h: Modify typedefs for pthread_t,
3322 pthread_mutex_t, pthread_key_t, pthread_attr_t,
3323 pthread_mutexattr_t, pthread_condattr_t, pthread_cond_t,
3324 pthread_rwlock_t and pthread_rwlockattr_t.
3325
3326 2003-01-09 Thomas Pfaff <tpfaff@gmx.net>
3327
3328 * thread.h (WAIT_CANCELED): New define.
3329 (pthread::cancelable_wait): New static method.
3330 * thread.cc (pthread::cancelable_wait): Implement.
3331 (semaphore::Wait): Wait on semaphore and thread cancellation.
3332 (pthread::join): Wait on joined thread and thread cancellation.
3333 (semaphore::wait): Add testcancel to check for thread
3334 cancellation even if the semaphore is available.
3335
3336 2003-01-09 Thomas Pfaff <tpfaff@gmx.net>
3337
3338 * include/pthread.h: Add define for errorchecking mutexes.
3339 Change default mutex type.
3340 * thread.cc (pthread_cond::TimedWait): Update mutex unlock
3341 calls.
3342 (pthread_mutex::pthread_mutex): New implement.
3343 (pthread_mutex::~pthread_mutex): Ditto.
3344 (pthread_mutex::Lock): Ditto.
3345 (pthread_mutex::TryLock): Ditto.
3346 (pthread_mutex::UnLock): Ditto.
3347 (pthread_mutex::Destroy): Implement new method.
3348 (pthread_mutex::SetOwner): Ditto.
3349 (pthread_mutex::LockRecursive): Ditto.
3350 (pthread_mutex::fixup_after_fork): Restore locking state after
3351 fork.
3352 (__pthread_mutex_lock): Return pthread_mutex::Lock errorcode.
3353 (__pthread_mutex_trylock): Return pthread_mutex::TryLock
3354 errorcode.
3355 (__pthread_mutex_unlock): Return pthread_mutex::UnLock
3356 errorcode.
3357 (__pthread_mutex_destroy): Call pthread_mutex::Destroy to
3358 destroy mutex.
3359 (__pthread_mutexattr_settype): Allow errorchecking and recursive
3360 types.
3361 * thread.h (MUTEX_LOCK_COUNTER_INITIAL): New define.
3362 (pthread_mutex::criticalsection): Remove.
3363 (pthread_mutex::lock_counter): New member.
3364 (pthread_mutex::recursion_counter): Ditto.
3365 (pthread_mutex::owner): Ditto.
3366 (pthread_mutex::type): Ditto.
3367 (pthread_mutex::Destroy): New method.
3368 (pthread_mutex::SetOwner): Ditto.
3369 (pthread_mutex::LockRecursive): Ditto.
3370
3371 2003-01-09 Thomas Pfaff <tpfaff@gmx.net>
3372
3373 * pthread.cc (pthread_cond_init): Use new pthread_cond::init.
3374 * thread.cc: Some white spaces cleanups.
3375 Change __pthread_cond_init to pthread_cond::init throughout.
3376 (nativeMutex): Move class methods outside pthread_mutex.
3377 (MTinterface::Init): Initialize pthread_cond init lock.
3378 (pthread_cond::condInitializationLock): Instantiate.
3379 (pthread_cond::initMutex): New Method.
3380 (pthread_cond::isGoodInitializerOrBadObject): Ditto.
3381 * thread.h: Some white spaces cleanups.
3382 (nativeMutex): Move class declaration outside pthread_mutex.
3383 (pthread_cond::condInitializationLock): New static member.
3384 (pthread_cond::initMutex): New Method.
3385 (pthread_cond::isGoodInitializerOrBadObject): Ditto.
3386 (__pthread_cond_init): Remove prototype.
3387
3388 2003-01-09 Corinna Vinschen <corinna@vinschen.de>
3389
3390 * fhandler_disk_file.cc (num_entries): Return 2 as link count if
3391 directory unreadable.
3392
3393 2003-01-09 Corinna Vinschen <corinna@vinschen.de>
3394
3395 * security.cc (get_nt_attribute): Always return -1 when read_sd()
3396 fails.
3397 (get_file_attribute): Set permissions to 0 and owner/group to -1
3398 if security descriptor is unreadable.
3399
3400 2003-01-09 Christopher Faylor <cgf@redhat.com>
3401
3402 Use isdirsep rather than SLASH_P throughout.
3403 * path.cc (iscygdrive): Disallow /cygdrive\x.
3404 (normalize_posix_path): "Normalize" a windows path, if detected, rather
3405 than converting to posix.
3406
3407 2003-01-06 Troy Curtiss <troyc@usa.net>
3408
3409 * fhandler_serial.cc (fhandler_serial::tcsetattr): Add support and
3410 capability checking for B230400 bitrate.
3411 (fhandler_serial::tcgetattr): Add support for B230400 bitrate.
3412 * include/sys/termios.h: Add B230400 definition for Posix support of
3413 230.4Kbps.
3414
3415 2003-01-05 Christopher Faylor <cgf@redhat.com>
3416
3417 * pinfo.cc (_pinfo::commune_send): Use myself->lock rather than just
3418 lock when leaving.
3419
3420 2003-01-03 Christopher Faylor <cgf@redhat.com>
3421
3422 * dtable.h (dtable::in_vfork_cleanup): New function. True if vfork
3423 cleanup needed.
3424 * dtable.cc (dtable::vfork_parent_restore): Remove assertion.
3425 * pipe.cc (fhandler_pipe::close): Don't close read_state during
3426 fork_fixup since it wasn't inherited.
3427
3428 2003-01-01 Christopher Faylor <cgf@redhat.com>
3429
3430 * passwd.cc (getpwuid_r32): Revert previous change.
3431
3432 2003-01-01 Christopher Faylor <cgf@redhat.com>
3433
3434 * sysconf.cc (sysconf): Return arbitrary values for
3435 _SC_GETGR_R_SIZE_MAX, _SC_LOGIN_NAME_MAX, _SC_GETPW_R_SIZE_MAX.
3436
3437 * passwd.cc (getpwuid_r32): Add uid/gid fields to size check
3438 calculation.
This page took 0.165009 seconds and 6 git commands to generate.