whitespace cleanup
This commit is contained in:
parent
00caa48b91
commit
46f5dd5958
|
@ -1222,7 +1222,7 @@ fhandler_base_overlapped::close ()
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Cancelling seems to be necessary for cases where a reader is
|
/* Cancelling seems to be necessary for cases where a reader is
|
||||||
still executing when a signal handler performs a close. */
|
still executing when a signal handler performs a close. */
|
||||||
if (!writer)
|
if (!writer)
|
||||||
CancelIo (get_io_handle ());
|
CancelIo (get_io_handle ());
|
||||||
destroy_overlapped ();
|
destroy_overlapped ();
|
||||||
|
|
|
@ -591,7 +591,7 @@ fhandler_console::read (void *pv, size_t& buflen)
|
||||||
|
|
||||||
if (dev_state.ext_mouse_mode6 /* distinguish release */
|
if (dev_state.ext_mouse_mode6 /* distinguish release */
|
||||||
&& mouse_event.dwButtonState < dev_state.dwLastButtonState)
|
&& mouse_event.dwButtonState < dev_state.dwLastButtonState)
|
||||||
mode6_term = 'm';
|
mode6_term = 'm';
|
||||||
|
|
||||||
dev_state.last_button_code = b;
|
dev_state.last_button_code = b;
|
||||||
|
|
||||||
|
@ -692,9 +692,9 @@ fhandler_console::read (void *pv, size_t& buflen)
|
||||||
if (dev_state.use_focus)
|
if (dev_state.use_focus)
|
||||||
{
|
{
|
||||||
if (input_rec.Event.FocusEvent.bSetFocus)
|
if (input_rec.Event.FocusEvent.bSetFocus)
|
||||||
__small_sprintf (tmp, "\033[I");
|
__small_sprintf (tmp, "\033[I");
|
||||||
else
|
else
|
||||||
__small_sprintf (tmp, "\033[O");
|
__small_sprintf (tmp, "\033[O");
|
||||||
|
|
||||||
toadd = tmp;
|
toadd = tmp;
|
||||||
nread = 3;
|
nread = 3;
|
||||||
|
|
|
@ -250,7 +250,7 @@ class lockf_t
|
||||||
uint16_t lf_type; /* Lock type: F_RDLCK, F_WRLCK */
|
uint16_t lf_type; /* Lock type: F_RDLCK, F_WRLCK */
|
||||||
_off64_t lf_start; /* Byte # of the start of the lock */
|
_off64_t lf_start; /* Byte # of the start of the lock */
|
||||||
_off64_t lf_end; /* Byte # of the end of the lock (-1=EOF) */
|
_off64_t lf_end; /* Byte # of the end of the lock (-1=EOF) */
|
||||||
int64_t lf_id; /* Cygwin PID for POSIX locks, a unique id per
|
int64_t lf_id; /* Cygwin PID for POSIX locks, a unique id per
|
||||||
file table entry for BSD flock locks. */
|
file table entry for BSD flock locks. */
|
||||||
DWORD lf_wid; /* Win PID of the resource holding the lock */
|
DWORD lf_wid; /* Win PID of the resource holding the lock */
|
||||||
uint16_t lf_ver; /* Version number of the lock. If a released
|
uint16_t lf_ver; /* Version number of the lock. If a released
|
||||||
|
|
|
@ -329,7 +329,7 @@ hook_or_detect_cygwin (const char *name, const void *fn, WORD& subsys, HANDLE h)
|
||||||
return NULL;
|
return NULL;
|
||||||
pdfirst = rva (PIMAGE_IMPORT_DESCRIPTOR, map, importRVA - offset);
|
pdfirst = rva (PIMAGE_IMPORT_DESCRIPTOR, map, importRVA - offset);
|
||||||
/* ... carefully check the required size to fit the string table into
|
/* ... carefully check the required size to fit the string table into
|
||||||
the map as well. Allow NAME_MAX bytes for the DLL name, but don't
|
the map as well. Allow NAME_MAX bytes for the DLL name, but don't
|
||||||
go beyond the remainder of the section. */
|
go beyond the remainder of the section. */
|
||||||
if (importRVAMaxSize - importRVASize > wincap.allocation_granularity ())
|
if (importRVAMaxSize - importRVASize > wincap.allocation_granularity ())
|
||||||
{
|
{
|
||||||
|
|
|
@ -516,33 +516,33 @@ thread_wrapper (VOID *arg)
|
||||||
}
|
}
|
||||||
|
|
||||||
__asm__ ("\n\
|
__asm__ ("\n\
|
||||||
movl %[WRAPPER_ARG], %%ebx # Load &wrapper_arg into ebx \n\
|
movl %[WRAPPER_ARG], %%ebx # Load &wrapper_arg into ebx \n\
|
||||||
movl (%%ebx), %%eax # Load thread func into eax \n\
|
movl (%%ebx), %%eax # Load thread func into eax \n\
|
||||||
movl 4(%%ebx), %%ecx # Load thread arg into ecx \n\
|
movl 4(%%ebx), %%ecx # Load thread arg into ecx \n\
|
||||||
movl 8(%%ebx), %%edx # Load stackaddr into edx \n\
|
movl 8(%%ebx), %%edx # Load stackaddr into edx \n\
|
||||||
movl 12(%%ebx), %%ebx # Load stackbase into ebx \n\
|
movl 12(%%ebx), %%ebx # Load stackbase into ebx \n\
|
||||||
subl %[CYGTLS], %%ebx # Subtract CYGTLS_PADSIZE \n\
|
subl %[CYGTLS], %%ebx # Subtract CYGTLS_PADSIZE \n\
|
||||||
subl $4, %%ebx # Subtract another 4 bytes \n\
|
subl $4, %%ebx # Subtract another 4 bytes \n\
|
||||||
movl %%ebx, %%esp # Set esp \n\
|
movl %%ebx, %%esp # Set esp \n\
|
||||||
xorl %%ebp, %%ebp # Set ebp to 0 \n\
|
xorl %%ebp, %%ebp # Set ebp to 0 \n\
|
||||||
# Make gcc 3.x happy and align the stack so that it is \n\
|
# Make gcc 3.x happy and align the stack so that it is \n\
|
||||||
# 16 byte aligned right before the final call opcode. \n\
|
# 16 byte aligned right before the final call opcode. \n\
|
||||||
andl $-16, %%esp # 16 byte align \n\
|
andl $-16, %%esp # 16 byte align \n\
|
||||||
addl $-12, %%esp # 12 bytes + 4 byte arg = 16 \n\
|
addl $-12, %%esp # 12 bytes + 4 byte arg = 16 \n\
|
||||||
# Now we moved to the new stack. Save thread func address\n\
|
# Now we moved to the new stack. Save thread func address \n\
|
||||||
# and thread arg on new stack \n\
|
# and thread arg on new stack \n\
|
||||||
pushl %%ecx # Push thread arg onto stack \n\
|
pushl %%ecx # Push thread arg onto stack \n\
|
||||||
pushl %%eax # Push thread func onto stack \n\
|
pushl %%eax # Push thread func onto stack \n\
|
||||||
# Now it's safe to release the OS stack. \n\
|
# Now it's safe to release the OS stack. \n\
|
||||||
pushl $0x8000 # dwFreeType: MEM_RELEASE \n\
|
pushl $0x8000 # dwFreeType: MEM_RELEASE \n\
|
||||||
pushl $0x0 # dwSize: 0 \n\
|
pushl $0x0 # dwSize: 0 \n\
|
||||||
pushl %%edx # lpAddress: stackaddr \n\
|
pushl %%edx # lpAddress: stackaddr \n\
|
||||||
call _VirtualFree@12 # Shoot \n\
|
call _VirtualFree@12 # Shoot \n\
|
||||||
# All set. We can pop the thread function address from \n\
|
# All set. We can pop the thread function address from \n\
|
||||||
# the stack and call it. The thread arg is still on the \n\
|
# the stack and call it. The thread arg is still on the \n\
|
||||||
# stack in the expected spot. \n\
|
# stack in the expected spot. \n\
|
||||||
popl %%eax # Pop thread_func address \n\
|
popl %%eax # Pop thread_func address \n\
|
||||||
call *%%eax # Call thread func \n"
|
call *%%eax # Call thread func \n"
|
||||||
: : [WRAPPER_ARG] "r" (&wrapper_arg),
|
: : [WRAPPER_ARG] "r" (&wrapper_arg),
|
||||||
[CYGTLS] "i" (CYGTLS_PADSIZE));
|
[CYGTLS] "i" (CYGTLS_PADSIZE));
|
||||||
/* Never return from here. */
|
/* Never return from here. */
|
||||||
|
|
|
@ -97,11 +97,11 @@ win32_device_name (const char *src_path, char *win32_path, device& dev)
|
||||||
#define SAMBA_EXTENDED_INFO_VERSION_STRING_LENGTH 28
|
#define SAMBA_EXTENDED_INFO_VERSION_STRING_LENGTH 28
|
||||||
#pragma pack(push,4)
|
#pragma pack(push,4)
|
||||||
struct smb_extended_info {
|
struct smb_extended_info {
|
||||||
DWORD samba_magic; /* Always SAMBA_EXTENDED_INFO_MAGIC */
|
DWORD samba_magic; /* Always SAMBA_EXTENDED_INFO_MAGIC */
|
||||||
DWORD samba_version; /* Major/Minor/Release/Revision */
|
DWORD samba_version; /* Major/Minor/Release/Revision */
|
||||||
DWORD samba_subversion; /* Prerelease/RC/Vendor patch */
|
DWORD samba_subversion; /* Prerelease/RC/Vendor patch */
|
||||||
LARGE_INTEGER samba_gitcommitdate;
|
LARGE_INTEGER samba_gitcommitdate;
|
||||||
char samba_version_string[SAMBA_EXTENDED_INFO_VERSION_STRING_LENGTH];
|
char samba_version_string[SAMBA_EXTENDED_INFO_VERSION_STRING_LENGTH];
|
||||||
};
|
};
|
||||||
#pragma pack(pop)
|
#pragma pack(pop)
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ details. */
|
||||||
#define USE_SYS_TYPES_FD_SET
|
#define USE_SYS_TYPES_FD_SET
|
||||||
#define __WSA_ERR_MACROS_DEFINED
|
#define __WSA_ERR_MACROS_DEFINED
|
||||||
/* FIXME: Collision with different declarations of if_nametoindex and
|
/* FIXME: Collision with different declarations of if_nametoindex and
|
||||||
if_indextoname functions in iphlpapi.h since Vista.
|
if_indextoname functions in iphlpapi.h since Vista.
|
||||||
TODO: Convert if_nametoindex to cygwin_if_nametoindex and call
|
TODO: Convert if_nametoindex to cygwin_if_nametoindex and call
|
||||||
system functions on Vista and later. */
|
system functions on Vista and later. */
|
||||||
#define _INC_NETIOAPI
|
#define _INC_NETIOAPI
|
||||||
|
|
|
@ -892,7 +892,7 @@ is_virtual_symlink:
|
||||||
else if (isdev_dev (dev))
|
else if (isdev_dev (dev))
|
||||||
{
|
{
|
||||||
/* If we're looking for a file below /dev, which doesn't exist,
|
/* If we're looking for a file below /dev, which doesn't exist,
|
||||||
make sure that the device type is converted to FH_FS, so that
|
make sure that the device type is converted to FH_FS, so that
|
||||||
subsequent code handles the file correctly.
|
subsequent code handles the file correctly.
|
||||||
Unless /dev itself doesn't exist on disk. In that case /dev
|
Unless /dev itself doesn't exist on disk. In that case /dev
|
||||||
is handled as virtual filesystem, and virtual filesystems are
|
is handled as virtual filesystem, and virtual filesystems are
|
||||||
|
@ -3704,7 +3704,7 @@ find_fast_cwd_pointer ()
|
||||||
if (movedi[0] == 0x8b && movedi[1] == 0xff) /* mov edi,edi -> W8 */
|
if (movedi[0] == 0x8b && movedi[1] == 0xff) /* mov edi,edi -> W8 */
|
||||||
{
|
{
|
||||||
/* Windows 8 CP 32 bit (after a Windows Update?) does not call
|
/* Windows 8 CP 32 bit (after a Windows Update?) does not call
|
||||||
RtlEnterCriticalSection. For some reason the function manipulates
|
RtlEnterCriticalSection. For some reason the function manipulates
|
||||||
the FastPebLock manually, kind of like RtlEnterCriticalSection has
|
the FastPebLock manually, kind of like RtlEnterCriticalSection has
|
||||||
been converted to an inline function.
|
been converted to an inline function.
|
||||||
|
|
||||||
|
|
|
@ -188,7 +188,7 @@ do_pseudo_reloc (void * start, void * end, void * base)
|
||||||
* 1) With a (v2-style) version header. In this case, the
|
* 1) With a (v2-style) version header. In this case, the
|
||||||
* first entry in the list is a 3-DWORD structure, with
|
* first entry in the list is a 3-DWORD structure, with
|
||||||
* value:
|
* value:
|
||||||
* { 0, 0, RP_VERSION_V1 }
|
* { 0, 0, RP_VERSION_V1 }
|
||||||
* In this case, we skip to the next entry in the list,
|
* In this case, we skip to the next entry in the list,
|
||||||
* knowing that all elements after the head item can
|
* knowing that all elements after the head item can
|
||||||
* be cast to runtime_pseudo_reloc_item_v1.
|
* be cast to runtime_pseudo_reloc_item_v1.
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/* smallprint.cc: small print routines for WIN32
|
/* smallprint.cc: small print routines for WIN32
|
||||||
|
|
||||||
Copyright 1996, 1998, 2000, 2001, 2002, 2003, 2005, 2006,
|
Copyright 1996, 1998, 2000, 2001, 2002, 2003, 2005, 2006,
|
||||||
2007, 2008, 2009, 2012
|
2007, 2008, 2009, 2012
|
||||||
Red Hat, Inc.
|
Red Hat, Inc.
|
||||||
|
|
||||||
This file is part of Cygwin.
|
This file is part of Cygwin.
|
||||||
|
@ -151,11 +151,11 @@ __small_vsprintf (char *dst, const char *fmt, va_list ap)
|
||||||
if (isprint (c) || pad != '0')
|
if (isprint (c) || pad != '0')
|
||||||
*dst++ = c;
|
*dst++ = c;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
*dst++ = '0';
|
*dst++ = '0';
|
||||||
*dst++ = 'x';
|
*dst++ = 'x';
|
||||||
dst = __rn (dst, 16, 0, c, len, pad, LMASK);
|
dst = __rn (dst, 16, 0, c, len, pad, LMASK);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'C':
|
case 'C':
|
||||||
|
|
|
@ -746,7 +746,7 @@ loop:
|
||||||
/* Reset handle inheritance to default when the execution of a non-Cygwin
|
/* Reset handle inheritance to default when the execution of a non-Cygwin
|
||||||
process fails. Only need to do this for _P_OVERLAY since the handle will
|
process fails. Only need to do this for _P_OVERLAY since the handle will
|
||||||
be closed otherwise. Don't need to do this for 'parent' since it will
|
be closed otherwise. Don't need to do this for 'parent' since it will
|
||||||
be closed in every case. See FIXME above. */
|
be closed in every case. See FIXME above. */
|
||||||
if (!iscygwin () && mode == _P_OVERLAY)
|
if (!iscygwin () && mode == _P_OVERLAY)
|
||||||
SetHandleInformation (wr_proc_pipe, HANDLE_FLAG_INHERIT, HANDLE_FLAG_INHERIT);
|
SetHandleInformation (wr_proc_pipe, HANDLE_FLAG_INHERIT, HANDLE_FLAG_INHERIT);
|
||||||
if (wr_proc_pipe == my_wr_proc_pipe)
|
if (wr_proc_pipe == my_wr_proc_pipe)
|
||||||
|
|
|
@ -732,7 +732,7 @@ unlink_nt (path_conv &pc)
|
||||||
pc.get_nt_native_path ());
|
pc.get_nt_native_path ());
|
||||||
/* We never call try_to_bin on NFS and NetApp for the follwing reasons:
|
/* We never call try_to_bin on NFS and NetApp for the follwing reasons:
|
||||||
|
|
||||||
NFS implements its own mechanism to remove in-use files, which looks
|
NFS implements its own mechanism to remove in-use files, which looks
|
||||||
quite similar to what we do in try_to_bin for remote files.
|
quite similar to what we do in try_to_bin for remote files.
|
||||||
|
|
||||||
Netapp filesystems don't understand the "move and delete" method
|
Netapp filesystems don't understand the "move and delete" method
|
||||||
|
|
|
@ -575,13 +575,13 @@ pthread::cancel ()
|
||||||
GetThreadContext (win32_obj_id, &context);
|
GetThreadContext (win32_obj_id, &context);
|
||||||
/* The OS is not foolproof in terms of asynchronous thread cancellation
|
/* The OS is not foolproof in terms of asynchronous thread cancellation
|
||||||
and tends to hang infinitely if we change the instruction pointer.
|
and tends to hang infinitely if we change the instruction pointer.
|
||||||
So just don't cancel asynchronously if the thread is currently
|
So just don't cancel asynchronously if the thread is currently
|
||||||
executing Windows code. Rely on deferred cancellation in this case. */
|
executing Windows code. Rely on deferred cancellation in this case. */
|
||||||
if (!cygtls->inside_kernel (&context))
|
if (!cygtls->inside_kernel (&context))
|
||||||
{
|
{
|
||||||
context.Eip = (DWORD) pthread::static_cancel_self;
|
context.Eip = (DWORD) pthread::static_cancel_self;
|
||||||
SetThreadContext (win32_obj_id, &context);
|
SetThreadContext (win32_obj_id, &context);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mutex.unlock ();
|
mutex.unlock ();
|
||||||
/* See above. For instance, a thread which waits for a semaphore in sem_wait
|
/* See above. For instance, a thread which waits for a semaphore in sem_wait
|
||||||
|
|
Loading…
Reference in New Issue