summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Cygwin: small_s[w]printf: add '_' modifier to print lower case hex digitsCorinna Vinschen2018-03-021-46/+74
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: drop CYGWIN_SOCKET_UUID, define CYGWIN_SOCKET_GUID as GUID pointerCorinna Vinschen2018-03-023-6/+12
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: ntdll.h: add definitions required for pipe-based AF_UNIXCorinna Vinschen2018-03-021-1/+47
| | | | | | Also remove redundant declaration of RtlInitEmptyUnicodeString Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Add global stdio streams support for reent small.Our Air Quality2018-03-013-11/+56
|
* Cygwin: convert sun_name_t into classCorinna Vinschen2018-03-012-13/+22
| | | | | | | Add constructors and new/delete operators to make sure sun_name_t objects are allocated on the cygheap. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: add AF_UNIX reparse points to path handlingCorinna Vinschen2018-03-013-8/+23
| | | | | | | | | | * check_reparse_point_target returns a path flag mask, rather than just 1. Return PATH_SYMLINK | PATH_REP for symlinks and directory mount points, PATH_SOCKET | PATH_REP for AF_UNIX sockets. * Define Cygwin AF_UNIX socket reparse tag and GUID in ntdll.h. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: move transaction helpers into ntdll.hCorinna Vinschen2018-03-012-36/+35
| | | | | | We'll need them elsewhere in future. Signed-off-by: Corinna Vinschen <corinna@vinschen.de
* Cygwin: ntdll.h: drop macros available in mingw-w64 headersCorinna Vinschen2018-03-011-8/+2
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: path.cc: clean up includesCorinna Vinschen2018-03-011-12/+4
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: path_conv: rename is_rep_symlink to is_known_reparse_pointCorinna Vinschen2018-03-015-13/+14
| | | | | | | ...in preparation of reusing this flag for other types of reparse points, not only symlinks. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: improve storage and handling of AF_UNIX socket pathCorinna Vinschen2018-02-282-29/+77
| | | | | | Define new struct sun_name_t and use throughout internally. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: fhandler_socket_unix: store peer credentials in ucred memberCorinna Vinschen2018-02-284-22/+30
| | | | | | | * Split out cygwin/_ucred.h file * drop local credentials Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: cleanup header including within network-releated filesCorinna Vinschen2018-02-288-116/+43
| | | | | | | | | | | * Rearrange includes and drop unneccessary ones. * Don't pull in cygwin/socket.h into sys/un.h just to get sa_family_t. Include sys/types.h and use __sa_family_t instead. * start including Windows headers using the w32api/ path prefix Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: sockets: Fix fstat on unnamed socketsCorinna Vinschen2018-02-271-1/+1
| | | | | | | Calling fhandler_socket::fstat from fhandler_socket::fstat recursively is not a good idea... Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: reduce size of fhandler_cygdrivenewlib-snapshot-20180226Corinna Vinschen2018-02-262-27/+26
| | | | | | | | | | | fhandler_cygdrive has a size of 696 bytes on x86_64, while the next biggest fhandler type, fhandler_pty_master, is 584 bytes. The members responsible for the size are private to opendir/readdir/closedir usage. fhandler_disk_file stores private readdir data in DIR->__d_internal instead. Use equivalent method with fhandler_cygdrive. This drops the size to 464 bytes. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: sockets: Add missing cleanup if socket/socketpair creation failsCorinna Vinschen2018-02-261-1/+6
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: fhandler_socket_unix: Tiny cleanupCorinna Vinschen2018-02-261-29/+10
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: sockets: move type and proto checks into fhandler_socket classesCorinna Vinschen2018-02-264-25/+47
| | | | | | Encapsulation required Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: fhandler_socket: define socketpair as virtual functionCorinna Vinschen2018-02-265-7/+21
| | | | | | | ...in preparation of moving the type and protocol test into the actual classes. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* doc/faq-using.xml: Add BeyondTrust and Cylance to BLODADavid Macek2018-02-231-0/+2
| | | | | | | | | | Cylance: - https://github.com/git-for-windows/git/issues/1244 - https://cygwin.com/ml/cygwin/2017-04/msg00238.html BeyondTrust: - https://cygwin.com/ml/cygwin/2017-04/msg00092.html - https://cygwin.com/ml/cygwin/2017-05/msg00422.html
* Cygwin: Define SO_PASSCRED and SCM_CREDENTIALSCorinna Vinschen2018-02-232-1/+3
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: Create empty fhandler_socket_unixCorinna Vinschen2018-02-2311-19/+832
| | | | | | | | | * Make distinct from AF_LOCAL for testing purposes. This will have to be reverted as soon as fhandler_socket_unix goes life. * Move saw_reuseaddr flag back to fhandler_socket status Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: fix upcalls in some fhandler_socket_local methodsCorinna Vinschen2018-02-231-8/+7
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: Introduce FH_SOCKET for generic socket file opsCorinna Vinschen2018-02-234-3/+12
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: encapsulate Winsock based fhandler_socket classesCorinna Vinschen2018-02-238-1157/+711
| | | | | | | | | | | | | | | | | | | Insert another class fhandler_socket_wsock between fhandler_socket and fhandler_socket_inet/fhandler_socket_local. Also, add a new method fhandler::is_wsock_socket to allow asking for sockets in general (is_socket) vs. Winsock-based sockets (is_wsock_socket). This allows to develop a new handler_socket_unix class as derived class from fhandler_socket without any trace of wsock code left in fhandler_socket. While this is basically a temporary measure at this time, it may prove useful for later interoperability with the upcoming Windows 10 AF_UNIX implementation at one point. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: eliminate unused fhandler method hcloseCorinna Vinschen2018-02-231-3/+0
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: fix fhandler_socket_local::fchmodCorinna Vinschen2018-02-231-1/+1
| | | | | | | Rather than just returning 0, return the result of calling the base class fchmod. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: socket.h: Add SIOCINQ, equivalent to FIONREADCorinna Vinschen2018-02-231-0/+1
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: drop unused device nodes and clean up socket devicesCorinna Vinschen2018-02-238-49/+25
| | | | | | | | * Rename DEV_TCP_MAJOR to DEV_SOCK_MAJOR * Drop FH_TCP, FH_UDP, FH_ICMP in favor of single FH_INET * Drop FH_UNIX, FH_STREAM, FH_DGRAM in favor of single FH_LOCAL Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: fhandler_socket: Move select functions into derived classesCorinna Vinschen2018-02-222-6/+72
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: fhandler_socket: Rearrange methodsCorinna Vinschen2018-02-222-144/+145
| | | | | | Follow the same pattern in all fhandler_socket classes. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: fhandler_socket: Add derived fcntl methodsCorinna Vinschen2018-02-224-14/+57
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: fhandler_socket: Add derived ioctl methodsCorinna Vinschen2018-02-224-50/+128
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: fhandler_socket: Move shutdown and close methods into derived classesCorinna Vinschen2018-02-224-90/+160
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: make socketpair an AF_LOCAL-only methodCorinna Vinschen2018-02-224-32/+5
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* doc/ntsec.xml: Fix typoDavid Macek2018-02-211-1/+1
|
* Cygwin: inline get_socket_flags()Corinna Vinschen2018-02-214-20/+33
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: fix whitespaces in socket codeCorinna Vinschen2018-02-213-7/+7
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: split out fhandler_socket into inet and local classesCorinna Vinschen2018-02-2110-2213/+3288
| | | | | | | | | | | | | First cut, still incomplete * fhandler_socket is now base class for other socket classes * fhandler_socket_inet handles AF_INET and AF_INET6 sockets * fhandler_socket_local handles AF_LOCAL/AF_UNIX sockets * finally get rid of fdsock by using set_socket_handle in accept4 * align file-related calls (fstat, fstatvfs, fchown, fchmod, facl) to Linux. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: net.cc: drop redundant declarationsCorinna Vinschen2018-02-201-4/+1
| | | | | | Replace cygwin_inet_aton call with cygwin_inet_pton Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: set/getsockopt: Move implementation into fhandler_socket classCorinna Vinschen2018-02-204-334/+348
| | | | | | This requires to export find_winsock_errno from net.cc. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: clean error mappingCorinna Vinschen2018-02-204-23/+18
| | | | | | | | | - Move definition of windows to POSIX error mapping struct into cygerrno.h - Move declaration of winsock errno functions to cygerrno.h - Input to error mapping functions is DWORD Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: Make sure fraction of seconds constants enforce 64 bit computationCorinna Vinschen2018-02-201-4/+4
| | | | | | | Dropping the 'LL' specifier leads to 32 bit truncation during timestamp computation. Revert it. Exempt MSPERSEC which is used for 32 bit values. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: fix declaration of fhandler_socket::socketpairCorinna Vinschen2018-02-161-2/+2
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: fix utils path handling in case cygdrive path is just '/'Corinna Vinschen2018-02-162-12/+22
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: net: Improve standars conformance commentsCorinna Vinschen2018-02-161-30/+35
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: fhandler_socket: Add :: to potentially colliding WinSock callsCorinna Vinschen2018-02-161-6/+6
| | | | Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: socketpair: Move socketpair creation inside fhandler_socket classCorinna Vinschen2018-02-163-174/+197
| | | | | | | | Add fhandler_socket::socketpair method Deliberately disable AF_INET socketpairs for now Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Cygwin: sockets: move common settings into set_socket_handle()Corinna Vinschen2018-02-162-18/+21
| | | | | | | Move setting address family, socket type and descriptor flags into fhandler_socket::set_socket_handle method. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* add forward declaration to main() to prevent warningsJaap de Wolff2018-02-161-0/+2
|