white space
This commit is contained in:
parent
b4ec184199
commit
1cd065837c
|
@ -51,7 +51,7 @@ extern "C" {
|
||||||
static void __stdcall _cfree (void *) __attribute__((regparm(1)));
|
static void __stdcall _cfree (void *) __attribute__((regparm(1)));
|
||||||
static void *__stdcall _csbrk (int);
|
static void *__stdcall _csbrk (int);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Called by fork or spawn to reallocate cygwin heap */
|
/* Called by fork or spawn to reallocate cygwin heap */
|
||||||
void __stdcall
|
void __stdcall
|
||||||
cygheap_fixup_in_child (bool execed)
|
cygheap_fixup_in_child (bool execed)
|
||||||
|
|
|
@ -171,7 +171,7 @@ _cygtls::remove (DWORD wait)
|
||||||
if (wait)
|
if (wait)
|
||||||
{
|
{
|
||||||
/* FIXME: Need some sort of atthreadexit function to allow things like
|
/* FIXME: Need some sort of atthreadexit function to allow things like
|
||||||
select to control this themselves. */
|
select to control this themselves. */
|
||||||
if (locals.exitsock != INVALID_SOCKET)
|
if (locals.exitsock != INVALID_SOCKET)
|
||||||
{
|
{
|
||||||
closesocket (locals.exitsock);
|
closesocket (locals.exitsock);
|
||||||
|
|
|
@ -965,7 +965,7 @@ dll_crt0 (per_process *uptr)
|
||||||
calling this function, and that storage must not be overwritten until you
|
calling this function, and that storage must not be overwritten until you
|
||||||
unload cygwin1.dll, as it is used for _my_tls. It is best to load
|
unload cygwin1.dll, as it is used for _my_tls. It is best to load
|
||||||
cygwin1.dll before spawning any additional threads in your process.
|
cygwin1.dll before spawning any additional threads in your process.
|
||||||
|
|
||||||
See winsup/testsuite/cygload for an example of how to use cygwin1.dll
|
See winsup/testsuite/cygload for an example of how to use cygwin1.dll
|
||||||
from MSVC and non-cygwin MinGW applications. */
|
from MSVC and non-cygwin MinGW applications. */
|
||||||
extern "C" void
|
extern "C" void
|
||||||
|
|
|
@ -68,7 +68,7 @@ get_full_path_of_dll (const char* str, char *name)
|
||||||
|
|
||||||
if (isabspath (name) ||
|
if (isabspath (name) ||
|
||||||
(ret = check_path_access ("LD_LIBRARY_PATH=", name, real_filename)
|
(ret = check_path_access ("LD_LIBRARY_PATH=", name, real_filename)
|
||||||
?: check_path_access ("/usr/lib", name, real_filename)) == NULL)
|
?: check_path_access ("/usr/lib", name, real_filename)) == NULL)
|
||||||
real_filename.check (name, PC_SYM_FOLLOW | PC_NOFULL | PC_NULLEMPTY); /* Convert */
|
real_filename.check (name, PC_SYM_FOLLOW | PC_NOFULL | PC_NULLEMPTY); /* Convert */
|
||||||
|
|
||||||
if (!real_filename.error)
|
if (!real_filename.error)
|
||||||
|
|
|
@ -311,7 +311,7 @@ cygwin_internal (cygwin_getinfo_types t, ...)
|
||||||
try_to_debug ();
|
try_to_debug ();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return (unsigned long) -1;
|
return (unsigned long) -1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,11 +59,11 @@ fhandler_mailslot::open (int flags, mode_t mode)
|
||||||
{
|
{
|
||||||
case O_RDONLY: /* Server */
|
case O_RDONLY: /* Server */
|
||||||
x = CreateMailslot (get_win32_name (),
|
x = CreateMailslot (get_win32_name (),
|
||||||
0, /* Any message size */
|
0, /* Any message size */
|
||||||
(flags & O_NONBLOCK) ? 0 : MAILSLOT_WAIT_FOREVER,
|
(flags & O_NONBLOCK) ? 0 : MAILSLOT_WAIT_FOREVER,
|
||||||
&sec_none);
|
&sec_none);
|
||||||
if (x == INVALID_HANDLE_VALUE)
|
if (x == INVALID_HANDLE_VALUE)
|
||||||
{
|
{
|
||||||
/* FIXME: It's not possible to open the read side of an existing
|
/* FIXME: It's not possible to open the read side of an existing
|
||||||
mailslot using CreateFile. You'll get a handle, but using it
|
mailslot using CreateFile. You'll get a handle, but using it
|
||||||
in ReadFile returns ERROR_INVALID_PARAMETER. On the other
|
in ReadFile returns ERROR_INVALID_PARAMETER. On the other
|
||||||
|
@ -95,10 +95,10 @@ fhandler_mailslot::open (int flags, mode_t mode)
|
||||||
break;
|
break;
|
||||||
case O_WRONLY: /* Client */
|
case O_WRONLY: /* Client */
|
||||||
/* The client is the DLL exclusively. Don't allow opening from
|
/* The client is the DLL exclusively. Don't allow opening from
|
||||||
application code. */
|
application code. */
|
||||||
extern fhandler_mailslot *dev_kmsg;
|
extern fhandler_mailslot *dev_kmsg;
|
||||||
if (this != dev_kmsg)
|
if (this != dev_kmsg)
|
||||||
{
|
{
|
||||||
set_errno (EPERM); /* As on Linux. */
|
set_errno (EPERM); /* As on Linux. */
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,9 +66,9 @@ thread_netdrive (void *arg)
|
||||||
ndi->ret = WNetGetResourceInformation ((LPNETRESOURCE) ndi->in,
|
ndi->ret = WNetGetResourceInformation ((LPNETRESOURCE) ndi->in,
|
||||||
nro, &size, &dummy);
|
nro, &size, &dummy);
|
||||||
if (ndi->ret != NO_ERROR)
|
if (ndi->ret != NO_ERROR)
|
||||||
break;
|
break;
|
||||||
if (ndi->what == GET_RESOURCE_OPENENUMTOP)
|
if (ndi->what == GET_RESOURCE_OPENENUMTOP)
|
||||||
{
|
{
|
||||||
nro2 = nro;
|
nro2 = nro;
|
||||||
nro = (LPNETRESOURCE) alloca (size = 4096);
|
nro = (LPNETRESOURCE) alloca (size = 4096);
|
||||||
ndi->ret = WNetGetResourceParent (nro2, nro, &size);
|
ndi->ret = WNetGetResourceParent (nro2, nro, &size);
|
||||||
|
@ -78,7 +78,7 @@ thread_netdrive (void *arg)
|
||||||
ndi->ret = WNetOpenEnum (RESOURCE_GLOBALNET, RESOURCETYPE_DISK, 0, nro,
|
ndi->ret = WNetOpenEnum (RESOURCE_GLOBALNET, RESOURCETYPE_DISK, 0, nro,
|
||||||
&enumhdl);
|
&enumhdl);
|
||||||
if (ndi->ret == NO_ERROR)
|
if (ndi->ret == NO_ERROR)
|
||||||
*(HANDLE *) ndi->out = enumhdl;
|
*(HANDLE *) ndi->out = enumhdl;
|
||||||
break;
|
break;
|
||||||
case GET_RESOURCE_ENUM:
|
case GET_RESOURCE_ENUM:
|
||||||
ndi->ret = WNetEnumResource ((HANDLE) ndi->in, (size = 1, &size),
|
ndi->ret = WNetEnumResource ((HANDLE) ndi->in, (size = 1, &size),
|
||||||
|
@ -161,7 +161,7 @@ fhandler_netdrive::readdir (DIR *dir)
|
||||||
NETRESOURCE nr = { 0 };
|
NETRESOURCE nr = { 0 };
|
||||||
|
|
||||||
if (len == 2) /* // */
|
if (len == 2) /* // */
|
||||||
{
|
{
|
||||||
namebuf = (char *) alloca (MAX_COMPUTERNAME_LENGTH + 3);
|
namebuf = (char *) alloca (MAX_COMPUTERNAME_LENGTH + 3);
|
||||||
strcpy (namebuf, "\\\\");
|
strcpy (namebuf, "\\\\");
|
||||||
size = MAX_COMPUTERNAME_LENGTH + 1;
|
size = MAX_COMPUTERNAME_LENGTH + 1;
|
||||||
|
@ -172,7 +172,7 @@ fhandler_netdrive::readdir (DIR *dir)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
const char *from;
|
const char *from;
|
||||||
char *to;
|
char *to;
|
||||||
namebuf = (char *) alloca (len + 1);
|
namebuf = (char *) alloca (len + 1);
|
||||||
|
@ -195,7 +195,7 @@ fhandler_netdrive::readdir (DIR *dir)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ret = create_thread_and_wait (GET_RESOURCE_ENUM, dir->__handle,
|
ret = create_thread_and_wait (GET_RESOURCE_ENUM, dir->__handle,
|
||||||
nro = (LPNETRESOURCE) alloca (16384),
|
nro = (LPNETRESOURCE) alloca (16384),
|
||||||
16384, "WnetEnumResource");
|
16384, "WnetEnumResource");
|
||||||
if (ret != NO_ERROR)
|
if (ret != NO_ERROR)
|
||||||
{
|
{
|
||||||
|
|
|
@ -385,42 +385,42 @@ fhandler_serial::switch_modem_lines (int set, int clr)
|
||||||
if (set & TIOCM_RTS)
|
if (set & TIOCM_RTS)
|
||||||
{
|
{
|
||||||
if (EscapeCommFunction (get_handle (), SETRTS))
|
if (EscapeCommFunction (get_handle (), SETRTS))
|
||||||
rts = TIOCM_RTS;
|
rts = TIOCM_RTS;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
__seterrno ();
|
__seterrno ();
|
||||||
res = -1;
|
res = -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (clr & TIOCM_RTS)
|
else if (clr & TIOCM_RTS)
|
||||||
{
|
{
|
||||||
if (EscapeCommFunction (get_handle (), CLRRTS))
|
if (EscapeCommFunction (get_handle (), CLRRTS))
|
||||||
rts = 0;
|
rts = 0;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
__seterrno ();
|
__seterrno ();
|
||||||
res = -1;
|
res = -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (set & TIOCM_DTR)
|
if (set & TIOCM_DTR)
|
||||||
{
|
{
|
||||||
if (EscapeCommFunction (get_handle (), SETDTR))
|
if (EscapeCommFunction (get_handle (), SETDTR))
|
||||||
rts = TIOCM_DTR;
|
rts = TIOCM_DTR;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
__seterrno ();
|
__seterrno ();
|
||||||
res = -1;
|
res = -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (clr & TIOCM_DTR)
|
else if (clr & TIOCM_DTR)
|
||||||
{
|
{
|
||||||
if (EscapeCommFunction (get_handle (), CLRDTR))
|
if (EscapeCommFunction (get_handle (), CLRDTR))
|
||||||
rts = 0;
|
rts = 0;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
__seterrno ();
|
__seterrno ();
|
||||||
res = -1;
|
res = -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
|
@ -482,17 +482,17 @@ fhandler_serial::ioctl (unsigned int cmd, void *buffer)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case TIOCMSET:
|
case TIOCMSET:
|
||||||
if (switch_modem_lines (ipbuffer, ~ipbuffer))
|
if (switch_modem_lines (ipbuffer, ~ipbuffer))
|
||||||
res = -1;
|
res = -1;
|
||||||
break;
|
break;
|
||||||
case TIOCMBIS:
|
case TIOCMBIS:
|
||||||
if (switch_modem_lines (ipbuffer, 0))
|
if (switch_modem_lines (ipbuffer, 0))
|
||||||
res = -1;
|
res = -1;
|
||||||
break;
|
break;
|
||||||
case TIOCMBIC:
|
case TIOCMBIC:
|
||||||
if (switch_modem_lines (0, ipbuffer))
|
if (switch_modem_lines (0, ipbuffer))
|
||||||
res = -1;
|
res = -1;
|
||||||
break;
|
break;
|
||||||
case TIOCCBRK:
|
case TIOCCBRK:
|
||||||
if (ClearCommBreak (get_handle ()) == 0)
|
if (ClearCommBreak (get_handle ()) == 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -110,7 +110,7 @@ get_inet_addr (const struct sockaddr *in, int inlen,
|
||||||
ret = 1;
|
ret = 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
__seterrno ();
|
__seterrno ();
|
||||||
CloseHandle (fh);
|
CloseHandle (fh);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
@ -87,30 +87,29 @@ int scandir (const char *__dir,
|
||||||
int alphasort (const struct dirent **__a, const struct dirent **__b);
|
int alphasort (const struct dirent **__a, const struct dirent **__b);
|
||||||
/* File types for `d_type'. */
|
/* File types for `d_type'. */
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
DT_UNKNOWN = 0,
|
DT_UNKNOWN = 0,
|
||||||
# define DT_UNKNOWN DT_UNKNOWN
|
# define DT_UNKNOWN DT_UNKNOWN
|
||||||
DT_FIFO = 1,
|
DT_FIFO = 1,
|
||||||
# define DT_FIFO DT_FIFO
|
# define DT_FIFO DT_FIFO
|
||||||
DT_CHR = 2,
|
DT_CHR = 2,
|
||||||
# define DT_CHR DT_CHR
|
# define DT_CHR DT_CHR
|
||||||
DT_DIR = 4,
|
DT_DIR = 4,
|
||||||
# define DT_DIR DT_DIR
|
# define DT_DIR DT_DIR
|
||||||
DT_BLK = 6,
|
DT_BLK = 6,
|
||||||
# define DT_BLK DT_BLK
|
# define DT_BLK DT_BLK
|
||||||
DT_REG = 8,
|
DT_REG = 8,
|
||||||
# define DT_REG DT_REG
|
# define DT_REG DT_REG
|
||||||
DT_LNK = 10,
|
DT_LNK = 10,
|
||||||
# define DT_LNK DT_LNK
|
# define DT_LNK DT_LNK
|
||||||
DT_SOCK = 12,
|
DT_SOCK = 12,
|
||||||
# define DT_SOCK DT_SOCK
|
# define DT_SOCK DT_SOCK
|
||||||
DT_WHT = 14
|
DT_WHT = 14
|
||||||
# define DT_WHT DT_WHT
|
# define DT_WHT DT_WHT
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Convert between stat structure types and directory types. */
|
/* Convert between stat structure types and directory types. */
|
||||||
# define IFTODT(mode) (((mode) & 0170000) >> 12)
|
# define IFTODT(mode) (((mode) & 0170000) >> 12)
|
||||||
# define DTTOIF(dirtype) ((dirtype) << 12)
|
# define DTTOIF(dirtype) ((dirtype) << 12)
|
||||||
#endif /* _POSIX_SOURCE */
|
#endif /* _POSIX_SOURCE */
|
||||||
|
#endif /*_SYS_DIRENT_H*/
|
||||||
#endif
|
|
||||||
|
|
|
@ -48,7 +48,7 @@ typedef struct {
|
||||||
u_int32_t n_type; /* Type of this note. */
|
u_int32_t n_type; /* Type of this note. */
|
||||||
} Elf_Note;
|
} Elf_Note;
|
||||||
|
|
||||||
/* Indexes into the e_ident array. Keep synced with
|
/* Indexes into the e_ident array. Keep synced with
|
||||||
http://www.sco.com/developer/gabi/ch4.eheader.html */
|
http://www.sco.com/developer/gabi/ch4.eheader.html */
|
||||||
#define EI_MAG0 0 /* Magic number, byte 0. */
|
#define EI_MAG0 0 /* Magic number, byte 0. */
|
||||||
#define EI_MAG1 1 /* Magic number, byte 1. */
|
#define EI_MAG1 1 /* Magic number, byte 1. */
|
||||||
|
@ -156,12 +156,12 @@ typedef struct {
|
||||||
#define SHT_STRTAB 3 /* string table section */
|
#define SHT_STRTAB 3 /* string table section */
|
||||||
#define SHT_RELA 4 /* relocation section with addends */
|
#define SHT_RELA 4 /* relocation section with addends */
|
||||||
#define SHT_HASH 5 /* symbol hash table section */
|
#define SHT_HASH 5 /* symbol hash table section */
|
||||||
#define SHT_DYNAMIC 6 /* dynamic section */
|
#define SHT_DYNAMIC 6 /* dynamic section */
|
||||||
#define SHT_NOTE 7 /* note section */
|
#define SHT_NOTE 7 /* note section */
|
||||||
#define SHT_NOBITS 8 /* no space section */
|
#define SHT_NOBITS 8 /* no space section */
|
||||||
#define SHT_REL 9 /* relocation section - no addends */
|
#define SHT_REL 9 /* relocation section - no addends */
|
||||||
#define SHT_SHLIB 10 /* reserved - purpose unknown */
|
#define SHT_SHLIB 10 /* reserved - purpose unknown */
|
||||||
#define SHT_DYNSYM 11 /* dynamic symbol table section */
|
#define SHT_DYNSYM 11 /* dynamic symbol table section */
|
||||||
#define SHT_NUM 12 /* number of section types */
|
#define SHT_NUM 12 /* number of section types */
|
||||||
#define SHT_LOOS 0x60000000 /* First of OS specific semantics */
|
#define SHT_LOOS 0x60000000 /* First of OS specific semantics */
|
||||||
#define SHT_HIOS 0x6fffffff /* Last of OS specific semantics */
|
#define SHT_HIOS 0x6fffffff /* Last of OS specific semantics */
|
||||||
|
|
|
@ -29,21 +29,21 @@ __BEGIN_DECLS
|
||||||
#define _IOC_TYPEBITS 8
|
#define _IOC_TYPEBITS 8
|
||||||
#define _IOC_SIZEBITS 14
|
#define _IOC_SIZEBITS 14
|
||||||
#define _IOC_DIRBITS 2
|
#define _IOC_DIRBITS 2
|
||||||
|
|
||||||
#define _IOC_NRMASK ((1 << _IOC_NRBITS)-1)
|
#define _IOC_NRMASK ((1 << _IOC_NRBITS)-1)
|
||||||
#define _IOC_TYPEMASK ((1 << _IOC_TYPEBITS)-1)
|
#define _IOC_TYPEMASK ((1 << _IOC_TYPEBITS)-1)
|
||||||
#define _IOC_SIZEMASK ((1 << _IOC_SIZEBITS)-1)
|
#define _IOC_SIZEMASK ((1 << _IOC_SIZEBITS)-1)
|
||||||
#define _IOC_DIRMASK ((1 << _IOC_DIRBITS)-1)
|
#define _IOC_DIRMASK ((1 << _IOC_DIRBITS)-1)
|
||||||
|
|
||||||
#define _IOC_NRSHIFT 0
|
#define _IOC_NRSHIFT 0
|
||||||
#define _IOC_TYPESHIFT (_IOC_NRSHIFT+_IOC_NRBITS)
|
#define _IOC_TYPESHIFT (_IOC_NRSHIFT+_IOC_NRBITS)
|
||||||
#define _IOC_SIZESHIFT (_IOC_TYPESHIFT+_IOC_TYPEBITS)
|
#define _IOC_SIZESHIFT (_IOC_TYPESHIFT+_IOC_TYPEBITS)
|
||||||
#define _IOC_DIRSHIFT (_IOC_SIZESHIFT+_IOC_SIZEBITS)
|
#define _IOC_DIRSHIFT (_IOC_SIZESHIFT+_IOC_SIZEBITS)
|
||||||
|
|
||||||
#define _IOC_NONE 0U
|
#define _IOC_NONE 0U
|
||||||
#define _IOC_WRITE 1U
|
#define _IOC_WRITE 1U
|
||||||
#define _IOC_READ 2U
|
#define _IOC_READ 2U
|
||||||
|
|
||||||
#define _IOC(dir,type,nr,size) \
|
#define _IOC(dir,type,nr,size) \
|
||||||
(((dir) << _IOC_DIRSHIFT) | \
|
(((dir) << _IOC_DIRSHIFT) | \
|
||||||
+ ((type) << _IOC_TYPESHIFT) | \
|
+ ((type) << _IOC_TYPESHIFT) | \
|
||||||
|
|
|
@ -2272,7 +2272,7 @@ cygwin_inet_pton (int family, const char *strptr, void *addrptr)
|
||||||
struct in_addr in_val;
|
struct in_addr in_val;
|
||||||
|
|
||||||
if (cygwin_inet_aton (strptr, &in_val))
|
if (cygwin_inet_aton (strptr, &in_val))
|
||||||
{
|
{
|
||||||
memcpy (addrptr, &in_val, sizeof (struct in_addr));
|
memcpy (addrptr, &in_val, sizeof (struct in_addr));
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -2298,7 +2298,7 @@ cygwin_inet_ntop (int family, const void *addrptr, char *strptr, size_t len)
|
||||||
|
|
||||||
__small_sprintf (temp, "%u.%u.%u.%u", p[0], p[1], p[2], p[3]);
|
__small_sprintf (temp, "%u.%u.%u.%u", p[0], p[1], p[2], p[3]);
|
||||||
if (strlen (temp) >= len)
|
if (strlen (temp) >= len)
|
||||||
{
|
{
|
||||||
set_errno (ENOSPC);
|
set_errno (ENOSPC);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1354,7 +1354,7 @@ get_reg_security (HANDLE handle, security_descriptor &sd_ret)
|
||||||
if (ret == ERROR_INSUFFICIENT_BUFFER)
|
if (ret == ERROR_INSUFFICIENT_BUFFER)
|
||||||
{
|
{
|
||||||
if (!sd_ret.malloc (len))
|
if (!sd_ret.malloc (len))
|
||||||
set_errno (ENOMEM);
|
set_errno (ENOMEM);
|
||||||
else
|
else
|
||||||
ret = RegGetKeySecurity ((HKEY) handle,
|
ret = RegGetKeySecurity ((HKEY) handle,
|
||||||
DACL_SECURITY_INFORMATION
|
DACL_SECURITY_INFORMATION
|
||||||
|
@ -1376,10 +1376,10 @@ get_nt_object_security (HANDLE handle, SE_OBJECT_TYPE object_type,
|
||||||
{
|
{
|
||||||
NTSTATUS ret;
|
NTSTATUS ret;
|
||||||
ULONG len = 0;
|
ULONG len = 0;
|
||||||
|
|
||||||
/* Unfortunately, NtQuerySecurityObject doesn't work on predefined registry
|
/* Unfortunately, NtQuerySecurityObject doesn't work on predefined registry
|
||||||
keys like HKEY_LOCAL_MACHINE. It fails with "Invalid Handle". So we
|
keys like HKEY_LOCAL_MACHINE. It fails with "Invalid Handle". So we
|
||||||
have to retreat to the Win32 registry functions for registry keys.
|
have to retreat to the Win32 registry functions for registry keys.
|
||||||
What bugs me is that RegGetKeySecurity is obviously just a wrapper
|
What bugs me is that RegGetKeySecurity is obviously just a wrapper
|
||||||
around NtQuerySecurityObject, but there seems to be no function to
|
around NtQuerySecurityObject, but there seems to be no function to
|
||||||
convert pseudo HKEY values to real handles. */
|
convert pseudo HKEY values to real handles. */
|
||||||
|
|
|
@ -1799,12 +1799,12 @@ statvfs (const char *fname, struct statvfs *sfs)
|
||||||
if (!status && statusex)
|
if (!status && statusex)
|
||||||
{
|
{
|
||||||
/* Grrr, this can happen on 9x when a share isn't attached to
|
/* Grrr, this can happen on 9x when a share isn't attached to
|
||||||
a drive letter. Fake, fake, hoorah. */
|
a drive letter. Fake, fake, hoorah. */
|
||||||
status = TRUE;
|
status = TRUE;
|
||||||
bps = 512;
|
bps = 512;
|
||||||
spc = 8;
|
spc = 8;
|
||||||
while ((totalb.QuadPart % (spc*bps)) && spc > 1)
|
while ((totalb.QuadPart % (spc*bps)) && spc > 1)
|
||||||
spc >>= 1;
|
spc >>= 1;
|
||||||
}
|
}
|
||||||
if (status)
|
if (status)
|
||||||
{
|
{
|
||||||
|
|
|
@ -2638,7 +2638,7 @@ pthread_cond_timedwait (pthread_cond_t *cond, pthread_mutex_t *mutex,
|
||||||
evaluate microseconds directly in DWORD. */
|
evaluate microseconds directly in DWORD. */
|
||||||
if (tv.tv_sec > abstime->tv_sec
|
if (tv.tv_sec > abstime->tv_sec
|
||||||
|| (tv.tv_sec == abstime->tv_sec
|
|| (tv.tv_sec == abstime->tv_sec
|
||||||
&& tv.tv_usec > abstime->tv_nsec / 1000))
|
&& tv.tv_usec > abstime->tv_nsec / 1000))
|
||||||
return ETIMEDOUT;
|
return ETIMEDOUT;
|
||||||
|
|
||||||
waitlength = (abstime->tv_sec - tv.tv_sec) * 1000;
|
waitlength = (abstime->tv_sec - tv.tv_sec) * 1000;
|
||||||
|
|
Loading…
Reference in New Issue