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
you can exec a non-gnuwin32 program and wait for its
result.
* Makefile.in: Turn off frame-pointer.
* dcrt0.cc (environ_init): Lint.
* 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.
* times.cc (utime): New function.
* uname.cc (uname): Dig out more info.
Wed Dec 13 05:54:55 1995 Michael Meissner <meissner@tiktok.cygnus.com>
* 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>
Release-B10
* cygwin.dll (__assert, wait, spawnv, spawnvp): Deleted.
* dcrt0.c: Quoting rewritten.
* 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)
* spawn.cc (spawn_guts): quote doublequotes correctly
Tue Nov 14 15:05:33 1995 Jason Molenda (crash@phydeaux.cygnus.com)
* 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
hmodule in u area. Added prototype for recreate_mmaps_after_fork().
* include/sys/mman.h: Fixed include file for mmap calls.
Tue Dec 17 16:20:52 1996 Geoffrey Noer <noer@cygnus.com>
* 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>
* cygwin.din: Added h_errno, seteuid, _seteuid.
* exceptions.cc: Made init_exceptions extern "C".
* exceptions.h: Added cplusplus wrappers to enable this to
be used from C.
* net.cc: Added error numbers, fixed gethostbyaddr, added h_errno
fixes.
* stubs.cc: Added seteuid.
* include/mywinsock.h: Added HOST error entries for DNS lookups.
* cygwin.din: Added h_errno, seteuid, _seteuid.
* exceptions.cc: Made init_exceptions extern "C".
* exceptions.h: Added cplusplus wrappers to enable this to
be used from C.
* net.cc: Added error numbers, fixed gethostbyaddr, added h_errno
fixes.
* stubs.cc: Added seteuid.
* include/mywinsock.h: Added HOST error entries for DNS lookups.
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>
* 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
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>
* include/custcntl.h
* include/features.h
* include/icmp.h
* include/wchar.h
* include/cygwin32/icmp.h
* include/cygwin32/ip.h
* include/cygwin32/sockios.h
* include/cygwin32/types.h
* include/cygwin32/uio.h
* include/sys/ttychars.h
Added comment with name of header to each so that these are no
longer empty files (some unzip programs won't create
zero-length files which is a problem for headers)
* include/custcntl.h
* include/features.h
* include/icmp.h
* include/wchar.h
* include/cygwin32/icmp.h
* include/cygwin32/ip.h
* include/cygwin32/sockios.h
* include/cygwin32/types.h
* include/cygwin32/uio.h
* include/sys/ttychars.h
Added comment with name of header to each so that these are no
longer empty files (some unzip programs won't create
zero-length files which is a problem for headers)
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
the following cases. (1). All sockets [written&works]
(2). Handles, sockets and always readies [written,not tested]
(3). All handles [written,not tested]. (4). Handles & sockets
with timeout [not yet written,returns -1]. Correctly blocks
(2). Handles, sockets and always readies [written,not tested]
(3). All handles [written,not tested]. (4). Handles & sockets
with timeout [not yet written,returns -1]. Correctly blocks
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.
* shared.cc: Fixed bug with fork()->exec()->exec() code.
* 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>
* fhandler.h: Many changes to support moving fhandler array out of
shared area into locally allocated memory. Removed fhandler class,
fhandler_base is now root of class tree. Re-arranged class definitions
to make it clear what functions are virtual and can be overridden.
shared area into locally allocated memory. Removed fhandler class,
fhandler_base is now root of class tree. Re-arranged class definitions
to make it clear what functions are virtual and can be overridden.
Inlined may accessor functions.
* fhandler.cc: Many changes to support moving fhandler array out of
shared area into locally allocated memory. unix_path_name_ is now
* fhandler.cc: Many changes to support moving fhandler array out of
shared area into locally allocated memory. unix_path_name_ is now
always set (all fhandler_base classes have a name).
* 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.
* net.cc(socket): Added code to keep name for fhandler_socket.
* 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::record_death).
* 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>
* 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
integrate new headers.
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
work (fchmod isn't written yet).
* (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.
Changed name member to unix_path_name_ and made dynamic rather
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.
* hinfo.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
* 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
* Makefile.in: don't build libcfork.cc any more
* libccrt0.cc: set data_start, etc. from dll structure
* 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>
* cygwin.din: list vfork
* dirsearch.cc: fix errno setting in readdir that caused
diff to not function on directories
* pipe.cc: reformatted
* cygwin.din: list vfork
* dirsearch.cc: fix errno setting in readdir that caused
diff to not function on directories
* pipe.cc: reformatted
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.
* fork.cc (FORK_WAIT_TIMEOUT): Bump up to two minutes.
* fork.cc (dump_jmp_buf): New function.
(cygwin_fork_helper1): 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>
* syscalls.cc (_rename): return -1 if file to be renamed
doesn't exist. Reformatted whole file.
* syscalls.cc (_rename): return -1 if file to be renamed
doesn't exist. Reformatted whole file.
* fork.cc: increase timeout value to 60 sec from 30 sec
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.
* 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): Delete local can_glob, use
u->self->invoked_by_cygwin_p instead.
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.
* syscalls.cc (getppid): Update.
* wait.cc (wait_for_any): Likewise.
Mon May 13 13:45:36 1996 Mark Eichin <eichin@cygnus.com>
* 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>
* select.cc: change most debugging statements to select_printf.
(dbg_input_event): new function, prints an INPUT_RECORD via select
printf.
(dbg_input_event): new function, prints an INPUT_RECORD via select
printf.
(polled): Don't sleep around WaitForMultipleObjects; let it have a
10ms timeout until we have time to test it with 0. If
WaitForMultipleObjects says that STD_INPUT_HANDLE has data, use
PeekConsoleInput to scan the available events. If the first one is
not a *bKeyDown* with a non-zero *AsciiChar* then use
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
because they can't find any *real* input. (This could be optimized
10ms timeout until we have time to test it with 0. If
WaitForMultipleObjects says that STD_INPUT_HANDLE has data, use
PeekConsoleInput to scan the available events. If the first one is
not a *bKeyDown* with a non-zero *AsciiChar* then use
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
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
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.
* fhandler.cc (fhandler_console_in::init): IGNCR can't work
without major changes to deal with the interaction with select
(which shouldn't wake up if IGNCR causes the whole input to be
deleted...) so don't make it the default.
without major changes to deal with the interaction with select
(which shouldn't wake up if IGNCR causes the whole input to be
deleted...) so don't make it the default.
(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>
@ -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>
* winsup.h (pinfo, pinfo_list): Remove dummy item.
* winsup.h (pinfo, pinfo_list): Remove dummy item.
* fork.cc (*): Revert changes of Apr 2.
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.
* winsup.h (pinfo, pinfo_list): Reorder elements to avoid
alignment bug in PPC gcc.
Tue Apr 9 17:23:57 1996 steve chamberlain <sac@slash.cygnus.com>
* 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.
* syscalls.cc (_sbrk): Cope with not being able to
allocate contiguous chunks.
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.
* smallprint.c (__small_vsprintf): Add 'c' option.
* wait.cc (wait_found): Close child handles.
Mon Feb 19 09:11:57 1996 Michael Meissner <meissner@tiktok.cygnus.com>
* 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.
(sbrk): Clean up.
(_unlink): Only try and DeleteFile once.
Mon Feb 5 19:15:44 1996 Steve Chamberlain <sac@slash.cygnus.com>
* 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.
* setjmp.c, longjmp.c: Moved into config/i386.
* config/ppc/setjmp.S, config/ppc/longjmp.S: New.
Fri Jan 26 14:57:33 1996 Jason Molenda (crash@phydeaux.cygnus.com)
* 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.
* syscalls.cc (_sbrk): If current chunk is used, allocate another.
* wait.cc (wait_found): Fix exit code.
Thu Jan 18 10:09:45 1996 Steve Chamberlain <sac@slash.cygnus.com>
* 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.
* stubs.c (getmntent, endgrent): Deleted.
* 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.
* 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
abnormally. 'ps -f' bypasses this.
* winsup.h (class pinfo): Add dwSpawnedProcessId field.
Sun Nov 16 15:54:27 1997 Geoffrey Noer <noer@rtl.cygnus.com>
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>
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
leader exit only if job control is in progress.
* 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.
(wait4): wait calls should wait childs only; fixed a bug with
nprocinfo count; fixed signal handling.
Thu Jul 24 02:10:25 1997 Geoffrey Noer <noer@cygnus.com>
* 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.
* 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
stub previously present
@ -1895,7 +1895,7 @@ Tue Jun 24 18:31:27 1997 Geoffrey Noer <noer@cygnus.com>
* net.cc: ditto
* syscalls.cc: ditto
* syslog.cc: ditto
* uname.cc (uname): call get_os_type to fill new our_os local
variable, check that when filling out utsname struct, default
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
(set_process_mask): new; use to set process mask instead of direct
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
direct manipulations of u->self->sig_mask.
(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>
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)
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>
patch from sos@prospect.com.ru (Sergey Okhapkin):
patch from sos@prospect.com.ru (Sergey Okhapkin):
* cygwin.din: add getpgid, killpg exports, delete duplicate
random export
* 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
(getpass): new
* stubs.cc (getpass): delete old stub
Tue Jun 3 14:51:47 1997 Ian Lance Taylor <ian@cygnus.com>
* 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
usage by 20K. We need to remove static allocations from
path code.
Thu Apr 17 10:11:50 1997 Geoffrey Noer <noer@cygnus.com>
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
* 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
* syscalls.cc (system): use spawnvp instead of fork/exec
* ntea.cc: make all functions return false for now; they
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
* exceptions.cc: add support for return_handler, remove
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
* winsup.h: add signal_arrived to per_process class, reduce
amount of reserved space, add sig_pending to pinfo class
Tue Apr 15 17:01:34 1997 Geoffrey Noer <noer@cygnus.com>
* 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
* grp.cc, Makefile.in: fix copyright dates
* ntea.cc: include string.h
Thu Apr 10 22:00:43 1997 Geoffrey Noer <noer@cygnus.com>
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>
* path.cc: remove SLASH_P define and
* winsup.h: define it here instead
patch from scottk@utig.ig.utexas.edu (Scott Kempf):
dirsearch.cc (opendir): fix problem with accessing "/"
* path.cc: remove SLASH_P define and
* winsup.h: define it here instead
patch from scottk@utig.ig.utexas.edu (Scott Kempf):
dirsearch.cc (opendir): fix problem with accessing "/"
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_base::open and added fhandler_disk_file::open. More
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.
* 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
cygwin32_getservbyport.
* net.cc: Added cygwin32_getprotobynumber and
cygwin32_getservbyport.
cygwin32_getservbyport.
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
direction of stack growth for your system; otherwise it will be
automatically deduced at run-time.
STACK_DIRECTION > 0 => grows toward higher addresses
STACK_DIRECTION < 0 => grows toward lower addresses
STACK_DIRECTION = 0 => direction of growth unknown */
STACK_DIRECTION > 0 => grows toward higher addresses
STACK_DIRECTION < 0 => grows toward lower addresses
STACK_DIRECTION = 0 => direction of growth unknown */
#undef STACK_DIRECTION

View File

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

View File

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

View File

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

View File

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

View File

@ -104,8 +104,8 @@ get_inet_addr (const struct sockaddr *in, int inlen,
*outlen = sizeof sin;
if (type)
*type = (ctype == 's' ? SOCK_STREAM :
ctype == 'd' ? SOCK_DGRAM
: 0);
ctype == 'd' ? SOCK_DGRAM
: 0);
ret = 1;
}
CloseHandle (fh);
@ -217,7 +217,7 @@ fhandler_socket::af_local_recv_secret (void)
debug_printf ("Received af_local secret: %08x-%08x-%08x-%08x",
out[0], out[1], out[2], out[3]);
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");
return false;
@ -463,7 +463,7 @@ fhandler_socket::dup (fhandler_base *child)
{
fhs->set_sun_path (get_sun_path ());
if (get_socket_type () == SOCK_STREAM)
{
{
fhs->sec_pid = sec_pid;
fhs->sec_uid = sec_uid;
fhs->sec_gid = sec_gid;
@ -524,7 +524,7 @@ fhandler_socket::fstat (struct __stat64 *buf)
{
res = fhandler_base::fstat_fs (buf);
if (!res)
{
{
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 ());
if (get_socket_type () == SOCK_STREAM)
{
{
/* Don't forget to copy credentials from accepting
socket to accepted socket and start transaction
on accepted socket! */
@ -812,7 +812,7 @@ fhandler_socket::accept (struct sockaddr *peer, int *len)
set_winsock_errno ();
goto out;
}
}
}
}
sock->connect_state (connected);
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)
{
set_errno (ENOTCONN); /* Usually when calling getpeereid on
accepting (instead of accepted) socket. */
accepting (instead of accepted) socket. */
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:
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
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 {
key_t key;
key_t key;
int nsems;
int semflg;
};
@ -63,7 +63,7 @@ struct semop_args {
int semid;
struct sembuf *sops;
size_t nsops;
};
};
struct shmat_args {
int shmid;

View File

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

View File

@ -60,29 +60,29 @@
*/
struct ip {
#ifdef _IP_VHL
u_char ip_vhl; /* version << 4 | header length >> 2 */
u_char ip_vhl; /* version << 4 | header length >> 2 */
#else
#if BYTE_ORDER == LITTLE_ENDIAN
u_int ip_hl:4, /* header length */
ip_v:4; /* version */
u_int ip_hl:4, /* header length */
ip_v:4; /* version */
#endif
#if BYTE_ORDER == BIG_ENDIAN
u_int ip_v:4, /* version */
ip_hl:4; /* header length */
u_int ip_v:4, /* version */
ip_hl:4; /* header length */
#endif
#endif /* not _IP_VHL */
u_char ip_tos; /* type of service */
u_short ip_len; /* total length */
u_short ip_id; /* identification */
u_short ip_off; /* fragment offset field */
u_char ip_tos; /* type of service */
u_short ip_len; /* total length */
u_short ip_id; /* identification */
u_short ip_off; /* fragment offset field */
#define IP_RF 0x8000 /* reserved fragment flag */
#define IP_DF 0x4000 /* dont fragment flag */
#define IP_MF 0x2000 /* more fragments flag */
#define IP_OFFMASK 0x1fff /* mask for fragmenting bits */
u_char ip_ttl; /* time to live */
u_char ip_p; /* protocol */
u_short ip_sum; /* checksum */
struct in_addr ip_src,ip_dst; /* source and dest address */
u_char ip_ttl; /* time to live */
u_char ip_p; /* protocol */
u_short ip_sum; /* checksum */
struct in_addr ip_src,ip_dst; /* source and dest address */
};
#ifdef _IP_VHL
@ -155,24 +155,24 @@ struct ip {
* Time stamp option structure.
*/
struct ip_timestamp {
u_char ipt_code; /* IPOPT_TS */
u_char ipt_len; /* size of structure (variable) */
u_char ipt_ptr; /* index of current entry */
u_char ipt_code; /* IPOPT_TS */
u_char ipt_len; /* size of structure (variable) */
u_char ipt_ptr; /* index of current entry */
#if BYTE_ORDER == LITTLE_ENDIAN
u_int ipt_flg:4, /* flags, see below */
ipt_oflw:4; /* overflow counter */
u_int ipt_flg:4, /* flags, see below */
ipt_oflw:4; /* overflow counter */
#endif
#if BYTE_ORDER == BIG_ENDIAN
u_int ipt_oflw:4, /* overflow counter */
ipt_flg:4; /* flags, see below */
u_int ipt_oflw:4, /* overflow counter */
ipt_flg:4; /* flags, see below */
#endif
union ipt_timestamp {
n_long ipt_time[1];
struct ipt_ta {
struct in_addr ipt_addr;
n_long ipt_time;
} ipt_ta[1];
} ipt_timestamp;
union ipt_timestamp {
n_long ipt_time[1];
struct ipt_ta {
struct in_addr ipt_addr;
n_long ipt_time;
} ipt_ta[1];
} ipt_timestamp;
};
/* 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.
*/
struct tcphdr {
u_short th_sport; /* source port */
u_short th_dport; /* destination port */
tcp_seq th_seq; /* sequence number */
tcp_seq th_ack; /* acknowledgement number */
u_short th_sport; /* source port */
u_short th_dport; /* destination port */
tcp_seq th_seq; /* sequence number */
tcp_seq th_ack; /* acknowledgement number */
#if BYTE_ORDER == LITTLE_ENDIAN
u_int th_x2:4, /* (unused) */
th_off:4; /* data offset */
u_int th_x2:4, /* (unused) */
th_off:4; /* data offset */
#endif
#if BYTE_ORDER == BIG_ENDIAN
u_int th_off:4, /* data offset */
th_x2:4; /* (unused) */
u_int th_off:4, /* data offset */
th_x2:4; /* (unused) */
#endif
u_char th_flags;
u_char th_flags;
#define TH_FIN 0x01
#define TH_SYN 0x02
#define TH_RST 0x04
@ -78,9 +78,9 @@ struct tcphdr {
#define TH_URG 0x20
#define TH_FLAGS (TH_FIN|TH_SYN|TH_RST|TH_ACK|TH_URG)
u_short th_win; /* window */
u_short th_sum; /* checksum */
u_short th_urp; /* urgent pointer */
u_short th_win; /* window */
u_short th_sum; /* checksum */
u_short th_urp; /* urgent pointer */
};
#define TCPOPT_EOL 0
@ -129,7 +129,7 @@ struct tcphdr {
#define TCP_MAXHLEN (0xf<<2) /* max length of header in bytes */
#define TCP_MAXOLEN (TCP_MAXHLEN - sizeof(struct tcphdr))
/* max space left for options */
/* max space left for options */
/*
* 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);
#define pthread_cleanup_push(_fn, _arg) { __pthread_cleanup_handler __cleanup_handler = \
{ _fn, _arg, NULL }; \
_pthread_cleanup_push( &__cleanup_handler );
{ _fn, _arg, NULL }; \
_pthread_cleanup_push( &__cleanup_handler );
#define pthread_cleanup_pop(_execute) _pthread_cleanup_pop( _execute ); }
/* Condition variables */
@ -174,7 +174,7 @@ int pthread_rwlock_trywrlock (pthread_rwlock_t *rwlock);
int pthread_rwlock_unlock (pthread_rwlock_t *rwlock);
int pthread_rwlockattr_init (pthread_rwlockattr_t *rwlockattr);
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_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 (C) DJ Delorie
24 Kirsten Ave
Rochester NH 03867-2954
24 Kirsten Ave
Rochester NH 03867-2954
This document is Copyright (C) DJ Delorie and may be distributed
verbatim, but changing it is not allowed.

View File

@ -7,7 +7,7 @@
details. */
/* Including this file should not require any Windows headers. */
#ifndef _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_INIT(CLASS,NAME) \
CLASS _LOCK_T NAME = _LOCK_T_INITIALIZER;
CLASS _LOCK_T NAME = _LOCK_T_INITIALIZER;
#define __LOCK_INIT_RECURSIVE(CLASS,NAME) \
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)
# endif
#endif
#endif

View File

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

View File

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

View File

@ -22,16 +22,16 @@ extern "C" {
#endif
struct utmp
struct utmp
{
short ut_type;
pid_t ut_pid;
short ut_type;
pid_t ut_pid;
char ut_line[UT_LINESIZE];
char ut_id[UT_IDLEN];
time_t ut_time;
char ut_user[UT_NAMESIZE];
char ut_host[UT_HOSTSIZE];
long ut_addr;
time_t ut_time;
char ut_user[UT_NAMESIZE];
char ut_host[UT_HOSTSIZE];
long ut_addr;
};
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! */
struct utmpx
{
short ut_type;
pid_t ut_pid;
short ut_type;
pid_t ut_pid;
char ut_line[UT_LINESIZE];
char ut_id[UT_IDLEN];
time_t ut_time;
char ut_user[UT_NAMESIZE];
char ut_host[UT_HOSTSIZE];
long ut_addr;
time_t ut_time;
char ut_user[UT_NAMESIZE];
char ut_host[UT_HOSTSIZE];
long ut_addr;
struct timeval ut_tv;
};

View File

@ -1,7 +1,7 @@
/* Initial implementation:
Copyright (c) 2002 Robert Drehmel
All rights reserved.
As long as the above copyright statement and this notice remain
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)
if (MAP_ISSET (off + l))
{
set_errno (EINVAL);
set_errno (EINVAL);
return false;
}
switch (access_mode_)
@ -553,7 +553,7 @@ mmap64 (void *addr, size_t len, int prot, int flags, int fd, _off64_t off)
}
fh = cfd;
if (fh->get_device () == FH_ZERO)
{
{
/* mmap /dev/zero is like MAP_ANONYMOUS. */
fd = -1;
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;
}
/* 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. */
fsiz -= gran_off;
if (gran_len > fsiz)
{
{
if ((flags & MAP_AUTOGROW) && (off - gran_off) + len > fsiz)
{
/* 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;
}
/* 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)
flags &= ~MAP_AUTOGROW;
flags &= ~MAP_AUTOGROW;
}
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;
long record_idx = -1;
if ((record_idx = map_list->search_record ((caddr_t)addr, len,
u_addr, u_len,
u_addr, u_len,
record_idx)) >= 0)
{
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;
low = (off + len) & UINT32_MAX;
/* 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
close the mapping and reopen it again with the correct protection,
*iff* auto-grow worked. */
h = CreateFileMapping (get_handle (), &sec_none, PAGE_READWRITE,
high, low, NULL);
if (h && protect != PAGE_READWRITE)
{
{
CloseHandle (h);
h = CreateFileMapping (get_handle (), &sec_none, protect,
high, low, NULL);
@ -1110,11 +1110,11 @@ fhandler_disk_file::mmap (caddr_t *addr, size_t len, DWORD access,
phys.QuadPart = (ULONGLONG) off;
ULONG ulen = len;
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,
base ? AT_ROUND_TO_PAGE : 0, protect);
if (ret != STATUS_SUCCESS)
{
{
__seterrno_from_nt_status (ret);
base = NULL;
}
@ -1192,11 +1192,11 @@ fhandler_disk_file::fixup_mmap_after_fork (HANDLE h, DWORD access, int flags,
protect = PAGE_WRITECOPY;
break;
}
NTSTATUS ret = NtMapViewOfSection (h, INVALID_HANDLE_VALUE, &base, 0L,
NTSTATUS ret = NtMapViewOfSection (h, INVALID_HANDLE_VALUE, &base, 0L,
ulen, &phys, &ulen, ViewShare,
AT_ROUND_TO_PAGE, protect);
if (ret != STATUS_SUCCESS)
__seterrno_from_nt_status (ret);
__seterrno_from_nt_status (ret);
}
else
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";
break;
case SO_PEERCRED:
name = "SO_PEERCRED";
name = "SO_PEERCRED";
}
if ((optval

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -360,7 +360,7 @@ void set_cygwin_privileges (HANDLE token);
#define pop_thread_privilege() \
if (_dup_token) \
{ \
ImpersonateLoggedOnUser (_token); \
ImpersonateLoggedOnUser (_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);
}
int ret = cygwin_select (maxfds, readfds, writefds, exceptfds,
ts ? &tv : NULL);
ts ? &tv : NULL);
if (set)
set_signal_mask (oldset);
return ret;
@ -603,7 +603,7 @@ out:
gotone += s->write_ready = true;
}
#else
gotone += s->write_ready = true;
gotone += s->write_ready = true;
#endif
}
}

View File

@ -473,8 +473,8 @@ create_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
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

View File

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

View File

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

View File

@ -1,6 +1,6 @@
/* 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.
@ -201,11 +201,11 @@ try_connect_syslogd (const char *msg, int len)
if (stat64 (_PATH_LOG, &st) || !S_ISSOCK (st.st_mode))
goto out;
if ((fd = cygwin_socket (AF_LOCAL, SOCK_DGRAM, 0)) < 0)
goto out;
goto out;
sa.sa_family = AF_LOCAL;
strncpy (sa.sa_data, _PATH_LOG, sizeof sa.sa_data);
if (cygwin_connect (fd, &sa, sizeof sa))
{
{
if (get_errno () != EPROTOTYPE)
{
close (fd);
@ -230,9 +230,9 @@ out:
{
ret = write (syslogd_sock, msg, len);
/* 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))
ret = syslogd_sock;
ret = syslogd_sock;
}
try_connect_guard.release ();
return ret;

View File

@ -66,7 +66,7 @@ timer_tracker::cancel ()
{
if (!hcancel)
return false;
SetEvent (hcancel);
if (WaitForSingleObject (syncthread, INFINITE) != WAIT_OBJECT_0)
api_fatal ("WFSO failed waiting for timer thread, %E");
@ -128,7 +128,7 @@ timer_thread (VOID *x)
long long sleep_us;
long sleep_ms;
/* Account for delays in starting thread
and sending the signal */
and sending the signal */
now = gtod.usecs (false);
sleep_us = sleepto_us - now;
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);
if (size > 0)
{
{
psystemroot = (char *) cmalloc (HEAP_STR, ++size);
size = GetWindowsDirectory (psystemroot, size);
if (size <= 0)
@ -460,7 +460,7 @@ cygheap_user::env_systemroot (const char *name, size_t namelen)
}
}
if (size <= 0)
debug_printf ("GetWindowsDirectory(), %E");
debug_printf ("GetWindowsDirectory(), %E");
}
return psystemroot;
}