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