Clean up whitespace.

This commit is contained in:
Christopher Faylor
2011-12-17 23:39:47 +00:00
parent 988d896c0a
commit 1b23b30b29
57 changed files with 893 additions and 894 deletions

View File

@@ -44,7 +44,7 @@
#define _MCOUNT_DECL static __inline__ void _MCOUNT_CALL _mcount
/* FIXME: This works, but it would be cleaner to convert mcount into an
assembler stub that calls an extern _mcount.
assembler stub that calls an extern _mcount.
Older versions of GCC (pre-4.1) will still fail with regparm since the
compiler used %edx to store an unneeded counter variable. */

View File

@@ -140,7 +140,6 @@ cygthread::simplestub (VOID *arg)
info->callfunc (true);
if (notify)
SetEvent (notify);
return 0;
}

View File

@@ -466,7 +466,7 @@ child_info_fork::alloc_stack ()
esp = getstack (esp);
stackaddr = 0;
/* This only affects forked children of a process started from a native
64 bit process, but it doesn't hurt to do it unconditionally. Fix
64 bit process, but it doesn't hurt to do it unconditionally. Fix
StackBase in the child to be the same as in the parent, so that the
computation of _my_tls is correct. */
_tlsbase = (char *) stackbottom;
@@ -706,7 +706,7 @@ dll_crt0_0 ()
{
memory_init (true);
/* WOW64 process? Check if we have been started from 64 bit process
and if our stack is at an unusual address. Set wow64_has_64bit_parent
and if our stack is at an unusual address. Set wow64_has_64bit_parent
if so. Problem description in wow64_test_for_64bit_parent. */
if (wincap.is_wow64 ())
wow64_has_64bit_parent = wow64_test_for_64bit_parent ();

View File

@@ -505,7 +505,7 @@ fh_alloc (path_conv& pc)
if (pc.isopen ())
fh = cnew (fhandler_pty_master, -1);
else
fhraw = cnew_no_ctor (fhandler_pty_master, -1);
fhraw = cnew_no_ctor (fhandler_pty_master, -1);
break;
case FH_WINDOWS:
fh = cnew (fhandler_windows);
@@ -575,7 +575,7 @@ fh_alloc (path_conv& pc)
case FH_TTY:
if (!pc.isopen ())
{
fhraw = cnew_no_ctor (fhandler_console, -1);
fhraw = cnew_no_ctor (fhandler_console, -1);
debug_printf ("not called from open for /dev/tty");
}
else if (myself->ctty <= 0 && last_tty_dev

View File

@@ -302,7 +302,7 @@ static const unsigned char conv_start_chars[256] =
WC, 0, 0, 0, WC, 0, 0, 0,
/* 112 */
/* p q r s t u v w */
WC, 0, 0, 0, WC, 0, 0, 0,
WC, 0, 0, 0, WC, 0, 0, 0,
};
static inline char

View File

@@ -136,7 +136,7 @@ fhandler_console::set_unit ()
if (shared_console_info)
{
fh_devices this_unit = dev ();
fh_devices shared_unit =
fh_devices shared_unit =
(fh_devices) shared_console_info->tty_min_state.getntty ();
created = false;
devset = (shared_unit == this_unit || this_unit == FH_CONSOLE

View File

@@ -1457,7 +1457,7 @@ out:
first call to either pread or pwrite. This is used for any subsequent
pread/pwrite. Thus the current file position of the "normal" file
handle is not touched.
FIXME:
Note that this is just a hack. The problem with this approach is that

View File

@@ -1201,7 +1201,7 @@ fhandler_pty_master::fhandler_pty_master (int unit)
else if (!setup ())
{
dev ().parse (FH_ERROR);
return;
return;
}
set_name ("/dev/ptmx");
}
@@ -1302,8 +1302,8 @@ fhandler_pty_master::close ()
return 0;
}
/* This is just to catch error conditions. Since the constructor
ctually opens some handles, and stat() does not open an fd, they need
/* This is just to catch error conditions. Since the constructor
actually opens some handles, and stat() does not open an fd, they need
to be closed when the fhandler goes away. */
fhandler_pty_master::~fhandler_pty_master ()
{

View File

@@ -1028,7 +1028,7 @@ lf_setlock (lockf_t *lock, inode_t *node, lockf_t **clean, HANDLE fhdl)
}
/* Wait for the blocking object and, for POSIX locks, its holding process.
Unfortunately, since BSD flock locks are not attached to a specific
Unfortunately, since BSD flock locks are not attached to a specific
process, we can't recognize an abandoned lock by sync'ing with the
creator process. We have to make sure the event object is in a
signalled state, or that it has gone away. The latter we can only

View File

@@ -1,7 +1,7 @@
/*
* Copyright (c) 1983, 1989, 1993
* The Regents of the University of California. All rights reserved.
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
@@ -17,7 +17,7 @@
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE

View File

@@ -1,6 +1,6 @@
/* Copyright (c) 1983, 1989
* The Regents of the University of California. All rights reserved.
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
@@ -16,7 +16,7 @@
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE

View File

@@ -128,7 +128,7 @@ typedef struct _fexcept_t
extern const fenv_t *_fe_dfl_env;
#define FE_DFL_ENV (_fe_dfl_env)
/* Additional implementation-defined environments, with macro
/* Additional implementation-defined environments, with macro
definitions beginning with FE_ and an uppercase letter,and having
type "pointer to const-qualified fenv_t",may also be specified by
the implementation. */

View File

@@ -1,7 +1,7 @@
/*
* Copyright (c) 1983, 1987, 1989
* The Regents of the University of California. All rights reserved.
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
@@ -17,7 +17,7 @@
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@@ -315,7 +315,7 @@ __END_DECLS
#if !defined(SHARED_LIBBIND) || defined(LIB)
/*
* If libbind is a shared object (well, DLL anyway)
* these externs break the linker when resolv.h is
* these externs break the linker when resolv.h is
* included by a lib client (like named)
* Make them go away if a client is including this
*

View File

@@ -12,7 +12,7 @@ details. */
#include "crt0.h"
#include "cygwin-cxx.h"
/* Weaken these declarations so the references don't pull in C++ dependencies
/* Weaken these declarations so the references don't pull in C++ dependencies
unnecessarily. */
#define WEAK __attribute__ ((weak))
@@ -55,7 +55,7 @@ extern char __RUNTIME_PSEUDO_RELOC_LIST__;
extern char __RUNTIME_PSEUDO_RELOC_LIST_END__;
extern char _image_base__;
struct per_process_cxx_malloc __cygwin_cxx_malloc =
struct per_process_cxx_malloc __cygwin_cxx_malloc =
{
&(operator new), &(operator new[]),
&(operator delete), &(operator delete[]),

View File

@@ -1,7 +1,7 @@
/*
* Copyright (c) 1983, 1990, 1993
* The Regents of the University of California. All rights reserved.
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
@@ -13,7 +13,7 @@
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@@ -29,14 +29,14 @@
/*
* Portions Copyright (c) 1993 by Digital Equipment Corporation.
*
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies, and that
* the name of Digital Equipment Corporation not be used in advertising or
* publicity pertaining to distribution of the document or software without
* specific, written prior permission.
*
*
* THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
* WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
@@ -92,7 +92,7 @@ __FBSDID("$FreeBSD$");
#include "port_after.h"
#endif
/*
/*
* Check whether "cp" is a valid ascii representation
* of an Internet address and convert to a binary address.
* Returns 1 if the address is valid, 0 if not.
@@ -134,7 +134,7 @@ cygwin_inet_aton(const char *cp, struct in_addr *addr) {
val = (val * base) + (c - '0');
c = *++cp;
digit = 1;
} else if (base == 16 && isascii(c) &&
} else if (base == 16 && isascii(c) &&
isxdigit((unsigned char)c)) {
val = (val << 4) |
(c + 10 - (islower((unsigned char)c) ? 'a' : 'A'));

View File

@@ -451,11 +451,11 @@ int res_nsend( res_state statp, const unsigned char * MsgPtr,
return ((os_query_t *) statp->os_query)(statp, DomName, Class, Type, AnsPtr, AnsLength);
}
else {
/* dn_expand sets errno */
/* dn_expand sets errno */
statp->res_h_errno = NETDB_INTERNAL;
return -1;
}
}
}
/* Close the socket if it had been opened before a fork.
Reuse of pid's cannot hurt */
@@ -488,7 +488,7 @@ int res_nsend( res_state statp, const unsigned char * MsgPtr,
This routine runs through the retry loop for each incorrect answer.
It is thus extremely likely that such attacks will cause a TRY_AGAIN return,
probably causing the calling program to retry after a delay.
Note that valid late or duplicate answers to a previous questions also cause
a retry, although this is minimized by flushing the socket before sending the
new question.
@@ -498,8 +498,8 @@ int res_nsend( res_state statp, const unsigned char * MsgPtr,
while ((rslt = cygwin_recvfrom( statp->sockfd, AnsPtr, AnsLength, 0, NULL, NULL)) >= 0) {
DPRINTF(debug, "Flushed %d bytes\n", rslt);
}
DPRINTF(debug && (errno != EWOULDBLOCK),
"Unexpected errno for flushing recvfrom: %s", strerror(errno));
DPRINTF(debug && (errno != EWOULDBLOCK),
"Unexpected errno for flushing recvfrom: %s", strerror(errno));
/* Send the message */
rslt = cygwin_sendto(statp->sockfd, MsgPtr, MsgLength, 0,
@@ -540,8 +540,8 @@ int res_nsend( res_state statp, const unsigned char * MsgPtr,
return -1;
}
DPRINTF(debug, "recvfrom: %d bytes from %08x\n", rslt, dnsSockAddr.sin_addr.s_addr);
/*
Prepare to retry with tcp
/*
Prepare to retry with tcp
*/
for (tcp = 0; tcp < 2; tcp++) {
/* Check if this is the expected message from the expected server */
@@ -561,11 +561,11 @@ int res_nsend( res_state statp, const unsigned char * MsgPtr,
&& (rslt >= MsgLength)
&& (memcmp(MsgPtr + HFIXEDSZ, AnsPtr + HFIXEDSZ, MsgLength - HFIXEDSZ) == 0)))) {
if ((AnsPtr[3] & ERR_MASK) == NOERROR) {
if ((AnsPtr[2] & TC) && (tcp == 0) && !(statp->options & RES_IGNTC)) {
if ((AnsPtr[2] & TC) && (tcp == 0) && !(statp->options & RES_IGNTC)) {
/* Truncated. Try TCP */
rslt = get_tcp(&statp->nsaddr_list[wServ], MsgPtr, MsgLength,
AnsPtr, AnsLength, statp->options & RES_DEBUG);
continue /* Tcp loop */;
continue /* Tcp loop */;
}
else if ((AnsPtr[6] | AnsPtr[7])!= 0)
return rslt;
@@ -588,7 +588,7 @@ int res_nsend( res_state statp, const unsigned char * MsgPtr,
case FORMERR:
statp->res_h_errno = HOST_NOT_FOUND;
break;
case SERVFAIL:
case SERVFAIL:
statp->res_h_errno = TRY_AGAIN;
break;
default:
@@ -644,7 +644,7 @@ int res_nmkquery (res_state statp,
/* Fill the header */
PUTSHORT(statp->id, buf);
PUTSHORT(RD, buf);
PUTSHORT(RD, buf);
PUTSHORT(1, buf); /* Number of questions */
for (i = 0; i < 3; i++)
PUTSHORT(0, buf); /* Number of answers */
@@ -655,14 +655,14 @@ int res_nmkquery (res_state statp,
PUTSHORT(qclass, buf);
/* Update id. The current query adds entropy to the next query id */
for (id4 = qtype, i = 0, ptr = dnameptr; *ptr; ptr++, i += 3)
for (id4 = qtype, i = 0, ptr = dnameptr; *ptr; ptr++, i += 3)
id4 ^= *ptr << (i & 0xF);
i = 1 + statp->id % 15; /* Between 1 and 16 */
/* id dependent rotation, also brings MSW to LSW */
id4 = (id4 << i) ^ (id4 >> (16 - i)) ^ (id4 >> (32 - i));
if ((short) id4)
statp->id ^= (short) id4;
else
else
statp->id++; /* Force change */
return len + (HFIXEDSZ + QFIXEDSZ); /* packet size */

View File

@@ -430,7 +430,7 @@ iruserok_sa(const void *ra, int rlen, int superuser, const char *ruser,
struct sockaddr_storage ss;
/* avoid alignment issue */
if (rlen > (int) sizeof(ss))
if (rlen > (int) sizeof(ss))
return(-1);
memcpy(&ss, ra, rlen);
raddr = (struct sockaddr *)&ss;

View File

@@ -296,9 +296,9 @@ strfmon(char * __restrict s, size_t maxsize, const char * __restrict format,
*
* = 0 - parentheses enclose the quantity and the
* $currency_symbol
* = 1 - the sign string precedes the quantity and the
* = 1 - the sign string precedes the quantity and the
* $currency_symbol
* = 2 - the sign string succeeds the quantity and the
* = 2 - the sign string succeeds the quantity and the
* $currency_symbol
* = 3 - the sign string precedes the $currency_symbol
* = 4 - the sign string succeeds the $currency_symbol

View File

@@ -275,21 +275,21 @@ find_alt_digits (const unsigned char *bp, alt_digits_t *adi, uint *pval)
return NULL;
}
static int
static int
is_leap_year (int year)
{
{
return (year % 4) == 0 && ((year % 100) != 0 || (year % 400) == 0);
}
}
static int
static int
first_day (int year)
{
{
int ret = 4;
while (--year >= 1970)
ret = (ret + 365 + is_leap_year (year)) % 7;
return ret;
}
return ret;
}
/* This simplifies the calls to conv_num enormously. */
#define ALT_DIGITS ((alt_format & ALT_O) ? *alt_digits : NULL)

View File

@@ -347,10 +347,10 @@ CreatePipeOverlapped (PHANDLE hr, PHANDLE hw, LPSECURITY_ATTRIBUTES sa)
BOOL WINAPI
ReadPipeOverlapped (HANDLE h, PVOID buf, DWORD len, LPDWORD ret_len,
DWORD timeout)
{
{
OVERLAPPED ov;
BOOL ret;
BOOL ret;
memset (&ov, 0, sizeof ov);
ov.hEvent = CreateEvent (NULL, TRUE, FALSE, NULL);
ret = ReadFile (h, buf, len, NULL, &ov);
@@ -359,17 +359,17 @@ ReadPipeOverlapped (HANDLE h, PVOID buf, DWORD len, LPDWORD ret_len,
if (!ret && WaitForSingleObject (ov.hEvent, timeout) != WAIT_OBJECT_0)
CancelIo (h);
ret = GetOverlappedResult (h, &ov, ret_len, FALSE);
}
}
CloseHandle (ov.hEvent);
return ret;
}
return ret;
}
BOOL WINAPI
WritePipeOverlapped (HANDLE h, PCVOID buf, DWORD len, LPDWORD ret_len,
DWORD timeout)
{
OVERLAPPED ov;
BOOL ret;
OVERLAPPED ov;
BOOL ret;
memset (&ov, 0, sizeof ov);
ov.hEvent = CreateEvent (NULL, TRUE, FALSE, NULL);
@@ -379,7 +379,7 @@ WritePipeOverlapped (HANDLE h, PCVOID buf, DWORD len, LPDWORD ret_len,
if (!ret && WaitForSingleObject (ov.hEvent, timeout) != WAIT_OBJECT_0)
CancelIo (h);
ret = GetOverlappedResult (h, &ov, ret_len, FALSE);
}
}
CloseHandle (ov.hEvent);
return ret;
}

View File

@@ -511,7 +511,7 @@ fdsock (cygheap_fdmanip& fd, const device *dev, SOCKET soc)
we only do this on affected systems. If we recognize a non-inheritable
socket we switch to inheritance/dup via WSADuplicateSocket/WSASocket for
that socket.
Starting with Vista there's another neat way to workaround these annoying
LSP sockets. WSAIoctl allows to fetch the underlying base socket, which
is a normal, inheritable IFS handle. So we fetch the base socket,

View File

@@ -1406,7 +1406,7 @@ __set_charset_from_locale (const char *locale, char *charset)
which is part of the gettext package, and if it finds the locale alias
in that file, it replaces the locale with the correct locale string from
that file.
If successful, it returns a pointer to new_locale, NULL otherwise.*/
extern "C" char *
__set_locale_from_locale_alias (const char *locale, char *new_locale)

View File

@@ -26,7 +26,7 @@
#ifdef STATUS_INVALID_HANDLE /* Defined as unsigned value in winbase.h */
#undef STATUS_INVALID_HANDLE
#endif
#define STATUS_INVALID_HANDLE ((NTSTATUS) 0xc0000008)
#define STATUS_INVALID_HANDLE ((NTSTATUS) 0xc0000008)
#define STATUS_INVALID_PARAMETER ((NTSTATUS) 0xc000000d)
#define STATUS_NO_SUCH_FILE ((NTSTATUS) 0xc000000f)
#define STATUS_INVALID_DEVICE_REQUEST ((NTSTATUS) 0xc0000010)

View File

@@ -3489,7 +3489,7 @@ copy_cwd_str (PUNICODE_STRING tgt, PUNICODE_STRING src)
an afterthought now. The actual CWD storage is a FAST_CWD structure
which is allocated on the process heap. The new method only requires
minimal locking and it's much more multi-thread friendly. Presumably
it minimizes contention when accessing the CWD.
it minimizes contention when accessing the CWD.
The class fcwd_access_t is supposed to encapsulate the gory implementation
details depending on OS version from the calling functions. */
class fcwd_access_t {
@@ -3640,13 +3640,13 @@ public:
{
case FCWD_OLD:
default:
f_cwd = (fcwd_access_t *)
f_cwd = (fcwd_access_t *)
((PBYTE) buf_p - __builtin_offsetof (FAST_CWD_OLD, Buffer));
case FCWD_W7:
f_cwd = (fcwd_access_t *)
f_cwd = (fcwd_access_t *)
((PBYTE) buf_p - __builtin_offsetof (FAST_CWD_7, Buffer));
case FCWD_W8:
f_cwd = (fcwd_access_t *)
f_cwd = (fcwd_access_t *)
((PBYTE) buf_p - __builtin_offsetof (FAST_CWD_8, Buffer));
}
f_cwd->DirectoryHandle () = dir;
@@ -3654,7 +3654,7 @@ public:
static void SetVersionFromPointer (PBYTE buf_p, bool is_buffer)
{
/* Given a pointer to the FAST_CWD structure (is_buffer == false) or a
pointer to the Buffer within (is_buffer == true), this function
pointer to the Buffer within (is_buffer == true), this function
computes the FAST_CWD version by checking that Path.MaximumLength
equals MAX_PATH, and that Path.Buffer == Buffer. */
if (is_buffer)
@@ -3769,7 +3769,7 @@ find_fast_cwd ()
/* If we couldn't fetch fast_cwd_ptr, or if fast_cwd_ptr is NULL(*)
we have to figure out the version from the Buffer pointer in the
ProcessParameters.
(*) This is very unlikely to happen when starting the first
Cygwin process, since it only happens when starting the
process in a directory which can't be used as CWD by Win32, or

View File

@@ -386,7 +386,7 @@ pinfo::set_acl()
pinfo::pinfo (HANDLE parent, pinfo_minimal& from, pid_t pid):
pinfo_minimal (), destroy (false), procinfo (NULL), waiter_ready (false),
wait_thread (NULL)
wait_thread (NULL)
{
HANDLE herr;
const char *duperr = NULL;

View File

@@ -159,7 +159,7 @@ public:
waiter_ready (false), wait_thread (NULL) {}
pinfo (pid_t n, DWORD flag = 0): pinfo_minimal (), destroy (false),
procinfo (NULL), waiter_ready (false),
wait_thread (NULL)
wait_thread (NULL)
{
init (n, flag, NULL);
}

View File

@@ -404,7 +404,7 @@ pipe_worker (int filedes[2], unsigned int psize, int mode)
fdout = fhs[1];
filedes[0] = fdin;
filedes[1] = fdout;
}
}
return res;
}

View File

@@ -336,7 +336,7 @@ security_descriptor::free ()
/* Index must match the corresponding foo_PRIVILEGE value, see security.h. */
static const struct {
const wchar_t *name;
bool high_integrity; /* UAC: High Mandatory Label required to
bool high_integrity; /* UAC: High Mandatory Label required to
be allowed to enable this privilege in
the user token. */
} cygpriv[] =

View File

@@ -102,7 +102,7 @@ clock_nanosleep (clockid_t clk_id, int flags, const struct timespec *rqtp,
clock_gettime (clk_id, &tp);
/* Check for immediate timeout */
if (tp.tv_sec > rqtp->tv_sec
|| (tp.tv_sec == rqtp->tv_sec && tp.tv_nsec > rqtp->tv_nsec))
|| (tp.tv_sec == rqtp->tv_sec && tp.tv_nsec > rqtp->tv_nsec))
return 0;
if (clk_id == CLOCK_REALTIME)

View File

@@ -140,7 +140,7 @@ dup2 (int oldfd, int newfd)
res = (cfd >= 0) ? oldfd : -1;
}
else
res = cygheap->fdtab.dup3 (oldfd, newfd, 0);
res = cygheap->fdtab.dup3 (oldfd, newfd, 0);
syscall_printf ("%R = dup2(%d, %d)", res, oldfd, newfd);
return res;
@@ -645,7 +645,7 @@ unlink_nt (path_conv &pc)
bin so that it actually disappears from its directory even though its
in use. Otherwise, if opening doesn't fail, the file is not in use and
we can go straight to setting the delete disposition flag.
NOTE: The missing sharing modes FILE_SHARE_READ and FILE_SHARE_WRITE do
NOT result in a STATUS_SHARING_VIOLATION, if another handle is
opened for reading/writing metadata only. In other words, if
@@ -760,7 +760,7 @@ try_again:
if (NT_SUCCESS (status2) && reopened < 20)
{
/* Workaround rm -r problem:
Sometimes a deleted directory lingers in its parent dir
after the deleting handle has already been closed. This
can break deleting the parent dir. See the comment in
@@ -770,7 +770,7 @@ try_again:
STATUS_SUCCESS, the dir is either empty, or only inhabited
by already deleted entries. If so, we try to move the dir
into the bin. This usually works.
However, if we're on a filesystem which doesn't support
the try_to_bin method, or if moving to the bin doesn't work
for some reason, just try to delete the directory again,

View File

@@ -82,15 +82,15 @@ wow64_test_for_64bit_parent ()
no simpler way to retrieve the parent process in NT, as far as I know.
Hints welcome. */
ret = NtQueryInformationProcess (NtCurrentProcess (),
ProcessBasicInformation,
&pbi, sizeof pbi, NULL);
ProcessBasicInformation,
&pbi, sizeof pbi, NULL);
if (NT_SUCCESS (ret)
&& (parent = OpenProcess (PROCESS_QUERY_INFORMATION,
FALSE,
pbi.InheritedFromUniqueProcessId)))
FALSE,
pbi.InheritedFromUniqueProcessId)))
{
NtQueryInformationProcess (parent, ProcessWow64Information,
&wow64, sizeof wow64, NULL);
&wow64, sizeof wow64, NULL);
CloseHandle (parent);
}
return !wow64;