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