Eliminate excess whitespace.

This commit is contained in:
Christopher Faylor 2001-11-05 06:09:15 +00:00
parent a9ae96dde4
commit 9c510edc61
38 changed files with 181 additions and 182 deletions

View File

@ -93,12 +93,12 @@ cygheap_setup_for_child (child_info *ci, bool dup_later)
void __stdcall
cygheap_setup_for_child_cleanup (void *newcygheap, child_info *ci,
bool dup_it_now)
bool dup_it_now)
{
if (dup_it_now)
{
/* NOTE: There is an assumption here that cygheap_max has not changed
between the time that cygheap_setup_for_child was called and now.
between the time that cygheap_setup_for_child was called and now.
Make sure that this is a correct assumption. */
cygheap_protect->acquire ();
dup_now (newcygheap, ci, (char *) cygheap_max - (char *) cygheap);
@ -377,13 +377,13 @@ init_cygheap::etc_changed ()
FILE_NOTIFY_CHANGE_LAST_WRITE);
if (etc_changed_h == INVALID_HANDLE_VALUE)
system_printf ("Can't open /etc for checking, %E", (char *) pwd,
etc_changed_h);
etc_changed_h);
else if (!DuplicateHandle (hMainProc, etc_changed_h, hMainProc,
&etc_changed_h, 0, TRUE,
&etc_changed_h, 0, TRUE,
DUPLICATE_SAME_ACCESS | DUPLICATE_CLOSE_SOURCE))
{
system_printf ("Can't inherit /etc handle, %E", (char *) pwd,
etc_changed_h);
etc_changed_h);
etc_changed_h = INVALID_HANDLE_VALUE;
}
}

View File

@ -124,7 +124,7 @@ out:
info->arg = param; /* The single parameter to the thread */
if ((h = CreateThread (&sec_none_nih, 0, thread_stub, (VOID *) info, flags,
&tid)))
&tid)))
regthread (name, tid); /* Register for debugging output. */
return h;

View File

@ -378,7 +378,7 @@ rmdir (const char *dir)
/* Even own directories can't be removed if R/O attribute is set. */
if (real_dir.has_attribute (FILE_ATTRIBUTE_READONLY))
SetFileAttributes (real_dir,
(DWORD) real_dir & ~FILE_ATTRIBUTE_READONLY);
(DWORD) real_dir & ~FILE_ATTRIBUTE_READONLY);
if (RemoveDirectory (real_dir))
{

View File

@ -178,7 +178,7 @@ cygwin_attach_handle_to_fd (char *name, int fd, HANDLE handle, mode_t bin,
fd = cygheap->fdtab.find_unused_handle ();
path_conv pc;
fhandler_base *res = cygheap->fdtab.build_fhandler_from_name (fd, name, handle,
pc);
pc);
res->init (handle, myaccess, bin);
return fd;
}
@ -242,7 +242,7 @@ dtable::init_std_file_from_handle (int fd, HANDLE handle, DWORD myaccess)
fhandler_base *
dtable::build_fhandler_from_name (int fd, const char *name, HANDLE handle,
path_conv& pc, unsigned opt, suffix_info *si)
path_conv& pc, unsigned opt, suffix_info *si)
{
pc.check (name, opt | PC_NULLEMPTY | PC_FULL, si);
if (pc.error)

View File

@ -187,7 +187,7 @@ cygwin_internal (cygwin_getinfo_types t, ...)
if (check_null_empty_str_errno (cr))
return (DWORD) NULL;
cygheap->cygwin_regname = (char *) crealloc (cygheap->cygwin_regname,
strlen (cr) + 1);
strlen (cr) + 1);
strcpy (cygheap->cygwin_regname, cr);
case CW_GET_CYGWIN_REGISTRY_NAME:
return (DWORD) cygheap->cygwin_regname;

View File

@ -389,7 +389,7 @@ fhandler_base::open (path_conv *, int flags, mode_t mode)
set_security_attribute (mode, &sa, alloca (4096), 4096);
x = CreateFile (get_win32_name (), access, shared, &sa, creation_distribution,
file_attributes, 0);
file_attributes, 0);
syscall_printf ("%p = CreateFileA (%s, %p, %p, %p, %p, %p, 0)",
x, get_win32_name (), access, shared, &sa,
@ -927,11 +927,11 @@ fhandler_disk_file::fstat (struct stat *buf, path_conv *pc)
This will allow us to determine *some* things about the file, at least. */
set_query_open (TRUE);
if ((oret = open (pc, open_flags, 0)))
/* ok */;
/* ok */;
else if (allow_ntsec && pc->has_acls () && get_errno () == EACCES
&& !get_file_attribute (TRUE, get_win32_name (), &ntsec_atts, &uid, &gid)
&& !ntsec_atts && uid == myself->uid && gid == myself->gid)
{
{
/* Check a special case here. If ntsec is ON it happens
that a process creates a file using mode 000 to disallow
other processes access. In contrast to UNIX, this results
@ -940,7 +940,7 @@ fhandler_disk_file::fstat (struct stat *buf, path_conv *pc)
set_file_attribute (TRUE, get_win32_name (), 0400);
oret = open (pc, open_flags, 0);
set_file_attribute (TRUE, get_win32_name (), ntsec_atts);
}
}
}
if (oret)
{

View File

@ -525,8 +525,7 @@ fhandler_dev_dsp::ioctl (unsigned int cmd, void *ptr)
CASE (SNDCTL_DSP_GETBLKSIZE)
*intptr = Audio::BLOCK_SIZE;
return 0;
break;
return 0;
CASE (SNDCTL_DSP_SETFMT)
{

View File

@ -174,7 +174,7 @@ fhandler_socket::fixup_before_fork_exec (DWORD win_proc_id)
else
{
debug_printf ("WSADuplicateSocket error, sock %p, win_proc_id %d, prot_info_ptr %p",
get_socket (), win_proc_id, prot_info_ptr);
get_socket (), win_proc_id, prot_info_ptr);
set_winsock_errno ();
}
}
@ -290,7 +290,7 @@ fhandler_socket::close ()
(const char *)&linger, sizeof linger);
while ((res = closesocket (get_socket ()))
&& WSAGetLastError () == WSAEWOULDBLOCK)
&& WSAGetLastError () == WSAEWOULDBLOCK)
continue;
if (res)
{

View File

@ -218,7 +218,7 @@ sync_with_parent(const char *s, bool hang_self)
WaitForSingleObject (child_proc_info->forker_finished, 1) != WAIT_FAILED)
break;
api_fatal ("WFSO failed for %s, fork_finished %p, %E", s,
child_proc_info->forker_finished);
child_proc_info->forker_finished);
break;
default:
debug_printf ("no problems");

View File

@ -70,14 +70,14 @@ heap_init ()
* to assure contiguous memory. */
cygheap->heapptr = cygheap->heaptop = cygheap->heapbase =
VirtualAlloc(NULL, cygwin_shared->heap_chunk_size (), MEM_RESERVE,
PAGE_NOACCESS);
PAGE_NOACCESS);
if (cygheap->heapbase == NULL)
api_fatal ("2. unable to allocate heap, heap_chunk_size %d, %E",
cygwin_shared->heap_chunk_size ());
}
debug_printf ("heap base %p, heap top %p", cygheap->heapbase,
cygheap->heaptop);
cygheap->heaptop);
page_const--;
malloc_init ();
}

View File

@ -38,20 +38,20 @@ struct ifreq
{
#define IFNAMSIZ 16
#define IFHWADDRLEN 6
union
{
char ifrn_name[IFNAMSIZ]; /* if name, e.g. "en0" */
} ifr_ifrn;
union
{
char ifrn_name[IFNAMSIZ]; /* if name, e.g. "en0" */
} ifr_ifrn;
union {
struct sockaddr ifru_addr;
struct sockaddr ifru_broadaddr;
struct sockaddr ifru_netmask;
struct sockaddr ifru_hwaddr;
short ifru_flags;
int ifru_metric;
int ifru_mtu;
} ifr_ifru;
union {
struct sockaddr ifru_addr;
struct sockaddr ifru_broadaddr;
struct sockaddr ifru_netmask;
struct sockaddr ifru_hwaddr;
short ifru_flags;
int ifru_metric;
int ifru_mtu;
} ifr_ifru;
};
#define ifr_name ifr_ifrn.ifrn_name /* interface name */
@ -73,12 +73,12 @@ struct ifreq
struct ifconf
{
int ifc_len; /* size of buffer */
union
{
caddr_t ifcu_buf;
struct ifreq *ifcu_req;
} ifc_ifcu;
int ifc_len; /* size of buffer */
union
{
caddr_t ifcu_buf;
struct ifreq *ifcu_req;
} ifc_ifcu;
};
#define ifc_buf ifc_ifcu.ifcu_buf /* buffer address */
#define ifc_req ifc_ifcu.ifcu_req /* array of structures */

View File

@ -93,12 +93,12 @@ details. */
/* API_MAJOR 0.0: Initial version. API_MINOR changes:
1: Export cygwin32_ calls as cygwin_ as well.
2: Export j1, jn, y1, yn.
3: Export dll_noncygwin_dllcrt0.
4: New socket ioctls, revamped ifconf support.
5: Thread support/exports.
6: Change in termios handling.
7: Export scandir and alphasort.
8: Export _ctype_, _sys_errlist, _sys_nerr.
3: Export dll_noncygwin_dllcrt0.
4: New socket ioctls, revamped ifconf support.
5: Thread support/exports.
6: Change in termios handling.
7: Export scandir and alphasort.
8: Export _ctype_, _sys_errlist, _sys_nerr.
9: Mount-related changes, new cygwin_umount export.
Raw device support (tape, floppies).
10: Fast math routine support added.
@ -114,10 +114,10 @@ details. */
20: regsub, inet_network
21: incompatible change to stdio cr/lf and buffering
22: Export cygwin_logon_user, cygwin_set_impersonation_token.
geteuid, getegid return effective uid/gid.
getuid, getgid return real uid/gid.
seteuid, setegid set only effective uid/gid.
setuid, setgid set effective and real uid/gid.
geteuid, getegid return effective uid/gid.
getuid, getgid return real uid/gid.
seteuid, setegid set only effective uid/gid.
setuid, setgid set effective and real uid/gid.
23: Export new dll_crt0 interface and cygwin_user_data for use
with crt0 startup code.
24: Export poll and _poll.
@ -132,7 +132,7 @@ details. */
33: Export setlogmask
34: Separated out mount table
35: Export drand48, erand48, jrand48, lcong48, lrand48,
mrand48, nrand48, seed48, and srand48.
mrand48, nrand48, seed48, and srand48.
36: Added _cygwin_S_IEXEC, et al
37: [f]pathconv support _PC_POSIX_PERMISSIONS and _PC_POSIX_SECURITY
38: vscanf, vscanf_r, and random pthread functions

View File

@ -50,16 +50,16 @@ struct rusage {
long ru_ixrss; /* XXX: 0 */
long ru_idrss; /* XXX: sum of rm_asrss */
long ru_isrss; /* XXX: 0 */
long ru_minflt; /* any page faults not requiring I/O */
long ru_majflt; /* any page faults requiring I/O */
long ru_nswap; /* swaps */
long ru_inblock; /* block input operations */
long ru_oublock; /* block output operations */
long ru_msgsnd; /* messages sent */
long ru_msgrcv; /* messages received */
long ru_nsignals; /* signals received */
long ru_nvcsw; /* voluntary context switches */
long ru_nivcsw; /* involuntary " */
long ru_minflt; /* any page faults not requiring I/O */
long ru_majflt; /* any page faults requiring I/O */
long ru_nswap; /* swaps */
long ru_inblock; /* block input operations */
long ru_oublock; /* block output operations */
long ru_msgsnd; /* messages sent */
long ru_msgrcv; /* messages received */
long ru_nsignals; /* signals received */
long ru_nvcsw; /* voluntary context switches */
long ru_nivcsw; /* involuntary " */
#define ru_last ru_nivcsw
};

View File

@ -53,10 +53,10 @@
#define SNDCARD_UART6850 8
#define SNDCARD_GUS16 9
#define SNDCARD_MSS 10
#define SNDCARD_PSS 11
#define SNDCARD_PSS 11
#define SNDCARD_SSCAPE 12
#define SNDCARD_PSS_MPU 13
#define SNDCARD_PSS_MSS 14
#define SNDCARD_PSS_MPU 13
#define SNDCARD_PSS_MSS 14
#define SNDCARD_SSCAPE_MSS 15
#define SNDCARD_TRXPRO 16
#define SNDCARD_TRXPRO_SB 17
@ -220,7 +220,7 @@ struct patch_info {
#define WAVE_SUSTAIN_ON 0x20 /* bit 5 = Turn sustaining on. (Env. pts. 3)*/
#define WAVE_ENVELOPES 0x40 /* bit 6 = Enable envelopes - 1 */
#define WAVE_FAST_RELEASE 0x80 /* bit 7 = Shut off immediately after note off */
/* (use the env_rate/env_offs fields). */
/* (use the env_rate/env_offs fields). */
/* Linux specific bits */
#define WAVE_VIBRATO 0x00010000 /* The vibrato info is valid */
#define WAVE_TREMOLO 0x00020000 /* The tremolo info is valid */
@ -280,10 +280,10 @@ struct patch_info {
int scale_frequency;
unsigned int scale_factor; /* from 0 to 2048 or 0 to 2 */
int volume;
int volume;
int fractions;
int reserved1;
int spare[2];
int spare[2];
char data[1]; /* The waveform data starts here */
};
@ -461,7 +461,7 @@ struct sbi_instrument {
#define FM_PATCH _PATCHKEY(0x01)
#define OPL3_PATCH _PATCHKEY(0x03)
short device; /* Synth# (0-4) */
int channel; /* Program# to be initialized */
int channel; /* Program# to be initialized */
sbi_instr_data operators; /* Register settings for operator cells (.SBI format) */
};
@ -1091,7 +1091,7 @@ extern int OSS_write_patch2(int fd, unsigned char *buf, int len);
* The program using the macro library must define the following macros before
* using this library.
*
* #define _seqbuf name of the buffer (unsigned char[])
* #define _seqbuf name of the buffer (unsigned char[])
* #define _SEQ_ADVBUF(len) If the applic needs to know the exact
* size of the event, this macro can be used.
* Otherwise this must be defined as empty.
@ -1225,11 +1225,11 @@ extern int OSS_write_patch2(int fd, unsigned char *buf, int len);
*/
#define _TIMER_EVENT(ev, parm) {_SEQ_NEEDBUF(8);\
_seqbuf[_seqbufptr+0] = EV_TIMING; \
_seqbuf[_seqbufptr+1] = (ev); \
_seqbuf[_seqbufptr+0] = EV_TIMING; \
_seqbuf[_seqbufptr+1] = (ev); \
_seqbuf[_seqbufptr+2] = 0;\
_seqbuf[_seqbufptr+3] = 0;\
*(unsigned int *)&_seqbuf[_seqbufptr+4] = (parm); \
*(unsigned int *)&_seqbuf[_seqbufptr+4] = (parm); \
_SEQ_ADVBUF(8);}
#define SEQ_START_TIMER() _TIMER_EVENT(TMR_START, 0)
@ -1247,11 +1247,11 @@ extern int OSS_write_patch2(int fd, unsigned char *buf, int len);
*/
#define _LOCAL_EVENT(ev, parm) {_SEQ_NEEDBUF(8);\
_seqbuf[_seqbufptr+0] = EV_SEQ_LOCAL; \
_seqbuf[_seqbufptr+1] = (ev); \
_seqbuf[_seqbufptr+0] = EV_SEQ_LOCAL; \
_seqbuf[_seqbufptr+1] = (ev); \
_seqbuf[_seqbufptr+2] = 0;\
_seqbuf[_seqbufptr+3] = 0;\
*(unsigned int *)&_seqbuf[_seqbufptr+4] = (parm); \
*(unsigned int *)&_seqbuf[_seqbufptr+4] = (parm); \
_SEQ_ADVBUF(8);}
#define SEQ_PLAYAUDIO(devmask) _LOCAL_EVENT(LOCL_STARTAUDIO, devmask)

View File

@ -21,6 +21,6 @@ struct sockaddr_un {
/* Evaluates the actual length of `sockaddr_un' structure. */
#define SUN_LEN(p) ((size_t)(((struct sockaddr_un *) NULL)->sun_path) \
+ strlen ((p)->sun_path))
+ strlen ((p)->sun_path))
#endif

View File

@ -15,7 +15,7 @@ details. */
extern "C"
BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason,
LPVOID reserved /* Not used. */);
LPVOID reserved /* Not used. */);
BOOL APIENTRY
DllMain (

View File

@ -436,7 +436,7 @@ getopt_long(int nargc, char * const *nargv, const char *options,
}
}
if (match != -1) { /* option found */
if (long_options[match].has_arg == no_argument
if (long_options[match].has_arg == no_argument
&& has_equal) {
if (PRINT_ERROR)
warnx(noarg, (int)current_argv_len,

View File

@ -503,7 +503,7 @@ mmap (caddr_t addr, size_t len, int prot, int flags, int fd, off_t off)
While the changes are not propagated to the file, they are
visible to other processes sharing the same file mapping object.
Workaround: Don't use named file mapping. That should work since
sharing file mappings only works reliable using named
sharing file mappings only works reliable using named
file mapping on 9x.
*/
if ((flags & MAP_PRIVATE)

View File

@ -1573,7 +1573,7 @@ get_2k_ifconf (struct ifconf *ifc, int what)
{
/* Iterate over all known interfaces */
for (if_cnt = 0; if_cnt < ift->dwNumEntries; ++if_cnt)
{
{
*sub = '0';
/* Iterate over all configured IP-addresses */
for (ip_cnt = 0; ip_cnt < ipt->dwNumEntries; ++ip_cnt)
@ -1997,27 +1997,27 @@ get_95_ifconf (struct ifconf *ifc, int what)
strcat (netname, ifname);
if (RegOpenKeyEx (HKEY_LOCAL_MACHINE, netname,
0, KEY_READ, &subkey) != ERROR_SUCCESS)
0, KEY_READ, &subkey) != ERROR_SUCCESS)
{
RegCloseKey (ifkey);
--ifr;
continue;
RegCloseKey (ifkey);
--ifr;
continue;
}
if (RegQueryValueEx (subkey, "AdapterName", 0,
NULL, (unsigned char *) adapter,
(size = sizeof adapter, &size)) == ERROR_SUCCESS
&& strcasematch (adapter, "MS$PPP"))
NULL, (unsigned char *) adapter,
(size = sizeof adapter, &size)) == ERROR_SUCCESS
&& strcasematch (adapter, "MS$PPP"))
{
++*ppp;
strcpy (ifr->ifr_name, "ppp");
strcat (ifr->ifr_name, ppp);
++*ppp;
strcpy (ifr->ifr_name, "ppp");
strcat (ifr->ifr_name, ppp);
}
else
{
++*eth;
strcpy (ifr->ifr_name, "eth");
strcat (ifr->ifr_name, eth);
++*eth;
strcpy (ifr->ifr_name, "eth");
strcat (ifr->ifr_name, eth);
}
RegCloseKey (subkey);

View File

@ -947,7 +947,7 @@ get_raw_device_number (const char *name, const char *w32_path, int &unit)
else /* Backward compatible checking of mount table device mapping. */
{
if (wdeveqn ("tape", 4))
{
{
unit = digits (w32_path + 4);
/* Norewind tape devices have leading n in name. */
if (deveqn ("n", 1))
@ -955,12 +955,12 @@ get_raw_device_number (const char *name, const char *w32_path, int &unit)
devn = FH_TAPE;
}
else if (wdeveqn ("physicaldrive", 13))
{
{
unit = digits (w32_path + 13) * 16 + 32;
devn = FH_FLOPPY;
}
else if (isdrive (w32_path))
{
{
unit = cyg_tolower (w32_path[0]) - 'a' + 224;
devn = FH_FLOPPY;
}
@ -969,7 +969,7 @@ get_raw_device_number (const char *name, const char *w32_path, int &unit)
}
static int __stdcall get_device_number (const char *unix_path,
const char *w32_path, int &unit)
const char *w32_path, int &unit)
__attribute__ ((regparm(3)));
static int __stdcall
get_device_number (const char *unix_path, const char *w32_path, int &unit)
@ -1020,12 +1020,12 @@ win32_device_name (const char *src_path, char *win32_path,
{
case FH_RANDOM:
__small_sprintf (win32_path, devfmt, unit == 8 ? "" : "u");
break;
break;
case FH_TAPE:
__small_sprintf (win32_path, "\\Device\\Tape%d", unit % 128);
break;
__small_sprintf (win32_path, "\\Device\\Tape%d", unit % 128);
break;
case FH_FLOPPY:
if (unit < 16)
if (unit < 16)
__small_sprintf (win32_path, "\\Device\\Floppy%d", unit);
else if (unit < 32)
__small_sprintf (win32_path, "\\Device\\CdRom%d", unit - 16);
@ -1034,10 +1034,10 @@ win32_device_name (const char *src_path, char *win32_path,
(unit - 32) / 16, unit % 16);
else
__small_sprintf (win32_path, "\\DosDevices\\%c:", unit - 224 + 'A');
break;
break;
default:
__small_sprintf (win32_path, devfmt, unit);
break;
break;
}
return TRUE;
}

View File

@ -159,7 +159,7 @@ enum fe_types
FE_CWD = 4 /* Search CWD for program */
};
const char * __stdcall find_exec (const char *name, path_conv& buf,
const char *winenv = "PATH=",
const char *winenv = "PATH=",
unsigned opt = FE_NADA,
const char **known_suffix = NULL)
__attribute__ ((regparm(3)));

View File

@ -176,7 +176,7 @@ make_pipe (int fildes[2], unsigned int psize, int mode)
}
syscall_printf ("%d = make_pipe ([%d, %d], %d, %p)", res, fildes[0],
fildes[1], psize, mode);
fildes[1], psize, mode);
return res;
}

View File

@ -27,17 +27,17 @@ public:
operator pwdgrp_state ()
{
if (state != uninitialized && file_w32[0] && cygheap->etc_changed ())
{
HANDLE h;
WIN32_FIND_DATA data;
{
HANDLE h;
WIN32_FIND_DATA data;
if ((h = FindFirstFile (file_w32, &data)) != INVALID_HANDLE_VALUE)
{
if (CompareFileTime (&data.ftLastWriteTime, &last_modified) > 0)
state = uninitialized;
FindClose (h);
}
}
if ((h = FindFirstFile (file_w32, &data)) != INVALID_HANDLE_VALUE)
{
if (CompareFileTime (&data.ftLastWriteTime, &last_modified) > 0)
state = uninitialized;
FindClose (h);
}
}
return state;
}
void operator = (pwdgrp_state nstate)
@ -47,7 +47,7 @@ public:
void set_last_modified (FILE *f)
{
if (!file_w32[0])
strcpy (file_w32, cygheap->fdtab[fileno (f)]->get_win32_name ());
strcpy (file_w32, cygheap->fdtab[fileno (f)]->get_win32_name ());
GetFileTime (cygheap->fdtab[fileno (f)]->get_handle (),
NULL, NULL, &last_modified);

View File

@ -542,7 +542,7 @@ get_group_sidlist (const char *logonserver, cygsidlist &grp_list,
if (get_supplementary_group_sidlist (user, sup_list))
{
for (int i = 0; i < sup_list.count; ++i)
if (!grp_list.contains (sup_list.sids[i]))
if (!grp_list.contains (sup_list.sids[i]))
grp_list += sup_list.sids[i];
}
return TRUE;

View File

@ -286,7 +286,7 @@ select_stuff::wait (fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
s = &start;
int gotone = FALSE;
/* Some types of object (e.g., consoles) wake up on "inappropriate" events
like mouse movements. The verify function will detect these situations.
like mouse movements. The verify function will detect these situations.
If it returns false, then this wakeup was a false alarm and we should go
back to waiting. */
while ((s = s->next))

View File

@ -153,7 +153,7 @@ memory_init ()
heap_init ();
mount_table = (mount_info *) open_shared (user_name, MOUNT_VERSION,
cygwin_mount_h,
cygwin_mount_h,
sizeof (mount_info), 0);
debug_printf ("opening mount table for '%s' at %p", cygheap->user.name (),
mount_table_address);

View File

@ -366,7 +366,7 @@ spawn_guts (HANDLE hToken, const char * prog_arg, const char *const *argv,
}
init_child_info (chtype, &ciresrv, (mode == _P_OVERLAY) ? myself->pid : 1,
spr);
spr);
if (!DuplicateHandle (hMainProc, hMainProc, hMainProc, &ciresrv.parent, 0, 1,
DUPLICATE_SAME_ACCESS))
{
@ -496,7 +496,7 @@ spawn_guts (HANDLE hToken, const char * prog_arg, const char *const *argv,
newargv.unshift (arg1);
/* FIXME: This should not be using FE_NATIVE. It should be putting
the posix path on the argv list. */
the posix path on the argv list. */
find_exec (pgm, real_path, "PATH=", FE_NATIVE, &ext);
newargv.unshift (real_path, 1);
}
@ -779,7 +779,7 @@ spawn_guts (HANDLE hToken, const char * prog_arg, const char *const *argv,
child.remember ();
strcpy (child->progname, real_path);
/* FIXME: This introduces an unreferenced, open handle into the child.
The purpose is to keep the pid shared memory open so that all of
The purpose is to keep the pid shared memory open so that all of
the fields filled out by child.remember do not disappear and so there
is not a brief period during which the pid is not available.
However, we should try to find another way to do this eventually. */

View File

@ -187,7 +187,7 @@ _unlink (const char *ourname)
bool delete_on_close_ok;
delete_on_close_ok = !win32_name.isremote ()
&& wincap.has_delete_on_close ();
&& wincap.has_delete_on_close ();
/* Attempt to use "delete on close" semantics to handle removing
a file which may be open. */
@ -319,7 +319,7 @@ _read (int fd, void *ptr, size_t len)
}
/* FIXME: This is not thread safe. We need some method to
ensure that an fd, closed in another thread, aborts I/O
ensure that an fd, closed in another thread, aborts I/O
operations. */
if (!cfd.isopen())
return -1;
@ -347,7 +347,7 @@ _read (int fd, void *ptr, size_t len)
}
syscall_printf ("%d = read (%d, %p, %d), errno %d", res, fd, ptr, len,
get_errno ());
get_errno ());
MALLOC_CHECK;
return res;
}
@ -503,7 +503,7 @@ _open (const char *unix_path, int flags, ...)
{
path_conv pc;
if (!(fh = cygheap->fdtab.build_fhandler_from_name (fd, unix_path,
NULL, pc)))
NULL, pc)))
res = -1; // errno already set
else if (!fh->open (&pc, flags, (mode & 07777) & ~cygheap->umask))
{
@ -784,7 +784,7 @@ chown_worker (const char *name, unsigned fmode, uid_t uid, gid_t gid)
if (win32_path.isdir())
attrib |= S_IFDIR;
res = set_file_attribute (win32_path.has_acls (), win32_path, uid,
gid, attrib, cygheap->user.logsrv ());
gid, attrib, cygheap->user.logsrv ());
}
if (res != 0 && (!win32_path.has_acls () || !allow_ntsec))
{
@ -1029,7 +1029,7 @@ stat_worker (const char *name, struct stat *buf, int nofollow, path_conv *pc)
else
{
debug_printf ("(%s, %p, %d, %p), file_attributes %d", name, buf, nofollow,
pc, (DWORD) real_path);
pc, (DWORD) real_path);
memset (buf, 0, sizeof (struct stat));
res = fh->fstat (buf, pc);
}
@ -2042,7 +2042,7 @@ seteuid (uid_t uid)
user.token = cygheap->user.impersonated ? cygheap->user.token
: INVALID_HANDLE_VALUE;
/* Unsetting these both env vars is necessary to get NetUserGetInfo()
called in internal_getlogin (). Otherwise the wrong path is used
called in internal_getlogin (). Otherwise the wrong path is used
after a user switch, probably. */
unsetenv ("HOMEDRIVE");
unsetenv ("HOMEPATH");

View File

@ -89,7 +89,7 @@ sysconf (int in)
return sbi.HighestPhysicalPage - sbi.LowestPhysicalPage + 1;
}
}
break;
break;
}
/* Invalid input or unimplemented sysconf name */

View File

@ -1964,11 +1964,11 @@ __pthread_mutex_lock (pthread_mutex_t *mutex)
break;
case VALID_STATIC_OBJECT:
if (*mutex == PTHREAD_MUTEX_INITIALIZER)
{
int rv = __pthread_mutex_init (mutex, NULL);
if (rv)
{
int rv = __pthread_mutex_init (mutex, NULL);
if (rv)
return rv;
}
}
break;
case VALID_OBJECT:
break;

View File

@ -85,7 +85,7 @@ internal_getlogin (cygheap_user &user)
* only obtain HOMEDRIVE and HOMEPATH if they are not already set
* in the environment. */
if (!getenv ("HOMEPATH") || !getenv ("HOMEDRIVE"))
{
{
LPUSER_INFO_3 ui = NULL;
WCHAR wuser[UNLEN + 1];
@ -98,7 +98,7 @@ internal_getlogin (cygheap_user &user)
strcat (strcpy (buf, "\\\\"), user.logsrv ());
sys_mbstowcs (wlogsrv, buf,
sizeof (wlogsrv) / sizeof(*wlogsrv));
sizeof (wlogsrv) / sizeof(*wlogsrv));
ret = NetUserGetInfo (wlogsrv, wuser, 3,(LPBYTE *)&ui);
}
}
@ -218,7 +218,7 @@ internal_getlogin (cygheap_user &user)
{
const char *homedrive, *homepath;
if (pw && pw->pw_dir && *pw->pw_dir)
{
{
setenv ("HOME", pw->pw_dir, 1);
debug_printf ("Set HOME (from /etc/passwd) to %s", pw->pw_dir);
}

View File

@ -430,9 +430,9 @@ wincapc::init ()
case 4:
os = "NT";
if (strcmp (version.szCSDVersion, "Service Pack 4") < 0)
caps = &wincap_nt4;
caps = &wincap_nt4;
else
caps = &wincap_nt4sp4;
caps = &wincap_nt4sp4;
break;
case 5:
os = "NT";
@ -446,7 +446,7 @@ wincapc::init ()
caps = &wincap_unknown;
break;
}
break;
break;
case VER_PLATFORM_WIN32_WINDOWS:
switch (version.dwMinorVersion)
{
@ -460,9 +460,9 @@ wincapc::init ()
case 10:
os = "98";
if (strchr(version.szCSDVersion, 'A'))
caps = &wincap_98se;
caps = &wincap_98se;
else
caps = &wincap_98;
caps = &wincap_98;
break;
case 90:
os = "ME";
@ -473,9 +473,9 @@ wincapc::init ()
caps = &wincap_unknown;
break;
}
break;
break;
default:
os = "??";
os = "??";
caps = &wincap_unknown;
break;
}