]> sourceware.org Git - newlib-cygwin.git/blame - winsup/cygwin/ChangeLog
* fhandler_socket.cc (fhandler_socket::dup): If running impersonated,
[newlib-cygwin.git] / winsup / cygwin / ChangeLog
CommitLineData
72c1470d
CV
12003-05-28 Corinna Vinschen <corinna@vinschen.de>
2
3 * fhandler_socket.cc (fhandler_socket::dup): If running impersonated,
4 revert to original account before calling fixup_before_fork_exec
5 and impersonate again afterwards. Change comment accordingly.
6 Clean up error handling and debug output.
7
a946fb03
TP
82003-05-27 Thomas Pfaff <tpfaff@gmx.net>
9
10 * fhandler_socket.cc (sock_event::~sock_event): New method.
11 (sock_event::load): Change to void. Check if winsock2 is available.
12 (socke_event::wait): Return 0 if interruptible mode is not available.
13 (fhandler_socket::connect): Remove checks for winsock2 availability.
14 (fhandler_socket::accept): Ditto.
15
dae86e45
CV
162003-05-27 Corinna Vinschen <corinna@vinschen.de>
17
18 * fhandler_socket.cc (fhandler_socket::dup): First try duplicating
19 using WSADuplicateSocket/WSASocket, if that fails, try DuplicateHandle.
20
2311f6b0
CV
212003-05-27 Bill C. Riemers <cygwin@docbill.net>
22
23 * fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): Filter
24 permissions throug umask on FAT or if ntsec is off.
25
ada0376f
CV
262003-05-26 Pierre Humblet <pierre.humblet@ieee.org>
27
28 * syscalls.cc (statfs): Call GetDiskFreeSpaceEx before GetDiskFreeSpace.
29
0372ad9f
CV
302003-05-26 Corinna Vinschen <corinna@vinschen.de>
31
32 * fhandler.cc (is_at_eof): Fix conditional. Use INVALID_FILE_SIZE
33 instead of numeric constant.
34
6852f6c0
CV
352003-05-26 Corinna Vinschen <corinna@vinschen.de>
36
37 * fhandler_socket.cc (fhandler_socket::connect): Guard calls to
38 sock_event methods by a check for WinSock2 availability.
39 (fhandler_socket::accept): Ditto.
40
fac297d5
CV
412003-05-26 Corinna Vinschen <corinna@vinschen.de>
42
43 * fhandler.h: Rename FH_W95LSBUG flag to FH_LSEEKED.
44 (fhandler_base::set_did_lseek): Rename from set_check_win95_lseek_bug.
45 (fhandler_base::get_did_lseek): Rename from get_check_win95_lseek_bug.
46 (fhandler_base::set_fs_flags): New method.
47 (fhandler_base::get_fs_flags): Ditto.
48 * fhandler.cc (fhandler_base::write): Make 64 bit clean. Convert file
49 to a "sparse" file when writing after a long lseek (>64K) beyond EOF.
50 (fhandler_base::lseek): Call set_did_lseek() instead of
51 set_check_win95_lseek_bug().
52 (fhandler_base::fhandler_base): Initialize fs_flags to 0.
53 * fhandler_disk_file.cc (fhandler_disk_file::open): Don't create files
54 as "sparse" unconditionally. Set fs_flags member.
55
a80229fd
CV
562003-05-25 Pierre Humblet <pierre.humblet@ieee.org>
57
58 * autoload.cc (GetDiskFreeSpaceEx): Add.
59 * syscalls.cc (statfs): Call full_path.root_dir() instead of
60 rootdir(full_path). Use GetDiskFreeSpaceEx when available and
61 report space available in addition to free space.
62 * fhandler_disk_file.cc (fhandler_disk_file::fstat_by_name):
63 Do not call FindFirstFile for disk root directories.
64
c295ce6f
CV
652003-05-24 Joe Buehler <jhpb@draco.hekimian.com>
66
a80229fd 67 * fhandler_process.cc (format_process_stat): Use PagefileUsage
c295ce6f
CV
68 instead of VirtualSize.
69 (get_mem_values): Ditto.
70
5c768c97
CV
712003-05-21 Corinna Vinschen <corinna@vinschen.de>
72
73 * shared_info.h: Match shared_name declaration with below change.
74 * shared.cc (shared_name): Use incoming char * parameter instead of
75 local static buffer.
76 (open_shared): Accomodate new calling convention for shared_name.
77 * exceptions.cc (events_init): Ditto.
78 * sigproc.cc (getsem): Ditto.
79 * syscalls.cc (login): Ditto.
80 (logout): Ditto.
81 (pututline): Ditto.
82
44be8197
CV
832003-05-20 Corinna Vinschen <corinna@vinschen.de>
84
85 * fhandler_socket.cc (secret_event_name): Return void. Use incoming
5c768c97 86 char * parameter instead of local static buffer.
44be8197
CV
87 (fhandler_socket::create_secret_event): Accomodate new calling
88 convention for secret_event_name.
89 (fhandler_socket::close_secret_event): Ditto.
90
d4f3ce31
CV
912003-05-20 Corinna Vinschen <corinna@vinschen.de>
92
93 * fhandler_socket.cc (SECRET_EVENT_NAME): Remove.
94 (ENTROPY_SOURCE_NAME): Ditto.
95 (secret_event_name): New static function. Create shared event name
96 with "Global\" prefix on systems supporting terminal services.
97 (fhandler_socket::set_connect_secret): Fix conditional.
98 (fhandler_socket::create_secret_event): Create secret event using
99 secret_event_name().
100 (fhandler_socket::close_secret_event): Ditto.
101 * shared.cc (shared_name): Create shared object name with "Global\"
102 prefix on systems supporting terminal services.
103 * wincap.cc: Set has_terminal_services capability throughout.
104 (wincap_2003): New global object representing Windows 2003 Server
105 capabilities.
106 (wincapc::init): Accomodate Windows 2003 Server.
107 * wincap.h (struct wincaps): Add has_terminal_services capability.
108
10bada05
CV
1092003-05-20 Charles Wilson <cygwin@cwilson.fastmail.fm>
110
111 * winsup/cygwin/include/cygwin/version.h: Bump API minor version.
112 * winsup/cygwin/include/cygwin/types.h: Define key_t as long long.
113 * winsup/cygwin/cygwin.din: Add ftok, _ftok.
114 * winsup/cygwin/ipc.cc (ftok): Rework implementation.
115
d8ee8ca5
CF
1162003-05-18 Joe Buehler <jhpb@hekimian.com>
117
10bada05 118 * spawn.cc (spawn_guts): Show more of command line in strace output.
d8ee8ca5 119
c8fa3426
TP
1202003-05-15 Thomas Pfaff <tpfaff@gmx.net>
121
122 * thread.h (pthread::init_mainthread): Remove function parameter.
123 (MTinterface::Init): Ditto.
124 * thread.cc (MTinterface::Init): Remove function parameter.
125 Always initialize reent_key.
126 (pthread::init_mainthread): Remove function parameter.
127 (MTinterface::fixup_after_fork): Fix pthread::init_mainthread call.
128 * dcrt0.cc (dll_crt_0_1) Fix calls to MTinterface::Init and
129 pthread::init_mainthread.
130 Call pthread::init_mainthread only when not forked.
131
f2669f5d
CV
1322003-05-15 Corinna Vinschen <corinna@vinschen.de>
133
134 * fhandler_proc.cc (format_proc_meminfo): Make swap memory output
135 Linux style values.
136
5d575f7d
CV
1372003-05-13 Corinna Vinschen <corinna@vinschen.de>
138
139 * include/cygwin/config.h: Define __USE_INTERNAL_STAT64 appropriately.
140
194d9eb3
CV
1412003-05-12 Corinna Vinschen <corinna@vinschen.de>
142
143 * Makefile.in (CYGWIN_START): Define as crt0.o. Add to TARGET_LIBS.
144 * fhandler.h (fhandler_virtual::fstat): Remove useless declaration.
145 * fhandler_virtual.cc: Remove _COMPILING_NEWLIB define.
146 * ipc.cc (ftok): Use stat64.
147 * syscalls.cc (_fstat64): Remove alias.
148 (_fstat): Ditto.
149 (_stat): Ditto.
150 (_fstat64_r): New function.
151 (_fstat_r): Ditto.
152 (_stat64_r): Ditto.
153 (stat_r): Ditto.
154 * crt0.o: New file, moved from newlib.
155 * include/sys/param.h: Ditto.
156 * include/sys/utime.h: Ditto.
157 * include/sys/utmp.h: Ditto.
158 * include/sys/dirent.h: Ditto. Expose different struct dirent,
159 dependening of the environment.
160
cc95baad
CV
1612003-05-11 Corinna Vinschen <corinna@vinschen.de>
162
163 Replace ino_t by __ino64_t throughout.
164
aee70853
CV
1652003-05-11 Corinna Vinschen <corinna@vinschen.de>
166
167 * include/cygwin/types.h: Add key_t typedef.
168
066ca06f
CF
1692003-05-10 Christopher Faylor <cgf@redhat.com>
170
171 * dir.cc (readdir): Fill out new old_d_ino field.
172 * fhandler.h (fhandler_base::namehash): Define as ino_t.
173 (fhandler_base::get_namehash): Ditto.
174 * fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): Accommodate
175 new 64 bit st_ino.
176 * fhandler_socket.cc (fhandler_socket::fstat): Ditto.
177 * path.cc (hash_path_name): Return ino_t.
178 * syscalls.cc (stat64_to_stat32): Convert 64 bit inode to 32 bit.
179 * winsup.h (hash_path_name): Declare as returning ino_t.
180 * include/cygwin/stat.h (__stat32): Use 32 bit st_ino.
181 (__stat64): Use 64 bit st_ino.
182 * include/cygwin/types.h (__ino64_t): Define.
183 (__ino32_t): Ditto.
184 (ino_t): Define appropriately.
185
3e66a81c
CV
1862003-05-10 Corinna Vinschen <corinna@vinschen.de>
187
188 * Makefile.in (NEW_FUNCTIONS): All 32/64 from 0.79 API get
189 leading underscore.
190 * cygwin.din: Ditto.
191 * include/cygwin/version.h: Bump API minor number.
192
d3b450f3
CV
1932003-05-09 Corinna Vinschen <corinna@vinschen.de>
194
195 * include/cygwin/config.h: New file.
196
9508ebc5
CF
1972003-05-09 Christopher Faylor <cgf@redhat.com>
198
199 * cygthread.cc (cygthread::detach): Prioritize waiting for I/O
200 completion over waiting for signal delivery.
201
0bb7254f
TP
2022003-05-06 Thomas Pfaff <tpfaff@gmx.net>
203
204 * signal.cc (nanosleep): Do not wait twice for signal arrival.
205
a6d745f5
CV
2062003-05-03 Corinna Vinschen <corinna@vinschen.de>
207
208 * include/cygwin/types.h: Fix erroneous definition of ino_t from
209 2003-04-28.
210
40d3c804
CV
2112003-05-03 Corinna Vinschen <corinna@vinschen.de>
212
213 * syscalls.cc (chown_worker): Allow chown'ing of socket files.
214
2238537c
TP
2152003-04-30 Thomas Pfaff <tpfaff@gmx.net>
216
217 * Makefile.in: Revert patch from 2003-04-17.
218
6ef342e4
CF
2192003-04-28 Brian Ford <ford@vss.fsi.com>
220
221 * profil.h (PROFADDR): Prevent overflow when text segments are larger
222 than 256k.
223 * profil.c (profthr_func): Raise thread priority for more accurate
224 sampling.
225
2262003-04-26 Christopher Faylor <cgf@redhat.com>
227
228 * path.cc (hash_path_name): Use ino_t as type.
229
7d6d38aa
CF
2302003-04-26 Christopher Faylor <cgf@redhat.com>
231
232 * errno.cc (_sys_nerr): Fix compile error erroneously checked in on
233 2003-04-23.
234
f615d74b
CV
2352003-04-25 Corinna Vinschen <corinna@vinschen.de>
236
237 * include/netinet/ip.h: Include netinet/in_systm.h and netinet/in.h
238 to allow standalone usage (autoconf).
239
5d9a7c87
CF
2402003-04-23 Christopher Faylor <cgf@redhat.com>
241
242 * fork.cc: Change SLOW_PID_REUSE to NO_SLOW_PID_REUSE and invert ifdef
243 sense throughout.
244
0eaf24fe
CF
2452003-04-22 Christopher Faylor <cgf@redhat.com>
246
247 * select.cc (fhandler_pipe::ready_for_read): Assure that get_guard is
248 called for successful non-blocking pipe reads.
249
e8a57b4f
CV
2502003-04-22 Corinna Vinschen <corinna@vinschen.de>
251
252 * include/inttypes.h: New file.
253 * include/stdint.h: New file.
254 * include/cygwin/in.h: Include stdint.h instead of sys/types.h.
255 * include/cygwin/types.h: Include stdint.h. Remove typedefs for
256 intN_t and uintN_t since these are defined in stdint.h now.
257
99b1a40d
CF
2582003-04-21 Christopher Faylor <cgf@redhat.com>
259
650dc784 260 * include/cygwin/version.h: Bump DLL major number to 1005. Change DLL
99b1a40d
CF
261 minor number to 0. Bump API minor number.
262
beb54085
CV
2632003-04-20 Corinna Vinschen <corinna@vinschen.de>
264
265 * autoload.cc (CreateWindowStationA): Add.
266 (SetProcessWindowStation): Add.
267
6b3bdf38
CF
2682003-04-19 Christopher Faylor <cgf@redhat.com>
269
270 * wincap.h (wincaps:pty_needs_alloc_console): New element.
271 (wincapc:pty_needs_alloc_console): New function.
272 * wincap.cc: Add pty_needs_alloc_console throughout.
273 * fhandler_tty.cc (fhandler_tty_slave::open): Open an "invisible"
274 console on first pty allocation.
275
afa18d8a
CF
2762003-04-18 Christopher Faylor <cgf@redhat.com>
277
278 * fhandler_tty.cc (fhandler_tty_slave::open): Allocate a console
279 whenever a pty is allocated.
280
4e0d8778
CF
2812003-04-18 Christopher Faylor <cgf@redhat.com>
282
283 * Makefile.in: Use ${nostdlib} variable.
284
2852003-04-18 Diego Biurrun <diego@biurrun.de>
286
287 * fhandler_proc.cc (format_proc_cpuinfo): Change /proc/cpuinfo "vendor
288 id" string to "vendor_id" to conform with Linux systems.
289
4e837e73
CF
2902003-04-17 Christopher Faylor <cgf@redhat.com>
291
292 * syscalls.cc (setsid): Don't call FreeConsole if ctty is already < 0.
293
f3c1c540
TP
2942003-04-17 Thomas Pfaff <tpfaff@gmx.net>
295
296 * Makefile.in: Add finline-functions optimization to CXXFLAGS.
297 * autoload.cc (LoadDLLprime): Rename std_dll_init to
298 _std_dll_init.
299 (std_dll_init): Remove name mangling prototype. Add attributes
300 used and noinline.
301 (wsock_init): Ditto.
302 Change wsock_init to _wsock_init in wsock32 and ws2_32
303 LoadDLLprime.
304 * exceptions.cc (unused_sig_wrapper): Remove prototype. Add
305 attributes used and noinline.
306 * pwdgrp.h ((pwdgrp (passwd *&)): Remove inline code.
307 (pwdgrp (__group32 *&)): Ditto.
308 * grp.cc (pwdgrp (passwd *&)): Outline constructor.
309 (pwdgrp (__group32 *&)): Ditto.
310
a4cea440
TP
3112003-04-17 Thomas Pfaff <tpfaff@gmx.net>
312
313 * thread.h (pthread::equal): New static method.
314 * thread.cc: Rename pthread_equal to pthread::equal throughout.
315 (pthread_equal): Use pthread::equal to compare threads ids.
316
c448f78f
CF
3172003-04-15 Christopher Faylor <cgf@redhat.com>
318
319 * termios.cc (setspeed): New function.
320 (cfsetospeed): Use setspeed to set speed.
321 (cfsetispeed): Use setspeed to set speed.
322
3232003-04-15 Chris January <chris@atomice.net>
324
325 * autoload.cc: Add load statement for UuidCreate, and
326 UuidCreateSequential.
327 * cpuid.h: New file.
328 * cygwin.din: Export gethostid.
329 * fhandler_proc.cc (cpuid): Move to cpuid.h.
330 (can_set_flag): Move to cpuid.h.
331 * syscalls.cc (gethostid): New function.
5f92bef8 332 * version.h: Bump api minor version number to 83.
c448f78f 333
ffb576fb
TP
3342003-04-15 Thomas Pfaff <tpfaff@gmx.net>
335
336 * thread.h (pthread_rwlock::release): New method.
c448f78f
CF
337 * thread.cc (pthread_rwlock::unlock): Use release to signal waiting
338 threads.
ffb576fb
TP
339 (pthread_rwlock::rdlock_cleanup): Signal waiting threads after a
340 cancelation.
341 (pthread_rwlock::wrlock_cleanup): Ditto.
342
b3acb772
CF
3432003-04-13 Pierre Humblet <pierre.humblet@ieee.org>
344
345 * mkvers.sh: Prefix day with 0 in date only when day < 10.
346
2e23862a
CV
3472003-04-11 Pierre Humblet <pierre.humblet@ieee.org>
348
349 * security.cc (get_info_from_sd): New function.
350 (get_nt_attribute): Only call read_sd and get_info_from_sd.
351 Return void.
352 (get_file_attribute): Move sd error handling to get_info_from_sd.
353 and symlink handling to fhandler_disk_file::fstat_helper.
354 (get_nt_object_attribute): Only call read_sd and get_info_from_sd.
355 Return void.
356 (get_object_attribute): Remove symlink handling and simply return -1
357 when ntsec is off.
358 * fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): For
359 symlinks set the attribute, call get_file_attribute to get the ids
360 and return. In the normal case call get_file_attribute with the
361 addresses of the buffer ids and do not recheck if the file is a socket.
362
73afb2ab
CF
3632003-04-10 Christopher Faylor <cgf@redhat.com>
364
365 * cygthread.cc (cygthread::stub): Initialize stack pointer earlier.
366 (cygthread::simplestub): Initialize stack pointer.
367 (cygthread::terminate_thread): Account for possibility that stack
368 pointer has not been set. Issue warnings for unusual conditions.
369
2a1e8e11
CV
3702003-04-10 Corinna Vinschen <corinna@vinschen.de>
371
372 * regex/regex.h: Define regoff_t as _off_t.
373 * regex/regex2.h: Ditto.
374
ac5ec961
CV
3752003-04-10 Corinna Vinschen <corinna@vinschen.de>
376
377 * cygwin.din: Export wcscoll, wcswidth and wcwidth.
378 * include/cygwin/version.h: Bump API minor number.
379
e5d6d535
CF
3802003-04-10 Christopher Faylor <cgf@redhat.com>
381
382 * cygthread.h: Change 'avail' cygthread element to 'inuse' throughout.
383 * cygthread.cc: Ditto.
384 (cygthread::stub): Don't initialize already initialized events.
385 (cygthread::freerange): Don't create thread here.
386 (cygthread::cygthread): Create thread here. Die if thread not created.
387 (cygthread::operator new): Simplify. Just grab a thread structure from
388 the pool. Don't try to start the thread.
389 (cygthread::terminate_thread): Don't close event handles. Just reuse
d8ee8ca5 390 them. Call MEM_RELEASE rather than MEM_DECOMMIT (from Joe uehler).
e5d6d535 391
ca81cd60
CF
3922003-04-08 Bob Cassels <bcassels@abinitio.com>
393
394 * fhandler_console.cc (fhandler_console::read) Handle certain key up
395 events, to allow pasting accented characters and typing them using the
396 "alt + numerics" sequences.
397
3982003-04-07 Christopher Faylor <cgf@redhat.com>
399
400 * include/limits.h (IOV_MAX): Set to a number which is small enough to
401 use in an array.
402
b410f168
CF
4032003-04-04 Christopher Faylor <cgf@redhat.com>
404
9dbe3289
CF
405 * cygthread.h (cygthread::avail): Make LONG for easier use with
406 Interlocked* functions.
407 * cygthread.cc (cygthread::init): Eliminate unneeded muto.
408 (cygthread::operator new): Don't lock. Instead change use of avail
409 variable into tri-state: available (1), not available (-1),
410 uninitialized (0).
411 (cygthread::terminate_thread): Set avail to uninitialized.
412 (cygthread::detach): Eliminate local 'avail'. Always set avail to 1
413 unless signalled.
414
4152003-04-04 Christopher Faylor <cgf@redhat.com>
416
417 * cygthread.cc (cygthread::operator new): Be more defensive when messing with
b410f168
CF
418 threads that are marked "unavailable".
419
a61bf8c3
CF
4202003-04-03 Christopher Faylor <cgf@redhat.com>
421
422 * fhandler_console.cc (CONVERT_LIMIT): Use a size for the 21st century.
423
d5292d66
CV
4242003-04-03 Corinna Vinschen <corinna@vinschen.de>
425
426 * external.cc (check_ntsec): Return general ntsec state on NULL
427 filename. Check wincap.is_security() additionally.
428
5a87c616
CF
4292003-04-02 Christopher Faylor <cgf@redhat.com>
430
431 * Makefile.in (EXTRA_OFILES): Remove debugging object.
432
d99c6176
CF
4332003-04-02 Jason Tishler <jason@tishler.net>
434 Christopher Faylor <cgf@redhat.com>
435
436 * external.cc (check_ntsec): New function.
437 (cygwin_internal): Add CW_CHECK_NTSEC handling to call check_ntsec()
438 from applications.
439 * include/cygwin/version.h: Bump API minor number.
440 * include/sys/cygwin.h (cygwin_getinfo_types): Add CW_CHECK_NTSEC.
441
4422003-04-02 Christopher Faylor <cgf@redhat.com>
443
444 * cygthread.cc (cygthread::new): Add more defensive debugging.
445
2d388e43 4462003-04-01 Pierre Humblet <pierre.humblet@ieee.org>
d99c6176 447
2d388e43
CV
448 * fhandler.cc (fhandler_base::fstat): Set the uid and gid fields
449 from the current effective ids.
450 * fhandler_socket.cc (fhandler_socket::fstat): Keep the uid and gid set
451 by fhandler_base::fstat.
452 * security.cc (get_nt_attribute): Do not test wincap.has_security ().
453 (get_nt_object_attribute): Ditto.
454 (get_file_attribute): Add test for wincap.has_security ().
455 (get_object_attribute): Ditto.
456
1727fba0
CV
4572003-04-01 Corinna Vinschen <corinna@vinschen.de>
458
459 * dir.cc: Change __off32_t to _off_t and __off64_t to _off64_t
460 throughout.
461 * fhandler.cc: Ditto.
462 * fhandler.h: Ditto.
463 * fhandler_clipboard.cc: Ditto.
464 * fhandler_disk_file.cc: Ditto.
465 * fhandler_dsp.cc: Ditto.
466 * fhandler_floppy.cc: Ditto.
467 * fhandler_mem.cc: Ditto.
468 * fhandler_proc.cc: Ditto.
469 * fhandler_process.cc: Ditto.
470 * fhandler_random.cc: Ditto.
471 * fhandler_registry.cc: Ditto.
472 * fhandler_tape.cc: Ditto.
473 * fhandler_termios.cc: Ditto.
474 * fhandler_virtual.cc: Ditto.
475 * fhandler_zero.cc: Ditto.
476 * mmap.cc: Ditto.
477 * pipe.cc: Ditto.
478 * syscalls.cc: Ditto.
479 * winsup.h: Ditto.
480 * include/cygwin/stat.h: Ditto.
481 * include/cygwin/types.h: Ditto. Remove definition of __off32_t
482 and __off64_t.
483
333879e7
CF
4842003-03-31 Christopher Faylor <cgf@redhat.com>
485
486 * exceptions.cc (setup_handler): Make sure winapi lock is released when
487 exiting loop.
488
a2105d93
CF
4892003-03-30 Christopher Faylor <cgf@redhat.com>
490
491 * include/cygwin/fs.h: Remove unneeded include.
492 * include/cygwin/in.h: Include sys/types.h rather than cygwin/types.h.
493
856a9750
CV
4942003-03-29 Corinna Vinschen <corinna@vinschen.de>
495
496 * syscalls.cc (login): Fix comment.
497 (logout): Ditto.
498
8304de2e
CV
4992003-03-29 Corinna Vinschen <corinna@vinschen.de>
500
501 * syscalls.cc: Slightly cleanup all utmp functions.
502 (login): Use mutex to secure against concurrent access to wtmp file.
503 (logout): Rewrite using POSIX calls.
504 (utmp_fd): Initialized to -1 now. Any value < 0 is treated as closed
505 in subsequent functions.
506 (utmp_readonly): New variable, indicating utmp file open for reading
507 only.
508 (internal_setutent): New function implementing setutent().
509 (setutent): Call internal_setutent now.
510 (endutent): Reset utmp_readonly.
511 (getutent): Return immediately if utmp file can't be opened.
512 (getutid): Ditto.
513 (getutline): Ditto.
514 (pututline): Ditto. Use mutex to secure against concurrent access to
515 utmp file.
516
46c8214c
CF
5172003-03-28 Christopher Faylor <cgf@redhat.com>
518
519 * Makefile.in: Remove EXE_LDFLAGS. Fix fhandler_CFLAGS typo. Recognize .s suffix.
520 * configure.in: Remove EXE_LDFLAGS.
521 * configure: Regenerate.
522
a7ab35c1
CF
5232003-03-28 Christopher Faylor <cgf@redhat.com>
524
525 * include/sys/cygwin.h: Declare cygwin_internal as unsigned long.
526 * external.cc (cygwin_internal): Define as unsigned long.
527
5282003-03-27 Christopher Faylor <cgf@redhat.com>
529
530 * include/sys/cygwin.h: Move cygwin_internal outside of WINVER
531 conditional.
532
eff6c00e
TP
5332003-03-27 Thomas Pfaff <tpfaff@gmx.net>
534
535 * thread.cc: Change 1==foo equations to foo==1 throughout.
536
15648790
TP
5372003-03-27 Thomas Pfaff <tpfaff@gmx.net>
538
539 * thread.h: Change class names, methods, members and local vars
540 according to the GNU coding style.
541 * thread.cc: Ditto.
542 * dcrt0.cc (dll_crt0_1): Rename pthread::initMainThread call to
543 pthread::init_mainthread.
544 * pthread.cc (pthead_getsequence_np): Rename pthread::isGoodObject
545 call to pthread::is_good_object.
546
98b36ec8
CV
5472003-03-27 Joe Buehler <jhpb@draco.hekimian.com>
548
1ce82d24
CF
549 * autoload.cc: Add RegGetKeySecurity().
550 * security.cc (get_nt_object_attribute): Use RegGetKeySecurity() for
98b36ec8
CV
551 performance.
552
85738bf7
CF
5532003-03-25 Christopher Faylor <cgf@redhat.com>
554 Joe Buehler <jhpb@draco.hekimian.com>
555
556 * fork.cc (fork_parent): Don't copy signals from parent to child here.
557 * sigproc.cc (proc_subproc): Copy signals from parent to child pinfo
558 here.
559
9306ba2e
TP
5602003-03-23 Thomas Pfaff <tpfaff@gmx.net>
561
85738bf7
CF
562 * thread.h (class List): Move inline code inside class declaration.
563 (List::forEach): Change callback parameter to template class member
564 function pointer.
565 (pthread_keys::fixup_before_fork): Change to inline. Use List::forEach
566 to fixup keys.
9306ba2e
TP
567 (pthread_keys::fixup_after_fork): Ditto.
568 (pthread_keys::runAllDestructors): Ditto.
569 (pthread_key::saveAKey): Remove.
570 (pthread_key::restoreAKey): Ditto.
571 (pthread_key::destroyAKey): Ditto.
572 (pthread_key::run_destructor): Rename to runDestructor.
85738bf7
CF
573 (pthread_mutex::fixup_after_fork): Change to inline. Use List::forEach
574 to fixup mutexes after a fork.
9306ba2e
TP
575 (pthread_mutex::FixupAfterFork): New method.
576 (pthread_mutex::mutexes): New member.
85738bf7
CF
577 (pthread_cond::fixup_after_fork): Change to inline. Use List::forEach
578 to fixup conds after a fork.
9306ba2e
TP
579 (pthread_cond::FixupAfterFork): New method.
580 (pthread_cond::conds): New member.
85738bf7 581 (pthread_rwlock::fixup_after_fork): Change to inline. Use
9306ba2e
TP
582 List::forEach to fixup rwlocks after a fork.
583 (pthread_rwlock::FixupAfterFork): New method.
584 (pthread_rwlock::rwlocks): New member.
85738bf7
CF
585 (semaphore::fixup_after_fork): Change to inline. Use List::forEach to
586 fixup mutexes after a fork.
9306ba2e
TP
587 (semaphore::FixupAfterFork): New method.
588 (semaphore::semaphores): New member.
589 (MTinterface::mutexs): Remove.
590 (MTinterface::conds): Ditto.
591 (MTinterface::rwlocks): Ditto.
592 (MTinterface::semaphores): Ditto.
593 (pthread_equal): Add extern "C".
594 (pthread_mutex_lock): Ditto.
85738bf7
CF
595
596 * thread.cc (MTinterface::fixup_after_fork): Change fixup_after_fork
597 calls for pthread objects.
9306ba2e 598 (semaphore::conds): Instantiate.
85738bf7
CF
599 (pthread_cond::pthread_cond): Use List::Insert rather than custom list
600 code.
601 (pthread_cond::~pthread_cond): Use List::Remove rather than custom list
602 code.
9306ba2e
TP
603 (pthread_cond::fixup_after_fork): Rename to FixupAfterFork.
604 (pthread_rwlock::rwlocks): Instantiate.
85738bf7
CF
605 (pthread_rwlock::pthread_crwlock): Use List::Insert rather than custom
606 list code.
607 (pthread_rwlock::~pthread_rwlock): Use List::Remove rather than custom
608 list code.
9306ba2e
TP
609 (pthread_rwlock::fixup_after_fork): Rename to FixupAfterFork.
610 (pthread_key::saveAKey): Remove.
611 (pthread_key::fixup_before_fork): Ditto.
612 (pthread_key::restoreAKey): Ditto.
613 (pthread_key::fixup_after_fork): Ditto.
614 (pthread_key::destroyAKey): Ditto.
615 (pthread_key::runAllDestructors): Ditto.
616 (pthread_key::run_destructor): Rename to runDestructor.
617 (pthread_mutex::mutexes): Instantiate.
85738bf7
CF
618 (pthread_mutex::pthread_mutex): Use List::Insert rather than custom
619 list code.
620 (pthread_mutex::~pthread_mutex): Use List::Remove rather than custom
621 list code.
9306ba2e
TP
622 (pthread_mutex::fixup_after_fork): Rename to FixupAfterFork.
623 (semaphore::conds): Instantiate.
85738bf7
CF
624 (semaphore::semaphore): Use List::Insert rather than custom list code.
625 (semaphores::~semaphore): Use List::Remove rather than custom list
9306ba2e 626 code.
9306ba2e
TP
627 (semaphore::fixup_after_fork): Rename to FixupAfterFork.
628
ff3ef36d
CF
6292003-03-22 Christopher Faylor <cgf@redhat.com>
630
631 * pipe.cc (fhandler_pipe::dup): Don't dup input_handle if it doesn't
632 exist.
633
ca04f61f
CF
6342003-03-22 Christopher Faylor <cgf@redhat.com>
635
636 * syscalls.cc (unlink): Be more defensive when SetFileAttributes is
637 called. Fix typo in debugging output.
638
89e7a1ce
CF
6392003-03-21 Christopher Faylor <cgf@redhat.com>
640
641 * fork.cc: Conditionalize use of slow_pid_reuse throughout. It's not
642 necessary for newer versions of bash.
643
fa85038b
CV
6442003-03-20 Corinna Vinschen <corinna@vinschen.de>
645
646 * fhandler_socket.cc (fhandler_socket::sendto): Restrict EPIPE and
647 SIGPIPE handling to connection oriented sockets. Add comment.
648
4da34970
CF
6492003-03-19 Christopher Faylor <cgf@redhat.com>
650
651 * sigproc.h (signal_fixup_after_exec): Eliminate argument in declaration.
652 * exceptions.cc (signal_fixup_after_exec): Eliminate argument in
653 definition. Don't reset signal handlers after spawm. Just treat like
654 fork/exec.
655 * dcrt0.cc (dll_crt0_1): Don't pass PROC_SPAWN argument to
656 signal_fixup_after_exec.
657 * syscalls.cc (unlink): Don't change attributes of file if not readonly/system.
658 Ditto for resetting of arguments.
659
036ac6b3
CV
6602003-03-19 Corinna Vinschen <corinna@vinschen.de>
661
662 * glob.c: Eliminate __INSIDE_CYGWIN__ preprocessor conditionals
663 throughout.
664
b1897d27
CV
6652003-03-19 Corinna Vinschen <corinna@vinschen.de>
666
667 * fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): Fix
668 wrong usage of S_IFDIR.
669 * security.cc (get_attribute_from_acl): Ditto.
670 (get_file_attribute): Fix wrong usage of S_IFLNK.
671 (get_object_attribute): Ditto.
672 (alloc_sd): Fix wrong usage of S_IFDIR.
673 * syscalls.cc (chmod): Allow chmod'ing of socket files.
674
c16d0946
CV
6752003-03-19 Corinna Vinschen <corinna@vinschen.de>
676
677 * include/cygwin/version.h (CYGWIN_VERSION_CHECK_FOR_USING_BIG_TYPES):
678 Define.
679 * glob.c (g_lstat): Use CYGWIN_VERSION_CHECK_FOR_USING_BIG_TYPES
680 instead of numerical constants.
681 (g_stat): Ditto.
682
6a80a133
TP
6832003-03-18 Thomas Pfaff <tpfaff@gmx.net>
684
685 * pthread.cc (pthread_attr_init): Remove
686 (pthread_attr_destroy): Ditto.
687 (pthread_attr_setdetachstate): Ditto.
688 (pthread_attr_getdetachstate): Ditto.
689 (pthread_attr_setstacksize): Ditto.
690 (pthread_attr_getstacksize): Ditto.
691 (pthread_attr_setinheritsched): Ditto.
692 (pthread_attr_getinheritsched): Ditto.
693 (pthread_attr_setschedparam): Ditto.
694 (pthread_attr_getschedparam): Ditto.
695 (pthread_attr_setschedpolicy): Ditto.
696 (pthread_attr_getschedpolicy): Ditto.
697 (pthread_attr_setscope): Ditto.
698 (pthread_attr_getscope): Ditto.
699 (pthread_attr_setstackaddr): Ditto.
700 (pthread_attr_getstackaddr): Ditto.
701 (pthread_key_create): Ditto.
702 (pthread_key_delete): Ditto.
703 (pthread_setspecific): Ditto.
704 (pthread_getspecific): Ditto.
705 (pthread_kill): Ditto.
706 (pthread_sigmask): Ditto.
707 (pthread_equal): Ditto.
708 (pthread_mutex_lock): Ditto.
709 (pthread_mutex_trylock): Ditto.
710 (pthread_mutex_unlock): Ditto.
711 (pthread_mutex_destroy): Ditto.
712 (pthread_mutex_setprioceiling): Ditto.
713 (pthread_mutex_getprioceiling): Ditto.
714 (pthread_mutexattr_destroy): Ditto.
715 (pthread_mutexattr_getprioceiling): Ditto.
716 (pthread_mutexattr_getprotocol): Ditto.
717 (pthread_mutexattr_getpshared): Ditto.
718 (pthread_mutexattr_gettype): Ditto.
719 (pthread_mutexattr_init): Ditto.
720 (pthread_mutexattr_setprioceiling): Ditto.
721 (pthread_mutexattr_setprotocol): Ditto.
722 (pthread_mutexattr_setpshared): Ditto.
723 (pthread_mutexattr_settype): Ditto.
724 (pthread_cond_destroy): Ditto.
725 (pthread_cond_signal): Ditto.
726 (pthread_cond_broadcast): Ditto.
727 (pthread_condattr_init): Ditto.
728 (pthread_condattr_destroy): Ditto.
729 (pthread_condattr_getpshared): Ditto.
730 (pthread_condattr_setpshared): Ditto.
731 (pthread_rwlock_destroy): Ditto.
732 (pthread_rwlock_rdlock): Ditto.
733 (pthread_rwlock_tryrdlock): Ditto.
734 (pthread_rwlock_wrlock): Ditto.
735 (pthread_rwlock_trywrlock): Ditto.
736 (pthread_rwlock_unlock): Ditto.
737 (pthread_rwlockattr_init): Ditto.
738 (pthread_rwlockattr_getpshared): Ditto.
739 (pthread_rwlockattr_setpshared): Ditto.
740 (pthread_rwlockattr_destroy): Ditto.
741 (pthread_getconcurrency): Ditto.
742 (pthread_setconcurrency): Ditto.
743 (pthread_getschedparam): Ditto.
744 (pthread_setschedparam): Ditto.
745
746 * thread.h (__pthread_attr_init): Remove prototype.
747 (__pthread_attr_destroy): Ditto.
748 (__pthread_attr_setdetachstate): Ditto.
749 (__pthread_attr_getdetachstate): Ditto.
750 (__pthread_attr_setstacksize): Ditto.
751 (__pthread_attr_getstacksize): Ditto.
752 (__pthread_attr_setinheritsched): Ditto.
753 (__pthread_attr_getinheritsched): Ditto.
754 (__pthread_attr_setschedparam): Ditto.
755 (__pthread_attr_getschedparam): Ditto.
756 (__pthread_attr_setschedpolicy): Ditto.
757 (__pthread_attr_getschedpolicy): Ditto.
758 (__pthread_attr_setscope): Ditto.
759 (__pthread_attr_getscope): Ditto.
760 (__pthread_attr_setstackaddr): Ditto.
761 (__pthread_attr_getstackaddr): Ditto.
762 (__pthread_key_create): Ditto.
763 (__pthread_key_delete): Ditto.
764 (__pthread_setspecific): Ditto.
765 (__pthread_getspecific): Ditto.
766 (__pthread_kill): Ditto.
767 (__pthread_sigmask): Ditto.
768 (__pthread_equal): Ditto.
769 (__pthread_mutex_lock): Ditto.
770 (__pthread_mutex_trylock): Ditto.
771 (__pthread_mutex_unlock): Ditto.
772 (__pthread_mutex_destroy): Ditto.
773 (__pthread_mutex_setprioceiling): Ditto.
774 (__pthread_mutex_getprioceiling): Ditto.
775 (__pthread_mutexattr_destroy): Ditto.
776 (__pthread_mutexattr_getprioceiling): Ditto.
777 (__pthread_mutexattr_getprotocol): Ditto.
778 (__pthread_mutexattr_getpshared): Ditto.
779 (__pthread_mutexattr_gettype): Ditto.
780 (__pthread_mutexattr_init): Ditto.
781 (__pthread_mutexattr_setprioceiling): Ditto.
782 (__pthread_mutexattr_setprotocol): Ditto.
783 (__pthread_mutexattr_setpshared): Ditto.
784 (__pthread_mutexattr_settype): Ditto.
785 (__pthread_cond_destroy): Ditto.
786 (__pthread_cond_signal): Ditto.
787 (__pthread_cond_broadcast): Ditto.
788 (__pthread_condattr_init): Ditto.
789 (__pthread_condattr_destroy): Ditto.
790 (__pthread_condattr_getpshared): Ditto.
791 (__pthread_condattr_setpshared): Ditto.
792 (__pthread_rwlock_destroy): Ditto.
793 (__pthread_rwlock_rdlock): Ditto.
794 (__pthread_rwlock_tryrdlock): Ditto.
795 (__pthread_rwlock_wrlock): Ditto.
796 (__pthread_rwlock_trywrlock): Ditto.
797 (__pthread_rwlock_unlock): Ditto.
798 (__pthread_rwlockattr_init): Ditto.
799 (__pthread_rwlockattr_getpshared): Ditto.
800 (__pthread_rwlockattr_setpshared): Ditto.
801 (__pthread_rwlockattr_destroy): Ditto.
802 (__pthread_getconcurrency): Ditto.
803 (__pthread_setconcurrency): Ditto.
804 (__pthread_getschedparam): Ditto.
805 (__pthread_setschedparam): Ditto.
806
807 * thread.cc: Rename __pthread_equal to pthread_equal throughout.
808 Change pthread_self parameter appropriate.
809 (__pthread_attr_init): Remove __ prefix. Change to extern "C".
810 (__pthread_attr_destroy): Ditto.
811 (__pthread_attr_setdetachstate): Ditto.
812 (__pthread_attr_getdetachstate): Ditto.
813 (__pthread_attr_setstacksize): Ditto.
814 (__pthread_attr_getstacksize): Ditto.
815 (__pthread_attr_setinheritsched): Ditto.
816 (__pthread_attr_getinheritsched): Ditto.
817 (__pthread_attr_setschedparam): Ditto.
818 (__pthread_attr_getschedparam): Ditto.
819 (__pthread_attr_setschedpolicy): Ditto.
820 (__pthread_attr_getschedpolicy): Ditto.
821 (__pthread_attr_setscope): Ditto.
822 (__pthread_attr_getscope): Ditto.
823 (__pthread_attr_setstackaddr): Ditto.
824 (__pthread_attr_getstackaddr): Ditto.
825 (__pthread_key_create): Ditto.
826 (__pthread_key_delete): Ditto.
827 (__pthread_setspecific): Ditto.
828 (__pthread_getspecific): Ditto.
829 (__pthread_kill): Ditto.
830 (__pthread_sigmask): Ditto.
831 (__pthread_equal): Ditto.
832 (__pthread_mutex_lock): Ditto.
833 (__pthread_mutex_trylock): Ditto.
834 (__pthread_mutex_unlock): Ditto.
835 (__pthread_mutex_destroy): Ditto.
836 (__pthread_mutex_setprioceiling): Ditto.
837 (__pthread_mutex_getprioceiling): Ditto.
838 (__pthread_mutexattr_destroy): Ditto.
839 (__pthread_mutexattr_getprioceiling): Ditto.
840 (__pthread_mutexattr_getprotocol): Ditto.
841 (__pthread_mutexattr_getpshared): Ditto.
842 (__pthread_mutexattr_gettype): Ditto.
843 (__pthread_mutexattr_init): Ditto.
844 (__pthread_mutexattr_setprioceiling): Ditto.
845 (__pthread_mutexattr_setprotocol): Ditto.
846 (__pthread_mutexattr_setpshared): Ditto.
847 (__pthread_mutexattr_settype): Ditto.
848 (__pthread_cond_destroy): Ditto.
849 (__pthread_cond_signal): Ditto.
850 (__pthread_cond_broadcast): Ditto.
851 (__pthread_condattr_init): Ditto.
852 (__pthread_condattr_destroy): Ditto.
853 (__pthread_condattr_getpshared): Ditto.
854 (__pthread_condattr_setpshared): Ditto.
855 (__pthread_rwlock_destroy): Ditto.
856 (__pthread_rwlock_rdlock): Ditto.
857 (__pthread_rwlock_tryrdlock): Ditto.
858 (__pthread_rwlock_wrlock): Ditto.
859 (__pthread_rwlock_trywrlock): Ditto.
860 (__pthread_rwlock_unlock): Ditto.
861 (__pthread_rwlockattr_init): Ditto.
862 (__pthread_rwlockattr_getpshared): Ditto.
863 (__pthread_rwlockattr_setpshared): Ditto.
864 (__pthread_rwlockattr_destroy): Ditto.
865 (__pthread_getconcurrency): Ditto.
866 (__pthread_setconcurrency): Ditto.
867 (__pthread_getschedparam): Ditto.
868 (__pthread_setschedparam): Ditto.
869
00d296a3
TP
8702003-03-18 Thomas Pfaff <tpfaff@gmx.net>
871
872 * cygwin.din: Add pthread_rwlock_destroy, pthread_rwlock_init,
873 pthread_rwlock_rdlock, pthread_rwlock_tryrdlock,
874 pthread_rwlock_wrlock, pthread_rwlock_trywrlock,
875 pthread_rwlock_unlock, pthread_rwlockattr_init,
876 pthread_rwlockattr_getpshared, pthread_rwlockattr_setpshared,
877 and pthread_rwlockattr_destroy.
878 * include/cygwin/version.h: Bump API minor number.
879 * include/pthread.h (PTHREAD_RWLOCK_INITIALIZER): Define a
880 reasonable value.
881 Add prototypes for pthread_rwlock_destroy, pthread_rwlock_init,
882 pthread_rwlock_rdlock, pthread_rwlock_tryrdlock,
883 pthread_rwlock_wrlock, pthread_rwlock_trywrlock,
884 pthread_rwlock_unlock, pthread_rwlockattr_init,
885 pthread_rwlockattr_getpshared, pthread_rwlockattr_setpshared,
886 and pthread_rwlockattr_destroy.
887 * thread.h (PTHREAD_ONCE_MAGIC): Remove superflous semicolon.
888 (PTHREAD_RWLOCK_MAGIC): New define.
889 (PTHREAD_RWLOCKATTR_MAGIC): Ditto.
890 (pthread_rwlockattr): New class.
891 (pthread_rwlock): Ditto.
892 (MTinterface::rwlocks): New member.
893 (MTinterface::MTinterface): Initialize rwlocks.
894 Add prototypes for __pthread_rwlock_destroy,
895 __pthread_rwlock_wrlock, __pthread_rwlock_trywrlock,
896 __pthread_rwlock_unlock, __pthread_rwlockattr_init,
897 __pthread_rwlockattr_getpshared, __pthread_rwlockattr_setpshared,
898 and __pthread_rwlockattr_destroy.
899 * thread.cc (MTinterface::Init): Initialize rwlock internal mutex.
900 (MTinterface::fixup_after_fork): Fixup rwlocks after fork.
901 (pthread_rwlockattr::isGoodObject): Implement.
902 (pthread_rwlockattr::pthread_rwlockattr): Ditto.
903 (pthread_rwlockattr::~pthread_rwlockattr): Ditto.
904 (pthread_rwlock::initMutex): Ditto.
905 (pthread_rwlock::pthread_rwlock): Ditto.
906 (pthread_rwlock::~pthread_rwlock): Ditto.
907 (pthread_rwlock::RdLock): Ditto.
908 (pthread_rwlock::TryRdLock): Ditto.
909 (pthread_rwlock::WrLock): Ditto.
910 (pthread_rwlock::TryWrLock): Ditto.
911 (pthread_rwlock::UnLock): Ditto.
912 (pthread_rwlock::addReader): Ditto.
913 (pthread_rwlock::removeReader): Ditto.
914 (pthread_rwlock::lookupReader): Ditto.
915 (pthread_rwlock::RdLockCleanup): Ditto.
916 (pthread_rwlock::WrLockCleanup): Ditto.
917 (pthread_rwlock::fixup_after_fork): Ditto.
918 (pthread_rwlock::isGoodObject): Ditto.
919 (pthread_rwlock::isGoodInitializer): Ditto.
920 (pthread_rwlock::isGoodInitializerOrObject): Ditto.
921 (pthread_rwlock::isGoodInitializerOrBadObject): Ditto.
922 (__pthread_rwlock_destroy): Ditto.
923 (pthread_rwlock::init): Ditto.
924 (__pthread_rwlock_rdlock): Ditto.
925 (__pthread_rwlock_tryrdlock): Ditto.
926 (__pthread_rwlock_wrlock): Ditto.
927 (__pthread_rwlock_trywrlock): Ditto.
928
f592b05d
TP
9292003-03-18 Thomas Pfaff <tpfaff@gmx.net>
930
931 * thread.h (pthread_cond::ExitingWait): Remove.
932 (pthread_cond::mutex): Ditto.
933 (pthread_cond::cond_access): Ditto.
934 (pthread_cond::win32_obj_id): Ditto.
935 (pthread_cond::TimedWait): Ditto.
936 (pthread_cond::BroadCast): Ditto.
937 (pthread_cond::Signal): Ditto.
938 (pthread_cond::waiting): Change type to unsigned long.
939 (pthread_cond::pending): New member.
940 (pthread_cond::semWait): Ditto.
941 (pthread_cond::mtxIn): Ditto.
942 (pthread_cond::mtxOut): Ditto.
943 (pthread_cond::mtxCond): Ditto.
944 (pthread_cond::UnBlock): New method.
945 (pthread_cond::Wait): Ditto.
946 * thread.cc: Update list of cancellation points.
947 (pthread_cond::pthread_cond): Rewrite.
948 (pthread_cond::~pthread_cond): Ditto.
949 (pthread_cond::TimedWait): Remove.
950 (pthread_cond::BroadCast): Ditto.
951 (pthread_cond::Signal): Ditto.
952 (pthread_cond::UnBlock): Implement.
953 (pthread_cond::Wait): Ditto.
954 (pthread_cond::fixup_after_fork): Rewrite.
955 (pthread_mutex::fixup_after_fork): Remove DETECT_BAD_APP
956 conditional.
957 (__pthread_cond_broadcast): Just return 0 if the condition is
958 not initialized. Call pthread_cond::UnBlock to release blocked
959 threads.
960 (__pthread_cond_signal): Ditto.
961 (__pthread_cond__dowait): Rewrite.
962 (pthread_cond_timedwait): Add pthread_testcancel call. Fix
963 waitlength calculation.
964 (pthread_cond_wait): Add pthread_testcancel call.
965
2ff03dc2
TP
9662003-03-18 Thomas Pfaff <tpfaff@gmx.net>
967
968 * include/pthread.h (PTHREAD_MUTEX_NORMAL): New define.
969 * thread.cc: Remove errno.h include.
970 (pthread::precreate): Change internal mutex type to normal.
971 (pthread_mutex::canBeUnlocked): Implement.
972 (pthread_mutex::pthread_mutex): Initialize lock_counter with 0.
973 (pthread_mutex::Lock): Rename to _Lock. Add self parameter.
974 Change lock_counter logic. Update SetOwner call.
975 (pthread_mutex::TryLock): Rename to _TryLock. Add self parameter.
976 Change lock_counter logic. Update SetOwner call.
977 (pthread_mutex::UnLock): Rename to _UnLock. Add self parameter.
978 Change lock_counter logic.
979 (pthread_mutex::Destroy): Rename to _Destroy. Update TryLock call.
980 (pthread_mutex::SetOwner): Move to thread.h as inline.
981 (pthread_mutex::LockRecursive): Ditto.
982 (pthread_mutex::fixup_after_fork): Change lock_counter logic.
983 (__pthread_mutexattr_settype): Add PTHREAD_MUTEX_NORMAL to valid
984 types check.
985 * thread.h: Include errno.h and limits.h.
986 (MUTEX_LOCK_COUNTER_INITIAL): Remove.
987 (MUTEX_OWNER_ANONYMOUS): New define.
988 (pthread_mutex::canBeUnlocked): New static method.
989 (pthread_mutex::lock_counter): Change type to unsigned long.
990 (pthread_mutex::GetPthreadSelf): New method.
991 (pthread_mutex::Lock): Call _Lock with pthread_self pointer.
992 (pthread_mutex::TryLock): Call _TryLock with pthread_self pointer.
993 (pthread_mutex::UnLock): Call _UnLock with pthread_self pointer.
994 (pthread_mutex::Destroy): Call _Destroy with pthread_self pointer.
995 (pthread_mutex::SetOwner): Moved from thread.cc as inline.
996 (pthread_mutex::LockRecursive): Ditto.
997 (pthread_mutex::_Lock): New method.
998 (pthread_mutex::_TryLock): New method.
999 (pthread_mutex::_UnLock): New method.
1000 (pthread_mutex::_Destroy): New method.
1001
dcd350f0
CV
10022003-03-18 Christopher January <chris@atomice.net>
1003
1004 * fhandler_proc.cc (format_proc_cpuinfo): Use IsProcessorFeaturePresent
1005 only on Windows NT. Read CPU Mhz value only on NT. Revert previous
1006 change so cpuid instruction is called even on non-NT systems.
1007
c51dc9c2
CV
10082003-03-17 Corinna Vinschen <corinna@vinschen.de>
1009
a2105d93 1010 * glob.c (g_lstat): Change API minor test to match API minor number
c51dc9c2
CV
1011 change in previous patch.
1012 (g_stat): Ditto.
1013
f194ba1f
CF
10142003-03-17 Christopher Faylor <cgf@redhat.com>
1015
1016 * include/cygwin/version.h: Reorganize last two api versions so that
1017 btowc and trunc exports show up before previous bump since there has
1018 been no exported version of the DLL with the 64 bit changes yet but
1019 1.3.22 will have the btowc and trunc.
1020
3543669f
CF
10212003-03-17 Christopher Faylor <cgf@redhat.com>
1022
1023 * cygwin.din: Export btowc, trunc.
1024 * include/cygwin/version.h: Reflect new exports.
1025 * syscalls.cc (_stat): Rename to stat to avoid newlib wrapper.
1026 * syscalls.cc (_fstat): Ditto.
1027
10282003-03-16 Christopher Faylor <cgf@redhat.com>
1029
1030 * fhandler_console.cc (fhandler_console::close): Correct check for
1031 current tty. Add debugging output when console is freed.
1032 (set_console_state_for_spawn): Add debugging output.
1033 * fhandler_tty.cc (fhandler_tty_slave::open): Don't decrement console
1034 open flag when vforking.
1035 * sigproc.cc (sigproc_terminate): Fix debugging output.
1036 * spawn.cc (handle): Eliminate second argument.
1037 (spawn_guts): Reflect elimination of argument change to handle.
1038 * syscalls.cc (setsid): Add debugging output when console is freed.
1039
10402003-03-14 Christopher Faylor <cgf@redhat.com>
1041
1042 * syscalls.cc (rename): Revert assumption that DELETE_ON_CLOSE works on
1043 Win9x.
1044
41ffdfa5
CF
10452003-03-13 Christopher Faylor <cgf@redhat.com>
1046
1047 * include/cygwin/version.h: Bump DLL minor number to 23.
1048
5b186cd9
CV
10492003-03-13 Corinna Vinschen <corinna@vinschen.de>
1050
1051 * autoload.cc (IsProcessorFeaturePresent): Add.
1052 * fhandler_proc.cc (format_proc_cpuinfo): Add case for 9x systems.
1053
c58555c7
CV
10542003-03-13 Corinna Vinschen <corinna@vinschen.de>
1055
1056 * fhandler_proc.cc (format_proc_cpuinfo): Fix vendor id in cpuid case.
1057
49a0d53c
CV
10582003-03-13 Corinna Vinschen <corinna@vinschen.de>
1059
1060 * net.cc (cygwin_rcmd): Use correct file descriptor in call to fdsock.
1061 (cygwin_rexec): Ditto.
1062
6fcd5661
CF
10632003-03-13 Christopher Faylor <cgf@redhat.com>
1064
1065 * fhandler_tty.cc (fhandler_tty_slave::close): Fix typo in debug
1066 output.
1067
1068 * syscalls.cc (rename): Assume that DELETE_ON_CLOSE works on Win9x.
1069
aa39b7f7
CV
10702003-03-11 Corinna Vinschen <corinna@vinschen.de>
1071
1072 * fhandler_socket.cc (fhandler_socket::dup): Don't call
1073 fhandler_base::dup() but call DuplicateHandle directly instead to have
1074 control over socket inheritence.
1075
2afa7f58
CV
10762003-03-11 Corinna Vinschen <corinna@vinschen.de>
1077
1078 * fhandler_socket.cc (fhandler_socket::dup): On NT systems avoid
1079 using WinSock2 socket duplication methods. Add comment.
1080
10812003-03-11 Pierre Humblet <pierre.humblet@ieee.org>
1082
1083 * fhandler_socket.cc (fhandler_socket::fixup_after_fork):
1084 Set io_handle to INVALID_SOCKET in case of failure.
1085 (fhandler_socket::dup): Return 0 if the io_handle is valid.
1086
556ceaeb
CV
10872003-03-10 Corinna Vinschen <corinna@vinschen.de>
1088
1089 * sec_acl.cc (setacl): Don't handle DELETE flag specially.
1090 * security.cc (alloc_sd): Ditto.
1091
a201401c
CV
10922003-03-09 Corinna Vinschen <corinna@vinschen.de>
1093
6bbf711e 1094 * winver.rc: Change Copyright hint to include 2003.
a201401c 1095
b1aae492
CV
10962003-03-09 Corinna Vinschen <corinna@vinschen.de>
1097
1098 Switch to 32/64 datatypes:
1099 * Makefile.in (OBSOLETE_FUNCTIONS): Add open acl aclcheck aclfrommode
1100 aclfrompbits aclfromtext aclsort acltomode acltopbits acltotext chown
1101 facl fchown fgetpos fopen freopen fseeko fsetpos fstat ftello
1102 ftruncate getegid geteuid getgid getgrent getgrgid getgrnam getgroups
1103 getpwuid getpwuid_r getuid initgroups lchown lseek lstat mknod mmap
1104 seekdir setegid seteuid setgid setgroups setregid setreuid setuid stat
1105 telldir truncate.
1106 (NEW_FUNCTIONS): Add _open64 acl32 aclcheck32 aclfrommode32
1107 aclfrompbits32 aclfromtext32 aclsort32 acltomode32 acltopbits32
1108 acltotext32 chown32 facl32 fchown32 fgetpos64 fopen64 freopen64
1109 fseeko64 fsetpos64 fstat64 ftello64 ftruncate64 getegid32 geteuid32
1110 getgid32 getgrent32 getgrgid32 getgrnam32 getgroups32 getpwuid32
1111 getpwuid_r32 getuid32 initgroups32 lchown32 lseek64 lstat64 mknod32
1112 mmap64 seekdir64 setegid32 seteuid32 setgid32 setgroups32 setregid32
1113 setreuid32 setuid32 stat64 telldir64 truncate64 to substitute the
1114 above.
1115 * cygserver_shm.h (class client_request_shm): Change uid_t and gid_t
1116 members to __uid32_t and __gid32_t.
1117 * cygwin.din: Add symbols acl32 aclcheck32 aclfrommode32
1118 aclfrompbits32 aclfromtext32 aclsort32 acltomode32 acltopbits32
1119 acltotext32 facl32 fgetpos64 fopen64 freopen64 fseeko64 fsetpos64
1120 _fstat64 ftello64 _lseek64 mknod32 _open64.
1121 * glob.c: Include perprocess.h.
1122 (globtilde): Call getpwuid32 and getuid32 instead of getpwuid and
1123 getuid.
1124 (g_lstat): Check for applications API version to call the appropriate
1125 typed gl_lstat function.
1126 (g_stat): Ditto for gl_stat.
1127 * shm.cc (client_request_shm::client_request_shm): Call geteuid32
1128 and getegid32 instead of geteuid and getegid throughout.
1129 * syscalls.cc (_open64): New alias for open.
1130 (_lseek64): New alias for lseek64.
1131 (_fstat64): New alias for fseek64.
1132 (mknod32): New function.
1133 (mknod): Calls mknod32 now.
1134 * winsup.h: Make function declarations for getuid32, geteuid32,
1135 and getpwuid32 accessible for plain C sources. Add declarations
1136 for getegid32 and getpwnam.
1137 * include/cygwin/version.h: Bum API minor number to 78.
1138 * include/sys/cygwin.h: Guard C++ specific members of struct
1139 per_process against inclusion in plain C sources.
1140 * include/sys/mman.h (mman): Add guard to avoid type clash when
1141 compiling Cygwin.
1142
659fb3ff
CF
11432003-03-09 Christopher Faylor <cgf@redhat.com>
1144
d580d86c 1145 * include/cygwin/version.h: Bump DLL minor number to 22.
659fb3ff 1146
c367dfd0
CF
11472003-03-09 Christopher Faylor <cgf@redhat.com>
1148
1149 Do some minor reformatting of 'extern "C"' use throughout.
1150
11512003-03-06 Christopher January <chris@atomice.net>
1152
1153 * autoload.cc (GetSystemTimes): Define new autoload function.
1154 * fhandler_proc.cc (proc_listing): Add cpuinfo and partitions entries.
1155 (fhandler_proc::fill_filebuf): Add PROC_CPUINFO and PROC_PARTITIONS
1156 cases.
1157 (format_proc_uptime): Use GetSystemTimes if available.
1158 (read_value): New macro.
1159 (print): New macro.
1160 (cpuid): New function.
1161 (can_set_flag): New function.
1162 (format_proc_cpuinfo): New function.
1163 (format_proc_partitions): New function.
1164
36c4a441
CF
11652003-03-09 Christopher Faylor <cgf@redhat.com>
1166
1167 * syscalls.cc (unlink): Attempt to be more clever about setting
1168 attributes of file. Only open file in query mode to avoid having to
1169 mess with security stuff for reading.
1170
639ebe29
CV
11712003-03-09 Corinna Vinschen <corinna@vinschen.de>
1172
1173 * rmsym: Fix regular expression.
1174
3a1d827f
CF
11752003-03-09 Christopher Faylor <cgf@redhat.com>
1176
1177 * Makefile.in: Change from using new-* to cygwin0 for temporary
1178 targets.
1179
ca0e9071
CV
11802003-03-09 Corinna Vinschen <corinna@vinschen.de>
1181
1182 * include/cygwin/socket.h: Set SOMAXCONN to Winsock2 value.
1183
ed269cea
CF
11842003-03-08 Christopher Faylor <cgf@redhat.com>
1185
1186 * syscalls.cc (unlink): Always attempt to use FILE_FLAG_CLOSE_ON_DELETE
1187 to delete files since this allows us to preserve the protection of hard
1188 linked files.
1189 (link): Generate full path for potentially recalculated .lnk target.
1190
1114c3d0
CF
11912003-03-08 Christopher Faylor <cgf@redhat.com>
1192
1193 Revert below changes regarding _pinfo::cmdline.
1194
d66ac2bc
CV
11952003-03-08 Corinna Vinschen <corinna@vinschen.de>
1196
1197 * external.cc (cygwin_internal): Change n to __off64_t to match change
1198 of _pinfo::cmdline.
1199 * fhandler.h (class fhandler_virtual): Change filesize member to
1200 __off64_t.
1201 * fhandler_proc.cc (format_proc_meminfo): Change to return __off64_t.
1202 (format_proc_stat): Ditto.
1203 (format_proc_uptime): Ditto.
1204 * fhandler_process.cc (format_process_stat): Ditto.
1205 (format_process_status): Ditto.
1206 (format_process_statm): Ditto.
1207 * pinfo.cc (_pinfo::cmdline): Expect __off64_t parameter.
1208 * pinfo.h (class _pinfo): Change declaration of cmdline accordingly.
1209
762520f3
CF
12102003-03-07 Christopher Faylor <cgf@redhat.com>
1211
1212 * path.h (PATH_LNK): New enum val.
1213 (path_conv::is_lnk_symlink): New function. True if path represents
1214 .lnk style symlink.
1215 * path.cc (check_shortcut): Set PATH_LNK in pflags when appropriate.
1216 (symlink_info::check): Ditto. Remove PATH_LNK from pflags initially.
1217 * syscalls.cc (unlink): Always remove readonly attribute from a symlink
1218 regardless of type.
1219 (link): (from Corinna Vinschen) Allow links to symlinks. Reset
1220 attributes on a symlink after successful link creation.
1221 (chmod): Use is_lnk_symlink where appropriate.
1222 (rename): Ditto.
1223
12242003-03-07 Pierre Humblet <pierre.humblet@ieee.org>
1225
1226 * tty.cc (create_tty_master): Call GetComputerName instead of
1227 cygwin_gethostname. Set ut_id.
1228 * syscalls.cc (login): Call endutent.
1229 (setutent): Do not seek after a fresh open.
1230
6f8102cb
CV
12312003-03-07 Corinna Vinschen <corinna@vinschen.de>
1232
1233 * syscalls.cc (seteuid32): Fix formatting.
1234
88243328
TP
12352003-03-04 Thomas Pfaff <tpfaff@gmx.net>
1236
1237 * thread.cc (MTinterface::fixup_after_fork): Initialize mainthread
1238 prior to pthread objects.
762520f3 1239
12390bc4
CV
12402003-03-04 Jason Tishler <jason@tishler.net>
1241
1242 * fhandler_socket.cc (fhandler_socket::dup): Initialize type.
1243
c418817e
CF
12442003-03-03 Christopher Faylor <cgf@redhat.com>
1245
1246 * fhandler.h (fhandler_tty_slave::close): Declare new function.
1247 (fhandler_tty_slave::dup): Declare new function.
1248 (fhandler_tty_slave::fixup_after_function): Declare new function.
1249 * fhandler_tty.cc (fhandler_tty_slave_open): Only increment
1250 fhandler_console::open_fhs when associated with a pty.
1251 (fhandler_tty_slave::close): Define new function. Decrement
1252 fhandler_console::open_fhs when associated with a pty.
1253 (fhandler_tty_slave::dup): Define new function. Increment
1254 fhandler_console::open_fhs when associated with a pty.
1255 (fhandler_tty_slave::fixup_after_fork): Define new function. Increment
1256 fhandler_console::open_fhs when associated with a pty.
1257
e11fe31b
CF
12582003-03-03 Christopher Faylor <cgf@redhat.com>
1259
1260 * fhandler_tty.cc (fhandler_pty_slave::open): Grudgingly increment
1261 fhandler_console::open_fhs here.
1262 (fhandler_pty_slave::close): Ditto for close.
1263
cffdb4b1
CF
12642003-03-02 Christopher Faylor <cgf@redhat.com>
1265
1266 * lib/getopt.c: Refresh from NetBSD sources.
1267
d5d2ffee
CF
12682003-03-02 Christopher Faylor <cgf@redhat.com>
1269
1270 * fhandler_console.cc (fhandler_console::close): Don't decrement
1271 in use counter if in vfork fixup stage.
1272
c2c6b170
CF
12732003-03-02 Christopher Faylor <cgf@redhat.com>
1274
1275 * lib/getopt.c: Nuke use of unneeded BSDisms.
1276
8b19b43d
CF
12772003-03-02 Christopher Faylor <cgf@redhat.com>
1278
1279 * dll_init.cc (dll_list::load_after_fork): Don't revert to LoadLibrary
1280 if LoadLibraryEx fails.
1281 * dtable.cc (dtable::dec_console_fds): Eliminate.
1282 (dtable::release): Don't treat console specially.
1283 (dtable::build_fhandler): Ditto.
1284 * dtable.h (console_fds): Eliminate.
1285 (dtable::dec_console_fds): Eliminate.
1286 (dtable::inc_console_fds): Eliminate.
1287 * fhandler.h (fhandler_console::open_fhs): New static element.
1288 * fhandler_console.cc (fhandler_console::open): Increment open_fs.
1289 (fhandler_console::close): Call FreeConsole if no more open consoles
1290 and ctty is not associated with the console.
1291 * syscalls.cc (setsid): Simplify check for when to call FreeConsole.
1292 (check_pty_fds): Eliminate definition.
1293 * winsup.h (check_pty_fds): Eliminate declaration.
1294
3efc65f7
CF
12952003-03-02 Christopher Faylor <cgf@redhat.com>
1296
1297 * dll_init.cc (dll_list::load_after_fork): Fix typo where result of
1298 LoadLibrary was ignored.
1299
5a082e9e
CV
13002003-03-01 Corinna Vinschen <corinna@vinschen.de>
1301
1302 * fhandler_socket.cc (fhandler_socket::bind): Open and write socket
1303 file using Win32 calls.
1304
9d913f07
CV
13052003-03-01 Corinna Vinschen <corinna@vinschen.de>
1306
1307 * fhandler_socket.cc (get_inet_addr): Open and read socket file using
1308 Win32 calls.
1309
005c3065
CF
13102003-02-28 Christopher Faylor <cgf@redhat.com>
1311
1312 * cygwin.din: Wrap atexit and exit with cygwin, thread-safe functions.
1313 * dcrt0.cc (cygwin_atexit): New function.
1314 (cygwin_exit): Ditto.
1315
27b4082a
PH
13162003-02-28 Pierre Humblet <pierre.humblet@ieee.org>
1317
1318 * syscalls.cc (fstat64): Pass get_name () to pc.
005c3065 1319 (access): Pass fn to stat_worker.
27b4082a
PH
1320
13212003-03-27 Corinna Vinschen <corinna@vinschen.de>
5777b970
CV
1322
1323 * fhandler_socket.cc (class sock_event): New class managing Winsock
1324 events for interruptible socket calls.
1325 (fhandler_socket::connect): Move support for interruptible call to
1326 class sock_event. Use class object instead.
1327 (fhandler_socket::accept): Ditto. Remove useless casts.
1328
005c3065 13292003-03-27 Thomas Pfaff <tpfaff@gmx.net>
5777b970
CV
1330
1331 * fhandler_socket.cc (fhandler_socket::connect): Add support for
1332 an interruptable connect.
1333
7b2ce663
CV
13342003-02-27 Pierre Humblet <pierre.humblet@ieee.org>
1335
1336 * uinfo.cc (internal_getlogin): Only update user.groups.pgsid
1337 if the call to set the primary group succeeds.
1338
0e7a60fe
CF
13392003-02-27 Christopher Faylor <cgf@redhat.com>
1340
1341 * cygthread::detach: Improve error message.
1342
61a52599
CV
13432003-02-26 Pierre Humblet <pierre.humblet@ieee.org>
1344
1345 * sec_helper.cc (get_sids_info): debug_print owner_sid and group_sid.
1346
6b9a9ce6
CV
13472003-02-25 Corinna Vinschen <corinna@vinschen.de>
1348
1349 * mmap.cc (mmap64): Fix returned address by taking the granularity
1350 into account.
1351
1ffc44aa
PH
13522003-02-23 Pierre Humblet <pierre.humblet@ieee.org>
1353
1354 * syslog.cc (syslog): Do not unlock the file before closing it
1355 and remove debug_printf about stream errors.
1356
a066f364
CF
13572003-02-22 Christopher Faylor <cgf@redhat.com>
1358
1359 * cygmalloc.h: Remove MORECORE_CANNOT_TRIM. It's not true.
1360 # cygwin.din: Export mallinfo.
1361 # malloc_wrapper.cc (mallinfo): New function.
1362
878e60c5
CF
13632003-02-22 Pierre Humblet <pierre.humblet@ieee.org>
1364
1365 * syslog.cc (syslog): Do not print the Windows pid. Print the Cygwin
1366 pid as an unsigned decimal. On Win95 print a timestamp and attempt to
1367 lock the file up to four times in 3 ms.
1368
b1d1e50d
CV
13692003-02-21 Corinna Vinschen <corinna@vinschen.de>
1370
1371 * fhandler_socket.cc (fhandler_socket::fhandler_socket): Fix compiler
1372 warning.
1373 (fhandler_socket::fstat): Simplify. Set st_uid/st_gid to effective
1374 uid/gid of current process in case of open sockets.
1375
cf762b08
CV
13762003-02-21 Corinna Vinschen <corinna@vinschen.de>
1377
1378 * dtable.cc (dtable::build_fhandler_from_name): Set some fhandler
1379 data on sockets to evaluate AF_LOCAL sockets correctly.
1380 (dtable::build_fhandler): Set unit number on sockets.
1381 * fhandler.h (fhandler_socket): Add unit number.
1382 (fhandler_socket::get_unit): New method.
1383 * fhandler_socket.cc (fhandler_socket::fhandler_socket): Set unit
1384 number.
1385 (fhandler_socket::fstat): Reorganize to return more Linux-like
1386 values.
1387 * net.cc: include ctype.h.
1388 (fdsock): Set unit number when building fhandler.
1389 * path.cc (path_conv::check): Set device type to FH_SOCKET if file
1390 is a AF_UNIX socket.
1391 (get_devn): Evaluate unit for virtual socket devices.
1392 (win32_device_name): Set windows path for sockets to unix_path with
1393 just backslashes to keep the different names.
1394 * syscalls.cc (fstat64): Don't override st_ino, st_dev and st_rdev
1395 for sockets.
1396 (stat_worker): Ditto.
1397
13982003-02-21 Pierre Humblet <pierre.humblet@ieee.org>
1399
1400 * autoload.cc (AccessCheck): Add.
1401 (DuplicateToken): Add.
1402 * security.h (check_file_access): Declare.
1403 * syscalls.cc (access): Convert path to Windows, check existence
1404 and readonly attribute. Call check_file_access instead of acl_access.
1405 * security.cc (check_file_access): Create.
1406 * sec_acl (acl_access): Delete.
1407
5cd82412
CF
14082003-02-19 Christopher Faylor <cgf@redhat.com>
1409
1410 * fhandler.cc (fhandler_base::open): Move some filesystem specific
1411 stuff.
1412 (fhandler_disk_file::open): Accept some filesystem specific stuff.
1413 * sigproc.cc (wait_for_sigthread): Become slightly more thread safe.
1414 (sig_send): Don't assume that signal thread is ready.
1415
892d8962
CV
14162003-02-20 Corinna Vinschen <corinna@vinschen.de>
1417
1418 * wincap.h (wincap): Remove unnecessary definition of
1419 supports_sparse_files.
1420 * wincap.cc: Ditto.
1421
518f5d49
CV
14222003-02-20 Corinna Vinschen <corinna@vinschen.de>
1423
1424 * fhandler_disk_file.cc (fhandler_disk_file::opendir): Check descriptor
1425 created by cygheap_fdnew constructor.
1426 * fhandler_virtual.cc (fhandler_virtual::opendir): Ditto.
1427 * fhandler_socket.cc (fhandler_socket::accept): Ditto and move
1428 creation of file descriptor behind blocking OS call.
1429 * net.cc (cygwin_socket): Ditto.
1430 (cygwin_rcmd): Ditto.
1431 (cygwin_rresvport): Ditto.
1432 (cygwin_rexec): Ditto.
1433 (socketpair): Ditto.
1434
3a88cf1b
CV
14352003-02-20 Corinna Vinschen <corinna@vinschen.de>
1436
1437 * autoload.cc (GetCompressedFileSize): Add.
1438 * fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): Compute
1439 st_blocks value from GetCompressedFileSize() if available.
1440
79207923
CV
14412003-02-18 Vaclav Haisman <V.Haisman@sh.cvut.cz>
1442
1443 * wincap.h (wincaps::supports_sparse_files): New flag.
1444 (wincapc::supports_sparse_files): New method.
1445 * wincap.cc (wincap_unknown): Define value for the new flag.
1446 (wincap_95): Ditto.
1447 (wincap_95osr2): Ditto.
1448 (wincap_98): Ditto.
1449 (wincap_98se): Ditto.
1450 (wincap_me): Ditto.
1451 (wincap_nt3): Ditto.
1452 (wincap_nt4): Ditto.
1453 (wincap_nt4sp4): Ditto.
1454 (wincap_2000): Ditto.
1455 (wincap_xp): Ditto.
1456 * path.h (path_conv::fs_flags): New method.
005c3065
CF
1457 * fhandler_disk_file.cc: Include winioctl.h for DeviceIoControl.
1458 (fhandler_disk_file::open): Set newly created and truncated files as
79207923
CV
1459 sparse on platforms that support it.
1460
afe13e84
CV
14612003-02-17 Pierre Humblet <pierre.humblet@ieee.org>
1462
1463 * grp.cc (internal_getgroups): Handle properly tokens with
1464 no groups. Fix bug introduced on 2003-02-04.
1465
8fc16812
CF
14662003-02-16 Christopher Faylor <cgf@redhat.com>
1467
408e9b2f 1468 * cygwin.din: Export all appropriate newlib libm functions. Sort.
8fc16812
CF
1469 * include/cygwin/version.h: Bump API minor number.
1470
f655eadf
CF
14712003-02-15 Christopher Faylor <cgf@redhat.com>
1472
8fc16812 1473 * cygwin.din: Export all appropriate newlib libc functions.
f655eadf
CF
1474 * include/cygwin/version.h: Bump API minor number.
1475
4d9ba012
CV
14762003-02-14 Jason Tishler <jason@tishler.net>
1477
1478 * mmap.cc (mprotect): Add missing break.
1479
dff01e3a
CF
14802003-02-13 Christopher Faylor <cgf@redhat.com>
1481
1482 * exceptions.cc (try_to_debug): Don't reset priority when returning
1483 from non-waitloop call.
d1d1797e
CF
1484
14852003-02-13 Vaclav Haisman <V.Haisman@sh.cvut.cz>
005c3065 1486 Christopher Faylor <cgf@redhat.com>
d1d1797e
CF
1487
1488 * fhandler_console.cc (fhandler_console::write_normal): Use MessageBeep
1489 for bell sound.
1490 * autoload.cc (MessageBeep): Add.
1491
97c61aeb
CF
14922003-02-13 Christopher Faylor <cgf@redhat.com>
1493
1494 * include/cygwin/types.h: Use correct ifdef guard for u_ definitions.
1495
a200c081
CF
14962003-02-13 Christopher Faylor <cgf@redhat.com>
1497
1498 * environ.cc (environ_init): Use strechr.
1499
2858de3a
CF
15002003-02-13 Christopher Faylor <cgf@redhat.com>
1501
1502 * include/cygwin/in.h (sockaddr_in): Fix typo.
1503
75c8a70c
CF
15042003-02-12 Christopher Faylor <cgf@redhat.com>
1505
1506 * path.h (path_conv): Reorganize slightly.
1507
939d19b0
CF
15082003-02-12 Christopher Faylor <cgf@redhat.com>
1509
1510 * fhandler_tty.cc (process_input): Add sanity check to ensure that
1511 console typeahead is cleared on signal.
1512
7a44ba05
CF
15132003-02-12 Christopher Faylor <cgf@redhat.com>
1514
1515 * spawn.cc (linebuf::~linebuf): Resurrect commented out (for
1516 debugging?) code.
1517
407b8df6
CF
15182003-02-10 Ralf Habacker <ralf.habacker@freenet.de>
1519
1520 * include/cygwin/in.h (in_attr_t): Define new type.
1521 * include/arpa/inet.h (inet_addr): Change return type to in_addr_t.
1522 (inet_lnaof): Ditto.
1523 (inet_netof): Ditto.
1524 (inet_network): Ditto.
1525
15262003-02-10 Christopher Faylor <cgf@redhat.com>
1527
1528 * include/cygwin/types.h: Move many *_t typedefs here. Protect them
1529 with ifdefs.
1530 * fhandler_disk_file.cc (fhandler_disk_file::fstat): Change ntsec_atts to mode_t.
1531 * security.cc (get_attribute_from_acl): Accept mode_t attribute.
1532 (get_nt_attribute): Ditto.
1533 (get_file_attribute): Ditto.
1534 (get_nt_object_attribute): Ditto.
1535 (get_object_attribute): Ditto.
1536 * security.h: Reflect above changes.
1537 * syscalls.cc (chown_worker): Change attrib to mode_t.
1538
ad80bc42
CF
15392003-02-08 Christopher Faylor <cgf@redhat.com>
1540
67c64e3b 1541 * include/cygwin/version.h: Bump DLL minor number to 21.
ad80bc42
CF
1542
15432003-02-07 Christopher Faylor <cgf@redhat.com>
1544
1545 * malloc.cc (DEFAULT_MMAP_THRESHOLD): Bump down to 16MB thanks to below
1546 changes.
1547
4136fdb1
CV
15482003-02-07 Corinna Vinschen <corinna@vinschen.de>
1549
1550 * mmap.cc (mmap_record::alloc_map): De-inline. Add offset and length
1551 parameter. Only protect pages actually unused currently. Do job
1552 of map_map() when initializing a map.
1553 (mmap_record::map_map): Reduce functionality for the reuse case
1554 of private anonymous mapping.
1555 (mmap_record::fixup_map): Format change.
1556 (list::add_record): Add offset and length parameter to call
1557 mmap_record::alloc_map() correctly.
1558 (mmap64): Rename `l' variable to `map_list'. Accomodate above changes.
1559 (munmap): Rename `l' variable to `map_list'.
1560 (msync): Ditto.
1561 (fhandler_disk_file::mmap): Streamline code.
1562 (mprotect): Ditto.
1563 (fixup_mmaps_after_fork): Rename `l' variable to `map_list'.
1564
49b84ce4
CF
15652003-02-07 Vaclav Haisman <V.Haisman@sh.cvut.cz>
1566 Christopher Faylor <cgf@redhat.com>
1567
1568 * exceptions.cc (try_to_debug): Set priority of current thread rather
1569 than the main thread. Make busy waiting loop less busy. Restore
1570 priority when function returns.
1571
bc5b63ed
CF
15722003-02-07 Christopher Faylor <cgf@redhat.com>
1573
1574 * malloc.cc (DEFAULT_MMAP_THRESHOLD): Set high to avoid mmaps.
1575
15762003-02-07 Christopher Faylor <cgf@redhat.com>
1577
1578 * pipe.cc (fhandler_pipe::close): Avoid extraneous this->.
1579
1de8d164
CF
15802003-02-06 Christopher Faylor <cgf@redhat.com>
1581
1582 * heap.cc (heap_init): Remove debugging code.
1583
565e8015
CV
15842003-02-06 Pierre Humblet <pierre.humblet@ieee.org>
1585
1586 * security.h: Introduce names UNKNOWN_UID and UNKNOWN_GID and delete
1de8d164 1587 declaration of is_grp_member.
565e8015
CV
1588 * uinfo.cc (internal_getlogin): Use UNKNOWN_GID.
1589 * passwd.cc (pwdgrp::read_passwd): Use UNKNOWN_UID.
1590 * grp.cc (pwdgrp::read_group): Change group name to provide better
1591 feedback.
1592 (getgrgid): Use gid16togid32.
1593 * sec_helper.cc (is_grp_member): Delete.
1594
d238c1b4
CF
15952003-02-05 Christopher Faylor <cgf@redhat.com>
1596
1597 * path.cc: Change 'to_posix_p' to 'to_posix' throughout.
1598 (conv_path_list_buf_size): Accommodate relative paths.
1599
b7f52fe8
CF
16002003-02-05 Christopher Faylor <cgf@redhat.com>
1601
1602 * path.cc (etc::dir_changed): Fix debug printf.
1603
62cd433e
CV
16042003-02-05 Corinna Vinschen <corinna@vinschen.de>
1605
1606 * sec_acl.cc (setacl): Move all permission settings to beginning of
1607 loop. Set default rights to same values as in alloc_sd(). Set DELETE
1608 for owner and default owner only if S_IWOTH is given.
1609
16102003-02-05 Pierre Humblet <pierre.humblet@ieee.org>
1611
1612 * sec_acl.cc: Change all __aclent16_t to __aclent32_t except in
1613 wrapper function definitions. Replace call to the aclXYZ functions by
1614 calls aclXYZ32.
1615 (searchace): Change type of third argument to __uid32_t and use
1616 ILLEGAL_UID instead of -1;
1617 (setacl): Remove some initializations. Only give STANDARD_RIGHTS_WRITE
1618 for S_IWOTH. Replace -1 by ILLEGAL_UID.
1619 (getacl): Change type of owner_sid, group_sid and ace_sid to cygpsid.
1620 In last else clause, suppress second call to ace_sid.get_id and use
1621 TRUE in first call. Replace EqualSid by ==.
1622 (acl_access): Call internal_getgroups in USER and GROUP cases.
1623 (acecmp: Define static.
1624 (acl32): Create from 16 bit type.
1625 (facl32): Ditto.
1626 (lacl32): Ditto.
1627 (aclcheck32): Ditto.
1628 (aclsort32): Ditto.
1629 (acltomode32): Ditto.
1630 (aclfrommode32): Ditto.
1631 (acltopbits32): Ditto.
1632 (aclfrompbits32): Ditto.
1633 (acltotext32): Ditto.
1634 (aclfromtext32): Ditto, and use strechr.
1635 (acl16to32): Create.
1636 (acl): Make it a wrapper function.
1637 (facl): Ditto.
1638 (lacl): Ditto.
1639 (aclcheck): Ditto.
1640 (aclsort): Ditto.
1641 (acltomode): Ditto.
1642 (aclfrommode): Ditto.
1643 (acltopbits): Ditto.
1644 (aclfrompbits): Ditto.
1645 (acltotext): Ditto.
1646 (aclfromtext): Ditto.
1647 * security.cc (write_sd): Call set_process_privilege and check
1648 ownership.
1649 (alloc_sd): Remove call to set_process_privilege and the owner check.
1650
cadd065b
CF
16512003-02-05 Christopher Faylor <cgf@redhat.com>
1652
1653 * include/sys/cygwin.h: Use C-style comments.
1654
0c8455c3
CV
16552003-02-05 Pierre Humblet <pierre.humblet@ieee.org>
1656
1657 * sec_helper.cc (get_sids_info): New function.
1658 * security.cc (extract_nt_dom_user): Simplify with strechr.
1659 (get_user_groups): Initialize glen to MAX_SID_LEN.
1660 (get_user_local_groups): Ditto.
1661 (get_attribute_from_acl): Define ace_sid as cygpsid.
1662 (get_nt_attribute): Define owner_sid and group_sid as cygpsid.
1663 Call get_sids_info instead of cygsid.get_{u,g}id and is_grp_member.
1664 (get_nt_object_attribute): Ditto.
1665 (alloc_sd): Define ace_sid as cygpsid.
1666
5ae9331a
TP
16672003-02-04 Thomas Pfaff <tpfaff@gmx.net>
1668
1669 * syscalls.cc (struct system_cleanup_args): New struct.
1670 (system_cleanup): New function.
1671 (system): Use pthread_cleanup_push and _pop to save and restore
1672 signal handlers and sigprocmask.
1673
3dbafd87
CV
16742003-02-04 Corinna Vinschen <corinna@vinschen.de>
1675
1676 * path.cc (symlink): Create security attributes so that only the
1677 user can modify the symlink.
1678 * security.cc (set_security_attribute): Remove symlink special
1679 handling.
1680
0daf2561
CV
16812003-02-04 Pierre Humblet <pierre.humblet@ieee.org>
1682
1683 * grp.cc (internal_getgroups): Do not return without closing
1684 the process handle.
1685
4a21c2d5
CV
16862003-02-04 Pierre Humblet <pierre.humblet@ieee.org>
1687
1688 * security.h (class cygpsid): New class.
1689 (class cygsid): Use cygpsid as base. Remove members psid, get_id,
1690 get_uid, get_gid, string, debug_printf and the == and != operators.
1691 (cygsidlist::clear_supp): Only do work if setgroups has been called.
1692 * sec_helper.cc: Define sid_auth NO_COPY.
1693 (cygpsid::operator==): New operator.
1694 (cygpsid::get_id): New function.
1695 (cygpsid::string): New function.
1696 (cygsid::string): Delete.
1697 (cygsid::get_id): Delete.
1698 * pwdgrp.h: Change arguments of internal_getpwsid,
1699 internal_getgrsid and internal_getgroups to cygpsid.
1700 * passwd.cc (internal_getpwsid): Change argument from cygsid to cygpsid.
d238c1b4 1701 * grp.cc (internal_getgrsid): Ditto.
4a21c2d5
CV
1702 (internal_getgroups): Ditto.
1703
335556d5
CF
17042003-02-03 Christopher Faylor <cgf@redhat.com>
1705
1706 Eliminate most unneeded this-> pointers throughout.
1707
153e83c6
CV
17082003-02-03 Pierre Humblet <pierre.humblet@ieee.org>
1709
1710 * security.h: Add third argument to set_process_privilege.
1711 * autoload.cc: Add OpenThreadToken.
1712 * sec_helper.cc (set_process_privilege): Add and use use_thread
1713 argument.
1714 * security.cc (alloc_sd): Modify call to set_process_privilege.
1715 Remember the result in each process. If failed and file owner is not
1716 the user, fail.
1717
f0f3ea68
CV
17182003-02-03 Corinna Vinschen <corinna@vinschen.de>
1719
1720 * fhandler_socket.cc (fhandler_socket::recvfrom): Return buffer
1721 length and don't set errno in case of WSAEMSGSIZE error.
1722 (fhandler_socket::recvmsg): Ditto.
1723
6688a061
CF
17242003-02-01 Christopher Faylor <cgf@redhat.com>
1725
1726 * grp.cc (getgrent32): Only refresh group entries when at beginning.
1727 (internal_getgrsid): Only refresh if uninitialized.
1728 (internal_getgrent): Ditto.
1729 * passwd.cc (getpwent): Only refresh passwd entries when at beginning.
1730 (pwdgrp::read_passwd): linebuf *cannot* be NO_COPY.
1731 (internal_getpwsid): Only refresh if uninitialized.
1732 (getpass): No need to refresh passwd data here.
1733 * pwdgrp.h (refresh): Eliminate default.
1734
a5a93a62
CF
17352003-01-31 Christopher Faylor <cgf@redhat.com>
1736
1737 * dlfcn.cc (dlerror): Only report load errors once per error.
1738
b0a82a85
CF
17392003-01-31 Christopher Faylor <cgf@redhat.com>
1740
1741 * fhandler_serial.cc (fhandler_serial::open): Avoid extraneous setting
1742 of res.
1743
1744 * termios.cc (tcsetattr): Correctly record errno after tcsetattr call.
1745
17462003-01-31 Troy Curtiss <troyc@usa.net>
1747
1748 * fhandler_serial.cc (fhandler_serial::tcsetattr): Add error-checking
1749 so that if any Win32 SetComm*() calls fail, errno gets set to EINVAL
1750 and tcsetattr() returns -1. Catch invalid bitrates, mostly. If baud
1751 rate setting is B0, just drop DTR and leave Win32 DCB bitrate as-is
1752 since 0 is not a valid Win32 setting.
1753 (fhandler_serial::tcgetattr): If DTR is low, populate the bitrate as
1754 B0, otherwise get it from the DCB.
1755
949c3da1
CF
17562003-01-31 Christopher Faylor <cgf@redhat.com>
1757
1758 * passwd.cc (pwdgrp::read_passwd): linebuf *must* be static (from
1759 Pierre Humblet).
1760 * pwdgrp.h (pwdgrp::refresh): Avoid calling read function if we already
1761 have lock since that means we are in the process of reading the file.
1762
485d85bf
CF
17632003-01-31 Jason Tishler <jason@tishler.net>
1764
1765 * shared.cc (shared_info::heap_chunk_size): Use correct variable when
1766 reading HKLM.
1767
704ce461
CF
17682003-01-30 Christopher Faylor <cgf@redhat.com>
1769
1770 * fhandler_registry.cc (fhandler_registry::exists): Fix off-by-one
1771 error when inspecting path.
1772
ba6e1083
CF
17732003-01-29 Christopher Faylor <cgf@redhat.com>
1774
1775 * lib/getopt.c: Allow environment variable control of POSIXLY_INCORRECT
1776 behavior.
1777
17782003-01-28 Corinna Vinschen <corinna@vinschen.de>
01e3c897
CV
1779
1780 * fhandler_socket.cc (fhandler_socket::accept): On successful execution
1781 set connection state of returned socket to CONNECTED.
1782
dfb366da
CF
17832003-01-27 Christopher Faylor <cgf@redhat.com>
1784
1785 * passwd.cc (pwdgrp::parse_passwd): Be more unforgiving about
1786 non-numeric fields.
1787
03dba1de
CF
17882003-01-26 Christopher Faylor <cgf@redhat.com>
1789
1790 * uinfo.cc (pwdgrp::next_num): Remove check for NULL since it is no
1791 longer a valid return from next_str.
1792 (pwdgrp::add_line): Duh. Revert to use strchr.
1793
fea48988
CF
17942003-01-26 Christopher Faylor <cgf@redhat.com>
1795
ca6018a0 1796 * string.h (strechr): New function.
fea48988
CF
1797 * uinfo.cc (pwdgrp::next_str): Search only for input char in string.
1798 Return EOS on failure. Don't check for NULL since it shouldn't be
1799 possible.
1800 (pwdgrp::add_line): Revert to replacing '\n' in input line with '\0'.
1801 (pwdgrp::next_num): Pass explicit separator character to next_str.
1802 * grp.cc (pwdgrp::parse_group): Ditto.
1803 * passwd.cc (pwdgrp::parse_passwd): Ditto. Revamp test for garbage
1804 input.
1805 * pwdgrp.h (pwdgrp::next_str): Don't use default parameter.
1806
9a751621
CF
18072003-01-26 Christopher Faylor <cgf@redhat.com>
1808
1809 * uinfo.cc (pwdgrp::load): Regularize strace output. Add warning for
1810 CreateFile failure.
1811
c9133395
CF
18122003-01-26 Christopher Faylor <cgf@redhat.com>
1813
bdbd7fb6
CF
1814 * passwd.cc (pwdgrp::parse_passwd): Eliminate use of memset. The
1815 structure should always be completely filled out.
1816 * grp.cc (pwdgrp::parse_group): Ditto.
1817
18182003-01-26 Christopher Faylor <cgf@redhat.com>
1819
1820 * grp.cc (pwdgrp::parse_group): Fix off-by-one problem in allocating
c9133395 1821 gr_mem.
65037056
CF
1822
18232003-01-26 Christopher Faylor <cgf@redhat.com>
1824
1825 * include/sys/strace.h (paranoid_printf): Define as not being part of
1826 "all" output.
1827
18282003-01-25 Christopher Faylor <cgf@redhat.com>
1829
1830 * pwdgrp.h (pwdgrp::next_num): Rename from next_int. Returns
1831 true/false if parse operation succeeded.
1832 (pwdgrp::reparse): Remove.
1833 (pwdgrp::raw_ptr): New function. Returns pointer in line.
1834 (pwdgrp::next_num): New functions for parsing other than unsigned long.
1835 * grp.cc (pwdgrp::parse_group): Reinstate previous parsing behavior.
1836 Don't fill in fields with NULL and assign empty gr_mem to known pointer
1837 rather than doing a pointless calloc. Streamline gr_mem parsing.
1838 Don't increment curr_lines here.
1839 * passwd.cc (pwdgrp::parse_passwd): Use new behavior of next_num.
1840 Don't increment curr_lines here.
1841 * uinfo.cc (pwdgrp::next_str): Keep returning EOL if out of data.
1842 (pwdgrp::reparse): Remove.
1843 (pwdgrp::next_num): Rename from next_int. Return bool indicating
1844 success of parse, argument returns value parsed.
1845 (pwdgrp::add_line): Increment curr_lines here on successful parse.
1846 (pwdgrp::load): (from Pierre Humblet) Don't return status. Just report
1847 it here.
1848
a53ddfe6
CF
18492003-01-25 Christopher Faylor <cgf@redhat.com>
1850
1851 * pwdgrp.cc (pwdgrp::reparse): Declare.
1852 * uinfo.cc (pwdgrp::reparse): Define.
c9b99d0d 1853 * grp.cc (pwdgrp::parse_group): Use reparse.
a53ddfe6 1854
4f7e12dd
CV
18552003-01-25 Pierre Humblet <pierre.humblet@ieee.org>
1856
1857 * syscalls.cc (seteuid32): On Win95 get the pw entry. If it exists
1858 update the euid and call cygheap->user.set_name. Remove special
1859 handling of ILLEGAL_UID.
ba6e1083 1860 (setgid32): Add a debug_printf. On Win95, always set the egid.
4f7e12dd
CV
1861 Remove special handling of ILLEGAL_GID. Do not compare gid and gr_gid.
1862 * child_info.h (class cygheap_exec_info): Remove uid.
1863 * spawn.cc (spawn_guts): Do not set ciresrv.moreinfo->uid.
1864 * dcrto.cc (dll_crt0_1): Always call uinfo_init.
1865 * uinfo.cc (uinfo_init): Reorganize and close handle if needed.
1866 (cygheap_user::ontherange): Do not call internal_getpwnam if pw is NULL.
1867
45dbfc26
CF
18682003-01-24 Christopher Faylor <cgf@redhat.com>
1869
1870 * fhandler_console.cc (fhandler_console::send_winch_maybe): Reset
1871 scroll region if size changes.
1872
7d33eefa
CV
18732003-01-24 Pierre Humblet <pierre.humblet@ieee.org>
1874 Jason Tishler <jason@tishler.net>
1875
1876 * cygwin.din: Export setreuid32, setreuid, setregid32, setregid.
1877 * syscalls.cc (setreuid32): New function.
1878 (setreuid): Ditto.
1879 (setregid32): Ditto.
1880 (setregid): Ditto.
1881 * include/cygwin/version.h: Bump API minor number.
1882
ac413374 18832003-01-23 Christopher Faylor <cgf@redhat.com>
69fae986 1884
ac413374 1885 * pwdrp.h (pwdgrp::refresh): Lock entire test prior to reading.
2037688a 1886
ac413374 18872003-01-23 Christopher Faylor <cgf@redhat.com>
09a88426
CF
1888
1889 * grp.cc (pwdgrp::parse_group): Eliminate arg and use class member
1890 instead. Use next_str and next_int to parse arguments.
1891 * passwd.cc (pwdgrp::parse_passwd): Ditto.
1892 (grab_string): Eliminate.
1893 (grab_int): Ditto.
1894 * pwdgrp.h (pwdgrp::parse): Eliminate input arg.
1895 (pwdgrp::parse_passwd): Reflect above change.
1896 (pwdgrp::parse_group): Reflect above change.
1897 (pwdgrp::next_str): New function.
1898 (pwdgrp::next_int): Ditto.
1899 (pwdgrp::gets): Eliminate.
1900 * uinfo.cc (pwdgrp::next_str): New function.
1901 (pwdgrp::next_int): Ditto.
1902 (pwdgrp::add_line): Subsume gets.
1903 (pwdgrp::gets): Eliminate.
1904 (pwdgrp::load): Just call add_line to parse input buffer.
1905
ac413374
CF
19062003-01-22 Thomas Pfaff <tpfaff@gmx.net>
1907
1908 * include/pthread.h (PTHREAD_MUTEX_RECURSIVE): Revert changes from
1909 2003-01-09 mutex patch.
1910 (PTHREAD_MUTEX_ERRORCHECK): Ditto.
1911
19122003-01-22 Corinna Vinschen <corinna@vinschen.de>
1913
1914 * cygrun.c: Move from here to ../testsuite.
1915 * Makefile.in: Remove cygrun.exe dependencies.
1916
19172003-01-21 Jason Tishler <jason@tishler.net>
1918
1919 * cygwin.din: Export nanosleep().
1920 * signal.cc (nanosleep): New function.
1921 (sleep): Move old functionality to nanosleep(). Call nanosleep().
1922 (usleep): Remove old functionality. Call nanosleep().
1923 * include/cygwin/version.h: Bump API minor number.
1924
57394495
CF
19252003-01-21 Christopher Faylor <cgf@redhat.com>
1926
1927 * grp.cc: Call gr.refresh() rather than doing isunitialized tests
1928 throughout.
1929 (gr): Use constructor (sigh).
1930 (pwdgrp::parse_group): Rename from parse_grp.
1931 (pwdgrp::read_group): Rename from read_etc_group. Just call gr.load
1932 with a single argument.
1933 * passwd.cc: Call pr.refresh() rather than doing isunitialized tests
1934 throughout.
1935 (pr): Use constructor (sigh).
1936 (pwdgrp::parse_passwd): Rename from "parse_pwd".
1937 (pwdgrp::read_passwd): Rename from read_etc_passwd. Just call pr.load
1938 with a single argument.
1939 * pwdgrp.h (pwdgrp_state): Eliminate.
1940 (pwdgrp): Reflect above renamings.
1941 (pwdgrp::etc_ix): Rename from pwd_ix.
1942 (pwdgrp::read): New element.
1943 (pwdgrp::lock): New element.
1944 (pwdgrp::refresh): New function.
1945 (pwdgrp::load): Eliminate variations which take buffer arguments.
1946 (pwdgrp::pwdgrp): New constructors. Initialize mutex here.
1947 * uinfo.cc (pwdgrp::load): Accommodate pwd_ix -> etc_ix renaming.
1948 (pwdgrp::load): Set initialized state to true rather than setting state
1949 to loaded.
1950
984864e9
CF
19512003-01-21 Christopher Faylor <cgf@redhat.com>
1952
89f7e8d1 1953 * include/cygwin/version.h: Bump DLL minor number.
984864e9 1954
d8cde3a3
CF
19552003-01-21 Pierre Humblet <pierre.humblet@ieee.org>
1956
1957 * path.h (etc::change_possible): Revert the type to bool.
1958 (etc::set_last_modified): Remove obsolete function.
1959 * path.cc (etc::change_possible): Revert type to bool.
1960 (etc::test_file_change): Do not test for negative values of
1961 change_possible and do not set it to -res.
1962 (etc::dir_changed): When the handle is NULL, call memset instead of
09a88426
CF
1963 test_file_changed. When the handle is invalid, return true. Detect
1964 filename change in /etc.
d8cde3a3 1965 (etc::file_changed): Remove unneeded check for !fn[n].
33de631b 1966 * uinfo.cc (pwdgrp::load): Eliminate spurious setting of fh to NULL.
b99b804b 1967 * pwdgrp.h (pwdgrp::operator =): Eliminate.
d8cde3a3 1968
7905c4f1
CF
19692003-01-19 Christopher Faylor <cgf@redhat.com>
1970
1971 * pwdgrp.h (etc): Move to path.h.
1972 (pwdgrp::max_lines): New field.
1973 (pwdgrp::curr_lines): New field.
1974 (pwdgrp::pwdgrp_buf): Ditto.
1975 (pwdgrp_buf_elem_size): Ditto.
1976 (pwdgrp_parse): Ditto.
1977 (pwdgrp::gets): Just declare here.
1978 (pwdgrp::load): Ditto. Just take one argument.
1979 (pwdgrp::load): Define overloaded function accepting passwd buf.
1980 (pwdgrp::load): Define overloaded function accepting group buf.
1981 * grp.cc: Use pwdgrp elements rather than standalone static variables
1982 throughout.
1983 (curr_lines): Eliminate.
1984 (max_lines): Ditto.
1985 (add_grp_line): Ditto.
1986 (parse_grp): Define as returning boolean. Accept void * arg and line
1987 count. Coerce first argument into __group32 buf reference. Increment
1988 curr_line as appropriate.
1989 (read_etc_group): Pass pwdgrp buffer to gr.load.
1990 * passwd.cc: Use pwdgrp elements rather than standalone static variables
1991 throughout.
1992 (curr_lines): Eliminate.
1993 (max_lines): Ditto.
1994 (add_grp_line): Ditto.
1995 (parse_passwd): Define as returning boolean. Accept void * arg and line
1996 count. Coerce first argument into passwd buf reference. Increment
1997 curr_line as appropriate.
1998 (read_etc_group): Pass pwdgrp buffer to pr.load.
1999 * path.cc (etc::fn): Extend buffer size to allow index by 1 rather than
2000 zero.
2001 (etc::last_modified): Ditto.
2002 (etc::change_possible): Ditto. Renamed from sawchange. Change to
2003 signed char since elements are now tri-state.
2004 (etc::init): Assume "handle" is 1 based rather than 0.
2005 (etc::test_file_change): New function. Sets change_possible based on
2006 file date comparison.
2007 (etc::dir_changed): Check file states immediately after changed_h is
2008 initialized to avoid a race.
2009 (etc::file_changed): Use test_file_change to detect if file needs to be
2010 updated.
2011 * path.h (etc): Move class here from pwdgrp.h.
7905c4f1
CF
2012 * uinfo.cc: Move etc:: functions to path.cc. Move pwdgrp functions
2013 here.
2014 (pwdgrp::gets): Eliminate buf checks. Just check eptr and set lptr.
2015 (pwdgrp::add_line): New function.
2016 (pwdgrp::load): Call generic add_line function which will call correct
2017 parser.
2018
4c6a3e50
CF
20192003-01-17 Christopher Faylor <cgf@redhat.com>
2020
2021 * cygheap.cc: Change most 'int's to 'unsigned's.
2022 (_cmalloc): Only check for size of malloced region when calculating
97d2bc79 2023 bucket. Add overhead when performing the sbrk. Previous change broke
4c6a3e50
CF
2024 _crealloc.
2025
e9152439
CF
20262003-01-17 Christopher Faylor <cgf@redhat.com>
2027
2028 * dcrt0.cc (initialize_env): Use colon for CYGWIN_DEBUG separator.
2029 * grp.cc: Change most statics to NO_COPY throughout.
2030 * passwd.cc: Ditto.
2031
20322003-01-17 Christopher Faylor <cgf@redhat.com>
2033
2034 * pwdgrp.h: Change some BOOLs to bools.
2035 (pwdgrp::pwdgrp): Remove unneeded constructor.
2036 * passwd.cc: Change BOOL to bool throughout.
2037
afa378e7
CV
20382003-01-17 Corinna Vinschen <corinna@vinschen.de>
2039
2040 * cygwin.din: Add strerror_r.
2041 * include/cygwin/version.h: Bump API minor number.
2042
1de6f431
CF
20432003-01-17 Christopher Faylor <cgf@redhat.com>
2044
2045 * uinfo.cc (etc::dir_changed): Don't print a warning if can't open
2046 /etc, unless debugging.
2047
d8cde3a3 20482003-01-17 Pierre Humblet <pierre.humblet@ieee.org>
14ea5029
CF
2049
2050 * grp.cc (read_etc_group): On NT, add a line for gid = -1. Change name
2051 "unknown" to "mkgroup".
2052 (internal_getgrgid): Do not return default in nontsec case.
2053 (internal_getgroups): Add argument srchsid and look for it in groups if
2054 not NULL.
2055 * passwd.cc (read_etc_passwd): On NT, add a line for uid = -1. Use
2056 same default uid for Win95 and NT. Call cygheap_user::ontherange to
2057 initialize HOME.
2058
14ea5029
CF
20592003-01-16 Christopher Faylor <cgf@redhat.com>
2060
2061 * cygheap.cc (init_cygheap::etc_changed): Move to uinfo.cc.
2062 * cygheap.h (init_cygheap::etc_changed_h): Remove.
2063 (init_cygheap::etc_changed): Ditto.
2064 * grp.cc (group_state): Remove. Use gr instead throughout.
2065 (gr): Define as class pwdgrp.
2066 (read_etc_group): Remove gr definition. Remove calls to
2067 set_last_modified and close. Pass add_grp to gr.load to load file.
2068 * passwd.cc (passwd_state): Remove. Use pr instead, throughout.
2069 (pr): Define as class pwdgrp.
2070 (read_etc_passwd): Remove pr definition. Remove calls to
2071 set_last_modified and close. Pass add_pwd_line to pr.load to load
2072 file.
2073 * pwdgrp.h (etc): New helper class for pwdgrp.
2074 (pwdgrp): Combine pwdgrp_check and pwdgrp_read into one class. Remove
2075 file_w32 and last_modified fields.
2076 (pwdgrp::set_last_modified): Remove.
2077 (pwdgrp::isinitializing): Remove FindFirstFile stuff. Move to
2078 etc::file_changed.
2079 (pwdgrp::load): Rename from 'open'. Call etc::init to initialize etc
2080 scanning. Close file handle after reading buffer into memory. Parse
2081 buffer by calling second argument.
2082 (pwdgrp::gets): Reorganize slightly to rely on eptr starting at
5304bcdf 2083 beginning of buffer.
14ea5029
CF
2084 (pwdgrp::close): Remove.
2085 * uinfo.cc (etc::dir_changed): New function.
2086 (etc::init): Ditto.
2087 (etc::file_changed): Ditto.
2088 (etc::set_last_modified): Ditto.
2089
41429bc9
CV
20902003-01-16 Jason Tishler <jason@tishler.net>
2091
2092 * mmap.cc (fixup_mmaps_after_fork): Add ERROR_NOACCESS to the list of
2093 ReadProcessMemory() error codes that trigger a retry with temporary
2094 PAGE_READONLY access. Note that this can occur on NT 4.0.
2095
18813254
CF
20962003-01-15 Christopher Faylor <cgf@redhat.com>
2097
2098 * path.cc (normalize_posix_path): Convert win32 path separators to
2099 slashes when full path is specified.
2100
77cb0c56
CF
21012003-01-15 Pierre Humblet <pierre.humblet@ieee.org>
2102
2103 * cmalloc.cc (_cmalloc): Fix memory leak.
2104
ce542f78
CV
21052003-01-15 Corinna Vinschen <corinna@vinschen.de>
2106
2107 * autoload.cc: Fix copyright date.
2108 * fhandler_dsp.cc: Ditto.
2109 * mmap.cc: Ditto.
2110 * net.cc: Ditto.
2111 * ntdll.h: Ditto.
2112 * signal.cc: Ditto.
2113 * syscalls.cc: Ditto.
2114 * uname.cc: Ditto.
2115 * wait.cc: Ditto.
2116
15996b6f
CV
21172003-01-14 Corinna Vinschen <corinna@vinschen.de>
2118
2119 * mmap.cc (fixup_mmaps_after_fork): Copy protection to child process.
2120 Change ambiguous debug output.
2121
857b65dd
CV
21222003-01-14 Corinna Vinschen <corinna@vinschen.de>
2123
2124 * mmap.cc (mmap_record::access): Change argument type to caddr_t
2125 for strictness.
2126 (mprotect): Protect against calling VirtualProtect() for shared
2127 pages on 9x/Me.
2128 (fixup_mmaps_after_fork): If ReadProcessMemory() fails, try to
2129 change protection of parent page to PAGE_READONLY, then try again.
2130 Revert protection afterwards.
2131
e14328f4
TP
21322003-01-14 Thomas Pfaff <tpfaff@gmx.net>
2133
2134 * syscalls.cc (system): Add pthread_testcancel call.
2135 * thread.cc: Update list of cancellation points.
2136
4a3584c8
TP
21372003-01-14 Thomas Pfaff <tpfaff@gmx.net>
2138
2139 * wait.cc: Include thread.h
2140 (wait4): Add pthread_testcancel call.
2141 Wait for child process and cancellation event.
2142 * thread.cc: Update list of cancellation points.
2143
7ec66a2c
TP
21442003-01-14 Thomas Pfaff <tpfaff@gmx.net>
2145
2146 * signal.cc (sleep): Add pthread_testcancel call.
2147 Wait for signal and cancellation event.
2148 (usleep): Ditto.
2149
21502003-01-14 Thomas Pfaff <tpfaff@gmx.net>
3457ce4d
TP
2151
2152 * exceptions.cc (handle_sigsuspend): Add pthread_testcancel call.
2153 Wait for signal and cancellation event.
2154 * thread.cc: Update list of cancellation points.
2155
2673d5f2
CF
21562003-01-14 David Huang <davehzhr@hotmail.com>
2157
2158 * fhandler_dsp.cc (fhandler_dsp::ioctl): Add limited support for
2159 SNDCTL_DSP_GETFMTS.
2160
9f0d3f37
CF
21612003-01-12 Christopher Faylor <cgf@redhat.com>
2162
2163 * ntdll.h: Fix typo.
2164
7f129d87
CV
21652003-01-12 Corinna Vinschen <corinna@vinschen.de>
2166
2167 * uname.cc (uname): Use cygwin_gethostname() to retrieve hostname.
2168
ab2dbccc
CV
21692003-01-12 Pierre Humblet <pierre.humblet@ieee.org>
2170
2171 * sec_acl.cc (search_ace): Use id == -1, instead of < 0, as wildcard.
2172 (setacl): Start the search for a matching default at the next entry.
2173 Invalidate the type of merged entries instead of clearing it.
2174 Use well_known_creator for default owner and owning group and do
2175 not try to merge non-default and default entries in these cases.
2176 (getacl): Recognize well_known_creator for default owner and group.
2177 (acl_worker): Improve errno settings and streamline the nontsec case.
2178 * security.cc (write_sd): Remove the call to set_process_privilege.
2179 (alloc_sd): If the owner changes, call set_process_privilege and return
2180 immediately on failure. Change inheritance rules: on new directories add
2181 inherit only allow ACEs for creator_owner, creator_group and everyone.
2182 Preserve all inheritances through chmod and chown calls. Introduce
2183 isownergroup to implement the uid == gid case, to keep the inheritance
2184 code simple. Do not initialize owner_sid and group_sid and stop using
2185 the variable psd.
2186
68115c74
CF
21872003-01-10 Christopher Faylor <cgf@redhat.com>
2188
2189 * net.cc: Use gethostname define from winsock2.h.
2190
e3abf986
CF
21912003-01-10 Christopher Faylor <cgf@redhat.com>
2192
2193 * path.cc: Unrevert below reversion except for
2194 mount_info::conv_to_posix_path part.
2195
df2caa88
CV
21962003-01-10 Corinna Vinschen <corinna@vinschen.de>
2197
2198 * path.cc: Revert patch from 2003-01-09 to normalize a windows path
2199 rather than converting to posix.
2200
dc8d11f5
CV
22012003-01-10 Corinna Vinschen <corinna@vinschen.de>
2202
2203 * autoload.cc (gethostname): Make call optional, return 1 if function
2204 can't get loaded.
2205 * net.cc (cygwin_gethostname): Call GetComputerName if return value
2206 of gethostname is non-zero.
2207
70d61f30
CV
22082003-01-10 Charles Wilson <cwilson@ece.gatech.edu>
2209
8735f49f 2210 * cygwin.din: Add asprintf and vasprintf, as well as the reentrant
70d61f30 2211 versions and underscore variants.
8735f49f 2212 * include/cygwin/version.h: Bump CYGWIN_VERSION_API_MINOR.
70d61f30 2213
a7711767
CV
22142003-01-10 Corinna Vinschen <corinna@vinschen.de>
2215
2216 * net.cc (cygwin_gethostname): Fix call to wsock function gethostname.
2217
d5223b2b
CF
22182003-01-09 Christopher Faylor <cgf@redhat.com>
2219
2220 * cygthread.cc (cygthread::cygthread): Be more noisy about odd
2221 condition.
2222 * miscfuncs.cc (low_priority_sleep): Sleep in regular priority if
2223 that's what we're currently running at.
2224
65f207e8
TP
22252003-01-09 Thomas Pfaff <tpfaff@gmx.net>
2226
2227 * include/semaphore.h: Modify typedef for sem_t.
2228 * include/cygwin/types.h: Modify typedefs for pthread_t,
2229 pthread_mutex_t, pthread_key_t, pthread_attr_t,
2230 pthread_mutexattr_t, pthread_condattr_t, pthread_cond_t,
2231 pthread_rwlock_t and pthread_rwlockattr_t.
2232
09cbb9d6
TP
22332003-01-09 Thomas Pfaff <tpfaff@gmx.net>
2234
2235 * thread.h (WAIT_CANCELED): New define.
2236 (pthread::cancelable_wait): New static method.
2237 * thread.cc (pthread::cancelable_wait): Implement.
2238 (semaphore::Wait): Wait on semaphore and thread cancellation.
2239 (pthread::join): Wait on joined thread and thread cancellation.
2240 (semaphore::wait): Add testcancel to check for thread
2241 cancellation even if the semaphore is available.
2242
5d68d1de
TP
22432003-01-09 Thomas Pfaff <tpfaff@gmx.net>
2244
2245 * include/pthread.h: Add define for errorchecking mutexes.
2246 Change default mutex type.
2247 * thread.cc (pthread_cond::TimedWait): Update mutex unlock
2248 calls.
2249 (pthread_mutex::pthread_mutex): New implement.
2250 (pthread_mutex::~pthread_mutex): Ditto.
2251 (pthread_mutex::Lock): Ditto.
2252 (pthread_mutex::TryLock): Ditto.
2253 (pthread_mutex::UnLock): Ditto.
2254 (pthread_mutex::Destroy): Implement new method.
2255 (pthread_mutex::SetOwner): Ditto.
2256 (pthread_mutex::LockRecursive): Ditto.
2257 (pthread_mutex::fixup_after_fork): Restore locking state after
2258 fork.
2259 (__pthread_mutex_lock): Return pthread_mutex::Lock errorcode.
2260 (__pthread_mutex_trylock): Return pthread_mutex::TryLock
2261 errorcode.
2262 (__pthread_mutex_unlock): Return pthread_mutex::UnLock
2263 errorcode.
2264 (__pthread_mutex_destroy): Call pthread_mutex::Destroy to
3457ce4d 2265 destroy mutex.
5d68d1de
TP
2266 (__pthread_mutexattr_settype): Allow errorchecking and recursive
2267 types.
2268 * thread.h (MUTEX_LOCK_COUNTER_INITIAL): New define.
2269 (pthread_mutex::criticalsection): Remove.
2270 (pthread_mutex::lock_counter): New member.
2271 (pthread_mutex::recursion_counter): Ditto.
2272 (pthread_mutex::owner): Ditto.
2273 (pthread_mutex::type): Ditto.
2274 (pthread_mutex::Destroy): New method.
2275 (pthread_mutex::SetOwner): Ditto.
2276 (pthread_mutex::LockRecursive): Ditto.
2277
ed9fe455
TP
22782003-01-09 Thomas Pfaff <tpfaff@gmx.net>
2279
2280 * pthread.cc (pthread_cond_init): Use new pthread_cond::init.
2281 * thread.cc: Some white spaces cleanups.
2282 Change __pthread_cond_init to pthread_cond::init throughout.
2283 (nativeMutex): Move class methods outside pthread_mutex.
2284 (MTinterface::Init): Initialize pthread_cond init lock.
2285 (pthread_cond::condInitializationLock): Instantiate.
2286 (pthread_cond::initMutex): New Method.
2287 (pthread_cond::isGoodInitializerOrBadObject): Ditto.
2288 * thread.h: Some white spaces cleanups.
2289 (nativeMutex): Move class declaration outside pthread_mutex.
2290 (pthread_cond::condInitializationLock): New static member.
2291 (pthread_cond::initMutex): New Method.
2292 (pthread_cond::isGoodInitializerOrBadObject): Ditto.
2293 (__pthread_cond_init): Remove prototype.
2294
93353aee
CV
22952003-01-09 Corinna Vinschen <corinna@vinschen.de>
2296
2297 * fhandler_disk_file.cc (num_entries): Return 2 as link count if
2298 directory unreadable.
2299
3eb27a4e
CV
23002003-01-09 Corinna Vinschen <corinna@vinschen.de>
2301
2302 * security.cc (get_nt_attribute): Always return -1 when read_sd()
2303 fails.
2304 (get_file_attribute): Set permissions to 0 and owner/group to -1
2305 if security descriptor is unreadable.
2306
85ba109d
CF
23072003-01-09 Christopher Faylor <cgf@redhat.com>
2308
2309 Use isdirsep rather than SLASH_P throughout.
2310 * path.cc (iscygdrive): Disallow /cygdrive\x.
2311 (normalize_posix_path): "Normalize" a windows path, if detected, rather
2312 than converting to posix.
2313
23142003-01-06 Troy Curtiss <troyc@usa.net>
2315
2316 * fhandler_serial.cc (fhandler_serial::tcsetattr): Add support and
2317 capability checking for B230400 bitrate.
2318 (fhandler_serial::tcgetattr): Add support for B230400 bitrate.
2319 * include/sys/termios.h: Add B230400 definition for Posix support of
2320 230.4Kbps.
2321
cbdbe9d7
CF
23222003-01-05 Christopher Faylor <cgf@redhat.com>
2323
2324 * pinfo.cc (_pinfo::commune_send): Use myself->lock rather than just
2325 lock when leaving.
2326
f3afe99b
CF
23272003-01-03 Christopher Faylor <cgf@redhat.com>
2328
2329 * dtable.h (dtable::in_vfork_cleanup): New function. True if vfork
2330 cleanup needed.
2331 * dtable.cc (dtable::vfork_parent_restore): Remove assertion.
2332 * pipe.cc (fhandler_pipe::close): Don't close read_state during
2333 fork_fixup since it wasn't inherited.
2334
2665fb15
CF
23352003-01-01 Christopher Faylor <cgf@redhat.com>
2336
2337 * passwd.cc (getpwuid_r32): Revert previous change.
2338
8619b42b
CF
23392003-01-01 Christopher Faylor <cgf@redhat.com>
2340
2341 * sysconf.cc (sysconf): Return arbitrary values for
2342 _SC_GETGR_R_SIZE_MAX, _SC_LOGIN_NAME_MAX, _SC_GETPW_R_SIZE_MAX.
2343
2344 * passwd.cc (getpwuid_r32): Add uid/gid fields to size check
2345 calculation.
2346
This page took 0.368701 seconds and 5 git commands to generate.