4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-02-01 03:50:28 +08:00

white space and minor comment cleanup.

This commit is contained in:
Christopher Faylor 2005-05-02 03:50:11 +00:00
parent b9b1b38358
commit 05726ddd86
40 changed files with 265 additions and 265 deletions

View File

@ -23,7 +23,7 @@ Sat Dec 16 18:36:44 1995 steve chamberlain <sac@slash.cygnus.com>
Changed the way that children are waited for. Now Changed the way that children are waited for. Now
you can exec a non-gnuwin32 program and wait for its you can exec a non-gnuwin32 program and wait for its
result. result.
* Makefile.in: Turn off frame-pointer. * Makefile.in: Turn off frame-pointer.
* dcrt0.cc (environ_init): Lint. * dcrt0.cc (environ_init): Lint.
* dirsearch.cc (opendir): Use new path_conv mechanism. * dirsearch.cc (opendir): Use new path_conv mechanism.
@ -40,7 +40,7 @@ Sat Dec 16 18:36:44 1995 steve chamberlain <sac@slash.cygnus.com>
* sysconf.cc (sysconf): Understand SC_PAGESIZE. * sysconf.cc (sysconf): Understand SC_PAGESIZE.
* times.cc (utime): New function. * times.cc (utime): New function.
* uname.cc (uname): Dig out more info. * uname.cc (uname): Dig out more info.
Wed Dec 13 05:54:55 1995 Michael Meissner <meissner@tiktok.cygnus.com> Wed Dec 13 05:54:55 1995 Michael Meissner <meissner@tiktok.cygnus.com>
* dcrt0.cc (environ_init): Cast alloca return to appropriate type. * dcrt0.cc (environ_init): Cast alloca return to appropriate type.
@ -83,7 +83,7 @@ Tue Dec 5 16:00:05 1995 Jason Molenda (crash@phydeaux.cygnus.com)
Tue Dec 5 08:08:08 1995 steve chamberlain <sac@slash.cygnus.com> Tue Dec 5 08:08:08 1995 steve chamberlain <sac@slash.cygnus.com>
Release-B10 Release-B10
* cygwin.dll (__assert, wait, spawnv, spawnvp): Deleted. * cygwin.dll (__assert, wait, spawnv, spawnvp): Deleted.
* dcrt0.c: Quoting rewritten. * dcrt0.c: Quoting rewritten.
* exec.cc (file_exists): Use new path_conv mechanism. * exec.cc (file_exists): Use new path_conv mechanism.
@ -129,7 +129,7 @@ Wed Nov 15 23:47:43 1995 Jason Molenda (crash@phydeaux.cygnus.com)
Tue Oct 3 10:23:14 1995 Anders Blomdell (anders.blomdell@control.lth.se) Tue Oct 3 10:23:14 1995 Anders Blomdell (anders.blomdell@control.lth.se)
* spawn.cc (spawn_guts): quote doublequotes correctly * spawn.cc (spawn_guts): quote doublequotes correctly
Tue Nov 14 15:05:33 1995 Jason Molenda (crash@phydeaux.cygnus.com) Tue Nov 14 15:05:33 1995 Jason Molenda (crash@phydeaux.cygnus.com)
* configure.in: comment out call to cfg-ml-com.in. * configure.in: comment out call to cfg-ml-com.in.

View File

@ -22,7 +22,7 @@ Mon Dec 23 13:35:27 1996 Jeremy Allison <jra@cygnus.com>
* winsup.h: Decremented internal_reserved array by one to add * winsup.h: Decremented internal_reserved array by one to add
hmodule in u area. Added prototype for recreate_mmaps_after_fork(). hmodule in u area. Added prototype for recreate_mmaps_after_fork().
* include/sys/mman.h: Fixed include file for mmap calls. * include/sys/mman.h: Fixed include file for mmap calls.
Tue Dec 17 16:20:52 1996 Geoffrey Noer <noer@cygnus.com> Tue Dec 17 16:20:52 1996 Geoffrey Noer <noer@cygnus.com>
* syscalls.cc (_rename): fix code so we really do * syscalls.cc (_rename): fix code so we really do
@ -54,14 +54,14 @@ Fri Dec 13 16:18:22 1996 Jeremy Allison <jra@cygnus.com>
Fri Dec 13 10:56:21 1996 Jeremy Allison <jra@cygnus.com> Fri Dec 13 10:56:21 1996 Jeremy Allison <jra@cygnus.com>
* cygwin.din: Added h_errno, seteuid, _seteuid. * cygwin.din: Added h_errno, seteuid, _seteuid.
* exceptions.cc: Made init_exceptions extern "C". * exceptions.cc: Made init_exceptions extern "C".
* exceptions.h: Added cplusplus wrappers to enable this to * exceptions.h: Added cplusplus wrappers to enable this to
be used from C. be used from C.
* net.cc: Added error numbers, fixed gethostbyaddr, added h_errno * net.cc: Added error numbers, fixed gethostbyaddr, added h_errno
fixes. fixes.
* stubs.cc: Added seteuid. * stubs.cc: Added seteuid.
* include/mywinsock.h: Added HOST error entries for DNS lookups. * include/mywinsock.h: Added HOST error entries for DNS lookups.
Tue Dec 10 15:38:46 1996 Geoffrey Noer <noer@cygnus.com> Tue Dec 10 15:38:46 1996 Geoffrey Noer <noer@cygnus.com>
@ -75,7 +75,7 @@ Tue Dec 10 15:38:46 1996 Geoffrey Noer <noer@cygnus.com>
Thu Dec 5 14:03:08 1996 Geoffrey Noer <noer@cygnus.com> Thu Dec 5 14:03:08 1996 Geoffrey Noer <noer@cygnus.com>
* select.cc: add missing end comment at about line 933. * select.cc: add missing end comment at about line 933.
gnu-win32 beta 17 release made gnu-win32 beta 17 release made
Wed Dec 4 15:53:11 1996 Geoffrey Noer <noer@cygnus.com> Wed Dec 4 15:53:11 1996 Geoffrey Noer <noer@cygnus.com>
@ -293,19 +293,19 @@ Wed Oct 30 16:35:41 1996 Jeremy Allison <jra@cygnus.com>
Wed Oct 30 13:05:33 1996 Geoffrey Noer <noer@cygnus.com> Wed Oct 30 13:05:33 1996 Geoffrey Noer <noer@cygnus.com>
* include/custcntl.h * include/custcntl.h
* include/features.h * include/features.h
* include/icmp.h * include/icmp.h
* include/wchar.h * include/wchar.h
* include/cygwin32/icmp.h * include/cygwin32/icmp.h
* include/cygwin32/ip.h * include/cygwin32/ip.h
* include/cygwin32/sockios.h * include/cygwin32/sockios.h
* include/cygwin32/types.h * include/cygwin32/types.h
* include/cygwin32/uio.h * include/cygwin32/uio.h
* include/sys/ttychars.h * include/sys/ttychars.h
Added comment with name of header to each so that these are no Added comment with name of header to each so that these are no
longer empty files (some unzip programs won't create longer empty files (some unzip programs won't create
zero-length files which is a problem for headers) zero-length files which is a problem for headers)
Sun Oct 27 17:30:03 1996 Geoffrey Noer <noer@cygnus.com> Sun Oct 27 17:30:03 1996 Geoffrey Noer <noer@cygnus.com>
@ -407,11 +407,11 @@ Mon Oct 21 09:48:00 1996 Jeremy Allison <jra@cygnus.com>
* select.cc: Re-written from scratch. Take account of * select.cc: Re-written from scratch. Take account of
the following cases. (1). All sockets [written&works] the following cases. (1). All sockets [written&works]
(2). Handles, sockets and always readies [written,not tested] (2). Handles, sockets and always readies [written,not tested]
(3). All handles [written,not tested]. (4). Handles & sockets (3). All handles [written,not tested]. (4). Handles & sockets
with timeout [not yet written,returns -1]. Correctly blocks with timeout [not yet written,returns -1]. Correctly blocks
and doesn't spin cpu. and doesn't spin cpu.
* pinfo.cc: Changed to add global lock around pinfo array. * pinfo.cc: Changed to add global lock around pinfo array.
* fork.cc: Changed to use global pinfo lock. * fork.cc: Changed to use global pinfo lock.
* shared.cc: Fixed bug with fork()->exec()->exec() code. * shared.cc: Fixed bug with fork()->exec()->exec() code.
* net.cc: Removed select_init() call (no longer used). * net.cc: Removed select_init() call (no longer used).
@ -478,19 +478,19 @@ Wed Oct 16 17:16:33 1996 Geoffrey Noer <noer@cygnus.com>
Tue Oct 15 09:51:48 1996 Jeremy Allison <jra@cygnus.com> Tue Oct 15 09:51:48 1996 Jeremy Allison <jra@cygnus.com>
* fhandler.h: Many changes to support moving fhandler array out of * fhandler.h: Many changes to support moving fhandler array out of
shared area into locally allocated memory. Removed fhandler class, shared area into locally allocated memory. Removed fhandler class,
fhandler_base is now root of class tree. Re-arranged class definitions fhandler_base is now root of class tree. Re-arranged class definitions
to make it clear what functions are virtual and can be overridden. to make it clear what functions are virtual and can be overridden.
Inlined may accessor functions. Inlined may accessor functions.
* fhandler.cc: Many changes to support moving fhandler array out of * fhandler.cc: Many changes to support moving fhandler array out of
shared area into locally allocated memory. unix_path_name_ is now shared area into locally allocated memory. unix_path_name_ is now
always set (all fhandler_base classes have a name). always set (all fhandler_base classes have a name).
* hinfo.cc: Many changes to support moving fhandler array out of * hinfo.cc: Many changes to support moving fhandler array out of
shared area into locally allocated memory. Added linearization and shared area into locally allocated memory. Added linearization and
de-linearization functions. de-linearization functions.
* net.cc(socket): Added code to keep name for fhandler_socket. * net.cc(socket): Added code to keep name for fhandler_socket.
* pinfo.cc : Changed allocation of fhandler_base array to be in local * pinfo.cc : Changed allocation of fhandler_base array to be in local
memory rather than in shared area. (modified functions are pinfo_init, memory rather than in shared area. (modified functions are pinfo_init,
pinfo_list::get_empty_pinfo, pinfo_list::allocate_pid, pinfo_list::get_empty_pinfo, pinfo_list::allocate_pid,
pinfo::record_death). pinfo::record_death).
* shared.cc: Added functions to copy fd area for spawned process. * shared.cc: Added functions to copy fd area for spawned process.
@ -511,13 +511,13 @@ Tue Oct 15 09:51:48 1996 Jeremy Allison <jra@cygnus.com>
Mon Oct 14 14:59:16 1996 Geoffrey Noer <noer@cygnus.com> Mon Oct 14 14:59:16 1996 Geoffrey Noer <noer@cygnus.com>
* sysdef/i386: replace all files with ones from Scott * sysdef/i386: replace all files with ones from Scott
Christley's windows32api-0.1.2 package. Still need to Christley's windows32api-0.1.2 package. Still need to
integrate new headers. integrate new headers.
Mon Oct 14 13:41:14 1996 Geoffrey Noer <noer@cygnus.com> Mon Oct 14 13:41:14 1996 Geoffrey Noer <noer@cygnus.com>
* syscalls.cc (_unlink): need to fchmod file to writable * syscalls.cc (_unlink): need to fchmod file to writable
before attempting to delete. This change still needs more before attempting to delete. This change still needs more
work (fchmod isn't written yet). work (fchmod isn't written yet).
* (fchmod): change comment * (fchmod): change comment
@ -567,7 +567,7 @@ Thu Oct 3 16:19:23 1996 Jeremy Allison <jra@cygnus.com>
and understanding which variables are class variables much simpler. and understanding which variables are class variables much simpler.
Changed name member to unix_path_name_ and made dynamic rather Changed name member to unix_path_name_ and made dynamic rather
than a fixed 31 byte buffer per entry. than a fixed 31 byte buffer per entry.
* fhandler.cc: Updated varable access for above. * fhandler.cc: Updated varable access for above.
* fcntl.cc: Updated varable access for above. * fcntl.cc: Updated varable access for above.
* hinfo.cc: Updated varable access for above. * hinfo.cc: Updated varable access for above.
* spawn.cc: Updated varable access for above. * spawn.cc: Updated varable access for above.
@ -780,7 +780,7 @@ Thu Aug 22 17:04:09 1996 Geoffrey Noer <noer@cygnus.com>
* libcfork.cc: deleted * libcfork.cc: deleted
* fork.cc (vfork): used to be in libcfork.cc * fork.cc (vfork): used to be in libcfork.cc
* (__fork): used to be in libcfork.cc * (__fork): used to be in libcfork.cc
* (fork): used to be in libcfork.cc * (fork): used to be in libcfork.cc
* Makefile.in: don't build libcfork.cc any more * Makefile.in: don't build libcfork.cc any more
* libccrt0.cc: set data_start, etc. from dll structure * libccrt0.cc: set data_start, etc. from dll structure
* winsup.h: add data_start, etc. to public vars in dll * winsup.h: add data_start, etc. to public vars in dll
@ -793,10 +793,10 @@ Thu Aug 22 01:36:53 1996 Geoffrey Noer <noer@cygnus.com>
Wed Aug 21 16:15:47 1996 Geoffrey Noer <noer@cygnus.com> Wed Aug 21 16:15:47 1996 Geoffrey Noer <noer@cygnus.com>
* cygwin.din: list vfork * cygwin.din: list vfork
* dirsearch.cc: fix errno setting in readdir that caused * dirsearch.cc: fix errno setting in readdir that caused
diff to not function on directories diff to not function on directories
* pipe.cc: reformatted * pipe.cc: reformatted
Wed Aug 21 15:12:47 1996 Jeremy Allison <jra@cygnus.com> Wed Aug 21 15:12:47 1996 Jeremy Allison <jra@cygnus.com>
@ -825,7 +825,7 @@ Mon Aug 19 09:22:35 1996 Doug Evans <dje@canuck.cygnus.com>
(dll_crt0_1): Probe forked child's stack out. (dll_crt0_1): Probe forked child's stack out.
* fork.cc (FORK_WAIT_TIMEOUT): Bump up to two minutes. * fork.cc (FORK_WAIT_TIMEOUT): Bump up to two minutes.
* fork.cc (dump_jmp_buf): New function. * fork.cc (dump_jmp_buf): New function.
(cygwin_fork_helper1): Call it. (cygwin_fork_helper1): Call it.
* dcrt0.cc (dll_crt0:1): Call it. * dcrt0.cc (dll_crt0:1): Call it.
@ -870,8 +870,8 @@ Sat Aug 10 16:30:14 1996 Geoffrey Noer <noer@cygnus.com>
Fri Aug 9 18:19:12 1996 Geoffrey Noer <noer@cygnus.com> Fri Aug 9 18:19:12 1996 Geoffrey Noer <noer@cygnus.com>
* syscalls.cc (_rename): return -1 if file to be renamed * syscalls.cc (_rename): return -1 if file to be renamed
doesn't exist. Reformatted whole file. doesn't exist. Reformatted whole file.
* fork.cc: increase timeout value to 60 sec from 30 sec * fork.cc: increase timeout value to 60 sec from 30 sec
Thu Aug 8 17:44:39 1996 Jim Wilson <wilson@cygnus.com> Thu Aug 8 17:44:39 1996 Jim Wilson <wilson@cygnus.com>
@ -1141,7 +1141,7 @@ Wed Jul 3 12:30:24 1996 Doug Evans <dje@canuck.cygnus.com>
(system_printf): New function. (system_printf): New function.
* pproc.cc (per_process::init): Delete call to strace_init. * pproc.cc (per_process::init): Delete call to strace_init.
* dcrt0 (dll_crt0_1): Call strace_init as soon as possible. * dcrt0 (dll_crt0_1): Call strace_init as soon as possible.
* dcrt0 (dll_crt0_1): Delete local can_glob, use * dcrt0 (dll_crt0_1): Delete local can_glob, use
u->self->invoked_by_cygwin_p instead. u->self->invoked_by_cygwin_p instead.
Move PID environment variable handling into pinfo_init_per_process. Move PID environment variable handling into pinfo_init_per_process.
@ -1621,7 +1621,7 @@ Tue May 14 14:59:32 1996 Doug Evans <dje@canuck.cygnus.com>
* smallprintf.c (__small_vsprintf): Support %p. * smallprintf.c (__small_vsprintf): Support %p.
* syscalls.cc (getppid): Update. * syscalls.cc (getppid): Update.
* wait.cc (wait_for_any): Likewise. * wait.cc (wait_for_any): Likewise.
Mon May 13 13:45:36 1996 Mark Eichin <eichin@cygnus.com> Mon May 13 13:45:36 1996 Mark Eichin <eichin@cygnus.com>
* fhandler.cc (ioctl): fix TIOCGWINSZ handling: (1) check the * fhandler.cc (ioctl): fix TIOCGWINSZ handling: (1) check the
@ -1639,16 +1639,16 @@ Mon May 13 13:45:36 1996 Mark Eichin <eichin@cygnus.com>
Fri May 10 17:59:09 1996 Mark Eichin <eichin@cygnus.com> Fri May 10 17:59:09 1996 Mark Eichin <eichin@cygnus.com>
* select.cc: change most debugging statements to select_printf. * select.cc: change most debugging statements to select_printf.
(dbg_input_event): new function, prints an INPUT_RECORD via select (dbg_input_event): new function, prints an INPUT_RECORD via select
printf. printf.
(polled): Don't sleep around WaitForMultipleObjects; let it have a (polled): Don't sleep around WaitForMultipleObjects; let it have a
10ms timeout until we have time to test it with 0. If 10ms timeout until we have time to test it with 0. If
WaitForMultipleObjects says that STD_INPUT_HANDLE has data, use WaitForMultipleObjects says that STD_INPUT_HANDLE has data, use
PeekConsoleInput to scan the available events. If the first one is PeekConsoleInput to scan the available events. If the first one is
not a *bKeyDown* with a non-zero *AsciiChar* then use not a *bKeyDown* with a non-zero *AsciiChar* then use
ReadConsoleInput to rip it off the queue, and pretend it wasn't ReadConsoleInput to rip it off the queue, and pretend it wasn't
there, so that later calls to read (and thus ReadFile) don't block there, so that later calls to read (and thus ReadFile) don't block
because they can't find any *real* input. (This could be optimized because they can't find any *real* input. (This could be optimized
later to check the whole queue, and if there are *no* real input later to check the whole queue, and if there are *no* real input
events, nuke them all.) events, nuke them all.)
@ -1656,11 +1656,11 @@ Fri May 10 17:59:09 1996 Mark Eichin <eichin@cygnus.com>
category, because select needs a *lot* of work. STRACE=256 to use it. category, because select needs a *lot* of work. STRACE=256 to use it.
* fhandler.cc (fhandler_console_in::init): IGNCR can't work * fhandler.cc (fhandler_console_in::init): IGNCR can't work
without major changes to deal with the interaction with select without major changes to deal with the interaction with select
(which shouldn't wake up if IGNCR causes the whole input to be (which shouldn't wake up if IGNCR causes the whole input to be
deleted...) so don't make it the default. deleted...) so don't make it the default.
(fhandler_console_out::tcgetattr, fhandler_tty::tcgetattr): don't (fhandler_console_out::tcgetattr, fhandler_tty::tcgetattr): don't
set IGNCR based on get_r_binary either. set IGNCR based on get_r_binary either.
Wed May 8 20:20:05 1996 Mark Eichin <eichin@cygnus.com> Wed May 8 20:20:05 1996 Mark Eichin <eichin@cygnus.com>
@ -1710,7 +1710,7 @@ Sun May 5 00:45:59 1996 Mark Eichin <eichin@cygnus.com>
Wed Apr 24 23:42:49 1996 Steve Chamberlain <sac@dilithium.transmeta.com> Wed Apr 24 23:42:49 1996 Steve Chamberlain <sac@dilithium.transmeta.com>
* winsup.h (pinfo, pinfo_list): Remove dummy item. * winsup.h (pinfo, pinfo_list): Remove dummy item.
* fork.cc (*): Revert changes of Apr 2. * fork.cc (*): Revert changes of Apr 2.
Sun Apr 21 17:00:14 1996 Steve Chamberlain <sac@slash.cygnus.com> Sun Apr 21 17:00:14 1996 Steve Chamberlain <sac@slash.cygnus.com>
@ -1736,7 +1736,7 @@ Wed Apr 10 16:13:30 1996 steve chamberlain <sac@slash.cygnus.com>
* Makefile.in (glob/libglob.a): Call glob makefile correctly. * Makefile.in (glob/libglob.a): Call glob makefile correctly.
* winsup.h (pinfo, pinfo_list): Reorder elements to avoid * winsup.h (pinfo, pinfo_list): Reorder elements to avoid
alignment bug in PPC gcc. alignment bug in PPC gcc.
Tue Apr 9 17:23:57 1996 steve chamberlain <sac@slash.cygnus.com> Tue Apr 9 17:23:57 1996 steve chamberlain <sac@slash.cygnus.com>
* dcrt0.cc (globify): Expand command line wildcards if * dcrt0.cc (globify): Expand command line wildcards if
@ -1779,7 +1779,7 @@ Fri Mar 29 16:35:02 1996 steve chamberlain <sac@slash.cygnus.com>
* pinfo.cc (pinfo::clearout): Zero split_heap_p. * pinfo.cc (pinfo::clearout): Zero split_heap_p.
* syscalls.cc (_sbrk): Cope with not being able to * syscalls.cc (_sbrk): Cope with not being able to
allocate contiguous chunks. allocate contiguous chunks.
Tue Mar 26 09:14:32 1996 steve chamberlain <sac@slash.cygnus.com> Tue Mar 26 09:14:32 1996 steve chamberlain <sac@slash.cygnus.com>
@ -1854,7 +1854,7 @@ Tue Feb 20 16:53:24 1996 Steve Chamberlain <sac@slash.cygnus.com>
path.cc (path_conv::path_conv): Initialize mixed, binary and silent. path.cc (path_conv::path_conv): Initialize mixed, binary and silent.
* smallprint.c (__small_vsprintf): Add 'c' option. * smallprint.c (__small_vsprintf): Add 'c' option.
* wait.cc (wait_found): Close child handles. * wait.cc (wait_found): Close child handles.
Mon Feb 19 09:11:57 1996 Michael Meissner <meissner@tiktok.cygnus.com> Mon Feb 19 09:11:57 1996 Michael Meissner <meissner@tiktok.cygnus.com>
* Makefile.in (real-headers): Eliminate real-headers dependency on * Makefile.in (real-headers): Eliminate real-headers dependency on
@ -1912,7 +1912,7 @@ Wed Feb 7 16:41:18 1996 Steve Chamberlain <sac@slash.cygnus.com>
(chown): Returns 0. (chown): Returns 0.
(sbrk): Clean up. (sbrk): Clean up.
(_unlink): Only try and DeleteFile once. (_unlink): Only try and DeleteFile once.
Mon Feb 5 19:15:44 1996 Steve Chamberlain <sac@slash.cygnus.com> Mon Feb 5 19:15:44 1996 Steve Chamberlain <sac@slash.cygnus.com>
* dcrt0.cc (dll_crt0_1): Build env string into static buffer. * dcrt0.cc (dll_crt0_1): Build env string into static buffer.
@ -1947,7 +1947,7 @@ Fri Jan 26 15:47:31 1996 Steve Chamberlain <sac@slash.cygnus.com>
* Makefile.in, configure.in: Cope with config directory. * Makefile.in, configure.in: Cope with config directory.
* setjmp.c, longjmp.c: Moved into config/i386. * setjmp.c, longjmp.c: Moved into config/i386.
* config/ppc/setjmp.S, config/ppc/longjmp.S: New. * config/ppc/setjmp.S, config/ppc/longjmp.S: New.
Fri Jan 26 14:57:33 1996 Jason Molenda (crash@phydeaux.cygnus.com) Fri Jan 26 14:57:33 1996 Jason Molenda (crash@phydeaux.cygnus.com)
* Makefile.in (DLL_OFILES): removed ppc-stub.o * Makefile.in (DLL_OFILES): removed ppc-stub.o
@ -1985,7 +1985,7 @@ Mon Jan 22 10:33:53 1996 Steve Chamberlain <sac@slash.cygnus.com>
* shared.cc (shared_info::initialize): Initialize heap chunk. * shared.cc (shared_info::initialize): Initialize heap chunk.
* syscalls.cc (_sbrk): If current chunk is used, allocate another. * syscalls.cc (_sbrk): If current chunk is used, allocate another.
* wait.cc (wait_found): Fix exit code. * wait.cc (wait_found): Fix exit code.
Thu Jan 18 10:09:45 1996 Steve Chamberlain <sac@slash.cygnus.com> Thu Jan 18 10:09:45 1996 Steve Chamberlain <sac@slash.cygnus.com>
* fhandler.cc (fhandler_normal::open) Don't test a * fhandler.cc (fhandler_normal::open) Don't test a
@ -2026,6 +2026,6 @@ Tue Jan 2 08:58:58 1996 steve chamberlain <sac@slash.cygnus.com>
* spawn.cc: Lint. Removed vfork stuff. * spawn.cc: Lint. Removed vfork stuff.
* stubs.c (getmntent, endgrent): Deleted. * stubs.c (getmntent, endgrent): Deleted.
* syscalls.c (__seterrno): Now takes arguments. * syscalls.c (__seterrno): Now takes arguments.
* termios.c: Much moved info fhandler.c * termios.c: Much moved info fhandler.c
* times.cc (utime, utimes): New. * times.cc (utime, utimes): New.
* uinfo.c (cuserid): New. * uinfo.c (cuserid): New.

View File

@ -418,7 +418,7 @@ Sun Nov 16 15:54:27 1997 Geoffrey Noer <noer@rtl.cygnus.com>
appear to be active. This will clear out pids that have died appear to be active. This will clear out pids that have died
abnormally. 'ps -f' bypasses this. abnormally. 'ps -f' bypasses this.
* winsup.h (class pinfo): Add dwSpawnedProcessId field. * winsup.h (class pinfo): Add dwSpawnedProcessId field.
Sun Nov 16 15:54:27 1997 Geoffrey Noer <noer@rtl.cygnus.com> Sun Nov 16 15:54:27 1997 Geoffrey Noer <noer@rtl.cygnus.com>
patch from sos@prospect.com.ru (Sergey Okhapkin): patch from sos@prospect.com.ru (Sergey Okhapkin):
@ -1298,7 +1298,7 @@ Mon Sep 8 20:19:09 1997 Geoffrey Noer <noer@cygnus.com>
Mon Sep 8 17:40:46 1997 Geoffrey Noer <noer@cygnus.com> Mon Sep 8 17:40:46 1997 Geoffrey Noer <noer@cygnus.com>
patch from sos@prospect.com.ru (Sergey Okhapkin): patch from sos@prospect.com.ru (Sergey Okhapkin):
* dcrt0.cc (_exit): Kill the foreground process group on session * dcrt0.cc (_exit): Kill the foreground process group on session
leader exit only if job control is in progress. leader exit only if job control is in progress.
* exceptions.cc (ctrl_c_handler): protect the code with critical * exceptions.cc (ctrl_c_handler): protect the code with critical
@ -1572,7 +1572,7 @@ Thu Jul 24 02:14:24 1997 Geoffrey Noer <noer@cygnus.com>
a child is stopped. a child is stopped.
(wait4): wait calls should wait childs only; fixed a bug with (wait4): wait calls should wait childs only; fixed a bug with
nprocinfo count; fixed signal handling. nprocinfo count; fixed signal handling.
Thu Jul 24 02:10:25 1997 Geoffrey Noer <noer@cygnus.com> Thu Jul 24 02:10:25 1997 Geoffrey Noer <noer@cygnus.com>
* uname.cc: uname now outputs Cygwin32_NT or Cygwin32_95 * uname.cc: uname now outputs Cygwin32_NT or Cygwin32_95
@ -1848,7 +1848,7 @@ Thu Jul 24 02:10:25 1997 Geoffrey Noer <noer@cygnus.com>
window to avoid race conditions on multiprocessor systems. window to avoid race conditions on multiprocessor systems.
* winsup.h: misc changes to support all of the above. * winsup.h: misc changes to support all of the above.
Thu Jul 24 02:10:25 1997 Geoffrey Noer <noer@cygnus.com> Thu Jul 24 02:10:25 1997 Geoffrey Noer <noer@cygnus.com>
* net.cc (cygwin32_shutdown): New implementation to replace * net.cc (cygwin32_shutdown): New implementation to replace
stub previously present stub previously present
@ -1895,7 +1895,7 @@ Tue Jun 24 18:31:27 1997 Geoffrey Noer <noer@cygnus.com>
* net.cc: ditto * net.cc: ditto
* syscalls.cc: ditto * syscalls.cc: ditto
* syslog.cc: ditto * syslog.cc: ditto
* uname.cc (uname): call get_os_type to fill new our_os local * uname.cc (uname): call get_os_type to fill new our_os local
variable, check that when filling out utsname struct, default variable, check that when filling out utsname struct, default
to i386 when we can't find out the specific Intel processor to i386 when we can't find out the specific Intel processor
@ -1940,7 +1940,7 @@ Thu Jun 19 12:58:45 1997 Geoffrey Noer <noer@cygnus.com>
* exceptions.cc (return_handler): renamed to set_process_mask * exceptions.cc (return_handler): renamed to set_process_mask
(set_process_mask): new; use to set process mask instead of direct (set_process_mask): new; use to set process mask instead of direct
u->self->sig_mask manipulations. u->self->sig_mask manipulations.
* winsup.h: rename return_handler proto to set_process_mask * winsup.h: rename return_handler proto to set_process_mask
* signal.cc: throughout file, call set_process_mask() instead of * signal.cc: throughout file, call set_process_mask() instead of
direct manipulations of u->self->sig_mask. direct manipulations of u->self->sig_mask.
(pause): new (pause): new
@ -1957,7 +1957,7 @@ Wed Jun 18 22:01:56 1997 Geoffrey Noer <noer@cygnus.com>
Wed Jun 18 13:56:47 1997 Geoffrey Noer <noer@cygnus.com> Wed Jun 18 13:56:47 1997 Geoffrey Noer <noer@cygnus.com>
patch from sos@prospect.com.ru (Sergey Okhapkin): patch from sos@prospect.com.ru (Sergey Okhapkin):
* signal.cc (sigsuspend): deal with pending unblocked signals * signal.cc (sigsuspend): deal with pending unblocked signals
* winsup.h: add proto for return_handler (sigset_t) * winsup.h: add proto for return_handler (sigset_t)
Wed Jun 18 02:02:13 1997 Geoffrey Noer <noer@cygnus.com> Wed Jun 18 02:02:13 1997 Geoffrey Noer <noer@cygnus.com>
@ -1967,7 +1967,7 @@ Wed Jun 18 02:02:13 1997 Geoffrey Noer <noer@cygnus.com>
Tue Jun 17 14:57:09 1997 Geoffrey Noer <noer@cygnus.com> Tue Jun 17 14:57:09 1997 Geoffrey Noer <noer@cygnus.com>
patch from sos@prospect.com.ru (Sergey Okhapkin): patch from sos@prospect.com.ru (Sergey Okhapkin):
* cygwin.din: add getpgid, killpg exports, delete duplicate * cygwin.din: add getpgid, killpg exports, delete duplicate
random export random export
* fork.cc (cygwin_fork_helper1): inherit pgid and sid on fork * fork.cc (cygwin_fork_helper1): inherit pgid and sid on fork
@ -2144,7 +2144,7 @@ Mon Jun 3 12:21:20 1997 Geoffrey Noer <noer@cygnus.com>
* passwd.cc: include termios.h * passwd.cc: include termios.h
(getpass): new (getpass): new
* stubs.cc (getpass): delete old stub * stubs.cc (getpass): delete old stub
Tue Jun 3 14:51:47 1997 Ian Lance Taylor <ian@cygnus.com> Tue Jun 3 14:51:47 1997 Ian Lance Taylor <ian@cygnus.com>
* times.cc (ftime): New function. * times.cc (ftime): New function.
@ -2400,7 +2400,7 @@ Thu Apr 17 23:50:50 1997 Geoffrey Noer <noer@cygnus.com>
in size instad of 30. This will increase cygwin.dll memory in size instad of 30. This will increase cygwin.dll memory
usage by 20K. We need to remove static allocations from usage by 20K. We need to remove static allocations from
path code. path code.
Thu Apr 17 10:11:50 1997 Geoffrey Noer <noer@cygnus.com> Thu Apr 17 10:11:50 1997 Geoffrey Noer <noer@cygnus.com>
patch from sos@prospect.com.ru (Sergey Okhapkin): patch from sos@prospect.com.ru (Sergey Okhapkin):
@ -2408,14 +2408,14 @@ Thu Apr 17 10:11:50 1997 Geoffrey Noer <noer@cygnus.com>
generate SIGHUP instead of SIGQUIT generate SIGHUP instead of SIGQUIT
* signal.cc (_raise): rewrite * signal.cc (_raise): rewrite
Wed Apr 16 10:42:46 1997 Geoffrey Noer <noer@cygnus.com> Wed Apr 16 10:42:46 1997 Geoffrey Noer <noer@cygnus.com>
* version.h: increment CYGWIN_DLL_VERSION_MINOR * version.h: increment CYGWIN_DLL_VERSION_MINOR
* syscalls.cc (system): use spawnvp instead of fork/exec * syscalls.cc (system): use spawnvp instead of fork/exec
* ntea.cc: make all functions return false for now; they * ntea.cc: make all functions return false for now; they
were causing an obscene performance hit were causing an obscene performance hit
patch from sos@prospect.com.ru (Sergey Okhapkin): patch from sos@prospect.com.ru (Sergey Okhapkin):
* console.cc (FakeReadFile): patch to support EINTR, EIO * console.cc (FakeReadFile): patch to support EINTR, EIO
* exceptions.cc: add support for return_handler, remove * exceptions.cc: add support for return_handler, remove
control-C counter control-C counter
@ -2435,7 +2435,7 @@ Wed Apr 16 10:42:46 1997 Geoffrey Noer <noer@cygnus.com>
(wait_for_any): init nprocinfo to 1, not 0, other small fixes (wait_for_any): init nprocinfo to 1, not 0, other small fixes
* winsup.h: add signal_arrived to per_process class, reduce * winsup.h: add signal_arrived to per_process class, reduce
amount of reserved space, add sig_pending to pinfo class amount of reserved space, add sig_pending to pinfo class
Tue Apr 15 17:01:34 1997 Geoffrey Noer <noer@cygnus.com> Tue Apr 15 17:01:34 1997 Geoffrey Noer <noer@cygnus.com>
* utils/mkpasswd.c: change default shell to /bin/sh * utils/mkpasswd.c: change default shell to /bin/sh
@ -2483,7 +2483,7 @@ Fri Apr 11 00:03:49 1997 Geoffrey Noer <noer@cygnus.com>
fhandler.cc, add includes necessary for this code fhandler.cc, add includes necessary for this code
* grp.cc, Makefile.in: fix copyright dates * grp.cc, Makefile.in: fix copyright dates
* ntea.cc: include string.h * ntea.cc: include string.h
Thu Apr 10 22:00:43 1997 Geoffrey Noer <noer@cygnus.com> Thu Apr 10 22:00:43 1997 Geoffrey Noer <noer@cygnus.com>
patch from sos@prospect.com.ru (Sergey Okhapkin): patch from sos@prospect.com.ru (Sergey Okhapkin):
@ -2659,10 +2659,10 @@ Fri Feb 14 18:55:01 1997 Jeremy Allison <jra@cygnus.com>
Thu Feb 13 14:06:04 1997 Geoffrey Noer <noer@cygnus.com> Thu Feb 13 14:06:04 1997 Geoffrey Noer <noer@cygnus.com>
* path.cc: remove SLASH_P define and * path.cc: remove SLASH_P define and
* winsup.h: define it here instead * winsup.h: define it here instead
patch from scottk@utig.ig.utexas.edu (Scott Kempf): patch from scottk@utig.ig.utexas.edu (Scott Kempf):
dirsearch.cc (opendir): fix problem with accessing "/" dirsearch.cc (opendir): fix problem with accessing "/"
Mon Feb 10 13:57:11 1997 Geoffrey Noer <noer@cygnus.com> Mon Feb 10 13:57:11 1997 Geoffrey Noer <noer@cygnus.com>
@ -2688,7 +2688,7 @@ Mon Feb 3 16:16:39 1997 Jeremy Allison <jra@cygnus.com>
* fhandler.cc: Removed open_helper, turned it into * fhandler.cc: Removed open_helper, turned it into
fhandler_base::open and added fhandler_disk_file::open. More fhandler_base::open and added fhandler_disk_file::open. More
correct C++. correct C++.
fhandler_disk_file: Moved check_execable_p into fhandler_disk_file. fhandler_disk_file: Moved check_execable_p into fhandler_disk_file.
tty ports are now closed correctly. tty ports are now closed correctly.
* fhandler.h: Changes to support the above. * fhandler.h: Changes to support the above.
@ -2753,7 +2753,7 @@ Thu Jan 9 14:20:01 1997 Jeremy Allison <jra@cygnus.com>
* cygwin.din: Added cygwin32_getprotobynumber and * cygwin.din: Added cygwin32_getprotobynumber and
cygwin32_getservbyport. cygwin32_getservbyport.
* net.cc: Added cygwin32_getprotobynumber and * net.cc: Added cygwin32_getprotobynumber and
cygwin32_getservbyport. cygwin32_getservbyport.
Wed Jan 8 14:15:35 1997 Jeremy Allison <jra@cygnus.com> Wed Jan 8 14:15:35 1997 Jeremy Allison <jra@cygnus.com>

View File

@ -47,7 +47,7 @@
/* If using the C implementation of alloca, define if you know the /* If using the C implementation of alloca, define if you know the
direction of stack growth for your system; otherwise it will be direction of stack growth for your system; otherwise it will be
automatically deduced at run-time. automatically deduced at run-time.
STACK_DIRECTION > 0 => grows toward higher addresses STACK_DIRECTION > 0 => grows toward higher addresses
STACK_DIRECTION < 0 => grows toward lower addresses STACK_DIRECTION < 0 => grows toward lower addresses
STACK_DIRECTION = 0 => direction of growth unknown */ STACK_DIRECTION = 0 => direction of growth unknown */
#undef STACK_DIRECTION #undef STACK_DIRECTION

View File

@ -406,7 +406,7 @@ class cygheap_fdenum : public cygheap_fdmanip
{ {
while (++fd < (int) cygheap->fdtab.size) while (++fd < (int) cygheap->fdtab.size)
if (*(fh = cygheap->fdtab + fd) != NULL) if (*(fh = cygheap->fdtab + fd) != NULL)
return fd; return fd;
return -1; return -1;
} }
void rewind () void rewind ()

View File

@ -120,17 +120,17 @@ dlsym (void *handle, const char *name)
HMODULE *modules; HMODULE *modules;
DWORD needed, i; DWORD needed, i;
if (!EnumProcessModules (cur_proc, NULL, 0, &needed)) if (!EnumProcessModules (cur_proc, NULL, 0, &needed))
{ {
dlsym_fail: dlsym_fail:
set_dl_error ("dlsym"); set_dl_error ("dlsym");
return NULL; return NULL;
} }
modules = (HMODULE*) alloca (needed); modules = (HMODULE*) alloca (needed);
if (!EnumProcessModules (cur_proc, modules, needed, &needed)) if (!EnumProcessModules (cur_proc, modules, needed, &needed))
goto dlsym_fail; goto dlsym_fail;
for (i = 0; i < needed / sizeof (HMODULE); i++) for (i = 0; i < needed / sizeof (HMODULE); i++)
if ((ret = (void *) GetProcAddress (modules[i], name))) if ((ret = (void *) GetProcAddress (modules[i], name)))
break; break;
} }
else else
ret = (void *) GetProcAddress ((HMODULE)handle, name); ret = (void *) GetProcAddress ((HMODULE)handle, name);

View File

@ -120,7 +120,7 @@ fhandler_base::fstat_by_handle (struct __stat64 *buf)
debug_printf ("%u = NtQueryVolumeInformationFile)", debug_printf ("%u = NtQueryVolumeInformationFile)",
RtlNtStatusToDosError (status)); RtlNtStatusToDosError (status));
pfvi->VolumeSerialNumber = 0; /* Set to pc.volser () in helper. */ pfvi->VolumeSerialNumber = 0; /* Set to pc.volser () in helper. */
} }
status = NtQueryInformationFile (get_handle (), &io, pfai, fai_size, status = NtQueryInformationFile (get_handle (), &io, pfai, fai_size,
FileAllInformation); FileAllInformation);
if (NT_SUCCESS (status)) if (NT_SUCCESS (status))
@ -760,7 +760,7 @@ fhandler_disk_file::link (const char *newpath)
context = NULL; context = NULL;
write_err = 0; write_err = 0;
/* Write WIN32_STREAM_ID */ /* Write WIN32_STREAM_ID */
ret = BackupWrite (get_handle (), (LPBYTE) &stream_id, size, ret = BackupWrite (get_handle (), (LPBYTE) &stream_id, size,
&written, FALSE, FALSE, &context); &written, FALSE, FALSE, &context);
if (ret) if (ret)
{ {

View File

@ -118,11 +118,11 @@ fhandler_process::exists ()
{ {
fileid = PROCESS_FD; fileid = PROCESS_FD;
if (fill_filebuf ()) if (fill_filebuf ())
return -2; return -2;
/* Check for nameless device entries. */ /* Check for nameless device entries. */
path = strrchr (path, '/'); path = strrchr (path, '/');
if (path && *++path) if (path && *++path)
{ {
if (!strncmp (path, "pipe:[", 6)) if (!strncmp (path, "pipe:[", 6))
return -3; return -3;
else if (!strncmp (path, "socket:[", 8)) else if (!strncmp (path, "socket:[", 8))
@ -211,7 +211,7 @@ fhandler_process::readdir (DIR * dir)
if (fileid == PROCESS_FD) if (fileid == PROCESS_FD)
{ {
if (dir->__d_position >= 2 + filesize / sizeof (int)) if (dir->__d_position >= 2 + filesize / sizeof (int))
return NULL; return NULL;
} }
else if (dir->__d_position >= PROCESS_LINK_COUNT) else if (dir->__d_position >= PROCESS_LINK_COUNT)
return NULL; return NULL;
@ -414,7 +414,7 @@ fhandler_process::fill_filebuf ()
case PROCESS_CWD: case PROCESS_CWD:
case PROCESS_CMDLINE: case PROCESS_CMDLINE:
{ {
if (filebuf) if (filebuf)
free (filebuf); free (filebuf);
size_t fs; size_t fs;
switch (fileid) switch (fileid)

View File

@ -104,8 +104,8 @@ get_inet_addr (const struct sockaddr *in, int inlen,
*outlen = sizeof sin; *outlen = sizeof sin;
if (type) if (type)
*type = (ctype == 's' ? SOCK_STREAM : *type = (ctype == 's' ? SOCK_STREAM :
ctype == 'd' ? SOCK_DGRAM ctype == 'd' ? SOCK_DGRAM
: 0); : 0);
ret = 1; ret = 1;
} }
CloseHandle (fh); CloseHandle (fh);
@ -217,7 +217,7 @@ fhandler_socket::af_local_recv_secret (void)
debug_printf ("Received af_local secret: %08x-%08x-%08x-%08x", debug_printf ("Received af_local secret: %08x-%08x-%08x-%08x",
out[0], out[1], out[2], out[3]); out[0], out[1], out[2], out[3]);
if (out[0] != connect_secret[0] || out[1] != connect_secret[1] if (out[0] != connect_secret[0] || out[1] != connect_secret[1]
|| out[2] != connect_secret[2] || out[3] != connect_secret[3]) || out[2] != connect_secret[2] || out[3] != connect_secret[3])
{ {
debug_printf ("Receiving af_local secret mismatch"); debug_printf ("Receiving af_local secret mismatch");
return false; return false;
@ -463,7 +463,7 @@ fhandler_socket::dup (fhandler_base *child)
{ {
fhs->set_sun_path (get_sun_path ()); fhs->set_sun_path (get_sun_path ());
if (get_socket_type () == SOCK_STREAM) if (get_socket_type () == SOCK_STREAM)
{ {
fhs->sec_pid = sec_pid; fhs->sec_pid = sec_pid;
fhs->sec_uid = sec_uid; fhs->sec_uid = sec_uid;
fhs->sec_gid = sec_gid; fhs->sec_gid = sec_gid;
@ -524,7 +524,7 @@ fhandler_socket::fstat (struct __stat64 *buf)
{ {
res = fhandler_base::fstat_fs (buf); res = fhandler_base::fstat_fs (buf);
if (!res) if (!res)
{ {
buf->st_mode = (buf->st_mode & ~S_IFMT) | S_IFSOCK; buf->st_mode = (buf->st_mode & ~S_IFMT) | S_IFSOCK;
} }
} }
@ -800,7 +800,7 @@ fhandler_socket::accept (struct sockaddr *peer, int *len)
{ {
sock->set_sun_path (get_sun_path ()); sock->set_sun_path (get_sun_path ());
if (get_socket_type () == SOCK_STREAM) if (get_socket_type () == SOCK_STREAM)
{ {
/* Don't forget to copy credentials from accepting /* Don't forget to copy credentials from accepting
socket to accepted socket and start transaction socket to accepted socket and start transaction
on accepted socket! */ on accepted socket! */
@ -812,7 +812,7 @@ fhandler_socket::accept (struct sockaddr *peer, int *len)
set_winsock_errno (); set_winsock_errno ();
goto out; goto out;
} }
} }
} }
sock->connect_state (connected); sock->connect_state (connected);
res = res_fd; res = res_fd;
@ -1652,7 +1652,7 @@ fhandler_socket::getpeereid (pid_t *pid, __uid32_t *euid, __gid32_t *egid)
if (sec_peer_pid == (pid_t) 0) if (sec_peer_pid == (pid_t) 0)
{ {
set_errno (ENOTCONN); /* Usually when calling getpeereid on set_errno (ENOTCONN); /* Usually when calling getpeereid on
accepting (instead of accepted) socket. */ accepting (instead of accepted) socket. */
return -1; return -1;
} }

View File

@ -56,7 +56,7 @@ will be autoloaded. To do so, add one of the LoadDllfunc* macros to
autoload.cc. All macros eventually resolve to the following form: autoload.cc. All macros eventually resolve to the following form:
LoadDLLfuncEx2 (function name, parameter block length, dll name, LoadDLLfuncEx2 (function name, parameter block length, dll name,
non-fatality flag , value to return if function not available) non-fatality flag , value to return if function not available)
Parameter block length is a sum of sizes (in bytes) of parameters which are Parameter block length is a sum of sizes (in bytes) of parameters which are
being passed to the function. If non-fatality flag is set to 0, then failure being passed to the function. If non-fatality flag is set to 0, then failure

View File

@ -54,7 +54,7 @@ struct semctl_args {
}; };
struct semget_args { struct semget_args {
key_t key; key_t key;
int nsems; int nsems;
int semflg; int semflg;
}; };
@ -63,7 +63,7 @@ struct semop_args {
int semid; int semid;
struct sembuf *sops; struct sembuf *sops;
size_t nsops; size_t nsops;
}; };
struct shmat_args { struct shmat_args {
int shmid; int shmid;

View File

@ -235,14 +235,14 @@ details. */
108: Remove unused (hopefully) reent_data export. 108: Remove unused (hopefully) reent_data export.
109: Oh well. Someone uses reent_data. 109: Oh well. Someone uses reent_data.
110: Export clock_gettime, sigwaitinfo, timer_create, timer_delete, 110: Export clock_gettime, sigwaitinfo, timer_create, timer_delete,
timer_settime timer_settime
111: Export sigqueue, sighold. 111: Export sigqueue, sighold.
112: Redefine some mtget fields. 112: Redefine some mtget fields.
113: Again redefine some mtget fields. Use mt_fileno and mt_blkno as 113: Again redefine some mtget fields. Use mt_fileno and mt_blkno as
on Linux. on Linux.
114: Export rand_r, ttyname_r. 114: Export rand_r, ttyname_r.
115: Export flockfile, ftrylockfile, funlockfile, getgrgid_r, getgrnam_r, 115: Export flockfile, ftrylockfile, funlockfile, getgrgid_r, getgrnam_r,
getlogin_r. getlogin_r.
116: Export atoll. 116: Export atoll.
117: Export utmpx functions, Return utmp * from pututent. 117: Export utmpx functions, Return utmp * from pututent.
118: Export getpriority, setpriority. 118: Export getpriority, setpriority.

View File

@ -60,29 +60,29 @@
*/ */
struct ip { struct ip {
#ifdef _IP_VHL #ifdef _IP_VHL
u_char ip_vhl; /* version << 4 | header length >> 2 */ u_char ip_vhl; /* version << 4 | header length >> 2 */
#else #else
#if BYTE_ORDER == LITTLE_ENDIAN #if BYTE_ORDER == LITTLE_ENDIAN
u_int ip_hl:4, /* header length */ u_int ip_hl:4, /* header length */
ip_v:4; /* version */ ip_v:4; /* version */
#endif #endif
#if BYTE_ORDER == BIG_ENDIAN #if BYTE_ORDER == BIG_ENDIAN
u_int ip_v:4, /* version */ u_int ip_v:4, /* version */
ip_hl:4; /* header length */ ip_hl:4; /* header length */
#endif #endif
#endif /* not _IP_VHL */ #endif /* not _IP_VHL */
u_char ip_tos; /* type of service */ u_char ip_tos; /* type of service */
u_short ip_len; /* total length */ u_short ip_len; /* total length */
u_short ip_id; /* identification */ u_short ip_id; /* identification */
u_short ip_off; /* fragment offset field */ u_short ip_off; /* fragment offset field */
#define IP_RF 0x8000 /* reserved fragment flag */ #define IP_RF 0x8000 /* reserved fragment flag */
#define IP_DF 0x4000 /* dont fragment flag */ #define IP_DF 0x4000 /* dont fragment flag */
#define IP_MF 0x2000 /* more fragments flag */ #define IP_MF 0x2000 /* more fragments flag */
#define IP_OFFMASK 0x1fff /* mask for fragmenting bits */ #define IP_OFFMASK 0x1fff /* mask for fragmenting bits */
u_char ip_ttl; /* time to live */ u_char ip_ttl; /* time to live */
u_char ip_p; /* protocol */ u_char ip_p; /* protocol */
u_short ip_sum; /* checksum */ u_short ip_sum; /* checksum */
struct in_addr ip_src,ip_dst; /* source and dest address */ struct in_addr ip_src,ip_dst; /* source and dest address */
}; };
#ifdef _IP_VHL #ifdef _IP_VHL
@ -155,24 +155,24 @@ struct ip {
* Time stamp option structure. * Time stamp option structure.
*/ */
struct ip_timestamp { struct ip_timestamp {
u_char ipt_code; /* IPOPT_TS */ u_char ipt_code; /* IPOPT_TS */
u_char ipt_len; /* size of structure (variable) */ u_char ipt_len; /* size of structure (variable) */
u_char ipt_ptr; /* index of current entry */ u_char ipt_ptr; /* index of current entry */
#if BYTE_ORDER == LITTLE_ENDIAN #if BYTE_ORDER == LITTLE_ENDIAN
u_int ipt_flg:4, /* flags, see below */ u_int ipt_flg:4, /* flags, see below */
ipt_oflw:4; /* overflow counter */ ipt_oflw:4; /* overflow counter */
#endif #endif
#if BYTE_ORDER == BIG_ENDIAN #if BYTE_ORDER == BIG_ENDIAN
u_int ipt_oflw:4, /* overflow counter */ u_int ipt_oflw:4, /* overflow counter */
ipt_flg:4; /* flags, see below */ ipt_flg:4; /* flags, see below */
#endif #endif
union ipt_timestamp { union ipt_timestamp {
n_long ipt_time[1]; n_long ipt_time[1];
struct ipt_ta { struct ipt_ta {
struct in_addr ipt_addr; struct in_addr ipt_addr;
n_long ipt_time; n_long ipt_time;
} ipt_ta[1]; } ipt_ta[1];
} ipt_timestamp; } ipt_timestamp;
}; };
/* flag bits for ipt_flg */ /* flag bits for ipt_flg */

View File

@ -57,19 +57,19 @@ typedef u_int32_t tcp_cc; /* connection count per rfc1644 */
* Per RFC 793, September, 1981. * Per RFC 793, September, 1981.
*/ */
struct tcphdr { struct tcphdr {
u_short th_sport; /* source port */ u_short th_sport; /* source port */
u_short th_dport; /* destination port */ u_short th_dport; /* destination port */
tcp_seq th_seq; /* sequence number */ tcp_seq th_seq; /* sequence number */
tcp_seq th_ack; /* acknowledgement number */ tcp_seq th_ack; /* acknowledgement number */
#if BYTE_ORDER == LITTLE_ENDIAN #if BYTE_ORDER == LITTLE_ENDIAN
u_int th_x2:4, /* (unused) */ u_int th_x2:4, /* (unused) */
th_off:4; /* data offset */ th_off:4; /* data offset */
#endif #endif
#if BYTE_ORDER == BIG_ENDIAN #if BYTE_ORDER == BIG_ENDIAN
u_int th_off:4, /* data offset */ u_int th_off:4, /* data offset */
th_x2:4; /* (unused) */ th_x2:4; /* (unused) */
#endif #endif
u_char th_flags; u_char th_flags;
#define TH_FIN 0x01 #define TH_FIN 0x01
#define TH_SYN 0x02 #define TH_SYN 0x02
#define TH_RST 0x04 #define TH_RST 0x04
@ -78,9 +78,9 @@ struct tcphdr {
#define TH_URG 0x20 #define TH_URG 0x20
#define TH_FLAGS (TH_FIN|TH_SYN|TH_RST|TH_ACK|TH_URG) #define TH_FLAGS (TH_FIN|TH_SYN|TH_RST|TH_ACK|TH_URG)
u_short th_win; /* window */ u_short th_win; /* window */
u_short th_sum; /* checksum */ u_short th_sum; /* checksum */
u_short th_urp; /* urgent pointer */ u_short th_urp; /* urgent pointer */
}; };
#define TCPOPT_EOL 0 #define TCPOPT_EOL 0
@ -129,7 +129,7 @@ struct tcphdr {
#define TCP_MAXHLEN (0xf<<2) /* max length of header in bytes */ #define TCP_MAXHLEN (0xf<<2) /* max length of header in bytes */
#define TCP_MAXOLEN (TCP_MAXHLEN - sizeof(struct tcphdr)) #define TCP_MAXOLEN (TCP_MAXHLEN - sizeof(struct tcphdr))
/* max space left for options */ /* max space left for options */
/* /*
* User-settable options (used with setsockopt). * User-settable options (used with setsockopt).

View File

@ -117,8 +117,8 @@ void _pthread_cleanup_push (__pthread_cleanup_handler *handler);
void _pthread_cleanup_pop (int execute); void _pthread_cleanup_pop (int execute);
#define pthread_cleanup_push(_fn, _arg) { __pthread_cleanup_handler __cleanup_handler = \ #define pthread_cleanup_push(_fn, _arg) { __pthread_cleanup_handler __cleanup_handler = \
{ _fn, _arg, NULL }; \ { _fn, _arg, NULL }; \
_pthread_cleanup_push( &__cleanup_handler ); _pthread_cleanup_push( &__cleanup_handler );
#define pthread_cleanup_pop(_execute) _pthread_cleanup_pop( _execute ); } #define pthread_cleanup_pop(_execute) _pthread_cleanup_pop( _execute ); }
/* Condition variables */ /* Condition variables */
@ -174,7 +174,7 @@ int pthread_rwlock_trywrlock (pthread_rwlock_t *rwlock);
int pthread_rwlock_unlock (pthread_rwlock_t *rwlock); int pthread_rwlock_unlock (pthread_rwlock_t *rwlock);
int pthread_rwlockattr_init (pthread_rwlockattr_t *rwlockattr); int pthread_rwlockattr_init (pthread_rwlockattr_t *rwlockattr);
int pthread_rwlockattr_getpshared (const pthread_rwlockattr_t *attr, int pthread_rwlockattr_getpshared (const pthread_rwlockattr_t *attr,
int *pshared); int *pshared);
int pthread_rwlockattr_setpshared (pthread_rwlockattr_t *attr, int pshared); int pthread_rwlockattr_setpshared (pthread_rwlockattr_t *attr, int pshared);
int pthread_rwlockattr_destroy (pthread_rwlockattr_t *rwlockattr); int pthread_rwlockattr_destroy (pthread_rwlockattr_t *rwlockattr);

View File

@ -3,8 +3,8 @@ copyrighted by UCB Berkeley or the Free Software Foundation.
Copyright Information for sources and executables that are marked Copyright Information for sources and executables that are marked
Copyright (C) DJ Delorie Copyright (C) DJ Delorie
24 Kirsten Ave 24 Kirsten Ave
Rochester NH 03867-2954 Rochester NH 03867-2954
This document is Copyright (C) DJ Delorie and may be distributed This document is Copyright (C) DJ Delorie and may be distributed
verbatim, but changing it is not allowed. verbatim, but changing it is not allowed.

View File

@ -7,7 +7,7 @@
details. */ details. */
/* Including this file should not require any Windows headers. */ /* Including this file should not require any Windows headers. */
#ifndef _SYS_DIRENT_H #ifndef _SYS_DIRENT_H
#define _SYS_DIRENT_H #define _SYS_DIRENT_H

View File

@ -22,7 +22,7 @@ typedef void *_LOCK_T;
#define _LOCK_T_INITIALIZER ((_LOCK_T)19) #define _LOCK_T_INITIALIZER ((_LOCK_T)19)
#define __LOCK_INIT(CLASS,NAME) \ #define __LOCK_INIT(CLASS,NAME) \
CLASS _LOCK_T NAME = _LOCK_T_INITIALIZER; CLASS _LOCK_T NAME = _LOCK_T_INITIALIZER;
#define __LOCK_INIT_RECURSIVE(CLASS,NAME) \ #define __LOCK_INIT_RECURSIVE(CLASS,NAME) \
CLASS _LOCK_T NAME = _LOCK_T_RECURSIVE_INITIALIZER; CLASS _LOCK_T NAME = _LOCK_T_RECURSIVE_INITIALIZER;

View File

@ -24,5 +24,5 @@ details. */
# define _funlockfile(fp) __cygwin_lock_unlock ((_LOCK_T *)&(fp)->_lock) # define _funlockfile(fp) __cygwin_lock_unlock ((_LOCK_T *)&(fp)->_lock)
# endif # endif
#endif #endif
#endif #endif

View File

@ -15,7 +15,7 @@ details. */
#define TIOCMGET 0x5415 #define TIOCMGET 0x5415
#define TIOCMSET 0x5418 #define TIOCMSET 0x5418
#define TIOCINQ 0x541B #define TIOCINQ 0x541B
/* TIOCINQ is utilized instead of FIONREAD which has been /* TIOCINQ is utilized instead of FIONREAD which has been
accupied for other purposes under CYGWIN. accupied for other purposes under CYGWIN.

View File

@ -15,10 +15,10 @@ extern "C" {
#include <_ansi.h> #include <_ansi.h>
#include <sys/types.h> #include <sys/types.h>
struct utimbuf struct utimbuf
{ {
time_t actime; time_t actime;
time_t modtime; time_t modtime;
}; };
int _EXFUN(utime, (const char *__path, const struct utimbuf *__buf)); int _EXFUN(utime, (const char *__path, const struct utimbuf *__buf));

View File

@ -22,16 +22,16 @@ extern "C" {
#endif #endif
struct utmp struct utmp
{ {
short ut_type; short ut_type;
pid_t ut_pid; pid_t ut_pid;
char ut_line[UT_LINESIZE]; char ut_line[UT_LINESIZE];
char ut_id[UT_IDLEN]; char ut_id[UT_IDLEN];
time_t ut_time; time_t ut_time;
char ut_user[UT_NAMESIZE]; char ut_user[UT_NAMESIZE];
char ut_host[UT_HOSTSIZE]; char ut_host[UT_HOSTSIZE];
long ut_addr; long ut_addr;
}; };
extern struct utmp *_getutline (struct utmp *); extern struct utmp *_getutline (struct utmp *);

View File

@ -21,14 +21,14 @@ extern "C" {
/* Must be kept in sync with struct utmp as defined in sys/utmp.h! */ /* Must be kept in sync with struct utmp as defined in sys/utmp.h! */
struct utmpx struct utmpx
{ {
short ut_type; short ut_type;
pid_t ut_pid; pid_t ut_pid;
char ut_line[UT_LINESIZE]; char ut_line[UT_LINESIZE];
char ut_id[UT_IDLEN]; char ut_id[UT_IDLEN];
time_t ut_time; time_t ut_time;
char ut_user[UT_NAMESIZE]; char ut_user[UT_NAMESIZE];
char ut_host[UT_HOSTSIZE]; char ut_host[UT_HOSTSIZE];
long ut_addr; long ut_addr;
struct timeval ut_tv; struct timeval ut_tv;
}; };

View File

@ -1,7 +1,7 @@
/* Initial implementation: /* Initial implementation:
Copyright (c) 2002 Robert Drehmel Copyright (c) 2002 Robert Drehmel
All rights reserved. All rights reserved.
As long as the above copyright statement and this notice remain As long as the above copyright statement and this notice remain
unchanged, you can do what ever you want with this file. */ unchanged, you can do what ever you want with this file. */

View File

@ -255,7 +255,7 @@ mmap_record::map_pages (caddr_t addr, DWORD len)
for (DWORD l = 0; l < len; ++l) for (DWORD l = 0; l < len; ++l)
if (MAP_ISSET (off + l)) if (MAP_ISSET (off + l))
{ {
set_errno (EINVAL); set_errno (EINVAL);
return false; return false;
} }
switch (access_mode_) switch (access_mode_)
@ -553,7 +553,7 @@ mmap64 (void *addr, size_t len, int prot, int flags, int fd, _off64_t off)
} }
fh = cfd; fh = cfd;
if (fh->get_device () == FH_ZERO) if (fh->get_device () == FH_ZERO)
{ {
/* mmap /dev/zero is like MAP_ANONYMOUS. */ /* mmap /dev/zero is like MAP_ANONYMOUS. */
fd = -1; fd = -1;
flags |= MAP_ANONYMOUS; flags |= MAP_ANONYMOUS;
@ -600,11 +600,11 @@ mmap64 (void *addr, size_t len, int prot, int flags, int fd, _off64_t off)
return MAP_FAILED; return MAP_FAILED;
} }
/* Don't map beyond EOF. Windows would change the file to the /* Don't map beyond EOF. Windows would change the file to the
new length otherwise, in contrast to POSIX. Allow mapping new length otherwise, in contrast to POSIX. Allow mapping
beyon EOF if MAP_AUTOGROW flag is set. */ beyon EOF if MAP_AUTOGROW flag is set. */
fsiz -= gran_off; fsiz -= gran_off;
if (gran_len > fsiz) if (gran_len > fsiz)
{ {
if ((flags & MAP_AUTOGROW) && (off - gran_off) + len > fsiz) if ((flags & MAP_AUTOGROW) && (off - gran_off) + len > fsiz)
{ {
/* Check if file has been opened for writing. */ /* Check if file has been opened for writing. */
@ -621,9 +621,9 @@ mmap64 (void *addr, size_t len, int prot, int flags, int fd, _off64_t off)
gran_len = fsiz; gran_len = fsiz;
} }
/* If the requested len is <= file size, drop the MAP_AUTOGROW flag. /* If the requested len is <= file size, drop the MAP_AUTOGROW flag.
This simplifes fhandler::mmap's job. */ This simplifes fhandler::mmap's job. */
if ((flags & MAP_AUTOGROW) && gran_len <= fsiz) if ((flags & MAP_AUTOGROW) && gran_len <= fsiz)
flags &= ~MAP_AUTOGROW; flags &= ~MAP_AUTOGROW;
} }
DWORD access = (prot & PROT_WRITE) ? FILE_MAP_WRITE : FILE_MAP_READ; DWORD access = (prot & PROT_WRITE) ? FILE_MAP_WRITE : FILE_MAP_READ;
@ -675,7 +675,7 @@ mmap64 (void *addr, size_t len, int prot, int flags, int fd, _off64_t off)
DWORD u_len; DWORD u_len;
long record_idx = -1; long record_idx = -1;
if ((record_idx = map_list->search_record ((caddr_t)addr, len, if ((record_idx = map_list->search_record ((caddr_t)addr, len,
u_addr, u_len, u_addr, u_len,
record_idx)) >= 0) record_idx)) >= 0)
{ {
mmap_record *rec = map_list->get_record (record_idx); mmap_record *rec = map_list->get_record (record_idx);
@ -1073,14 +1073,14 @@ fhandler_disk_file::mmap (caddr_t *addr, size_t len, DWORD access,
high = (off + len) >> 32; high = (off + len) >> 32;
low = (off + len) & UINT32_MAX; low = (off + len) & UINT32_MAX;
/* Auto-grow in CreateFileMapping only works if the protection is /* Auto-grow in CreateFileMapping only works if the protection is
PAGE_READWRITE. So, first we call CreateFileMapping with PAGE_READWRITE. So, first we call CreateFileMapping with
PAGE_READWRITE, then, if the requested protection is different, we PAGE_READWRITE, then, if the requested protection is different, we
close the mapping and reopen it again with the correct protection, close the mapping and reopen it again with the correct protection,
*iff* auto-grow worked. */ *iff* auto-grow worked. */
h = CreateFileMapping (get_handle (), &sec_none, PAGE_READWRITE, h = CreateFileMapping (get_handle (), &sec_none, PAGE_READWRITE,
high, low, NULL); high, low, NULL);
if (h && protect != PAGE_READWRITE) if (h && protect != PAGE_READWRITE)
{ {
CloseHandle (h); CloseHandle (h);
h = CreateFileMapping (get_handle (), &sec_none, protect, h = CreateFileMapping (get_handle (), &sec_none, protect,
high, low, NULL); high, low, NULL);
@ -1110,11 +1110,11 @@ fhandler_disk_file::mmap (caddr_t *addr, size_t len, DWORD access,
phys.QuadPart = (ULONGLONG) off; phys.QuadPart = (ULONGLONG) off;
ULONG ulen = len; ULONG ulen = len;
base = *addr ?: (void *) mmapped_areas->get_next_anon_addr (); base = *addr ?: (void *) mmapped_areas->get_next_anon_addr ();
NTSTATUS ret = NtMapViewOfSection (h, INVALID_HANDLE_VALUE, &base, 0L, NTSTATUS ret = NtMapViewOfSection (h, INVALID_HANDLE_VALUE, &base, 0L,
ulen, &phys, &ulen, ViewShare, ulen, &phys, &ulen, ViewShare,
base ? AT_ROUND_TO_PAGE : 0, protect); base ? AT_ROUND_TO_PAGE : 0, protect);
if (ret != STATUS_SUCCESS) if (ret != STATUS_SUCCESS)
{ {
__seterrno_from_nt_status (ret); __seterrno_from_nt_status (ret);
base = NULL; base = NULL;
} }
@ -1192,11 +1192,11 @@ fhandler_disk_file::fixup_mmap_after_fork (HANDLE h, DWORD access, int flags,
protect = PAGE_WRITECOPY; protect = PAGE_WRITECOPY;
break; break;
} }
NTSTATUS ret = NtMapViewOfSection (h, INVALID_HANDLE_VALUE, &base, 0L, NTSTATUS ret = NtMapViewOfSection (h, INVALID_HANDLE_VALUE, &base, 0L,
ulen, &phys, &ulen, ViewShare, ulen, &phys, &ulen, ViewShare,
AT_ROUND_TO_PAGE, protect); AT_ROUND_TO_PAGE, protect);
if (ret != STATUS_SUCCESS) if (ret != STATUS_SUCCESS)
__seterrno_from_nt_status (ret); __seterrno_from_nt_status (ret);
} }
else else
base = MapViewOfFileEx (h, access, 0, offset, size, address); base = MapViewOfFileEx (h, access, 0, offset, size, address);

View File

@ -768,7 +768,7 @@ cygwin_getsockopt (int fd, int level, int optname, void *optval, int *optlen)
name = "SO_ERROR"; name = "SO_ERROR";
break; break;
case SO_PEERCRED: case SO_PEERCRED:
name = "SO_PEERCRED"; name = "SO_PEERCRED";
} }
if ((optval if ((optval

View File

@ -18,7 +18,7 @@ _$newsym:
.section .idata\$7 .section .idata\$7
.long __head_cygwin1_dll .long __head_cygwin1_dll
.section .idata\$5 .section .idata\$5
__imp__$newsym: .rva 1f __imp__$newsym: .rva 1f
.section .idata\$4 .section .idata\$4

View File

@ -382,9 +382,9 @@ typedef struct _FILE_ACCESS_INFORMATION {
ACCESS_MASK AccessFlags; ACCESS_MASK AccessFlags;
} FILE_ACCESS_INFORMATION, *PFILE_ACCESS_INFORMATION; } FILE_ACCESS_INFORMATION, *PFILE_ACCESS_INFORMATION;
typedef struct _FILE_POSITION_INFORMATION { typedef struct _FILE_POSITION_INFORMATION {
LARGE_INTEGER CurrentByteOffset; LARGE_INTEGER CurrentByteOffset;
} FILE_POSITION_INFORMATION, *PFILE_POSITION_INFORMATION; } FILE_POSITION_INFORMATION, *PFILE_POSITION_INFORMATION;
typedef struct _FILE_MODE_INFORMATION { typedef struct _FILE_MODE_INFORMATION {
ULONG Mode; ULONG Mode;
@ -394,10 +394,10 @@ typedef struct _FILE_ALIGNMENT_INFORMATION {
ULONG AlignmentRequirement; ULONG AlignmentRequirement;
} FILE_ALIGNMENT_INFORMATION; } FILE_ALIGNMENT_INFORMATION;
typedef struct _FILE_NAME_INFORMATION { typedef struct _FILE_NAME_INFORMATION {
ULONG FileNameLength; ULONG FileNameLength;
WCHAR FileName[1]; WCHAR FileName[1];
} FILE_NAME_INFORMATION, *PFILE_NAME_INFORMATION; } FILE_NAME_INFORMATION, *PFILE_NAME_INFORMATION;
typedef struct _FILE_ALL_INFORMATION { typedef struct _FILE_ALL_INFORMATION {
FILE_BASIC_INFORMATION BasicInformation; FILE_BASIC_INFORMATION BasicInformation;

View File

@ -589,7 +589,7 @@ path_conv::check (const char *src, unsigned opt,
sym.contents[0] = '\0'; sym.contents[0] = '\0';
int symlen = 0; int symlen = 0;
for (unsigned pflags_or = opt & PC_NO_ACCESS_CHECK; ; pflags_or = 0) for (unsigned pflags_or = opt & PC_NO_ACCESS_CHECK; ; pflags_or = 0)
{ {
const suffix_info *suff; const suffix_info *suff;
@ -637,7 +637,7 @@ path_conv::check (const char *src, unsigned opt,
fhandler_virtual *fh = (fhandler_virtual *) build_fh_dev (dev, path_copy); fhandler_virtual *fh = (fhandler_virtual *) build_fh_dev (dev, path_copy);
int file_type = fh->exists (); int file_type = fh->exists ();
if (file_type == -2) if (file_type == -2)
{ {
fh->fill_filebuf (); fh->fill_filebuf ();
symlen = sym.set (fh->get_filebuf ()); symlen = sym.set (fh->get_filebuf ());
} }
@ -756,11 +756,11 @@ is_virtual_symlink:
error = sym.error; error = sym.error;
if (component == 0) if (component == 0)
add_ext_from_sym (sym); add_ext_from_sym (sym);
else if (!(sym.fileattr & FILE_ATTRIBUTE_DIRECTORY)) else if (!(sym.fileattr & FILE_ATTRIBUTE_DIRECTORY))
{ {
error = ENOTDIR; error = ENOTDIR;
goto out; goto out;
} }
if (pcheck_case == PCHECK_RELAXED) if (pcheck_case == PCHECK_RELAXED)
goto out; // file found goto out; // file found
/* Avoid further symlink evaluation. Only case checks are /* Avoid further symlink evaluation. Only case checks are
@ -2509,7 +2509,7 @@ is_floppy (const char *dos)
if (!QueryDosDevice (dos, dev, 256)) if (!QueryDosDevice (dos, dev, 256))
return false; return false;
return strncasematch (dev, "\\Device\\Floppy", 14) return strncasematch (dev, "\\Device\\Floppy", 14)
|| strcasematch (dev, "A:"); || strcasematch (dev, "A:");
} }
extern "C" FILE * extern "C" FILE *
@ -2652,7 +2652,7 @@ symlink_worker (const char *topath, const char *frompath, bool use_winsym,
{ {
win32_topath.check (topath, PC_SYM_NOFOLLOW); win32_topath.check (topath, PC_SYM_NOFOLLOW);
if (win32_topath.error != ENOENT) if (win32_topath.error != ENOENT)
strcpy (use_winsym ? reltopath : w32topath, win32_topath); strcpy (use_winsym ? reltopath : w32topath, win32_topath);
} }
else if (!use_winsym) else if (!use_winsym)
strcpy (w32topath, reltopath); strcpy (w32topath, reltopath);
@ -2668,7 +2668,7 @@ symlink_worker (const char *topath, const char *frompath, bool use_winsym,
} }
} }
else else
{ {
win32_topath.check (topath, PC_FULL | PC_SYM_NOFOLLOW); win32_topath.check (topath, PC_FULL | PC_SYM_NOFOLLOW);
strcpy (w32topath, win32_topath); strcpy (w32topath, win32_topath);
} }
@ -2802,7 +2802,7 @@ cmp_shortcut_header (win_shortcut_hdr *file_header)
return file_header->size == sizeof (win_shortcut_hdr) return file_header->size == sizeof (win_shortcut_hdr)
&& !memcmp (&file_header->magic, &GUID_shortcut, sizeof GUID_shortcut) && !memcmp (&file_header->magic, &GUID_shortcut, sizeof GUID_shortcut)
&& (file_header->flags & ~WSH_FLAG_IDLIST) && (file_header->flags & ~WSH_FLAG_IDLIST)
== (WSH_FLAG_DESC | WSH_FLAG_RELPATH) == (WSH_FLAG_DESC | WSH_FLAG_RELPATH)
&& file_header->run == SW_NORMAL; && file_header->run == SW_NORMAL;
} }
@ -4014,7 +4014,7 @@ basename (char *path)
{ {
/* Trailing (back)slashes are eliminated. */ /* Trailing (back)slashes are eliminated. */
while (c && c > bs && c[1] == '\0') while (c && c > bs && c[1] == '\0')
{ {
*c = '\0'; *c = '\0';
c = strrchr (bs, '/'); c = strrchr (bs, '/');
if ((d = strrchr (c ?: bs, '\\')) > c) if ((d = strrchr (c ?: bs, '\\')) > c)
@ -4052,22 +4052,22 @@ dirname (char *path)
{ {
/* Trailing (back)slashes are eliminated. */ /* Trailing (back)slashes are eliminated. */
while (c && c > bs && c[1] == '\0') while (c && c > bs && c[1] == '\0')
{ {
*c = '\0'; *c = '\0';
c = strrchr (bs, '/'); c = strrchr (bs, '/');
if ((d = strrchr (c ?: bs, '\\')) > c) if ((d = strrchr (c ?: bs, '\\')) > c)
c = d; c = d;
} }
if (!c) if (!c)
strcpy (bs, "."); strcpy (bs, ".");
else if (c > bs) else if (c > bs)
{ {
/* More trailing (back)slashes are eliminated. */ /* More trailing (back)slashes are eliminated. */
while (c > bs && (*c == '/' || *c == '\\')) while (c > bs && (*c == '/' || *c == '\\'))
*c-- = '\0'; *c-- = '\0';
} }
else else
c[1] = '\0'; c[1] = '\0';
} }
else else
strcpy (bs, "."); strcpy (bs, ".");

View File

@ -114,7 +114,7 @@ pinfo::maybe_set_exit_code_from_windows ()
if (hProcess && !(self->exitcode & EXITCODE_SET)) if (hProcess && !(self->exitcode & EXITCODE_SET))
{ {
WaitForSingleObject (hProcess, INFINITE); // just to be safe, in case WaitForSingleObject (hProcess, INFINITE); // just to be safe, in case
// process hasn't quite exited // process hasn't quite exited
// after closing pipe // after closing pipe
GetExitCodeProcess (hProcess, &x); GetExitCodeProcess (hProcess, &x);
self->exitcode = EXITCODE_SET | (x & 0xff) << 8; self->exitcode = EXITCODE_SET | (x & 0xff) << 8;
@ -467,7 +467,7 @@ _pinfo::commune_recv ()
} }
case PICOM_CWD: case PICOM_CWD:
{ {
CloseHandle (__fromthem); __fromthem = NULL; CloseHandle (__fromthem); __fromthem = NULL;
CloseHandle (hp); CloseHandle (hp);
unsigned int n = strlen (cygheap->cwd.get (path, 1, 1, unsigned int n = strlen (cygheap->cwd.get (path, 1, 1,
CYG_MAX_PATH)) + 1; CYG_MAX_PATH)) + 1;
@ -479,7 +479,7 @@ _pinfo::commune_recv ()
} }
case PICOM_ROOT: case PICOM_ROOT:
{ {
CloseHandle (__fromthem); __fromthem = NULL; CloseHandle (__fromthem); __fromthem = NULL;
CloseHandle (hp); CloseHandle (hp);
unsigned int n; unsigned int n;
if (cygheap->root.exists ()) if (cygheap->root.exists ())
@ -494,7 +494,7 @@ _pinfo::commune_recv ()
} }
case PICOM_FDS: case PICOM_FDS:
{ {
CloseHandle (__fromthem); __fromthem = NULL; CloseHandle (__fromthem); __fromthem = NULL;
CloseHandle (hp); CloseHandle (hp);
unsigned int n = 0; unsigned int n = 0;
int fd; int fd;
@ -511,7 +511,7 @@ _pinfo::commune_recv ()
sigproc_printf ("WriteFile fd %d failed, %E", fd); sigproc_printf ("WriteFile fd %d failed, %E", fd);
break; break;
} }
break; break;
} }
case PICOM_PIPE_FHANDLER: case PICOM_PIPE_FHANDLER:
{ {
@ -563,7 +563,7 @@ _pinfo::commune_recv ()
sigproc_printf ("WriteFile sizeof fd failed, %E"); sigproc_printf ("WriteFile sizeof fd failed, %E");
else if (!WriteFile (__tothem, path, n, &nr, NULL)) else if (!WriteFile (__tothem, path, n, &nr, NULL))
sigproc_printf ("WriteFile fd failed, %E"); sigproc_printf ("WriteFile fd failed, %E");
break; break;
} }
case PICOM_FIFO: case PICOM_FIFO:
{ {
@ -729,9 +729,9 @@ _pinfo::commune_send (DWORD code, ...)
goto err; goto err;
} }
if (!n) if (!n)
res.s = NULL; res.s = NULL;
else else
{ {
res.s = (char *) malloc (n); res.s = (char *) malloc (n);
char *p; char *p;
for (p = res.s; ReadFile (fromthem, p, n, &nr, NULL); p += nr) for (p = res.s; ReadFile (fromthem, p, n, &nr, NULL); p += nr)
@ -741,7 +741,7 @@ _pinfo::commune_send (DWORD code, ...)
__seterrno (); __seterrno ();
goto err; goto err;
} }
} }
res.n = n; res.n = n;
break; break;
case PICOM_FIFO: case PICOM_FIFO:

View File

@ -134,7 +134,7 @@ poll (struct pollfd *fds, unsigned int nfds, int timeout)
&& (sock = cygheap->fdtab[fds[i].fd]->is_socket ()) && (sock = cygheap->fdtab[fds[i].fd]->is_socket ())
&& sock->connect_state () == connect_failed) && sock->connect_state () == connect_failed)
fds[i].revents |= (POLLIN | POLLERR); fds[i].revents |= (POLLIN | POLLERR);
else else
{ {
if (FD_ISSET(fds[i].fd, write_fds)) if (FD_ISSET(fds[i].fd, write_fds))
fds[i].revents |= POLLOUT; fds[i].revents |= POLLOUT;

View File

@ -80,7 +80,7 @@ size_t errbuf_size;
for (r = rerrs; r->code >= 0; r++) for (r = rerrs; r->code >= 0; r++)
if (r->code == target) if (r->code == target)
break; break;
if (errcode&REG_ITOA) { if (errcode&REG_ITOA) {
if (r->code >= 0) if (r->code >= 0)
(void) strcpy(convbuf, r->name); (void) strcpy(convbuf, r->name);

View File

@ -360,7 +360,7 @@ void set_cygwin_privileges (HANDLE token);
#define pop_thread_privilege() \ #define pop_thread_privilege() \
if (_dup_token) \ if (_dup_token) \
{ \ { \
ImpersonateLoggedOnUser (_token); \ ImpersonateLoggedOnUser (_token); \
CloseHandle (_dup_token); \ CloseHandle (_dup_token); \
} \ } \
} }

View File

@ -180,7 +180,7 @@ pselect(int maxfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
set_signal_mask (*set); set_signal_mask (*set);
} }
int ret = cygwin_select (maxfds, readfds, writefds, exceptfds, int ret = cygwin_select (maxfds, readfds, writefds, exceptfds,
ts ? &tv : NULL); ts ? &tv : NULL);
if (set) if (set)
set_signal_mask (oldset); set_signal_mask (oldset);
return ret; return ret;
@ -603,7 +603,7 @@ out:
gotone += s->write_ready = true; gotone += s->write_ready = true;
} }
#else #else
gotone += s->write_ready = true; gotone += s->write_ready = true;
#endif #endif
} }
} }

View File

@ -473,8 +473,8 @@ create_signal_arrived ()
ProtectHandle (signal_arrived); ProtectHandle (signal_arrived);
} }
/* Message initialization. Called from dll_crt0_1 /* Signal thread initialization. Called from dll_crt0_1.
This routine starts the signal handling thread. The wait_sig_inited This routine starts the signal handling thread. The wait_sig_inited
event is used to signal that the thread is ready to handle signals. event is used to signal that the thread is ready to handle signals.
We don't wait for this during initialization but instead detect it We don't wait for this during initialization but instead detect it

View File

@ -149,7 +149,7 @@ strace::vsprntf (char *buf, const char *func, const char *infmt, va_list ap)
*p = '\000'; *p = '\000';
p = progname; p = progname;
count = __small_sprintf (buf, fmt, p && *p ? p : "?", count = __small_sprintf (buf, fmt, p && *p ? p : "?",
myself->pid ?: GetCurrentProcessId (), myself->pid ?: GetCurrentProcessId (),
execing ? "!" : ""); execing ? "!" : "");
if (func) if (func)
count += getfunc (buf + count, func); count += getfunc (buf + count, func);

View File

@ -925,7 +925,7 @@ fsync (int fd)
EXPORT_ALIAS (fsync, fdatasync) EXPORT_ALIAS (fsync, fdatasync)
static void static void
sync_worker (const char *vol) sync_worker (const char *vol)
{ {
HANDLE fh = CreateFileA (vol, GENERIC_WRITE, wincap.shared (), HANDLE fh = CreateFileA (vol, GENERIC_WRITE, wincap.shared (),
@ -944,16 +944,16 @@ extern "C" void
sync () sync ()
{ {
char vol[CYG_MAX_PATH]; char vol[CYG_MAX_PATH];
if (wincap.has_guid_volumes ()) /* Win2k and newer */ if (wincap.has_guid_volumes ()) /* Win2k and newer */
{ {
char a_drive[CYG_MAX_PATH] = {0}; char a_drive[CYG_MAX_PATH] = {0};
char b_drive[CYG_MAX_PATH] = {0}; char b_drive[CYG_MAX_PATH] = {0};
if (is_floppy ("A:")) if (is_floppy ("A:"))
GetVolumeNameForVolumeMountPointA ("A:\\", a_drive, CYG_MAX_PATH); GetVolumeNameForVolumeMountPointA ("A:\\", a_drive, CYG_MAX_PATH);
if (is_floppy ("B:")) if (is_floppy ("B:"))
GetVolumeNameForVolumeMountPointA ("B:\\", a_drive, CYG_MAX_PATH); GetVolumeNameForVolumeMountPointA ("B:\\", a_drive, CYG_MAX_PATH);
HANDLE sh = FindFirstVolumeA (vol, CYG_MAX_PATH); HANDLE sh = FindFirstVolumeA (vol, CYG_MAX_PATH);
if (sh != INVALID_HANDLE_VALUE) if (sh != INVALID_HANDLE_VALUE)
@ -964,7 +964,7 @@ sync ()
/* Check vol for being a floppy on A: or B:. Skip them. */ /* Check vol for being a floppy on A: or B:. Skip them. */
if (strcasematch (vol, a_drive) || strcasematch (vol, b_drive)) if (strcasematch (vol, a_drive) || strcasematch (vol, b_drive))
{ {
debug_printf ("Is floppy, don't sync"); debug_printf ("Is floppy, don't sync");
continue; continue;
} }
@ -988,7 +988,7 @@ sync ()
drives &= ~2; drives &= ~2;
strcpy (vol, "\\\\.\\A:"); strcpy (vol, "\\\\.\\A:");
do do
{ {
/* Geeh. Try to sync only non-floppy drives. */ /* Geeh. Try to sync only non-floppy drives. */
if (drives & mask) if (drives & mask)
{ {
@ -1208,9 +1208,9 @@ rename (const char *oldpath, const char *newpath)
if (real_old.isdir () if (real_old.isdir ()
&& ((lasterr == ERROR_SHARING_VIOLATION && wincap.has_move_file_ex ()) && ((lasterr == ERROR_SHARING_VIOLATION && wincap.has_move_file_ex ())
|| (lasterr == ERROR_ACCESS_DENIED && !real_new.exists () || (lasterr == ERROR_ACCESS_DENIED && !real_new.exists ()
&& !wincap.has_move_file_ex ()) && !wincap.has_move_file_ex ())
|| (lasterr == ERROR_ALREADY_EXISTS && real_new.exists () || (lasterr == ERROR_ALREADY_EXISTS && real_new.exists ()
&& !wincap.has_move_file_ex ())) && !wincap.has_move_file_ex ()))
&& (len = strlen (real_old), strncasematch (real_old, real_new, len)) && (len = strlen (real_old), strncasematch (real_old, real_new, len))
&& real_new[len] == '\\') && real_new[len] == '\\')
SetLastError (ERROR_INVALID_PARAMETER); SetLastError (ERROR_INVALID_PARAMETER);
@ -1743,7 +1743,7 @@ statvfs (const char *fname, struct statvfs *sfs)
else else
availc = freec; availc = freec;
if (GetVolumeInformation (root, NULL, 0, &vsn, &maxlen, &flags, NULL, 0)) if (GetVolumeInformation (root, NULL, 0, &vsn, &maxlen, &flags, NULL, 0))
{ {
sfs->f_bsize = spc*bps; sfs->f_bsize = spc*bps;
sfs->f_frsize = spc*bps; sfs->f_frsize = spc*bps;
sfs->f_blocks = totalc; sfs->f_blocks = totalc;
@ -1966,7 +1966,7 @@ extern "C" int
seteuid32 (__uid32_t uid) seteuid32 (__uid32_t uid)
{ {
debug_printf ("uid: %u myself->uid: %u myself->gid: %u", debug_printf ("uid: %u myself->uid: %u myself->gid: %u",
uid, myself->uid, myself->gid); uid, myself->uid, myself->gid);
if (uid == myself->uid && !cygheap->user.groups.ischanged) if (uid == myself->uid && !cygheap->user.groups.ischanged)
{ {
@ -2055,7 +2055,7 @@ seteuid32 (__uid32_t uid)
/* Try setting default DACL */ /* Try setting default DACL */
char dacl_buf[MAX_DACL_LEN (5)]; char dacl_buf[MAX_DACL_LEN (5)];
if (sec_acl ((PACL) dacl_buf, true, true, usersid)) if (sec_acl ((PACL) dacl_buf, true, true, usersid))
{ {
TOKEN_DEFAULT_DACL tdacl = { (PACL) dacl_buf }; TOKEN_DEFAULT_DACL tdacl = { (PACL) dacl_buf };
if (!SetTokenInformation (new_token, TokenDefaultDacl, if (!SetTokenInformation (new_token, TokenDefaultDacl,
&tdacl, sizeof (tdacl))) &tdacl, sizeof (tdacl)))
@ -2175,7 +2175,7 @@ setegid32 (__gid32_t gid)
{ {
/* If impersonated, update impersonation token... */ /* If impersonated, update impersonation token... */
if (!SetTokenInformation (cygheap->user.primary_token (), if (!SetTokenInformation (cygheap->user.primary_token (),
TokenPrimaryGroup, &gsid, sizeof gsid)) TokenPrimaryGroup, &gsid, sizeof gsid))
debug_printf ("SetTokenInformation(primary_token, " debug_printf ("SetTokenInformation(primary_token, "
"TokenPrimaryGroup), %E"); "TokenPrimaryGroup), %E");
if (!SetTokenInformation (cygheap->user.token (), TokenPrimaryGroup, if (!SetTokenInformation (cygheap->user.token (), TokenPrimaryGroup,
@ -2467,7 +2467,7 @@ getpriority (int which, id_t who)
{ {
_pinfo *p = pids[i]; _pinfo *p = pids[i];
if (p) if (p)
switch (which) switch (which)
{ {
case PRIO_PROCESS: case PRIO_PROCESS:
if ((pid_t) who == p->pid) if ((pid_t) who == p->pid)

View File

@ -1,6 +1,6 @@
/* syslog.cc /* syslog.cc
Copyright 1996, 1997, 1998, 1999, 2000, 2001 Red Hat, Inc. Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Red Hat, Inc.
This file is part of Cygwin. This file is part of Cygwin.
@ -201,11 +201,11 @@ try_connect_syslogd (const char *msg, int len)
if (stat64 (_PATH_LOG, &st) || !S_ISSOCK (st.st_mode)) if (stat64 (_PATH_LOG, &st) || !S_ISSOCK (st.st_mode))
goto out; goto out;
if ((fd = cygwin_socket (AF_LOCAL, SOCK_DGRAM, 0)) < 0) if ((fd = cygwin_socket (AF_LOCAL, SOCK_DGRAM, 0)) < 0)
goto out; goto out;
sa.sa_family = AF_LOCAL; sa.sa_family = AF_LOCAL;
strncpy (sa.sa_data, _PATH_LOG, sizeof sa.sa_data); strncpy (sa.sa_data, _PATH_LOG, sizeof sa.sa_data);
if (cygwin_connect (fd, &sa, sizeof sa)) if (cygwin_connect (fd, &sa, sizeof sa))
{ {
if (get_errno () != EPROTOTYPE) if (get_errno () != EPROTOTYPE)
{ {
close (fd); close (fd);
@ -230,9 +230,9 @@ out:
{ {
ret = write (syslogd_sock, msg, len); ret = write (syslogd_sock, msg, len);
/* If write fails and LOG_CONS is set, return failure to vsyslog so /* If write fails and LOG_CONS is set, return failure to vsyslog so
it falls back to the usual logging method for this OS. */ it falls back to the usual logging method for this OS. */
if (ret >= 0 || !(_my_tls.locals.process_logopt & LOG_CONS)) if (ret >= 0 || !(_my_tls.locals.process_logopt & LOG_CONS))
ret = syslogd_sock; ret = syslogd_sock;
} }
try_connect_guard.release (); try_connect_guard.release ();
return ret; return ret;

View File

@ -66,7 +66,7 @@ timer_tracker::cancel ()
{ {
if (!hcancel) if (!hcancel)
return false; return false;
SetEvent (hcancel); SetEvent (hcancel);
if (WaitForSingleObject (syncthread, INFINITE) != WAIT_OBJECT_0) if (WaitForSingleObject (syncthread, INFINITE) != WAIT_OBJECT_0)
api_fatal ("WFSO failed waiting for timer thread, %E"); api_fatal ("WFSO failed waiting for timer thread, %E");
@ -128,7 +128,7 @@ timer_thread (VOID *x)
long long sleep_us; long long sleep_us;
long sleep_ms; long sleep_ms;
/* Account for delays in starting thread /* Account for delays in starting thread
and sending the signal */ and sending the signal */
now = gtod.usecs (false); now = gtod.usecs (false);
sleep_us = sleepto_us - now; sleep_us = sleepto_us - now;
if (sleep_us > 0) if (sleep_us > 0)

View File

@ -450,7 +450,7 @@ cygheap_user::env_systemroot (const char *name, size_t namelen)
{ {
int size = GetWindowsDirectory (NULL, 0); int size = GetWindowsDirectory (NULL, 0);
if (size > 0) if (size > 0)
{ {
psystemroot = (char *) cmalloc (HEAP_STR, ++size); psystemroot = (char *) cmalloc (HEAP_STR, ++size);
size = GetWindowsDirectory (psystemroot, size); size = GetWindowsDirectory (psystemroot, size);
if (size <= 0) if (size <= 0)
@ -460,7 +460,7 @@ cygheap_user::env_systemroot (const char *name, size_t namelen)
} }
} }
if (size <= 0) if (size <= 0)
debug_printf ("GetWindowsDirectory(), %E"); debug_printf ("GetWindowsDirectory(), %E");
} }
return psystemroot; return psystemroot;
} }