]> sourceware.org Git - newlib-cygwin.git/blame - winsup/cygwin/ChangeLog
* Makefile.in (MALLOC_OFILES): Always fill in with correct malloc object.
[newlib-cygwin.git] / winsup / cygwin / ChangeLog
CommitLineData
f8e2f358
CF
12003-08-31 Christopher Faylor <cgf@redhat.com>
2
3 * Makefile.in (MALLOC_OFILES): Always fill in with correct malloc
4 object.
5 * configure.in: Fill in MALLOC_OFILES with either debugging or regular
6 malloc.
7 * configure: Regenerate.
8 * dlmalloc.c: Make various fruitless changes to attempt to get to work.
9 * dlmalloc.h: Ditto.
10 * malloc.cc (free): Check malloc pool when debugging.
11
12 * path.cc (win32_device_name): Eliminate compiler warning.
13
14 * sigproc.cc (sig_dispatch_pending): Remove use of was_pending. Let
15 thisframe.call_signal_handler decide if handler should be called rather
16 than using bogus was_pending check.
17
18 * exceptions.cc (interrupt_setup): Remove accidentally checked in
19 debugging code.
20
212003-08-30 Christopher Faylor <cgf@redhat.com>
22
23 * heap.cc (sbrk): Save rounded addess in user_heap_max.
24
b939e870
CF
252003-08-30 Christopher Faylor <cgf@redhat.com>
26
27 * sigproc.cc (sig_dispatch_pending): Remove explicit call to
28 thisframe.call_signal_handler.
29
6c125ba7
CF
302003-08-30 Christopher Faylor <cgf@redhat.com>
31
32 Remove some cygserver files.
33
5a96b1cb
CF
342003-08-28 Christopher Faylor <cgf@redhat.com>
35
36 * sigproc.h: Make some functions regparm.
37 * sigproc.cc (checkstate): Make regparm.
38 (getevent): Change parameters in declaration, rename from getsem, make regparm.
39 (sig_send): Recognize that nosync is now an event. Remove some old
40 cruft from previous interrupt anywhere signal handler.
41 (getevent): Change parameters in definition, rename from getsem.
42 Allocate event rather than semaphore.
43 (wait_sig): Treat sigcatch_nosync as an event.
44
5e8355c7
CF
452003-08-28 Christopher Faylor <cgf@redhat.com>
46
47 * exceptions.cc (sigreturn): Fix problem where old return address was
48 not properly restored for a nested signal.
49
d533b921
CF
502003-08-27 Christopher Faylor <cgf@redhat.com>
51
52 * autoload.cc (SwitchToThread): Declare as autoload function.
53 * cygthread.h (cygthread::main_thread_id): Make public.
54 * exceptions.cc (setup_handler): Remove unneeded priority stuff.
55 Rename label to reflect what it does. Add debugging for idiotic
56 Windows NT problem. Change debugging output to include signal number.
57 * miscfuncs.cc (low_priority_sleep): If available, use SwitchToThread
58 function to give time slice to other threads.
59 * wincap.cc: Properly define have_switch_to_thread throughout.
60 * wincap.h (wincap::switch_to_thread): New element.
61
e2bc5017
CF
622003-08-27 Christopher Faylor <cgf@redhat.com>
63
64 * syscalls.cc (mount): Don't check win32_path when doing cygdrive
65 mount.
66
7028311c
CF
672003-08-27 Christopher Faylor <cgf@redhat.com>
68
69 * specdir: Correctly remove temporary directory prior to use.
70
90f4768b
CF
712003-08-27 Christopher Faylor <cgf@redhat.com>
72
73 * sigproc.cc (wait_sig): Count number of iterations through
74 'more_signals' loop and issue a warning if DEBUGGING and excessive.
75 (WFSO): When debugging and infinite timeout, loop.
76
1ce25e2a
CV
772003-08-26 Corinna Vinschen <corinna@vinschen.de>
78
79 * include/cygwin/stat.h: Allow definition of internal stat structures
80 also when compiling newlib.
81
4392d36c
CF
822003-08-25 Christopher Faylor <cgf@redhat.com>
83
84 Throughout, change USE_CYGSERVER to USE_SERVER.
85 * Makefile.in (LIBSERVER): Define and use.
86 * configure.in: Set LIBSERVER as appropriate.
ff575207
CF
87 * configure: Regenerate.
88 * acconfig.h: Regenerate.
4392d36c
CF
89 * environ.cc: Rename allow_daemon to allow_server. Only recognize when
90 USE_SERVER is defined.
91
be1ea8cd
CF
922003-08-23 Christopher Faylor <cgf@redhat.com>
93
94 * syscalls.cc (_remove_r): Define.
95
5c6497b4
CF
962003-08-22 Corinna Vinschen <corinna@vinschen.de>
97
98 * cygheap.h (enum cygheap_types): Add HEAP_MMAP.
99 (CYGHEAPSIZE): Add another 64K.
100 * mmap.cc: Use cmalloc, ccalloc and crealloc with HEAP_MMAP type
101 throughout.
102
7f32ba3a
CF
1032003-08-22 Christopher Faylor <cgf@redhat.com>
104
105 * cygheap.cc (user_heap_info::max): New field.
106 * heap.cc (heap_init): Save pointer to end of heap reserved memory.
107 (sbrk): Don't attempt to commit memory beyond end of heap reserved
108 memory. Attempt to honor comment and reserve commitbytes if heapchunk
109 fails.
110
897c6b52
CF
1112003-08-20 Pierre Humblet <pierre.humblet@ieee.org>
112
113 * exceptions.cc (sigreturn): Don't clobber ebp in recursive signal
114 calls.
115
29cd21d0
CF
1162003-08-22 Christopher Faylor <cgf@redhat.com>
117
118 * exceptions.cc (sig_handle): Change so that default signals indicate
119 success.
120
095abc79
CF
1212003-08-21 Christopher Faylor <cgf@redhat.com>
122
123 * sigproc.cc (wait_sig): Remove redundant test in do/while.
124
a9f77544
CF
1252003-08-21 Christopher Faylor <cgf@redhat.com>
126
127 * sigproc.cc (wait_sig): Avoid infinite loop.
128
b5c5b999
CF
1292003-08-20 Christopher Faylor <cgf@redhat.com>
130
131 * speclib: Reenable removal of temp files.
132
d688945c
CF
1332003-08-20 Christopher Faylor <cgf@redhat.com>
134
135 * miscfuncs.cc (low_priority_sleep): Sleep at same priority as main
136 thread.
137 * sigproc.cc (wait_sig): Keep looping if there are more signals to
138 consider and we are flushing signals.
139 (sig_send): Put nonsync signals in the correct bucket.
140
0b10f795
CF
1412003-08-20 Christopher Faylor <cgf@redhat.com>
142
143 * speclib: Fix created lib to avoid "File truncated" problems.
144
2bf794af
CF
1452003-08-20 Pierre Humblet <pierre.humblet@ieee.org>
146
147 * exceptions.cc (interrupt_setup): Set sigsave.sig last to avoid a
148 race.
149
6f6d673c
CF
1502003-08-20 Christopher Faylor <cgf@redhat.com>
151
152 * sigproc.cc (wait_sig): Ensure that myself->getsigtodo array is
153 flushed on a __SIGFLUSH.
154
1552003-08-20 Pierre Humblet <pierre.humblet@ieee.org>
156 Christopher Faylor <cgf@redhat.com>
157
158 * exceptions.cc (_sigreturn): Handle nested signals without growing the
159 stack.
160
5f31e0f3
CF
1612003-08-19 Christopher Faylor <cgf@redhat.com>
162
163 * exceptions.cc (pending_signals): Remove unneeded declaration.
164 * sigproc.cc (pending_signals): Make static.
165 (wait_sig): Use defined values rather than integers for rc. Never scan
166 both todo arrays as this could cause hangs if signals arrive from two
167 different sources. Rename saw_pending_signals to saw_failed_interrupt.
168 Exit loop when signal found. Enter low-priority sleep, if necessary,
169 after finished signalling completion. Set pending_signals when blocked
170 (from Pierre Humblet).
171
06bb4899
CF
1722003-08-19 Christopher Faylor <cgf@redhat.com>
173
174 * signal.cc (sigpending): Move.
175 * sigproc.cc (sigpending): To here.
176 (getlocal_sigtodo): Return process-local signal array.
177 (sigpending): Accommodate new process-local signal array.
178 (sig_send): Ditto.
179 (sig_set_pending): Ditto.
180 (wait_sig): Ditto.
181
05cb7b17
CF
1822003-08-19 Christopher Faylor <cgf@redhat.com>
183
184 Throughout, eliminate argument to sig_dispatch_pending.
185 * exceptions.cc (setup_handler): Move non-interruptible condition
6ac844b5 186 handling (back) to wait_sig.
05cb7b17
CF
187 (set_process_mask): Don't worry about calling sig_dispatch_pending from
188 sigthread since it is detected in the function anyway.
189 (sig_handle): Eliminate thisproc arg. Don't call sig_dispatch_pending
190 on SIGCONT since that should happen automatically.
191 * sigproc.cc (sig_dispatch_pending): Eliminate justwake argument. Just
192 return when called from sigthread.
193 (wait_sig): Change some variables to bool. Change inner while to an
194 if. Move uninterruptible signal handling here.
195 (sigproc_terminate): Don't call sig_dispatch_pending. Just increment
196 semaphore on exit.
197
198 * speclib: Use slightly different (but still flawed) method for
199 determining symbols to extract from libraries.
200
755f575f 2012003-08-18 Christopher Faylor <cgf@redhat.com>
372cd2cb
CF
202
203 * exceptions.cc (sigdelayed): Fix race where signal handler could get
05cb7b17 204 the wrong mask (as suggested by Pierre Humblet).
372cd2cb 205
9d7f26ea
CF
2062003-08-18 Christopher Faylor <cgf@redhat.com>
207
208 * path.cc (mount): Add null/empty check for input parameters.
209 (umount): Add null/empty check for input parameters.
210
981f9625
CV
2112003-08-17 Pierre Humblet <pierre.humblet@ieee.org>
212
213 * grp.cc (read_group): Revert previous change.
214 * uinfo.cc (pwdgrp::load): Always reset curr_lines.
215
22d82f9f
CV
2162003-08-17 Corinna Vinschen <corinna@vinschen.de>
217
218 * errno.cc (errmap): Map ERROR_INVALID_BLOCK_LENGTH to EIO.
219 * fhandler_raw.cc (fhandler_dev_raw::raw_read): Set more accurate
220 errnos instead of EACCES.
221 (fhandler_dev_raw::raw_write): Ditto.
222
293ce810
CF
2232003-08-17 Christopher Faylor <cgf@redhat.com>
224
225 * path.cc (special_name): Accommodate all special names with
226 extensions.
227
92d897cd
CV
2282003-08-15 Corinna Vinschen <corinna@vinschen.de>
229
230 * mmap.cc (mmap64): Avoid crash if file size is less than requested
231 map length.
232
6763d47b
CV
2332003-08-13 Igor Pechtchanski <pechtcha@cs.nyu.edu>
234
235 * path.cc (special_name): Add checks for some specials followed by
236 a "." and a FIXME comment.
237
ae89a496
CV
2382003-08-13 Corinna Vinschen <corinna@vinschen.de>
239
293ce810 240 * cygwin.din: Accommodate change from cygwin_lstat to lstat.
ae89a496
CV
241 * syscalls.cc: Add defines to avoid declaration issues when
242 renaming cygwin_lstat back to lstat.
243 (lstat): Reverted name change from cygwin_lstat.
244
c86c10b8
CV
2452003-08-12 Corinna Vinschen <corinna@vinschen.de>
246
247 * include/sys/param.h (NBBY): Define if not defined.
248
2492003-08-12 Nicholas Wourms <nwourms@netscape.net>
250
251 * include/sys/param.h (setbit): Add new bitmap related macro.
252 (clrbit): Likewise.
253 (isset): Likewise.
254 (isclr): Likewise.
255 (howmany): Add new counting/rounding macro.
256 (rounddown): Likewise.
257 (roundup): Likewise.
258 (roundup2): Likewise.
259 (powerof2): Likewise
260 (MIN): Add macro for calculating min.
261 (MAX): Add macro for calculating max.
262
9d77d536
CF
2632003-08-09 Christopher Faylor <cgf@redhat.com>
264
265 * include/cygwin/version.h: Bump DLL minor number to 3.
266
5c65fa02
CF
2672003-08-08 Gerrit P. Haase <gp@familiehaase.de>
268
269 * include/stdint.h: Correctly define INT32_MIN.
270
b344f187
CF
2712003-08-08 David Rothenberger <daveroth@acm.org>
272
273 * grp.cc (read_group): Set __group32.gr_mem pointer back to &null_ptr
274 after free() is called.
275
4b154cc1
CF
2762003-08-05 Christopher Faylor <cgf@redhat.com>
277
278 * Makefile.in: Rework to accommodate new speclib arguments.
279 * speclib: Rework to extract everything from libcygwin.a rather than
280 building things from existing object files.
281
4423d924
CF
2822003-08-05 Pavel Tsekov <ptsekov@gmx.net>
283
284 * path.cc (cygdrive_getmntent): Do not skip over drives of type
285 DRIVE_REMOVABLE.
286
2872003-08-05 Christopher Faylor <cgf@redhat.com>
288
289 * fhandler.cc (fhandler_base::lseek): Be more paranoid when
290 constructing offsets from 64 bit value.
291 * syscalls.cc (logout): Avoid temp buffer memcpy since new scheme does
292 not require it.
293 (utmp_data): Rework as a macro which returns a pointer into a buffer.
294 (getutent): Use new buffer allocation mechanism to grab a utmp buffer.
295 (getutid): Ditto.
296 (pututline): Ditto.
297
3fea2e40
CF
2982003-08-05 Pavel Tsekov <ptsekov@gmx.net>
299
300 * fhandler_disk_file.cc (fhandler_cygdrive::readdir): Do not change
301 'errno' if end of directory condition is encountered as per SUSv2.
302 * fhandler_proc.cc (fhandler_proc::readdir): Ditto.
303 * fhandler_process (fhandler_process::readdir): Ditto.
304 * fhandler_registry (fhandler_registry::readdir): Ditto.
305
b9621e8d
CF
3062003-07-30 Christopher Faylor <cgf@redhat.com>
307
308 * dcrt0.cc (_dll_crt0): Move strace.microseconds initialization to
309 after pthread initialization.
310 (dll_crt0_1): i.e., here.
311
d2466c7a
CF
3122003-07-28 Christopher Faylor <cgf@redhat.com>
313
314 * fhandler_base.cc (fhandler_base::readv): Rework to properly return
315 number of bytes from read.
316
8e2315f0
CF
3172003-07-28 Christopher Faylor <cgf@redhat.com>
318
319 * include/cygwin/version.h: Bump DLL minor number to 2.
320
df04ae29
CF
3212003-07-26 Christopher Faylor <cgf@redhat.com>
322
323 * exceptions.cc (ctrl_c_handler): Send SIGHUP when events occur only if
324 there is a tty associated with the process. Send SIGHUP on
325 CTRL_LOGOFF_EVENT.
326
327 * fhandler_tty.cc (fhandler_tty_slave::open): Adjust console open
328 handle counter regardless of whether this is a pty or tty.
329 (fhandler_tty_slave::open): Ditto.
330 (fhandler_tty_slave::dup): Ditto.
331 (fhandler_tty_common::set_close_on_exec): Ditto.
332 (fhandler_tty_master::init_console): Decrement console open handle
333 counter after init since it will now be handled by all tty open.
334 * syscalls.cc (setsid): Rework debugging output slightly.
335
ddb67621
CF
3362003-07-25 Christopher Faylor <cgf@redhat.com>
337
338 * configure.in: Use 'install-sh -c'.
339 * configure: Regenerate.
340
7f4773b3
CF
3412003-07-25 Christopher Faylor <cgf@redhat.com>
342
343 * configure.in: Always use install-sh.
344 * configure: Regenerate.
345
5d66faab
CF
3462003-07-25 Christopher Faylor <cgf@redhat.com>
347
348 * include/cygwin/socket.h: Conditionalize [AP]F_INET6 define.
349
6f8c86ae
CF
3502003-07-25 Christopher Faylor <cgf@redhat.com>
351
352 * Makefile.in (OBSOLETE_FUNCTION): Add fdopen.
353
86ed5c88
CF
3542003-07-25 Christopher Faylor <cgf@redhat.com>
355
356 * cygwin.din: Export _fdopen64
357 * Makefile.in (NEW_FUNCTIONS): Add _fdopen64 -> fdopen translation.
358 * include/cygwin/version.h: Bump api minor number.
359
360 * ntdll.h: Remove (now) duplicate FILE_SYNCHRONOUS_IO_NONALERT
361 definition.
362
1fbeb827
CF
3632003-07-24 Christopher Faylor <cgf@redhat.com>
364
365 * environ.cc (check_case_init): Use strncasematch.
366
367 * cygwin.din: Export __mempcpy.
368 * cygwin/version.h: Bump api minor number.
369
d432ac75
CV
3702003-07-21 Pavel Tsekov <ptsekov@gmx.net>
371
372 * mmap.cc: Use proper format specifiers for _off64_t and size_t in
373 format strings passed to syscall_printf () and debug_printf ()
374 throughout.
375
b4ece40c
PH
3762003-07-18 Pierre Humblet <pierre.humblet@ieee.org>
377
378 * security.cc (verify_token): Fix white space and style.
379 Use type bool instead of BOOL and char. Use alloca
df04ae29 380 instead of malloc and free for my_grps.
b4ece40c 381
fc2843ca
CV
3822003-07-17 Corinna Vinschen <corinna@vinschen.de>
383
384 * sysconf.cc (sysconf): Fix OPEN_MAX patch. Return page size on
385 _SC_PAGESIZE again.
386
ea3ba114
CV
3872003-07-14 Corinna Vinschen <corinna@vinschen.de>
388
389 * cygheap.h (class cygheap_user): Use INVALID_HANDLE_VALUE as invalid
390 value for tokens.
391 * syscalls.cc (seteuid32): Ditto. Set new_token to process token if
392 process token is suitable.
393 * uinfo.cc (uinfo_init): Initialize tokens in cygheap user info
394 to INVALID_HANDLE_VALUE.
395
3962003-07-14 Pierre Humblet <pierre.humblet@ieee.org>
397
398 * cygheap.h (enum impersonation): Delete.
399 (cygheap_user::impersonation_state): Delete.
400 (cygheap_user::current_token): New.
401 (cygheap_user::issetuid): Modify to use current_token.
402 (cygheap_user::token): Ditto.
403 (cygheap_user::deimpersonate): Ditto.
404 (cygheap_user::reimpersonate): Ditto.
405 (cygheap_user::has_impersonation_tokens): Ditto.
406 (cygheap_user::close_impersonation_tokens): Ditto.
407 * security.cc (cygwin_set_impersonation_token): Always set the token.
408 (verify_token): Change type of gsid to cygpsid.
409 (get_file_attribute): Use the effective ids.
410 * syscalls.cc (seteuid32): Modify to use cygheap_user::current_token.
411 * uinfo.cc (uinfo_init) Do not set cygheap->user.impersonation_state.
412
9e8ac0ae
CF
4132003-07-12 Christopher Faylor <cgf@redhat.com>
414
415 * pinfo.cc (_pinfo::commune_send): Fix bounds test so that poll of
416 communicating pid actually stops eventually.
417
e47d5648
CF
4182003-07-10 Christopher Faylor <cgf@redhat.com>
419
420 * path.cc (get_device_number): Remove special com? consideration.
421 (special_chars): Make static.
422 (special_introducers): New.
423 (special_char): Allow specified valid_chars args.
424 (fnunmunge): Handle aux-like filenames correctly.
425 (special_name): Add con, conin$, conout$.
426 (mount_item::fnmunge): Use __small_sprintf return value to calculate
427 increments.
428
30811232
CF
4292003-07-09 Christopher Faylor <cgf@redhat.com>
430
431 * include/cygwin/version.h: Bump DLL minor number to 1.
432
f1a4b6b5
CF
4332003-07-09 Christopher Faylor <cgf@redhat.com>
434
2f5cab7b
CF
435 * fhandler_proc.cc (format_proc_stat): Use correctly sized constants
436 for filling in zeros on 98.
f1a4b6b5 437
cf38615c
CF
4382003-07-09 Christopher Faylor <cgf@redhat.com>
439
440 * fhandler_proc.cc (fhandler_proc::fill_filebuf): Allocate more space
441 for stat buffer.
442 (format_proc_stat): Reorganize to accumulate and report on all cpus.
443
ab3dc80d
CF
4442003-07-09 Christopher Faylor <cgf@redhat.com>
445
446 * sysconf.cc (sysconf): Return processors online rather than bitmask
447 for _SC_NPROCESSORS_ONLN.
448
4d782b42
CF
4492003-07-08 Christopher Faylor <cgf@redhat.com>
450
451 * cygheap.cc (creturn): Set appropriate errno when out of memory.
452 (ccalloc): Only issue system_printf when debugging.
453 * dtable.cc (dtable::extend): Only allocate 100 * the incremental growth
454 size max. Set errno appropriately.
455 (dtable::build_fhandler): Check for error from set_name.
456 * fhandler.cc (fhandler_base::set_name): Set errno and return error on OOM.
457 * fhandler.h (fhandler_base::set_name): Change to bool.
458 * fhandler_process.cc (format_process_stat): Fix formatting.
459 * resource.cc (getrlimit): Return greater of OPEN_MAX or fd table size.
460 * sysconf.cc (sysconf): Ditto.
461
a711a5af
CF
4622003-07-07 Christopher Faylor <cgf@redhat.com>
463
464 * rmsym: Don't use ranlib.
465
c0a6fcd7
CF
4662003-07-07 Christopher Faylor <cgf@redhat.com>
467
468 * newsym: Reenable removal of tmp directory. Just use ar to generate
469 archive index.
a711a5af 470 * Makefile.in: Don't send ranlib to newsym or rmsym.
c0a6fcd7 471
0e5db0bf
CF
4722003-07-07 Christopher Faylor <cgf@redhat.com>
473
474 * newsym: Create objects that are closer to those created by dlltool so
475 as not to confuse --export-all-symbols.
476 * rmsym: Be a little more accepting of object filenames now that
477 dlltool can create different format files.
478
c522b907
CF
4792003-07-06 Christopher Faylor <cgf@redhat.com>
480
481 * newsym: Oops. Revert below change.
482
88a62816
CF
4832003-07-06 Christopher Faylor <cgf@redhat.com>
484
485 * newsym: Use correct prefix for generating imports.
486 * pinfo.cc (_pinfo::commune_send): Don't wait forever for a response
487 from another process.
488
b6717153
CF
4892003-07-06 Christopher Faylor <cgf@redhat.com>
490
491 * syscalls.cc (gethostid): Set thread affinity so that results are
492 predictable.
493
f2d3c47b
CV
4942003-07-05 Corinna Vinschen <corinna@vinschen.de>
495
496 * mmap.cc (list::match): Add parameters to return valid address and
497 length back to munmap(). Evaluate intersection between given
498 area and mapped area and return it, if any.
499 (mmap64): On regular files, don't allow mappings beginning beyond
500 EOF. Return with errno set to ENXIO instead.
501 (munmap): Rewrite SUSv3 conformant. Check if given memory area is
502 valid. Unmap all maps inside given memory area. Don't return error
503 if no mapping has been unmapped.
504
5052003-07-05 N Stephens <nigel@mips.com>
4b2cbaee
CV
506
507 * fhandler.h (fhandler_socket::get_connect_state): New method to
508 return socket connection state.
509 * fhandler_socket.cc (dup): Copy socket connect state to new file
510 handle.
511 * net.cc (cygwin_rcmd): Mark file handles of sockets returned by
512 rcmd() as CONNECTED state.
513 (cygwin_rexec): Similarly for rexec().
514 (socketpair): Mark both ends of a new socket pair as CONNECTED.
515
6694f305
CV
5162003-07-04 Corinna Vinschen <corinna@vinschen.de>
517
518 * mmap.cc (fhandler_disk_file::mmap): Fix address test.
519
d108f312
CF
5202003-07-03 Christopher Faylor <cgf@redhat.com>
521
522 * path.cc (fillout_mntent): Change "posix" to "managed".
523
3f214783
CF
5242003-07-02 Christopher Faylor <cgf@redhat.com>
525
526 * fhandler.h (FH_ENC): New enum.
527 (fhandler_base::get_encoded): New function.
528 (fhandler_base::set_encoded): Ditto.
529 * fhandler_disk_file.cc (fhandler_disk_file::opendir): Set encoded flag
530 in fhandler, as appropriate.
531 (fhandler_disk_file::readdir): Unmunge filename as appropriate based on
532 new encoding flag.
533 * path.cc (normalize_posix_path): Don't punt on files with colons.
534 (special_char): New function.
535 (mount_item::fnmunge): Ditto.
536 (fnunmunge): Ditto.
537 (special_name): Ditto.
538 (mount_item::build_win32): Avoid drive considerations when file is
539 encoded.
540 (mount_info::conv_to_win32_path): Handle encoded filenames.
541 (mount_info::conv_to_posix_path): Ditto.
542 (fillout_mntent): Add posix string when directory is encoded.
543 * path.h (fnunmunge): Declare.
544 (path_conv::is_encoded): Declare.
545
3d8a75bd
CF
5462003-07-03 Christopher Faylor <cgf@redhat.com>
547
548 * fhandler_tty.cc (fhandler_tty_slave::open): Conditionalize a little
549 more of the cygserver stuff so that ttys actually work.
550
65561780
CV
5512003-07-03 Corinna Vinschen <corinna@vinschen.de>
552
553 * mmap.cc (mmap64): Allow MAP_FIXED with pagesize granularity (4K).
554 If a non-zero addr is given, align it to the next lower 64K boundary.
555 (fhandler_disk_file::mmap): If a non-zero address is given, try
556 mapping using the given address first. If it fails and flags is not
557 MAP_FIXED, try again with NULL address.
558
5592003-07-01 Christopher Faylor <cgf@redhat.com>
560
561 * thread.cc: Remove _MT_SAFE conditional.
562
5632003-07-01 Christopher Faylor <cgf@redhat.com>
564
565 * configure.in: Fix --enable-server option.
566 * configure: Regenerate.
567
5682003-07-01 Christopher Faylor <cgf@redhat.com>
569
570 * Makefile.in: Remove cygserver stuff.
571 * acconfig.h: Add USE_CYGSERVER define.
572 * config.h.in: Regenerate.
573 * configure.in: Add --enable-server setting.
574 * configure: Regenerate.
575 * fhandler_tty.cc (fhandler_tty_slave::open): Conditionalize
576 compilation of cygserver stuff.
577 * fork.cc (fork_child): Ditto.
578 * shm.cc: Ditto.
579 * tty.cc (tty::common_init): Ditto.
580
581 * dcrt0.cc: Use bool rather than BOOL for CYGWIN environment variable
582 definitions.
583 * environ.cc: Ditto.
584 * ntea.cc: Ditto.
585 * security.cc: Ditto.
586 * security.h: Ditto.
587 * syscalls.cc (check_posix_perm): Remove externs that were already
588 declared in a header.
589 * winsup.h: Ditto. Declare _MT_SAFE here. Delete it someday since
590 cygwin should always be _MT_SAFE.
591
f3ff0ca9
CF
5922003-07-01 Christopher Faylor <cgf@redhat.com>
593
594 * thread.cc: Remove _MT_SAFE conditional.
595
8fb2df19
CF
5962003-07-01 Christopher Faylor <cgf@redhat.com>
597
598 * configure.in: Fix --enable-server option.
599 * configure: Regenerate.
600
3872e9a4
CF
6012003-07-01 Christopher Faylor <cgf@redhat.com>
602
603 * Makefile.in: Remove cygserver stuff.
604 * acconfig.h: Add USE_CYGSERVER define.
605 * config.h.in: Regenerate.
606 * configure.in: Add --enable-server setting.
607 * configure: Regenerate.
608 * fhandler_tty.cc (fhandler_tty_slave::open): Conditionalize
609 compilation of cygserver stuff.
610 * fork.cc (fork_child): Ditto.
611 * shm.cc: Ditto.
612 * tty.cc (tty::common_init): Ditto.
613
614 * dcrt0.cc: Use bool rather than BOOL for CYGWIN environment variable
615 definitions.
616 * environ.cc: Ditto.
617 * ntea.cc: Ditto.
618 * security.cc: Ditto.
619 * security.h: Ditto.
620 * syscalls.cc (check_posix_perm): Remove externs that were already
621 declared in a header.
622 * winsup.h: Ditto. Declare _MT_SAFE here. Delete it someday since
623 cygwin should always be _MT_SAFE.
624
70249d56
CV
6252003-06-30 Pierre Humblet <pierre.humblet@ieee.org>
626
627 * cygheap.h (enum impersonation): New enum.
628 (cygheap_user::token): Delete.
629 (cygheap_user::impersonated): Delete.
630 (cygheap_user::external_token): New member.
631 (cygheap_user::internal_token): New member.
632 (cygheap_user::impersonation_state): New member.
633 (cygheap_user::issetuid): Modify.
b6717153 634 (cygheap_user::token): New method.
70249d56
CV
635 (cygheap_user::deimpersonate): New method.
636 (cygheap_user::reimpersonate): New method.
637 (cygheap_user::has_impersonation_tokens): New method.
638 (cygheap_user::close_impersonation_tokens): New method.
639 * dtable.cc (dtable::vfork_child_dup): Use new cygheap_user methods.
640 * fhandler_socket.cc (fhandler_socket::dup): Ditto.
641 * fork.cc (fork_child): Ditto.
642 (fork_parent): Ditto.
643 * grp.cc (internal_getgroups): Ditto.
644 * security.cc (verify_token): Ditto.
645 (check_file_access): Ditto.
646 (cygwin_set_impersonation_token): Detect conflicts. Set
647 user.external_token.
648 * spawn.cc (spawn_guts): Use new cygheap_user methods.
649 * syscalls.cc (seteuid32): Rearrange to use the two tokens
650 in cygheap_user.
651 (setegid32): Use new cygheap_user methods.
652 * uinfo.cc: (internal_getlogin): Ditto.
653
b06d4a08
CF
6542003-06-25 Doru Carastan <doru.carastan@mvista.com>
655
656 * Makefile.in: Use INSTALL_PROGRAM to install the cygwin DLL.
657
e1e196a2
TP
6582003-06-24 Thomas Pfaff <tpfaff@gmx.net>
659
660 * thread.cc (MTinterface::fixup_after_fork): Fix thread list after
661 fork.
662 (pthread::threads): Instantiate.
663 (pthread::pthread): Initialize running and suspendend.
664 Initialize next with NULL.
665 Add thread to thread list if it is not the null_pthread.
666 (pthread::~pthread): Remove thread from thread list if it is
667 not the null_pthread.
668 (pthread::postcreate): Set running flag.
669 (pthread::exit): Reset running flag.
670 (pthread::cancel): Try to cancel thread only if still running.
671 (pthread::_fixup_after_fork): Implement.
672 (pthread::detach): Check if thread is still running before detach.
673 * thread.h (pthread::running): New member.
674 (pthread::next): Ditto.
675 (pthread::fixup_after_fork): New static method.
676 (pthread::threads): New static method.
677 (pthread::_fixup_after_fork): New method.
678
6c6f7094
CF
6792003-06-20 Christopher Faylor <cgf@redhat.com>
680
681 * pinfo.cc (_pinfo::commune_send): Don't attempt to communicate with a
682 pure windows process.
683
c9a5cfa0
PH
6842003-06-18 Pierre Humblet <pierre.humblet@ieee.org>
685
b6717153
CF
686 * autoload.cc (GetNetworkParams): Add.
687 * net.cc (getdomainname): Call GetNetworkParams and read the
688 DhcpDomain registry value if warranted.
c9a5cfa0 689
0d58ef9d
CF
6902003-06-17 Christopher Faylor <cgf@redhat.com>
691
692 * path.cc (mount): Do more strict checking on posix path arguments.
693
c433f461
CF
6942003-06-15 Christopher Faylor <cgf@redhat.com>
695
696 Throughout, remove "include <errno.h>" from files which already include
697 cygerrno.h.
698
6992003-06-15 Thomas Pfaff <tpfaff@gmx.net>
700
701 * include/cygwin/config.h (__DYNAMIC_REENT__): Define.
702 * include/cygwin/version.h: Bump API minor version.
703 * cygwin.din: Export __getreent
704 * cygerrno.h: Include errno.h. Fix places where _impure_ptr is used
705 directly to store the errno value.
706 * debug.cc (__set_errno): Ditto.
707 * errno.cc: Remove _RRENT_ONLY define to get errno.cc compiled.
708 * signal.cc: Rename _reent_clib to _REENT throughout.
709 * thread.h (reent_clib): Remove prototype.
710 * thread.cc (reent_clib): Rename reent_clib to __getreent. Return
711 _impure_ptr until MTinterface is initialized.
712 (reent_winsup): Fix a possible SEGV when _r == NULL. Return NULL
713 instead.
714 * MTinterface::fixup_after_fork: Switch reent back to _impure_ptr to
715 keep signal handling running when fork is called from a thread other
716 than the mainthread.
717
1c80421c
TP
7182003-06-12 Thomas Pfaff <tpfaff@gmx.net>
719
720 * thread.cc (pthread_attr_init): Revert change from 2003-06-11
721 to return 0 if attribute is already initialized back to EBUSY.
722 (pthread_condattr_init): Ditto.
723 (pthread_rwlockattr_init): Ditto.
724 (pthread_mutexattr_init): Ditto.
725
5bdb56f0
CV
7262003-06-12 Corinna Vinschen <corinna@vinschen.de>
727
728 * exceptions.cc (ctrl_c_handler): Don't send a signal on
729 CTRL_SHUTDOWN_EVENT. Add a comment to rationalize the patch.
730
00e6660b
TP
7312003-06-11 Thomas Pfaff <tpfaff@gmx.net>
732
733 * thread.cc (pthread_attr_init): Return 0 if attribute is already
734 initialized.
735 Fix return code if out of memory.
736 (pthread_condattr_init): Ditto.
737 (pthread_rwlockattr_init): Ditto.
738 (pthread_mutexattr_init): Return 0 if attribute is already
739 initialized.
740
271c1935
CV
7412003-06-09 Pierre Humblet <pierre.humblet@ieee.org>
742
743 * spawn.cc (spawn_guts): Call CreateProcess while impersonated,
744 when the real {u,g}ids and the groups are original.
745 Move RevertToSelf and ImpersonateLoggedOnUser to the main line.
746 * uinfo.cc (uinfo_init): Reorganize. If CreateProcess was called
747 while impersonated, preserve the uids and gids and call
748 ImpersonateLoggedOnUser. Preserve the uids and gids on Win9X.
749
750 * exceptions.cc (error_start_init): Quote the pgm in the command.
751
42a737d0
CF
7522003-06-07 Christopher Faylor <cgf@redhat.com>
753
754 * poll.cc: Define FD_SETSIZE to ridiculously large number so that there
32173f7e 755 will be no artificially small limits.
42a737d0 756
9501a0a1
CF
7572003-06-07 Christopher Faylor <cgf@redhat.com>
758
759 * fhandler_tty.cc (fhandler_tty_slave::close): Free the console when
760 last tty closes.
761
f496071c
TP
7622003-06-07 Thomas Pfaff <tpfaff@gmx.net>
763
764 * fhandler_socket.cc (fhandler_socket::connect): Change error
765 handling for nonblocking connects to return EALREADY when
766 connect is called more than once for the same socket.
767
54152c7e
CV
7682003-06-06 Corinna Vinschen <corinna@vinschen.de>
769
770 * cygwin.din: Add vsyslog.
771 * fhandler.cc (fhandler_base::write): Only make file sparse if the
772 seeked area is >= 128K.
773 * syslog.cc (vsyslog): New function, overtaking functionality from
774 syslog.
775 (syslog): Just call vsyslog.
776 * include/cygwin/version.h: Bump API minor.
777 * include/sys/syslog.h: Add vsyslog declaration.
778
979233a5
CF
7792003-06-05 Christopher Faylor <cgf@redhat.com>
780
781 * cygthread.cc (cygthread::terminate_thread): Change system_printf to
782 debug_printf.
783
f51e42ac
CF
7842003-06-04 Christopher Faylor <cgf@redhat.com>
785
786 * shared.cc (shared_info::heap_chunk_size): Be really defensive about
787 making sure that heap_chunk is set.
788
7b17543f
CF
7892003-06-04 Christopher Faylor <cgf@redhat.com>
790
791 * path.cc (conv_path_list): Use correct value when calculating length
792 to avoid a potential SEGV.
793
9f033c22
PH
7942003-06-03 Pierre Humblet <pierre.humblet@ieee.org>
795
271c1935
CV
796 * fhandler_disk_file.cc (fhandler_disk_file::fstat): Mark the pc
797 as non-executable if the file cannot be opened for read. Retry query
798 open only if errno is EACCES. Never change the mode, even if it is 000
799 when query open() fails.
9f033c22 800
1e61337c
CF
8012003-06-03 Christopher Faylor <cgf@redhat.com>
802
803 * configure.in: Allow any i?86 variant.
804 * configure: Regenerate.
805
fb6b1418
CV
8062003-06-03 Corinna Vinschen <corinna@vinschen.de>
807 Thomas Pfaff <tpfaff@gmx.net>
808
809 * fhandler_socket.cc (connect_thread): Remove.
810 (accept_thread): Remove.
811 (fhandler_socket::connect): Remove all special blocking handling.
812 (fhandler_socket::accept): Ditto.
813 * net.cc (cygwin_connect): Make blocking sockets temporarily
814 non-blocking and call cygwin_select on them to be interruptible.
815 (cygwin_accept): Ditto.
816
0c8fe172
CF
8172003-06-02 Christopher Faylor <cgf@redhat.com>
818
819 * spawn.cc (spawn_guts): Don't hang around if the parent doesn't exist.
820
3786526e
CF
8212003-06-02 Christopher Faylor <cgf@redhat.com>
822
823 * cygthread.h (cygthread::terminate_thread): Mark private.
824 * cygthread.cc (cygthread::terminate_thread): Deallocate free_range
825 thread stuff.
826
cbdc3d17
CV
8272003-06-02 Corinna Vinschen <corinna@vinschen.de>
828
829 * fhandler_socket.cc (fhandler_socket::accept): Rename `signalled'
830 to `interrupted' as used in fhandler_socket::connect.
831
dfe7d288
CV
8322003-06-02 Corinna Vinschen <corinna@vinschen.de>
833
834 * fhandler_socket.cc (fhandler_socket::connect): Simplify previous
835 patch.
836 (fhandler_socket::accept): Ditto.
837
8e13bd14
CV
8382003-06-02 Corinna Vinschen <corinna@vinschen.de>
839
840 * fhandler_socket.cc: Include cygthread.h.
841 (class sock_event): Remove.
842 (thread_connect): New function.
843 (thread_accept): Ditto.
844 (fhandler_socket::connect): Use cygthread instead of socket event
845 handling for blocking sockets.
846 (fhandler_socket::accept): Ditto.
847
418c6236
CF
8482003-06-02 Christopher Faylor <cgf@redhat.com>
849
850 * fhandler.cc (fhandler_base::write): Correct minor printf formatting
851 style glitch.
852
c17e8306
PH
8532003-06-01 Pierre Humblet <pierre.humblet@ieee.org>
854
8e13bd14
CV
855 * fhandler_disk_file.cc (fhandler_disk_file::fstat_by_name): Assume
856 an existing directory is a root if FindFirstFile fails.
c17e8306 857
e59c6ff4
CF
8582003-05-30 Christopher Faylor <cgf@redhat.com>
859
860 * path.cc (mount_info::conv_to_win32_path): gcc warning about chroot_ok
861 was actually valid. Fix it.
862
cbe53754
CF
8632003-05-30 Christopher Faylor <cgf@redhat.com>
864
865 * cygheap.cc (init_cheap): Temporarily remove inline that newer gcc's
866 have problems with.
867
868 * path.cc (path_conv::check): Rework has_acls logic slightly. Uncouple
869 exec tests away from filesystem tests.
870
4aa10069
CV
8712003-05-30 Corinna Vinschen <corinna@vinschen.de>
872
873 * include/sys/param.h: Add DEV_BSIZE.
874
4e2db52c
CV
8752003-05-29 Pierre Humblet <pierre.humblet@ieee.org>
876 Corinna Vinschen <corinna@vinschen.de>
877
878 * fhandler_socket.cc (fhandler_socket::dup): Rearrange. Fix
879 conditional.
880
b666c2eb
CF
8812003-05-28 Christopher Faylor <cgf@redhat.com>
882
883 * mkvers.sh: Avoid "-dontuse" tags.
884
885 * path.cc (path_conv::check): Set exec state based on known situations.
886
887 * path.cc (mount_item::fnmunge): New function.
888 (mount_item::build_win32): New function.
889 (mount_info::conv_to_win32_path): Use build_win32 to build windows
890 path.
891 * path.h (mount_item::fnmunge): Declare new function.
4e2db52c 892 (mount_item::build_win32): Ditto.
b666c2eb
CF
893 * sys/mount.h (MOUNT_ENC): Define.
894
72c1470d
CV
8952003-05-28 Corinna Vinschen <corinna@vinschen.de>
896
897 * fhandler_socket.cc (fhandler_socket::dup): If running impersonated,
898 revert to original account before calling fixup_before_fork_exec
899 and impersonate again afterwards. Change comment accordingly.
900 Clean up error handling and debug output.
901
a946fb03
TP
9022003-05-27 Thomas Pfaff <tpfaff@gmx.net>
903
904 * fhandler_socket.cc (sock_event::~sock_event): New method.
905 (sock_event::load): Change to void. Check if winsock2 is available.
906 (socke_event::wait): Return 0 if interruptible mode is not available.
907 (fhandler_socket::connect): Remove checks for winsock2 availability.
908 (fhandler_socket::accept): Ditto.
909
dae86e45
CV
9102003-05-27 Corinna Vinschen <corinna@vinschen.de>
911
912 * fhandler_socket.cc (fhandler_socket::dup): First try duplicating
913 using WSADuplicateSocket/WSASocket, if that fails, try DuplicateHandle.
914
2311f6b0
CV
9152003-05-27 Bill C. Riemers <cygwin@docbill.net>
916
917 * fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): Filter
49806b9b 918 permissions through umask on FAT or if ntsec is off.
2311f6b0 919
ada0376f
CV
9202003-05-26 Pierre Humblet <pierre.humblet@ieee.org>
921
922 * syscalls.cc (statfs): Call GetDiskFreeSpaceEx before GetDiskFreeSpace.
923
0372ad9f
CV
9242003-05-26 Corinna Vinschen <corinna@vinschen.de>
925
926 * fhandler.cc (is_at_eof): Fix conditional. Use INVALID_FILE_SIZE
927 instead of numeric constant.
928
6852f6c0
CV
9292003-05-26 Corinna Vinschen <corinna@vinschen.de>
930
931 * fhandler_socket.cc (fhandler_socket::connect): Guard calls to
932 sock_event methods by a check for WinSock2 availability.
933 (fhandler_socket::accept): Ditto.
934
fac297d5
CV
9352003-05-26 Corinna Vinschen <corinna@vinschen.de>
936
937 * fhandler.h: Rename FH_W95LSBUG flag to FH_LSEEKED.
938 (fhandler_base::set_did_lseek): Rename from set_check_win95_lseek_bug.
939 (fhandler_base::get_did_lseek): Rename from get_check_win95_lseek_bug.
940 (fhandler_base::set_fs_flags): New method.
941 (fhandler_base::get_fs_flags): Ditto.
942 * fhandler.cc (fhandler_base::write): Make 64 bit clean. Convert file
943 to a "sparse" file when writing after a long lseek (>64K) beyond EOF.
944 (fhandler_base::lseek): Call set_did_lseek() instead of
945 set_check_win95_lseek_bug().
946 (fhandler_base::fhandler_base): Initialize fs_flags to 0.
b6717153 947 * fhandler_disk_file.cc (fhandler_disk_file::open): Don't create files
fac297d5
CV
948 as "sparse" unconditionally. Set fs_flags member.
949
a80229fd
CV
9502003-05-25 Pierre Humblet <pierre.humblet@ieee.org>
951
952 * autoload.cc (GetDiskFreeSpaceEx): Add.
953 * syscalls.cc (statfs): Call full_path.root_dir() instead of
954 rootdir(full_path). Use GetDiskFreeSpaceEx when available and
955 report space available in addition to free space.
956 * fhandler_disk_file.cc (fhandler_disk_file::fstat_by_name):
957 Do not call FindFirstFile for disk root directories.
958
c295ce6f
CV
9592003-05-24 Joe Buehler <jhpb@draco.hekimian.com>
960
a80229fd 961 * fhandler_process.cc (format_process_stat): Use PagefileUsage
c295ce6f
CV
962 instead of VirtualSize.
963 (get_mem_values): Ditto.
964
5c768c97
CV
9652003-05-21 Corinna Vinschen <corinna@vinschen.de>
966
967 * shared_info.h: Match shared_name declaration with below change.
968 * shared.cc (shared_name): Use incoming char * parameter instead of
969 local static buffer.
293ce810 970 (open_shared): Accommodate new calling convention for shared_name.
5c768c97
CV
971 * exceptions.cc (events_init): Ditto.
972 * sigproc.cc (getsem): Ditto.
973 * syscalls.cc (login): Ditto.
974 (logout): Ditto.
975 (pututline): Ditto.
976
44be8197
CV
9772003-05-20 Corinna Vinschen <corinna@vinschen.de>
978
979 * fhandler_socket.cc (secret_event_name): Return void. Use incoming
5c768c97 980 char * parameter instead of local static buffer.
293ce810 981 (fhandler_socket::create_secret_event): Accommodate new calling
44be8197
CV
982 convention for secret_event_name.
983 (fhandler_socket::close_secret_event): Ditto.
984
d4f3ce31
CV
9852003-05-20 Corinna Vinschen <corinna@vinschen.de>
986
987 * fhandler_socket.cc (SECRET_EVENT_NAME): Remove.
988 (ENTROPY_SOURCE_NAME): Ditto.
989 (secret_event_name): New static function. Create shared event name
990 with "Global\" prefix on systems supporting terminal services.
991 (fhandler_socket::set_connect_secret): Fix conditional.
992 (fhandler_socket::create_secret_event): Create secret event using
993 secret_event_name().
994 (fhandler_socket::close_secret_event): Ditto.
995 * shared.cc (shared_name): Create shared object name with "Global\"
996 prefix on systems supporting terminal services.
997 * wincap.cc: Set has_terminal_services capability throughout.
998 (wincap_2003): New global object representing Windows 2003 Server
999 capabilities.
293ce810 1000 (wincapc::init): Accommodate Windows 2003 Server.
d4f3ce31
CV
1001 * wincap.h (struct wincaps): Add has_terminal_services capability.
1002
10bada05
CV
10032003-05-20 Charles Wilson <cygwin@cwilson.fastmail.fm>
1004
1005 * winsup/cygwin/include/cygwin/version.h: Bump API minor version.
1006 * winsup/cygwin/include/cygwin/types.h: Define key_t as long long.
1007 * winsup/cygwin/cygwin.din: Add ftok, _ftok.
1008 * winsup/cygwin/ipc.cc (ftok): Rework implementation.
1009
d8ee8ca5
CF
10102003-05-18 Joe Buehler <jhpb@hekimian.com>
1011
10bada05 1012 * spawn.cc (spawn_guts): Show more of command line in strace output.
d8ee8ca5 1013
c8fa3426
TP
10142003-05-15 Thomas Pfaff <tpfaff@gmx.net>
1015
1016 * thread.h (pthread::init_mainthread): Remove function parameter.
1017 (MTinterface::Init): Ditto.
1018 * thread.cc (MTinterface::Init): Remove function parameter.
1019 Always initialize reent_key.
1020 (pthread::init_mainthread): Remove function parameter.
1021 (MTinterface::fixup_after_fork): Fix pthread::init_mainthread call.
1022 * dcrt0.cc (dll_crt_0_1) Fix calls to MTinterface::Init and
1023 pthread::init_mainthread.
1024 Call pthread::init_mainthread only when not forked.
b6717153 1025
f2669f5d
CV
10262003-05-15 Corinna Vinschen <corinna@vinschen.de>
1027
1028 * fhandler_proc.cc (format_proc_meminfo): Make swap memory output
1029 Linux style values.
1030
5d575f7d
CV
10312003-05-13 Corinna Vinschen <corinna@vinschen.de>
1032
1033 * include/cygwin/config.h: Define __USE_INTERNAL_STAT64 appropriately.
1034
194d9eb3
CV
10352003-05-12 Corinna Vinschen <corinna@vinschen.de>
1036
1037 * Makefile.in (CYGWIN_START): Define as crt0.o. Add to TARGET_LIBS.
1038 * fhandler.h (fhandler_virtual::fstat): Remove useless declaration.
1039 * fhandler_virtual.cc: Remove _COMPILING_NEWLIB define.
1040 * ipc.cc (ftok): Use stat64.
1041 * syscalls.cc (_fstat64): Remove alias.
1042 (_fstat): Ditto.
1043 (_stat): Ditto.
1044 (_fstat64_r): New function.
1045 (_fstat_r): Ditto.
1046 (_stat64_r): Ditto.
1047 (stat_r): Ditto.
1048 * crt0.o: New file, moved from newlib.
1049 * include/sys/param.h: Ditto.
1050 * include/sys/utime.h: Ditto.
1051 * include/sys/utmp.h: Ditto.
1052 * include/sys/dirent.h: Ditto. Expose different struct dirent,
1053 dependening of the environment.
1054
cc95baad
CV
10552003-05-11 Corinna Vinschen <corinna@vinschen.de>
1056
1057 Replace ino_t by __ino64_t throughout.
1058
aee70853
CV
10592003-05-11 Corinna Vinschen <corinna@vinschen.de>
1060
1061 * include/cygwin/types.h: Add key_t typedef.
1062
066ca06f
CF
10632003-05-10 Christopher Faylor <cgf@redhat.com>
1064
1065 * dir.cc (readdir): Fill out new old_d_ino field.
1066 * fhandler.h (fhandler_base::namehash): Define as ino_t.
1067 (fhandler_base::get_namehash): Ditto.
1068 * fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): Accommodate
1069 new 64 bit st_ino.
1070 * fhandler_socket.cc (fhandler_socket::fstat): Ditto.
1071 * path.cc (hash_path_name): Return ino_t.
1072 * syscalls.cc (stat64_to_stat32): Convert 64 bit inode to 32 bit.
1073 * winsup.h (hash_path_name): Declare as returning ino_t.
1074 * include/cygwin/stat.h (__stat32): Use 32 bit st_ino.
1075 (__stat64): Use 64 bit st_ino.
1076 * include/cygwin/types.h (__ino64_t): Define.
1077 (__ino32_t): Ditto.
1078 (ino_t): Define appropriately.
1079
3e66a81c
CV
10802003-05-10 Corinna Vinschen <corinna@vinschen.de>
1081
1082 * Makefile.in (NEW_FUNCTIONS): All 32/64 from 0.79 API get
1083 leading underscore.
1084 * cygwin.din: Ditto.
1085 * include/cygwin/version.h: Bump API minor number.
1086
d3b450f3
CV
10872003-05-09 Corinna Vinschen <corinna@vinschen.de>
1088
1089 * include/cygwin/config.h: New file.
1090
9508ebc5
CF
10912003-05-09 Christopher Faylor <cgf@redhat.com>
1092
1093 * cygthread.cc (cygthread::detach): Prioritize waiting for I/O
1094 completion over waiting for signal delivery.
1095
0bb7254f
TP
10962003-05-06 Thomas Pfaff <tpfaff@gmx.net>
1097
1098 * signal.cc (nanosleep): Do not wait twice for signal arrival.
1099
a6d745f5
CV
11002003-05-03 Corinna Vinschen <corinna@vinschen.de>
1101
1102 * include/cygwin/types.h: Fix erroneous definition of ino_t from
1103 2003-04-28.
1104
40d3c804
CV
11052003-05-03 Corinna Vinschen <corinna@vinschen.de>
1106
1107 * syscalls.cc (chown_worker): Allow chown'ing of socket files.
1108
2238537c
TP
11092003-04-30 Thomas Pfaff <tpfaff@gmx.net>
1110
1111 * Makefile.in: Revert patch from 2003-04-17.
1112
6ef342e4
CF
11132003-04-28 Brian Ford <ford@vss.fsi.com>
1114
1115 * profil.h (PROFADDR): Prevent overflow when text segments are larger
1116 than 256k.
1117 * profil.c (profthr_func): Raise thread priority for more accurate
1118 sampling.
1119
11202003-04-26 Christopher Faylor <cgf@redhat.com>
1121
1122 * path.cc (hash_path_name): Use ino_t as type.
1123
7d6d38aa
CF
11242003-04-26 Christopher Faylor <cgf@redhat.com>
1125
1126 * errno.cc (_sys_nerr): Fix compile error erroneously checked in on
1127 2003-04-23.
1128
f615d74b
CV
11292003-04-25 Corinna Vinschen <corinna@vinschen.de>
1130
1131 * include/netinet/ip.h: Include netinet/in_systm.h and netinet/in.h
1132 to allow standalone usage (autoconf).
1133
5d9a7c87
CF
11342003-04-23 Christopher Faylor <cgf@redhat.com>
1135
1136 * fork.cc: Change SLOW_PID_REUSE to NO_SLOW_PID_REUSE and invert ifdef
1137 sense throughout.
1138
0eaf24fe
CF
11392003-04-22 Christopher Faylor <cgf@redhat.com>
1140
1141 * select.cc (fhandler_pipe::ready_for_read): Assure that get_guard is
1142 called for successful non-blocking pipe reads.
1143
e8a57b4f
CV
11442003-04-22 Corinna Vinschen <corinna@vinschen.de>
1145
1146 * include/inttypes.h: New file.
1147 * include/stdint.h: New file.
1148 * include/cygwin/in.h: Include stdint.h instead of sys/types.h.
1149 * include/cygwin/types.h: Include stdint.h. Remove typedefs for
1150 intN_t and uintN_t since these are defined in stdint.h now.
1151
99b1a40d
CF
11522003-04-21 Christopher Faylor <cgf@redhat.com>
1153
650dc784 1154 * include/cygwin/version.h: Bump DLL major number to 1005. Change DLL
99b1a40d
CF
1155 minor number to 0. Bump API minor number.
1156
beb54085
CV
11572003-04-20 Corinna Vinschen <corinna@vinschen.de>
1158
1159 * autoload.cc (CreateWindowStationA): Add.
1160 (SetProcessWindowStation): Add.
1161
6b3bdf38
CF
11622003-04-19 Christopher Faylor <cgf@redhat.com>
1163
1164 * wincap.h (wincaps:pty_needs_alloc_console): New element.
1165 (wincapc:pty_needs_alloc_console): New function.
1166 * wincap.cc: Add pty_needs_alloc_console throughout.
1167 * fhandler_tty.cc (fhandler_tty_slave::open): Open an "invisible"
1168 console on first pty allocation.
1169
afa18d8a
CF
11702003-04-18 Christopher Faylor <cgf@redhat.com>
1171
1172 * fhandler_tty.cc (fhandler_tty_slave::open): Allocate a console
1173 whenever a pty is allocated.
1174
4e0d8778
CF
11752003-04-18 Christopher Faylor <cgf@redhat.com>
1176
1177 * Makefile.in: Use ${nostdlib} variable.
1178
11792003-04-18 Diego Biurrun <diego@biurrun.de>
1180
1181 * fhandler_proc.cc (format_proc_cpuinfo): Change /proc/cpuinfo "vendor
1182 id" string to "vendor_id" to conform with Linux systems.
1183
4e837e73
CF
11842003-04-17 Christopher Faylor <cgf@redhat.com>
1185
1186 * syscalls.cc (setsid): Don't call FreeConsole if ctty is already < 0.
1187
f3c1c540
TP
11882003-04-17 Thomas Pfaff <tpfaff@gmx.net>
1189
1190 * Makefile.in: Add finline-functions optimization to CXXFLAGS.
1191 * autoload.cc (LoadDLLprime): Rename std_dll_init to
1192 _std_dll_init.
1193 (std_dll_init): Remove name mangling prototype. Add attributes
1194 used and noinline.
1195 (wsock_init): Ditto.
1196 Change wsock_init to _wsock_init in wsock32 and ws2_32
1197 LoadDLLprime.
1198 * exceptions.cc (unused_sig_wrapper): Remove prototype. Add
1199 attributes used and noinline.
1200 * pwdgrp.h ((pwdgrp (passwd *&)): Remove inline code.
1201 (pwdgrp (__group32 *&)): Ditto.
1202 * grp.cc (pwdgrp (passwd *&)): Outline constructor.
1203 (pwdgrp (__group32 *&)): Ditto.
1204
a4cea440
TP
12052003-04-17 Thomas Pfaff <tpfaff@gmx.net>
1206
1207 * thread.h (pthread::equal): New static method.
1208 * thread.cc: Rename pthread_equal to pthread::equal throughout.
1209 (pthread_equal): Use pthread::equal to compare threads ids.
1210
c448f78f
CF
12112003-04-15 Christopher Faylor <cgf@redhat.com>
1212
1213 * termios.cc (setspeed): New function.
1214 (cfsetospeed): Use setspeed to set speed.
1215 (cfsetispeed): Use setspeed to set speed.
1216
12172003-04-15 Chris January <chris@atomice.net>
1218
1219 * autoload.cc: Add load statement for UuidCreate, and
1220 UuidCreateSequential.
1221 * cpuid.h: New file.
1222 * cygwin.din: Export gethostid.
1223 * fhandler_proc.cc (cpuid): Move to cpuid.h.
1224 (can_set_flag): Move to cpuid.h.
1225 * syscalls.cc (gethostid): New function.
5f92bef8 1226 * version.h: Bump api minor version number to 83.
c448f78f 1227
ffb576fb
TP
12282003-04-15 Thomas Pfaff <tpfaff@gmx.net>
1229
1230 * thread.h (pthread_rwlock::release): New method.
c448f78f
CF
1231 * thread.cc (pthread_rwlock::unlock): Use release to signal waiting
1232 threads.
ffb576fb
TP
1233 (pthread_rwlock::rdlock_cleanup): Signal waiting threads after a
1234 cancelation.
1235 (pthread_rwlock::wrlock_cleanup): Ditto.
1236
b3acb772
CF
12372003-04-13 Pierre Humblet <pierre.humblet@ieee.org>
1238
1239 * mkvers.sh: Prefix day with 0 in date only when day < 10.
1240
2e23862a
CV
12412003-04-11 Pierre Humblet <pierre.humblet@ieee.org>
1242
1243 * security.cc (get_info_from_sd): New function.
1244 (get_nt_attribute): Only call read_sd and get_info_from_sd.
1245 Return void.
1246 (get_file_attribute): Move sd error handling to get_info_from_sd.
1247 and symlink handling to fhandler_disk_file::fstat_helper.
1248 (get_nt_object_attribute): Only call read_sd and get_info_from_sd.
1249 Return void.
1250 (get_object_attribute): Remove symlink handling and simply return -1
1251 when ntsec is off.
1252 * fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): For
1253 symlinks set the attribute, call get_file_attribute to get the ids
1254 and return. In the normal case call get_file_attribute with the
1255 addresses of the buffer ids and do not recheck if the file is a socket.
1256
73afb2ab
CF
12572003-04-10 Christopher Faylor <cgf@redhat.com>
1258
1259 * cygthread.cc (cygthread::stub): Initialize stack pointer earlier.
1260 (cygthread::simplestub): Initialize stack pointer.
1261 (cygthread::terminate_thread): Account for possibility that stack
1262 pointer has not been set. Issue warnings for unusual conditions.
1263
2a1e8e11
CV
12642003-04-10 Corinna Vinschen <corinna@vinschen.de>
1265
1266 * regex/regex.h: Define regoff_t as _off_t.
1267 * regex/regex2.h: Ditto.
1268
ac5ec961
CV
12692003-04-10 Corinna Vinschen <corinna@vinschen.de>
1270
1271 * cygwin.din: Export wcscoll, wcswidth and wcwidth.
1272 * include/cygwin/version.h: Bump API minor number.
1273
e5d6d535
CF
12742003-04-10 Christopher Faylor <cgf@redhat.com>
1275
1276 * cygthread.h: Change 'avail' cygthread element to 'inuse' throughout.
1277 * cygthread.cc: Ditto.
1278 (cygthread::stub): Don't initialize already initialized events.
1279 (cygthread::freerange): Don't create thread here.
1280 (cygthread::cygthread): Create thread here. Die if thread not created.
1281 (cygthread::operator new): Simplify. Just grab a thread structure from
1282 the pool. Don't try to start the thread.
1283 (cygthread::terminate_thread): Don't close event handles. Just reuse
d8ee8ca5 1284 them. Call MEM_RELEASE rather than MEM_DECOMMIT (from Joe uehler).
e5d6d535 1285
ca81cd60
CF
12862003-04-08 Bob Cassels <bcassels@abinitio.com>
1287
1288 * fhandler_console.cc (fhandler_console::read) Handle certain key up
1289 events, to allow pasting accented characters and typing them using the
1290 "alt + numerics" sequences.
1291
12922003-04-07 Christopher Faylor <cgf@redhat.com>
1293
1294 * include/limits.h (IOV_MAX): Set to a number which is small enough to
1295 use in an array.
1296
b410f168
CF
12972003-04-04 Christopher Faylor <cgf@redhat.com>
1298
9dbe3289
CF
1299 * cygthread.h (cygthread::avail): Make LONG for easier use with
1300 Interlocked* functions.
1301 * cygthread.cc (cygthread::init): Eliminate unneeded muto.
1302 (cygthread::operator new): Don't lock. Instead change use of avail
1303 variable into tri-state: available (1), not available (-1),
1304 uninitialized (0).
1305 (cygthread::terminate_thread): Set avail to uninitialized.
1306 (cygthread::detach): Eliminate local 'avail'. Always set avail to 1
1307 unless signalled.
1308
13092003-04-04 Christopher Faylor <cgf@redhat.com>
1310
1311 * cygthread.cc (cygthread::operator new): Be more defensive when messing with
b410f168
CF
1312 threads that are marked "unavailable".
1313
a61bf8c3
CF
13142003-04-03 Christopher Faylor <cgf@redhat.com>
1315
1316 * fhandler_console.cc (CONVERT_LIMIT): Use a size for the 21st century.
1317
d5292d66
CV
13182003-04-03 Corinna Vinschen <corinna@vinschen.de>
1319
1320 * external.cc (check_ntsec): Return general ntsec state on NULL
1321 filename. Check wincap.is_security() additionally.
1322
5a87c616
CF
13232003-04-02 Christopher Faylor <cgf@redhat.com>
1324
1325 * Makefile.in (EXTRA_OFILES): Remove debugging object.
1326
d99c6176
CF
13272003-04-02 Jason Tishler <jason@tishler.net>
1328 Christopher Faylor <cgf@redhat.com>
1329
1330 * external.cc (check_ntsec): New function.
1331 (cygwin_internal): Add CW_CHECK_NTSEC handling to call check_ntsec()
1332 from applications.
1333 * include/cygwin/version.h: Bump API minor number.
1334 * include/sys/cygwin.h (cygwin_getinfo_types): Add CW_CHECK_NTSEC.
1335
13362003-04-02 Christopher Faylor <cgf@redhat.com>
1337
1338 * cygthread.cc (cygthread::new): Add more defensive debugging.
1339
2d388e43 13402003-04-01 Pierre Humblet <pierre.humblet@ieee.org>
d99c6176 1341
2d388e43
CV
1342 * fhandler.cc (fhandler_base::fstat): Set the uid and gid fields
1343 from the current effective ids.
1344 * fhandler_socket.cc (fhandler_socket::fstat): Keep the uid and gid set
1345 by fhandler_base::fstat.
1346 * security.cc (get_nt_attribute): Do not test wincap.has_security ().
1347 (get_nt_object_attribute): Ditto.
1348 (get_file_attribute): Add test for wincap.has_security ().
1349 (get_object_attribute): Ditto.
1350
1727fba0
CV
13512003-04-01 Corinna Vinschen <corinna@vinschen.de>
1352
1353 * dir.cc: Change __off32_t to _off_t and __off64_t to _off64_t
1354 throughout.
1355 * fhandler.cc: Ditto.
1356 * fhandler.h: Ditto.
1357 * fhandler_clipboard.cc: Ditto.
1358 * fhandler_disk_file.cc: Ditto.
1359 * fhandler_dsp.cc: Ditto.
1360 * fhandler_floppy.cc: Ditto.
1361 * fhandler_mem.cc: Ditto.
1362 * fhandler_proc.cc: Ditto.
1363 * fhandler_process.cc: Ditto.
1364 * fhandler_random.cc: Ditto.
1365 * fhandler_registry.cc: Ditto.
1366 * fhandler_tape.cc: Ditto.
1367 * fhandler_termios.cc: Ditto.
1368 * fhandler_virtual.cc: Ditto.
1369 * fhandler_zero.cc: Ditto.
1370 * mmap.cc: Ditto.
1371 * pipe.cc: Ditto.
1372 * syscalls.cc: Ditto.
1373 * winsup.h: Ditto.
1374 * include/cygwin/stat.h: Ditto.
1375 * include/cygwin/types.h: Ditto. Remove definition of __off32_t
1376 and __off64_t.
1377
333879e7
CF
13782003-03-31 Christopher Faylor <cgf@redhat.com>
1379
1380 * exceptions.cc (setup_handler): Make sure winapi lock is released when
1381 exiting loop.
1382
a2105d93
CF
13832003-03-30 Christopher Faylor <cgf@redhat.com>
1384
1385 * include/cygwin/fs.h: Remove unneeded include.
1386 * include/cygwin/in.h: Include sys/types.h rather than cygwin/types.h.
1387
856a9750
CV
13882003-03-29 Corinna Vinschen <corinna@vinschen.de>
1389
1390 * syscalls.cc (login): Fix comment.
1391 (logout): Ditto.
1392
8304de2e
CV
13932003-03-29 Corinna Vinschen <corinna@vinschen.de>
1394
1395 * syscalls.cc: Slightly cleanup all utmp functions.
1396 (login): Use mutex to secure against concurrent access to wtmp file.
1397 (logout): Rewrite using POSIX calls.
1398 (utmp_fd): Initialized to -1 now. Any value < 0 is treated as closed
1399 in subsequent functions.
1400 (utmp_readonly): New variable, indicating utmp file open for reading
1401 only.
1402 (internal_setutent): New function implementing setutent().
1403 (setutent): Call internal_setutent now.
1404 (endutent): Reset utmp_readonly.
1405 (getutent): Return immediately if utmp file can't be opened.
1406 (getutid): Ditto.
1407 (getutline): Ditto.
1408 (pututline): Ditto. Use mutex to secure against concurrent access to
1409 utmp file.
1410
46c8214c
CF
14112003-03-28 Christopher Faylor <cgf@redhat.com>
1412
1413 * Makefile.in: Remove EXE_LDFLAGS. Fix fhandler_CFLAGS typo. Recognize .s suffix.
1414 * configure.in: Remove EXE_LDFLAGS.
1415 * configure: Regenerate.
1416
a7ab35c1
CF
14172003-03-28 Christopher Faylor <cgf@redhat.com>
1418
1419 * include/sys/cygwin.h: Declare cygwin_internal as unsigned long.
1420 * external.cc (cygwin_internal): Define as unsigned long.
1421
14222003-03-27 Christopher Faylor <cgf@redhat.com>
1423
1424 * include/sys/cygwin.h: Move cygwin_internal outside of WINVER
1425 conditional.
1426
eff6c00e
TP
14272003-03-27 Thomas Pfaff <tpfaff@gmx.net>
1428
1429 * thread.cc: Change 1==foo equations to foo==1 throughout.
1430
15648790
TP
14312003-03-27 Thomas Pfaff <tpfaff@gmx.net>
1432
1433 * thread.h: Change class names, methods, members and local vars
1434 according to the GNU coding style.
1435 * thread.cc: Ditto.
1436 * dcrt0.cc (dll_crt0_1): Rename pthread::initMainThread call to
1437 pthread::init_mainthread.
1438 * pthread.cc (pthead_getsequence_np): Rename pthread::isGoodObject
1439 call to pthread::is_good_object.
1440
98b36ec8
CV
14412003-03-27 Joe Buehler <jhpb@draco.hekimian.com>
1442
1ce82d24
CF
1443 * autoload.cc: Add RegGetKeySecurity().
1444 * security.cc (get_nt_object_attribute): Use RegGetKeySecurity() for
98b36ec8
CV
1445 performance.
1446
85738bf7
CF
14472003-03-25 Christopher Faylor <cgf@redhat.com>
1448 Joe Buehler <jhpb@draco.hekimian.com>
1449
1450 * fork.cc (fork_parent): Don't copy signals from parent to child here.
1451 * sigproc.cc (proc_subproc): Copy signals from parent to child pinfo
1452 here.
1453
9306ba2e
TP
14542003-03-23 Thomas Pfaff <tpfaff@gmx.net>
1455
85738bf7
CF
1456 * thread.h (class List): Move inline code inside class declaration.
1457 (List::forEach): Change callback parameter to template class member
1458 function pointer.
1459 (pthread_keys::fixup_before_fork): Change to inline. Use List::forEach
1460 to fixup keys.
9306ba2e
TP
1461 (pthread_keys::fixup_after_fork): Ditto.
1462 (pthread_keys::runAllDestructors): Ditto.
1463 (pthread_key::saveAKey): Remove.
1464 (pthread_key::restoreAKey): Ditto.
1465 (pthread_key::destroyAKey): Ditto.
1466 (pthread_key::run_destructor): Rename to runDestructor.
85738bf7
CF
1467 (pthread_mutex::fixup_after_fork): Change to inline. Use List::forEach
1468 to fixup mutexes after a fork.
9306ba2e
TP
1469 (pthread_mutex::FixupAfterFork): New method.
1470 (pthread_mutex::mutexes): New member.
85738bf7
CF
1471 (pthread_cond::fixup_after_fork): Change to inline. Use List::forEach
1472 to fixup conds after a fork.
9306ba2e
TP
1473 (pthread_cond::FixupAfterFork): New method.
1474 (pthread_cond::conds): New member.
85738bf7 1475 (pthread_rwlock::fixup_after_fork): Change to inline. Use
9306ba2e
TP
1476 List::forEach to fixup rwlocks after a fork.
1477 (pthread_rwlock::FixupAfterFork): New method.
1478 (pthread_rwlock::rwlocks): New member.
85738bf7
CF
1479 (semaphore::fixup_after_fork): Change to inline. Use List::forEach to
1480 fixup mutexes after a fork.
9306ba2e
TP
1481 (semaphore::FixupAfterFork): New method.
1482 (semaphore::semaphores): New member.
1483 (MTinterface::mutexs): Remove.
1484 (MTinterface::conds): Ditto.
1485 (MTinterface::rwlocks): Ditto.
1486 (MTinterface::semaphores): Ditto.
1487 (pthread_equal): Add extern "C".
1488 (pthread_mutex_lock): Ditto.
85738bf7
CF
1489
1490 * thread.cc (MTinterface::fixup_after_fork): Change fixup_after_fork
1491 calls for pthread objects.
9306ba2e 1492 (semaphore::conds): Instantiate.
85738bf7
CF
1493 (pthread_cond::pthread_cond): Use List::Insert rather than custom list
1494 code.
1495 (pthread_cond::~pthread_cond): Use List::Remove rather than custom list
1496 code.
9306ba2e
TP
1497 (pthread_cond::fixup_after_fork): Rename to FixupAfterFork.
1498 (pthread_rwlock::rwlocks): Instantiate.
85738bf7
CF
1499 (pthread_rwlock::pthread_crwlock): Use List::Insert rather than custom
1500 list code.
1501 (pthread_rwlock::~pthread_rwlock): Use List::Remove rather than custom
1502 list code.
9306ba2e
TP
1503 (pthread_rwlock::fixup_after_fork): Rename to FixupAfterFork.
1504 (pthread_key::saveAKey): Remove.
1505 (pthread_key::fixup_before_fork): Ditto.
1506 (pthread_key::restoreAKey): Ditto.
1507 (pthread_key::fixup_after_fork): Ditto.
1508 (pthread_key::destroyAKey): Ditto.
1509 (pthread_key::runAllDestructors): Ditto.
1510 (pthread_key::run_destructor): Rename to runDestructor.
1511 (pthread_mutex::mutexes): Instantiate.
85738bf7
CF
1512 (pthread_mutex::pthread_mutex): Use List::Insert rather than custom
1513 list code.
1514 (pthread_mutex::~pthread_mutex): Use List::Remove rather than custom
1515 list code.
9306ba2e
TP
1516 (pthread_mutex::fixup_after_fork): Rename to FixupAfterFork.
1517 (semaphore::conds): Instantiate.
85738bf7
CF
1518 (semaphore::semaphore): Use List::Insert rather than custom list code.
1519 (semaphores::~semaphore): Use List::Remove rather than custom list
9306ba2e 1520 code.
9306ba2e
TP
1521 (semaphore::fixup_after_fork): Rename to FixupAfterFork.
1522
ff3ef36d
CF
15232003-03-22 Christopher Faylor <cgf@redhat.com>
1524
1525 * pipe.cc (fhandler_pipe::dup): Don't dup input_handle if it doesn't
1526 exist.
1527
ca04f61f
CF
15282003-03-22 Christopher Faylor <cgf@redhat.com>
1529
1530 * syscalls.cc (unlink): Be more defensive when SetFileAttributes is
1531 called. Fix typo in debugging output.
1532
89e7a1ce
CF
15332003-03-21 Christopher Faylor <cgf@redhat.com>
1534
1535 * fork.cc: Conditionalize use of slow_pid_reuse throughout. It's not
1536 necessary for newer versions of bash.
1537
fa85038b
CV
15382003-03-20 Corinna Vinschen <corinna@vinschen.de>
1539
1540 * fhandler_socket.cc (fhandler_socket::sendto): Restrict EPIPE and
1541 SIGPIPE handling to connection oriented sockets. Add comment.
1542
4da34970
CF
15432003-03-19 Christopher Faylor <cgf@redhat.com>
1544
1545 * sigproc.h (signal_fixup_after_exec): Eliminate argument in declaration.
1546 * exceptions.cc (signal_fixup_after_exec): Eliminate argument in
1547 definition. Don't reset signal handlers after spawm. Just treat like
1548 fork/exec.
1549 * dcrt0.cc (dll_crt0_1): Don't pass PROC_SPAWN argument to
1550 signal_fixup_after_exec.
1551 * syscalls.cc (unlink): Don't change attributes of file if not readonly/system.
1552 Ditto for resetting of arguments.
1553
036ac6b3
CV
15542003-03-19 Corinna Vinschen <corinna@vinschen.de>
1555
1556 * glob.c: Eliminate __INSIDE_CYGWIN__ preprocessor conditionals
1557 throughout.
1558
b1897d27
CV
15592003-03-19 Corinna Vinschen <corinna@vinschen.de>
1560
1561 * fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): Fix
1562 wrong usage of S_IFDIR.
1563 * security.cc (get_attribute_from_acl): Ditto.
1564 (get_file_attribute): Fix wrong usage of S_IFLNK.
1565 (get_object_attribute): Ditto.
1566 (alloc_sd): Fix wrong usage of S_IFDIR.
1567 * syscalls.cc (chmod): Allow chmod'ing of socket files.
1568
c16d0946
CV
15692003-03-19 Corinna Vinschen <corinna@vinschen.de>
1570
1571 * include/cygwin/version.h (CYGWIN_VERSION_CHECK_FOR_USING_BIG_TYPES):
1572 Define.
1573 * glob.c (g_lstat): Use CYGWIN_VERSION_CHECK_FOR_USING_BIG_TYPES
1574 instead of numerical constants.
1575 (g_stat): Ditto.
1576
6a80a133
TP
15772003-03-18 Thomas Pfaff <tpfaff@gmx.net>
1578
1579 * pthread.cc (pthread_attr_init): Remove
1580 (pthread_attr_destroy): Ditto.
1581 (pthread_attr_setdetachstate): Ditto.
1582 (pthread_attr_getdetachstate): Ditto.
1583 (pthread_attr_setstacksize): Ditto.
1584 (pthread_attr_getstacksize): Ditto.
1585 (pthread_attr_setinheritsched): Ditto.
1586 (pthread_attr_getinheritsched): Ditto.
1587 (pthread_attr_setschedparam): Ditto.
1588 (pthread_attr_getschedparam): Ditto.
1589 (pthread_attr_setschedpolicy): Ditto.
1590 (pthread_attr_getschedpolicy): Ditto.
1591 (pthread_attr_setscope): Ditto.
1592 (pthread_attr_getscope): Ditto.
1593 (pthread_attr_setstackaddr): Ditto.
1594 (pthread_attr_getstackaddr): Ditto.
1595 (pthread_key_create): Ditto.
1596 (pthread_key_delete): Ditto.
1597 (pthread_setspecific): Ditto.
1598 (pthread_getspecific): Ditto.
1599 (pthread_kill): Ditto.
1600 (pthread_sigmask): Ditto.
1601 (pthread_equal): Ditto.
1602 (pthread_mutex_lock): Ditto.
1603 (pthread_mutex_trylock): Ditto.
1604 (pthread_mutex_unlock): Ditto.
1605 (pthread_mutex_destroy): Ditto.
1606 (pthread_mutex_setprioceiling): Ditto.
1607 (pthread_mutex_getprioceiling): Ditto.
1608 (pthread_mutexattr_destroy): Ditto.
1609 (pthread_mutexattr_getprioceiling): Ditto.
1610 (pthread_mutexattr_getprotocol): Ditto.
1611 (pthread_mutexattr_getpshared): Ditto.
1612 (pthread_mutexattr_gettype): Ditto.
1613 (pthread_mutexattr_init): Ditto.
1614 (pthread_mutexattr_setprioceiling): Ditto.
1615 (pthread_mutexattr_setprotocol): Ditto.
1616 (pthread_mutexattr_setpshared): Ditto.
1617 (pthread_mutexattr_settype): Ditto.
1618 (pthread_cond_destroy): Ditto.
1619 (pthread_cond_signal): Ditto.
1620 (pthread_cond_broadcast): Ditto.
1621 (pthread_condattr_init): Ditto.
1622 (pthread_condattr_destroy): Ditto.
1623 (pthread_condattr_getpshared): Ditto.
1624 (pthread_condattr_setpshared): Ditto.
1625 (pthread_rwlock_destroy): Ditto.
1626 (pthread_rwlock_rdlock): Ditto.
1627 (pthread_rwlock_tryrdlock): Ditto.
1628 (pthread_rwlock_wrlock): Ditto.
1629 (pthread_rwlock_trywrlock): Ditto.
1630 (pthread_rwlock_unlock): Ditto.
1631 (pthread_rwlockattr_init): Ditto.
1632 (pthread_rwlockattr_getpshared): Ditto.
1633 (pthread_rwlockattr_setpshared): Ditto.
1634 (pthread_rwlockattr_destroy): Ditto.
1635 (pthread_getconcurrency): Ditto.
1636 (pthread_setconcurrency): Ditto.
1637 (pthread_getschedparam): Ditto.
1638 (pthread_setschedparam): Ditto.
1639
1640 * thread.h (__pthread_attr_init): Remove prototype.
1641 (__pthread_attr_destroy): Ditto.
1642 (__pthread_attr_setdetachstate): Ditto.
1643 (__pthread_attr_getdetachstate): Ditto.
1644 (__pthread_attr_setstacksize): Ditto.
1645 (__pthread_attr_getstacksize): Ditto.
1646 (__pthread_attr_setinheritsched): Ditto.
1647 (__pthread_attr_getinheritsched): Ditto.
1648 (__pthread_attr_setschedparam): Ditto.
1649 (__pthread_attr_getschedparam): Ditto.
1650 (__pthread_attr_setschedpolicy): Ditto.
1651 (__pthread_attr_getschedpolicy): Ditto.
1652 (__pthread_attr_setscope): Ditto.
1653 (__pthread_attr_getscope): Ditto.
1654 (__pthread_attr_setstackaddr): Ditto.
1655 (__pthread_attr_getstackaddr): Ditto.
1656 (__pthread_key_create): Ditto.
1657 (__pthread_key_delete): Ditto.
1658 (__pthread_setspecific): Ditto.
1659 (__pthread_getspecific): Ditto.
1660 (__pthread_kill): Ditto.
1661 (__pthread_sigmask): Ditto.
1662 (__pthread_equal): Ditto.
1663 (__pthread_mutex_lock): Ditto.
1664 (__pthread_mutex_trylock): Ditto.
1665 (__pthread_mutex_unlock): Ditto.
1666 (__pthread_mutex_destroy): Ditto.
1667 (__pthread_mutex_setprioceiling): Ditto.
1668 (__pthread_mutex_getprioceiling): Ditto.
1669 (__pthread_mutexattr_destroy): Ditto.
1670 (__pthread_mutexattr_getprioceiling): Ditto.
1671 (__pthread_mutexattr_getprotocol): Ditto.
1672 (__pthread_mutexattr_getpshared): Ditto.
1673 (__pthread_mutexattr_gettype): Ditto.
1674 (__pthread_mutexattr_init): Ditto.
1675 (__pthread_mutexattr_setprioceiling): Ditto.
1676 (__pthread_mutexattr_setprotocol): Ditto.
1677 (__pthread_mutexattr_setpshared): Ditto.
1678 (__pthread_mutexattr_settype): Ditto.
1679 (__pthread_cond_destroy): Ditto.
1680 (__pthread_cond_signal): Ditto.
1681 (__pthread_cond_broadcast): Ditto.
1682 (__pthread_condattr_init): Ditto.
1683 (__pthread_condattr_destroy): Ditto.
1684 (__pthread_condattr_getpshared): Ditto.
1685 (__pthread_condattr_setpshared): Ditto.
1686 (__pthread_rwlock_destroy): Ditto.
1687 (__pthread_rwlock_rdlock): Ditto.
1688 (__pthread_rwlock_tryrdlock): Ditto.
1689 (__pthread_rwlock_wrlock): Ditto.
1690 (__pthread_rwlock_trywrlock): Ditto.
1691 (__pthread_rwlock_unlock): Ditto.
1692 (__pthread_rwlockattr_init): Ditto.
1693 (__pthread_rwlockattr_getpshared): Ditto.
1694 (__pthread_rwlockattr_setpshared): Ditto.
1695 (__pthread_rwlockattr_destroy): Ditto.
1696 (__pthread_getconcurrency): Ditto.
1697 (__pthread_setconcurrency): Ditto.
1698 (__pthread_getschedparam): Ditto.
1699 (__pthread_setschedparam): Ditto.
1700
1701 * thread.cc: Rename __pthread_equal to pthread_equal throughout.
1702 Change pthread_self parameter appropriate.
1703 (__pthread_attr_init): Remove __ prefix. Change to extern "C".
1704 (__pthread_attr_destroy): Ditto.
1705 (__pthread_attr_setdetachstate): Ditto.
1706 (__pthread_attr_getdetachstate): Ditto.
1707 (__pthread_attr_setstacksize): Ditto.
1708 (__pthread_attr_getstacksize): Ditto.
1709 (__pthread_attr_setinheritsched): Ditto.
1710 (__pthread_attr_getinheritsched): Ditto.
1711 (__pthread_attr_setschedparam): Ditto.
1712 (__pthread_attr_getschedparam): Ditto.
1713 (__pthread_attr_setschedpolicy): Ditto.
1714 (__pthread_attr_getschedpolicy): Ditto.
1715 (__pthread_attr_setscope): Ditto.
1716 (__pthread_attr_getscope): Ditto.
1717 (__pthread_attr_setstackaddr): Ditto.
1718 (__pthread_attr_getstackaddr): Ditto.
1719 (__pthread_key_create): Ditto.
1720 (__pthread_key_delete): Ditto.
1721 (__pthread_setspecific): Ditto.
1722 (__pthread_getspecific): Ditto.
1723 (__pthread_kill): Ditto.
1724 (__pthread_sigmask): Ditto.
1725 (__pthread_equal): Ditto.
1726 (__pthread_mutex_lock): Ditto.
1727 (__pthread_mutex_trylock): Ditto.
1728 (__pthread_mutex_unlock): Ditto.
1729 (__pthread_mutex_destroy): Ditto.
1730 (__pthread_mutex_setprioceiling): Ditto.
1731 (__pthread_mutex_getprioceiling): Ditto.
1732 (__pthread_mutexattr_destroy): Ditto.
1733 (__pthread_mutexattr_getprioceiling): Ditto.
1734 (__pthread_mutexattr_getprotocol): Ditto.
1735 (__pthread_mutexattr_getpshared): Ditto.
1736 (__pthread_mutexattr_gettype): Ditto.
1737 (__pthread_mutexattr_init): Ditto.
1738 (__pthread_mutexattr_setprioceiling): Ditto.
1739 (__pthread_mutexattr_setprotocol): Ditto.
1740 (__pthread_mutexattr_setpshared): Ditto.
1741 (__pthread_mutexattr_settype): Ditto.
1742 (__pthread_cond_destroy): Ditto.
1743 (__pthread_cond_signal): Ditto.
1744 (__pthread_cond_broadcast): Ditto.
1745 (__pthread_condattr_init): Ditto.
1746 (__pthread_condattr_destroy): Ditto.
1747 (__pthread_condattr_getpshared): Ditto.
1748 (__pthread_condattr_setpshared): Ditto.
1749 (__pthread_rwlock_destroy): Ditto.
1750 (__pthread_rwlock_rdlock): Ditto.
1751 (__pthread_rwlock_tryrdlock): Ditto.
1752 (__pthread_rwlock_wrlock): Ditto.
1753 (__pthread_rwlock_trywrlock): Ditto.
1754 (__pthread_rwlock_unlock): Ditto.
1755 (__pthread_rwlockattr_init): Ditto.
1756 (__pthread_rwlockattr_getpshared): Ditto.
1757 (__pthread_rwlockattr_setpshared): Ditto.
1758 (__pthread_rwlockattr_destroy): Ditto.
1759 (__pthread_getconcurrency): Ditto.
1760 (__pthread_setconcurrency): Ditto.
1761 (__pthread_getschedparam): Ditto.
1762 (__pthread_setschedparam): Ditto.
1763
00d296a3
TP
17642003-03-18 Thomas Pfaff <tpfaff@gmx.net>
1765
1766 * cygwin.din: Add pthread_rwlock_destroy, pthread_rwlock_init,
1767 pthread_rwlock_rdlock, pthread_rwlock_tryrdlock,
1768 pthread_rwlock_wrlock, pthread_rwlock_trywrlock,
1769 pthread_rwlock_unlock, pthread_rwlockattr_init,
1770 pthread_rwlockattr_getpshared, pthread_rwlockattr_setpshared,
1771 and pthread_rwlockattr_destroy.
1772 * include/cygwin/version.h: Bump API minor number.
1773 * include/pthread.h (PTHREAD_RWLOCK_INITIALIZER): Define a
1774 reasonable value.
1775 Add prototypes for pthread_rwlock_destroy, pthread_rwlock_init,
1776 pthread_rwlock_rdlock, pthread_rwlock_tryrdlock,
1777 pthread_rwlock_wrlock, pthread_rwlock_trywrlock,
1778 pthread_rwlock_unlock, pthread_rwlockattr_init,
1779 pthread_rwlockattr_getpshared, pthread_rwlockattr_setpshared,
1780 and pthread_rwlockattr_destroy.
1781 * thread.h (PTHREAD_ONCE_MAGIC): Remove superflous semicolon.
1782 (PTHREAD_RWLOCK_MAGIC): New define.
1783 (PTHREAD_RWLOCKATTR_MAGIC): Ditto.
1784 (pthread_rwlockattr): New class.
1785 (pthread_rwlock): Ditto.
1786 (MTinterface::rwlocks): New member.
1787 (MTinterface::MTinterface): Initialize rwlocks.
1788 Add prototypes for __pthread_rwlock_destroy,
1789 __pthread_rwlock_wrlock, __pthread_rwlock_trywrlock,
1790 __pthread_rwlock_unlock, __pthread_rwlockattr_init,
1791 __pthread_rwlockattr_getpshared, __pthread_rwlockattr_setpshared,
1792 and __pthread_rwlockattr_destroy.
1793 * thread.cc (MTinterface::Init): Initialize rwlock internal mutex.
1794 (MTinterface::fixup_after_fork): Fixup rwlocks after fork.
1795 (pthread_rwlockattr::isGoodObject): Implement.
1796 (pthread_rwlockattr::pthread_rwlockattr): Ditto.
1797 (pthread_rwlockattr::~pthread_rwlockattr): Ditto.
1798 (pthread_rwlock::initMutex): Ditto.
1799 (pthread_rwlock::pthread_rwlock): Ditto.
1800 (pthread_rwlock::~pthread_rwlock): Ditto.
1801 (pthread_rwlock::RdLock): Ditto.
1802 (pthread_rwlock::TryRdLock): Ditto.
1803 (pthread_rwlock::WrLock): Ditto.
1804 (pthread_rwlock::TryWrLock): Ditto.
1805 (pthread_rwlock::UnLock): Ditto.
1806 (pthread_rwlock::addReader): Ditto.
1807 (pthread_rwlock::removeReader): Ditto.
1808 (pthread_rwlock::lookupReader): Ditto.
1809 (pthread_rwlock::RdLockCleanup): Ditto.
1810 (pthread_rwlock::WrLockCleanup): Ditto.
1811 (pthread_rwlock::fixup_after_fork): Ditto.
1812 (pthread_rwlock::isGoodObject): Ditto.
1813 (pthread_rwlock::isGoodInitializer): Ditto.
1814 (pthread_rwlock::isGoodInitializerOrObject): Ditto.
1815 (pthread_rwlock::isGoodInitializerOrBadObject): Ditto.
1816 (__pthread_rwlock_destroy): Ditto.
1817 (pthread_rwlock::init): Ditto.
1818 (__pthread_rwlock_rdlock): Ditto.
1819 (__pthread_rwlock_tryrdlock): Ditto.
1820 (__pthread_rwlock_wrlock): Ditto.
1821 (__pthread_rwlock_trywrlock): Ditto.
1822
f592b05d
TP
18232003-03-18 Thomas Pfaff <tpfaff@gmx.net>
1824
1825 * thread.h (pthread_cond::ExitingWait): Remove.
1826 (pthread_cond::mutex): Ditto.
1827 (pthread_cond::cond_access): Ditto.
1828 (pthread_cond::win32_obj_id): Ditto.
1829 (pthread_cond::TimedWait): Ditto.
1830 (pthread_cond::BroadCast): Ditto.
1831 (pthread_cond::Signal): Ditto.
1832 (pthread_cond::waiting): Change type to unsigned long.
1833 (pthread_cond::pending): New member.
1834 (pthread_cond::semWait): Ditto.
1835 (pthread_cond::mtxIn): Ditto.
1836 (pthread_cond::mtxOut): Ditto.
1837 (pthread_cond::mtxCond): Ditto.
1838 (pthread_cond::UnBlock): New method.
1839 (pthread_cond::Wait): Ditto.
1840 * thread.cc: Update list of cancellation points.
1841 (pthread_cond::pthread_cond): Rewrite.
1842 (pthread_cond::~pthread_cond): Ditto.
1843 (pthread_cond::TimedWait): Remove.
1844 (pthread_cond::BroadCast): Ditto.
1845 (pthread_cond::Signal): Ditto.
1846 (pthread_cond::UnBlock): Implement.
1847 (pthread_cond::Wait): Ditto.
1848 (pthread_cond::fixup_after_fork): Rewrite.
1849 (pthread_mutex::fixup_after_fork): Remove DETECT_BAD_APP
1850 conditional.
1851 (__pthread_cond_broadcast): Just return 0 if the condition is
1852 not initialized. Call pthread_cond::UnBlock to release blocked
1853 threads.
1854 (__pthread_cond_signal): Ditto.
1855 (__pthread_cond__dowait): Rewrite.
1856 (pthread_cond_timedwait): Add pthread_testcancel call. Fix
1857 waitlength calculation.
1858 (pthread_cond_wait): Add pthread_testcancel call.
1859
2ff03dc2
TP
18602003-03-18 Thomas Pfaff <tpfaff@gmx.net>
1861
1862 * include/pthread.h (PTHREAD_MUTEX_NORMAL): New define.
1863 * thread.cc: Remove errno.h include.
1864 (pthread::precreate): Change internal mutex type to normal.
1865 (pthread_mutex::canBeUnlocked): Implement.
1866 (pthread_mutex::pthread_mutex): Initialize lock_counter with 0.
1867 (pthread_mutex::Lock): Rename to _Lock. Add self parameter.
1868 Change lock_counter logic. Update SetOwner call.
1869 (pthread_mutex::TryLock): Rename to _TryLock. Add self parameter.
1870 Change lock_counter logic. Update SetOwner call.
1871 (pthread_mutex::UnLock): Rename to _UnLock. Add self parameter.
1872 Change lock_counter logic.
1873 (pthread_mutex::Destroy): Rename to _Destroy. Update TryLock call.
1874 (pthread_mutex::SetOwner): Move to thread.h as inline.
1875 (pthread_mutex::LockRecursive): Ditto.
1876 (pthread_mutex::fixup_after_fork): Change lock_counter logic.
1877 (__pthread_mutexattr_settype): Add PTHREAD_MUTEX_NORMAL to valid
1878 types check.
1879 * thread.h: Include errno.h and limits.h.
1880 (MUTEX_LOCK_COUNTER_INITIAL): Remove.
1881 (MUTEX_OWNER_ANONYMOUS): New define.
1882 (pthread_mutex::canBeUnlocked): New static method.
1883 (pthread_mutex::lock_counter): Change type to unsigned long.
1884 (pthread_mutex::GetPthreadSelf): New method.
1885 (pthread_mutex::Lock): Call _Lock with pthread_self pointer.
1886 (pthread_mutex::TryLock): Call _TryLock with pthread_self pointer.
1887 (pthread_mutex::UnLock): Call _UnLock with pthread_self pointer.
1888 (pthread_mutex::Destroy): Call _Destroy with pthread_self pointer.
1889 (pthread_mutex::SetOwner): Moved from thread.cc as inline.
1890 (pthread_mutex::LockRecursive): Ditto.
1891 (pthread_mutex::_Lock): New method.
1892 (pthread_mutex::_TryLock): New method.
1893 (pthread_mutex::_UnLock): New method.
1894 (pthread_mutex::_Destroy): New method.
1895
dcd350f0
CV
18962003-03-18 Christopher January <chris@atomice.net>
1897
1898 * fhandler_proc.cc (format_proc_cpuinfo): Use IsProcessorFeaturePresent
1899 only on Windows NT. Read CPU Mhz value only on NT. Revert previous
1900 change so cpuid instruction is called even on non-NT systems.
1901
c51dc9c2
CV
19022003-03-17 Corinna Vinschen <corinna@vinschen.de>
1903
a2105d93 1904 * glob.c (g_lstat): Change API minor test to match API minor number
c51dc9c2
CV
1905 change in previous patch.
1906 (g_stat): Ditto.
1907
f194ba1f
CF
19082003-03-17 Christopher Faylor <cgf@redhat.com>
1909
1910 * include/cygwin/version.h: Reorganize last two api versions so that
1911 btowc and trunc exports show up before previous bump since there has
1912 been no exported version of the DLL with the 64 bit changes yet but
1913 1.3.22 will have the btowc and trunc.
1914
3543669f
CF
19152003-03-17 Christopher Faylor <cgf@redhat.com>
1916
1917 * cygwin.din: Export btowc, trunc.
1918 * include/cygwin/version.h: Reflect new exports.
1919 * syscalls.cc (_stat): Rename to stat to avoid newlib wrapper.
1920 * syscalls.cc (_fstat): Ditto.
1921
19222003-03-16 Christopher Faylor <cgf@redhat.com>
1923
1924 * fhandler_console.cc (fhandler_console::close): Correct check for
1925 current tty. Add debugging output when console is freed.
1926 (set_console_state_for_spawn): Add debugging output.
1927 * fhandler_tty.cc (fhandler_tty_slave::open): Don't decrement console
1928 open flag when vforking.
1929 * sigproc.cc (sigproc_terminate): Fix debugging output.
1930 * spawn.cc (handle): Eliminate second argument.
1931 (spawn_guts): Reflect elimination of argument change to handle.
1932 * syscalls.cc (setsid): Add debugging output when console is freed.
1933
19342003-03-14 Christopher Faylor <cgf@redhat.com>
1935
1936 * syscalls.cc (rename): Revert assumption that DELETE_ON_CLOSE works on
1937 Win9x.
1938
41ffdfa5
CF
19392003-03-13 Christopher Faylor <cgf@redhat.com>
1940
1941 * include/cygwin/version.h: Bump DLL minor number to 23.
1942
5b186cd9
CV
19432003-03-13 Corinna Vinschen <corinna@vinschen.de>
1944
1945 * autoload.cc (IsProcessorFeaturePresent): Add.
1946 * fhandler_proc.cc (format_proc_cpuinfo): Add case for 9x systems.
1947
c58555c7
CV
19482003-03-13 Corinna Vinschen <corinna@vinschen.de>
1949
1950 * fhandler_proc.cc (format_proc_cpuinfo): Fix vendor id in cpuid case.
1951
49a0d53c
CV
19522003-03-13 Corinna Vinschen <corinna@vinschen.de>
1953
1954 * net.cc (cygwin_rcmd): Use correct file descriptor in call to fdsock.
1955 (cygwin_rexec): Ditto.
1956
6fcd5661
CF
19572003-03-13 Christopher Faylor <cgf@redhat.com>
1958
1959 * fhandler_tty.cc (fhandler_tty_slave::close): Fix typo in debug
1960 output.
1961
1962 * syscalls.cc (rename): Assume that DELETE_ON_CLOSE works on Win9x.
1963
aa39b7f7
CV
19642003-03-11 Corinna Vinschen <corinna@vinschen.de>
1965
1966 * fhandler_socket.cc (fhandler_socket::dup): Don't call
1967 fhandler_base::dup() but call DuplicateHandle directly instead to have
1968 control over socket inheritence.
1969
2afa7f58
CV
19702003-03-11 Corinna Vinschen <corinna@vinschen.de>
1971
1972 * fhandler_socket.cc (fhandler_socket::dup): On NT systems avoid
1973 using WinSock2 socket duplication methods. Add comment.
1974
19752003-03-11 Pierre Humblet <pierre.humblet@ieee.org>
1976
1977 * fhandler_socket.cc (fhandler_socket::fixup_after_fork):
1978 Set io_handle to INVALID_SOCKET in case of failure.
1979 (fhandler_socket::dup): Return 0 if the io_handle is valid.
1980
556ceaeb
CV
19812003-03-10 Corinna Vinschen <corinna@vinschen.de>
1982
1983 * sec_acl.cc (setacl): Don't handle DELETE flag specially.
1984 * security.cc (alloc_sd): Ditto.
1985
a201401c
CV
19862003-03-09 Corinna Vinschen <corinna@vinschen.de>
1987
6bbf711e 1988 * winver.rc: Change Copyright hint to include 2003.
a201401c 1989
b1aae492
CV
19902003-03-09 Corinna Vinschen <corinna@vinschen.de>
1991
1992 Switch to 32/64 datatypes:
1993 * Makefile.in (OBSOLETE_FUNCTIONS): Add open acl aclcheck aclfrommode
1994 aclfrompbits aclfromtext aclsort acltomode acltopbits acltotext chown
1995 facl fchown fgetpos fopen freopen fseeko fsetpos fstat ftello
1996 ftruncate getegid geteuid getgid getgrent getgrgid getgrnam getgroups
1997 getpwuid getpwuid_r getuid initgroups lchown lseek lstat mknod mmap
1998 seekdir setegid seteuid setgid setgroups setregid setreuid setuid stat
1999 telldir truncate.
2000 (NEW_FUNCTIONS): Add _open64 acl32 aclcheck32 aclfrommode32
2001 aclfrompbits32 aclfromtext32 aclsort32 acltomode32 acltopbits32
2002 acltotext32 chown32 facl32 fchown32 fgetpos64 fopen64 freopen64
2003 fseeko64 fsetpos64 fstat64 ftello64 ftruncate64 getegid32 geteuid32
2004 getgid32 getgrent32 getgrgid32 getgrnam32 getgroups32 getpwuid32
2005 getpwuid_r32 getuid32 initgroups32 lchown32 lseek64 lstat64 mknod32
2006 mmap64 seekdir64 setegid32 seteuid32 setgid32 setgroups32 setregid32
2007 setreuid32 setuid32 stat64 telldir64 truncate64 to substitute the
2008 above.
2009 * cygserver_shm.h (class client_request_shm): Change uid_t and gid_t
2010 members to __uid32_t and __gid32_t.
2011 * cygwin.din: Add symbols acl32 aclcheck32 aclfrommode32
2012 aclfrompbits32 aclfromtext32 aclsort32 acltomode32 acltopbits32
2013 acltotext32 facl32 fgetpos64 fopen64 freopen64 fseeko64 fsetpos64
2014 _fstat64 ftello64 _lseek64 mknod32 _open64.
2015 * glob.c: Include perprocess.h.
2016 (globtilde): Call getpwuid32 and getuid32 instead of getpwuid and
2017 getuid.
2018 (g_lstat): Check for applications API version to call the appropriate
2019 typed gl_lstat function.
2020 (g_stat): Ditto for gl_stat.
2021 * shm.cc (client_request_shm::client_request_shm): Call geteuid32
2022 and getegid32 instead of geteuid and getegid throughout.
2023 * syscalls.cc (_open64): New alias for open.
2024 (_lseek64): New alias for lseek64.
2025 (_fstat64): New alias for fseek64.
2026 (mknod32): New function.
2027 (mknod): Calls mknod32 now.
2028 * winsup.h: Make function declarations for getuid32, geteuid32,
2029 and getpwuid32 accessible for plain C sources. Add declarations
2030 for getegid32 and getpwnam.
2031 * include/cygwin/version.h: Bum API minor number to 78.
2032 * include/sys/cygwin.h: Guard C++ specific members of struct
2033 per_process against inclusion in plain C sources.
2034 * include/sys/mman.h (mman): Add guard to avoid type clash when
2035 compiling Cygwin.
2036
659fb3ff
CF
20372003-03-09 Christopher Faylor <cgf@redhat.com>
2038
d580d86c 2039 * include/cygwin/version.h: Bump DLL minor number to 22.
659fb3ff 2040
c367dfd0
CF
20412003-03-09 Christopher Faylor <cgf@redhat.com>
2042
2043 Do some minor reformatting of 'extern "C"' use throughout.
2044
20452003-03-06 Christopher January <chris@atomice.net>
2046
2047 * autoload.cc (GetSystemTimes): Define new autoload function.
2048 * fhandler_proc.cc (proc_listing): Add cpuinfo and partitions entries.
2049 (fhandler_proc::fill_filebuf): Add PROC_CPUINFO and PROC_PARTITIONS
2050 cases.
2051 (format_proc_uptime): Use GetSystemTimes if available.
2052 (read_value): New macro.
2053 (print): New macro.
2054 (cpuid): New function.
2055 (can_set_flag): New function.
2056 (format_proc_cpuinfo): New function.
2057 (format_proc_partitions): New function.
2058
36c4a441
CF
20592003-03-09 Christopher Faylor <cgf@redhat.com>
2060
2061 * syscalls.cc (unlink): Attempt to be more clever about setting
2062 attributes of file. Only open file in query mode to avoid having to
2063 mess with security stuff for reading.
2064
639ebe29
CV
20652003-03-09 Corinna Vinschen <corinna@vinschen.de>
2066
2067 * rmsym: Fix regular expression.
2068
3a1d827f
CF
20692003-03-09 Christopher Faylor <cgf@redhat.com>
2070
2071 * Makefile.in: Change from using new-* to cygwin0 for temporary
2072 targets.
2073
ca0e9071
CV
20742003-03-09 Corinna Vinschen <corinna@vinschen.de>
2075
2076 * include/cygwin/socket.h: Set SOMAXCONN to Winsock2 value.
2077
ed269cea
CF
20782003-03-08 Christopher Faylor <cgf@redhat.com>
2079
2080 * syscalls.cc (unlink): Always attempt to use FILE_FLAG_CLOSE_ON_DELETE
2081 to delete files since this allows us to preserve the protection of hard
2082 linked files.
2083 (link): Generate full path for potentially recalculated .lnk target.
2084
1114c3d0
CF
20852003-03-08 Christopher Faylor <cgf@redhat.com>
2086
2087 Revert below changes regarding _pinfo::cmdline.
2088
d66ac2bc
CV
20892003-03-08 Corinna Vinschen <corinna@vinschen.de>
2090
2091 * external.cc (cygwin_internal): Change n to __off64_t to match change
2092 of _pinfo::cmdline.
2093 * fhandler.h (class fhandler_virtual): Change filesize member to
2094 __off64_t.
2095 * fhandler_proc.cc (format_proc_meminfo): Change to return __off64_t.
2096 (format_proc_stat): Ditto.
2097 (format_proc_uptime): Ditto.
2098 * fhandler_process.cc (format_process_stat): Ditto.
2099 (format_process_status): Ditto.
2100 (format_process_statm): Ditto.
2101 * pinfo.cc (_pinfo::cmdline): Expect __off64_t parameter.
2102 * pinfo.h (class _pinfo): Change declaration of cmdline accordingly.
2103
762520f3
CF
21042003-03-07 Christopher Faylor <cgf@redhat.com>
2105
2106 * path.h (PATH_LNK): New enum val.
2107 (path_conv::is_lnk_symlink): New function. True if path represents
2108 .lnk style symlink.
2109 * path.cc (check_shortcut): Set PATH_LNK in pflags when appropriate.
2110 (symlink_info::check): Ditto. Remove PATH_LNK from pflags initially.
2111 * syscalls.cc (unlink): Always remove readonly attribute from a symlink
2112 regardless of type.
2113 (link): (from Corinna Vinschen) Allow links to symlinks. Reset
2114 attributes on a symlink after successful link creation.
2115 (chmod): Use is_lnk_symlink where appropriate.
2116 (rename): Ditto.
2117
21182003-03-07 Pierre Humblet <pierre.humblet@ieee.org>
2119
2120 * tty.cc (create_tty_master): Call GetComputerName instead of
2121 cygwin_gethostname. Set ut_id.
2122 * syscalls.cc (login): Call endutent.
2123 (setutent): Do not seek after a fresh open.
2124
6f8102cb
CV
21252003-03-07 Corinna Vinschen <corinna@vinschen.de>
2126
2127 * syscalls.cc (seteuid32): Fix formatting.
2128
88243328
TP
21292003-03-04 Thomas Pfaff <tpfaff@gmx.net>
2130
2131 * thread.cc (MTinterface::fixup_after_fork): Initialize mainthread
2132 prior to pthread objects.
762520f3 2133
12390bc4
CV
21342003-03-04 Jason Tishler <jason@tishler.net>
2135
2136 * fhandler_socket.cc (fhandler_socket::dup): Initialize type.
2137
c418817e
CF
21382003-03-03 Christopher Faylor <cgf@redhat.com>
2139
2140 * fhandler.h (fhandler_tty_slave::close): Declare new function.
2141 (fhandler_tty_slave::dup): Declare new function.
2142 (fhandler_tty_slave::fixup_after_function): Declare new function.
2143 * fhandler_tty.cc (fhandler_tty_slave_open): Only increment
2144 fhandler_console::open_fhs when associated with a pty.
2145 (fhandler_tty_slave::close): Define new function. Decrement
2146 fhandler_console::open_fhs when associated with a pty.
2147 (fhandler_tty_slave::dup): Define new function. Increment
2148 fhandler_console::open_fhs when associated with a pty.
2149 (fhandler_tty_slave::fixup_after_fork): Define new function. Increment
2150 fhandler_console::open_fhs when associated with a pty.
2151
e11fe31b
CF
21522003-03-03 Christopher Faylor <cgf@redhat.com>
2153
2154 * fhandler_tty.cc (fhandler_pty_slave::open): Grudgingly increment
2155 fhandler_console::open_fhs here.
2156 (fhandler_pty_slave::close): Ditto for close.
2157
cffdb4b1
CF
21582003-03-02 Christopher Faylor <cgf@redhat.com>
2159
2160 * lib/getopt.c: Refresh from NetBSD sources.
2161
d5d2ffee
CF
21622003-03-02 Christopher Faylor <cgf@redhat.com>
2163
2164 * fhandler_console.cc (fhandler_console::close): Don't decrement
2165 in use counter if in vfork fixup stage.
2166
c2c6b170
CF
21672003-03-02 Christopher Faylor <cgf@redhat.com>
2168
2169 * lib/getopt.c: Nuke use of unneeded BSDisms.
2170
8b19b43d
CF
21712003-03-02 Christopher Faylor <cgf@redhat.com>
2172
2173 * dll_init.cc (dll_list::load_after_fork): Don't revert to LoadLibrary
2174 if LoadLibraryEx fails.
2175 * dtable.cc (dtable::dec_console_fds): Eliminate.
2176 (dtable::release): Don't treat console specially.
2177 (dtable::build_fhandler): Ditto.
2178 * dtable.h (console_fds): Eliminate.
2179 (dtable::dec_console_fds): Eliminate.
2180 (dtable::inc_console_fds): Eliminate.
2181 * fhandler.h (fhandler_console::open_fhs): New static element.
2182 * fhandler_console.cc (fhandler_console::open): Increment open_fs.
2183 (fhandler_console::close): Call FreeConsole if no more open consoles
2184 and ctty is not associated with the console.
2185 * syscalls.cc (setsid): Simplify check for when to call FreeConsole.
2186 (check_pty_fds): Eliminate definition.
2187 * winsup.h (check_pty_fds): Eliminate declaration.
2188
3efc65f7
CF
21892003-03-02 Christopher Faylor <cgf@redhat.com>
2190
2191 * dll_init.cc (dll_list::load_after_fork): Fix typo where result of
2192 LoadLibrary was ignored.
2193
5a082e9e
CV
21942003-03-01 Corinna Vinschen <corinna@vinschen.de>
2195
2196 * fhandler_socket.cc (fhandler_socket::bind): Open and write socket
2197 file using Win32 calls.
2198
9d913f07
CV
21992003-03-01 Corinna Vinschen <corinna@vinschen.de>
2200
2201 * fhandler_socket.cc (get_inet_addr): Open and read socket file using
2202 Win32 calls.
2203
005c3065
CF
22042003-02-28 Christopher Faylor <cgf@redhat.com>
2205
2206 * cygwin.din: Wrap atexit and exit with cygwin, thread-safe functions.
2207 * dcrt0.cc (cygwin_atexit): New function.
2208 (cygwin_exit): Ditto.
2209
27b4082a
PH
22102003-02-28 Pierre Humblet <pierre.humblet@ieee.org>
2211
2212 * syscalls.cc (fstat64): Pass get_name () to pc.
005c3065 2213 (access): Pass fn to stat_worker.
27b4082a
PH
2214
22152003-03-27 Corinna Vinschen <corinna@vinschen.de>
5777b970
CV
2216
2217 * fhandler_socket.cc (class sock_event): New class managing Winsock
2218 events for interruptible socket calls.
2219 (fhandler_socket::connect): Move support for interruptible call to
2220 class sock_event. Use class object instead.
2221 (fhandler_socket::accept): Ditto. Remove useless casts.
2222
005c3065 22232003-03-27 Thomas Pfaff <tpfaff@gmx.net>
5777b970
CV
2224
2225 * fhandler_socket.cc (fhandler_socket::connect): Add support for
2226 an interruptable connect.
2227
7b2ce663
CV
22282003-02-27 Pierre Humblet <pierre.humblet@ieee.org>
2229
2230 * uinfo.cc (internal_getlogin): Only update user.groups.pgsid
2231 if the call to set the primary group succeeds.
2232
0e7a60fe
CF
22332003-02-27 Christopher Faylor <cgf@redhat.com>
2234
2235 * cygthread::detach: Improve error message.
2236
61a52599
CV
22372003-02-26 Pierre Humblet <pierre.humblet@ieee.org>
2238
2239 * sec_helper.cc (get_sids_info): debug_print owner_sid and group_sid.
2240
6b9a9ce6
CV
22412003-02-25 Corinna Vinschen <corinna@vinschen.de>
2242
2243 * mmap.cc (mmap64): Fix returned address by taking the granularity
2244 into account.
2245
1ffc44aa
PH
22462003-02-23 Pierre Humblet <pierre.humblet@ieee.org>
2247
2248 * syslog.cc (syslog): Do not unlock the file before closing it
2249 and remove debug_printf about stream errors.
2250
a066f364
CF
22512003-02-22 Christopher Faylor <cgf@redhat.com>
2252
2253 * cygmalloc.h: Remove MORECORE_CANNOT_TRIM. It's not true.
2254 # cygwin.din: Export mallinfo.
2255 # malloc_wrapper.cc (mallinfo): New function.
2256
878e60c5
CF
22572003-02-22 Pierre Humblet <pierre.humblet@ieee.org>
2258
2259 * syslog.cc (syslog): Do not print the Windows pid. Print the Cygwin
2260 pid as an unsigned decimal. On Win95 print a timestamp and attempt to
2261 lock the file up to four times in 3 ms.
2262
b1d1e50d
CV
22632003-02-21 Corinna Vinschen <corinna@vinschen.de>
2264
2265 * fhandler_socket.cc (fhandler_socket::fhandler_socket): Fix compiler
2266 warning.
2267 (fhandler_socket::fstat): Simplify. Set st_uid/st_gid to effective
2268 uid/gid of current process in case of open sockets.
2269
cf762b08
CV
22702003-02-21 Corinna Vinschen <corinna@vinschen.de>
2271
2272 * dtable.cc (dtable::build_fhandler_from_name): Set some fhandler
2273 data on sockets to evaluate AF_LOCAL sockets correctly.
2274 (dtable::build_fhandler): Set unit number on sockets.
2275 * fhandler.h (fhandler_socket): Add unit number.
2276 (fhandler_socket::get_unit): New method.
2277 * fhandler_socket.cc (fhandler_socket::fhandler_socket): Set unit
2278 number.
2279 (fhandler_socket::fstat): Reorganize to return more Linux-like
2280 values.
2281 * net.cc: include ctype.h.
2282 (fdsock): Set unit number when building fhandler.
2283 * path.cc (path_conv::check): Set device type to FH_SOCKET if file
2284 is a AF_UNIX socket.
2285 (get_devn): Evaluate unit for virtual socket devices.
2286 (win32_device_name): Set windows path for sockets to unix_path with
2287 just backslashes to keep the different names.
2288 * syscalls.cc (fstat64): Don't override st_ino, st_dev and st_rdev
2289 for sockets.
2290 (stat_worker): Ditto.
2291
22922003-02-21 Pierre Humblet <pierre.humblet@ieee.org>
2293
2294 * autoload.cc (AccessCheck): Add.
2295 (DuplicateToken): Add.
2296 * security.h (check_file_access): Declare.
2297 * syscalls.cc (access): Convert path to Windows, check existence
2298 and readonly attribute. Call check_file_access instead of acl_access.
2299 * security.cc (check_file_access): Create.
2300 * sec_acl (acl_access): Delete.
2301
5cd82412
CF
23022003-02-19 Christopher Faylor <cgf@redhat.com>
2303
2304 * fhandler.cc (fhandler_base::open): Move some filesystem specific
2305 stuff.
2306 (fhandler_disk_file::open): Accept some filesystem specific stuff.
2307 * sigproc.cc (wait_for_sigthread): Become slightly more thread safe.
2308 (sig_send): Don't assume that signal thread is ready.
2309
892d8962
CV
23102003-02-20 Corinna Vinschen <corinna@vinschen.de>
2311
2312 * wincap.h (wincap): Remove unnecessary definition of
2313 supports_sparse_files.
2314 * wincap.cc: Ditto.
2315
518f5d49
CV
23162003-02-20 Corinna Vinschen <corinna@vinschen.de>
2317
2318 * fhandler_disk_file.cc (fhandler_disk_file::opendir): Check descriptor
2319 created by cygheap_fdnew constructor.
2320 * fhandler_virtual.cc (fhandler_virtual::opendir): Ditto.
2321 * fhandler_socket.cc (fhandler_socket::accept): Ditto and move
2322 creation of file descriptor behind blocking OS call.
2323 * net.cc (cygwin_socket): Ditto.
2324 (cygwin_rcmd): Ditto.
2325 (cygwin_rresvport): Ditto.
2326 (cygwin_rexec): Ditto.
2327 (socketpair): Ditto.
2328
3a88cf1b
CV
23292003-02-20 Corinna Vinschen <corinna@vinschen.de>
2330
2331 * autoload.cc (GetCompressedFileSize): Add.
2332 * fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): Compute
2333 st_blocks value from GetCompressedFileSize() if available.
2334
79207923
CV
23352003-02-18 Vaclav Haisman <V.Haisman@sh.cvut.cz>
2336
2337 * wincap.h (wincaps::supports_sparse_files): New flag.
2338 (wincapc::supports_sparse_files): New method.
2339 * wincap.cc (wincap_unknown): Define value for the new flag.
2340 (wincap_95): Ditto.
2341 (wincap_95osr2): Ditto.
2342 (wincap_98): Ditto.
2343 (wincap_98se): Ditto.
2344 (wincap_me): Ditto.
2345 (wincap_nt3): Ditto.
2346 (wincap_nt4): Ditto.
2347 (wincap_nt4sp4): Ditto.
2348 (wincap_2000): Ditto.
2349 (wincap_xp): Ditto.
2350 * path.h (path_conv::fs_flags): New method.
005c3065
CF
2351 * fhandler_disk_file.cc: Include winioctl.h for DeviceIoControl.
2352 (fhandler_disk_file::open): Set newly created and truncated files as
79207923
CV
2353 sparse on platforms that support it.
2354
afe13e84
CV
23552003-02-17 Pierre Humblet <pierre.humblet@ieee.org>
2356
2357 * grp.cc (internal_getgroups): Handle properly tokens with
2358 no groups. Fix bug introduced on 2003-02-04.
2359
8fc16812
CF
23602003-02-16 Christopher Faylor <cgf@redhat.com>
2361
408e9b2f 2362 * cygwin.din: Export all appropriate newlib libm functions. Sort.
8fc16812
CF
2363 * include/cygwin/version.h: Bump API minor number.
2364
f655eadf
CF
23652003-02-15 Christopher Faylor <cgf@redhat.com>
2366
8fc16812 2367 * cygwin.din: Export all appropriate newlib libc functions.
f655eadf
CF
2368 * include/cygwin/version.h: Bump API minor number.
2369
4d9ba012
CV
23702003-02-14 Jason Tishler <jason@tishler.net>
2371
2372 * mmap.cc (mprotect): Add missing break.
2373
dff01e3a
CF
23742003-02-13 Christopher Faylor <cgf@redhat.com>
2375
2376 * exceptions.cc (try_to_debug): Don't reset priority when returning
2377 from non-waitloop call.
d1d1797e
CF
2378
23792003-02-13 Vaclav Haisman <V.Haisman@sh.cvut.cz>
005c3065 2380 Christopher Faylor <cgf@redhat.com>
d1d1797e
CF
2381
2382 * fhandler_console.cc (fhandler_console::write_normal): Use MessageBeep
2383 for bell sound.
2384 * autoload.cc (MessageBeep): Add.
2385
97c61aeb
CF
23862003-02-13 Christopher Faylor <cgf@redhat.com>
2387
2388 * include/cygwin/types.h: Use correct ifdef guard for u_ definitions.
2389
a200c081
CF
23902003-02-13 Christopher Faylor <cgf@redhat.com>
2391
2392 * environ.cc (environ_init): Use strechr.
2393
2858de3a
CF
23942003-02-13 Christopher Faylor <cgf@redhat.com>
2395
2396 * include/cygwin/in.h (sockaddr_in): Fix typo.
2397
75c8a70c
CF
23982003-02-12 Christopher Faylor <cgf@redhat.com>
2399
2400 * path.h (path_conv): Reorganize slightly.
2401
939d19b0
CF
24022003-02-12 Christopher Faylor <cgf@redhat.com>
2403
2404 * fhandler_tty.cc (process_input): Add sanity check to ensure that
2405 console typeahead is cleared on signal.
2406
7a44ba05
CF
24072003-02-12 Christopher Faylor <cgf@redhat.com>
2408
2409 * spawn.cc (linebuf::~linebuf): Resurrect commented out (for
2410 debugging?) code.
2411
407b8df6
CF
24122003-02-10 Ralf Habacker <ralf.habacker@freenet.de>
2413
2414 * include/cygwin/in.h (in_attr_t): Define new type.
2415 * include/arpa/inet.h (inet_addr): Change return type to in_addr_t.
2416 (inet_lnaof): Ditto.
2417 (inet_netof): Ditto.
2418 (inet_network): Ditto.
2419
24202003-02-10 Christopher Faylor <cgf@redhat.com>
2421
2422 * include/cygwin/types.h: Move many *_t typedefs here. Protect them
2423 with ifdefs.
2424 * fhandler_disk_file.cc (fhandler_disk_file::fstat): Change ntsec_atts to mode_t.
2425 * security.cc (get_attribute_from_acl): Accept mode_t attribute.
2426 (get_nt_attribute): Ditto.
2427 (get_file_attribute): Ditto.
2428 (get_nt_object_attribute): Ditto.
2429 (get_object_attribute): Ditto.
2430 * security.h: Reflect above changes.
2431 * syscalls.cc (chown_worker): Change attrib to mode_t.
2432
ad80bc42
CF
24332003-02-08 Christopher Faylor <cgf@redhat.com>
2434
67c64e3b 2435 * include/cygwin/version.h: Bump DLL minor number to 21.
ad80bc42
CF
2436
24372003-02-07 Christopher Faylor <cgf@redhat.com>
2438
2439 * malloc.cc (DEFAULT_MMAP_THRESHOLD): Bump down to 16MB thanks to below
2440 changes.
2441
4136fdb1
CV
24422003-02-07 Corinna Vinschen <corinna@vinschen.de>
2443
2444 * mmap.cc (mmap_record::alloc_map): De-inline. Add offset and length
2445 parameter. Only protect pages actually unused currently. Do job
2446 of map_map() when initializing a map.
2447 (mmap_record::map_map): Reduce functionality for the reuse case
2448 of private anonymous mapping.
2449 (mmap_record::fixup_map): Format change.
2450 (list::add_record): Add offset and length parameter to call
2451 mmap_record::alloc_map() correctly.
293ce810 2452 (mmap64): Rename `l' variable to `map_list'. Accommodate above changes.
4136fdb1
CV
2453 (munmap): Rename `l' variable to `map_list'.
2454 (msync): Ditto.
2455 (fhandler_disk_file::mmap): Streamline code.
2456 (mprotect): Ditto.
2457 (fixup_mmaps_after_fork): Rename `l' variable to `map_list'.
2458
49b84ce4
CF
24592003-02-07 Vaclav Haisman <V.Haisman@sh.cvut.cz>
2460 Christopher Faylor <cgf@redhat.com>
2461
2462 * exceptions.cc (try_to_debug): Set priority of current thread rather
2463 than the main thread. Make busy waiting loop less busy. Restore
2464 priority when function returns.
2465
bc5b63ed
CF
24662003-02-07 Christopher Faylor <cgf@redhat.com>
2467
2468 * malloc.cc (DEFAULT_MMAP_THRESHOLD): Set high to avoid mmaps.
2469
24702003-02-07 Christopher Faylor <cgf@redhat.com>
2471
2472 * pipe.cc (fhandler_pipe::close): Avoid extraneous this->.
2473
1de8d164
CF
24742003-02-06 Christopher Faylor <cgf@redhat.com>
2475
2476 * heap.cc (heap_init): Remove debugging code.
2477
565e8015
CV
24782003-02-06 Pierre Humblet <pierre.humblet@ieee.org>
2479
2480 * security.h: Introduce names UNKNOWN_UID and UNKNOWN_GID and delete
1de8d164 2481 declaration of is_grp_member.
565e8015
CV
2482 * uinfo.cc (internal_getlogin): Use UNKNOWN_GID.
2483 * passwd.cc (pwdgrp::read_passwd): Use UNKNOWN_UID.
2484 * grp.cc (pwdgrp::read_group): Change group name to provide better
2485 feedback.
2486 (getgrgid): Use gid16togid32.
2487 * sec_helper.cc (is_grp_member): Delete.
2488
d238c1b4
CF
24892003-02-05 Christopher Faylor <cgf@redhat.com>
2490
2491 * path.cc: Change 'to_posix_p' to 'to_posix' throughout.
2492 (conv_path_list_buf_size): Accommodate relative paths.
2493
b7f52fe8
CF
24942003-02-05 Christopher Faylor <cgf@redhat.com>
2495
2496 * path.cc (etc::dir_changed): Fix debug printf.
2497
62cd433e
CV
24982003-02-05 Corinna Vinschen <corinna@vinschen.de>
2499
2500 * sec_acl.cc (setacl): Move all permission settings to beginning of
2501 loop. Set default rights to same values as in alloc_sd(). Set DELETE
2502 for owner and default owner only if S_IWOTH is given.
2503
25042003-02-05 Pierre Humblet <pierre.humblet@ieee.org>
2505
2506 * sec_acl.cc: Change all __aclent16_t to __aclent32_t except in
2507 wrapper function definitions. Replace call to the aclXYZ functions by
2508 calls aclXYZ32.
2509 (searchace): Change type of third argument to __uid32_t and use
2510 ILLEGAL_UID instead of -1;
2511 (setacl): Remove some initializations. Only give STANDARD_RIGHTS_WRITE
2512 for S_IWOTH. Replace -1 by ILLEGAL_UID.
2513 (getacl): Change type of owner_sid, group_sid and ace_sid to cygpsid.
2514 In last else clause, suppress second call to ace_sid.get_id and use
2515 TRUE in first call. Replace EqualSid by ==.
2516 (acl_access): Call internal_getgroups in USER and GROUP cases.
2517 (acecmp: Define static.
2518 (acl32): Create from 16 bit type.
2519 (facl32): Ditto.
2520 (lacl32): Ditto.
2521 (aclcheck32): Ditto.
2522 (aclsort32): Ditto.
2523 (acltomode32): Ditto.
2524 (aclfrommode32): Ditto.
2525 (acltopbits32): Ditto.
2526 (aclfrompbits32): Ditto.
2527 (acltotext32): Ditto.
2528 (aclfromtext32): Ditto, and use strechr.
2529 (acl16to32): Create.
2530 (acl): Make it a wrapper function.
2531 (facl): Ditto.
2532 (lacl): Ditto.
2533 (aclcheck): Ditto.
2534 (aclsort): Ditto.
2535 (acltomode): Ditto.
2536 (aclfrommode): Ditto.
2537 (acltopbits): Ditto.
2538 (aclfrompbits): Ditto.
2539 (acltotext): Ditto.
2540 (aclfromtext): Ditto.
2541 * security.cc (write_sd): Call set_process_privilege and check
2542 ownership.
2543 (alloc_sd): Remove call to set_process_privilege and the owner check.
2544
cadd065b
CF
25452003-02-05 Christopher Faylor <cgf@redhat.com>
2546
2547 * include/sys/cygwin.h: Use C-style comments.
2548
0c8455c3
CV
25492003-02-05 Pierre Humblet <pierre.humblet@ieee.org>
2550
2551 * sec_helper.cc (get_sids_info): New function.
2552 * security.cc (extract_nt_dom_user): Simplify with strechr.
2553 (get_user_groups): Initialize glen to MAX_SID_LEN.
2554 (get_user_local_groups): Ditto.
2555 (get_attribute_from_acl): Define ace_sid as cygpsid.
2556 (get_nt_attribute): Define owner_sid and group_sid as cygpsid.
2557 Call get_sids_info instead of cygsid.get_{u,g}id and is_grp_member.
2558 (get_nt_object_attribute): Ditto.
2559 (alloc_sd): Define ace_sid as cygpsid.
2560
5ae9331a
TP
25612003-02-04 Thomas Pfaff <tpfaff@gmx.net>
2562
2563 * syscalls.cc (struct system_cleanup_args): New struct.
2564 (system_cleanup): New function.
2565 (system): Use pthread_cleanup_push and _pop to save and restore
2566 signal handlers and sigprocmask.
2567
3dbafd87
CV
25682003-02-04 Corinna Vinschen <corinna@vinschen.de>
2569
2570 * path.cc (symlink): Create security attributes so that only the
2571 user can modify the symlink.
2572 * security.cc (set_security_attribute): Remove symlink special
2573 handling.
2574
0daf2561
CV
25752003-02-04 Pierre Humblet <pierre.humblet@ieee.org>
2576
2577 * grp.cc (internal_getgroups): Do not return without closing
2578 the process handle.
2579
4a21c2d5
CV
25802003-02-04 Pierre Humblet <pierre.humblet@ieee.org>
2581
2582 * security.h (class cygpsid): New class.
2583 (class cygsid): Use cygpsid as base. Remove members psid, get_id,
2584 get_uid, get_gid, string, debug_printf and the == and != operators.
2585 (cygsidlist::clear_supp): Only do work if setgroups has been called.
2586 * sec_helper.cc: Define sid_auth NO_COPY.
2587 (cygpsid::operator==): New operator.
2588 (cygpsid::get_id): New function.
2589 (cygpsid::string): New function.
2590 (cygsid::string): Delete.
2591 (cygsid::get_id): Delete.
2592 * pwdgrp.h: Change arguments of internal_getpwsid,
2593 internal_getgrsid and internal_getgroups to cygpsid.
2594 * passwd.cc (internal_getpwsid): Change argument from cygsid to cygpsid.
d238c1b4 2595 * grp.cc (internal_getgrsid): Ditto.
4a21c2d5
CV
2596 (internal_getgroups): Ditto.
2597
335556d5
CF
25982003-02-03 Christopher Faylor <cgf@redhat.com>
2599
2600 Eliminate most unneeded this-> pointers throughout.
2601
153e83c6
CV
26022003-02-03 Pierre Humblet <pierre.humblet@ieee.org>
2603
2604 * security.h: Add third argument to set_process_privilege.
2605 * autoload.cc: Add OpenThreadToken.
2606 * sec_helper.cc (set_process_privilege): Add and use use_thread
2607 argument.
2608 * security.cc (alloc_sd): Modify call to set_process_privilege.
2609 Remember the result in each process. If failed and file owner is not
2610 the user, fail.
2611
f0f3ea68
CV
26122003-02-03 Corinna Vinschen <corinna@vinschen.de>
2613
2614 * fhandler_socket.cc (fhandler_socket::recvfrom): Return buffer
2615 length and don't set errno in case of WSAEMSGSIZE error.
2616 (fhandler_socket::recvmsg): Ditto.
2617
6688a061
CF
26182003-02-01 Christopher Faylor <cgf@redhat.com>
2619
2620 * grp.cc (getgrent32): Only refresh group entries when at beginning.
2621 (internal_getgrsid): Only refresh if uninitialized.
2622 (internal_getgrent): Ditto.
2623 * passwd.cc (getpwent): Only refresh passwd entries when at beginning.
2624 (pwdgrp::read_passwd): linebuf *cannot* be NO_COPY.
2625 (internal_getpwsid): Only refresh if uninitialized.
2626 (getpass): No need to refresh passwd data here.
2627 * pwdgrp.h (refresh): Eliminate default.
2628
a5a93a62
CF
26292003-01-31 Christopher Faylor <cgf@redhat.com>
2630
2631 * dlfcn.cc (dlerror): Only report load errors once per error.
2632
b0a82a85
CF
26332003-01-31 Christopher Faylor <cgf@redhat.com>
2634
2635 * fhandler_serial.cc (fhandler_serial::open): Avoid extraneous setting
2636 of res.
2637
2638 * termios.cc (tcsetattr): Correctly record errno after tcsetattr call.
2639
26402003-01-31 Troy Curtiss <troyc@usa.net>
2641
2642 * fhandler_serial.cc (fhandler_serial::tcsetattr): Add error-checking
2643 so that if any Win32 SetComm*() calls fail, errno gets set to EINVAL
2644 and tcsetattr() returns -1. Catch invalid bitrates, mostly. If baud
2645 rate setting is B0, just drop DTR and leave Win32 DCB bitrate as-is
2646 since 0 is not a valid Win32 setting.
2647 (fhandler_serial::tcgetattr): If DTR is low, populate the bitrate as
2648 B0, otherwise get it from the DCB.
2649
949c3da1
CF
26502003-01-31 Christopher Faylor <cgf@redhat.com>
2651
2652 * passwd.cc (pwdgrp::read_passwd): linebuf *must* be static (from
2653 Pierre Humblet).
2654 * pwdgrp.h (pwdgrp::refresh): Avoid calling read function if we already
2655 have lock since that means we are in the process of reading the file.
2656
485d85bf
CF
26572003-01-31 Jason Tishler <jason@tishler.net>
2658
2659 * shared.cc (shared_info::heap_chunk_size): Use correct variable when
2660 reading HKLM.
2661
704ce461
CF
26622003-01-30 Christopher Faylor <cgf@redhat.com>
2663
2664 * fhandler_registry.cc (fhandler_registry::exists): Fix off-by-one
2665 error when inspecting path.
2666
ba6e1083
CF
26672003-01-29 Christopher Faylor <cgf@redhat.com>
2668
2669 * lib/getopt.c: Allow environment variable control of POSIXLY_INCORRECT
2670 behavior.
2671
26722003-01-28 Corinna Vinschen <corinna@vinschen.de>
01e3c897
CV
2673
2674 * fhandler_socket.cc (fhandler_socket::accept): On successful execution
2675 set connection state of returned socket to CONNECTED.
2676
dfb366da
CF
26772003-01-27 Christopher Faylor <cgf@redhat.com>
2678
2679 * passwd.cc (pwdgrp::parse_passwd): Be more unforgiving about
2680 non-numeric fields.
2681
03dba1de
CF
26822003-01-26 Christopher Faylor <cgf@redhat.com>
2683
2684 * uinfo.cc (pwdgrp::next_num): Remove check for NULL since it is no
2685 longer a valid return from next_str.
2686 (pwdgrp::add_line): Duh. Revert to use strchr.
2687
fea48988
CF
26882003-01-26 Christopher Faylor <cgf@redhat.com>
2689
ca6018a0 2690 * string.h (strechr): New function.
fea48988
CF
2691 * uinfo.cc (pwdgrp::next_str): Search only for input char in string.
2692 Return EOS on failure. Don't check for NULL since it shouldn't be
2693 possible.
2694 (pwdgrp::add_line): Revert to replacing '\n' in input line with '\0'.
2695 (pwdgrp::next_num): Pass explicit separator character to next_str.
2696 * grp.cc (pwdgrp::parse_group): Ditto.
2697 * passwd.cc (pwdgrp::parse_passwd): Ditto. Revamp test for garbage
2698 input.
2699 * pwdgrp.h (pwdgrp::next_str): Don't use default parameter.
2700
9a751621
CF
27012003-01-26 Christopher Faylor <cgf@redhat.com>
2702
2703 * uinfo.cc (pwdgrp::load): Regularize strace output. Add warning for
2704 CreateFile failure.
2705
c9133395
CF
27062003-01-26 Christopher Faylor <cgf@redhat.com>
2707
bdbd7fb6
CF
2708 * passwd.cc (pwdgrp::parse_passwd): Eliminate use of memset. The
2709 structure should always be completely filled out.
2710 * grp.cc (pwdgrp::parse_group): Ditto.
2711
27122003-01-26 Christopher Faylor <cgf@redhat.com>
2713
2714 * grp.cc (pwdgrp::parse_group): Fix off-by-one problem in allocating
c9133395 2715 gr_mem.
65037056
CF
2716
27172003-01-26 Christopher Faylor <cgf@redhat.com>
2718
2719 * include/sys/strace.h (paranoid_printf): Define as not being part of
2720 "all" output.
2721
27222003-01-25 Christopher Faylor <cgf@redhat.com>
2723
2724 * pwdgrp.h (pwdgrp::next_num): Rename from next_int. Returns
2725 true/false if parse operation succeeded.
2726 (pwdgrp::reparse): Remove.
2727 (pwdgrp::raw_ptr): New function. Returns pointer in line.
2728 (pwdgrp::next_num): New functions for parsing other than unsigned long.
2729 * grp.cc (pwdgrp::parse_group): Reinstate previous parsing behavior.
2730 Don't fill in fields with NULL and assign empty gr_mem to known pointer
2731 rather than doing a pointless calloc. Streamline gr_mem parsing.
2732 Don't increment curr_lines here.
2733 * passwd.cc (pwdgrp::parse_passwd): Use new behavior of next_num.
2734 Don't increment curr_lines here.
2735 * uinfo.cc (pwdgrp::next_str): Keep returning EOL if out of data.
2736 (pwdgrp::reparse): Remove.
2737 (pwdgrp::next_num): Rename from next_int. Return bool indicating
2738 success of parse, argument returns value parsed.
2739 (pwdgrp::add_line): Increment curr_lines here on successful parse.
2740 (pwdgrp::load): (from Pierre Humblet) Don't return status. Just report
2741 it here.
2742
a53ddfe6
CF
27432003-01-25 Christopher Faylor <cgf@redhat.com>
2744
2745 * pwdgrp.cc (pwdgrp::reparse): Declare.
2746 * uinfo.cc (pwdgrp::reparse): Define.
c9b99d0d 2747 * grp.cc (pwdgrp::parse_group): Use reparse.
a53ddfe6 2748
4f7e12dd
CV
27492003-01-25 Pierre Humblet <pierre.humblet@ieee.org>
2750
2751 * syscalls.cc (seteuid32): On Win95 get the pw entry. If it exists
2752 update the euid and call cygheap->user.set_name. Remove special
2753 handling of ILLEGAL_UID.
ba6e1083 2754 (setgid32): Add a debug_printf. On Win95, always set the egid.
4f7e12dd
CV
2755 Remove special handling of ILLEGAL_GID. Do not compare gid and gr_gid.
2756 * child_info.h (class cygheap_exec_info): Remove uid.
2757 * spawn.cc (spawn_guts): Do not set ciresrv.moreinfo->uid.
2758 * dcrto.cc (dll_crt0_1): Always call uinfo_init.
2759 * uinfo.cc (uinfo_init): Reorganize and close handle if needed.
2760 (cygheap_user::ontherange): Do not call internal_getpwnam if pw is NULL.
2761
45dbfc26
CF
27622003-01-24 Christopher Faylor <cgf@redhat.com>
2763
2764 * fhandler_console.cc (fhandler_console::send_winch_maybe): Reset
2765 scroll region if size changes.
2766
7d33eefa
CV
27672003-01-24 Pierre Humblet <pierre.humblet@ieee.org>
2768 Jason Tishler <jason@tishler.net>
2769
2770 * cygwin.din: Export setreuid32, setreuid, setregid32, setregid.
2771 * syscalls.cc (setreuid32): New function.
2772 (setreuid): Ditto.
2773 (setregid32): Ditto.
2774 (setregid): Ditto.
2775 * include/cygwin/version.h: Bump API minor number.
2776
ac413374 27772003-01-23 Christopher Faylor <cgf@redhat.com>
69fae986 2778
ac413374 2779 * pwdrp.h (pwdgrp::refresh): Lock entire test prior to reading.
2037688a 2780
ac413374 27812003-01-23 Christopher Faylor <cgf@redhat.com>
09a88426
CF
2782
2783 * grp.cc (pwdgrp::parse_group): Eliminate arg and use class member
2784 instead. Use next_str and next_int to parse arguments.
2785 * passwd.cc (pwdgrp::parse_passwd): Ditto.
2786 (grab_string): Eliminate.
2787 (grab_int): Ditto.
2788 * pwdgrp.h (pwdgrp::parse): Eliminate input arg.
2789 (pwdgrp::parse_passwd): Reflect above change.
2790 (pwdgrp::parse_group): Reflect above change.
2791 (pwdgrp::next_str): New function.
2792 (pwdgrp::next_int): Ditto.
2793 (pwdgrp::gets): Eliminate.
2794 * uinfo.cc (pwdgrp::next_str): New function.
2795 (pwdgrp::next_int): Ditto.
2796 (pwdgrp::add_line): Subsume gets.
2797 (pwdgrp::gets): Eliminate.
2798 (pwdgrp::load): Just call add_line to parse input buffer.
2799
ac413374
CF
28002003-01-22 Thomas Pfaff <tpfaff@gmx.net>
2801
2802 * include/pthread.h (PTHREAD_MUTEX_RECURSIVE): Revert changes from
2803 2003-01-09 mutex patch.
2804 (PTHREAD_MUTEX_ERRORCHECK): Ditto.
2805
28062003-01-22 Corinna Vinschen <corinna@vinschen.de>
2807
2808 * cygrun.c: Move from here to ../testsuite.
2809 * Makefile.in: Remove cygrun.exe dependencies.
2810
28112003-01-21 Jason Tishler <jason@tishler.net>
2812
2813 * cygwin.din: Export nanosleep().
2814 * signal.cc (nanosleep): New function.
2815 (sleep): Move old functionality to nanosleep(). Call nanosleep().
2816 (usleep): Remove old functionality. Call nanosleep().
2817 * include/cygwin/version.h: Bump API minor number.
2818
57394495
CF
28192003-01-21 Christopher Faylor <cgf@redhat.com>
2820
2821 * grp.cc: Call gr.refresh() rather than doing isunitialized tests
2822 throughout.
2823 (gr): Use constructor (sigh).
2824 (pwdgrp::parse_group): Rename from parse_grp.
2825 (pwdgrp::read_group): Rename from read_etc_group. Just call gr.load
2826 with a single argument.
2827 * passwd.cc: Call pr.refresh() rather than doing isunitialized tests
2828 throughout.
2829 (pr): Use constructor (sigh).
2830 (pwdgrp::parse_passwd): Rename from "parse_pwd".
2831 (pwdgrp::read_passwd): Rename from read_etc_passwd. Just call pr.load
2832 with a single argument.
2833 * pwdgrp.h (pwdgrp_state): Eliminate.
2834 (pwdgrp): Reflect above renamings.
2835 (pwdgrp::etc_ix): Rename from pwd_ix.
2836 (pwdgrp::read): New element.
2837 (pwdgrp::lock): New element.
2838 (pwdgrp::refresh): New function.
2839 (pwdgrp::load): Eliminate variations which take buffer arguments.
2840 (pwdgrp::pwdgrp): New constructors. Initialize mutex here.
2841 * uinfo.cc (pwdgrp::load): Accommodate pwd_ix -> etc_ix renaming.
2842 (pwdgrp::load): Set initialized state to true rather than setting state
2843 to loaded.
2844
984864e9
CF
28452003-01-21 Christopher Faylor <cgf@redhat.com>
2846
89f7e8d1 2847 * include/cygwin/version.h: Bump DLL minor number.
984864e9 2848
d8cde3a3
CF
28492003-01-21 Pierre Humblet <pierre.humblet@ieee.org>
2850
2851 * path.h (etc::change_possible): Revert the type to bool.
2852 (etc::set_last_modified): Remove obsolete function.
2853 * path.cc (etc::change_possible): Revert type to bool.
2854 (etc::test_file_change): Do not test for negative values of
2855 change_possible and do not set it to -res.
2856 (etc::dir_changed): When the handle is NULL, call memset instead of
09a88426
CF
2857 test_file_changed. When the handle is invalid, return true. Detect
2858 filename change in /etc.
d8cde3a3 2859 (etc::file_changed): Remove unneeded check for !fn[n].
33de631b 2860 * uinfo.cc (pwdgrp::load): Eliminate spurious setting of fh to NULL.
b99b804b 2861 * pwdgrp.h (pwdgrp::operator =): Eliminate.
d8cde3a3 2862
7905c4f1
CF
28632003-01-19 Christopher Faylor <cgf@redhat.com>
2864
2865 * pwdgrp.h (etc): Move to path.h.
2866 (pwdgrp::max_lines): New field.
2867 (pwdgrp::curr_lines): New field.
2868 (pwdgrp::pwdgrp_buf): Ditto.
2869 (pwdgrp_buf_elem_size): Ditto.
2870 (pwdgrp_parse): Ditto.
2871 (pwdgrp::gets): Just declare here.
2872 (pwdgrp::load): Ditto. Just take one argument.
2873 (pwdgrp::load): Define overloaded function accepting passwd buf.
2874 (pwdgrp::load): Define overloaded function accepting group buf.
2875 * grp.cc: Use pwdgrp elements rather than standalone static variables
2876 throughout.
2877 (curr_lines): Eliminate.
2878 (max_lines): Ditto.
2879 (add_grp_line): Ditto.
2880 (parse_grp): Define as returning boolean. Accept void * arg and line
2881 count. Coerce first argument into __group32 buf reference. Increment
2882 curr_line as appropriate.
2883 (read_etc_group): Pass pwdgrp buffer to gr.load.
2884 * passwd.cc: Use pwdgrp elements rather than standalone static variables
2885 throughout.
2886 (curr_lines): Eliminate.
2887 (max_lines): Ditto.
2888 (add_grp_line): Ditto.
2889 (parse_passwd): Define as returning boolean. Accept void * arg and line
2890 count. Coerce first argument into passwd buf reference. Increment
2891 curr_line as appropriate.
2892 (read_etc_group): Pass pwdgrp buffer to pr.load.
2893 * path.cc (etc::fn): Extend buffer size to allow index by 1 rather than
2894 zero.
2895 (etc::last_modified): Ditto.
2896 (etc::change_possible): Ditto. Renamed from sawchange. Change to
2897 signed char since elements are now tri-state.
2898 (etc::init): Assume "handle" is 1 based rather than 0.
2899 (etc::test_file_change): New function. Sets change_possible based on
2900 file date comparison.
2901 (etc::dir_changed): Check file states immediately after changed_h is
2902 initialized to avoid a race.
2903 (etc::file_changed): Use test_file_change to detect if file needs to be
2904 updated.
2905 * path.h (etc): Move class here from pwdgrp.h.
7905c4f1
CF
2906 * uinfo.cc: Move etc:: functions to path.cc. Move pwdgrp functions
2907 here.
2908 (pwdgrp::gets): Eliminate buf checks. Just check eptr and set lptr.
2909 (pwdgrp::add_line): New function.
2910 (pwdgrp::load): Call generic add_line function which will call correct
2911 parser.
2912
4c6a3e50
CF
29132003-01-17 Christopher Faylor <cgf@redhat.com>
2914
2915 * cygheap.cc: Change most 'int's to 'unsigned's.
2916 (_cmalloc): Only check for size of malloced region when calculating
97d2bc79 2917 bucket. Add overhead when performing the sbrk. Previous change broke
4c6a3e50
CF
2918 _crealloc.
2919
e9152439
CF
29202003-01-17 Christopher Faylor <cgf@redhat.com>
2921
2922 * dcrt0.cc (initialize_env): Use colon for CYGWIN_DEBUG separator.
2923 * grp.cc: Change most statics to NO_COPY throughout.
2924 * passwd.cc: Ditto.
2925
29262003-01-17 Christopher Faylor <cgf@redhat.com>
2927
2928 * pwdgrp.h: Change some BOOLs to bools.
2929 (pwdgrp::pwdgrp): Remove unneeded constructor.
2930 * passwd.cc: Change BOOL to bool throughout.
2931
afa378e7
CV
29322003-01-17 Corinna Vinschen <corinna@vinschen.de>
2933
2934 * cygwin.din: Add strerror_r.
2935 * include/cygwin/version.h: Bump API minor number.
2936
1de6f431
CF
29372003-01-17 Christopher Faylor <cgf@redhat.com>
2938
2939 * uinfo.cc (etc::dir_changed): Don't print a warning if can't open
2940 /etc, unless debugging.
2941
d8cde3a3 29422003-01-17 Pierre Humblet <pierre.humblet@ieee.org>
14ea5029
CF
2943
2944 * grp.cc (read_etc_group): On NT, add a line for gid = -1. Change name
2945 "unknown" to "mkgroup".
2946 (internal_getgrgid): Do not return default in nontsec case.
2947 (internal_getgroups): Add argument srchsid and look for it in groups if
2948 not NULL.
2949 * passwd.cc (read_etc_passwd): On NT, add a line for uid = -1. Use
2950 same default uid for Win95 and NT. Call cygheap_user::ontherange to
2951 initialize HOME.
2952
14ea5029
CF
29532003-01-16 Christopher Faylor <cgf@redhat.com>
2954
2955 * cygheap.cc (init_cygheap::etc_changed): Move to uinfo.cc.
2956 * cygheap.h (init_cygheap::etc_changed_h): Remove.
2957 (init_cygheap::etc_changed): Ditto.
2958 * grp.cc (group_state): Remove. Use gr instead throughout.
2959 (gr): Define as class pwdgrp.
2960 (read_etc_group): Remove gr definition. Remove calls to
2961 set_last_modified and close. Pass add_grp to gr.load to load file.
2962 * passwd.cc (passwd_state): Remove. Use pr instead, throughout.
2963 (pr): Define as class pwdgrp.
2964 (read_etc_passwd): Remove pr definition. Remove calls to
2965 set_last_modified and close. Pass add_pwd_line to pr.load to load
2966 file.
2967 * pwdgrp.h (etc): New helper class for pwdgrp.
2968 (pwdgrp): Combine pwdgrp_check and pwdgrp_read into one class. Remove
2969 file_w32 and last_modified fields.
2970 (pwdgrp::set_last_modified): Remove.
2971 (pwdgrp::isinitializing): Remove FindFirstFile stuff. Move to
2972 etc::file_changed.
2973 (pwdgrp::load): Rename from 'open'. Call etc::init to initialize etc
2974 scanning. Close file handle after reading buffer into memory. Parse
2975 buffer by calling second argument.
2976 (pwdgrp::gets): Reorganize slightly to rely on eptr starting at
5304bcdf 2977 beginning of buffer.
14ea5029
CF
2978 (pwdgrp::close): Remove.
2979 * uinfo.cc (etc::dir_changed): New function.
2980 (etc::init): Ditto.
2981 (etc::file_changed): Ditto.
2982 (etc::set_last_modified): Ditto.
2983
41429bc9
CV
29842003-01-16 Jason Tishler <jason@tishler.net>
2985
2986 * mmap.cc (fixup_mmaps_after_fork): Add ERROR_NOACCESS to the list of
2987 ReadProcessMemory() error codes that trigger a retry with temporary
2988 PAGE_READONLY access. Note that this can occur on NT 4.0.
2989
18813254
CF
29902003-01-15 Christopher Faylor <cgf@redhat.com>
2991
2992 * path.cc (normalize_posix_path): Convert win32 path separators to
2993 slashes when full path is specified.
2994
77cb0c56
CF
29952003-01-15 Pierre Humblet <pierre.humblet@ieee.org>
2996
2997 * cmalloc.cc (_cmalloc): Fix memory leak.
2998
ce542f78
CV
29992003-01-15 Corinna Vinschen <corinna@vinschen.de>
3000
3001 * autoload.cc: Fix copyright date.
3002 * fhandler_dsp.cc: Ditto.
3003 * mmap.cc: Ditto.
3004 * net.cc: Ditto.
3005 * ntdll.h: Ditto.
3006 * signal.cc: Ditto.
3007 * syscalls.cc: Ditto.
3008 * uname.cc: Ditto.
3009 * wait.cc: Ditto.
3010
15996b6f
CV
30112003-01-14 Corinna Vinschen <corinna@vinschen.de>
3012
3013 * mmap.cc (fixup_mmaps_after_fork): Copy protection to child process.
3014 Change ambiguous debug output.
3015
857b65dd
CV
30162003-01-14 Corinna Vinschen <corinna@vinschen.de>
3017
3018 * mmap.cc (mmap_record::access): Change argument type to caddr_t
3019 for strictness.
3020 (mprotect): Protect against calling VirtualProtect() for shared
3021 pages on 9x/Me.
3022 (fixup_mmaps_after_fork): If ReadProcessMemory() fails, try to
3023 change protection of parent page to PAGE_READONLY, then try again.
3024 Revert protection afterwards.
3025
e14328f4
TP
30262003-01-14 Thomas Pfaff <tpfaff@gmx.net>
3027
3028 * syscalls.cc (system): Add pthread_testcancel call.
3029 * thread.cc: Update list of cancellation points.
3030
4a3584c8
TP
30312003-01-14 Thomas Pfaff <tpfaff@gmx.net>
3032
3033 * wait.cc: Include thread.h
3034 (wait4): Add pthread_testcancel call.
3035 Wait for child process and cancellation event.
3036 * thread.cc: Update list of cancellation points.
3037
7ec66a2c
TP
30382003-01-14 Thomas Pfaff <tpfaff@gmx.net>
3039
3040 * signal.cc (sleep): Add pthread_testcancel call.
3041 Wait for signal and cancellation event.
3042 (usleep): Ditto.
3043
30442003-01-14 Thomas Pfaff <tpfaff@gmx.net>
3457ce4d
TP
3045
3046 * exceptions.cc (handle_sigsuspend): Add pthread_testcancel call.
3047 Wait for signal and cancellation event.
3048 * thread.cc: Update list of cancellation points.
3049
2673d5f2
CF
30502003-01-14 David Huang <davehzhr@hotmail.com>
3051
3052 * fhandler_dsp.cc (fhandler_dsp::ioctl): Add limited support for
3053 SNDCTL_DSP_GETFMTS.
3054
9f0d3f37
CF
30552003-01-12 Christopher Faylor <cgf@redhat.com>
3056
3057 * ntdll.h: Fix typo.
3058
7f129d87
CV
30592003-01-12 Corinna Vinschen <corinna@vinschen.de>
3060
3061 * uname.cc (uname): Use cygwin_gethostname() to retrieve hostname.
3062
ab2dbccc
CV
30632003-01-12 Pierre Humblet <pierre.humblet@ieee.org>
3064
3065 * sec_acl.cc (search_ace): Use id == -1, instead of < 0, as wildcard.
3066 (setacl): Start the search for a matching default at the next entry.
3067 Invalidate the type of merged entries instead of clearing it.
3068 Use well_known_creator for default owner and owning group and do
3069 not try to merge non-default and default entries in these cases.
3070 (getacl): Recognize well_known_creator for default owner and group.
3071 (acl_worker): Improve errno settings and streamline the nontsec case.
3072 * security.cc (write_sd): Remove the call to set_process_privilege.
3073 (alloc_sd): If the owner changes, call set_process_privilege and return
3074 immediately on failure. Change inheritance rules: on new directories add
3075 inherit only allow ACEs for creator_owner, creator_group and everyone.
3076 Preserve all inheritances through chmod and chown calls. Introduce
3077 isownergroup to implement the uid == gid case, to keep the inheritance
3078 code simple. Do not initialize owner_sid and group_sid and stop using
3079 the variable psd.
3080
68115c74
CF
30812003-01-10 Christopher Faylor <cgf@redhat.com>
3082
3083 * net.cc: Use gethostname define from winsock2.h.
3084
e3abf986
CF
30852003-01-10 Christopher Faylor <cgf@redhat.com>
3086
3087 * path.cc: Unrevert below reversion except for
3088 mount_info::conv_to_posix_path part.
3089
df2caa88
CV
30902003-01-10 Corinna Vinschen <corinna@vinschen.de>
3091
3092 * path.cc: Revert patch from 2003-01-09 to normalize a windows path
3093 rather than converting to posix.
3094
dc8d11f5
CV
30952003-01-10 Corinna Vinschen <corinna@vinschen.de>
3096
3097 * autoload.cc (gethostname): Make call optional, return 1 if function
3098 can't get loaded.
3099 * net.cc (cygwin_gethostname): Call GetComputerName if return value
3100 of gethostname is non-zero.
3101
70d61f30
CV
31022003-01-10 Charles Wilson <cwilson@ece.gatech.edu>
3103
8735f49f 3104 * cygwin.din: Add asprintf and vasprintf, as well as the reentrant
70d61f30 3105 versions and underscore variants.
8735f49f 3106 * include/cygwin/version.h: Bump CYGWIN_VERSION_API_MINOR.
70d61f30 3107
a7711767
CV
31082003-01-10 Corinna Vinschen <corinna@vinschen.de>
3109
3110 * net.cc (cygwin_gethostname): Fix call to wsock function gethostname.
3111
d5223b2b
CF
31122003-01-09 Christopher Faylor <cgf@redhat.com>
3113
3114 * cygthread.cc (cygthread::cygthread): Be more noisy about odd
3115 condition.
3116 * miscfuncs.cc (low_priority_sleep): Sleep in regular priority if
3117 that's what we're currently running at.
3118
65f207e8
TP
31192003-01-09 Thomas Pfaff <tpfaff@gmx.net>
3120
3121 * include/semaphore.h: Modify typedef for sem_t.
3122 * include/cygwin/types.h: Modify typedefs for pthread_t,
3123 pthread_mutex_t, pthread_key_t, pthread_attr_t,
3124 pthread_mutexattr_t, pthread_condattr_t, pthread_cond_t,
3125 pthread_rwlock_t and pthread_rwlockattr_t.
3126
09cbb9d6
TP
31272003-01-09 Thomas Pfaff <tpfaff@gmx.net>
3128
3129 * thread.h (WAIT_CANCELED): New define.
3130 (pthread::cancelable_wait): New static method.
3131 * thread.cc (pthread::cancelable_wait): Implement.
3132 (semaphore::Wait): Wait on semaphore and thread cancellation.
3133 (pthread::join): Wait on joined thread and thread cancellation.
3134 (semaphore::wait): Add testcancel to check for thread
3135 cancellation even if the semaphore is available.
3136
5d68d1de
TP
31372003-01-09 Thomas Pfaff <tpfaff@gmx.net>
3138
3139 * include/pthread.h: Add define for errorchecking mutexes.
3140 Change default mutex type.
3141 * thread.cc (pthread_cond::TimedWait): Update mutex unlock
3142 calls.
3143 (pthread_mutex::pthread_mutex): New implement.
3144 (pthread_mutex::~pthread_mutex): Ditto.
3145 (pthread_mutex::Lock): Ditto.
3146 (pthread_mutex::TryLock): Ditto.
3147 (pthread_mutex::UnLock): Ditto.
3148 (pthread_mutex::Destroy): Implement new method.
3149 (pthread_mutex::SetOwner): Ditto.
3150 (pthread_mutex::LockRecursive): Ditto.
3151 (pthread_mutex::fixup_after_fork): Restore locking state after
3152 fork.
3153 (__pthread_mutex_lock): Return pthread_mutex::Lock errorcode.
3154 (__pthread_mutex_trylock): Return pthread_mutex::TryLock
3155 errorcode.
3156 (__pthread_mutex_unlock): Return pthread_mutex::UnLock
3157 errorcode.
3158 (__pthread_mutex_destroy): Call pthread_mutex::Destroy to
3457ce4d 3159 destroy mutex.
5d68d1de
TP
3160 (__pthread_mutexattr_settype): Allow errorchecking and recursive
3161 types.
3162 * thread.h (MUTEX_LOCK_COUNTER_INITIAL): New define.
3163 (pthread_mutex::criticalsection): Remove.
3164 (pthread_mutex::lock_counter): New member.
3165 (pthread_mutex::recursion_counter): Ditto.
3166 (pthread_mutex::owner): Ditto.
3167 (pthread_mutex::type): Ditto.
3168 (pthread_mutex::Destroy): New method.
3169 (pthread_mutex::SetOwner): Ditto.
3170 (pthread_mutex::LockRecursive): Ditto.
3171
ed9fe455
TP
31722003-01-09 Thomas Pfaff <tpfaff@gmx.net>
3173
3174 * pthread.cc (pthread_cond_init): Use new pthread_cond::init.
3175 * thread.cc: Some white spaces cleanups.
3176 Change __pthread_cond_init to pthread_cond::init throughout.
3177 (nativeMutex): Move class methods outside pthread_mutex.
3178 (MTinterface::Init): Initialize pthread_cond init lock.
3179 (pthread_cond::condInitializationLock): Instantiate.
3180 (pthread_cond::initMutex): New Method.
3181 (pthread_cond::isGoodInitializerOrBadObject): Ditto.
3182 * thread.h: Some white spaces cleanups.
3183 (nativeMutex): Move class declaration outside pthread_mutex.
3184 (pthread_cond::condInitializationLock): New static member.
3185 (pthread_cond::initMutex): New Method.
3186 (pthread_cond::isGoodInitializerOrBadObject): Ditto.
3187 (__pthread_cond_init): Remove prototype.
3188
93353aee
CV
31892003-01-09 Corinna Vinschen <corinna@vinschen.de>
3190
3191 * fhandler_disk_file.cc (num_entries): Return 2 as link count if
3192 directory unreadable.
3193
3eb27a4e
CV
31942003-01-09 Corinna Vinschen <corinna@vinschen.de>
3195
3196 * security.cc (get_nt_attribute): Always return -1 when read_sd()
3197 fails.
3198 (get_file_attribute): Set permissions to 0 and owner/group to -1
3199 if security descriptor is unreadable.
3200
85ba109d
CF
32012003-01-09 Christopher Faylor <cgf@redhat.com>
3202
3203 Use isdirsep rather than SLASH_P throughout.
3204 * path.cc (iscygdrive): Disallow /cygdrive\x.
3205 (normalize_posix_path): "Normalize" a windows path, if detected, rather
3206 than converting to posix.
3207
32082003-01-06 Troy Curtiss <troyc@usa.net>
3209
3210 * fhandler_serial.cc (fhandler_serial::tcsetattr): Add support and
3211 capability checking for B230400 bitrate.
3212 (fhandler_serial::tcgetattr): Add support for B230400 bitrate.
3213 * include/sys/termios.h: Add B230400 definition for Posix support of
3214 230.4Kbps.
3215
cbdbe9d7
CF
32162003-01-05 Christopher Faylor <cgf@redhat.com>
3217
3218 * pinfo.cc (_pinfo::commune_send): Use myself->lock rather than just
3219 lock when leaving.
3220
f3afe99b
CF
32212003-01-03 Christopher Faylor <cgf@redhat.com>
3222
3223 * dtable.h (dtable::in_vfork_cleanup): New function. True if vfork
3224 cleanup needed.
3225 * dtable.cc (dtable::vfork_parent_restore): Remove assertion.
3226 * pipe.cc (fhandler_pipe::close): Don't close read_state during
3227 fork_fixup since it wasn't inherited.
3228
2665fb15
CF
32292003-01-01 Christopher Faylor <cgf@redhat.com>
3230
3231 * passwd.cc (getpwuid_r32): Revert previous change.
3232
8619b42b
CF
32332003-01-01 Christopher Faylor <cgf@redhat.com>
3234
3235 * sysconf.cc (sysconf): Return arbitrary values for
3236 _SC_GETGR_R_SIZE_MAX, _SC_LOGIN_NAME_MAX, _SC_GETPW_R_SIZE_MAX.
3237
3238 * passwd.cc (getpwuid_r32): Add uid/gid fields to size check
3239 calculation.
This page took 0.408642 seconds and 5 git commands to generate.