Cygwin: fix formatting: collapse whitespace-only lines
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
parent
d2ef2331f9
commit
3bb346d593
|
@ -626,7 +626,7 @@ init_cygheap::add_tls (_cygtls *t)
|
|||
still utilizes the thread's _cygtls area, things go awry.
|
||||
|
||||
The following methods take this into account:
|
||||
|
||||
|
||||
- The thread mutex is generally only locked under tls_sentry locking.
|
||||
- remove_tls, called from _cygtls::remove, locks the mutex before
|
||||
removing the threadlist entry and _cygtls::remove then unlocks and
|
||||
|
|
|
@ -1220,7 +1220,7 @@ do_exit (int status)
|
|||
a reproducible value which could also be easily evaluated in cygwin_atexit.
|
||||
However, when building C++ applications with -fuse-cxa-atexit, G++ creates
|
||||
calls to __cxa_atexit using the *address* of __dso_handle as DSO handle.
|
||||
|
||||
|
||||
So what we do here is this: A call to __cxa_atexit from the application
|
||||
actually calls cygwin__cxa_atexit. From dso_handle (which is either
|
||||
&__dso_handle, or __dso_handle == ImageBase or NULL) we fetch the dll
|
||||
|
@ -1265,7 +1265,7 @@ cygwin_atexit (void (*fn) (void))
|
|||
Workaround: If dlls.find fails, try to find the dll entry of the DLL
|
||||
containing fn. If that works, proceed by calling __cxa_atexit, otherwise
|
||||
call atexit.
|
||||
|
||||
|
||||
This *should* be sufficiently safe. Ultimately, new applications will
|
||||
use the statically linked atexit function though, as outlined above. */
|
||||
if (!d)
|
||||
|
|
|
@ -1455,7 +1455,7 @@ sigpacket::process ()
|
|||
tls = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* !tls means no threads available to catch a signal. */
|
||||
if (!tls)
|
||||
{
|
||||
|
|
|
@ -656,7 +656,7 @@ cygwin_internal (cygwin_getinfo_types t, ...)
|
|||
"sshd",
|
||||
username_buffer,
|
||||
sizeof username_buffer);
|
||||
|
||||
|
||||
If this call succeeds, sshd expects the correct Cygwin
|
||||
username of the unprivileged sshd account in username_buffer.
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ fcntl64 (int fd, int cmd, ...)
|
|||
case which is covered here by always reading the arg with
|
||||
sizeof (intptr_t) == sizeof (long) == sizeof (void*) which matches
|
||||
all targets.
|
||||
|
||||
|
||||
However, the POSIX standard defines all numerical args as type int.
|
||||
If we take that literally, we had a (small) problem on 64 bit, since
|
||||
sizeof (void*) != sizeof (int). If we would like to follow POSIX more
|
||||
|
|
|
@ -621,7 +621,7 @@ fhandler_dev_floppy::raw_write (const void *ptr, size_t len)
|
|||
}
|
||||
return bytes_written;
|
||||
}
|
||||
|
||||
|
||||
/* In O_DIRECT case, just write. */
|
||||
if (write_file (p, len, &bytes_written, &ret))
|
||||
return bytes_written;
|
||||
|
|
|
@ -246,7 +246,7 @@ fhandler_netdrive::readdir (DIR *dir, dirent *de)
|
|||
if (strlen (get_name ()) == 2)
|
||||
{
|
||||
UNICODE_STRING ss, ds;
|
||||
|
||||
|
||||
tp.u_get (&ds);
|
||||
RtlInitUnicodeString (&ss, bs);
|
||||
RtlDowncaseUnicodeString (&ds, &ss, FALSE);
|
||||
|
|
|
@ -341,7 +341,7 @@ fhandler_socket_wsock::evaluate_events (const long event_mask, long &events,
|
|||
socket. We're trying to workaround this problem here by
|
||||
taking the connect errorcode from the event and write it back
|
||||
into the SO_ERROR socket option.
|
||||
|
||||
|
||||
CV 2014-06-16: Call WSASetLastError *after* setsockopt since,
|
||||
apparently, setsockopt sets the last WSA error code to 0 on
|
||||
success. */
|
||||
|
|
|
@ -19,7 +19,7 @@ details. */
|
|||
processes interact. If you have the requirement to interact with native
|
||||
Windows applications which use Windows mandatory file locking, your have
|
||||
to use mandatory locking as well. The command
|
||||
|
||||
|
||||
fcntl (fd, F_LCK_MANDATORY, 1)
|
||||
|
||||
switches subsequent F_GETLK, F_SETLK, F_SETLKW calls to mandatory locking
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* cygwin/process.h. Define spawn family of functions as provided by Cygwin.
|
||||
The original file of this name is a MS/DOS invention.
|
||||
|
||||
|
||||
This file is part of Cygwin.
|
||||
|
||||
This software is a copyrighted work licensed under the terms of the
|
||||
|
|
|
@ -114,7 +114,7 @@ static const char Pad64 = '=';
|
|||
Since all base64 input is an integral number of octets, only the
|
||||
-------------------------------------------------
|
||||
following cases can arise:
|
||||
|
||||
|
||||
(1) the final quantum of encoding input is an integral
|
||||
multiple of 24 bits; here, the final unit of encoded
|
||||
output will be an integral multiple of 4 characters
|
||||
|
@ -158,14 +158,14 @@ b64_ntop(unsigned char const *src, size_t srclength, char *target,
|
|||
target[datalength++] = Base64[output[2]];
|
||||
target[datalength++] = Base64[output[3]];
|
||||
}
|
||||
|
||||
|
||||
/* Now we worry about padding. */
|
||||
if (0 != srclength) {
|
||||
/* Get what's left. */
|
||||
input[0] = input[1] = input[2] = '\0';
|
||||
for (i = 0; i < srclength; i++)
|
||||
input[i] = *src++;
|
||||
|
||||
|
||||
output[0] = input[0] >> 2;
|
||||
output[1] = ((input[0] & 0x03) << 4) + (input[1] >> 4);
|
||||
output[2] = ((input[1] & 0x0f) << 2) + (input[2] >> 6);
|
||||
|
|
|
@ -62,7 +62,7 @@
|
|||
pow (+/-inf, y) is +/-inf with no exception for finite y > 0 an odd integer
|
||||
pow (+/-inf, y) is +inf with no exception for finite y > 0 and not an odd integer
|
||||
pow (x, y) signals the invalid operation exception for finite x < 0 and finite non-integer y.
|
||||
|
||||
|
||||
For x /= 0: lim y->oo (1/x)^y results as: for |x| < 1 that sgn(x)*0 and for |x| > 0 that sgn(x)*Infinity
|
||||
|
||||
*/
|
||||
|
|
|
@ -57,7 +57,7 @@
|
|||
powi (+/-inf, y) is +/-inf with no exception for finite y > 0 an odd integer
|
||||
powi (+/-inf, y) is +inf with no exception for finite y > 0 and not an odd integer
|
||||
powi (x, y) signals the invalid operation exception for finite x < 0 and finite non-integer y.
|
||||
|
||||
|
||||
For x /= 0: lim y->oo (1/x)^y results as: for |x| < 1 that sgn(x)*0 and for |x| > 0 that sgn(x)*Infinity
|
||||
|
||||
*/
|
||||
|
|
|
@ -70,6 +70,6 @@ __MINGW_USYMBOL(remquol):
|
|||
jz 1f
|
||||
negl %eax
|
||||
1: movl %eax, (%ecx)
|
||||
|
||||
|
||||
ret
|
||||
#endif
|
||||
|
|
|
@ -79,7 +79,7 @@ extern "C" void yield ();
|
|||
|
||||
#define import_address(x) __import_address ((void *)(x))
|
||||
void * __reg1 __import_address (void *);
|
||||
|
||||
|
||||
#define caller_return_address() \
|
||||
__caller_return_address (__builtin_return_address (0))
|
||||
void * __reg1 __caller_return_address (void *);
|
||||
|
|
|
@ -2857,7 +2857,7 @@ ga_dup (struct addrinfoW *ai, bool v4mapped, int idn_flags, int &err)
|
|||
}
|
||||
wcstombs (nai->ai_canonname, canonname, len + 1);
|
||||
}
|
||||
|
||||
|
||||
nai->ai_addrlen = v4mapped ? sizeof (struct sockaddr_in6) : ai->ai_addrlen;
|
||||
if ((nai->ai_addr = (struct sockaddr *) malloc (v4mapped
|
||||
? sizeof (struct sockaddr_in6)
|
||||
|
|
|
@ -26,10 +26,10 @@ details. */
|
|||
with STATUS_INVALID_PARAMETER if the handle points to a file
|
||||
on a remote share, at least on Windows 7 and later.
|
||||
In theory the buffer should have a size of
|
||||
|
||||
|
||||
sizeof (FILE_FULL_EA_INFORMATION) + MAX_EA_NAME_LEN
|
||||
+ MAX_EA_VALUE_LEN
|
||||
|
||||
|
||||
(65804 bytes), but we're opting for simplicity here, and
|
||||
a 64K buffer has the advantage that we can use a tmp_pathbuf
|
||||
buffer, rather than having to alloca 64K from stack. */
|
||||
|
|
|
@ -2627,7 +2627,7 @@ suffix_scan::has (const char *in_path, const suffix_info *in_suffixes)
|
|||
/* Avoid attaching suffixes if the resulting filename would be invalid.
|
||||
For performance reasons we don't check the length of a suffix, since
|
||||
we know that all suffixes are 4 chars in length.
|
||||
|
||||
|
||||
FIXME: This is not really correct. A fully functional test should
|
||||
work on wide character paths. This would probably also speed
|
||||
up symlink_info::check. */
|
||||
|
|
|
@ -108,7 +108,7 @@ quotactl (int cmd, const char *special, int id, caddr_t addr)
|
|||
pc.get_object_attr (attr, sec_none_nih);
|
||||
/* For the following functions to work, we must attach the virtual path to
|
||||
the quota file to the device path.
|
||||
|
||||
|
||||
FIXME: Note that this is NTFS-specific. Adding ReFS in another step. */
|
||||
tp.u_get (&path);
|
||||
RtlCopyUnicodeString (&path, attr.ObjectName);
|
||||
|
|
|
@ -36,7 +36,7 @@ bool check_token_membership (PSID);
|
|||
SIDs of the form S-1-22-x-y, with x == 1 for users and x == 2 for groups,
|
||||
and y == UNIX uid/gid. NFS returns no SIDs at all, but the plain UNIX
|
||||
uid/gid values.
|
||||
|
||||
|
||||
UNIX uid/gid values are mapped to Cygwin uid/gid values 0xff000000 +
|
||||
unix uid/gid. This *might* collide with a posix_offset of some trusted
|
||||
domain, but it's *very* unlikely. Define the mapping as macro. */
|
||||
|
|
|
@ -289,7 +289,7 @@ select_record::dump_select_record ()
|
|||
read_ready, write_ready, except_ready);
|
||||
select_printf ("read_selected %d, write_selected %d, except_selected %d, except_on_write %d",
|
||||
read_selected, write_selected, except_selected, except_on_write);
|
||||
|
||||
|
||||
select_printf ("startup %p, peek %p, verify %p cleanup %p, next %p",
|
||||
startup, peek, verify, cleanup, next);
|
||||
}
|
||||
|
|
|
@ -77,7 +77,7 @@ details. */
|
|||
/* So-called "Microsoft Account" SIDs (S-1-11-...) have a netbios domain name
|
||||
"MicrosoftAccounts". The new "Application Container SIDs" (S-1-15-...)
|
||||
have a netbios domain name "APPLICATION PACKAGE AUTHORITY"
|
||||
|
||||
|
||||
The problem is, DNLEN is 15, but these domain names have a length of 16
|
||||
resp. 29 chars :-P So we override DNLEN here to be 31, so that calls
|
||||
to LookupAccountSid/Name don't fail if the buffer is based on DNLEN.
|
||||
|
|
Loading…
Reference in New Issue