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