]> sourceware.org Git - newlib-cygwin.git/blame - winsup/cygwin/ChangeLog
2003-05-18 Jason Eckhardt <jle@rice.edu>
[newlib-cygwin.git] / winsup / cygwin / ChangeLog
CommitLineData
c8fa3426
TP
12003-05-15 Thomas Pfaff <tpfaff@gmx.net>
2
3 * thread.h (pthread::init_mainthread): Remove function parameter.
4 (MTinterface::Init): Ditto.
5 * thread.cc (MTinterface::Init): Remove function parameter.
6 Always initialize reent_key.
7 (pthread::init_mainthread): Remove function parameter.
8 (MTinterface::fixup_after_fork): Fix pthread::init_mainthread call.
9 * dcrt0.cc (dll_crt_0_1) Fix calls to MTinterface::Init and
10 pthread::init_mainthread.
11 Call pthread::init_mainthread only when not forked.
12
f2669f5d
CV
132003-05-15 Corinna Vinschen <corinna@vinschen.de>
14
15 * fhandler_proc.cc (format_proc_meminfo): Make swap memory output
16 Linux style values.
17
5d575f7d
CV
182003-05-13 Corinna Vinschen <corinna@vinschen.de>
19
20 * include/cygwin/config.h: Define __USE_INTERNAL_STAT64 appropriately.
21
194d9eb3
CV
222003-05-12 Corinna Vinschen <corinna@vinschen.de>
23
24 * Makefile.in (CYGWIN_START): Define as crt0.o. Add to TARGET_LIBS.
25 * fhandler.h (fhandler_virtual::fstat): Remove useless declaration.
26 * fhandler_virtual.cc: Remove _COMPILING_NEWLIB define.
27 * ipc.cc (ftok): Use stat64.
28 * syscalls.cc (_fstat64): Remove alias.
29 (_fstat): Ditto.
30 (_stat): Ditto.
31 (_fstat64_r): New function.
32 (_fstat_r): Ditto.
33 (_stat64_r): Ditto.
34 (stat_r): Ditto.
35 * crt0.o: New file, moved from newlib.
36 * include/sys/param.h: Ditto.
37 * include/sys/utime.h: Ditto.
38 * include/sys/utmp.h: Ditto.
39 * include/sys/dirent.h: Ditto. Expose different struct dirent,
40 dependening of the environment.
41
cc95baad
CV
422003-05-11 Corinna Vinschen <corinna@vinschen.de>
43
44 Replace ino_t by __ino64_t throughout.
45
aee70853
CV
462003-05-11 Corinna Vinschen <corinna@vinschen.de>
47
48 * include/cygwin/types.h: Add key_t typedef.
49
066ca06f
CF
502003-05-10 Christopher Faylor <cgf@redhat.com>
51
52 * dir.cc (readdir): Fill out new old_d_ino field.
53 * fhandler.h (fhandler_base::namehash): Define as ino_t.
54 (fhandler_base::get_namehash): Ditto.
55 * fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): Accommodate
56 new 64 bit st_ino.
57 * fhandler_socket.cc (fhandler_socket::fstat): Ditto.
58 * path.cc (hash_path_name): Return ino_t.
59 * syscalls.cc (stat64_to_stat32): Convert 64 bit inode to 32 bit.
60 * winsup.h (hash_path_name): Declare as returning ino_t.
61 * include/cygwin/stat.h (__stat32): Use 32 bit st_ino.
62 (__stat64): Use 64 bit st_ino.
63 * include/cygwin/types.h (__ino64_t): Define.
64 (__ino32_t): Ditto.
65 (ino_t): Define appropriately.
66
3e66a81c
CV
672003-05-10 Corinna Vinschen <corinna@vinschen.de>
68
69 * Makefile.in (NEW_FUNCTIONS): All 32/64 from 0.79 API get
70 leading underscore.
71 * cygwin.din: Ditto.
72 * include/cygwin/version.h: Bump API minor number.
73
d3b450f3
CV
742003-05-09 Corinna Vinschen <corinna@vinschen.de>
75
76 * include/cygwin/config.h: New file.
77
9508ebc5
CF
782003-05-09 Christopher Faylor <cgf@redhat.com>
79
80 * cygthread.cc (cygthread::detach): Prioritize waiting for I/O
81 completion over waiting for signal delivery.
82
0bb7254f
TP
832003-05-06 Thomas Pfaff <tpfaff@gmx.net>
84
85 * signal.cc (nanosleep): Do not wait twice for signal arrival.
86
a6d745f5
CV
872003-05-03 Corinna Vinschen <corinna@vinschen.de>
88
89 * include/cygwin/types.h: Fix erroneous definition of ino_t from
90 2003-04-28.
91
40d3c804
CV
922003-05-03 Corinna Vinschen <corinna@vinschen.de>
93
94 * syscalls.cc (chown_worker): Allow chown'ing of socket files.
95
2238537c
TP
962003-04-30 Thomas Pfaff <tpfaff@gmx.net>
97
98 * Makefile.in: Revert patch from 2003-04-17.
99
6ef342e4
CF
1002003-04-28 Brian Ford <ford@vss.fsi.com>
101
102 * profil.h (PROFADDR): Prevent overflow when text segments are larger
103 than 256k.
104 * profil.c (profthr_func): Raise thread priority for more accurate
105 sampling.
106
1072003-04-26 Christopher Faylor <cgf@redhat.com>
108
109 * path.cc (hash_path_name): Use ino_t as type.
110
7d6d38aa
CF
1112003-04-26 Christopher Faylor <cgf@redhat.com>
112
113 * errno.cc (_sys_nerr): Fix compile error erroneously checked in on
114 2003-04-23.
115
f615d74b
CV
1162003-04-25 Corinna Vinschen <corinna@vinschen.de>
117
118 * include/netinet/ip.h: Include netinet/in_systm.h and netinet/in.h
119 to allow standalone usage (autoconf).
120
5d9a7c87
CF
1212003-04-23 Christopher Faylor <cgf@redhat.com>
122
123 * fork.cc: Change SLOW_PID_REUSE to NO_SLOW_PID_REUSE and invert ifdef
124 sense throughout.
125
0eaf24fe
CF
1262003-04-22 Christopher Faylor <cgf@redhat.com>
127
128 * select.cc (fhandler_pipe::ready_for_read): Assure that get_guard is
129 called for successful non-blocking pipe reads.
130
e8a57b4f
CV
1312003-04-22 Corinna Vinschen <corinna@vinschen.de>
132
133 * include/inttypes.h: New file.
134 * include/stdint.h: New file.
135 * include/cygwin/in.h: Include stdint.h instead of sys/types.h.
136 * include/cygwin/types.h: Include stdint.h. Remove typedefs for
137 intN_t and uintN_t since these are defined in stdint.h now.
138
99b1a40d
CF
1392003-04-21 Christopher Faylor <cgf@redhat.com>
140
650dc784 141 * include/cygwin/version.h: Bump DLL major number to 1005. Change DLL
99b1a40d
CF
142 minor number to 0. Bump API minor number.
143
beb54085
CV
1442003-04-20 Corinna Vinschen <corinna@vinschen.de>
145
146 * autoload.cc (CreateWindowStationA): Add.
147 (SetProcessWindowStation): Add.
148
6b3bdf38
CF
1492003-04-19 Christopher Faylor <cgf@redhat.com>
150
151 * wincap.h (wincaps:pty_needs_alloc_console): New element.
152 (wincapc:pty_needs_alloc_console): New function.
153 * wincap.cc: Add pty_needs_alloc_console throughout.
154 * fhandler_tty.cc (fhandler_tty_slave::open): Open an "invisible"
155 console on first pty allocation.
156
afa18d8a
CF
1572003-04-18 Christopher Faylor <cgf@redhat.com>
158
159 * fhandler_tty.cc (fhandler_tty_slave::open): Allocate a console
160 whenever a pty is allocated.
161
4e0d8778
CF
1622003-04-18 Christopher Faylor <cgf@redhat.com>
163
164 * Makefile.in: Use ${nostdlib} variable.
165
1662003-04-18 Diego Biurrun <diego@biurrun.de>
167
168 * fhandler_proc.cc (format_proc_cpuinfo): Change /proc/cpuinfo "vendor
169 id" string to "vendor_id" to conform with Linux systems.
170
4e837e73
CF
1712003-04-17 Christopher Faylor <cgf@redhat.com>
172
173 * syscalls.cc (setsid): Don't call FreeConsole if ctty is already < 0.
174
f3c1c540
TP
1752003-04-17 Thomas Pfaff <tpfaff@gmx.net>
176
177 * Makefile.in: Add finline-functions optimization to CXXFLAGS.
178 * autoload.cc (LoadDLLprime): Rename std_dll_init to
179 _std_dll_init.
180 (std_dll_init): Remove name mangling prototype. Add attributes
181 used and noinline.
182 (wsock_init): Ditto.
183 Change wsock_init to _wsock_init in wsock32 and ws2_32
184 LoadDLLprime.
185 * exceptions.cc (unused_sig_wrapper): Remove prototype. Add
186 attributes used and noinline.
187 * pwdgrp.h ((pwdgrp (passwd *&)): Remove inline code.
188 (pwdgrp (__group32 *&)): Ditto.
189 * grp.cc (pwdgrp (passwd *&)): Outline constructor.
190 (pwdgrp (__group32 *&)): Ditto.
191
a4cea440
TP
1922003-04-17 Thomas Pfaff <tpfaff@gmx.net>
193
194 * thread.h (pthread::equal): New static method.
195 * thread.cc: Rename pthread_equal to pthread::equal throughout.
196 (pthread_equal): Use pthread::equal to compare threads ids.
197
c448f78f
CF
1982003-04-15 Christopher Faylor <cgf@redhat.com>
199
200 * termios.cc (setspeed): New function.
201 (cfsetospeed): Use setspeed to set speed.
202 (cfsetispeed): Use setspeed to set speed.
203
2042003-04-15 Chris January <chris@atomice.net>
205
206 * autoload.cc: Add load statement for UuidCreate, and
207 UuidCreateSequential.
208 * cpuid.h: New file.
209 * cygwin.din: Export gethostid.
210 * fhandler_proc.cc (cpuid): Move to cpuid.h.
211 (can_set_flag): Move to cpuid.h.
212 * syscalls.cc (gethostid): New function.
5f92bef8 213 * version.h: Bump api minor version number to 83.
c448f78f 214
ffb576fb
TP
2152003-04-15 Thomas Pfaff <tpfaff@gmx.net>
216
217 * thread.h (pthread_rwlock::release): New method.
c448f78f
CF
218 * thread.cc (pthread_rwlock::unlock): Use release to signal waiting
219 threads.
ffb576fb
TP
220 (pthread_rwlock::rdlock_cleanup): Signal waiting threads after a
221 cancelation.
222 (pthread_rwlock::wrlock_cleanup): Ditto.
223
b3acb772
CF
2242003-04-13 Pierre Humblet <pierre.humblet@ieee.org>
225
226 * mkvers.sh: Prefix day with 0 in date only when day < 10.
227
2e23862a
CV
2282003-04-11 Pierre Humblet <pierre.humblet@ieee.org>
229
230 * security.cc (get_info_from_sd): New function.
231 (get_nt_attribute): Only call read_sd and get_info_from_sd.
232 Return void.
233 (get_file_attribute): Move sd error handling to get_info_from_sd.
234 and symlink handling to fhandler_disk_file::fstat_helper.
235 (get_nt_object_attribute): Only call read_sd and get_info_from_sd.
236 Return void.
237 (get_object_attribute): Remove symlink handling and simply return -1
238 when ntsec is off.
239 * fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): For
240 symlinks set the attribute, call get_file_attribute to get the ids
241 and return. In the normal case call get_file_attribute with the
242 addresses of the buffer ids and do not recheck if the file is a socket.
243
73afb2ab
CF
2442003-04-10 Christopher Faylor <cgf@redhat.com>
245
246 * cygthread.cc (cygthread::stub): Initialize stack pointer earlier.
247 (cygthread::simplestub): Initialize stack pointer.
248 (cygthread::terminate_thread): Account for possibility that stack
249 pointer has not been set. Issue warnings for unusual conditions.
250
2a1e8e11
CV
2512003-04-10 Corinna Vinschen <corinna@vinschen.de>
252
253 * regex/regex.h: Define regoff_t as _off_t.
254 * regex/regex2.h: Ditto.
255
ac5ec961
CV
2562003-04-10 Corinna Vinschen <corinna@vinschen.de>
257
258 * cygwin.din: Export wcscoll, wcswidth and wcwidth.
259 * include/cygwin/version.h: Bump API minor number.
260
e5d6d535
CF
2612003-04-10 Christopher Faylor <cgf@redhat.com>
262
263 * cygthread.h: Change 'avail' cygthread element to 'inuse' throughout.
264 * cygthread.cc: Ditto.
265 (cygthread::stub): Don't initialize already initialized events.
266 (cygthread::freerange): Don't create thread here.
267 (cygthread::cygthread): Create thread here. Die if thread not created.
268 (cygthread::operator new): Simplify. Just grab a thread structure from
269 the pool. Don't try to start the thread.
270 (cygthread::terminate_thread): Don't close event handles. Just reuse
271 them. Call MEM_RELEASE rather than MEM_DECOMMIT (from Joe Buehler).
272
ca81cd60
CF
2732003-04-08 Bob Cassels <bcassels@abinitio.com>
274
275 * fhandler_console.cc (fhandler_console::read) Handle certain key up
276 events, to allow pasting accented characters and typing them using the
277 "alt + numerics" sequences.
278
2792003-04-07 Christopher Faylor <cgf@redhat.com>
280
281 * include/limits.h (IOV_MAX): Set to a number which is small enough to
282 use in an array.
283
b410f168
CF
2842003-04-04 Christopher Faylor <cgf@redhat.com>
285
9dbe3289
CF
286 * cygthread.h (cygthread::avail): Make LONG for easier use with
287 Interlocked* functions.
288 * cygthread.cc (cygthread::init): Eliminate unneeded muto.
289 (cygthread::operator new): Don't lock. Instead change use of avail
290 variable into tri-state: available (1), not available (-1),
291 uninitialized (0).
292 (cygthread::terminate_thread): Set avail to uninitialized.
293 (cygthread::detach): Eliminate local 'avail'. Always set avail to 1
294 unless signalled.
295
2962003-04-04 Christopher Faylor <cgf@redhat.com>
297
298 * cygthread.cc (cygthread::operator new): Be more defensive when messing with
b410f168
CF
299 threads that are marked "unavailable".
300
a61bf8c3
CF
3012003-04-03 Christopher Faylor <cgf@redhat.com>
302
303 * fhandler_console.cc (CONVERT_LIMIT): Use a size for the 21st century.
304
d5292d66
CV
3052003-04-03 Corinna Vinschen <corinna@vinschen.de>
306
307 * external.cc (check_ntsec): Return general ntsec state on NULL
308 filename. Check wincap.is_security() additionally.
309
5a87c616
CF
3102003-04-02 Christopher Faylor <cgf@redhat.com>
311
312 * Makefile.in (EXTRA_OFILES): Remove debugging object.
313
d99c6176
CF
3142003-04-02 Jason Tishler <jason@tishler.net>
315 Christopher Faylor <cgf@redhat.com>
316
317 * external.cc (check_ntsec): New function.
318 (cygwin_internal): Add CW_CHECK_NTSEC handling to call check_ntsec()
319 from applications.
320 * include/cygwin/version.h: Bump API minor number.
321 * include/sys/cygwin.h (cygwin_getinfo_types): Add CW_CHECK_NTSEC.
322
3232003-04-02 Christopher Faylor <cgf@redhat.com>
324
325 * cygthread.cc (cygthread::new): Add more defensive debugging.
326
2d388e43 3272003-04-01 Pierre Humblet <pierre.humblet@ieee.org>
d99c6176 328
2d388e43
CV
329 * fhandler.cc (fhandler_base::fstat): Set the uid and gid fields
330 from the current effective ids.
331 * fhandler_socket.cc (fhandler_socket::fstat): Keep the uid and gid set
332 by fhandler_base::fstat.
333 * security.cc (get_nt_attribute): Do not test wincap.has_security ().
334 (get_nt_object_attribute): Ditto.
335 (get_file_attribute): Add test for wincap.has_security ().
336 (get_object_attribute): Ditto.
337
1727fba0
CV
3382003-04-01 Corinna Vinschen <corinna@vinschen.de>
339
340 * dir.cc: Change __off32_t to _off_t and __off64_t to _off64_t
341 throughout.
342 * fhandler.cc: Ditto.
343 * fhandler.h: Ditto.
344 * fhandler_clipboard.cc: Ditto.
345 * fhandler_disk_file.cc: Ditto.
346 * fhandler_dsp.cc: Ditto.
347 * fhandler_floppy.cc: Ditto.
348 * fhandler_mem.cc: Ditto.
349 * fhandler_proc.cc: Ditto.
350 * fhandler_process.cc: Ditto.
351 * fhandler_random.cc: Ditto.
352 * fhandler_registry.cc: Ditto.
353 * fhandler_tape.cc: Ditto.
354 * fhandler_termios.cc: Ditto.
355 * fhandler_virtual.cc: Ditto.
356 * fhandler_zero.cc: Ditto.
357 * mmap.cc: Ditto.
358 * pipe.cc: Ditto.
359 * syscalls.cc: Ditto.
360 * winsup.h: Ditto.
361 * include/cygwin/stat.h: Ditto.
362 * include/cygwin/types.h: Ditto. Remove definition of __off32_t
363 and __off64_t.
364
333879e7
CF
3652003-03-31 Christopher Faylor <cgf@redhat.com>
366
367 * exceptions.cc (setup_handler): Make sure winapi lock is released when
368 exiting loop.
369
a2105d93
CF
3702003-03-30 Christopher Faylor <cgf@redhat.com>
371
372 * include/cygwin/fs.h: Remove unneeded include.
373 * include/cygwin/in.h: Include sys/types.h rather than cygwin/types.h.
374
856a9750
CV
3752003-03-29 Corinna Vinschen <corinna@vinschen.de>
376
377 * syscalls.cc (login): Fix comment.
378 (logout): Ditto.
379
8304de2e
CV
3802003-03-29 Corinna Vinschen <corinna@vinschen.de>
381
382 * syscalls.cc: Slightly cleanup all utmp functions.
383 (login): Use mutex to secure against concurrent access to wtmp file.
384 (logout): Rewrite using POSIX calls.
385 (utmp_fd): Initialized to -1 now. Any value < 0 is treated as closed
386 in subsequent functions.
387 (utmp_readonly): New variable, indicating utmp file open for reading
388 only.
389 (internal_setutent): New function implementing setutent().
390 (setutent): Call internal_setutent now.
391 (endutent): Reset utmp_readonly.
392 (getutent): Return immediately if utmp file can't be opened.
393 (getutid): Ditto.
394 (getutline): Ditto.
395 (pututline): Ditto. Use mutex to secure against concurrent access to
396 utmp file.
397
46c8214c
CF
3982003-03-28 Christopher Faylor <cgf@redhat.com>
399
400 * Makefile.in: Remove EXE_LDFLAGS. Fix fhandler_CFLAGS typo. Recognize .s suffix.
401 * configure.in: Remove EXE_LDFLAGS.
402 * configure: Regenerate.
403
a7ab35c1
CF
4042003-03-28 Christopher Faylor <cgf@redhat.com>
405
406 * include/sys/cygwin.h: Declare cygwin_internal as unsigned long.
407 * external.cc (cygwin_internal): Define as unsigned long.
408
4092003-03-27 Christopher Faylor <cgf@redhat.com>
410
411 * include/sys/cygwin.h: Move cygwin_internal outside of WINVER
412 conditional.
413
eff6c00e
TP
4142003-03-27 Thomas Pfaff <tpfaff@gmx.net>
415
416 * thread.cc: Change 1==foo equations to foo==1 throughout.
417
15648790
TP
4182003-03-27 Thomas Pfaff <tpfaff@gmx.net>
419
420 * thread.h: Change class names, methods, members and local vars
421 according to the GNU coding style.
422 * thread.cc: Ditto.
423 * dcrt0.cc (dll_crt0_1): Rename pthread::initMainThread call to
424 pthread::init_mainthread.
425 * pthread.cc (pthead_getsequence_np): Rename pthread::isGoodObject
426 call to pthread::is_good_object.
427
98b36ec8
CV
4282003-03-27 Joe Buehler <jhpb@draco.hekimian.com>
429
1ce82d24
CF
430 * autoload.cc: Add RegGetKeySecurity().
431 * security.cc (get_nt_object_attribute): Use RegGetKeySecurity() for
98b36ec8
CV
432 performance.
433
85738bf7
CF
4342003-03-25 Christopher Faylor <cgf@redhat.com>
435 Joe Buehler <jhpb@draco.hekimian.com>
436
437 * fork.cc (fork_parent): Don't copy signals from parent to child here.
438 * sigproc.cc (proc_subproc): Copy signals from parent to child pinfo
439 here.
440
9306ba2e
TP
4412003-03-23 Thomas Pfaff <tpfaff@gmx.net>
442
85738bf7
CF
443 * thread.h (class List): Move inline code inside class declaration.
444 (List::forEach): Change callback parameter to template class member
445 function pointer.
446 (pthread_keys::fixup_before_fork): Change to inline. Use List::forEach
447 to fixup keys.
9306ba2e
TP
448 (pthread_keys::fixup_after_fork): Ditto.
449 (pthread_keys::runAllDestructors): Ditto.
450 (pthread_key::saveAKey): Remove.
451 (pthread_key::restoreAKey): Ditto.
452 (pthread_key::destroyAKey): Ditto.
453 (pthread_key::run_destructor): Rename to runDestructor.
85738bf7
CF
454 (pthread_mutex::fixup_after_fork): Change to inline. Use List::forEach
455 to fixup mutexes after a fork.
9306ba2e
TP
456 (pthread_mutex::FixupAfterFork): New method.
457 (pthread_mutex::mutexes): New member.
85738bf7
CF
458 (pthread_cond::fixup_after_fork): Change to inline. Use List::forEach
459 to fixup conds after a fork.
9306ba2e
TP
460 (pthread_cond::FixupAfterFork): New method.
461 (pthread_cond::conds): New member.
85738bf7 462 (pthread_rwlock::fixup_after_fork): Change to inline. Use
9306ba2e
TP
463 List::forEach to fixup rwlocks after a fork.
464 (pthread_rwlock::FixupAfterFork): New method.
465 (pthread_rwlock::rwlocks): New member.
85738bf7
CF
466 (semaphore::fixup_after_fork): Change to inline. Use List::forEach to
467 fixup mutexes after a fork.
9306ba2e
TP
468 (semaphore::FixupAfterFork): New method.
469 (semaphore::semaphores): New member.
470 (MTinterface::mutexs): Remove.
471 (MTinterface::conds): Ditto.
472 (MTinterface::rwlocks): Ditto.
473 (MTinterface::semaphores): Ditto.
474 (pthread_equal): Add extern "C".
475 (pthread_mutex_lock): Ditto.
85738bf7
CF
476
477 * thread.cc (MTinterface::fixup_after_fork): Change fixup_after_fork
478 calls for pthread objects.
9306ba2e 479 (semaphore::conds): Instantiate.
85738bf7
CF
480 (pthread_cond::pthread_cond): Use List::Insert rather than custom list
481 code.
482 (pthread_cond::~pthread_cond): Use List::Remove rather than custom list
483 code.
9306ba2e
TP
484 (pthread_cond::fixup_after_fork): Rename to FixupAfterFork.
485 (pthread_rwlock::rwlocks): Instantiate.
85738bf7
CF
486 (pthread_rwlock::pthread_crwlock): Use List::Insert rather than custom
487 list code.
488 (pthread_rwlock::~pthread_rwlock): Use List::Remove rather than custom
489 list code.
9306ba2e
TP
490 (pthread_rwlock::fixup_after_fork): Rename to FixupAfterFork.
491 (pthread_key::saveAKey): Remove.
492 (pthread_key::fixup_before_fork): Ditto.
493 (pthread_key::restoreAKey): Ditto.
494 (pthread_key::fixup_after_fork): Ditto.
495 (pthread_key::destroyAKey): Ditto.
496 (pthread_key::runAllDestructors): Ditto.
497 (pthread_key::run_destructor): Rename to runDestructor.
498 (pthread_mutex::mutexes): Instantiate.
85738bf7
CF
499 (pthread_mutex::pthread_mutex): Use List::Insert rather than custom
500 list code.
501 (pthread_mutex::~pthread_mutex): Use List::Remove rather than custom
502 list code.
9306ba2e
TP
503 (pthread_mutex::fixup_after_fork): Rename to FixupAfterFork.
504 (semaphore::conds): Instantiate.
85738bf7
CF
505 (semaphore::semaphore): Use List::Insert rather than custom list code.
506 (semaphores::~semaphore): Use List::Remove rather than custom list
9306ba2e 507 code.
9306ba2e
TP
508 (semaphore::fixup_after_fork): Rename to FixupAfterFork.
509
ff3ef36d
CF
5102003-03-22 Christopher Faylor <cgf@redhat.com>
511
512 * pipe.cc (fhandler_pipe::dup): Don't dup input_handle if it doesn't
513 exist.
514
ca04f61f
CF
5152003-03-22 Christopher Faylor <cgf@redhat.com>
516
517 * syscalls.cc (unlink): Be more defensive when SetFileAttributes is
518 called. Fix typo in debugging output.
519
89e7a1ce
CF
5202003-03-21 Christopher Faylor <cgf@redhat.com>
521
522 * fork.cc: Conditionalize use of slow_pid_reuse throughout. It's not
523 necessary for newer versions of bash.
524
fa85038b
CV
5252003-03-20 Corinna Vinschen <corinna@vinschen.de>
526
527 * fhandler_socket.cc (fhandler_socket::sendto): Restrict EPIPE and
528 SIGPIPE handling to connection oriented sockets. Add comment.
529
4da34970
CF
5302003-03-19 Christopher Faylor <cgf@redhat.com>
531
532 * sigproc.h (signal_fixup_after_exec): Eliminate argument in declaration.
533 * exceptions.cc (signal_fixup_after_exec): Eliminate argument in
534 definition. Don't reset signal handlers after spawm. Just treat like
535 fork/exec.
536 * dcrt0.cc (dll_crt0_1): Don't pass PROC_SPAWN argument to
537 signal_fixup_after_exec.
538 * syscalls.cc (unlink): Don't change attributes of file if not readonly/system.
539 Ditto for resetting of arguments.
540
036ac6b3
CV
5412003-03-19 Corinna Vinschen <corinna@vinschen.de>
542
543 * glob.c: Eliminate __INSIDE_CYGWIN__ preprocessor conditionals
544 throughout.
545
b1897d27
CV
5462003-03-19 Corinna Vinschen <corinna@vinschen.de>
547
548 * fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): Fix
549 wrong usage of S_IFDIR.
550 * security.cc (get_attribute_from_acl): Ditto.
551 (get_file_attribute): Fix wrong usage of S_IFLNK.
552 (get_object_attribute): Ditto.
553 (alloc_sd): Fix wrong usage of S_IFDIR.
554 * syscalls.cc (chmod): Allow chmod'ing of socket files.
555
c16d0946
CV
5562003-03-19 Corinna Vinschen <corinna@vinschen.de>
557
558 * include/cygwin/version.h (CYGWIN_VERSION_CHECK_FOR_USING_BIG_TYPES):
559 Define.
560 * glob.c (g_lstat): Use CYGWIN_VERSION_CHECK_FOR_USING_BIG_TYPES
561 instead of numerical constants.
562 (g_stat): Ditto.
563
6a80a133
TP
5642003-03-18 Thomas Pfaff <tpfaff@gmx.net>
565
566 * pthread.cc (pthread_attr_init): Remove
567 (pthread_attr_destroy): Ditto.
568 (pthread_attr_setdetachstate): Ditto.
569 (pthread_attr_getdetachstate): Ditto.
570 (pthread_attr_setstacksize): Ditto.
571 (pthread_attr_getstacksize): Ditto.
572 (pthread_attr_setinheritsched): Ditto.
573 (pthread_attr_getinheritsched): Ditto.
574 (pthread_attr_setschedparam): Ditto.
575 (pthread_attr_getschedparam): Ditto.
576 (pthread_attr_setschedpolicy): Ditto.
577 (pthread_attr_getschedpolicy): Ditto.
578 (pthread_attr_setscope): Ditto.
579 (pthread_attr_getscope): Ditto.
580 (pthread_attr_setstackaddr): Ditto.
581 (pthread_attr_getstackaddr): Ditto.
582 (pthread_key_create): Ditto.
583 (pthread_key_delete): Ditto.
584 (pthread_setspecific): Ditto.
585 (pthread_getspecific): Ditto.
586 (pthread_kill): Ditto.
587 (pthread_sigmask): Ditto.
588 (pthread_equal): Ditto.
589 (pthread_mutex_lock): Ditto.
590 (pthread_mutex_trylock): Ditto.
591 (pthread_mutex_unlock): Ditto.
592 (pthread_mutex_destroy): Ditto.
593 (pthread_mutex_setprioceiling): Ditto.
594 (pthread_mutex_getprioceiling): Ditto.
595 (pthread_mutexattr_destroy): Ditto.
596 (pthread_mutexattr_getprioceiling): Ditto.
597 (pthread_mutexattr_getprotocol): Ditto.
598 (pthread_mutexattr_getpshared): Ditto.
599 (pthread_mutexattr_gettype): Ditto.
600 (pthread_mutexattr_init): Ditto.
601 (pthread_mutexattr_setprioceiling): Ditto.
602 (pthread_mutexattr_setprotocol): Ditto.
603 (pthread_mutexattr_setpshared): Ditto.
604 (pthread_mutexattr_settype): Ditto.
605 (pthread_cond_destroy): Ditto.
606 (pthread_cond_signal): Ditto.
607 (pthread_cond_broadcast): Ditto.
608 (pthread_condattr_init): Ditto.
609 (pthread_condattr_destroy): Ditto.
610 (pthread_condattr_getpshared): Ditto.
611 (pthread_condattr_setpshared): Ditto.
612 (pthread_rwlock_destroy): Ditto.
613 (pthread_rwlock_rdlock): Ditto.
614 (pthread_rwlock_tryrdlock): Ditto.
615 (pthread_rwlock_wrlock): Ditto.
616 (pthread_rwlock_trywrlock): Ditto.
617 (pthread_rwlock_unlock): Ditto.
618 (pthread_rwlockattr_init): Ditto.
619 (pthread_rwlockattr_getpshared): Ditto.
620 (pthread_rwlockattr_setpshared): Ditto.
621 (pthread_rwlockattr_destroy): Ditto.
622 (pthread_getconcurrency): Ditto.
623 (pthread_setconcurrency): Ditto.
624 (pthread_getschedparam): Ditto.
625 (pthread_setschedparam): Ditto.
626
627 * thread.h (__pthread_attr_init): Remove prototype.
628 (__pthread_attr_destroy): Ditto.
629 (__pthread_attr_setdetachstate): Ditto.
630 (__pthread_attr_getdetachstate): Ditto.
631 (__pthread_attr_setstacksize): Ditto.
632 (__pthread_attr_getstacksize): Ditto.
633 (__pthread_attr_setinheritsched): Ditto.
634 (__pthread_attr_getinheritsched): Ditto.
635 (__pthread_attr_setschedparam): Ditto.
636 (__pthread_attr_getschedparam): Ditto.
637 (__pthread_attr_setschedpolicy): Ditto.
638 (__pthread_attr_getschedpolicy): Ditto.
639 (__pthread_attr_setscope): Ditto.
640 (__pthread_attr_getscope): Ditto.
641 (__pthread_attr_setstackaddr): Ditto.
642 (__pthread_attr_getstackaddr): Ditto.
643 (__pthread_key_create): Ditto.
644 (__pthread_key_delete): Ditto.
645 (__pthread_setspecific): Ditto.
646 (__pthread_getspecific): Ditto.
647 (__pthread_kill): Ditto.
648 (__pthread_sigmask): Ditto.
649 (__pthread_equal): Ditto.
650 (__pthread_mutex_lock): Ditto.
651 (__pthread_mutex_trylock): Ditto.
652 (__pthread_mutex_unlock): Ditto.
653 (__pthread_mutex_destroy): Ditto.
654 (__pthread_mutex_setprioceiling): Ditto.
655 (__pthread_mutex_getprioceiling): Ditto.
656 (__pthread_mutexattr_destroy): Ditto.
657 (__pthread_mutexattr_getprioceiling): Ditto.
658 (__pthread_mutexattr_getprotocol): Ditto.
659 (__pthread_mutexattr_getpshared): Ditto.
660 (__pthread_mutexattr_gettype): Ditto.
661 (__pthread_mutexattr_init): Ditto.
662 (__pthread_mutexattr_setprioceiling): Ditto.
663 (__pthread_mutexattr_setprotocol): Ditto.
664 (__pthread_mutexattr_setpshared): Ditto.
665 (__pthread_mutexattr_settype): Ditto.
666 (__pthread_cond_destroy): Ditto.
667 (__pthread_cond_signal): Ditto.
668 (__pthread_cond_broadcast): Ditto.
669 (__pthread_condattr_init): Ditto.
670 (__pthread_condattr_destroy): Ditto.
671 (__pthread_condattr_getpshared): Ditto.
672 (__pthread_condattr_setpshared): Ditto.
673 (__pthread_rwlock_destroy): Ditto.
674 (__pthread_rwlock_rdlock): Ditto.
675 (__pthread_rwlock_tryrdlock): Ditto.
676 (__pthread_rwlock_wrlock): Ditto.
677 (__pthread_rwlock_trywrlock): Ditto.
678 (__pthread_rwlock_unlock): Ditto.
679 (__pthread_rwlockattr_init): Ditto.
680 (__pthread_rwlockattr_getpshared): Ditto.
681 (__pthread_rwlockattr_setpshared): Ditto.
682 (__pthread_rwlockattr_destroy): Ditto.
683 (__pthread_getconcurrency): Ditto.
684 (__pthread_setconcurrency): Ditto.
685 (__pthread_getschedparam): Ditto.
686 (__pthread_setschedparam): Ditto.
687
688 * thread.cc: Rename __pthread_equal to pthread_equal throughout.
689 Change pthread_self parameter appropriate.
690 (__pthread_attr_init): Remove __ prefix. Change to extern "C".
691 (__pthread_attr_destroy): Ditto.
692 (__pthread_attr_setdetachstate): Ditto.
693 (__pthread_attr_getdetachstate): Ditto.
694 (__pthread_attr_setstacksize): Ditto.
695 (__pthread_attr_getstacksize): Ditto.
696 (__pthread_attr_setinheritsched): Ditto.
697 (__pthread_attr_getinheritsched): Ditto.
698 (__pthread_attr_setschedparam): Ditto.
699 (__pthread_attr_getschedparam): Ditto.
700 (__pthread_attr_setschedpolicy): Ditto.
701 (__pthread_attr_getschedpolicy): Ditto.
702 (__pthread_attr_setscope): Ditto.
703 (__pthread_attr_getscope): Ditto.
704 (__pthread_attr_setstackaddr): Ditto.
705 (__pthread_attr_getstackaddr): Ditto.
706 (__pthread_key_create): Ditto.
707 (__pthread_key_delete): Ditto.
708 (__pthread_setspecific): Ditto.
709 (__pthread_getspecific): Ditto.
710 (__pthread_kill): Ditto.
711 (__pthread_sigmask): Ditto.
712 (__pthread_equal): Ditto.
713 (__pthread_mutex_lock): Ditto.
714 (__pthread_mutex_trylock): Ditto.
715 (__pthread_mutex_unlock): Ditto.
716 (__pthread_mutex_destroy): Ditto.
717 (__pthread_mutex_setprioceiling): Ditto.
718 (__pthread_mutex_getprioceiling): Ditto.
719 (__pthread_mutexattr_destroy): Ditto.
720 (__pthread_mutexattr_getprioceiling): Ditto.
721 (__pthread_mutexattr_getprotocol): Ditto.
722 (__pthread_mutexattr_getpshared): Ditto.
723 (__pthread_mutexattr_gettype): Ditto.
724 (__pthread_mutexattr_init): Ditto.
725 (__pthread_mutexattr_setprioceiling): Ditto.
726 (__pthread_mutexattr_setprotocol): Ditto.
727 (__pthread_mutexattr_setpshared): Ditto.
728 (__pthread_mutexattr_settype): Ditto.
729 (__pthread_cond_destroy): Ditto.
730 (__pthread_cond_signal): Ditto.
731 (__pthread_cond_broadcast): Ditto.
732 (__pthread_condattr_init): Ditto.
733 (__pthread_condattr_destroy): Ditto.
734 (__pthread_condattr_getpshared): Ditto.
735 (__pthread_condattr_setpshared): Ditto.
736 (__pthread_rwlock_destroy): Ditto.
737 (__pthread_rwlock_rdlock): Ditto.
738 (__pthread_rwlock_tryrdlock): Ditto.
739 (__pthread_rwlock_wrlock): Ditto.
740 (__pthread_rwlock_trywrlock): Ditto.
741 (__pthread_rwlock_unlock): Ditto.
742 (__pthread_rwlockattr_init): Ditto.
743 (__pthread_rwlockattr_getpshared): Ditto.
744 (__pthread_rwlockattr_setpshared): Ditto.
745 (__pthread_rwlockattr_destroy): Ditto.
746 (__pthread_getconcurrency): Ditto.
747 (__pthread_setconcurrency): Ditto.
748 (__pthread_getschedparam): Ditto.
749 (__pthread_setschedparam): Ditto.
750
00d296a3
TP
7512003-03-18 Thomas Pfaff <tpfaff@gmx.net>
752
753 * cygwin.din: Add pthread_rwlock_destroy, pthread_rwlock_init,
754 pthread_rwlock_rdlock, pthread_rwlock_tryrdlock,
755 pthread_rwlock_wrlock, pthread_rwlock_trywrlock,
756 pthread_rwlock_unlock, pthread_rwlockattr_init,
757 pthread_rwlockattr_getpshared, pthread_rwlockattr_setpshared,
758 and pthread_rwlockattr_destroy.
759 * include/cygwin/version.h: Bump API minor number.
760 * include/pthread.h (PTHREAD_RWLOCK_INITIALIZER): Define a
761 reasonable value.
762 Add prototypes for pthread_rwlock_destroy, pthread_rwlock_init,
763 pthread_rwlock_rdlock, pthread_rwlock_tryrdlock,
764 pthread_rwlock_wrlock, pthread_rwlock_trywrlock,
765 pthread_rwlock_unlock, pthread_rwlockattr_init,
766 pthread_rwlockattr_getpshared, pthread_rwlockattr_setpshared,
767 and pthread_rwlockattr_destroy.
768 * thread.h (PTHREAD_ONCE_MAGIC): Remove superflous semicolon.
769 (PTHREAD_RWLOCK_MAGIC): New define.
770 (PTHREAD_RWLOCKATTR_MAGIC): Ditto.
771 (pthread_rwlockattr): New class.
772 (pthread_rwlock): Ditto.
773 (MTinterface::rwlocks): New member.
774 (MTinterface::MTinterface): Initialize rwlocks.
775 Add prototypes for __pthread_rwlock_destroy,
776 __pthread_rwlock_wrlock, __pthread_rwlock_trywrlock,
777 __pthread_rwlock_unlock, __pthread_rwlockattr_init,
778 __pthread_rwlockattr_getpshared, __pthread_rwlockattr_setpshared,
779 and __pthread_rwlockattr_destroy.
780 * thread.cc (MTinterface::Init): Initialize rwlock internal mutex.
781 (MTinterface::fixup_after_fork): Fixup rwlocks after fork.
782 (pthread_rwlockattr::isGoodObject): Implement.
783 (pthread_rwlockattr::pthread_rwlockattr): Ditto.
784 (pthread_rwlockattr::~pthread_rwlockattr): Ditto.
785 (pthread_rwlock::initMutex): Ditto.
786 (pthread_rwlock::pthread_rwlock): Ditto.
787 (pthread_rwlock::~pthread_rwlock): Ditto.
788 (pthread_rwlock::RdLock): Ditto.
789 (pthread_rwlock::TryRdLock): Ditto.
790 (pthread_rwlock::WrLock): Ditto.
791 (pthread_rwlock::TryWrLock): Ditto.
792 (pthread_rwlock::UnLock): Ditto.
793 (pthread_rwlock::addReader): Ditto.
794 (pthread_rwlock::removeReader): Ditto.
795 (pthread_rwlock::lookupReader): Ditto.
796 (pthread_rwlock::RdLockCleanup): Ditto.
797 (pthread_rwlock::WrLockCleanup): Ditto.
798 (pthread_rwlock::fixup_after_fork): Ditto.
799 (pthread_rwlock::isGoodObject): Ditto.
800 (pthread_rwlock::isGoodInitializer): Ditto.
801 (pthread_rwlock::isGoodInitializerOrObject): Ditto.
802 (pthread_rwlock::isGoodInitializerOrBadObject): Ditto.
803 (__pthread_rwlock_destroy): Ditto.
804 (pthread_rwlock::init): Ditto.
805 (__pthread_rwlock_rdlock): Ditto.
806 (__pthread_rwlock_tryrdlock): Ditto.
807 (__pthread_rwlock_wrlock): Ditto.
808 (__pthread_rwlock_trywrlock): Ditto.
809
f592b05d
TP
8102003-03-18 Thomas Pfaff <tpfaff@gmx.net>
811
812 * thread.h (pthread_cond::ExitingWait): Remove.
813 (pthread_cond::mutex): Ditto.
814 (pthread_cond::cond_access): Ditto.
815 (pthread_cond::win32_obj_id): Ditto.
816 (pthread_cond::TimedWait): Ditto.
817 (pthread_cond::BroadCast): Ditto.
818 (pthread_cond::Signal): Ditto.
819 (pthread_cond::waiting): Change type to unsigned long.
820 (pthread_cond::pending): New member.
821 (pthread_cond::semWait): Ditto.
822 (pthread_cond::mtxIn): Ditto.
823 (pthread_cond::mtxOut): Ditto.
824 (pthread_cond::mtxCond): Ditto.
825 (pthread_cond::UnBlock): New method.
826 (pthread_cond::Wait): Ditto.
827 * thread.cc: Update list of cancellation points.
828 (pthread_cond::pthread_cond): Rewrite.
829 (pthread_cond::~pthread_cond): Ditto.
830 (pthread_cond::TimedWait): Remove.
831 (pthread_cond::BroadCast): Ditto.
832 (pthread_cond::Signal): Ditto.
833 (pthread_cond::UnBlock): Implement.
834 (pthread_cond::Wait): Ditto.
835 (pthread_cond::fixup_after_fork): Rewrite.
836 (pthread_mutex::fixup_after_fork): Remove DETECT_BAD_APP
837 conditional.
838 (__pthread_cond_broadcast): Just return 0 if the condition is
839 not initialized. Call pthread_cond::UnBlock to release blocked
840 threads.
841 (__pthread_cond_signal): Ditto.
842 (__pthread_cond__dowait): Rewrite.
843 (pthread_cond_timedwait): Add pthread_testcancel call. Fix
844 waitlength calculation.
845 (pthread_cond_wait): Add pthread_testcancel call.
846
2ff03dc2
TP
8472003-03-18 Thomas Pfaff <tpfaff@gmx.net>
848
849 * include/pthread.h (PTHREAD_MUTEX_NORMAL): New define.
850 * thread.cc: Remove errno.h include.
851 (pthread::precreate): Change internal mutex type to normal.
852 (pthread_mutex::canBeUnlocked): Implement.
853 (pthread_mutex::pthread_mutex): Initialize lock_counter with 0.
854 (pthread_mutex::Lock): Rename to _Lock. Add self parameter.
855 Change lock_counter logic. Update SetOwner call.
856 (pthread_mutex::TryLock): Rename to _TryLock. Add self parameter.
857 Change lock_counter logic. Update SetOwner call.
858 (pthread_mutex::UnLock): Rename to _UnLock. Add self parameter.
859 Change lock_counter logic.
860 (pthread_mutex::Destroy): Rename to _Destroy. Update TryLock call.
861 (pthread_mutex::SetOwner): Move to thread.h as inline.
862 (pthread_mutex::LockRecursive): Ditto.
863 (pthread_mutex::fixup_after_fork): Change lock_counter logic.
864 (__pthread_mutexattr_settype): Add PTHREAD_MUTEX_NORMAL to valid
865 types check.
866 * thread.h: Include errno.h and limits.h.
867 (MUTEX_LOCK_COUNTER_INITIAL): Remove.
868 (MUTEX_OWNER_ANONYMOUS): New define.
869 (pthread_mutex::canBeUnlocked): New static method.
870 (pthread_mutex::lock_counter): Change type to unsigned long.
871 (pthread_mutex::GetPthreadSelf): New method.
872 (pthread_mutex::Lock): Call _Lock with pthread_self pointer.
873 (pthread_mutex::TryLock): Call _TryLock with pthread_self pointer.
874 (pthread_mutex::UnLock): Call _UnLock with pthread_self pointer.
875 (pthread_mutex::Destroy): Call _Destroy with pthread_self pointer.
876 (pthread_mutex::SetOwner): Moved from thread.cc as inline.
877 (pthread_mutex::LockRecursive): Ditto.
878 (pthread_mutex::_Lock): New method.
879 (pthread_mutex::_TryLock): New method.
880 (pthread_mutex::_UnLock): New method.
881 (pthread_mutex::_Destroy): New method.
882
dcd350f0
CV
8832003-03-18 Christopher January <chris@atomice.net>
884
885 * fhandler_proc.cc (format_proc_cpuinfo): Use IsProcessorFeaturePresent
886 only on Windows NT. Read CPU Mhz value only on NT. Revert previous
887 change so cpuid instruction is called even on non-NT systems.
888
c51dc9c2
CV
8892003-03-17 Corinna Vinschen <corinna@vinschen.de>
890
a2105d93 891 * glob.c (g_lstat): Change API minor test to match API minor number
c51dc9c2
CV
892 change in previous patch.
893 (g_stat): Ditto.
894
f194ba1f
CF
8952003-03-17 Christopher Faylor <cgf@redhat.com>
896
897 * include/cygwin/version.h: Reorganize last two api versions so that
898 btowc and trunc exports show up before previous bump since there has
899 been no exported version of the DLL with the 64 bit changes yet but
900 1.3.22 will have the btowc and trunc.
901
3543669f
CF
9022003-03-17 Christopher Faylor <cgf@redhat.com>
903
904 * cygwin.din: Export btowc, trunc.
905 * include/cygwin/version.h: Reflect new exports.
906 * syscalls.cc (_stat): Rename to stat to avoid newlib wrapper.
907 * syscalls.cc (_fstat): Ditto.
908
9092003-03-16 Christopher Faylor <cgf@redhat.com>
910
911 * fhandler_console.cc (fhandler_console::close): Correct check for
912 current tty. Add debugging output when console is freed.
913 (set_console_state_for_spawn): Add debugging output.
914 * fhandler_tty.cc (fhandler_tty_slave::open): Don't decrement console
915 open flag when vforking.
916 * sigproc.cc (sigproc_terminate): Fix debugging output.
917 * spawn.cc (handle): Eliminate second argument.
918 (spawn_guts): Reflect elimination of argument change to handle.
919 * syscalls.cc (setsid): Add debugging output when console is freed.
920
9212003-03-14 Christopher Faylor <cgf@redhat.com>
922
923 * syscalls.cc (rename): Revert assumption that DELETE_ON_CLOSE works on
924 Win9x.
925
41ffdfa5
CF
9262003-03-13 Christopher Faylor <cgf@redhat.com>
927
928 * include/cygwin/version.h: Bump DLL minor number to 23.
929
5b186cd9
CV
9302003-03-13 Corinna Vinschen <corinna@vinschen.de>
931
932 * autoload.cc (IsProcessorFeaturePresent): Add.
933 * fhandler_proc.cc (format_proc_cpuinfo): Add case for 9x systems.
934
c58555c7
CV
9352003-03-13 Corinna Vinschen <corinna@vinschen.de>
936
937 * fhandler_proc.cc (format_proc_cpuinfo): Fix vendor id in cpuid case.
938
49a0d53c
CV
9392003-03-13 Corinna Vinschen <corinna@vinschen.de>
940
941 * net.cc (cygwin_rcmd): Use correct file descriptor in call to fdsock.
942 (cygwin_rexec): Ditto.
943
6fcd5661
CF
9442003-03-13 Christopher Faylor <cgf@redhat.com>
945
946 * fhandler_tty.cc (fhandler_tty_slave::close): Fix typo in debug
947 output.
948
949 * syscalls.cc (rename): Assume that DELETE_ON_CLOSE works on Win9x.
950
aa39b7f7
CV
9512003-03-11 Corinna Vinschen <corinna@vinschen.de>
952
953 * fhandler_socket.cc (fhandler_socket::dup): Don't call
954 fhandler_base::dup() but call DuplicateHandle directly instead to have
955 control over socket inheritence.
956
2afa7f58
CV
9572003-03-11 Corinna Vinschen <corinna@vinschen.de>
958
959 * fhandler_socket.cc (fhandler_socket::dup): On NT systems avoid
960 using WinSock2 socket duplication methods. Add comment.
961
9622003-03-11 Pierre Humblet <pierre.humblet@ieee.org>
963
964 * fhandler_socket.cc (fhandler_socket::fixup_after_fork):
965 Set io_handle to INVALID_SOCKET in case of failure.
966 (fhandler_socket::dup): Return 0 if the io_handle is valid.
967
556ceaeb
CV
9682003-03-10 Corinna Vinschen <corinna@vinschen.de>
969
970 * sec_acl.cc (setacl): Don't handle DELETE flag specially.
971 * security.cc (alloc_sd): Ditto.
972
a201401c
CV
9732003-03-09 Corinna Vinschen <corinna@vinschen.de>
974
6bbf711e 975 * winver.rc: Change Copyright hint to include 2003.
a201401c 976
b1aae492
CV
9772003-03-09 Corinna Vinschen <corinna@vinschen.de>
978
979 Switch to 32/64 datatypes:
980 * Makefile.in (OBSOLETE_FUNCTIONS): Add open acl aclcheck aclfrommode
981 aclfrompbits aclfromtext aclsort acltomode acltopbits acltotext chown
982 facl fchown fgetpos fopen freopen fseeko fsetpos fstat ftello
983 ftruncate getegid geteuid getgid getgrent getgrgid getgrnam getgroups
984 getpwuid getpwuid_r getuid initgroups lchown lseek lstat mknod mmap
985 seekdir setegid seteuid setgid setgroups setregid setreuid setuid stat
986 telldir truncate.
987 (NEW_FUNCTIONS): Add _open64 acl32 aclcheck32 aclfrommode32
988 aclfrompbits32 aclfromtext32 aclsort32 acltomode32 acltopbits32
989 acltotext32 chown32 facl32 fchown32 fgetpos64 fopen64 freopen64
990 fseeko64 fsetpos64 fstat64 ftello64 ftruncate64 getegid32 geteuid32
991 getgid32 getgrent32 getgrgid32 getgrnam32 getgroups32 getpwuid32
992 getpwuid_r32 getuid32 initgroups32 lchown32 lseek64 lstat64 mknod32
993 mmap64 seekdir64 setegid32 seteuid32 setgid32 setgroups32 setregid32
994 setreuid32 setuid32 stat64 telldir64 truncate64 to substitute the
995 above.
996 * cygserver_shm.h (class client_request_shm): Change uid_t and gid_t
997 members to __uid32_t and __gid32_t.
998 * cygwin.din: Add symbols acl32 aclcheck32 aclfrommode32
999 aclfrompbits32 aclfromtext32 aclsort32 acltomode32 acltopbits32
1000 acltotext32 facl32 fgetpos64 fopen64 freopen64 fseeko64 fsetpos64
1001 _fstat64 ftello64 _lseek64 mknod32 _open64.
1002 * glob.c: Include perprocess.h.
1003 (globtilde): Call getpwuid32 and getuid32 instead of getpwuid and
1004 getuid.
1005 (g_lstat): Check for applications API version to call the appropriate
1006 typed gl_lstat function.
1007 (g_stat): Ditto for gl_stat.
1008 * shm.cc (client_request_shm::client_request_shm): Call geteuid32
1009 and getegid32 instead of geteuid and getegid throughout.
1010 * syscalls.cc (_open64): New alias for open.
1011 (_lseek64): New alias for lseek64.
1012 (_fstat64): New alias for fseek64.
1013 (mknod32): New function.
1014 (mknod): Calls mknod32 now.
1015 * winsup.h: Make function declarations for getuid32, geteuid32,
1016 and getpwuid32 accessible for plain C sources. Add declarations
1017 for getegid32 and getpwnam.
1018 * include/cygwin/version.h: Bum API minor number to 78.
1019 * include/sys/cygwin.h: Guard C++ specific members of struct
1020 per_process against inclusion in plain C sources.
1021 * include/sys/mman.h (mman): Add guard to avoid type clash when
1022 compiling Cygwin.
1023
659fb3ff
CF
10242003-03-09 Christopher Faylor <cgf@redhat.com>
1025
d580d86c 1026 * include/cygwin/version.h: Bump DLL minor number to 22.
659fb3ff 1027
c367dfd0
CF
10282003-03-09 Christopher Faylor <cgf@redhat.com>
1029
1030 Do some minor reformatting of 'extern "C"' use throughout.
1031
10322003-03-06 Christopher January <chris@atomice.net>
1033
1034 * autoload.cc (GetSystemTimes): Define new autoload function.
1035 * fhandler_proc.cc (proc_listing): Add cpuinfo and partitions entries.
1036 (fhandler_proc::fill_filebuf): Add PROC_CPUINFO and PROC_PARTITIONS
1037 cases.
1038 (format_proc_uptime): Use GetSystemTimes if available.
1039 (read_value): New macro.
1040 (print): New macro.
1041 (cpuid): New function.
1042 (can_set_flag): New function.
1043 (format_proc_cpuinfo): New function.
1044 (format_proc_partitions): New function.
1045
36c4a441
CF
10462003-03-09 Christopher Faylor <cgf@redhat.com>
1047
1048 * syscalls.cc (unlink): Attempt to be more clever about setting
1049 attributes of file. Only open file in query mode to avoid having to
1050 mess with security stuff for reading.
1051
639ebe29
CV
10522003-03-09 Corinna Vinschen <corinna@vinschen.de>
1053
1054 * rmsym: Fix regular expression.
1055
3a1d827f
CF
10562003-03-09 Christopher Faylor <cgf@redhat.com>
1057
1058 * Makefile.in: Change from using new-* to cygwin0 for temporary
1059 targets.
1060
ca0e9071
CV
10612003-03-09 Corinna Vinschen <corinna@vinschen.de>
1062
1063 * include/cygwin/socket.h: Set SOMAXCONN to Winsock2 value.
1064
ed269cea
CF
10652003-03-08 Christopher Faylor <cgf@redhat.com>
1066
1067 * syscalls.cc (unlink): Always attempt to use FILE_FLAG_CLOSE_ON_DELETE
1068 to delete files since this allows us to preserve the protection of hard
1069 linked files.
1070 (link): Generate full path for potentially recalculated .lnk target.
1071
1114c3d0
CF
10722003-03-08 Christopher Faylor <cgf@redhat.com>
1073
1074 Revert below changes regarding _pinfo::cmdline.
1075
d66ac2bc
CV
10762003-03-08 Corinna Vinschen <corinna@vinschen.de>
1077
1078 * external.cc (cygwin_internal): Change n to __off64_t to match change
1079 of _pinfo::cmdline.
1080 * fhandler.h (class fhandler_virtual): Change filesize member to
1081 __off64_t.
1082 * fhandler_proc.cc (format_proc_meminfo): Change to return __off64_t.
1083 (format_proc_stat): Ditto.
1084 (format_proc_uptime): Ditto.
1085 * fhandler_process.cc (format_process_stat): Ditto.
1086 (format_process_status): Ditto.
1087 (format_process_statm): Ditto.
1088 * pinfo.cc (_pinfo::cmdline): Expect __off64_t parameter.
1089 * pinfo.h (class _pinfo): Change declaration of cmdline accordingly.
1090
762520f3
CF
10912003-03-07 Christopher Faylor <cgf@redhat.com>
1092
1093 * path.h (PATH_LNK): New enum val.
1094 (path_conv::is_lnk_symlink): New function. True if path represents
1095 .lnk style symlink.
1096 * path.cc (check_shortcut): Set PATH_LNK in pflags when appropriate.
1097 (symlink_info::check): Ditto. Remove PATH_LNK from pflags initially.
1098 * syscalls.cc (unlink): Always remove readonly attribute from a symlink
1099 regardless of type.
1100 (link): (from Corinna Vinschen) Allow links to symlinks. Reset
1101 attributes on a symlink after successful link creation.
1102 (chmod): Use is_lnk_symlink where appropriate.
1103 (rename): Ditto.
1104
11052003-03-07 Pierre Humblet <pierre.humblet@ieee.org>
1106
1107 * tty.cc (create_tty_master): Call GetComputerName instead of
1108 cygwin_gethostname. Set ut_id.
1109 * syscalls.cc (login): Call endutent.
1110 (setutent): Do not seek after a fresh open.
1111
6f8102cb
CV
11122003-03-07 Corinna Vinschen <corinna@vinschen.de>
1113
1114 * syscalls.cc (seteuid32): Fix formatting.
1115
88243328
TP
11162003-03-04 Thomas Pfaff <tpfaff@gmx.net>
1117
1118 * thread.cc (MTinterface::fixup_after_fork): Initialize mainthread
1119 prior to pthread objects.
762520f3 1120
12390bc4
CV
11212003-03-04 Jason Tishler <jason@tishler.net>
1122
1123 * fhandler_socket.cc (fhandler_socket::dup): Initialize type.
1124
c418817e
CF
11252003-03-03 Christopher Faylor <cgf@redhat.com>
1126
1127 * fhandler.h (fhandler_tty_slave::close): Declare new function.
1128 (fhandler_tty_slave::dup): Declare new function.
1129 (fhandler_tty_slave::fixup_after_function): Declare new function.
1130 * fhandler_tty.cc (fhandler_tty_slave_open): Only increment
1131 fhandler_console::open_fhs when associated with a pty.
1132 (fhandler_tty_slave::close): Define new function. Decrement
1133 fhandler_console::open_fhs when associated with a pty.
1134 (fhandler_tty_slave::dup): Define new function. Increment
1135 fhandler_console::open_fhs when associated with a pty.
1136 (fhandler_tty_slave::fixup_after_fork): Define new function. Increment
1137 fhandler_console::open_fhs when associated with a pty.
1138
e11fe31b
CF
11392003-03-03 Christopher Faylor <cgf@redhat.com>
1140
1141 * fhandler_tty.cc (fhandler_pty_slave::open): Grudgingly increment
1142 fhandler_console::open_fhs here.
1143 (fhandler_pty_slave::close): Ditto for close.
1144
cffdb4b1
CF
11452003-03-02 Christopher Faylor <cgf@redhat.com>
1146
1147 * lib/getopt.c: Refresh from NetBSD sources.
1148
d5d2ffee
CF
11492003-03-02 Christopher Faylor <cgf@redhat.com>
1150
1151 * fhandler_console.cc (fhandler_console::close): Don't decrement
1152 in use counter if in vfork fixup stage.
1153
c2c6b170
CF
11542003-03-02 Christopher Faylor <cgf@redhat.com>
1155
1156 * lib/getopt.c: Nuke use of unneeded BSDisms.
1157
8b19b43d
CF
11582003-03-02 Christopher Faylor <cgf@redhat.com>
1159
1160 * dll_init.cc (dll_list::load_after_fork): Don't revert to LoadLibrary
1161 if LoadLibraryEx fails.
1162 * dtable.cc (dtable::dec_console_fds): Eliminate.
1163 (dtable::release): Don't treat console specially.
1164 (dtable::build_fhandler): Ditto.
1165 * dtable.h (console_fds): Eliminate.
1166 (dtable::dec_console_fds): Eliminate.
1167 (dtable::inc_console_fds): Eliminate.
1168 * fhandler.h (fhandler_console::open_fhs): New static element.
1169 * fhandler_console.cc (fhandler_console::open): Increment open_fs.
1170 (fhandler_console::close): Call FreeConsole if no more open consoles
1171 and ctty is not associated with the console.
1172 * syscalls.cc (setsid): Simplify check for when to call FreeConsole.
1173 (check_pty_fds): Eliminate definition.
1174 * winsup.h (check_pty_fds): Eliminate declaration.
1175
3efc65f7
CF
11762003-03-02 Christopher Faylor <cgf@redhat.com>
1177
1178 * dll_init.cc (dll_list::load_after_fork): Fix typo where result of
1179 LoadLibrary was ignored.
1180
5a082e9e
CV
11812003-03-01 Corinna Vinschen <corinna@vinschen.de>
1182
1183 * fhandler_socket.cc (fhandler_socket::bind): Open and write socket
1184 file using Win32 calls.
1185
9d913f07
CV
11862003-03-01 Corinna Vinschen <corinna@vinschen.de>
1187
1188 * fhandler_socket.cc (get_inet_addr): Open and read socket file using
1189 Win32 calls.
1190
005c3065
CF
11912003-02-28 Christopher Faylor <cgf@redhat.com>
1192
1193 * cygwin.din: Wrap atexit and exit with cygwin, thread-safe functions.
1194 * dcrt0.cc (cygwin_atexit): New function.
1195 (cygwin_exit): Ditto.
1196
27b4082a
PH
11972003-02-28 Pierre Humblet <pierre.humblet@ieee.org>
1198
1199 * syscalls.cc (fstat64): Pass get_name () to pc.
005c3065 1200 (access): Pass fn to stat_worker.
27b4082a
PH
1201
12022003-03-27 Corinna Vinschen <corinna@vinschen.de>
5777b970
CV
1203
1204 * fhandler_socket.cc (class sock_event): New class managing Winsock
1205 events for interruptible socket calls.
1206 (fhandler_socket::connect): Move support for interruptible call to
1207 class sock_event. Use class object instead.
1208 (fhandler_socket::accept): Ditto. Remove useless casts.
1209
005c3065 12102003-03-27 Thomas Pfaff <tpfaff@gmx.net>
5777b970
CV
1211
1212 * fhandler_socket.cc (fhandler_socket::connect): Add support for
1213 an interruptable connect.
1214
7b2ce663
CV
12152003-02-27 Pierre Humblet <pierre.humblet@ieee.org>
1216
1217 * uinfo.cc (internal_getlogin): Only update user.groups.pgsid
1218 if the call to set the primary group succeeds.
1219
0e7a60fe
CF
12202003-02-27 Christopher Faylor <cgf@redhat.com>
1221
1222 * cygthread::detach: Improve error message.
1223
61a52599
CV
12242003-02-26 Pierre Humblet <pierre.humblet@ieee.org>
1225
1226 * sec_helper.cc (get_sids_info): debug_print owner_sid and group_sid.
1227
6b9a9ce6
CV
12282003-02-25 Corinna Vinschen <corinna@vinschen.de>
1229
1230 * mmap.cc (mmap64): Fix returned address by taking the granularity
1231 into account.
1232
1ffc44aa
PH
12332003-02-23 Pierre Humblet <pierre.humblet@ieee.org>
1234
1235 * syslog.cc (syslog): Do not unlock the file before closing it
1236 and remove debug_printf about stream errors.
1237
a066f364
CF
12382003-02-22 Christopher Faylor <cgf@redhat.com>
1239
1240 * cygmalloc.h: Remove MORECORE_CANNOT_TRIM. It's not true.
1241 # cygwin.din: Export mallinfo.
1242 # malloc_wrapper.cc (mallinfo): New function.
1243
878e60c5
CF
12442003-02-22 Pierre Humblet <pierre.humblet@ieee.org>
1245
1246 * syslog.cc (syslog): Do not print the Windows pid. Print the Cygwin
1247 pid as an unsigned decimal. On Win95 print a timestamp and attempt to
1248 lock the file up to four times in 3 ms.
1249
b1d1e50d
CV
12502003-02-21 Corinna Vinschen <corinna@vinschen.de>
1251
1252 * fhandler_socket.cc (fhandler_socket::fhandler_socket): Fix compiler
1253 warning.
1254 (fhandler_socket::fstat): Simplify. Set st_uid/st_gid to effective
1255 uid/gid of current process in case of open sockets.
1256
cf762b08
CV
12572003-02-21 Corinna Vinschen <corinna@vinschen.de>
1258
1259 * dtable.cc (dtable::build_fhandler_from_name): Set some fhandler
1260 data on sockets to evaluate AF_LOCAL sockets correctly.
1261 (dtable::build_fhandler): Set unit number on sockets.
1262 * fhandler.h (fhandler_socket): Add unit number.
1263 (fhandler_socket::get_unit): New method.
1264 * fhandler_socket.cc (fhandler_socket::fhandler_socket): Set unit
1265 number.
1266 (fhandler_socket::fstat): Reorganize to return more Linux-like
1267 values.
1268 * net.cc: include ctype.h.
1269 (fdsock): Set unit number when building fhandler.
1270 * path.cc (path_conv::check): Set device type to FH_SOCKET if file
1271 is a AF_UNIX socket.
1272 (get_devn): Evaluate unit for virtual socket devices.
1273 (win32_device_name): Set windows path for sockets to unix_path with
1274 just backslashes to keep the different names.
1275 * syscalls.cc (fstat64): Don't override st_ino, st_dev and st_rdev
1276 for sockets.
1277 (stat_worker): Ditto.
1278
12792003-02-21 Pierre Humblet <pierre.humblet@ieee.org>
1280
1281 * autoload.cc (AccessCheck): Add.
1282 (DuplicateToken): Add.
1283 * security.h (check_file_access): Declare.
1284 * syscalls.cc (access): Convert path to Windows, check existence
1285 and readonly attribute. Call check_file_access instead of acl_access.
1286 * security.cc (check_file_access): Create.
1287 * sec_acl (acl_access): Delete.
1288
5cd82412
CF
12892003-02-19 Christopher Faylor <cgf@redhat.com>
1290
1291 * fhandler.cc (fhandler_base::open): Move some filesystem specific
1292 stuff.
1293 (fhandler_disk_file::open): Accept some filesystem specific stuff.
1294 * sigproc.cc (wait_for_sigthread): Become slightly more thread safe.
1295 (sig_send): Don't assume that signal thread is ready.
1296
892d8962
CV
12972003-02-20 Corinna Vinschen <corinna@vinschen.de>
1298
1299 * wincap.h (wincap): Remove unnecessary definition of
1300 supports_sparse_files.
1301 * wincap.cc: Ditto.
1302
518f5d49
CV
13032003-02-20 Corinna Vinschen <corinna@vinschen.de>
1304
1305 * fhandler_disk_file.cc (fhandler_disk_file::opendir): Check descriptor
1306 created by cygheap_fdnew constructor.
1307 * fhandler_virtual.cc (fhandler_virtual::opendir): Ditto.
1308 * fhandler_socket.cc (fhandler_socket::accept): Ditto and move
1309 creation of file descriptor behind blocking OS call.
1310 * net.cc (cygwin_socket): Ditto.
1311 (cygwin_rcmd): Ditto.
1312 (cygwin_rresvport): Ditto.
1313 (cygwin_rexec): Ditto.
1314 (socketpair): Ditto.
1315
3a88cf1b
CV
13162003-02-20 Corinna Vinschen <corinna@vinschen.de>
1317
1318 * autoload.cc (GetCompressedFileSize): Add.
1319 * fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): Compute
1320 st_blocks value from GetCompressedFileSize() if available.
1321
79207923
CV
13222003-02-18 Vaclav Haisman <V.Haisman@sh.cvut.cz>
1323
1324 * wincap.h (wincaps::supports_sparse_files): New flag.
1325 (wincapc::supports_sparse_files): New method.
1326 * wincap.cc (wincap_unknown): Define value for the new flag.
1327 (wincap_95): Ditto.
1328 (wincap_95osr2): Ditto.
1329 (wincap_98): Ditto.
1330 (wincap_98se): Ditto.
1331 (wincap_me): Ditto.
1332 (wincap_nt3): Ditto.
1333 (wincap_nt4): Ditto.
1334 (wincap_nt4sp4): Ditto.
1335 (wincap_2000): Ditto.
1336 (wincap_xp): Ditto.
1337 * path.h (path_conv::fs_flags): New method.
005c3065
CF
1338 * fhandler_disk_file.cc: Include winioctl.h for DeviceIoControl.
1339 (fhandler_disk_file::open): Set newly created and truncated files as
79207923
CV
1340 sparse on platforms that support it.
1341
afe13e84
CV
13422003-02-17 Pierre Humblet <pierre.humblet@ieee.org>
1343
1344 * grp.cc (internal_getgroups): Handle properly tokens with
1345 no groups. Fix bug introduced on 2003-02-04.
1346
8fc16812
CF
13472003-02-16 Christopher Faylor <cgf@redhat.com>
1348
408e9b2f 1349 * cygwin.din: Export all appropriate newlib libm functions. Sort.
8fc16812
CF
1350 * include/cygwin/version.h: Bump API minor number.
1351
f655eadf
CF
13522003-02-15 Christopher Faylor <cgf@redhat.com>
1353
8fc16812 1354 * cygwin.din: Export all appropriate newlib libc functions.
f655eadf
CF
1355 * include/cygwin/version.h: Bump API minor number.
1356
4d9ba012
CV
13572003-02-14 Jason Tishler <jason@tishler.net>
1358
1359 * mmap.cc (mprotect): Add missing break.
1360
dff01e3a
CF
13612003-02-13 Christopher Faylor <cgf@redhat.com>
1362
1363 * exceptions.cc (try_to_debug): Don't reset priority when returning
1364 from non-waitloop call.
d1d1797e
CF
1365
13662003-02-13 Vaclav Haisman <V.Haisman@sh.cvut.cz>
005c3065 1367 Christopher Faylor <cgf@redhat.com>
d1d1797e
CF
1368
1369 * fhandler_console.cc (fhandler_console::write_normal): Use MessageBeep
1370 for bell sound.
1371 * autoload.cc (MessageBeep): Add.
1372
97c61aeb
CF
13732003-02-13 Christopher Faylor <cgf@redhat.com>
1374
1375 * include/cygwin/types.h: Use correct ifdef guard for u_ definitions.
1376
a200c081
CF
13772003-02-13 Christopher Faylor <cgf@redhat.com>
1378
1379 * environ.cc (environ_init): Use strechr.
1380
2858de3a
CF
13812003-02-13 Christopher Faylor <cgf@redhat.com>
1382
1383 * include/cygwin/in.h (sockaddr_in): Fix typo.
1384
75c8a70c
CF
13852003-02-12 Christopher Faylor <cgf@redhat.com>
1386
1387 * path.h (path_conv): Reorganize slightly.
1388
939d19b0
CF
13892003-02-12 Christopher Faylor <cgf@redhat.com>
1390
1391 * fhandler_tty.cc (process_input): Add sanity check to ensure that
1392 console typeahead is cleared on signal.
1393
7a44ba05
CF
13942003-02-12 Christopher Faylor <cgf@redhat.com>
1395
1396 * spawn.cc (linebuf::~linebuf): Resurrect commented out (for
1397 debugging?) code.
1398
407b8df6
CF
13992003-02-10 Ralf Habacker <ralf.habacker@freenet.de>
1400
1401 * include/cygwin/in.h (in_attr_t): Define new type.
1402 * include/arpa/inet.h (inet_addr): Change return type to in_addr_t.
1403 (inet_lnaof): Ditto.
1404 (inet_netof): Ditto.
1405 (inet_network): Ditto.
1406
14072003-02-10 Christopher Faylor <cgf@redhat.com>
1408
1409 * include/cygwin/types.h: Move many *_t typedefs here. Protect them
1410 with ifdefs.
1411 * fhandler_disk_file.cc (fhandler_disk_file::fstat): Change ntsec_atts to mode_t.
1412 * security.cc (get_attribute_from_acl): Accept mode_t attribute.
1413 (get_nt_attribute): Ditto.
1414 (get_file_attribute): Ditto.
1415 (get_nt_object_attribute): Ditto.
1416 (get_object_attribute): Ditto.
1417 * security.h: Reflect above changes.
1418 * syscalls.cc (chown_worker): Change attrib to mode_t.
1419
ad80bc42
CF
14202003-02-08 Christopher Faylor <cgf@redhat.com>
1421
67c64e3b 1422 * include/cygwin/version.h: Bump DLL minor number to 21.
ad80bc42
CF
1423
14242003-02-07 Christopher Faylor <cgf@redhat.com>
1425
1426 * malloc.cc (DEFAULT_MMAP_THRESHOLD): Bump down to 16MB thanks to below
1427 changes.
1428
4136fdb1
CV
14292003-02-07 Corinna Vinschen <corinna@vinschen.de>
1430
1431 * mmap.cc (mmap_record::alloc_map): De-inline. Add offset and length
1432 parameter. Only protect pages actually unused currently. Do job
1433 of map_map() when initializing a map.
1434 (mmap_record::map_map): Reduce functionality for the reuse case
1435 of private anonymous mapping.
1436 (mmap_record::fixup_map): Format change.
1437 (list::add_record): Add offset and length parameter to call
1438 mmap_record::alloc_map() correctly.
1439 (mmap64): Rename `l' variable to `map_list'. Accomodate above changes.
1440 (munmap): Rename `l' variable to `map_list'.
1441 (msync): Ditto.
1442 (fhandler_disk_file::mmap): Streamline code.
1443 (mprotect): Ditto.
1444 (fixup_mmaps_after_fork): Rename `l' variable to `map_list'.
1445
49b84ce4
CF
14462003-02-07 Vaclav Haisman <V.Haisman@sh.cvut.cz>
1447 Christopher Faylor <cgf@redhat.com>
1448
1449 * exceptions.cc (try_to_debug): Set priority of current thread rather
1450 than the main thread. Make busy waiting loop less busy. Restore
1451 priority when function returns.
1452
bc5b63ed
CF
14532003-02-07 Christopher Faylor <cgf@redhat.com>
1454
1455 * malloc.cc (DEFAULT_MMAP_THRESHOLD): Set high to avoid mmaps.
1456
14572003-02-07 Christopher Faylor <cgf@redhat.com>
1458
1459 * pipe.cc (fhandler_pipe::close): Avoid extraneous this->.
1460
1de8d164
CF
14612003-02-06 Christopher Faylor <cgf@redhat.com>
1462
1463 * heap.cc (heap_init): Remove debugging code.
1464
565e8015
CV
14652003-02-06 Pierre Humblet <pierre.humblet@ieee.org>
1466
1467 * security.h: Introduce names UNKNOWN_UID and UNKNOWN_GID and delete
1de8d164 1468 declaration of is_grp_member.
565e8015
CV
1469 * uinfo.cc (internal_getlogin): Use UNKNOWN_GID.
1470 * passwd.cc (pwdgrp::read_passwd): Use UNKNOWN_UID.
1471 * grp.cc (pwdgrp::read_group): Change group name to provide better
1472 feedback.
1473 (getgrgid): Use gid16togid32.
1474 * sec_helper.cc (is_grp_member): Delete.
1475
d238c1b4
CF
14762003-02-05 Christopher Faylor <cgf@redhat.com>
1477
1478 * path.cc: Change 'to_posix_p' to 'to_posix' throughout.
1479 (conv_path_list_buf_size): Accommodate relative paths.
1480
b7f52fe8
CF
14812003-02-05 Christopher Faylor <cgf@redhat.com>
1482
1483 * path.cc (etc::dir_changed): Fix debug printf.
1484
62cd433e
CV
14852003-02-05 Corinna Vinschen <corinna@vinschen.de>
1486
1487 * sec_acl.cc (setacl): Move all permission settings to beginning of
1488 loop. Set default rights to same values as in alloc_sd(). Set DELETE
1489 for owner and default owner only if S_IWOTH is given.
1490
14912003-02-05 Pierre Humblet <pierre.humblet@ieee.org>
1492
1493 * sec_acl.cc: Change all __aclent16_t to __aclent32_t except in
1494 wrapper function definitions. Replace call to the aclXYZ functions by
1495 calls aclXYZ32.
1496 (searchace): Change type of third argument to __uid32_t and use
1497 ILLEGAL_UID instead of -1;
1498 (setacl): Remove some initializations. Only give STANDARD_RIGHTS_WRITE
1499 for S_IWOTH. Replace -1 by ILLEGAL_UID.
1500 (getacl): Change type of owner_sid, group_sid and ace_sid to cygpsid.
1501 In last else clause, suppress second call to ace_sid.get_id and use
1502 TRUE in first call. Replace EqualSid by ==.
1503 (acl_access): Call internal_getgroups in USER and GROUP cases.
1504 (acecmp: Define static.
1505 (acl32): Create from 16 bit type.
1506 (facl32): Ditto.
1507 (lacl32): Ditto.
1508 (aclcheck32): Ditto.
1509 (aclsort32): Ditto.
1510 (acltomode32): Ditto.
1511 (aclfrommode32): Ditto.
1512 (acltopbits32): Ditto.
1513 (aclfrompbits32): Ditto.
1514 (acltotext32): Ditto.
1515 (aclfromtext32): Ditto, and use strechr.
1516 (acl16to32): Create.
1517 (acl): Make it a wrapper function.
1518 (facl): Ditto.
1519 (lacl): Ditto.
1520 (aclcheck): Ditto.
1521 (aclsort): Ditto.
1522 (acltomode): Ditto.
1523 (aclfrommode): Ditto.
1524 (acltopbits): Ditto.
1525 (aclfrompbits): Ditto.
1526 (acltotext): Ditto.
1527 (aclfromtext): Ditto.
1528 * security.cc (write_sd): Call set_process_privilege and check
1529 ownership.
1530 (alloc_sd): Remove call to set_process_privilege and the owner check.
1531
cadd065b
CF
15322003-02-05 Christopher Faylor <cgf@redhat.com>
1533
1534 * include/sys/cygwin.h: Use C-style comments.
1535
0c8455c3
CV
15362003-02-05 Pierre Humblet <pierre.humblet@ieee.org>
1537
1538 * sec_helper.cc (get_sids_info): New function.
1539 * security.cc (extract_nt_dom_user): Simplify with strechr.
1540 (get_user_groups): Initialize glen to MAX_SID_LEN.
1541 (get_user_local_groups): Ditto.
1542 (get_attribute_from_acl): Define ace_sid as cygpsid.
1543 (get_nt_attribute): Define owner_sid and group_sid as cygpsid.
1544 Call get_sids_info instead of cygsid.get_{u,g}id and is_grp_member.
1545 (get_nt_object_attribute): Ditto.
1546 (alloc_sd): Define ace_sid as cygpsid.
1547
5ae9331a
TP
15482003-02-04 Thomas Pfaff <tpfaff@gmx.net>
1549
1550 * syscalls.cc (struct system_cleanup_args): New struct.
1551 (system_cleanup): New function.
1552 (system): Use pthread_cleanup_push and _pop to save and restore
1553 signal handlers and sigprocmask.
1554
3dbafd87
CV
15552003-02-04 Corinna Vinschen <corinna@vinschen.de>
1556
1557 * path.cc (symlink): Create security attributes so that only the
1558 user can modify the symlink.
1559 * security.cc (set_security_attribute): Remove symlink special
1560 handling.
1561
0daf2561
CV
15622003-02-04 Pierre Humblet <pierre.humblet@ieee.org>
1563
1564 * grp.cc (internal_getgroups): Do not return without closing
1565 the process handle.
1566
4a21c2d5
CV
15672003-02-04 Pierre Humblet <pierre.humblet@ieee.org>
1568
1569 * security.h (class cygpsid): New class.
1570 (class cygsid): Use cygpsid as base. Remove members psid, get_id,
1571 get_uid, get_gid, string, debug_printf and the == and != operators.
1572 (cygsidlist::clear_supp): Only do work if setgroups has been called.
1573 * sec_helper.cc: Define sid_auth NO_COPY.
1574 (cygpsid::operator==): New operator.
1575 (cygpsid::get_id): New function.
1576 (cygpsid::string): New function.
1577 (cygsid::string): Delete.
1578 (cygsid::get_id): Delete.
1579 * pwdgrp.h: Change arguments of internal_getpwsid,
1580 internal_getgrsid and internal_getgroups to cygpsid.
1581 * passwd.cc (internal_getpwsid): Change argument from cygsid to cygpsid.
d238c1b4 1582 * grp.cc (internal_getgrsid): Ditto.
4a21c2d5
CV
1583 (internal_getgroups): Ditto.
1584
335556d5
CF
15852003-02-03 Christopher Faylor <cgf@redhat.com>
1586
1587 Eliminate most unneeded this-> pointers throughout.
1588
153e83c6
CV
15892003-02-03 Pierre Humblet <pierre.humblet@ieee.org>
1590
1591 * security.h: Add third argument to set_process_privilege.
1592 * autoload.cc: Add OpenThreadToken.
1593 * sec_helper.cc (set_process_privilege): Add and use use_thread
1594 argument.
1595 * security.cc (alloc_sd): Modify call to set_process_privilege.
1596 Remember the result in each process. If failed and file owner is not
1597 the user, fail.
1598
f0f3ea68
CV
15992003-02-03 Corinna Vinschen <corinna@vinschen.de>
1600
1601 * fhandler_socket.cc (fhandler_socket::recvfrom): Return buffer
1602 length and don't set errno in case of WSAEMSGSIZE error.
1603 (fhandler_socket::recvmsg): Ditto.
1604
6688a061
CF
16052003-02-01 Christopher Faylor <cgf@redhat.com>
1606
1607 * grp.cc (getgrent32): Only refresh group entries when at beginning.
1608 (internal_getgrsid): Only refresh if uninitialized.
1609 (internal_getgrent): Ditto.
1610 * passwd.cc (getpwent): Only refresh passwd entries when at beginning.
1611 (pwdgrp::read_passwd): linebuf *cannot* be NO_COPY.
1612 (internal_getpwsid): Only refresh if uninitialized.
1613 (getpass): No need to refresh passwd data here.
1614 * pwdgrp.h (refresh): Eliminate default.
1615
a5a93a62
CF
16162003-01-31 Christopher Faylor <cgf@redhat.com>
1617
1618 * dlfcn.cc (dlerror): Only report load errors once per error.
1619
b0a82a85
CF
16202003-01-31 Christopher Faylor <cgf@redhat.com>
1621
1622 * fhandler_serial.cc (fhandler_serial::open): Avoid extraneous setting
1623 of res.
1624
1625 * termios.cc (tcsetattr): Correctly record errno after tcsetattr call.
1626
16272003-01-31 Troy Curtiss <troyc@usa.net>
1628
1629 * fhandler_serial.cc (fhandler_serial::tcsetattr): Add error-checking
1630 so that if any Win32 SetComm*() calls fail, errno gets set to EINVAL
1631 and tcsetattr() returns -1. Catch invalid bitrates, mostly. If baud
1632 rate setting is B0, just drop DTR and leave Win32 DCB bitrate as-is
1633 since 0 is not a valid Win32 setting.
1634 (fhandler_serial::tcgetattr): If DTR is low, populate the bitrate as
1635 B0, otherwise get it from the DCB.
1636
949c3da1
CF
16372003-01-31 Christopher Faylor <cgf@redhat.com>
1638
1639 * passwd.cc (pwdgrp::read_passwd): linebuf *must* be static (from
1640 Pierre Humblet).
1641 * pwdgrp.h (pwdgrp::refresh): Avoid calling read function if we already
1642 have lock since that means we are in the process of reading the file.
1643
485d85bf
CF
16442003-01-31 Jason Tishler <jason@tishler.net>
1645
1646 * shared.cc (shared_info::heap_chunk_size): Use correct variable when
1647 reading HKLM.
1648
704ce461
CF
16492003-01-30 Christopher Faylor <cgf@redhat.com>
1650
1651 * fhandler_registry.cc (fhandler_registry::exists): Fix off-by-one
1652 error when inspecting path.
1653
ba6e1083
CF
16542003-01-29 Christopher Faylor <cgf@redhat.com>
1655
1656 * lib/getopt.c: Allow environment variable control of POSIXLY_INCORRECT
1657 behavior.
1658
16592003-01-28 Corinna Vinschen <corinna@vinschen.de>
01e3c897
CV
1660
1661 * fhandler_socket.cc (fhandler_socket::accept): On successful execution
1662 set connection state of returned socket to CONNECTED.
1663
dfb366da
CF
16642003-01-27 Christopher Faylor <cgf@redhat.com>
1665
1666 * passwd.cc (pwdgrp::parse_passwd): Be more unforgiving about
1667 non-numeric fields.
1668
03dba1de
CF
16692003-01-26 Christopher Faylor <cgf@redhat.com>
1670
1671 * uinfo.cc (pwdgrp::next_num): Remove check for NULL since it is no
1672 longer a valid return from next_str.
1673 (pwdgrp::add_line): Duh. Revert to use strchr.
1674
fea48988
CF
16752003-01-26 Christopher Faylor <cgf@redhat.com>
1676
ca6018a0 1677 * string.h (strechr): New function.
fea48988
CF
1678 * uinfo.cc (pwdgrp::next_str): Search only for input char in string.
1679 Return EOS on failure. Don't check for NULL since it shouldn't be
1680 possible.
1681 (pwdgrp::add_line): Revert to replacing '\n' in input line with '\0'.
1682 (pwdgrp::next_num): Pass explicit separator character to next_str.
1683 * grp.cc (pwdgrp::parse_group): Ditto.
1684 * passwd.cc (pwdgrp::parse_passwd): Ditto. Revamp test for garbage
1685 input.
1686 * pwdgrp.h (pwdgrp::next_str): Don't use default parameter.
1687
9a751621
CF
16882003-01-26 Christopher Faylor <cgf@redhat.com>
1689
1690 * uinfo.cc (pwdgrp::load): Regularize strace output. Add warning for
1691 CreateFile failure.
1692
c9133395
CF
16932003-01-26 Christopher Faylor <cgf@redhat.com>
1694
bdbd7fb6
CF
1695 * passwd.cc (pwdgrp::parse_passwd): Eliminate use of memset. The
1696 structure should always be completely filled out.
1697 * grp.cc (pwdgrp::parse_group): Ditto.
1698
16992003-01-26 Christopher Faylor <cgf@redhat.com>
1700
1701 * grp.cc (pwdgrp::parse_group): Fix off-by-one problem in allocating
c9133395 1702 gr_mem.
65037056
CF
1703
17042003-01-26 Christopher Faylor <cgf@redhat.com>
1705
1706 * include/sys/strace.h (paranoid_printf): Define as not being part of
1707 "all" output.
1708
17092003-01-25 Christopher Faylor <cgf@redhat.com>
1710
1711 * pwdgrp.h (pwdgrp::next_num): Rename from next_int. Returns
1712 true/false if parse operation succeeded.
1713 (pwdgrp::reparse): Remove.
1714 (pwdgrp::raw_ptr): New function. Returns pointer in line.
1715 (pwdgrp::next_num): New functions for parsing other than unsigned long.
1716 * grp.cc (pwdgrp::parse_group): Reinstate previous parsing behavior.
1717 Don't fill in fields with NULL and assign empty gr_mem to known pointer
1718 rather than doing a pointless calloc. Streamline gr_mem parsing.
1719 Don't increment curr_lines here.
1720 * passwd.cc (pwdgrp::parse_passwd): Use new behavior of next_num.
1721 Don't increment curr_lines here.
1722 * uinfo.cc (pwdgrp::next_str): Keep returning EOL if out of data.
1723 (pwdgrp::reparse): Remove.
1724 (pwdgrp::next_num): Rename from next_int. Return bool indicating
1725 success of parse, argument returns value parsed.
1726 (pwdgrp::add_line): Increment curr_lines here on successful parse.
1727 (pwdgrp::load): (from Pierre Humblet) Don't return status. Just report
1728 it here.
1729
a53ddfe6
CF
17302003-01-25 Christopher Faylor <cgf@redhat.com>
1731
1732 * pwdgrp.cc (pwdgrp::reparse): Declare.
1733 * uinfo.cc (pwdgrp::reparse): Define.
c9b99d0d 1734 * grp.cc (pwdgrp::parse_group): Use reparse.
a53ddfe6 1735
4f7e12dd
CV
17362003-01-25 Pierre Humblet <pierre.humblet@ieee.org>
1737
1738 * syscalls.cc (seteuid32): On Win95 get the pw entry. If it exists
1739 update the euid and call cygheap->user.set_name. Remove special
1740 handling of ILLEGAL_UID.
ba6e1083 1741 (setgid32): Add a debug_printf. On Win95, always set the egid.
4f7e12dd
CV
1742 Remove special handling of ILLEGAL_GID. Do not compare gid and gr_gid.
1743 * child_info.h (class cygheap_exec_info): Remove uid.
1744 * spawn.cc (spawn_guts): Do not set ciresrv.moreinfo->uid.
1745 * dcrto.cc (dll_crt0_1): Always call uinfo_init.
1746 * uinfo.cc (uinfo_init): Reorganize and close handle if needed.
1747 (cygheap_user::ontherange): Do not call internal_getpwnam if pw is NULL.
1748
45dbfc26
CF
17492003-01-24 Christopher Faylor <cgf@redhat.com>
1750
1751 * fhandler_console.cc (fhandler_console::send_winch_maybe): Reset
1752 scroll region if size changes.
1753
7d33eefa
CV
17542003-01-24 Pierre Humblet <pierre.humblet@ieee.org>
1755 Jason Tishler <jason@tishler.net>
1756
1757 * cygwin.din: Export setreuid32, setreuid, setregid32, setregid.
1758 * syscalls.cc (setreuid32): New function.
1759 (setreuid): Ditto.
1760 (setregid32): Ditto.
1761 (setregid): Ditto.
1762 * include/cygwin/version.h: Bump API minor number.
1763
ac413374 17642003-01-23 Christopher Faylor <cgf@redhat.com>
69fae986 1765
ac413374 1766 * pwdrp.h (pwdgrp::refresh): Lock entire test prior to reading.
2037688a 1767
ac413374 17682003-01-23 Christopher Faylor <cgf@redhat.com>
09a88426
CF
1769
1770 * grp.cc (pwdgrp::parse_group): Eliminate arg and use class member
1771 instead. Use next_str and next_int to parse arguments.
1772 * passwd.cc (pwdgrp::parse_passwd): Ditto.
1773 (grab_string): Eliminate.
1774 (grab_int): Ditto.
1775 * pwdgrp.h (pwdgrp::parse): Eliminate input arg.
1776 (pwdgrp::parse_passwd): Reflect above change.
1777 (pwdgrp::parse_group): Reflect above change.
1778 (pwdgrp::next_str): New function.
1779 (pwdgrp::next_int): Ditto.
1780 (pwdgrp::gets): Eliminate.
1781 * uinfo.cc (pwdgrp::next_str): New function.
1782 (pwdgrp::next_int): Ditto.
1783 (pwdgrp::add_line): Subsume gets.
1784 (pwdgrp::gets): Eliminate.
1785 (pwdgrp::load): Just call add_line to parse input buffer.
1786
ac413374
CF
17872003-01-22 Thomas Pfaff <tpfaff@gmx.net>
1788
1789 * include/pthread.h (PTHREAD_MUTEX_RECURSIVE): Revert changes from
1790 2003-01-09 mutex patch.
1791 (PTHREAD_MUTEX_ERRORCHECK): Ditto.
1792
17932003-01-22 Corinna Vinschen <corinna@vinschen.de>
1794
1795 * cygrun.c: Move from here to ../testsuite.
1796 * Makefile.in: Remove cygrun.exe dependencies.
1797
17982003-01-21 Jason Tishler <jason@tishler.net>
1799
1800 * cygwin.din: Export nanosleep().
1801 * signal.cc (nanosleep): New function.
1802 (sleep): Move old functionality to nanosleep(). Call nanosleep().
1803 (usleep): Remove old functionality. Call nanosleep().
1804 * include/cygwin/version.h: Bump API minor number.
1805
57394495
CF
18062003-01-21 Christopher Faylor <cgf@redhat.com>
1807
1808 * grp.cc: Call gr.refresh() rather than doing isunitialized tests
1809 throughout.
1810 (gr): Use constructor (sigh).
1811 (pwdgrp::parse_group): Rename from parse_grp.
1812 (pwdgrp::read_group): Rename from read_etc_group. Just call gr.load
1813 with a single argument.
1814 * passwd.cc: Call pr.refresh() rather than doing isunitialized tests
1815 throughout.
1816 (pr): Use constructor (sigh).
1817 (pwdgrp::parse_passwd): Rename from "parse_pwd".
1818 (pwdgrp::read_passwd): Rename from read_etc_passwd. Just call pr.load
1819 with a single argument.
1820 * pwdgrp.h (pwdgrp_state): Eliminate.
1821 (pwdgrp): Reflect above renamings.
1822 (pwdgrp::etc_ix): Rename from pwd_ix.
1823 (pwdgrp::read): New element.
1824 (pwdgrp::lock): New element.
1825 (pwdgrp::refresh): New function.
1826 (pwdgrp::load): Eliminate variations which take buffer arguments.
1827 (pwdgrp::pwdgrp): New constructors. Initialize mutex here.
1828 * uinfo.cc (pwdgrp::load): Accommodate pwd_ix -> etc_ix renaming.
1829 (pwdgrp::load): Set initialized state to true rather than setting state
1830 to loaded.
1831
984864e9
CF
18322003-01-21 Christopher Faylor <cgf@redhat.com>
1833
89f7e8d1 1834 * include/cygwin/version.h: Bump DLL minor number.
984864e9 1835
d8cde3a3
CF
18362003-01-21 Pierre Humblet <pierre.humblet@ieee.org>
1837
1838 * path.h (etc::change_possible): Revert the type to bool.
1839 (etc::set_last_modified): Remove obsolete function.
1840 * path.cc (etc::change_possible): Revert type to bool.
1841 (etc::test_file_change): Do not test for negative values of
1842 change_possible and do not set it to -res.
1843 (etc::dir_changed): When the handle is NULL, call memset instead of
09a88426
CF
1844 test_file_changed. When the handle is invalid, return true. Detect
1845 filename change in /etc.
d8cde3a3 1846 (etc::file_changed): Remove unneeded check for !fn[n].
33de631b 1847 * uinfo.cc (pwdgrp::load): Eliminate spurious setting of fh to NULL.
b99b804b 1848 * pwdgrp.h (pwdgrp::operator =): Eliminate.
d8cde3a3 1849
7905c4f1
CF
18502003-01-19 Christopher Faylor <cgf@redhat.com>
1851
1852 * pwdgrp.h (etc): Move to path.h.
1853 (pwdgrp::max_lines): New field.
1854 (pwdgrp::curr_lines): New field.
1855 (pwdgrp::pwdgrp_buf): Ditto.
1856 (pwdgrp_buf_elem_size): Ditto.
1857 (pwdgrp_parse): Ditto.
1858 (pwdgrp::gets): Just declare here.
1859 (pwdgrp::load): Ditto. Just take one argument.
1860 (pwdgrp::load): Define overloaded function accepting passwd buf.
1861 (pwdgrp::load): Define overloaded function accepting group buf.
1862 * grp.cc: Use pwdgrp elements rather than standalone static variables
1863 throughout.
1864 (curr_lines): Eliminate.
1865 (max_lines): Ditto.
1866 (add_grp_line): Ditto.
1867 (parse_grp): Define as returning boolean. Accept void * arg and line
1868 count. Coerce first argument into __group32 buf reference. Increment
1869 curr_line as appropriate.
1870 (read_etc_group): Pass pwdgrp buffer to gr.load.
1871 * passwd.cc: Use pwdgrp elements rather than standalone static variables
1872 throughout.
1873 (curr_lines): Eliminate.
1874 (max_lines): Ditto.
1875 (add_grp_line): Ditto.
1876 (parse_passwd): Define as returning boolean. Accept void * arg and line
1877 count. Coerce first argument into passwd buf reference. Increment
1878 curr_line as appropriate.
1879 (read_etc_group): Pass pwdgrp buffer to pr.load.
1880 * path.cc (etc::fn): Extend buffer size to allow index by 1 rather than
1881 zero.
1882 (etc::last_modified): Ditto.
1883 (etc::change_possible): Ditto. Renamed from sawchange. Change to
1884 signed char since elements are now tri-state.
1885 (etc::init): Assume "handle" is 1 based rather than 0.
1886 (etc::test_file_change): New function. Sets change_possible based on
1887 file date comparison.
1888 (etc::dir_changed): Check file states immediately after changed_h is
1889 initialized to avoid a race.
1890 (etc::file_changed): Use test_file_change to detect if file needs to be
1891 updated.
1892 * path.h (etc): Move class here from pwdgrp.h.
7905c4f1
CF
1893 * uinfo.cc: Move etc:: functions to path.cc. Move pwdgrp functions
1894 here.
1895 (pwdgrp::gets): Eliminate buf checks. Just check eptr and set lptr.
1896 (pwdgrp::add_line): New function.
1897 (pwdgrp::load): Call generic add_line function which will call correct
1898 parser.
1899
4c6a3e50
CF
19002003-01-17 Christopher Faylor <cgf@redhat.com>
1901
1902 * cygheap.cc: Change most 'int's to 'unsigned's.
1903 (_cmalloc): Only check for size of malloced region when calculating
97d2bc79 1904 bucket. Add overhead when performing the sbrk. Previous change broke
4c6a3e50
CF
1905 _crealloc.
1906
e9152439
CF
19072003-01-17 Christopher Faylor <cgf@redhat.com>
1908
1909 * dcrt0.cc (initialize_env): Use colon for CYGWIN_DEBUG separator.
1910 * grp.cc: Change most statics to NO_COPY throughout.
1911 * passwd.cc: Ditto.
1912
19132003-01-17 Christopher Faylor <cgf@redhat.com>
1914
1915 * pwdgrp.h: Change some BOOLs to bools.
1916 (pwdgrp::pwdgrp): Remove unneeded constructor.
1917 * passwd.cc: Change BOOL to bool throughout.
1918
afa378e7
CV
19192003-01-17 Corinna Vinschen <corinna@vinschen.de>
1920
1921 * cygwin.din: Add strerror_r.
1922 * include/cygwin/version.h: Bump API minor number.
1923
1de6f431
CF
19242003-01-17 Christopher Faylor <cgf@redhat.com>
1925
1926 * uinfo.cc (etc::dir_changed): Don't print a warning if can't open
1927 /etc, unless debugging.
1928
d8cde3a3 19292003-01-17 Pierre Humblet <pierre.humblet@ieee.org>
14ea5029
CF
1930
1931 * grp.cc (read_etc_group): On NT, add a line for gid = -1. Change name
1932 "unknown" to "mkgroup".
1933 (internal_getgrgid): Do not return default in nontsec case.
1934 (internal_getgroups): Add argument srchsid and look for it in groups if
1935 not NULL.
1936 * passwd.cc (read_etc_passwd): On NT, add a line for uid = -1. Use
1937 same default uid for Win95 and NT. Call cygheap_user::ontherange to
1938 initialize HOME.
1939
14ea5029
CF
19402003-01-16 Christopher Faylor <cgf@redhat.com>
1941
1942 * cygheap.cc (init_cygheap::etc_changed): Move to uinfo.cc.
1943 * cygheap.h (init_cygheap::etc_changed_h): Remove.
1944 (init_cygheap::etc_changed): Ditto.
1945 * grp.cc (group_state): Remove. Use gr instead throughout.
1946 (gr): Define as class pwdgrp.
1947 (read_etc_group): Remove gr definition. Remove calls to
1948 set_last_modified and close. Pass add_grp to gr.load to load file.
1949 * passwd.cc (passwd_state): Remove. Use pr instead, throughout.
1950 (pr): Define as class pwdgrp.
1951 (read_etc_passwd): Remove pr definition. Remove calls to
1952 set_last_modified and close. Pass add_pwd_line to pr.load to load
1953 file.
1954 * pwdgrp.h (etc): New helper class for pwdgrp.
1955 (pwdgrp): Combine pwdgrp_check and pwdgrp_read into one class. Remove
1956 file_w32 and last_modified fields.
1957 (pwdgrp::set_last_modified): Remove.
1958 (pwdgrp::isinitializing): Remove FindFirstFile stuff. Move to
1959 etc::file_changed.
1960 (pwdgrp::load): Rename from 'open'. Call etc::init to initialize etc
1961 scanning. Close file handle after reading buffer into memory. Parse
1962 buffer by calling second argument.
1963 (pwdgrp::gets): Reorganize slightly to rely on eptr starting at
5304bcdf 1964 beginning of buffer.
14ea5029
CF
1965 (pwdgrp::close): Remove.
1966 * uinfo.cc (etc::dir_changed): New function.
1967 (etc::init): Ditto.
1968 (etc::file_changed): Ditto.
1969 (etc::set_last_modified): Ditto.
1970
41429bc9
CV
19712003-01-16 Jason Tishler <jason@tishler.net>
1972
1973 * mmap.cc (fixup_mmaps_after_fork): Add ERROR_NOACCESS to the list of
1974 ReadProcessMemory() error codes that trigger a retry with temporary
1975 PAGE_READONLY access. Note that this can occur on NT 4.0.
1976
18813254
CF
19772003-01-15 Christopher Faylor <cgf@redhat.com>
1978
1979 * path.cc (normalize_posix_path): Convert win32 path separators to
1980 slashes when full path is specified.
1981
77cb0c56
CF
19822003-01-15 Pierre Humblet <pierre.humblet@ieee.org>
1983
1984 * cmalloc.cc (_cmalloc): Fix memory leak.
1985
ce542f78
CV
19862003-01-15 Corinna Vinschen <corinna@vinschen.de>
1987
1988 * autoload.cc: Fix copyright date.
1989 * fhandler_dsp.cc: Ditto.
1990 * mmap.cc: Ditto.
1991 * net.cc: Ditto.
1992 * ntdll.h: Ditto.
1993 * signal.cc: Ditto.
1994 * syscalls.cc: Ditto.
1995 * uname.cc: Ditto.
1996 * wait.cc: Ditto.
1997
15996b6f
CV
19982003-01-14 Corinna Vinschen <corinna@vinschen.de>
1999
2000 * mmap.cc (fixup_mmaps_after_fork): Copy protection to child process.
2001 Change ambiguous debug output.
2002
857b65dd
CV
20032003-01-14 Corinna Vinschen <corinna@vinschen.de>
2004
2005 * mmap.cc (mmap_record::access): Change argument type to caddr_t
2006 for strictness.
2007 (mprotect): Protect against calling VirtualProtect() for shared
2008 pages on 9x/Me.
2009 (fixup_mmaps_after_fork): If ReadProcessMemory() fails, try to
2010 change protection of parent page to PAGE_READONLY, then try again.
2011 Revert protection afterwards.
2012
e14328f4
TP
20132003-01-14 Thomas Pfaff <tpfaff@gmx.net>
2014
2015 * syscalls.cc (system): Add pthread_testcancel call.
2016 * thread.cc: Update list of cancellation points.
2017
4a3584c8
TP
20182003-01-14 Thomas Pfaff <tpfaff@gmx.net>
2019
2020 * wait.cc: Include thread.h
2021 (wait4): Add pthread_testcancel call.
2022 Wait for child process and cancellation event.
2023 * thread.cc: Update list of cancellation points.
2024
7ec66a2c
TP
20252003-01-14 Thomas Pfaff <tpfaff@gmx.net>
2026
2027 * signal.cc (sleep): Add pthread_testcancel call.
2028 Wait for signal and cancellation event.
2029 (usleep): Ditto.
2030
20312003-01-14 Thomas Pfaff <tpfaff@gmx.net>
3457ce4d
TP
2032
2033 * exceptions.cc (handle_sigsuspend): Add pthread_testcancel call.
2034 Wait for signal and cancellation event.
2035 * thread.cc: Update list of cancellation points.
2036
2673d5f2
CF
20372003-01-14 David Huang <davehzhr@hotmail.com>
2038
2039 * fhandler_dsp.cc (fhandler_dsp::ioctl): Add limited support for
2040 SNDCTL_DSP_GETFMTS.
2041
9f0d3f37
CF
20422003-01-12 Christopher Faylor <cgf@redhat.com>
2043
2044 * ntdll.h: Fix typo.
2045
7f129d87
CV
20462003-01-12 Corinna Vinschen <corinna@vinschen.de>
2047
2048 * uname.cc (uname): Use cygwin_gethostname() to retrieve hostname.
2049
ab2dbccc
CV
20502003-01-12 Pierre Humblet <pierre.humblet@ieee.org>
2051
2052 * sec_acl.cc (search_ace): Use id == -1, instead of < 0, as wildcard.
2053 (setacl): Start the search for a matching default at the next entry.
2054 Invalidate the type of merged entries instead of clearing it.
2055 Use well_known_creator for default owner and owning group and do
2056 not try to merge non-default and default entries in these cases.
2057 (getacl): Recognize well_known_creator for default owner and group.
2058 (acl_worker): Improve errno settings and streamline the nontsec case.
2059 * security.cc (write_sd): Remove the call to set_process_privilege.
2060 (alloc_sd): If the owner changes, call set_process_privilege and return
2061 immediately on failure. Change inheritance rules: on new directories add
2062 inherit only allow ACEs for creator_owner, creator_group and everyone.
2063 Preserve all inheritances through chmod and chown calls. Introduce
2064 isownergroup to implement the uid == gid case, to keep the inheritance
2065 code simple. Do not initialize owner_sid and group_sid and stop using
2066 the variable psd.
2067
68115c74
CF
20682003-01-10 Christopher Faylor <cgf@redhat.com>
2069
2070 * net.cc: Use gethostname define from winsock2.h.
2071
e3abf986
CF
20722003-01-10 Christopher Faylor <cgf@redhat.com>
2073
2074 * path.cc: Unrevert below reversion except for
2075 mount_info::conv_to_posix_path part.
2076
df2caa88
CV
20772003-01-10 Corinna Vinschen <corinna@vinschen.de>
2078
2079 * path.cc: Revert patch from 2003-01-09 to normalize a windows path
2080 rather than converting to posix.
2081
dc8d11f5
CV
20822003-01-10 Corinna Vinschen <corinna@vinschen.de>
2083
2084 * autoload.cc (gethostname): Make call optional, return 1 if function
2085 can't get loaded.
2086 * net.cc (cygwin_gethostname): Call GetComputerName if return value
2087 of gethostname is non-zero.
2088
70d61f30
CV
20892003-01-10 Charles Wilson <cwilson@ece.gatech.edu>
2090
8735f49f 2091 * cygwin.din: Add asprintf and vasprintf, as well as the reentrant
70d61f30 2092 versions and underscore variants.
8735f49f 2093 * include/cygwin/version.h: Bump CYGWIN_VERSION_API_MINOR.
70d61f30 2094
a7711767
CV
20952003-01-10 Corinna Vinschen <corinna@vinschen.de>
2096
2097 * net.cc (cygwin_gethostname): Fix call to wsock function gethostname.
2098
d5223b2b
CF
20992003-01-09 Christopher Faylor <cgf@redhat.com>
2100
2101 * cygthread.cc (cygthread::cygthread): Be more noisy about odd
2102 condition.
2103 * miscfuncs.cc (low_priority_sleep): Sleep in regular priority if
2104 that's what we're currently running at.
2105
65f207e8
TP
21062003-01-09 Thomas Pfaff <tpfaff@gmx.net>
2107
2108 * include/semaphore.h: Modify typedef for sem_t.
2109 * include/cygwin/types.h: Modify typedefs for pthread_t,
2110 pthread_mutex_t, pthread_key_t, pthread_attr_t,
2111 pthread_mutexattr_t, pthread_condattr_t, pthread_cond_t,
2112 pthread_rwlock_t and pthread_rwlockattr_t.
2113
09cbb9d6
TP
21142003-01-09 Thomas Pfaff <tpfaff@gmx.net>
2115
2116 * thread.h (WAIT_CANCELED): New define.
2117 (pthread::cancelable_wait): New static method.
2118 * thread.cc (pthread::cancelable_wait): Implement.
2119 (semaphore::Wait): Wait on semaphore and thread cancellation.
2120 (pthread::join): Wait on joined thread and thread cancellation.
2121 (semaphore::wait): Add testcancel to check for thread
2122 cancellation even if the semaphore is available.
2123
5d68d1de
TP
21242003-01-09 Thomas Pfaff <tpfaff@gmx.net>
2125
2126 * include/pthread.h: Add define for errorchecking mutexes.
2127 Change default mutex type.
2128 * thread.cc (pthread_cond::TimedWait): Update mutex unlock
2129 calls.
2130 (pthread_mutex::pthread_mutex): New implement.
2131 (pthread_mutex::~pthread_mutex): Ditto.
2132 (pthread_mutex::Lock): Ditto.
2133 (pthread_mutex::TryLock): Ditto.
2134 (pthread_mutex::UnLock): Ditto.
2135 (pthread_mutex::Destroy): Implement new method.
2136 (pthread_mutex::SetOwner): Ditto.
2137 (pthread_mutex::LockRecursive): Ditto.
2138 (pthread_mutex::fixup_after_fork): Restore locking state after
2139 fork.
2140 (__pthread_mutex_lock): Return pthread_mutex::Lock errorcode.
2141 (__pthread_mutex_trylock): Return pthread_mutex::TryLock
2142 errorcode.
2143 (__pthread_mutex_unlock): Return pthread_mutex::UnLock
2144 errorcode.
2145 (__pthread_mutex_destroy): Call pthread_mutex::Destroy to
3457ce4d 2146 destroy mutex.
5d68d1de
TP
2147 (__pthread_mutexattr_settype): Allow errorchecking and recursive
2148 types.
2149 * thread.h (MUTEX_LOCK_COUNTER_INITIAL): New define.
2150 (pthread_mutex::criticalsection): Remove.
2151 (pthread_mutex::lock_counter): New member.
2152 (pthread_mutex::recursion_counter): Ditto.
2153 (pthread_mutex::owner): Ditto.
2154 (pthread_mutex::type): Ditto.
2155 (pthread_mutex::Destroy): New method.
2156 (pthread_mutex::SetOwner): Ditto.
2157 (pthread_mutex::LockRecursive): Ditto.
2158
ed9fe455
TP
21592003-01-09 Thomas Pfaff <tpfaff@gmx.net>
2160
2161 * pthread.cc (pthread_cond_init): Use new pthread_cond::init.
2162 * thread.cc: Some white spaces cleanups.
2163 Change __pthread_cond_init to pthread_cond::init throughout.
2164 (nativeMutex): Move class methods outside pthread_mutex.
2165 (MTinterface::Init): Initialize pthread_cond init lock.
2166 (pthread_cond::condInitializationLock): Instantiate.
2167 (pthread_cond::initMutex): New Method.
2168 (pthread_cond::isGoodInitializerOrBadObject): Ditto.
2169 * thread.h: Some white spaces cleanups.
2170 (nativeMutex): Move class declaration outside pthread_mutex.
2171 (pthread_cond::condInitializationLock): New static member.
2172 (pthread_cond::initMutex): New Method.
2173 (pthread_cond::isGoodInitializerOrBadObject): Ditto.
2174 (__pthread_cond_init): Remove prototype.
2175
93353aee
CV
21762003-01-09 Corinna Vinschen <corinna@vinschen.de>
2177
2178 * fhandler_disk_file.cc (num_entries): Return 2 as link count if
2179 directory unreadable.
2180
3eb27a4e
CV
21812003-01-09 Corinna Vinschen <corinna@vinschen.de>
2182
2183 * security.cc (get_nt_attribute): Always return -1 when read_sd()
2184 fails.
2185 (get_file_attribute): Set permissions to 0 and owner/group to -1
2186 if security descriptor is unreadable.
2187
85ba109d
CF
21882003-01-09 Christopher Faylor <cgf@redhat.com>
2189
2190 Use isdirsep rather than SLASH_P throughout.
2191 * path.cc (iscygdrive): Disallow /cygdrive\x.
2192 (normalize_posix_path): "Normalize" a windows path, if detected, rather
2193 than converting to posix.
2194
21952003-01-06 Troy Curtiss <troyc@usa.net>
2196
2197 * fhandler_serial.cc (fhandler_serial::tcsetattr): Add support and
2198 capability checking for B230400 bitrate.
2199 (fhandler_serial::tcgetattr): Add support for B230400 bitrate.
2200 * include/sys/termios.h: Add B230400 definition for Posix support of
2201 230.4Kbps.
2202
cbdbe9d7
CF
22032003-01-05 Christopher Faylor <cgf@redhat.com>
2204
2205 * pinfo.cc (_pinfo::commune_send): Use myself->lock rather than just
2206 lock when leaving.
2207
f3afe99b
CF
22082003-01-03 Christopher Faylor <cgf@redhat.com>
2209
2210 * dtable.h (dtable::in_vfork_cleanup): New function. True if vfork
2211 cleanup needed.
2212 * dtable.cc (dtable::vfork_parent_restore): Remove assertion.
2213 * pipe.cc (fhandler_pipe::close): Don't close read_state during
2214 fork_fixup since it wasn't inherited.
2215
2665fb15
CF
22162003-01-01 Christopher Faylor <cgf@redhat.com>
2217
2218 * passwd.cc (getpwuid_r32): Revert previous change.
2219
8619b42b
CF
22202003-01-01 Christopher Faylor <cgf@redhat.com>
2221
2222 * sysconf.cc (sysconf): Return arbitrary values for
2223 _SC_GETGR_R_SIZE_MAX, _SC_LOGIN_NAME_MAX, _SC_GETPW_R_SIZE_MAX.
2224
2225 * passwd.cc (getpwuid_r32): Add uid/gid fields to size check
2226 calculation.
2227
This page took 0.321245 seconds and 5 git commands to generate.