1 Wed Dec 31 15:00:32 1997 Geoffrey Noer <noer@cygnus.com>
3 patch from sos@prospect.com.ru (Sergey Okhapkin):
4 * hinfo.cc (hinfo_vec::find_unused_handle): correct
5 previous patch -- need to fix up vec[i].h pointers
7 Wed Dec 31 14:13:22 1997 Ian Lance Taylor <ian@cygnus.com>
9 * regexp/Makefile.in (tooldir): New variable.
10 (install): Install regexp.h.
12 Tue Dec 30 19:52:46 1997 Ian Lance Taylor <ian@cygnus.com>
14 * net.cc (inet_netof): New function.
15 (inet_makeaddr): New function.
16 * cygwin.din: Export inet_netof and inet_makeaddr.
18 Tue Dec 23 17:45:07 1997 Ian Lance Taylor <ian@cygnus.com>
20 * path.cc (current_directory_name): New static variable.
21 (current_directory_posix_name): New static variable.
22 (getcwd_inner): Cache the directory name.
23 (chdir): Move here from syscalls.cc. Clear directory cache
25 * syscalls.cc (chdir): Remove; now in path.cc.
27 * environ.cc (setenv): Add cast to avoid warning.
29 * security.cc (get_file_attribute): Make file parameter a pointer
31 (set_file_attribute): Likewise.
32 * winsup.c (get_file_attribute): Update declaration.
33 (set_file_attribute): Likewise.
35 * path.cc (path_conv): Don't pass the root directory to
38 Mon Dec 22 16:34:40 1997 Ian Lance Taylor <ian@cygnus.com>
40 * path.cc (realpath): Use path_conv to resolve symlinks.
42 * path.cc (path_conv::path_conv): Rewrite completely to convert to
43 win32 path first and then check for symlinks element by element.
44 (symlink_check_one): New static function based on old
45 symlink_check_worker, but without path conversion.
46 (path_prefix_p): Move definition before all uses.
47 (skip_n_slashes, symlink_expand, symlink_follow): Remove.
48 (symlink_check_worker, symlink_check): Remove.
49 (readlink): Rewrite to use new symlink_check_one.
50 (unmixedcaseify, mixedcaseify): Comment out.
51 * path.h (symlink_check, symlink_follow): Don't declare.
52 * fhandler.cc (open): Don't pass O_NOSYMLINK to path_conv. Set
53 errno from path_conv if it fails.
54 * dirsearch.cc (opendir): Check errors from path_conv, and set
56 * times.cc (utimes): Likewise.
57 * syscalls.cc (_unlink, _link, mkdir, rmdir, chdir): Likewise.
58 (chmod, _rename): Likewise.
59 (_stat_worker): Don't just pass nofollow to _open, but base
60 whether to pass O_NOSYMLINK on whether nofollow is set.
61 (lstat): Pass 1, not O_NOSYMLINK, to _stat_worker.
62 * strerror.cc (strerror): Add ELOOP.
64 Thu Dec 18 12:30:47 1997 Ian Lance Taylor <ian@cygnus.com>
66 * fhandler.h (class fhandler_base): Remove inline definitions of
67 tcflush, tcsendbreak, tcdrain, tcflow, tcsetattr, tcgetattr,
68 tcsetpgrp, and tcgetpgrp, so that we can set proper errno values.
69 (class fhandler_tty): Add pgrp_ field, and virtual tcgetpgrp and
71 * fhandler.cc (fhandler_base::tcflush): New function.
72 (fhandler_base::tcsendbreak): New function.
73 (fhandler_base::tcdrain): New function.
74 (fhandler_base::tcflow): New function.
75 (fhandler_base::tcsetattr): New function.
76 (fhandler_base::tcgetattr): New function.
77 (fhandler_base::tcsetpgrp): New function.
78 (fhandler_base::tcgetpgrp): New function.
79 (fhandler_tty::fhandler_tty): Initialize pgrp_.
81 * tty.cc (tcsetpgrp): Set errno correctly on failure.
83 * include/sys/termios.h (CBAUD): Change to 037.
84 (B57600, B115200): Change to values that can fit in a speed_t.
86 * spawn.cc (spawn_guts): Set errno correctly if we can't find the
89 Mon Dec 15 16:40:07 1997 Geoffrey Noer <noer@cygnus.com>
91 patch from msnyder@cygnus.com (Michael Snyder):
92 * heap.cc (_sbrk): handle situation where newalloc < incr
94 Mon Dec 15 16:40:07 1997 Geoffrey Noer <noer@cygnus.com>
96 patch from sos@prospect.com.ru (Sergey Okhapkin):
97 Allow Cygwin32 to terminate process even when in a blocking
99 * exceptions.cc (call_handler): call to WSACancelBlockingCall()
101 (sighandle): call WSACleanup() before exiting the process to
102 cancel blocking winsock calls.
103 * include/mywinsock.h: add proto for WSACleanup().
105 Mon Dec 15 16:40:07 1997 Geoffrey Noer <noer@cygnus.com>
107 * Makefile.in: compile .cc files with -fno-exceptions to
108 decrease dll size and increase execution speed a little.
110 Mon Dec 15 16:40:07 1997 Geoffrey Noer <noer@cygnus.com>
112 patch from cgf@bbc.com (Chris Faylor):
113 * tty.cc (do_input): Detect CTRL-T as a special case when
114 STRACE_CACHE is active. Dumps the strace cache to disk.
115 * console.cc (fhandler_console::read): Detect CTRL-T as a special
116 case when STRACE_CACHE is active. Dumps the strace cache to disk.
118 Sat Dec 13 15:12:53 1997 Ian Lance Taylor <ian@cygnus.com>
120 * fork.cc: Include <malloc.h>.
121 (cygwin_fork_helper1): Call __malloc_copy after copying the stack
122 and heap to the child.
124 Thu Dec 11 15:14:40 1997 Geoffrey Noer <noer@cygnus.com>
126 patch from cgf@bbc.com (Chris Faylor):
127 * sigproc.cc (proc_subproc): Remove over-enthusiastic test for
128 process handling readiness or proc_wait will loop attempting to
129 handle a dying subprocess when signal handlers are not ready.
130 * fork.cc (cygwin_fork_helper1): Reorganize to ensure that a
131 forked process is capable of receiving signals when fork()
134 Wed Dec 10 15:43:37 1997 Ian Lance Taylor <ian@cygnus.com>
136 * include/sys/termios.h (IXANY): Correct value.
137 (PARMRK): Define again.
139 Wed Dec 10 00:05:23 1997 Geoffrey Noer <noer@cygnus.com>
141 patch from cgf@bbc.com (Chris Faylor):
142 * dcrt0.cc (dll_crt0_1): Move start time initialization to a more
143 logical place (pinfo_init).
144 (do_exit): Reorganize to attempt to solve races when a cygwin
145 process occupies two windows pids (i.e., an execed process).
146 * exceptions.cc (lock_cs): Fix erroneous WFSO logic.
147 (sighandle): Use new method for determining if process was
149 (events_terminate): Do not close pinfo_mutex. Allow automatic
150 close by ExitProcess to lengthen the time that the pinfo structure
151 is locked, minimizing races between an exiting child and a
152 potentially exiting parent.
153 * hinfo.cc (hmap_init): Use new method for determining if process
154 was initiated via fork.
155 (hinfo_vec::de_linearize_fd_array): Fix a typo in a comment.
156 * pinfo.cc (clearout): Remove this function. Handled in
158 (pinfo_init): Move start_time setting here from dll_crt0_1.
159 Remove call to init_self in favor of adding three additional lines
161 (pinfo_list::operator []): Implement a very simple hashing
162 scheme for pid lookup.
163 (lpfu): New routine controlled by DEBUGGING conditional. When
164 DEBUGGING is activated, lpfu returns more information about the
165 state of a timed out pinfo_mutex.
166 (pinfo_list::get_empty_pinfo): Remove function. Move
167 functionality to allocate_pid.
168 (allocate_pid): Implement a (very) simple hashing scheme for
169 finding an available pid. Take advantage of reorganized pinfo
170 structure to zero all pertinent fields with one memset.
171 (pinfo::record_death_nolock): Don't bothering zeroing
172 inconsequential stuff.
173 (pinfo::record_death): Leave pinfo_mutex locked with the
174 understanding that this function will be called just prior to
175 exiting the process. This minimizes a race between a child which
176 is exiting at nearly the same time as its parent.
177 * sigproc.cc: Reformat function calls.
178 (sigproc_init): Clear new PID_INITIALIZING flag to indicate that
179 a (possibly execed) process is now capable of receiving signals.
180 (sig_send): Be more defensive in determining if a signal can be
181 sent to myself or suffer problems with execed processes.
182 (sigproc_terminate): Wait for sig_proc to exit to ensure that
183 all pending signals have been handled. Use new 'proc_terminate'
184 function to terminate the subprocess handling thread.
185 (allow_sig_dispatch): Don't bother blocking signals if signal
186 handling isn't active in this process yet.
187 (block_sig_dispatch): Don't bother blocking signals if signal
188 handling isn't active in this process yet.
189 (sig_proc): Use sig_loop_wait variable to control wait time for
190 signal semaphores. Uncouples this wait from wait_subproc.
191 Perform signal cleanup here on thread termination.
192 (proc_exists): More accurate tests to determine if a process
194 (proc_register): Remove this function in favor of a macro.
195 (proc_subproc): More stringent test for being "ready" to process
196 subprocesses. Add more common initialization to PROC_ADDCHILD.
197 Remove PROC_EXIT in favor of a separate function.
198 (proc_terminate): New function. Replaces PROC_EXIT functionality
199 in proc_subproc. Terminates subproc handler thread.
200 (stopped_or_terminated): use lock_pinfo_for_update when modifying
201 child stopsig status or suffer a race.
202 (wait_subproc): Save sig_proc thread handle away for
203 synchronization when exiting. Set up 'i_am_alive' mutex inherited
204 by childen. Child's inability to lock this mutex means that the
205 parent is still alive and processing children. Use proc_loop_wait
206 to control WFMO. Clean up events queue on thread exit.
207 (zap_subproc): Clear out pinfo structure for a child.
208 * sigproc.h: Remove PROC_EXIT constant. Remove obsolete
209 proc_register declaration.
210 (alive_parent): New macro to determine if a parent is still alive.
211 * spawn.cc (spawn_guts): Fix a comment typo. Use proc_terminate
212 to terminate all subprocess handling prior to an exec. Use new
213 method for determining if this process was started via a fork.
214 Attempt to clean up races between execed process, its parent, and
216 * winsup.h (pinfo): Add a new handle indicating that a parent is
217 alive. This should be a foolproof way of determining if a parent
218 has gone away so that a child will know whether to remove itself
219 from the pinfo table.
220 Reorganize the structure in such a way that items to be zeroed
221 are grouped together at the beginning for more efficient zeroing
223 Add a new PID_* constant.
224 New lock_pinfo_for_update macro for use when debugging cygwin.
226 Wed Dec 10 00:05:23 1997 Geoffrey Noer <noer@cygnus.com>
228 patch from sos@prospect.com.ru (Sergey Okhapkin):
229 Change the way to inherit fd table on spawn/exec calls.
230 Use STARTUPINFO structure to pass an fd table to a child process
231 instead of shared memory area. This is undocumented, but is used
232 by MSVC runtime. The desktop inheritance code added again,
233 otherwise user32.dll will fail to initialize after sexec calls.
234 * pinfo.cc (pinfo_init): delinearize fd array from STARTUPINFO
235 structure instead of call to copy_shared_fd_table.
236 * shared.cc (create_shared_fd_mapping_name): remove
237 (create/copy_shared_fd_table): remove
238 * spawn.cc (spawn_guts): use lp(cb)Reserved2 fields of STARTUPINFO
239 to pass fd table to a child. Remove call to
240 create_shared_fd_table. Inherit window station/desktop on sexec
242 * winsup.h: remove prototypes for create/copy_shared_fd_table.
244 Fri Dec 5 18:57:42 1997 Geoffrey Noer <noer@cygnus.com>
246 patch from cgf@bbc.com (Chris Faylor):
247 * kill.cc (main): Report error if kill() fails. Minor reformat.
248 * ps.cc (main): Only use month/day in start time when starting
249 time is > 24 hours in the past, not when it occurs yesterday.
251 Fri Dec 5 15:54:41 1997 Geoffrey Noer <noer@cygnus.com>
253 * fcntl.cc (_fcntl): reformat
254 * fhandler.cc (fhandler_tty::open): new, need special open for
255 ttys. In addition to calling fhandler_base::open, check
256 flags to handle blocking vs. non-blocking I/O. Should
257 initialize tty to standard state (9600 bits/sec - 8 - 1 with
258 no flow control) but this code needs more work still. Ifdef
260 (fhandler_tty::tcsendbreak): new
261 (fhandler_tty::tcdrain): new
262 (fhandler_tty::tcflow): new
263 (fhandler_tty::tcsetattr): add support for action arg. Use
264 a DCB struct to hold the values we will set. First call
265 GetCommState to get the current state, then reassign values
266 based on the contents of the termios struct. Handle the
267 case where t->c_ospeed is set to B0, otherwise set state.BaudRate.
268 Set all the other DCB struct values appropriately, based on
269 the contents of the termios struct.
270 (fhandler_tty::tcgetattr): do the inverse of tcsetattr.
271 Call GetCommState to get the current state and use this to set
272 the appropriate termios struct values.
273 * termios.cc: reformat
274 (tcsendbreak): implement -- add duration arg,
275 call fhandler tcsendbreak as appropriate
276 (tcdrain): implement -- call fhandler tcdrain as appropriate
277 (tcflow): implement -- call fhandler tcflow as appropriate
278 * fhandler.h: add new tc* protos
279 * include/sys/termios.h: correct values of iflag bits,
280 define CRTSXOFF and CRTSCTS, CBAUD, B57600 and B115200.
281 Add protos for tc* functions.
283 Wed Nov 26 17:06:17 1997 Geoffrey Noer <noer@cygnus.com>
285 patch from sos@prospect.com.ru (Sergey Okhapkin):
286 * spawn.cc (perhaps_suffix): resolve symlinks to .exes.
288 Mon Nov 24 17:10:49 1997 Geoffrey Noer <noer@cygnus.com>
290 * cygwin.din: remove crypt
291 * syscalls.cc (crypt): remove crypt stub
293 Sun Nov 23 17:34:42 1997 Geoffrey Noer <noer@cygnus.com>
295 patch from sos@prospect.com.ru (Sergey Okhapkin):
296 * spawn.cc (spawn_guts): save the path of the script itself,
297 use the saved path while building the command line to execute.
299 Thu Nov 20 22:58:23 1997 Geoffrey Noer <noer@cygnus.com>
301 * stubs.cc: delete file, move unimplemented stubs to the
302 files in which they would normally belong.
303 * grp.cc (setgrent): implement (was in stubs.cc)
304 * syscalls.cc: move regfree, mknod, setgid, set(e)uid, sync,
305 crypt, and PPC __chkstk/_alloca/dll_entry stubs here from stubs.cc
306 (sync): just return zero for now instead of -1
307 (crypt): return -1 instead of 0
309 Thu Nov 20 22:41:57 1997 Geoffrey Noer <noer@cygnus.com>
311 patch from cgf@bbc.com (Chris Faylor):
312 * spawn.cc (spawn_guts): A premature close of the spawned filehandle
313 was possible when reparenting an exited process. Fix this.
314 * dcrt0.cc (do_exit): Only do minimal cleanup if "pid focus"
315 has moved to another windows process or the other process will
318 patch from sos@prospect.com.ru (Sergey Okhapkin):
319 * sigproc.cc (getsem): set errno to EPERM if existing semaphore
321 (wait_subproc): allow access to signal semaphores to process's
322 owner only except for SIGCHLD (needed for SIGCHLD delivery after
325 Thu Nov 20 00:52:58 1997 Geoffrey Noer <noer@cygnus.com>
327 patch from cgf@bbc.com (Chris Faylor):
328 * syscalls.cc (hash_path_name): Ignore trailing backslash when
329 calculating pathname hash.
330 * hinfo.cc (hinfo_vec::de_linearize_fd_array): Set use_tty
331 if /dev/ttyn is detected in the shared_fd_table. Before this
332 change, executing "set CYGWIN_TTY=1", "bash", "unset CYGWIN_TTY",
333 "/bin/pwd" would result in pwd printing nothing because
334 the de_linearize code would use the wrong fhandler_xxx when
335 reading from the buffer inherited from the parent process.
336 * cygwin.din: Add new ctermid function for export.
337 * syscalls.cc (ctermid): New function
338 * exceptions.cc (call_handler): If called during a P_OVERLAY
339 spawn, merely set appropriate flags and return. The spawn
340 code will then clean up and exit.
341 * sigproc.cc (proc_exists): Reorganize to better detect defunct
342 processes. Don't clean up pinfo if process has a parent since the
343 parent should clean up eventually.
344 * spawn.cc: New global exec_exit. Set by signal handler to
345 value which should be used on exit from aborted spawn.
346 (spawn_guts): Try harder to let the child terminate (if it is
347 going to) before exiting on a signal. Remove obsolete code.
349 patch from sos@prospect.com.ru (Sergey Okhapkin):
350 * exec.cc (file_exists): Removed
351 * spawn.cc (spawn_guts): call perhaps_suffix to convert filename
352 to win32 form and to check file existance; prog variable
353 removed, all references changed to real_path variable.
354 Do not inherit parent's window station/desktop on sexecXX calls.
355 They are no longer needed with the new signal handling.
356 (_spawnve): extra file existance check removed
357 * winsup.h: file_exists prototype removed
359 Wed Nov 19 16:23:47 1997 Geoffrey Noer <noer@cygnus.com>
361 patch from sos@prospect.com.ru (Sergey Okhapkin):
362 * cygwin.din: add missing exports for random -- initstate
363 and setstate (accessed by gawk among others?)
365 Tue Nov 18 22:27:10 1997 Geoffrey Noer <noer@cygnus.com>
367 * Makefile.in: Add spaces after colons in rules for make
369 Mon Nov 17 22:35:25 1997 Geoffrey Noer <noer@cygnus.com>
371 patch from proven@cygnus.com (Chris Provenzano):
372 * Makefile.in: set SHELL = @SHELL@, set VPATH to only @srcdir@.
373 Remove mingw from directories to build for now, adapt rules
374 for building sysdef files without fancy VPATH
375 * configure: regenerate
376 * config/i386/makefrag: add rules to build setjmp/longjmp
377 * regexp/Makefile.in: set SHELL = @SHELL@
378 * regexp/configure: regenerate
379 * utils/Makefile.in: set SHELL = @SHELL@
380 * utils/configure: regenerate
382 Mon Nov 17 18:36:50 1997 Geoffrey Noer <noer@rtl.cygnus.com>
384 patch from sos@prospect.com.ru (Sergey Okhapkin):
385 * fhandler.cc (fhandler_disk_file::open): calls to symlink_XXX
386 replaced with path_conv class calls.
387 * path.cc (path_conv::path_conv): comments added, O_NOSYMLINK case
389 * path.h (class path_conv): symlink_p, exec_p - new class members.
390 * spawn.cc (spawn_guts): call path_conv instead of symlink_follow.
392 Sun Nov 16 15:54:27 1997 Geoffrey Noer <noer@rtl.cygnus.com>
394 patch from cgf@bbc.com (Chris Faylor):
395 * dcrt0.cc (do_exit): Use new pinfo element in debug statement.
396 * pinfo.cc (pinfo_init): Eliminate use of "PID" environment
397 variable in favor of scanning the process table for a
398 SpawnedProcessId field matching current windows process id.
399 Should speed up spawned process startup slightly. Delay setting
400 of dwProcessId until process is capable of processing signals
401 since this field is used to build signal semaphores.
402 * signal.cc (kill_worker): Perform a `proc_exists' on the pid
403 in question if signal == 0. This will verify that the process
404 actually exists and was not abnormally terminated.
405 * sigproc.cc (sigproc_init): Initialize dwProcessId field after
406 signal processing has been initialized.
407 (sigproc_terminate): Remove events[0] close.
408 (getsem): Use GetCurrentProcessId to find the windows pid since
409 this dwProcessId field is not yet set up. Use proc_exists to
410 determine if error should be printed on OpenSemaphore error.
411 (proc_exists): New function. Makes more exhaustive test of
412 process existence. Determines if process died without going
413 through normal shutdown.
414 (wait_subproc): Close wakeup event only on thread exit.
415 * spawn.cc: Remove pExeced. Use new field in pinfo.
416 (spawn_guts): Initialize dwSpawnedProcessId field.
417 * utils/ps.cc (main): Perform a kill(pid, 0) on any pids that
418 appear to be active. This will clear out pids that have died
419 abnormally. 'ps -f' bypasses this.
420 * winsup.h (class pinfo): Add dwSpawnedProcessId field.
422 Sun Nov 16 15:54:27 1997 Geoffrey Noer <noer@rtl.cygnus.com>
424 patch from sos@prospect.com.ru (Sergey Okhapkin):
425 * pinfo.cc ((pinfo_init): use dwProcessId for execed/spawned
426 check, set subproc_ready event only if the process is exec'ed.
427 * spawn.cc (spawn_guts): initialize hProcess and dwProcessId
428 fields of pinfo on exec, keep progname field on spawn.
430 Sun Nov 16 15:54:27 1997 Geoffrey Noer <noer@rtl.cygnus.com>
432 patch from sos@prospect.com.ru (Sergey Okhapkin):
433 * dcrt0.cc: remove commented out code
434 * spawn.cc: fix misapplied patch problem
436 Sun Nov 16 15:54:27 1997 Geoffrey Noer <noer@cygnus.com>
438 patch from cgf@bbc.com (Chris Faylor):
439 * fhandler.cc (fhandler_dev_null::open): Open Windows 'nul'
440 device rather than "faking" a real open.
441 (fhandler_dev_null::close): delete.
442 (fhandler_dev_null::fstat): delete.
443 (fhandler_dev_null::ioctl): delete.
444 (fhandler_dev_null::read): delete.
445 (fhandler_dev_null::write): delete.
446 (fhandler_dev_null::lseek): delete.
447 (fhandler_dev_null::dup): delete.
448 * fhandler.h (class fhandler_base): delete above methods from
450 * hinfo.cc (hinfo_vec::build_fhandler): Use new fhandler_dev_null
451 class which opens 'nul' device. Treat /dev/null similarly to
452 other Windows devices. This allows redirection of /dev/null to
453 non-cygwin processes.
455 Sun Nov 16 15:54:27 1997 Geoffrey Noer <noer@cygnus.com>
457 patch from cgf@bbc.com (Chris Faylor):
458 * dcrt0.cc (do_exit): Use EXIT_* flags to determine how exit
459 should proceed. Honor new EXIT_NOCLOSEALL to avoid
461 * exceptions.cc (__cygwin32_exception_handler): Use new
462 EXIT_SIGNAL define to indicate exiting due to signal.
463 * signal.cc (sigprocmask): Slightly more defensive check against
464 being called prior to complete cygwin setup.
465 (_raise): Defensive check to guard against being called prior to
466 complete cygwin setup.
467 * sigproc.cc (stopped_or_terminated): Use new EXIT_SIGNAL define
468 to detect exiting due to signal.
469 * sigproc.h: Define flags to be used during exit process as
471 * spawn.cc (spawn_guts): Use EXIT_* constants to control how
472 do_exit proceeds after _P_OVERLAY.
474 Sun Nov 16 15:54:27 1997 Geoffrey Noer <noer@cygnus.com>
476 * sysconf.cc (sysconf): return 1048576 for ARG_MAX until
477 we figure out the right value (_POSIX_ARG_MAX is only 4K
480 Sun Nov 16 15:54:27 1997 Geoffrey Noer <noer@cygnus.com>
482 patch from sos@prospect.com.ru (Sergey Okhapkin):
483 * dcrt0.cc (dll_crt0_1): call winsock_init if neccesary.
484 * fhandler.cc ((fhandler_socket::fhandler_socket): moved to net.cc
485 * fhandler.h (class fhandler_socket): destructor prototype added.
486 * fork.cc (cygwin_fork_helper1): set PID_SOCKETS_USED in the
487 child's pinfo if parent has open socket descriptors; call
488 winsock_init in child code if necessary.
489 * net.cc: static variable winsock_init_p removed;
490 number_of_sockets is new global variable containing number of
492 (winsock_init): made global, save "winsock inited" flag in process
494 (cygwin32_winsock calls): condition for winsock initialisation
496 (fhandler_socket::fhandler_socket): new, moved from fhandler.cc;
497 increment number_of_sockets on constructor call.
498 (fhandler_socket::~fhandler_socket): new. Decrement
499 number_of_sockets on destructor call, check for negative value.
500 (fhandler_socket::ioctl): check for winsock initialisation added.
501 * spawn.cc (spawn_guts): handle PID_SOCKETS_USED in child's pinfo.
502 * winsup.h: PID_SOCKETS_USED - new enum value; number_of_sockets
503 and winsock_init() prototypes added.
505 Wed Nov 12 23:02:34 1997 Geoffrey Noer <noer@cygnus.com>
507 patch from cgf@bbc.com (Chris Faylor):
508 * exceptions.cc: Substitute do_exit for _exit as appropriate.
509 do_exit allows full 32 bits of exit value. The upper 16 bits
510 are used for special cygwin operations.
511 * winsup.h: Change definition of do_exit to allow calling from
513 * dcrt0.cc (do_exit): Change to allow calling from signal handler
514 in place of _exit. This is necessary to ensure that only cygwin
515 internal applications can exit with the upper order 16 bits set
518 Wed Nov 12 23:02:34 1997 Geoffrey Noer <noer@cygnus.com>
520 patch from cgf@bbc.com (Chris Faylor):
521 * dcrt0.cc (do_exit): New function. Subsumes functionality of
522 _exit but takes a DWORD argument. Changed to avoid some shutdown
523 activities when called with REPARENTING bit set in argument. Also
524 explicitly kills any executing non-cygwin subprocess from a
526 (_exit): Use do_exit for exiting. Ensure that only low order 1
527 bits of status are used or confusion will result if exiting with
528 some higher order bits set.
529 * exceptions.cc (set_process_mask): Reflect new method for
530 sig_send to send signals to self.
531 (handle_sigsuspend): Reflect new method for sig_send to send
533 * fork.cc: A handle name was changed in the pinfo structure to
534 be more reflective of its use. Change forkee_stopped to
535 subproc_ready everywhere.
536 * pinfo.cc (pinfo::clearout): Change forkee_stopped to
538 (pinfo_init): Use PID_EXECED flag to determine if this process has
539 been execed. If so, signal the remaining stub in the process
540 which invoked us so that the stub can terminate and let us take
542 * sigproc.cc (sig_send): Change method for determining if sending
543 signals to myself. A NULL pointer means communicate with my
544 signal handler. This is necessary to allow communication with
545 our own signal processors after reparenting an execed process.
546 Also, add an additional test to detect if a process goes away in
547 the middle of attempting to send it a signal.
548 (allow_sig_dispatch): Reflect new method for sig_send to send
550 (getsem): Use dwProcessId in names for signal semaphores. Allows
551 communicating with both parts of a process that is temporarily
552 "split in two" while execing.
553 (sig_proc): Avoid printing an error if WAIT_FAILED and exiting
554 anyway. Process requests even if loop_wait == 0.
555 (proc_subproc): Defensive check for manipulating processes prior
556 to initialization or after terminating sigproc.
557 Use different check for subprocesses that have been reparented.
558 Hopefully this will eliminate WFSO, error 6 problems.
559 (wait_subproc): Only exit when loop_wait == 0 and not dealing with
561 * spawn.cc: Set up two global variables, used on exit when
562 execing a non-cygwin process: hExeced - handle of non-cygwin
563 process which is being waited for by a stub, pExeced - windows pid
565 (spawn_guts): Reorganize to always (temporarily) wait for the new
566 process when P_OVERLAY. If a cygwin process is invoked, then the
567 wait will return when an event is signalled and the new process
568 will be "reparented" in the ppid. If a non-cygwin process is
569 invoked, wait until the process exits or a signal is received
570 which terminates the process. In this case, the do_exit function
571 will terminate the non-cygwin process.
572 * winsup.h: Rename forkee_stopped to subproc_ready since this
573 event now has a dual role which is better defined by this new
574 name. Add a new flag (PID_EXECED) for process_state. Define a
575 new function `do_exit' which operates similarly to _exit
576 but takes > 16 quantities with the high order bit signifying
577 different exit actions.
579 Mon Nov 10 17:11:08 1997 Geoffrey Noer <noer@cygnus.com>
581 * include/utime.h: remove (moved to newlib/libc/sys/cygwin32/sys)
582 so as not to conflict with the one in newlib/libc/include.
584 Mon Nov 10 15:11:42 1997 Geoffrey Noer <noer@cygnus.com>
586 patch from sos@prospect.com.ru (Sergey Okhapkin):
587 * exceptions.cc (__cygwin32_exception_handler): exit with
588 "core dumped" exit code after writing "core" file.
590 Mon Nov 10 15:11:42 1997 Geoffrey Noer <noer@cygnus.com>
592 patch from cgf@bbc.com (Chris Faylor):
593 * console.cc: Add convenience macros and structures for handling
595 (fhandler_console::fillin_info): New function to fill in the `info'
597 (fhandler_console::scroll_screen): Change to scroll only the visible
598 portion of the screen. Honor scroll regions more stringently.
599 (fhandler_console::open): Use new fillin_info function.
600 (fhandler_console::ioctl): Use new fillin_info function which
601 automatically calculates screen size.
602 (fhandler_console::clear_screen): Use new fillin_info function.
603 Only clear visible portion of screen.
604 (fhandler_console::cursor_set): Add a flag to indicate whether
605 cursor positioning is absolute within buffer or is screen relative.
606 Use new fillin_info function to get screen information.
607 (fhandler_console::cursor_rel): Use new fillin_info function.
608 Change for new cursor_set parameter.
609 (fhandler_console::cursor_get): Use new fillin_info function.
610 (fhandler_console::char_command): Use new fillin_info function
611 where appropriate. Change for new cursor set parameter where
612 appropriate. Scroll only visible portion of screen when required.
613 * fhandler.h (class fhandler_console): Add fillin_info, change
614 cursor_set to reflect additional argument.
616 Mon Nov 10 15:11:42 1997 Geoffrey Noer <noer@cygnus.com>
618 patch from cgf@bbc.com (Chris Faylor):
619 * dcrt0.cc (dll_crt0_1): Register process start time.
620 * fork.cc (cygwin_fork_helper1): Register process start time.
621 * utils/ps.cc (main): Report process start time.
622 (start_time): New function to format time similarly to UNIX ps.
623 A time from today shows as HH:MM, times from previous days just
624 show the month and day.
625 * winsup.h (class pinfo): Add start_time field.
627 Mon Nov 10 11:54:27 1997 Ian Lance Taylor <ian@cygnus.com>
629 * include/Windows32/Defines.h (TIME_ZONE_ID_INVALID): Define.
630 * times.cc (gettimeofday): The error return from
631 GetTimeZoneInformation is TIME_ZONE_ID_INVALID, not
632 TIME_ZONE_ID_UNKNOWN.
634 Sun Nov 9 17:08:30 1997 Geoffrey Noer <noer@cygnus.com>
636 patch from cgf@bbc.com (Chris Faylor):
637 * Makefile.in: add ../libiberty/strsignal.o
638 * cygwin.din: add exports for strsignal, strtosigno
639 * utils/kill.cc: changes to allow accepting signal name
642 Sun Nov 9 17:08:30 1997 Geoffrey Noer <noer@cygnus.com>
644 * include/limits.h: define PATH_MAX here instead of
645 include/sys/param.h, define _POSIX_NGROUPS_MAX as 0 not 1
646 (system invariant value, not implementation-specific)
647 * include/sys/param.h: remove PATH_MAX, change NOFILE from 64
648 to 8192, delete PATHSIZE, remove safety wrapper around
649 MAXHOSTNAMELEN, add comments
650 * sysconf.cc (sysconf): return NGROUPS_MAX not zero,
651 return _POSIX_SAVED_IDS not zero. Return _POSIX_CHILD_MAX
652 not 4096. Return _POSIX_CHILD_MAX, not 8.
654 patch from sos@prospect.com.ru (Sergey Okhapkin):
655 * winsup.h: add proto for setdtablesize, define NOFILE_INIT
657 * hinfo.cc (hmap_init, hinfo_vec::find_unused_handle): change to
658 support virtually unlimited numbers of fds. Remove setdtablesize
660 * syscalls.cc: initialize dtable_size to NOFILE_INIT instead of
663 Thu Nov 6 13:14:09 1997 Geoffrey Noer <noer@cygnus.com>
665 * exceptions.cc (__cygwin32_exception_handler): don't
666 print "In cygwin32_except_handler" for exceptions Cygwin32
667 isn't going to handle. Print "(progname PID) Exception: <type>"
668 to console. Redirect all detailed information including the
669 stack trace to <progname>.core. This should reduce confusion
670 about what's causing the exception (a lot of people would see "In
671 cygwin32..." and think the problem was in Cygwin32 when most of
672 the time it was in some other program).
673 * syscalls.cc: add fixme
674 * times.cc: add fixme
676 Wed Nov 5 19:23:10 1997 Geoffrey Noer <noer@cygnus.com>
678 patch from cgf@bbc.com (Chris Faylor):
679 * Makefile.in: force .c.os and .cc.os to be built in same
680 directories as source
682 Wed Nov 5 19:23:10 1997 Geoffrey Noer <noer@cygnus.com>
684 * drct0.cc (dll_crt0_1): stop initializing winsock on process
685 startup since that slows down startup time of all processes, even
686 ones that don't end up making Winsock calls.
687 * fork.cc (cygwin_fork_helper1): don't need to call uinfo_init
688 or socket_checkinit after fork -- the appropriate functions will
689 do the necessary initialization if they are ever called.
690 * net.cc: init winsock_init_p to zero and make it static
691 (all exported functions): call winsock_init before making
692 any WinSock calls since this no longer happens in dcrt0.cc
693 startup code. Only do this if !winsock_init_p.
694 (winsock_init): checkinit renamed. Now just inits winsock
695 without checking whether it has been already initialized.
697 * uinfo.cc (uinfo_init): after we call getpwnam, we know
698 the passwd file has been read in so don't check initialization
699 of it. However, we do need to read_etc_group() if group_in_memory
701 * passwd.cc: rename global i variable to pw_pos, rename
702 passwd_in_memory to passwd_in_memory_p to match net.cc scheme.
704 (read_etc_passwd): make static
705 (various): make sure to read_etc_passwd() if passwd_in_memory
707 * grp.cc: add comments, rename idx global to grp_pos,
708 rename group_in_memory to group_in_memory_p to match net.cc
709 scheme, group_in_memory_p no longer static (needs to be accessed
711 * winsup.h: remove proto for socket_checkinit since that's
712 renamed and static within net.cc
714 Tue Nov 4 01:02:20 1997 Geoffrey Noer <noer@cygnus.com>
716 patch from cgf@bbc.com (Chris Faylor):
717 * signal.cc (sigprocmask): Newer versions of gcc will call
718 sigprocmask when a builtin constructor is activated. If this
719 happens prior to the setup of u->self, then a NULL dereference
720 will occur. Guard against this.
722 Mon Nov 3 17:00:45 1997 Geoffrey Noer <noer@cygnus.com>
724 patch from cgf@bbc.com (Chris Faylor):
725 * hinfo.cc (hinfo_vec::build_fhandler): Open a console for
726 /dev/tty when !use_tty.
728 Thu Oct 30 10:28:15 1997 Tom Tromey <tromey@cygnus.com>
730 * include/mapi.h: New file.
731 * sysdef/i386/mapi32.def (MAPISendMail@20): New export.
733 Thu Oct 30 15:08:13 1997 Geoffrey Noer <noer@cygnus.com>
735 * times.cc: add comments listing standards funcs are defined in
736 (dump_filetime): remove unused local func
737 * net.cc (fail): remove local func, replace one reference with
738 equivalent debug_printf, add standards comments, reformat a little
739 (fhandler_socket::close): simplify handling of res
740 (fhandler_socket::fstat): set ENOSYS (unimplemented)
741 * stubs.cc: set ENOSYS in unimplemented funcs
742 * uname.cc: add standards comment
745 Wed Oct 29 22:43:57 1997 Geoffrey Noer <noer@cygnus.com>
747 * times.cc (settimeofday): set ENOSYS instead of EPERM
748 since ENOSYS maps to "Function not implemented" which is the
750 * syscalls.cc (seterrno): on failure, set EACCES instead of EPERM
751 which is better for the unknown error case
753 Fri Oct 24 01:24:07 1997 Geoffrey Noer <noer@cygnus.com>
755 patch from green@cygnus.com (Anthony Green):
756 * dcrt0.cc: new host_dependent_constants object with a global
757 instance of it which allows constants that are different in Win 95
758 and NT to be saved here instead of having forks in the code and
759 having to check the OS type each time. Add two constants for
760 fhandler, one for sharing attributes and one for upper word value
762 (dll_crt0_1): call host_dependent init function
763 * fhandler.cc (fhandler_base::open): use above object for
764 setting shared attributes
765 (fhandler_disk_file::lock): get upper word for locking from
766 host_dependent_constants
767 * winsup.h: define host_dependent_constants class and add extern
768 for global instance of it
770 Wed Oct 22 02:27:53 1997 Geoffrey Noer <noer@cygnus.com>
772 patch from sos@prospect.com.ru (Sergey Okhapkin):
773 * cygwin.din: Export getenv, putenv, setenv and unsetenv instead
774 of cygwin32_ wrappers
775 * dcrt0.cc: External variable environ removed
776 (dll_crt0_1): strip executable's path on console title if
777 environment variable CYGWIN_TITLE set to "strip", references to
779 * environ.cc: New file. Code derived from newlib sources.
780 * exec.cc: include stdlib.h
781 (execl, execv): new (derived from newlib sources).
782 (sexecve): reference to environ removed.
783 (sexecvpe): call getenv instead of cygwin32_getenv.
784 * grp.cc: new static variable group_in_memory
785 (read_etc_group): skip blank lines
786 (getgrgid, getgrnam, getgrent): call read_etc_group when necessary.
787 * misc.cc (cygwin32_getenv/putenv/setenv/unsetenv): remove
789 * passwd.cc: new static variable passwd_in_memory
790 (read_etc_passwd): skip blank lines
791 (search_for, getpwent): call read_etc_passwd when necessary.
792 (setpwent): fixed incorrect initialization of i var.
793 * pinfo.cc (pinfo_init): initialize uid with illegal value to
794 force read of /etc/passwd and /etc/group.
795 * spawn.cc: call getenv instead cygwin32_getenv
796 (spawn_guts): force read of /etc/passwd and /etc/group on sexec
798 * uinfo.cc (uinfo_init): read /etc/passwd and /etc/group only if
800 * winsup.h: remove protos for environ, cygwin32_getenv,
803 Wed Oct 22 02:08:54 1997 Geoffrey Noer <noer@cygnus.com>
805 * utils/aclocal.m4: new file. Define autoconf macros for
806 determining whether we're compiling for the cygwin32 environment
807 or not and determine the executable suffix
808 * utils/configure.in: call AM_CYGWIN32 and AM_EXEEXT
809 * utils/configure: regenerate
810 * utils/Makefile.in: add $(exeext) after executable names so
811 programs will be built with the .exe suffix
813 Wed Oct 22 00:50:27 1997 Geoffrey Noer <noer@cygnus.com>
815 Now that it is possible to use gdb using a stable
816 cygwin.dll to debug a program using a newer, potentially buggy
817 cygwin.dll, the strace mechanism will probably end up being
818 used more and more for debugging timing/race-condition bugs that
819 aren't easily exposed in a gdb session. The following changes
820 make the strace facility better for debugging timing issues by
821 storing the last few commands in a buffer instead of writing
822 to disk each function call.
824 patch from cgf@bbc.com (Chris Faylor):
825 * dcrt0.cc (dll_crt0_1): Change to strace_init call to take
826 an argument (for planned future registry changes).
827 (_exit): Call strace_dump when appropriate. Add a debugging
829 * include/sys/strace.h: Add _STRACE_CACHE, _STRACE_EXITDUMP,
831 * strace.c (strace_init): Allow hexadecimal, octal setting of
832 strace flags in environment variable. Handle new cache option.
833 (strace_printf): Display number of seconds from last message.
834 Handle _STRACE_CACHE.
835 (strace_dump): New function. Dump cached messages to disk.
837 Wed Oct 22 00:08:40 1997 Geoffrey Noer <noer@cygnus.com>
839 * cygwin.din: export socket calls without cygwin32_ prefix
840 * net.cc: remove unused herror function in favor of
841 cygwin32_herror which is exported as herror
842 * include/netdb.h: we are now exporting the socket calls without
843 the cygwin32_ prefix so we don't need the nasty remapping in
845 * include/arpa/inet.h: ditto
846 * include/sys/socket.h: ditto
847 * select.cc (select): make extern C
849 Tue Oct 21 22:52:29 1997 Geoffrey Noer <noer@cygnus.com>
851 patch from cgf@bbc.com (Chris Faylor):
852 * sigproc.cc (sigproc_terminate): Fix flawed attempt to signal
853 any processes waiting for signal notification success when the
854 process receiving the signal is terminating.
855 (wait_subproc): Report on errors when opening the
856 sync_proc_subproc mutex. Move initialization of events[0]
857 "wakeup" signal prior to wait_subproc_inited or risk a (miniscule)
858 chance for a reference to a NULL handle.
859 * strace.cc (ta[]): Change WM_ASYNCIO entry to reflect previous
860 changes to WM_ASYNCIO constant.
862 Tue Oct 21 14:30:14 1997 Geoffrey Noer <noer@cygnus.com>
864 patch from cgf@bbc.com (Chris Faylor):
865 * sigproc.cc (proc_subproc): fix minor error output problem
867 Mon Oct 20 20:19:02 1997 Geoffrey Noer <noer@cygnus.com>
869 * Makefile.in: change DLL_NAME to cygwin97r2.dll
871 Mon Oct 20 20:16:47 1997 Geoffrey Noer <noer@cygnus.com>
873 patch from sos@prospect.com.ru (Sergey Okhapkin):
874 * window.cc (alarm): When there is a previous alarm() request
875 with less than one second remaining, then the return from a call
876 to alarm() is supposed to return 1.
878 Mon Oct 20 20:16:47 1997 Geoffrey Noer <noer@cygnus.com>
880 patch from cgf@bbc.com (Chris Faylor):
881 * Makefile.in: Add sigproc.o target. Add sigproc.h dependency
882 where appropriate. Add -s to intermediate ld of cygwin.dll to
883 speed up the process of building the .dll.
884 * dcrt0.cc: Add new sigproc.h include.
885 (dll_crt0_1): Replace window_init with sigproc_init for
886 initialization of signal/sub process handling. Change to use new
887 process_state field in pinfo.
888 (_exit): Remove spurious debugging statement. Terminate sigproc
889 processing. Remove signal blocking obviated by previous signal
890 termination. Remove SIGCHLD notification of parent as it is now
891 handled automatically in the parent.
892 (api_fatal): Terminate sigproc processing.
893 * exceptions.cc: Add new sigproc.h include. Change name of
895 (ctrl_c_handler): Change to static as this is no longer called
896 outside of this module.
897 (lock_cs): Change to a function which will optionally grab new
898 signal dispatch mutex. Don't wait forever for cs mutex.
899 (unlock_cs): Change to a function which will optionally release
900 new signal dispatch mutex.
901 (init_exceptions): Detect errors from SetConsoleCtrlHandler.
902 Initialize new sig_dispatch mutex. This mutex is used to
903 control dispatching to a function on signal receipt.
904 (sig_dispatch_pending): New function. Called from signal
905 processing thread to dispatch pending signals.
906 (set_process_mask): Block signal dispatch during setting of new
907 mask, if possible. Contact signal thread to dispatch pending
909 (handle_sigsuspend): New function. Attempts to implement a
910 sigsuspend which will not lose signal notification. Called from
912 (call_handler): Use sigproc_printf where appropriate.
913 (ctrl_c_handler): Use _raise to invoke the correct signal.
914 (sighandle): New function. Subsumes most of ctrl_c_handler.
915 Change to mark as suspended signals which would dispatch for which
916 the sig_dispatch mutex is unavailable. Use sigproc_printf where
918 (events_init): Remove application_stopped mutex made obsolete by
919 new sigproc handling.
920 (events_terminate): Remove application_stopped mutex made
921 obsolete by new sigproc handling.
922 * fork.cc: Add new sigproc.h include.
923 (cygwin_fork_helper1): Use process_state field in pinfo (replaces
924 inuse_p). Call proc_register to add a new subproc to sigproc
925 handling. Call sigproc_init for new subprocess. Remove obsolete
927 * heap.cc (_sbrk): Use process_state field in pinfo (replaces
929 * hinfo.cc (hmap_init): Use process_state field in pinfo (replaces
931 * include/sys/strace.h: Add tracing for signal/subprocesses.
932 * init.cc: Add new sigproc.h include. Add waitq_storage global
933 for new sigproc handling.
934 (dll_entry): Add initialization, destruction of structures needed
935 by new sigproc handling.
936 * net.cc (fhandler_socket::ioctl): Use gethwnd() function to find
937 hwnd of hidden window.
938 * pinfo.cc: Add new sigproc.h include.
939 (pinfo::clearout): Use process_state field in pinfo (replaces
940 split_heap_p). Explicitly initialize various handles to NULL.
941 (pinfo_init): Use process_state field in pinfo (replaces
943 (pinfo_list::operator): Use process_state field in pinfo (replaces
945 (pinfo_list::alocate_pid): Initialize process_state field.
946 (pinfo::init_self): Remove obsolete initialization of hProcess.
947 (pinfo::record_death_nolock): Changes for new sigproc handling.
948 (pinfo::record_death): Move bulk of this code to sigproc.cc.
949 (pinfo::terminate): Remove function made obsolete by sigproc
951 (pinfo::init_from_exec): Use process_state field (replaces
953 * signal.cc: Add new sigproc.h include.
954 (kill_worker): Call new sig_send function to send signals to
956 (_kill): Use process_state field in pinfo (replaces inuse_p).
957 (sigsuspend): Call handle_sigsuspend in exceptions.cc to handle
958 sigsuspend in a non-raceable way.
959 * sigproc.cc: New signal/subprocess handling module. Replaces
960 SendMessage method for signals with a method using semaphores.
961 Also detects changes in the state of child processes.
962 * sigproc.h: New header file defining constants and functions for
963 signal/subprocess handling.
964 * spawn.cc: Add new sigproc.h include. Clean up trailing spaces.
965 (spawn_guts): Reorganize to use new sigproc handling.
966 Use new pinfo process_state field (replaces inuse_p).
967 * syscalls.cc (_read): Use new pinfo process_state field (replaces
970 * tty.cc (tty_init): Use new pinfo process_state field (replaces
972 * utils/ps.cc (main): Use new pinfo process_state field (replaces
973 inuse_p). Detect "zombie" processes similarly to UNIX ps.
974 * wait.cc: Add required includes.
975 (wait_found): Function obsoleted by new sigproc handling.
976 (wait4): Reorganize to use new sigproc handling.
977 * window.cc: Changes for new sigproc handling.
978 (WndProc): Remove SIGNAL handling obsoleted by new sigproc
979 handling. Use static window handle since the field has been
980 removed from pinfo. Use _raise where appropriate to send signals.
981 (Winmain): Replace global window handle with static since the
982 field has been removed from pinfo.
983 (window_init): Remove obsolete function.
984 (gethwnd): New function to allocate hidden window on demand rather
986 (window_terminate): Kill hidden window only if allocated.
987 (setitimer): Use gethwnd function to retrieve hidden window
989 * winsup.h: Remove stuff made obsolete by sigproc handling. Move
990 some constants to new sigproc.h header file. Remove inuse_p,
991 cygin_parent_p, split_heap_p. Replace with a single process_state
992 field. Define bit fields for process_state in an enum for easier
995 Mon Oct 20 19:17:33 1997 Geoffrey Noer <noer@cygnus.com>
997 * sysdef/i386/winserve.def: remove ancient version of cygwin.din
998 * include/sgtty.h: remove since Cygwin32's tty handling doesn't
999 support bsd syntax/semantics
1000 * include/sys/termios.h: change winsize struct to include
1001 ws_xpixel and ws_ypixel members
1002 * cygwin.din: remove export of ScreenCols, ScreenGetCursor,
1003 ScreenRows, ScreenSetCursor, get_pid__5pinfo, getkey, _getkey,
1004 kbhit, _kbhit, __small_printf = small_printf__FPCce
1005 * key.cc: remove. Similar functionality exists in ncurses
1006 which can be compiled for Cygwin32
1007 * console.cc (ScreenCols, ScreenGetCursor, ScreenSetCursor,
1008 ScreenRows): delete and delete SCREEN_ROWS/COLS defines
1009 * pold.c: remove old pipe-related code that's no longer used
1010 * include/regex.h: remove, it's not a part of cygwin.dll
1011 * syscalls.cc: started to add comments including standards
1014 (ftruncate): length is an off_t, not a size_t. Add missing
1015 return value to debug printf
1016 * syscalls.h: ftruncate length is an off_t, add proto for truncate
1018 patch from cgf@bbc.com (Chris Faylor):
1019 * console.cc (fhandler_console::write): Recognize '@' as a valid
1020 character to follow a '\e[' sequence or get 'Bad escape' errors.
1022 Wed Oct 15 18:44:25 1997 Geoffrey Noer <noer@cygnus.com>
1024 * cygwin.din: restore __main as an export
1026 Mon Oct 13 18:41:09 1997 Geoffrey Noer <noer@cygnus.com>
1028 * cygwin.din: revert renaming of __assert since that's
1029 actually what it's supposed to be called
1032 Fri Oct 10 19:25:49 1997 Tom Tromey <tromey@cygnus.com>
1034 * include/Windows32/Base.h: Moved typedefs of CHAR, SHORT, etc,
1035 before all other uses in file.
1037 Fri Oct 10 17:50:12 1997 Ian Lance Taylor <ian@cygnus.com>
1039 * include/Windows32/Base.h: Only typedef CHAR, SHORT, and LONG if
1042 Thu Oct 9 00:46:40 1997 Geoffrey Noer <noer@cygnus.com>
1044 * cygwin.din: remove all libgcc.a exports. They don't
1045 belong here since libgcc.a doesn't really relate to the
1046 purpose of cygwin.dll, and (to make things worse) the contents
1048 * assert.cc: rename __assert to __cygwin32_assert
1049 * exceptions.cc: rename __stack_trace to __cygwin32_stack_trace,
1050 __cygwin_except_handler to __cygwin32_except_handler
1051 * version.h: increment major and minor numbers
1053 Tue Oct 7 12:52:25 1997 Geoffrey Noer <noer@cygnus.com>
1055 patch from sos@prospect.com.ru (Sergey Okhapkin):
1056 * dcrt0.cc (_exit): under Win 95, don't send SIGCHLD
1057 unless special env variable is set. This works around a
1058 problem where exiting a process can hang under Win 95.
1060 Mon Oct 6 23:41:34 1997 Geoffrey Noer <noer@cygnus.com>
1062 * regexp: new directory containing free regexp code by
1063 Henry Spencer. Taken from the most recent release of NetBSD.
1064 Write configure.in and Makefile.in, based on files from
1066 * Makefile.in: build regexp directory and include objs in
1068 * stubs.cc: remove all reg* stubs except for regfree which
1069 isn't provided by above code.
1071 Mon Oct 6 13:35:48 1997 Geoffrey Noer <noer@cygnus.com>
1073 * dcrt0.cc: remove asm idata3 terminator, now that ld is fixed
1074 such that this is no longer necessary.
1075 * libccrt0.cc: ditto
1077 Mon Oct 6 13:14:00 1997 Geoffrey Noer <noer@cygnus.com>
1079 patch from sos@prospect.com.ru (Sergey Okhapkin):
1080 * spawn.cc (spawn_guts): return child's PID on
1081 spawn (_P_NOWAIT,...) instead of child's handle.
1082 (cwait): rewritten as a wrapper to waitpid.
1084 Mon Oct 6 13:02:01 1997 Geoffrey Noer <noer@cygnus.com>
1086 patch from sos@prospect.com.ru (Sergey Okhapkin):
1087 * net.cc (socketpair): new
1088 * cygwin.din: add socketpair export
1090 Mon Oct 6 13:01:51 1997 Geoffrey Noer <noer@cygnus.com>
1092 patch from cgf@bbc.com (Chris Faylor):
1093 * dcrt0.cc: Remove obsolete call to fork_terminate.
1094 * exceptions.cc: Respace, remove extraneous trailing whitespace.
1095 Change critical section to mutex since there are supposedly
1096 multi-processor problems with critical sections under NT.
1097 Use "lock_cs" and "unlock_cs" macros to lock/unlock critical
1099 (init_exceptions): Change critical section initialization to mutex
1101 (set_process_mask): Use locking macros to control access to
1103 (ctrl_c_handler): Use lock_cs/unlock_cs to control access.
1104 (events_init): Use standard cygname function to create names for
1106 (events_init): Close cs mutex.
1107 * fork.cc: Use event flags which are specific to the child being
1108 forked. This prevents one process from prematurely activating
1109 another. It also makes fork slightly more thread-safe.
1110 (fork_init): Remove event initialization.
1111 (fork_terminate): Remove function.
1112 (cygwin_fork_helper1): Initialize events on a per-fork basis.
1113 Events are inherited in child's pinfo structure.
1114 Remove child->hThread initialization as it not needed. Use
1115 pi.hThread where child->hThread is used.
1116 Work around Windows 95 bug where a WaitForSingleObjects will
1117 sometimes return ERROR_INVALID_HANDLE when it is resumed after
1119 * pinfo.cc: Remove references to hThread field whereever it occurs.
1120 * strace.cc: Use standard cygname function to create name for
1121 strace_mutex. Prevents confusion between different .dll versions.
1122 * wait.cc (wait_found): Remove reference to hThread.
1123 * winsup.h (class pinfo): Remove reference to hThread. Add
1124 per-process fork control event handles.
1125 * include/limits.h: Increase NGROUPS_MAX from 0 to 1 to reflect
1126 recent change to getgroups.
1128 Mon Oct 6 11:06:22 1997 Geoffrey Noer <noer@cygnus.com>
1130 Oops. ../libio refers to objdir and is not the same
1131 as $(srcdir)/../libio.
1133 Thu Oct 2 23:12:19 1997 Geoffrey Noer <noer@cygnus.com>
1135 Revert patches to sources applied after Sept 16. Removed
1136 relevant portions of ChangeLog entries. Some of those changes
1137 may reappear later (removing the entries makes this log easier
1140 Thu Oct 2 15:34:03 1997 Geoffrey Noer <noer@cygnus.com>
1142 * Makefile.in: remove hardcoding of SHELL to /bin/sh, remove
1143 ../libio from INCLUDES since $(srcdir)/../libio is already
1145 * glob/Makefile.in: remove hardcoding of SHELL to /bin/sh
1147 Mon Sep 29 14:06:24 1997 Geoffrey Noer <noer@cygnus.com>
1149 patch from sos@prospect.com.ru (Sergey Okhapkin):
1150 * cygwin.din: add exports for rcmd, rresvport, rexec
1151 * net.cc (cygwin32_rcmd): new
1152 (cygwin32_rresvport): new
1153 (cygwin32_rexec): new
1154 * include/mywinsock.h: add protos for Winsock calls associated
1155 with functions called by the above.
1157 Mon Sep 29 13:26:24 1997 Geoffrey Noer <noer@cygnus.com>
1159 patch from cgf@bbc.com (Chris Faylor):
1160 * grp.cc (getgrent): Change overlooked comment to reflect new
1163 Thu Sep 25 18:35:49 1997 Geoffrey Noer <noer@cygnus.com>
1165 * Makefile.in: remove debugdll defs since the shared memory
1166 overlap problem is solved by the timestamp addition of Sept 23
1167 * version.h: rework explanations of version numbers
1169 Thu Sep 25 16:21:49 1997 Geoffrey Noer <noer@cygnus.com>
1171 * spawn.cc: add missing cast to debug printf
1173 Thu Sep 25 16:14:17 1997 Ian Lance Taylor <ian@cygnus.com>
1175 * path.cc (conv_to_win32_path): Call backslashify on a win32
1178 Tue Sep 23 17:58:17 1997 Geoffrey Noer <noer@cygnus.com>
1180 Fixes for things that were causing compile-time warnings:
1181 * exec.cc (_execve): add missing const to args to match def
1182 of execve in newlib which this calls.
1183 (sexecve): add missing const to def
1184 (sexeclpe): don't need to cast argv in sexecvpe call
1185 (sexecvpe): add missing const to def
1186 * winsup.h: correct _execve proto, add protos for login/logout
1187 * syscalls.h: correct sexecve, sexecvpe protos
1188 * include/Windows32/Base.h: NULL should be defined differently
1190 * init.cc: respacing
1192 Tue Sep 23 17:05:50 1997 Geoffrey Noer <noer@cygnus.com>
1194 patch from sos@prospect.com.ru (Sergey Okhapkin):
1195 * dcrt0.cc (dll_crt0_1): don't use alloca for allocating storage
1196 for environment blocks because setenv() uses realloc!
1198 Tue Sep 23 17:05:50 1997 Geoffrey Noer <noer@cygnus.com>
1200 patch from cgf@bbc.com (Chris Faylor):
1201 * Makefile.in (LD_STUFF): Add datestamp.o after DLL_OFILES.
1202 (datestamp.o): New target. datestamp.c is generated whenever .o
1203 files change. It creates a file containing a "date stamp"
1204 which is used by the function "cygname" to create named
1205 shared memory, events, mutexes, and semaphores used by
1206 cygwin.dll. The unique datestamp allows multiple loading of
1207 different cygwin.dll's even when they have incompatible use
1208 of shared memory areas.
1209 * init.cc (dll_entry): Create the name string used by cygname
1210 from the name of the invoking .dll + the datestamp of the
1211 .dll from the auto-generated datestamp.c
1212 * misc.cc (cygname): New function. Creates a standard Cygnus
1213 shared resource name given a prefix, a name (e.g., pinfo_mutex),
1214 and a numeric suffix (e.g., a pid). Replaces custom code in
1215 several files. Uses cygwin_dlldate from datestamp.c to construct
1216 names that are unique for a given cygwin load.
1217 * shared.cc (open_shared_file_map): Use standard cygname function
1218 to create names for sharable objects. Use static handle 'h'
1219 so that it can be closed later by shared_terminate.
1220 (shared_terminate): Guard against calling CloseHandle with a
1222 (create_shared_fd_mapping_name): Use cygname function to generate
1223 the name for the "fd_map".
1225 Tue Sep 16 23:34:36 1997 Geoffrey Noer <noer@cygnus.com>
1227 patch from sos@prospect.com.ru (Sergey Okhapkin):
1228 * fcntl.cc (_fcntl): correct errno value (EBADF instead of
1231 Tue Sep 16 17:22:28 1997 Geoffrey Noer <noer@cygnus.com>
1233 patch from sos@prospect.com.ru (Sergey Okhapkin):
1234 * include/Windows32/Defines.h: add missing defines needed
1236 * ntea.cc: remove them from here
1237 * syscalls.cc (_link): call CreateFile with FILE_WRITE_ATTRIBUTES
1238 flag instead of GENERIC_WRITE
1240 Tue Sep 16 17:22:28 1997 Geoffrey Noer <noer@cygnus.com>
1242 patch from cgf@bbc.com (Chris Faylor):
1243 * pinfo.cc (pinfo_init): Fix a NULL pointer dereference when PID
1244 environment variable contains garbage.
1246 Thu Sep 11 16:51:40 1997 Geoffrey Noer <noer@cygnus.com>
1248 * syscalls.cc (ftruncate): read file pointer location at
1249 beginning of function and restore it at the end
1251 Thu Sep 11 15:35:10 1997 Ian Lance Taylor <ian@cygnus.com>
1253 * path.cc (backslashify): Don't turn a single trailing slash into
1254 a double trailing slash.
1256 Wed Sep 10 11:40:55 1997 Ian Lance Taylor <ian@cygnus.com>
1258 * include/Windows32/Structures.h: Add PACKED to PRINTDLG.
1259 * include/Windows32/Functions.h: Add STDCALL to a few function
1262 Tue Sep 9 02:12:18 1997 Geoffrey Noer <noer@cygnus.com>
1264 patch from sos@prospect.com.ru (Sergey Okhapkin):
1265 * syscalls.cc (_link): Implement hard links under NT with NTFS
1266 using the backup API. Default to copying the file (what we did
1269 Mon Sep 8 20:19:09 1997 Geoffrey Noer <noer@cygnus.com>
1271 Merge in the following changes:
1273 Thu Aug 21 13:30:12 1997 Ian Lance Taylor <ian@cygnus.com>
1274 * assert.cc: New file.
1275 * Makefile.in (DLL_OFILES): Add assert.o.
1276 (assert.o): New target.
1277 * pinfo.cc (cygwin32_winpid_to_pid): New C function.
1278 * cygwin.din: Add cygwin32_winpid_to_pid.
1279 * include/sys/cygwin.h: Include <sys/types.h>.
1280 (cygwin32_winpid_to_pid): Declare.
1281 * pinfo.cc (pinfo_init): Add debug_printf showing pid and pgid.
1283 Wed Aug 20 13:24:30 1997 Ian Lance Taylor <ian@cygnus.com>
1284 * spawn.cc (env_sort): New static function.
1285 (spawn_guts): Sort the environment before passing it to
1287 * exceptions.cc (exit_already): New file static variable.
1288 (__cygwin_exception_handler): If exit_already is set, just
1289 return. If we get an exception we don't recognize, let the next
1290 exception handler handle it. Just ignore the INVALID_HANDLE
1292 (really_exit): Remove file static exit_already variable; use the
1294 (events_terminate): Set exit_already.
1295 * include/Windows32/Defines.h (EXCEPTION_INVALID_HANDLE): Define.
1296 (STATUS_INVALID_HANDLE): Define.
1297 * include/Windows32/Functions.h: Declare some shell functions.
1299 Mon Sep 8 17:40:46 1997 Geoffrey Noer <noer@cygnus.com>
1301 patch from sos@prospect.com.ru (Sergey Okhapkin):
1302 * dcrt0.cc (_exit): Kill the foreground process group on session
1303 leader exit only if job control is in progress.
1304 * exceptions.cc (ctrl_c_handler): protect the code with critical
1305 section. This helps stability under Win 95.
1306 * include/sys/strace.h: add new wm_printf macro
1307 * signal.cc (kill_worker): window message number changed (window
1308 messages WM_USER-WM_USER+0x100 reserved for common controls on
1309 windows95). Debug print added.
1310 * spawn.cc (spawn_guts): removed unneeded flag DETACHED_PROCESS.
1311 * strace.cc: defines for SIGNAL and ASYNCIO messages added.
1312 * tty.cc (create_tty_master): initialize speed fields of termios
1314 (fhandler_pty_master::open): likewise.
1315 * window.cc (WndProc): debug print added, window message number
1317 * winsup.h: WM_ASYNCIO number changed.
1319 Mon Sep 8 16:40:46 1997 Geoffrey Noer <noer@cygnus.com>
1321 patch from cgf@bbc.com (Chris Faylor):
1322 * fhandler.h: set_w_binary/set_r_binary now defined to
1324 * grp.cc (getgroups): always return an array of length 1 where
1325 the element is the user's gid.
1326 * pinfo.cc (pinfo_init): verify that we haven't exceeded the
1327 maximum number of processes
1328 (pinfo_list::allocate_pid): ditto
1329 * include/Windows32/Functions.h: add noreturn attrib to ExitProcess
1330 * include/sys/strace.h: change strace defs so strace-related
1331 printfs will automatically add __FUNCTION__: to the beginning,
1332 rename __sys_printf to strace_printf.
1333 * *.cc: remove function names from debug printfs in favor of the
1334 new scheme where they are automatically added, change __sys_printf
1335 references (now strace_printf).
1336 * smallprint.c (__small_vsprintf): new function displayer code
1337 to support the above changes
1339 Wed Sep 3 12:44:45 1997 Geoffrey Noer <noer@cygnus.com>
1341 * Makefile.in: split subdir_do into subdir_dobefore and
1342 subdir_doafter to reflect whether the subdir in question
1343 should be built before or after the top level is built
1344 (e.g. glob needs to be built before libcygwin.a but libcygwin.a
1345 needs to be built before utils).
1347 Thu Aug 28 12:09:39 1997 Geoffrey Noer <noer@cygnus.com>
1349 * configure.in: when setting up EXE_LDFLAGS, correct the
1350 location of crt0.o to ../../newlib since EXE_LDFLAGS is used
1351 by Cygwin32 subdirectories where newlib is two directories up
1353 * configure: regenerate with autoconf
1355 Thu Aug 28 00:13:11 1997 Geoffrey Noer <noer@cygnus.com>
1357 Replace all licensing-related headers in all Cygnus-owned
1358 files. Instead of listing terms at the top of each file, now
1360 * CYGWIN32_LICENSE: new file listing Cygwin32 licensing terms
1362 Wed Aug 27 17:40:16 1997 Geoffrey Noer <noer@cygnus.com>
1364 * cygwin.din: export random, srandom
1366 Wed Aug 20 16:56:39 1997 Geoffrey Noer <noer@cygnus.com>
1368 * Makefile.in: remove unused winsock-related build rules
1369 that were commented out, minor comment changes, remove
1370 test.exe build rule.
1372 Wed Aug 20 14:45:17 1997 Geoffrey Noer <noer@cygnus.com>
1374 * Makefile.in: link cygwin.dll with -lm -lgcc -lc -lgcc instead
1375 of -lc -lm -lm -lgcc so lgcc finds abort(). Add definitions that
1376 will eventually be used to build a cygwindebug.dll used by gdb
1377 so gdb can debug a buggy cygwin.dll. Change some variable names
1378 to have underscores in them (DLL_NAME, LIB_NAME, DEF_FILE, etc.).
1379 Comment out text.exe build rule.
1381 Tue Aug 19 20:41:51 1997 Geoffrey Noer <noer@cygnus.com>
1383 * dcrt0.cc: respace, modify some comments slightly
1385 Tue Aug 19 16:17:57 1997 Geoffrey Noer <noer@cygnus.com>
1387 * Makefile.in: include ../libiberty/random.o, stop including
1388 librx since it is LGPL'd code.
1389 * stubs.cc: add stubs for regcomp, regexec, regerror, regfree
1390 * dcrt0.cc (dll_crt0_1): default to not support tty/pty devs,
1391 default to not displaying the running process in the title bar.
1393 Fri Aug 15 18:23:43 1997 Rob Savoye <rob@cygnus.com>
1395 Add mingw directory for the minimalist cygwin environment.
1396 See mingw/ChangeLog for changes specific to that directory
1398 * configure.in: Add mingw to AC_CONFIG_SUBDIR.
1399 * configure: Regenerated from autoconf 2.12 with Cygnus patches.
1400 * Makefile.in: Use subdir_do which uses the value of $SUBDIRS
1401 rather than having seperate target for each directory.
1402 * glob/Makefile.in: Add a phony target for install.
1403 * configure.in: Add mingw to AC_CONFIG_SUBDIR.
1405 Fri Aug 15 01:12:19 1997 Geoffrey Noer <noer@cygnus.com>
1407 * times.cc: add missing extern "C"s around exported functions
1409 Thu Aug 14 17:00:32 1997 Geoffrey Noer <noer@cygnus.com>
1411 patch from sos@prospect.com.ru (Sergey Okhapkin):
1412 * console.cc (fhandler_console::input_tcsetattr): clear iflag_ and
1413 lflag_ when tty support enabled.
1414 (FakeReadFile): do not interrupt read when tty support enabled.
1415 Do not reset signal_arrived event.
1416 * cygwin.din: add exports - cf(g)set(i)ospeed, login, logout, ttyslot
1417 * dcrt0.cc (_exit): kill orphaned childs with SIGHUP and SIGCONT
1418 on group leader exit, kill foreground process group on session
1420 * dirsearch.cc (closedir): check for FindFirst() was called
1421 * exceptions.cc: include mywinsock.h.
1422 (call_handler): call WSACancelBlockingCall to try to interrupt
1423 blocking winsock call, do PulseEvent() instead of SetEvent().
1424 (ctrl_c_handler): clear pending SIGCONT on stop signals, clear all
1425 pending stop signals on SIGCONT, suspend the thread before resuming
1426 to avoid W95 bug, process pending signals on SIGCONT, add signals to
1427 pending if the process is stopped.
1428 * fcntl.cc (fcntl): some code rearrangement to always do debug printfs
1430 * hinfo.cc: include stdio.h
1431 (hinfo_vec::build_fhandler): always add ttynum to tty's filename
1432 (hinfo_vec::dup2): fix return value initialization and errno setting.
1433 * include/netdb.h: typedef for sig_t removed
1434 * include/sys/termios.h: octal constants changed to hexadecimals
1435 to simplify debugging.
1436 * misc.cc: include unistd.h and utmp.h
1439 * pinfo.cc (lock_pinfo_for_update): debug printf added
1440 (pinfo::record_death): mark processes as orphaned on group leader
1442 * select.cc (cygwin32_select): ResetEvent() removed
1443 * signal.cc: unneeded ResetEvents removed
1444 (_kill): ignore stop signals from a member of orphaned process group,
1445 kill self process the last on group kill.
1446 (sigaction): reset pending SIGCHLD when the disposition is set to
1448 * spawn.cc (spawn_guts): ResetEvent removed
1449 (cwait): do not interrupt the call
1450 * strerror.cc: include stdio.h, reenable disabled cases, remove
1451 duplicated cases, return decimal error value in the default case.
1452 * syscalls.cc (setsid): set process group id to process id when setsid
1454 (setpgid): check for negative pgid
1455 * syslog.cc (syslog): %m macro support added
1456 * termios.cc (cfg(s)eti(o)speed): new fuctions needed to support
1457 NIST PCTS requirements.
1458 * tty.cc: include utmp.h.
1460 (tty_list::terminate): fill in utmp on tty master exit
1461 (tty_list::allocate_tty): check for tty master pocess alive
1462 (create_tty_master): fill in utmp
1463 (do_input): restart tty output on interrupt
1464 (fhandler_tty_slave::fhndler_tty_slave): ttynum logic moved to
1466 (fhandler_tty_slave::open): set tty's session id to sid of the calling
1468 (fhandler_tty_slave::write): check for TOSTOP bit
1469 (fhandler_tty_slave::fstat): allow access to tty to everyone
1470 (fhandler_tty_slave::ioctl): check for TOSTOP bit
1471 * tty.h: ttyslot prototype added
1472 * wait.cc (wait4): check for valid value of option argument added
1473 * winsup.h: define PID_ORPHANED, move tty_list array to the end
1476 Thu Aug 14 11:42:59 1997 Ian Lance Taylor <ian@cygnus.com>
1478 * path.cc (slash_unc_prefix_p): Correct check of path[3]. Permit
1479 numbers after the host name.
1481 * include/Windows32/Defines.h: Correct value for SM_CMETRICS,
1482 SM_CXDRAG, SM_CYDRAG, SM_CXEDGE, SM_CYEDGE, SM_CXFIXEDFRAME,
1483 SM_CYFIXEDFRAME, and add SM_MOUSEWHEELPRESENT.
1485 Wed Aug 13 20:11:52 1997 Ian Lance Taylor <ian@cygnus.com>
1487 * fork.cc (cygwin_fork_helper1): If we don't have a console, pass
1488 DETACHED_PROCESS to CreateProcess.
1489 * spawn.cc (spawn_guts): Likewise.
1491 Tue Aug 12 19:51:32 1997 Ian Lance Taylor <ian@cygnus.com>
1493 * include/Windows32/Structures.h (IMAGE_DOS_HEADER): Remove
1494 dos_message and nt_signature fields; they aren't present in the
1495 Windows header file.
1497 Wed Aug 6 16:27:13 1997 Ian Lance Taylor <ian@cygnus.com>
1499 * include/Windows32/Structures.h: Define LPMEASUREITEMSTRUCT as a
1500 pointer to MEASUREITEMSTRUCT.
1502 * syscalls.cc (_stat_worker): In directory case, only set
1503 STD_WBITS in st_mode if FILE_ATTRIBUTE_READONLY is clear.
1504 (access): Remove special case for directory.
1506 * include/Windows32/Defines.h (HKEY_DYN_DATA): Define.
1507 (REG_FULL_RESOURCE_DESCRIPTOR): Define.
1508 (REG_RESOURCE_REQUIREMENTS_LIST): Define.
1510 Mon Aug 4 21:15:05 1997 Andrew Cagney <cagney@b1.cygnus.com>
1512 * glob/Makefile.in: Add include of newlib/libc/sys/cygwin32 to
1513 explicit .c.o rule so that dirent.h is found.
1515 Thu Jul 24 02:14:24 1997 Geoffrey Noer <noer@cygnus.com>
1517 patch from sos@prospect.com.ru (Sergey Okhapkin):
1518 * cygwin.din: fpathconf, initgroups - new exports
1519 * console.cc: new static variable CONSOLE_SCREEN_BUFFER_INFO info
1520 (fhandler_console::scroll_screen): local variable info removed
1521 (fhandler_console::open): likewise
1522 (fhandler_console::ioctl): likewise
1523 (fhandler_console::clear_screen): likewise
1524 (fhandler_console::cursor_set): likewise
1525 (fhandler_console::cursor_rel): likewise
1526 (fhandler_console::cursor_get): likewise
1527 (fhandler_console::write_normal): fixed scroll region bug, termcap
1528 "cs" entry works now
1529 * dcrt0.cc (dll_crt0_1): set file API to use OEM charset, convert
1530 command line from ANSI to OEM charset.
1531 (_exit): clear stopsig value on process exit
1532 * exceptions.cc (call_handler): add one millisecond delay before
1534 (ctrl_c_handler): clear pending stop signals on SIGCONT, do not send
1535 SIGCHLD to parent on process resuming; some debug printfs added; do
1536 not call _exit() in a context of signal handling thread (would cause
1537 more harm than good); fixed a bug with SA_NOCLDSTOP flag.
1538 * fhandler.cc (fhandler_base::open): use full win32 path name to
1539 generate inode number namehash instead of unix filename.
1540 * fork.cc (cygwin_fork_helper1): block all signals while child and
1541 parent are in fork() code
1542 * grp.cc (initgroups): new stub added
1543 * include/limits.h: new posix defines added
1544 * include/sys/termios.h: typedef speed_t as unsigned char
1545 * path.cc (mount_info::conv_to_posix_path) bugfix
1546 * pinfo.cc (pinfo_list::operator []): PID_NOT_IN_USE check added
1547 (pinfo::record_death): set child's ppid to 1 on parent exit
1548 * signal.cc (sleep): correct return value if sleep call was
1550 (_kill): correct return value if killed pid was not found.
1551 (sigaction): correct return value on handling non-handlable
1552 signals, clear pending ignored signals
1553 (sigsuspend): sigsuspend call should always return -1 and set errno
1556 * syscalls.cc: map ERROR_NO_DATA to EPIPE instead of ENODATA
1557 (isatty): fixed return value
1559 (pathconf): rewritten
1560 (ttyname): fixed return value
1561 * sysconf.cc (sysconf): misc fixes
1562 * termios.cc (tcsendbreak): corrected errno set
1566 (tcsetattr): likewise
1567 (tcgetattr): likewise
1568 (tcgetpgrp): likewise
1569 (tcsetpgrp): likewise
1570 * tty.cc (fhandler_tty_slave::ioctl): TCGETA/TCSETA support added
1571 * wait.cc (_wait): wait() syscall should do not terminate if
1573 (wait4): wait calls should wait childs only; fixed a bug with
1574 nprocinfo count; fixed signal handling.
1576 Thu Jul 24 02:10:25 1997 Geoffrey Noer <noer@cygnus.com>
1578 * uname.cc: uname now outputs Cygwin32_NT or Cygwin32_95
1579 instead of Cygwin32/NT or Cygwin32/95.
1581 Thu Jul 24 02:10:25 1997 Geoffrey Noer <noer@cygnus.com>
1583 patch from sos@prospect.com.ru (Sergey Okhapkin):
1584 * cygwin.din: sexecve, sexecl, sexecle, sexeclp, sexeclpe,
1585 sexecv, sexecp, sexecvpe - new exports
1586 * exceptions.cc (ctrl_c_handler): do not raise SIGHUP on
1587 CTRL_LOGOFF_EVENT to prevent termination of cygwin application
1588 run as NT service on user logoff, raise SIGHUP instead of SIGQUIT
1589 on system shutdown, clear stopped status in inuse_p on SIGCONT,
1590 set stopped status on stop signals, call _exit() on process
1591 termination in a context of signal thread to terminate while
1592 in a blocking win32 syscall.
1593 * exec.cc: include unistd.h and ctype.h.
1594 (_execve): code moved to sexecve, call sexecve with a NULL hToken
1596 (sexecve): new, check path, argv[0] and envp to null values,
1597 pass nToken handle to spawn_guts().
1598 (sexecl): new (code derived from spawn family of functions in
1607 * fhandler.cc (fhandler_base::fstat): add STD_RBITS and STD_WBITS
1608 to st_mode of non-file handles.
1609 (fhandler_dev_floppy::open): clear O_TRUNC bit.
1610 (fhandler_dev_tape::open): likewise
1611 * fhandler.h (fhandler_pty_master): new member pktmode (flag to
1612 indicate pty's packet mode)
1613 * fork.cc (cygwin_fork_helper1): call uinfo_init () in a child code
1614 to read /etc/passwd, /etc/group into memory.
1615 * hinfo.cc (hinfo_vec::build_fhandler): check socket names for right
1616 inheritance on exec().
1617 * include/Windows32/Defines.h: fixed a typo in LPSTR_TEXTCALLBACKA
1619 * include/Windows32/Functions.h: added prototype for
1620 ImpersonateLoggedOnUser() API call.
1621 * net.cc (cygwin32_socket): duplicate socket handle as inheritable
1622 to avoid Windows95 socket inheritance bug, close the original socket.
1623 (cygwin32_accept): likewise.
1624 * path.cc (mount_info::conv_to_win32_path): do not add trailing
1625 backslash to UNC device names like "\\.\a:", "\\.\tape0:" etc.
1626 * pinfo.cc (pinfo::record_death_nolock) set PID_WAITING_FOR_PARENT
1627 bit to inuse_p instead of assignment - inuse_p is a bit set now.
1628 (pinfo::record_death): check PID_WAITING_FOR_PARENT bit instead of
1630 * select.cc (fd_pipe_map::convert_to_unix_fdset): deal with pipe
1632 (pipethread): likewise
1633 * shared.cc (create_shared_fd_table): allow any process to access
1634 shared arg, needed for sexec() family implementation
1635 * signal.cc (kill_worker): fixed a typo in debug printf
1636 * spawn.cc (spawn_guts): new hToken argument (security token of
1637 logged on user for sexec() calls implementation), added checks for
1638 zero prog_arg and argv[0], if hToken is not NULL run
1639 CreateProcessAsUser() on the current window station/desktop, or
1640 just CreateProcess() otherwise, close hToken after the process is
1642 (_spawnve): pass NULL hToken to spawn_guts().
1643 * syscalls.cc (_read): set process's read status while in a read call
1644 (_write): set process's write status while in a write call
1645 (stat_worker): if GetFileAttributes() fails, try to call fstat to
1647 * syscalls.h: include windows.h, added sexec() family functions
1649 * sysdef/i386/kernel32.def: ImpersonateLoggedOnUser - new export
1650 * tty.cc: tty attachment logic changed - tty_list::count field
1651 counts now number of tty opens, but not a number of processes,
1653 (tty_init): do not call attach_tty() in a exec'ed process
1654 (attach_tty): correct return value if !use_tty.
1655 (tty::init): initialize pgid and hwnd fields.
1656 (tty_list::terminate): clearout tty on master exit.
1657 (tty_list::allocate_tty): fixed a bug in a tty allocation.
1658 (fhandler_tty_master::init): on NT allow any process to open
1659 tty-master process for handle duplication, create synchronisation
1660 events with a world-wide access, initialize winsize structure with
1662 (fhandler_tty_slave::open): if a tty doesn't have process group set,
1663 set it to a process group of current process.
1664 (fhandler_tty_slave::write): added missed \n to debug print, tty
1665 write synchronization moved to a more correct place.
1666 (fhandler_tty_slave::read): Sleep time changed for conformance with
1668 (fhandler_tty_slave::tcsetattr): synchronization added
1669 (fhandler_tty_slave::ioctl): initialize arg.winsize with a tty-stored
1670 value, copy the result of ioctl call to winsize.
1671 (fhandler_pty_master::fstat): small fix
1672 (fhandler_pty_master::open): on NT allow any process to open
1673 pty-master process for handle duplication, initialize winsize
1674 structure with a default values.
1675 (fhandler_pty_master::read): check for pipe errors, changes to support
1677 (fhandler_pty_master::ioctl): rewritten, no longer a stub.
1678 (fhandler_pty_master::linearize/de_linearize): save/restore pktmode
1680 * tty.h (class tty): winsize - new member
1681 * utils/ps.cc: show process status just after tty number field
1682 * winsup.h: defines for new bits in inuse_p added, spawn_guts()
1685 Thu Jul 24 02:10:25 1997 Geoffrey Noer <noer@cygnus.com>
1687 patch from sos@prospect.com.ru (Sergey Okhapkin):
1688 * Makefile.in: Add tty.o to link and dependency lists, add
1689 tty.h to headers list
1690 * console.cc (fhandler_console::open): save open call flags
1691 (fhandler_console::input_tcsetattr): clear all console modes if
1693 (FakeReadFile): restart read on signal delivering, changed CTRL
1694 macro to CONTROL to avoid conflict with sys/termios.h, copy as
1695 much as possible chars to output buffer instead of call to
1696 undo_input after every char to prevent timeouts problem.
1697 * cygwin.din: srandom, ptsname, grantpt, unlockpt - new exports.
1698 * dcrt0.cc: include tty.h, new use_tty global variable.
1699 (dll_crt0_1): call events_init() on application startup, set
1700 use_tty to FALSE if CYGWIN_NOTTY environment variable is defined,
1701 do not change console title if CYGWIN_NOTITLE environment
1702 variable set, call tty_init().
1703 (_exit): call tty_terminate(), events_terminate() and others
1704 in the right order. All modifications of console title are
1705 mutexed to allow tty code to obtain console window handle right.
1706 * exceptions.cc (exception_init): initialization of signal_arrived
1707 event moved to events_init().
1708 (call_handler): raise signal arrived event after resuming main
1710 (__cygwin_exception_handler): raise signal instead of calling
1711 ctrl_c_handler, because exception handler is called in a context
1712 of the thread, caused exception, and SuspendThread in call_handler
1714 (ctrl_c_handler): clear stopsig on SIGCONT delivery, call
1715 ResumeThread until suspend count > 1, notify parent about child's
1716 status changed. Care about handling SIGCONT signal. On stop
1717 signals release vital mutexes used by stopped thread, save
1718 signal number for wait(WUNTRACED) calls, notify parent about child's
1719 status change. Do not stop processes running without job control
1720 (when pgid == 0). Ensure that main thread is unblocked before
1723 (events_terminate): new
1724 * fcntl.cc (_fcntl): use saved open flags on F_GETFL/F_SETFL instead
1725 of game with access_ variable. Is this variable longer needed?
1726 * fhandler.cc (fhandler_base::linearize/de_linearize): save/restore
1727 openflags_ variable.
1728 (fhandler_base::open): save file open flags.
1729 * fhandler.h (fhandler_base): new openflags_ member, new member
1730 functions get_flags/set_flags, new virtual functions ptsname,
1731 dup_for_fork, tcget(set)pgrp
1732 (fhandler_pipe): remove always_write/except_ready because pipes
1733 are always write ready (not true...) and selectable on read.
1734 new classes fhandler_tty_slave, fhandler_pty_master,
1736 * fork.cc (cygwin_fork_helper1): inherit control tty number on fork,
1737 call tty_init on child startup.
1738 * hinfo.cc: include stdlib.h and ctype.h.
1739 (hmap_init): take care on exec'ed processes.
1740 (init_std_file_from_handle): open /dev/tty for standard handles if
1742 (build_fhandler): check for tty slave and pty master devices.
1743 * include/exceptions.h: exception handler returns "int" (exception
1744 handling code), not "void".
1745 * include/termios.h: new defines, struct winsize must contain
1746 ws_xpixel and ws_ypixel members (commented now to avoid
1747 incompabilities with existing binaries. Should be uncommented in
1749 * net.cc (gethostbyaddr): corrected return value
1750 * passwd.cc (parse): remove trailing newline from password
1751 lines (user's shell was reported with trailing newline before).
1752 * pinfo.cc (lock_pinfo_for_update): open mutex code moved to
1753 events_init() in exceptions.cc.
1754 (destroy_pinfo_lock): removed, pinfo_mutex is now closed in
1755 events_terminate() in exceptions.cc.
1756 (init_self): the initial value for pgid must be 0 (no job-controlled
1758 * select.cc: all debug_printf's changed to select_printf.
1759 (fd_pipe_map): new class to implement (polling...) select on pipes.
1761 (cygwin32_select): comment out socket only case since generic
1762 code (select on different types of handles) works for sockets too
1763 but is interruptable. The case for always_ready_used is used now
1764 and for polling select (zero timevalue). Changes to support
1766 * shared.cc (shared_info::initialize): initialize tty table.
1767 * signal.cc (sleep/usleep/sigsuspend/pause): signal_arrived moved
1768 from u area to dll's address space, signal_arrived is manual reset
1770 (_raise): implemented as kill (self, sig).
1771 (kill_worker): new. Use SendMessage instead of PostMessage to avoid
1772 some timing problems.
1773 * spawn.cc: include tty.h.
1774 (spawn_guts) call close_all_files() on exec, call tty_terminate()
1775 before process exit. Some changes due to moving signal_arrived to
1776 dll's address space.
1777 (_spawnve): inherit control tty number on spawn.
1778 * syscalls.cc (close_all_files): reenabled. The code is ok after
1779 all! The troubles were due to incorrect usage on exec() calls.
1780 (setsid): no longer a stub
1782 * termios.cc: all syscall_printf's changed to termios_printf.
1783 (tcget(set)pgrp): rewritten, no longer a stub.
1784 * times.cc (utimes): It looks like Win32 does not allow changing
1785 times of directories, so just return success in this case.
1788 (tty_terminate): new
1792 (tty_list::terminate): new
1793 (tty_list::connect_tty): new
1794 (tty_list::free_tty): new
1795 (tty_list::init): new
1796 (tty_list::allocate_tty): new
1797 (fhandler_tty_master::fhandler_tty_master): new
1798 (create_tty_master): new
1799 (fhandler_tty_master::init): new
1802 (process_input): new
1804 (process_output): new
1805 (process_ioctl): new
1806 (fhandler_tty_slave::fhandler_tty_slave): new
1807 (fhandler_tty_slave::open): new
1808 (fhandler_tty_slave::init): new
1809 (fhandler_tty_slave::close): new
1810 (fhandler_tty_slave::write): new
1811 (fhandler_tty_slave::read): new
1812 (fhandler_tty_slave::linearize): new
1813 (fhandler_tty_slave::de_linearize): new
1814 (fhandler_tty_slave::dup): new
1815 (fhandler_tty_slave::dup_for_fork): new
1816 (fhandler_tty_slave::fstat): new
1817 (fhandler_tty_slave::tcgetattr): new
1818 (fhandler_tty_slave::tcsetattr): new
1819 (fhandler_tty_slave::tcflush): new
1820 (fhandler_tty_slave::tcsetpgrp): new
1821 (fhandler_tty_slave::tcgetpgrp): new
1822 (fhandler_tty_slave::send_ioctl_request): new
1823 (fhandler_tty_slave::ioctl): new
1824 (fhandler_pty_master::fhandler_pty_master): new
1825 (fhandler_pty_master::fstat): new
1826 (fhandler_pty_master::open): new
1827 (fhandler_pty_master::close): new
1828 (fhandler_pty_master::write): new
1829 (fhandler_pty_master::read): new
1830 (fhandler_pty_master::tcgetattr): new
1831 (fhandler_pty_master::tcsetattr): new
1832 (fhandler_pty_master::tcflush): new
1833 (fhandler_pty_master::ioctl): new
1834 (fhandler_pty_master::ptsname): new
1835 (fhandler_pty_master::linearize): new
1836 (fhandler_pty_master::de_linearize): new
1837 (fhandler_pty_master::dup_for_fork): new
1841 * utils/ps.cc: display process's control tty number.
1842 * wait.cc (wait_for_single): removed.
1843 (wait_for_any): all code moved to wait4().
1844 (wait4): rescan process table on child status changes, support for
1845 WUNTRACED flag, avoid time races on child exit, correct return
1847 * window.cc: misc changes to wait creation of process's hidden
1848 window to avoid race conditions on multiprocessor systems.
1849 * winsup.h: misc changes to support all of the above.
1851 Thu Jul 24 02:10:25 1997 Geoffrey Noer <noer@cygnus.com>
1853 * net.cc (cygwin32_shutdown): New implementation to replace
1854 stub previously present
1856 Tue Jul 22 14:59:22 1997 Geoffrey Noer <noer@cygnus.com>
1858 * cygwin.din: remove random, srandom
1859 * Makefile.in: remove random/srandom-related lines
1861 Tue Jul 22 14:10:32 1997 Ian Lance Taylor <ian@cygnus.com>
1863 * path.cc (realpath): New C function.
1864 * cygwin.din: Export realpath.
1866 * cygwin.din: Export srandom.
1868 Wed Jul 9 12:26:03 1997 Geoffrey Noer <noer@cygnus.com>
1870 * Makefile.in: libiberty random.o ends up in winsup, link
1873 Tue Jul 8 14:02:41 1997 Ian Lance Taylor <ian@cygnus.com>
1875 * libcmain.cc (main): Pass wShowWindow field from startup info to
1878 Mon Jul 7 17:47:48 1997 Geoffrey Noer <noer@cygnus.com>
1880 * path.cc: respace, reword comments
1881 * times.cc (utimes): add FIXME
1883 Tue Jun 24 18:31:27 1997 Geoffrey Noer <noer@cygnus.com>
1885 * winsup.h: adjust protos to reflect the above, add enum os_type
1886 which contains {winNT, win95, win32s, unknown}
1887 * security.cc (is_nt): Delete
1888 * syscalls.cc (windows_95): Delete
1889 (get_os_type): New local function which returns os_type. Replaces
1890 windows_95() and is_nt().
1892 * fhandler.cc: Reformat. Call get_os_type() instead of
1893 windows_95() and/or is_nt(), reorder so NT cases are first.
1896 * syscalls.cc: ditto
1899 * uname.cc (uname): call get_os_type to fill new our_os local
1900 variable, check that when filling out utsname struct, default
1901 to i386 when we can't find out the specific Intel processor
1903 * fhandler.cc (get_file_owner): remove doit variable
1904 (get_file_group): ditto
1905 * mmap.cc: extern "C" individual functions instead of wrapper
1906 around most of file.
1907 * misc.cc: minor reformat
1908 * heap.cc (_sbrk): split a = b = c statement into two to
1909 make code clearer and avoid invalid C++ casting warning during
1911 * path.cc (symlink_follow): initialize syml_p and exec_p to zero
1912 * select.cc: respace
1913 (selectthread): cast first arg of WINSOCK_FD_SET
1914 * ntea.cc (NTReadEARaw): add missing casts in front of malloc calls
1915 * utils/mount.cc: remove mixed option since that hasn't been
1916 supported for quite some time
1918 Sun Jun 22 17:27:03 1997 Ian Lance Taylor <ian@cygnus.com>
1920 * include/windows.h: If RC_INVOKED is defined, don't include
1921 limits.h, stdarg.h, Structures.h, Functions.h or Sockets.h, and
1923 * include/Windows32/Base.h: Don't do any typedefs if RC_INVOKED is
1926 * include/Windows32/Sockets.h (MAXHOSTNAMELEN): Don't define if
1928 * include/sys/param.h (MAXHOSTNAMELEN): Likewise.
1930 Fri Jun 20 11:06:09 1997 Geoffrey Noer <noer@cygnus.com>
1932 patch from sos@prospect.com.ru (Sergey Okhapkin):
1933 * include/sys/wait.h: correct operator precidence bug
1936 Thu Jun 19 12:58:45 1997 Geoffrey Noer <noer@cygnus.com>
1938 patch from sos@prospect.com.ru (Sergey Okhapkin):
1939 Handle unblocked pending signals on sig_mask changes
1940 * exceptions.cc (return_handler): renamed to set_process_mask
1941 (set_process_mask): new; use to set process mask instead of direct
1942 u->self->sig_mask manipulations.
1943 * winsup.h: rename return_handler proto to set_process_mask
1944 * signal.cc: throughout file, call set_process_mask() instead of
1945 direct manipulations of u->self->sig_mask.
1947 * cygwin.din: add pause() export
1948 * syscalls.cc (system): correct return value
1950 Wed Jun 18 22:01:56 1997 Geoffrey Noer <noer@cygnus.com>
1952 * Makefile.in: add $(srcdir)/../newlib/libc/sys/cygwin32 to
1953 the list of includes since that's where sys/dirent.h is
1955 * include/sys/dirent.h: moved to newlib/libc/sys/cygwin32/sys
1957 Wed Jun 18 13:56:47 1997 Geoffrey Noer <noer@cygnus.com>
1959 patch from sos@prospect.com.ru (Sergey Okhapkin):
1960 * signal.cc (sigsuspend): deal with pending unblocked signals
1961 * winsup.h: add proto for return_handler (sigset_t)
1963 Wed Jun 18 02:02:13 1997 Geoffrey Noer <noer@cygnus.com>
1965 respaced console.cc, fhandler.cc, syscalls.cc, pinfo.cc,
1968 Tue Jun 17 14:57:09 1997 Geoffrey Noer <noer@cygnus.com>
1970 patch from sos@prospect.com.ru (Sergey Okhapkin):
1971 * cygwin.din: add getpgid, killpg exports, delete duplicate
1973 * fork.cc (cygwin_fork_helper1): inherit pgid and sid on fork
1974 * misc.cc (cygwin32_*env): save environ value in __cygwin_environ
1975 too. Is __cygwin_environ variable really neccessary? Why not
1976 export cygwin.dll's environ variable with "__cygwin_environ" name?
1977 * pinfo.cc (pinfo::init_self): initialize pgid and sid
1978 * signal.cc (kill_worker): new
1979 (_kill): rewritten to support process groups
1981 * spawn.cc (_spawnwe): inherit pgid and sid on spawn family calls
1982 * stubs.cc (setpgrp, getpgrp): remove stubs
1983 * syscalls.cc (setpgid, getpgid, setpgrp, getpgrp): new
1984 * termios.cc (setpgid): remove stub
1985 * utils/ps.cc (main): add pgid to output, change output
1987 * wait.cc (wait_for_any): add intpid argument, arrays ctable and
1988 ptable have now fixed MAXIMUM_WAIT_OBJECTS size to avoid extra
1989 scan of process table, changes for process groups support.
1990 (wait4): misc changes to support process groups
1991 * winsup.h (pinfo class): add new variables pgid, sid.
1992 Define __cygwin_environ.
1994 Mon Jun 16 18:30:21 1997 Geoffrey Noer <noer@cygnus.com>
1996 patch from sos@prospect.com.ru (Sergey Okhapkin):
1997 * spawn.cc (spawn_guts): set child->hProcess and child->hThread,
1998 CloseHandle on pi.hThread at end of spawn_guts instead of right
1999 after starting the child process,
2000 _P_WAIT needs to be handled separately from _P_OVERLAY
2002 Sun Jun 15 23:51:10 1997 Geoffrey Noer <noer@cygnus.com>
2004 patch from sos@prospect.com.ru (Sergey Okhapkin):
2005 * cygwin.din: remove setenv/getenv-related exports,
2006 export cygwin32_ equivalents
2008 * misc.cc (cygwin32_getenv): new
2009 (cygwin32_putenv): new
2010 cygwin32_setenv): new
2011 (cygwin32_unsetenv): new
2012 * spawn.cc: call cygwin32_getenv instead of getenv,
2013 call spawn with *u->envptr instead of environ
2014 * winsup.h: define **environ as extern, define *cygwin32_getenv
2016 Sun Jun 15 20:51:09 1997 Geoffrey Noer <noer@cygnus.com>
2018 patch from sos@prospect.com.ru (Sergey Okhapkin):
2019 * Makefile.in: add ../libiberty/random.o to EXTRA_OFILES
2020 * cygwin.din: remove exports of tgetent and _tgetent, added random
2021 * exception.cc (exceptions_init): make OurThread handle
2022 noniherittable, remove unused buf array.
2023 (return_handler): add restmask argument (sig_mask value before
2024 calling signal handler)
2025 (call_handler): save sig_mask in user's stack before calling signal
2026 handler, change PulseEvent() call to SetEvent() -- there were
2027 losses of signal_arrived events if main thread was not in wait
2029 (ctrl_c_handler): add support for SIGIO signal.
2030 * fhandler.cc (fhandler_base::linearize/delinearize):
2031 save/restore async_ flag
2032 (fhandler_base::fhandler_base): clear async_ flag
2033 * fhandler.h: add async_ as new variable in fhandler_base,
2034 add get_async/set_async functions
2035 * misc.cc (tgetent): remove stub
2036 * net.cc (fhandler_socket::write): raise SIGPIPE if write to
2037 disconnected socket.
2038 (cygwin32_accept): check the result of find_unused_handle() before
2039 accept() call, set errno if no more file descriptors available.
2040 (fhandler_socket::ioctl): add support for async I/O on sockets
2041 * pinfo.cc (pinfo::clearout): clear sig_pending mask
2042 * syscalls.cc (readv, writev): rewrite
2043 * window.cc (WndProc): add support for async I/O
2044 * winsup.h: define WM_ASYNCIO
2046 Mon Jun 9 18:51:09 1997 Geoffrey Noer <noer@cygnus.com>
2048 * include/winsock.h: fix protection wrapper name
2050 Fri Jun 6 12:41:09 1997 Ian Lance Taylor <ian@cygnus.com>
2052 * include/Windows32/Defines.h: Define CommonDlgExtendedError
2053 return values (CDERR_*, PDERR_*, CFERR_*, FNERR_*). Define
2054 TEXTMETRIC tmPitchAndFamily values (TMPF_*).
2056 * include/dlgs.h: New file; just includes windows.h.
2057 * include/cderr.h: Likewise.
2059 * libcmain.cc (main): Don't pass the program name to WinMain.
2061 * cygwin.din: Export strlwr and strupr.
2063 * include/winreg.h: New file; just includes windows.h.
2064 * include/winsock.h: New file; just includes windows.h and
2065 Windows32/Sockets.h.
2066 * include/Windows32/Sockets.h: Don't define u_char, et. al. if
2067 _SYS_TYPES_H is defined. Undefine fd_set if it is defined.
2069 * include/Windows32/Functions.h: Define MoveMemory, FillMemory,
2070 and ZeroMemory as macros.
2072 * times.cc (_timezone, _daylight, _tzname): New global variables.
2073 (tzset): New function.
2074 * cygwin.din: Don't set _timezone to timezone. Export tzset and
2075 _tzset. Export _timezone, _daylight, and _tzname.
2077 * dcrt0.cc (__cygwin_environ): New global variable.
2078 (dll_crt0_1): Set __cygwin_environ to environ.
2079 * cygwin.din: Export __cygwin_environ.
2081 Thu Jun 5 17:52:02 1997 Ian Lance Taylor <ian@cygnus.com>
2083 * times.cc (gettimeofday): Check return values and set tz_dsttime
2086 Wed Jun 4 00:04:33 1997 Geoffrey Noer <noer@cygnus.com>
2088 * fhandler.cc (fhandler_pipe::lseek): new virtual function
2089 * fhandler.h: add lseek to fhandler_pipe class
2091 Tue Jun 3 19:20:47 1997 Ian Lance Taylor <ian@cygnus.com>
2093 * include/Windows32/Defines.h (IMAGE_DOS_SIGNATURE): Define.
2094 (IMAGE_NT_SIGNATURE): Define.
2095 * include/Windows32/Structures.h (IMAGE_DOS_HEADER): Define.
2097 Tue Jun 3 13:05:26 1997 Geoffrey Noer <noer@cygnus.com>
2099 * console.cc: respace
2100 * fhandler.h: add virtual off_t lseek to fhandler_socket and
2101 fhandler_tty defs, respacing
2103 Mon Jun 3 12:21:20 1997 Geoffrey Noer <noer@cygnus.com>
2105 patch from sos@prospect.com.ru (Sergey Okhapkin):
2106 * cygwin.din: export wait3, wait4
2107 * dcrt0.cc (_exit): call fill_rusage
2108 * exceptions.cc (ctrl_c_handler): increment rusage_self.ru_nsignals++
2109 * fhandler.cc (fhandler_pipe::fhandler_pipe): new stub
2110 * fhandler.h: add fhandler_pipe class
2111 * hinfo.cc (hinfo_vec::build_fhandler): call
2112 GetNumberOfConsoleInputEvents instead of GetConsoleScreenBufferInfo,
2113 handle fhandler_pipe class
2114 * pinfo.cc: include sys/resource.h,
2115 (pinfo::clearout): erase memory associated with rusage_self
2117 * resource.cc (getrusage): rewrite
2118 (add_timeval): new helper function
2119 (add_rusage): new helper function
2120 (fill_rusage): new helper function
2121 * shared.cc (create_shared_fd_table): pass file mapping handle to
2122 children letting them close it
2123 * spawn.cc (spawn_guts): call fill_rusage and add_rusage as
2126 * times.cc (__to_clock_t): add flag arg which says whether or not
2127 to substract FACTOR from total
2128 (times): also fill in tms_cstime and tms_cutime, add flag arg to
2130 (totimeval): add extra flag passed on to __to_clock_t
2131 (gettimeofday): add extra flag passed on to totimeval
2132 * wait.cc (wait_for_single): add extra rusage arg, change
2133 wait_found calls to account for extra arg
2134 (wait_for_any): ditto
2135 (_wait): call wait4 instead of waitpid
2136 (wait_found): add rusage arg, deal with it calling add_rusage as
2138 (wait_pid): now just calls wait4
2139 (wait4): was wait_pid but adds extra rusage arg and deals with it
2140 (wait3): new, calls wait4
2141 * winsup.h: include sys/resource.h, add rusage_self and
2142 rusage_children to pinfo class, fix totimeval proto, add protos
2143 for fill_rusage and add_rusage
2144 * passwd.cc: include termios.h
2146 * stubs.cc (getpass): delete old stub
2148 Tue Jun 3 14:51:47 1997 Ian Lance Taylor <ian@cygnus.com>
2150 * times.cc (ftime): New function.
2151 * cygwin.din: Export ftime.
2153 Mon Jun 2 14:34:00 1997 Geoffrey Noer <noer@cygnus.com>
2155 patch from sos@prospect.com.ru (Sergey Okhapkin):
2156 * include/limits.h: NGROUPS_MAX should be 0
2157 * include/asm/socket.h: add missing additional options
2158 including SO_SNDBUF, SO_RCVBUF, et al
2159 * include/sys/wait.h: include sys/resource.h, add protos for
2160 wait3() and wait4().
2162 Mon Jun 2 15:26:35 1997 Ian Lance Taylor <ian@cygnus.com>
2164 * utils/configure.in: Call AC_PROG_INSTALL.
2165 * utils/configure: Rebuild.
2167 Mon Jun 2 11:44:14 1997 Geoffrey Noer <noer@cygnus.com>
2169 * grp.cc (getgroups): new
2170 * cygwin.din: export getgroups
2172 Fri May 30 16:47:38 1997 Geoffrey Noer <noer@cygnus.com>
2174 * uname.cc (uname): completely rewrite, using more of the
2175 SYSTEM_INFO struct to figure out information (now x86 type is
2176 set correctly in Windows 95.
2177 * version.h: increment CYGWIN_DLL_VERSION_MINOR
2178 * include/Windows32/Structures.h: SYSTEM_INFO struct's first
2179 member is dwOemId, not dwOemID according to MS docs
2181 Fri May 30 16:47:38 1997 Geoffrey Noer <noer@cygnus.com>
2183 patch from sos@prospect.com.ru (Sergey Okhapkin):
2184 * window.cc: new file
2185 * Makefile.in: add window.cc to lists of source, object files,
2187 * console.cc: include <stdlib.h>, scroll_screen() added to
2188 fhandler_console class,
2189 add support for default screen attributes,
2190 (open): set default_color on tty open
2191 (linearize/delinearize): pass default_color to the child process
2192 (clear_screen): fix Win95-specific bug, add support for
2194 (clear_to_eol): remove
2195 (fhandler_console::fhandler_console): set default_color to
2197 (char_command): add invisible screen attribute, misc changes
2198 (FakeReadFile): do not convert AltGr-char to ESC-char sequence
2199 to support international keyboards.
2200 * cygwin.din: export setitimer, getitimer
2201 * dcrt0.cc (dll_crt0_1): add call to window_init(), uppercase
2202 environment vars only if started by a win32 process.
2203 (_exit): add call to window_terminate()
2204 * fhandler.cc: add mode argument to open() calls,
2205 (fhandler_base::open): do not check for symlink in path_conv
2206 calls, calls to set/get_file_attribute() instead of NTRead/WriteEA.
2207 (fhandler_base::fstat): use get_file_attribute if possible
2208 (fhandler_disk_file::open): remove unneeded unixattr checks
2209 * fhandler.h: changes to support above.
2210 * fork.cc (cygwin_fork_helper_1): pass umask value to the child,
2211 call window_init() in child
2212 * ntea.cc: enable EA calls, add FILE_FLAG_BACKUP_SEMANTICS
2213 to CreateFile calls to support EA of directories.
2214 * path.cc (symlink): add mode argument to _open call, remove
2216 (symlink_check_worker): add checks for "system" attribute and EA.
2217 * security.cc (get/set_file_attribute): new. Calls EA code now,
2218 placeholders for NTFS security support.
2219 * signal.cc (alarm): remove in favor of new implementation in
2221 (RemoteThread): remove
2222 (_kill): use window messages to emulate signals on both NT and Win95
2223 * spawn.cc (spawn_guts): call window_terminate on exec()
2224 (cwait): correct return result code
2225 (_spawnve): add umask inheritance, some bug fixes
2226 * syscalls.cc (_open): add mode argument, umask support
2228 (chmod): try to set file attributes, set system bit on symlinks
2229 (stat_worker): fix nlinks of directories, add mode argument
2231 * syscalls.h: add mode argument to _open() prototype
2232 * winsup.h: changes to support above
2234 Tue May 27 12:22:19 1997 Geoffrey Noer <noer@cygnus.com>
2236 * times.cc (gettimeofday): return 0 on success instead of 1
2237 (utimes): init res to 0
2239 Wed May 21 11:29:24 1997 Geoffrey Noer <noer@cygnus.com>
2241 * include/limits.h: define NGROUPS_MAX
2243 Tue May 20 14:13:59 1997 Geoffrey Noer <noer@cygnus.com>
2245 * passwd.cc: rename function setpwend to setpwent (typo)
2246 * cygwin.din: ditto, also remove name__C9type_info from
2249 Wed May 14 17:38:39 1997 Geoffrey Noer <noer@cygnus.com>
2251 patch from sos@prospect.com.ru (Sergey Okhapkin):
2252 * signal.cc (sleep): call WaitForSingleObject instead of Sleep
2255 Wed May 7 15:34:07 1997 Geoffrey Noer <noer@cygnus.com>
2257 Public gnu-win32 beta 18 release made
2259 Sun May 4 15:34:07 1997 Geoffrey Noer <noer@cygnus.com>
2261 patch from Mikey <jeffdb@netzone.com>:
2262 * console.cc (FakeReadFile): FlushConsoleInputBuffer if
2263 flags & ENABLE_LINE_INPUT and then return ReadFile
2265 Fri May 2 10:53:10 1997 Geoffrey Noer <noer@cygnus.com>
2267 * signal.cc: make exported functions extern "C"
2268 * include/cygwin32/socket.h: replace values assigned to
2269 IP_ definitions with ones suitable for use with WinSock.
2270 * cygwin.din: add exports for sigpending, sigsuspend, remove
2271 exports for __9type_infoPCc and before__9type_infoRC9type_info
2272 * winsup.h: remove signal-related protos from winsup.h in favor
2273 of newlib/libc/include/sys/signal.h
2275 patch from sos@prospect.com.ru (Sergey Okhapkin):
2276 * signal.cc: (sigpending) new
2278 * utils/termcap: replace with one from Linux
2280 Tue Apr 29 19:03:29 1997 Geoffrey Noer <noer@cygnus.com>
2282 * utils/ps.cc: print Win32 pid as unsigned int so Windows 95
2283 pids don't show up as negative values
2285 Tue Apr 29 17:20:57 1997 Geoffrey Noer <noer@cygnus.com>
2287 patch from sos@prospect.com.ru (Sergey Okhapkin):
2288 * spawn.cc (spawn_guts): allocate new cygwin PID for a child
2289 created with spawn(!_P_OVERLAY)
2291 Tue Apr 29 13:24:59 1997 Geoffrey Noer <noer@cygnus.com>
2293 patch from sos@prospect.com.ru (Sergey Okhapkin):
2294 * console.cc: assorted console fixes
2295 * select.cc (fd_socket_map::convert_to_unix_fdset): only
2296 do full debug_printf if used_ valid
2297 * exceptions.cc: correct constants used for checking size of
2298 stack (should be negated)
2299 * fhandler.cc (fhandler_base::open): fix syscall_printf typo
2301 patch from marcus@cathcart.sysc.pdx.edu (Marcus Daniels):
2302 * include/sys/mman.h: define MAP_ANON MAP_ANONYMOUS (typo fix)
2304 Mon Apr 28 15:19:44 1997 Geoffrey Noer <noer@cygnus.com>
2306 * cygwin.din: remove libgcc2.a internal functions
2308 Mon Apr 28 14:57:04 1997 Michael Meissner <meissner@cygnus.com>
2310 * cygwin.din (before__9type_infoRC9type_info): Remove, the
2311 type_info::before(type_info const &) function no longer seems to
2314 Mon Apr 28 14:19:44 1997 Geoffrey Noer <noer@cygnus.com>
2316 patch from sos@prospect.com.ru (Sergey Okhapkin):
2317 * console.cc (undo_input): new
2318 (scroll_screen): new
2319 (fhandler_console::output_tcsetattr): fix debug printf
2320 (fhandler_console::input_tcsetattr): no longer call set_w_binary
2321 (fhandler_console::cursor_get): fix base_chars
2322 (fhandler_console::char_command): make savex, savey globals,
2323 add char buf, add code to handle clears better, many other
2325 (fhandler_console::write_normal): assorted fixes
2326 (fhandler_console::write): move screen scroll code to
2327 scroll_screen(), support Reset Linux terminal, Restore cursor
2328 position, Save cursor position, Skip orig_colors
2329 (FakeReadFile): enlarge keytable to include shift/control/alt
2331 Command set still missing set pelette, character sets, and
2334 Mon Apr 28 12:19:44 1997 Geoffrey Noer <noer@cygnus.com>
2336 * fhandler.cc (fhandler_base::open): only include
2337 FILE_SHARE_DELETE in shared when running NT (Win 95 doesn't
2340 Thu Apr 24 18:57:21 1997 Geoffrey Noer <noer@cygnus.com>
2342 patch from Jeremy Allison <jra@cygnus.com>:
2343 Correct problem caused by setting /dev/null fd to -1 which is
2344 same as INVALID_HANDLE_VALUE.
2345 * fhandler.h: set DEV_NULL_HANDLE_VALUE to -2
2346 * fhandler.cc (fhandler_dev_null::open): set handle to
2347 DEV_NULL_HANDLE_VALUE instead of INVALID_HANDLE_VALUE
2348 * hinfo.cc (hinfo_vec::build_fhandler): add case for
2349 handle == (HANDLE) DEV_NULL_HANDLE_VALUE
2351 Thu Apr 24 15:12:13 1997 Geoffrey Noer <noer@cygnus.com>
2353 * fhandler.cc (fhandler_base::write): catch return of raw_write
2354 and return -1 if it failed
2356 Thu Apr 24 10:42:01 1997 Geoffrey Noer <noer@cygnus.com>
2358 path.cc (symlink): restore chmod call for now since the NTEA code
2359 isn't quite up to the task yet.
2361 patch from sos@prospect.com.ru (Sergey Okhapkin):
2362 * exceptions.cc (ctrl_c_handler): corrections to Apr 18 patch
2363 * fhandler.cc: ditto
2364 * dcrt0.cc (dll_crt0_1): move console title setting code,
2365 set up default signal handlers
2366 * fork.cc (cygwin_fork_helper1): also set child->sigs and
2368 * spawn.cc (spawn_guts): if mode _P_OVERLAY, set up child
2371 Mon Apr 21 22:29:49 1997 Geoffrey Noer <noer@cygnus.com>
2373 * include/Windows32/ASCIIFunctions.h: remove old def of
2374 GetEnvironmentStringsA, add new one based on def from Functions.h
2375 * include/Windows32/Functions.h: define GetEnvironmentStrings as
2376 GetEnvironmentStringsA when not unicode, remove definition of
2377 GetEnvironmentStrings in favor of ones in ASCIIFunctions.h and
2379 * include/Windows32/Defines.h: add missing XTYP_ definitions,
2380 change value of XTYPF_NOBLOCK to 0x0002 from 0x2
2381 * include/Windows32/Sockets.h: comment out redefinitions of
2382 errno.h-type constants since MS doesn't define them and we
2383 have our own in errno.h
2385 Fri Apr 18 10:40:30 1997 Geoffrey Noer <noer@cygnus.com>
2387 * include/Windows32/Structures.h: add typedefs for
2388 LPDLGITEMTEMPLATE, PDLGITEMTEMPLATE.
2389 * include/Windows32/Defines.h: define FW_REGULAR FW_NORMAL
2391 patch from sos@prospect.com.ru (Sergey Okhapkin):
2392 * exceptions.cc (ctrl_c_handler): do not reset signal
2393 handler to SIG_DFL while processing the signal, instead
2394 block the signal while handler executes.
2395 * signal.cc (_raise): fixes related to the above
2397 Thu Apr 17 23:50:50 1997 Geoffrey Noer <noer@cygnus.com>
2399 * path.h: increase path length in mount table to MAX_PATH
2400 in size instad of 30. This will increase cygwin.dll memory
2401 usage by 20K. We need to remove static allocations from
2404 Thu Apr 17 10:11:50 1997 Geoffrey Noer <noer@cygnus.com>
2406 patch from sos@prospect.com.ru (Sergey Okhapkin):
2407 * exceptions.cc (ctrl_c_handler): CTRL_CLOSE_EVENT should
2408 generate SIGHUP instead of SIGQUIT
2409 * signal.cc (_raise): rewrite
2411 Wed Apr 16 10:42:46 1997 Geoffrey Noer <noer@cygnus.com>
2413 * version.h: increment CYGWIN_DLL_VERSION_MINOR
2414 * syscalls.cc (system): use spawnvp instead of fork/exec
2415 * ntea.cc: make all functions return false for now; they
2416 were causing an obscene performance hit
2418 patch from sos@prospect.com.ru (Sergey Okhapkin):
2419 * console.cc (FakeReadFile): patch to support EINTR, EIO
2420 * exceptions.cc: add support for return_handler, remove
2422 (return_handler): new
2423 (ctrl_c_handler): handle SIGCHLD, other assorted fixes
2424 * fhandler.cc (fstat): reset errno to 0
2425 * passwd.cc (search_for): correct location of a debug printf
2426 * select.cc: patches to handle signals better, respacing
2427 * signal.cc (_raise): misc fixes
2428 (_kill): call OpenProcess with PROCESS_ALL_ACCESS instead of
2430 * spawn.cc: more signal fixes
2431 * syscalls.cc: add two new errors to errmap[]
2432 (_stat_worker): fill out buf struct when stating directories
2433 * wait.cc (wait_for_single): use INFINITE instead of large value
2435 (wait_for_any): init nprocinfo to 1, not 0, other small fixes
2436 * winsup.h: add signal_arrived to per_process class, reduce
2437 amount of reserved space, add sig_pending to pinfo class
2439 Tue Apr 15 17:01:34 1997 Geoffrey Noer <noer@cygnus.com>
2441 * utils/mkpasswd.c: change default shell to /bin/sh
2443 patch from sos@prospect.com.ru (Sergey Okhapkin):
2444 * utils/kill.cc: support sending numbered signals using
2445 signal code instead of just calling TerminateProcess
2447 Tue Apr 15 15:24:55 1997 Ian Lance Taylor <ian@cygnus.com>
2449 * utils/Makefile.in (INSTALL): Set to @INSTALL@.
2450 (INSTALL_PROGRAM): Set to @INSTALL_PROGRAM@.
2451 (INSTALL_DATA): Set to @INSTALL_DATA@.
2452 (INSTALL_XFORM): Remove.
2453 (install): Depend upon installdirs. Use $(program_transform_name)
2454 directly, rather than using $(INSTALL_XFORM).
2455 (installdirs): New target.
2457 Mon Apr 14 16:32:05 1997 Ian Lance Taylor <ian@cygnus.com>
2459 * utils/Makefile.in (INSTALL): Change install.sh to install-sh.
2461 Mon Apr 14 12:33:22 1997 Geoffrey Noer <noer@cygnus.com>
2463 * registry.cc: change key name to "Cygnus Solutions" instead
2465 * security.cc: don't include windows.h, already in winsup.h
2466 * Makefile.in: add dependencies section entries for security.cc
2469 Fri Apr 11 00:03:49 1997 Geoffrey Noer <noer@cygnus.com>
2471 * dcrt0.cc: add harmless cast to FreeEnvironmentStrings call
2472 * registry.cc: added more presumed-harmless casts
2473 * shared.cc: and another, and respacing
2474 * utils/Makefile.in: don't need to link with -lkernel32 since it's
2475 included automatically
2476 * fhandler.cc: fhandler_console and FakeReadFile moved to
2477 console.cc, stop including sys/stat.h, sys/param.h, sys/types.h,
2478 stdio.h, ctype.h, pwd.h, grp.h, stdlib.h
2479 reordered/respaced code so now we have all of fhandler_base, then
2480 all of fhandler_disk_file, then all of fhandler_tty, etc...
2481 (fhandler_base::ioctl): delete unused switch statement
2482 * console.cc: added fhandler_console and FakeReadFile from
2483 fhandler.cc, add includes necessary for this code
2484 * grp.cc, Makefile.in: fix copyright dates
2485 * ntea.cc: include string.h
2487 Thu Apr 10 22:00:43 1997 Geoffrey Noer <noer@cygnus.com>
2489 patch from sos@prospect.com.ru (Sergey Okhapkin):
2490 * path.cc (symlink): do NTWriteEA instead of chmod using same
2493 Thu Apr 10 17:36:43 1997 Geoffrey Noer <noer@cygnus.com>
2495 patch from gunther.ebert@ixos-leipzig.de (Gunther Ebert):
2496 * Makefile.in: add libnetapi32.a to DLL_IMPORTS list, build security.o
2497 * fhandler.cc (get_file_owner): new
2498 (get_file_group): new
2499 (fhandler_base::fstat): do another path_conv and check for error,
2500 use get_file_owner and get_file_group to set buf->st_uid and
2502 * fhandler.h: add protos for get_file_owner() and get_file_group()
2503 * grp.cc (add_grp_line): new helper function
2504 (read_etc_group): new helper function
2505 (getgrgid): rewritten, no longer a stub
2506 (getgrnam): rewritten, no longer a stub
2507 (endgrent): rewritten, no longer a stub
2508 (getgrent): rewritten, no longer a stub
2509 * include/Windows32/ASCIIFunctions.h, include/Windows32/Base.h,
2510 include/Windows32/Functions.h, include/Windows32/Defines.h,
2511 include/Windows32/Structures.h, include/Windows32/UnicodeFunctions.h:
2512 misc security/uid-related additions
2513 * passwd.cc (add_pwd_line): new
2514 (read_etc_passwd): new
2515 (search_for): rewrite
2516 (setpwend): rewritten, no longer a stub
2517 (getpwent): rewritten, no longer a stub
2518 (endpwent): rewritten, no longer a stub
2519 * security.cc: new file
2520 (get_world_sid): new
2521 (world_full_access): new
2522 (get_id_from_sid): new
2524 * stubs.cc (endgrent): remove
2526 * syscalls.cc (rel2abssd): new
2527 (set_process_privileges): new
2528 (chown): now implemented for real for NT, still a stub in Win95
2529 (_stat_worker): use get_file_owner and get_file_group to set
2530 buf->st_uid and buf->st_gid
2531 * uinfo.cc: add protos for read_etc_passwd, read_etc_group
2532 (uinfo_init): call read_etc_passwd(), read_etc_group()
2533 * utils/Makefile.in: build mkpasswd, mkgroup
2534 * utils/mkgroup.c: new, use to make an /etc/group file
2535 * utils/mkpasswd.c: new, use to make an /etc/passwd file
2536 * winsup.h: add protos for is_nt(), get_id_from_sid()
2538 patch from sos@prospect.com.ru (Sergey Okhapkin):
2539 * Makefile.in: build ntea.o
2540 * dcrt0.cc (dll_crt0_1): move console title code here from spawn_guts
2541 * exceptions.cc (ctrl_c_handler): small signal fixes, prepare
2542 things so we can eventually reset the signal handler to SIG_DFL
2543 * fhandler.cc (fhandler_disk_file::open): first check for EA info
2544 about exec/symlink status before doing it the hard way
2545 (fhandler_make_pipe): u->self->hmap.build_fhandler takes extra arg
2546 (fhandler_base::open): make use of NTEA
2547 * fhandler.h: remove init_std_file_from_handle, build_fhandler
2549 * hinfo.cc: include mywinsock.h and sys/socket.h, define
2550 __INSIDE_CYGWIN_NET__, __INSIDE_CYGWIN32__
2551 (hinfo_vec::build_fhandler): takes an additional handle arg,
2552 call GetConsoleScreenBufferInfo with it to see if are
2553 fhandler_console, call GetCommState with it to see if we're
2554 an fhandler_tty, call getpeername with it to see if we wamt
2555 fhandler_socket. Old determining methods still work too.
2556 * path.cc (symlink): chmod file to ((S_IFLNK) | (STD_RBITS) |
2557 (STD_WBITS) | (STD_XBITS)) permissions
2558 * select.cc: include stdio.h
2559 (cygwin32_select): fix typo (missing an &),
2560 assorted fixes for mixed socket/handles case
2561 * shared.cc (create_shared_fd_table): set sa.bInheritHandle to 1
2562 to support reparenting
2563 * signal.cc (_kill): add FIXME, cleanup return codes
2564 * spawn.cc (spawn_guts): remove console title code, add code
2565 to support reparenting of child processes
2566 * syscalls.cc: add new third arg to hmap.build_fhandler calls
2567 (chmod): make use of NTWriteEA
2568 * ntea.cc: new file, NTEA handling routines
2569 * times.cc: fix value of NSPERSEC
2570 (utimes): fix return value
2571 * wait.cc: changes to support reparenting, change INFINITE to
2572 constant 500 to avoid "blocking win32 syscalls and signals"
2574 * winsup.h: add NTReadEA, NTWriteEA protos, define REPARENTING,
2575 fix build_fhandler proto to add new arg, add handles hrProcess and
2578 Tue Apr 9 00:25:33 1997 Geoffrey Noer <noer@cygnus.com>
2580 * libcerr.cc: remove fixed size of sys_errlist array, figure out
2581 sys_nerr from the sizeof the array rather than hard coding it.
2582 * shared.cc (open_shared_file_map): add typecast
2583 * signal.cc (_kill): SIGKILL should avoid exception handler
2584 * fork.cc (cygwin_fork_helper1): don't call ExitProcess with a
2585 negative arg on recreate_mmaps_after_fork failure
2586 * include/Windows32/Defines.h: define VER_PLATFORM_WIN32_WINDOWS
2588 patch from sos@prospect.com.ru (Sergey Okhapkin):
2589 * dcrt0.cc: move reent_data from private address space to cygwin.dll
2590 * fork.cc: copy parent's reent_data to the child
2591 * cygwin.din: export reent_data
2592 * winsup.h: add as public struct _reent reent_save to pinfo class
2594 another patch from sos@prospect.com.ru (Sergey Okhapkin):
2595 * winsup.h: add ctrl_c_handler prototype
2596 * exceptions.cc (init_exceptions): don't use u->self->hThread
2597 since for a spawned process, this contains thread id of parent
2598 Win32 process, not the child's. Instead use GetCurrent* funcs
2599 to get thread handle.
2600 (ctrl_c_handler): add more signal support, especially for kill
2601 * signal.cc (_kill): more signal support, using CreateRemoteThread
2602 under NT. Win95 only supports SIGKILL since it doesn't have this
2604 * syscalls.cc (windows_95): first version check should be an &
2605 of 0x80000000 instead of 0x8000000
2606 (close_all_files): hmap[i] doesn't always exist, for now comment
2609 patch from marcus@sysc.pdx.edu (Marcus Daniels):
2610 * path.cc (skip_n_slashes): new local function
2611 (symlink_check_worker): new local function, used to be symlink_check
2612 (symlink_check): calls symlink_check_worker and returns
2613 whether path is a symlink or not.
2614 (symlink_expand): new local function, expand a symlink into
2615 a file or directory path using symlink_check_worker
2616 (path_conv::path_conv): takes extra follow_mode arg
2617 (symlink_follow): call symlink_expand
2618 * fhandler.cc, syscalls.cc: fix path_conv references
2619 * path.h: fix path_conv prototype
2621 Mon Mar 24 19:44:28 1997 Geoffrey Noer <noer@cygnus.com>
2623 patch from sos@prospect.com.ru (Sergey Okhapkin):
2624 * select.cc: fix Feb 19 patch to select
2625 * syscalls.cc: add statfs() and fstatfs() calls
2626 * include/sys/vfs.h: new header file to support these
2627 * cygwin.din: add them to dll export list
2629 Tue Mar 18 18:10:24 1997 Geoffrey Noer <noer@cygnus.com>
2631 * dcrt0.cc: change idata3 asm section to have five null fields
2632 instead of eight to conform to how MS does this section.
2634 Sun Mar 9 13:10:55 1997 Geoffrey Noer <noer@cygnus.com>
2636 * include/sys/resource.h: add missing struct members to rusage struct
2637 * resource.cc: added setting of missing fields, mostly to 0 until
2638 we investigate how to set correct values.
2640 Wed Feb 19 17:44:06 1997 Jeremy Allison <jra@cygnus.com>
2642 * select.cc: Added fixes from sos@prospect.com.ru (Sergey Okhapkin)
2643 to implement blocking select on sockets/handles. This isn't
2644 the way I finally want to do this, but I won't get chance
2645 to do the re-write for a month or two so...
2646 * include/Windows32/Defines.h: Added defines for NT ACL
2649 Tue Feb 18 12:28:11 1997 Geoffrey Noer <noer@cygnus.com>
2651 patch from sos@prospect.com.ru (Sergey Okhapkin):
2652 * fhandler.cc: support reverse index escapes in console code
2654 Fri Feb 14 18:55:01 1997 Jeremy Allison <jra@cygnus.com>
2656 * path.cc: Fixed normalize_posix_path() so that double slashes
2657 are removed, except for those starting a UNC path. The command
2658 ls .///////FILE_IN_DIRECTORY works now.
2660 Thu Feb 13 14:06:04 1997 Geoffrey Noer <noer@cygnus.com>
2662 * path.cc: remove SLASH_P define and
2663 * winsup.h: define it here instead
2664 patch from scottk@utig.ig.utexas.edu (Scott Kempf):
2665 dirsearch.cc (opendir): fix problem with accessing "/"
2667 Mon Feb 10 13:57:11 1997 Geoffrey Noer <noer@cygnus.com>
2669 patch from sos@prospect.com.ru (Sergey Okhapkin):
2670 * misc.cc: replace nice () stub with Win32 implementation
2672 * fork.cc: use priority returned by GetPriorityClass
2674 Wed Feb 5 16:56:23 1997 Geoffrey Noer <noer@cygnus.com>
2676 * fhandler.cc, syscalls.cc: minor reformat
2677 patch from sos@prospect.com.ru (Sergey Okhapkin):
2678 * spawn.cc: set console title to reflect what's running
2679 * winsup.h: TITLESIZE define added
2681 Mon Feb 3 16:53:10 1997 Geoffrey Noer <noer@cygnus.com>
2683 * fhandler.h: fix typo
2684 * fhandler.cc: check_execable_p should only take one arg now
2686 Mon Feb 3 16:16:39 1997 Jeremy Allison <jra@cygnus.com>
2688 * fhandler.cc: Removed open_helper, turned it into
2689 fhandler_base::open and added fhandler_disk_file::open. More
2691 fhandler_disk_file: Moved check_execable_p into fhandler_disk_file.
2692 tty ports are now closed correctly.
2693 * fhandler.h: Changes to support the above.
2695 Fri Jan 31 19:14:34 1997 Geoffrey Noer <noer@cygnus.com>
2697 * fhandler.cc (fhandler_base::open_helper): new function
2698 containing the common open() code. symlink and executable
2699 status defaults to 0.
2700 (fhandler_tty::open): new function that calls
2701 fhandler_base::open_helper
2702 (fhandler_base::open): remove common code now in open_helper,
2703 leaving symlink checking and executable checking
2704 * fhandler.h: changes for the above, open_helper is protected
2706 Thu Jan 30 15:23:15 1997 Geoffrey Noer <noer@cygnus.com>
2708 * hinfo.cc: also treat com3 and com4 as special files
2709 * spawn.cc (spawn_guts): check return of WaitForSingleObject
2710 in _P_WAIT case, some reformatting
2712 Tue Jan 28 10:46:16 1997 Jeremy Allison <jra@cygnus.com>
2714 * net.cc: Added errors "WSAEINVAL", "WSAEFAULT" as these
2715 can be returned for net calls.
2716 * fhandler.cc: Added FILE_SHARE_DELETE to open share modes.
2717 Much closer to POSIX on NT now (ignored on '95).
2719 Fri Jan 17 13:32:26 1997 Geoffrey Noer <noer@cygnus.com>
2722 * utils/configure.in: define LIB_AC_PROG_CC to get around
2723 autoconf 1.12 problem. Invoke it instead of AC_PROG_CC.
2725 * utils/configure: regenerate
2727 Thu Jan 16 12:35:41 1997 Geoffrey Noer <noer@cygnus.com>
2729 * mmap.cc: added missing copyright notice
2731 Tue Jan 14 12:51:12 1997 Jeremy Allison <jra@cygnus.com>
2733 * cygwin.din: Added get_osfhandle, cwait and all the
2735 * exec.cc: Added include of process.h. Changed call to
2736 spawn_guts to add extra parameter.
2737 * libcerr.cc: Added extra error messages. Ensured
2738 messages start at zero.
2739 * spawn.cc: Changed spawn_guts to do wait and nowait
2740 calls. Added all spawn functions.
2741 * syscalls.cc: Added get_osfhandle.
2742 * winsup.h: Removed incorrect spawn definitions,
2743 corrected prototypes for spawn_guts and file_exists
2745 * include/io.h: New file. Added for get_osfhandle.
2747 Thu Jan 9 14:20:01 1997 Jeremy Allison <jra@cygnus.com>
2749 * exceptions.h: Moved from winsup to winsup/include.
2750 * include/mywinsock.h: Added getprotobynumber and
2752 * Makefile.in: Moved exceptions.h dependency.
2753 * cygwin.din: Added cygwin32_getprotobynumber and
2754 cygwin32_getservbyport.
2755 * net.cc: Added cygwin32_getprotobynumber and
2756 cygwin32_getservbyport.
2758 Wed Jan 8 14:15:35 1997 Jeremy Allison <jra@cygnus.com>
2760 * fhandler.cc: Fix from Scott Kempf (scottk@rimu.ig.utexas.edu)
2761 to ensure creation_disposition is set correctly in open.
2763 Fri Jan 3 12:10:22 1997 Jeremy Allison <jra@cygnus.com>
2765 * fork.cc: Added parameter to recreate_mmaps_after_fork
2766 in child, and added set_child_mmap_ptr() call in parent.
2767 Needed as cygwin.dll statics are not copied accros a fork.
2768 * mmap.cc: Added parameter to recreate_mmaps_after_fork,
2769 added set_child_mmap_ptr() call.
2770 * winsup.h: Added mmap_ptr to pinfo struct. Removed obsolete
2772 * Makefile.in: Added -I../libio, needed to rebuild source
2773 using STL. Also added -nostdinc++ on recommendation of
2774 Mike Stump (mrs@cygnus.com).
2776 Thu Jan 2 17:23:10 1997 Jeremy Allison <jra@cygnus.com>
2778 * dcrt0.cc: Added a call to initialize winsock on app
2780 * fork.cc: Added call so child initializes winsock before
2781 returning from the fork. This makes many network daemons
2782 run correctly that did not before (apache soon...).
2783 * net.cc: Removed calls to checkinit, this is now done on
2784 app startup. Renamed checkinit to socket_checkinit and
2785 removed static scope.
2786 * winsup.h: Added prototype for socket_checkinit().
2788 Thu Jan 2 12:25:06 1997 Jeremy Allison <jra@cygnus.com>
2790 * dcrt0.cc (api_fatal): Check that u and u->self are
2791 not zero before indirecting through them.
2792 * fork.cc: Changed security descriptor for fork
2793 mutexes to allow access by all.
2794 * pinfo.cc: Changed security descriptor for shared
2795 area to allow access by all.
2796 * shared.cc: Added get_null_sd() call to return
2797 security descriptor allowing access by all. Needed
2798 when a cygwin32 service is running and also interactive
2799 cygwin32 apps by the current logged in user.
2800 * winsup.h: Added prototype for get_null_sd().