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.
* 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.
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.
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.
* 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
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>
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>
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>
* 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).
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.
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
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.
* 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
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>
(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.
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>
(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.
* 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
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.)
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>
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>
* 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
* 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>
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
(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.
* 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
* 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
* 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.
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):
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
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
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
* 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
* 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
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>
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
* 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.
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):
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
(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
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):
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>
* 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.
* 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>
/* 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
{
while (++fd < (int) cygheap->fdtab.size)
if (*(fh = cygheap->fdtab + fd) != NULL)
- return fd;
+ return fd;
return -1;
}
void rewind ()
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);
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))
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)
{
{
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))
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;
case PROCESS_CWD:
case PROCESS_CMDLINE:
{
- if (filebuf)
+ if (filebuf)
free (filebuf);
size_t fs;
switch (fileid)
*outlen = sizeof sin;
if (type)
*type = (ctype == 's' ? SOCK_STREAM :
- ctype == 'd' ? SOCK_DGRAM
- : 0);
+ ctype == 'd' ? SOCK_DGRAM
+ : 0);
ret = 1;
}
CloseHandle (fh);
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;
{
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;
{
res = fhandler_base::fstat_fs (buf);
if (!res)
- {
+ {
buf->st_mode = (buf->st_mode & ~S_IFMT) | S_IFSOCK;
}
}
{
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! */
set_winsock_errno ();
goto out;
}
- }
+ }
}
sock->connect_state (connected);
res = res_fd;
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;
}
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
};
struct semget_args {
- key_t key;
+ key_t key;
int nsems;
int semflg;
};
int semid;
struct sembuf *sops;
size_t nsops;
-};
+};
struct shmat_args {
int shmid;
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.
*/
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
* 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 */
* 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
#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
#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).
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 */
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);
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.
details. */
/* Including this file should not require any Windows headers. */
-
+
#ifndef _SYS_DIRENT_H
#define _SYS_DIRENT_H
#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;
# define _funlockfile(fp) __cygwin_lock_unlock ((_LOCK_T *)&(fp)->_lock)
# endif
#endif
-
+
#endif
#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.
#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));
#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 *);
/* 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;
};
/* 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. */
for (DWORD l = 0; l < len; ++l)
if (MAP_ISSET (off + l))
{
- set_errno (EINVAL);
+ set_errno (EINVAL);
return false;
}
switch (access_mode_)
}
fh = cfd;
if (fh->get_device () == FH_ZERO)
- {
+ {
/* mmap /dev/zero is like MAP_ANONYMOUS. */
fd = -1;
flags |= MAP_ANONYMOUS;
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. */
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;
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);
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);
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;
}
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);
name = "SO_ERROR";
break;
case SO_PEERCRED:
- name = "SO_PEERCRED";
+ name = "SO_PEERCRED";
}
if ((optval
.section .idata\$7
.long __head_cygwin1_dll
- .section .idata\$5
+ .section .idata\$5
__imp__$newsym: .rva 1f
.section .idata\$4
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;
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;
sym.contents[0] = '\0';
int symlen = 0;
-
+
for (unsigned pflags_or = opt & PC_NO_ACCESS_CHECK; ; pflags_or = 0)
{
const suffix_info *suff;
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 ());
}
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
if (!QueryDosDevice (dos, dev, 256))
return false;
return strncasematch (dev, "\\Device\\Floppy", 14)
- || strcasematch (dev, "A:");
+ || strcasematch (dev, "A:");
}
extern "C" FILE *
{
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);
}
}
else
- {
+ {
win32_topath.check (topath, PC_FULL | PC_SYM_NOFOLLOW);
strcpy (w32topath, win32_topath);
}
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;
}
{
/* Trailing (back)slashes are eliminated. */
while (c && c > bs && c[1] == '\0')
- {
+ {
*c = '\0';
c = strrchr (bs, '/');
if ((d = strrchr (c ?: bs, '\\')) > c)
{
/* 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, ".");
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;
}
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;
}
case PICOM_ROOT:
{
- CloseHandle (__fromthem); __fromthem = NULL;
+ CloseHandle (__fromthem); __fromthem = NULL;
CloseHandle (hp);
unsigned int n;
if (cygheap->root.exists ())
}
case PICOM_FDS:
{
- CloseHandle (__fromthem); __fromthem = NULL;
+ CloseHandle (__fromthem); __fromthem = NULL;
CloseHandle (hp);
unsigned int n = 0;
int fd;
sigproc_printf ("WriteFile fd %d failed, %E", fd);
break;
}
- break;
+ break;
}
case PICOM_PIPE_FHANDLER:
{
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:
{
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)
__seterrno ();
goto err;
}
- }
+ }
res.n = n;
break;
case PICOM_FIFO:
&& (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;
for (r = rerrs; r->code >= 0; r++)
if (r->code == target)
break;
-
+
if (errcode®_ITOA) {
if (r->code >= 0)
(void) strcpy(convbuf, r->name);
#define pop_thread_privilege() \
if (_dup_token) \
{ \
- ImpersonateLoggedOnUser (_token); \
+ ImpersonateLoggedOnUser (_token); \
CloseHandle (_dup_token); \
} \
}
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;
gotone += s->write_ready = true;
}
#else
- gotone += s->write_ready = true;
+ gotone += s->write_ready = true;
#endif
}
}
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
*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);
EXPORT_ALIAS (fsync, fdatasync)
-static void
+static void
sync_worker (const char *vol)
{
HANDLE fh = CreateFileA (vol, GENERIC_WRITE, wincap.shared (),
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)
/* 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;
}
drives &= ~2;
strcpy (vol, "\\\\.\\A:");
do
- {
+ {
/* Geeh. Try to sync only non-floppy drives. */
if (drives & mask)
{
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);
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;
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)
{
/* 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)))
{
/* 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,
{
_pinfo *p = pids[i];
if (p)
- switch (which)
+ switch (which)
{
case PRIO_PROCESS:
if ((pid_t) who == p->pid)
/* 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.
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);
{
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;
{
if (!hcancel)
return false;
-
+
SetEvent (hcancel);
if (WaitForSingleObject (syncthread, INFINITE) != WAIT_OBJECT_0)
api_fatal ("WFSO failed waiting for timer thread, %E");
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)
{
int size = GetWindowsDirectory (NULL, 0);
if (size > 0)
- {
+ {
psystemroot = (char *) cmalloc (HEAP_STR, ++size);
size = GetWindowsDirectory (psystemroot, size);
if (size <= 0)
}
}
if (size <= 0)
- debug_printf ("GetWindowsDirectory(), %E");
+ debug_printf ("GetWindowsDirectory(), %E");
}
return psystemroot;
}