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