summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/include
Commit message (Collapse)AuthorAgeFilesLines
* Throughout, keep function definitions and declarations in sync withCorinna Vinschen2013-11-253-5/+8
| | | | newlib in terms of C99 "restrict" keyword.
* * include/cygwin/stdlib.h (realpath): Drop declaration. It's declaredCorinna Vinschen2013-11-201-1/+0
| | | | in newlib's stdlib.h now.
* * autoload.cc (IdnToAscii): Define.Corinna Vinschen2013-11-192-33/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (IdnToUnicode): Define. (FreeAddrInfoW): Define. (GetAddrInfoW): Define. (GetNameInfoW): Define. * net.cc: Drop W. Richard STEVENS libgai implementation. (cygwin_freeaddrinfo): Move code from ipv4_freeaddrinfo here. Move definition up in file to avoid forward declaration in ga_duplist. (ga_dup): Take addrinfoW as input. Add parameters to get IDN flags and to set error value. Handle IDN flags and especially AI_CANONIDN. Convert input wchar_t ai_canonname string to multibyte for output. (ga_duplist): Add parameters to get IDN flags and to set error value and propagate to ga_dup. Call cygwin_freeaddrinfo. (gai_errmap): Add comments. Align error strings to GLibc. Add EAI_IDN_ENCODE entry. (get_ipv6_funcs): Remove. (load_ipv6_guard): Remove. (ipv6_inited): Remove. (load_ipv6): Remove. (load_ipv6_funcs): Remove. (cygwin_getaddrinfo): Drop calling load_ipv6. Handle AI_IDN* flags. Convert input strings to wchar_t and call GetAddrInfoW/FreeAddrInfoW. In case hints is NULL, set default ai_flags explicitely to AI_V4MAPPED | AI_ADDRCONFIG, as documented for Glibc. Only add AI_ALL if AI_ADDRCONFIG is not given. Unconditionally add Windows-specific AI_DISABLE_IDN_ENCODING to ai_flags to make IDN behaviour compatible to Glibc even on Windows 8 and later. (cygwin_getnameinfo): Drop calling load_ipv6. Handle NI_IDN* flags. Call GetNameInfoW and convert returned strings from wchar_t to multibyte. * include/netdb.h: Add comments to describe flags and error values. (AI_*): Define all flags using hex values for clearness. (AI_IDN): Define. (AI_CANONIDN): Define. (AI_IDN_ALLOW_UNASSIGNED): Define. (AI_IDN_USE_STD3_ASCII_RULES): Define. (NI_*): Define all flags using hex values for clearness. (NI_IDN): Define. (NI_IDN_ALLOW_UNASSIGNED): Define. (NI_IDN_USE_STD3_ASCII_RULES): Define. (EAI_IDN_ENCODE): Define.
* * exception.h: Fold in content of include/exceptions.h.Corinna Vinschen2013-10-271-119/+0
| | | | * include/exceptions.h: Remove.
* * exception.h (_exception_list): Drop redefinition for x86_64.Corinna Vinschen2013-10-261-1/+5
| | | | | * include/exceptions.h: Disable content for x86_64 since it's not using frame based exception handling anymore.
* * include /cygwin/config.h (_READ_WRITE_BUFSIZE_TYPE): Define.Corinna Vinschen2013-10-231-0/+1
|
* * include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Bump to 26.Christopher Faylor2013-09-251-1/+1
|
* * include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Belatedly bumpCorinna Vinschen2013-08-311-1/+1
| | | | to 25.
* * fhandler_tape.cc (mtinfo_drive::create_partitions): Allow partitioningCorinna Vinschen2013-08-212-5/+10
| | | | | | | | | of drives supporting select partitions. (mtinfo_drive::get_status): Fill in current partition and number of partitions on tape into mt_resid. * include/cygwin/mtio.h (struct mtget): Align mt_resid comment to aforementioned change. * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
* * include/sys/cygwin.h (struct per_process): Add posix_memalign. ReduceCorinna Vinschen2013-08-142-3/+7
| | | | | | | | | | size of unused2 accordingly. * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump. * lib/_cygwin_crt0_common.cc (_cygwin_crt0_common): Initialize u->posix_memalign with address of posix_memalign. * malloc_wrapper.cc (posix_memalign): Call user-provided posix_memalign rather than just returning ENOSYS. * globals.cc (__cygwin_user_data): Initialize posix_memalign member.
* * include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Bump to 24.Corinna Vinschen2013-08-091-1/+1
|
* Fix copyright dateCorinna Vinschen2013-07-241-1/+1
|
* * include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Bump to 23.Corinna Vinschen2013-07-221-1/+1
|
* * common.din: Export GetCommandLine{A,W}.Christopher Faylor2013-07-191-1/+2
| | | | | | | | | | | | | | | | | | * kernel32.cc: Add includes needed for GetCommandLine functions. (ucmd): New function. (cygwin_GetCommandLineW): Ditto. (cygwin_GetCommandLineA): Ditto. * spawn.cc (child_info_spawn::worker): Rename one_line -> cmd. Use lb_wcs macro to generate a wide character version of the line buffer. Remove duplicate printing of command line. Don't access members of linebuf directly. * winf.h: Use pragma once. (linebuf): Make storage private. (linebuf::operator size_t): New operator. Return size of buf. (linebuf::operator wchar_t): New operator. (linebuf::wcs): New function. (lb_wcs): New macro. * include/cygwin/version.h: Bump API minor number to 268. * strfuncs.cc: Clarify descriptive file comment.
* * include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Bump to 22.Corinna Vinschen2013-07-151-1/+1
|
* * common.din (rawmemchr): Export.Yaakov Selkowitz2013-06-241-1/+2
| | | | | * posix.sgml (std-gnu): Add rawmemchr. * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
* * include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Bump to 21.Corinna Vinschen2013-06-071-1/+1
|
* * include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Bump to 20.Corinna Vinschen2013-06-051-1/+1
|
* * autoload.cc (CancelSynchronousIo): Define.Corinna Vinschen2013-06-021-2/+19
| | | | | | | | | | | | | | | | | | | | | | | | * fcntl.cc (fcntl64): Drop handling of locking commands. * fhandler.h (class fhandler_disk_file): Add mandatory_locking. (fhandler_disk_file::fcntl): Declare. (fhandler_disk_file::mand_lock): Declare. * fhandler_disk_file.cc (fhandler_disk_file::fhandler_disk_file): Initialize mandatory_locking. (fhandler_disk_file::fcntl): New method. Handle F_LCK_MANDATORY and locking commands. (fhandler_disk_file::dup): Duplicate mandatory_locking. Fix a bug when duplicating prw_handle failed. (fhandler_disk_file::fixup_after_fork): Reset mandatory_locking. * flock.cc (fhandler_disk_file::lock): Add comment. (struct lock_parms): New struct to pass parameters to blocking_lock_thr thread function. (blocking_lock_thr): New thread function. (fhandler_disk_file::mand_lock): New methof implementing mandatory locking with Windows semantics. * ntdll.h (NtLockFile): Declare. (NtUnlockFile): Declare. * include/fcntl.h: Fix a comment. (F_LCK_MANDATORY): Define. Add lengthy comment to explain.
* * include/sys/socket.h: Move SHUT_xx definitoins from here...Corinna Vinschen2013-05-312-9/+9
| | | | * include/cygwin/socket.h: ...to here.
* * include/cygwin/if.h: Include cygwin/socket.h rather than sys/socket.hCorinna Vinschen2013-05-311-2/+2
| | | | to avoid circular dependency resulting in bogus compile time warnings.
* * Makefile.in (DLL_OFILES): Add arc4random.o.Corinna Vinschen2013-05-212-2/+10
| | | | | | | | | | | * common.din: Export arc4random, arc4random_addrandom, arc4random_buf, arc4random_stir and arc4random_uniform. * mktemp.cc (arc4random): Remove static replacement function. * posix.sgml (std-bsd): Add arc4random functions. * include/cygwin/stdlib.h: Declare arc4random functions. * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump. * libc/arc4random.cc: New file implementing arc4random functions taken from FreeBSD.
* * libc/base64.c: New file.Corinna Vinschen2013-05-211-1/+2
| | | | | | | * Makefile.in (DLL_OFILES): Add base64.o. * common.din: Export __b64_ntop and __b64_pton. * posix.sgml (std-bsd): Add __b64_ntop and __b64_pton. * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
* * include/cygwin/version.h: Bump api minor number to reflect previous change.Christopher Faylor2013-05-131-1/+2
|
* * Merge in cygwin-64bit-branch.Corinna Vinschen2013-04-2330-370/+509
|
* * include/sys/queue.h: Delete in favor of more complete newlib file.Corinna Vinschen2013-04-221-512/+0
|
* Adapt to changes in newlib's sys/cdefs.h:Corinna Vinschen2013-04-221-2/+2
| | | | | | * include/sys/sysinfo.h (struct sysinfo): Rename __unused member to __f. * libc/fts.c (__FBSDID): Drop definition. * regex/regexec.c (__unused): Drop definition.
* * include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Bump to 19.Corinna Vinschen2013-04-221-2/+2
|
* * include/sys/un.h (UNIX_PATH_MAX): Rename from UNIX_PATH_LEN toCorinna Vinschen2013-03-071-3/+3
| | | | | | | | follow Linux. * fhandler_socket.cc: Change UNIX_PATH_LEN to UNIX_PATH_MAX throughout. (fhandler_socket::recv_internal): Don't return prematurely in case of successful return. For AF_LOCAL sockets, overwrite returned AF_INET name with AF_LOCAL name.
* * include/pthread.h (pthread_atfork): Add missing declaration.Corinna Vinschen2013-02-261-0/+2
|
* * include/error.h (error_message_count): Declare as dllimport.Yaakov Selkowitz2013-02-211-0/+6
| | | | | (error_one_per_line): Ditto. (error_print_progname): Ditto.
* * DevNotes: Add entry cgf-000022.Christopher Faylor2013-01-311-20/+32
| | | | | | | | | | | | | | | | | | | | | | * cygtls.h (_cygtls::func): Define as a sa_sigaction style function. * exceptions.cc (sig_handle_tty_stop): Ditto. (_cygtls::interrupt_setup): Fix coercion to accommodate 'func' change. (ctrl_c_handler): Use tty kill_pgrp to send a signal. (sigpacket::process): Don't process sigflush here. (_cygtls::call_signal_handler): Reorganize to avoid a race. Always call sa_sigaction style function. * fhandler_termios.cc (is_flush_sig): Define new function. (tty_min::kill_pgrp): Handle tty flush when signal detected. (fhandler_termios::bg_check): Be slightly more paranoid about checking for valid tty. (fhandler_termios::sigflush): Don't flush unless tty owner. * fhandler_tty.cc (fhandler_pty_slave::ioctl): Use tty kill_pgrp to send signal. (fhandler_pty_master::ioctl): Ditto. * signal.cc (killsys): Delete definition. * sigproc.h (killsys): Delete declaration. * include/cygwin/signal.h (siginfo_t): Simplify union/struct nesting slightly. Implement mechanism to allow cygwin data passing.
* Throughout, update copyrights to reflect dates which correspond to main-branchChristopher Faylor2013-01-2158-65/+70
| | | | checkins. Regularize copyright format.
* * include/pthread.h (pthread_exit): Mark as "noreturn".Christopher Faylor2013-01-141-1/+1
|
* * cygtls.h (_cygtls::signal_exit): Delete from class.Christopher Faylor2013-01-021-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * exception.h (cygwin_exception): New class. (cygwin_exception::dumpstack): Declare new function. (cygwin_exception::context): Ditto. (cygwin_exception::dump_exception): Ditto. * exceptions.cc (cygwin_exception::dump_exception): Move into cygwin_exception class. Accommodate new variable names. (cygwin_exception::dumpstack): Ditto stackdump -> dumpstack. (exception::handle): Move andreas processing earlier. Defer signal processing decisions to the signal thread where they belong. Pass exception information to sig_send via new siginfo_t si_cyg field. (ctrl_c_handler): Wait for SIGHUP signal to be processed since it could cause a process exit and we don't want races with thread exit lock. (signal_exit): Move back here from sigproc.cc. Modify arguments and remove from sigpacket class. Decide when to dump core based on signal type. (sigpacket::process): Handle exiting signals in context of threads rather than in the signal thread. Signal debugger on non-Windows signals. Remove setup_signal_exit call. * sigproc.cc (no_signals_available): Remove argument. (signal_exit_code): Delete. (close_my_readsig): Ditto. (_cygtls::signal_exit): Move to exceptions.cc. (sigproc_terminate): Don't attempt to terminate signal thread. (setup_signal_exit): Delete. (exit_thread): Use new si_cyg entry in siginfo_t. (sig_send): Just use empty initializer for si. Accommodate change in no_signals_available argument. (wait_sig): Remove attempt to "go asynchronous" on process exit. Delete __SIGEXIT handling. Don't ever exit. * sigproc.h: Remove __SIGEXIT from signal enum. Renumber. * include/cygwin/signal.h (siginfo_t): Add si_cyg entry.
* * fhandler.cc (fhandler_base::write): Don't attempt to sparsifyCorinna Vinschen2012-12-141-2/+2
| | | | | | | | | | | | | | | | | an already sparse file. Drop check for FILE_SUPPORTS_SPARSE_FILES flag. Explicitely set FILE_ATTRIBUTE_SPARSE_FILE attribute in cached attributes. (fhandler_base::lseek): Only set did_lseek if sparseness is supported. * fhandler_disk_file.cc (fhandler_disk_file::ftruncate): Don't attempt to sparsify an already sparse file. Explicitely set FILE_ATTRIBUTE_SPARSE_FILE attribute in cached attributes. * mount.cc (oopt): Add "sparse" flag. (fillout_mntent): Ditto. * path.h (enum path_types): Add PATH_SPARSE. (path_conv::support_sparse): New method. (path_conv::fs_flags): Constify. (path_conv::fs_name_len): Ditto. include/sys/mount.h: Replace unused MOUNT_MIXED flag with MOUNT_SPARSE.
* * include/cygwin/wait.h (WAIT_ANY): Define.Yaakov Selkowitz2012-12-061-0/+3
| | | | (WAIT_MYPGRP): Define.
* * termios.cc (cfsetspeed): New function.Yaakov Selkowitz2012-11-212-1/+3
| | | | | | | * cygwin.din (cfsetspeed): Export. * posix.sgml (std-bsd): Add cfsetspeed. * include/sys/termios.h (cfsetspeed): Declare. * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
* * include/mntent.h: Only include paths.h when building for Cygwin.Corinna Vinschen2012-11-161-3/+9
| | | | Add comment to explain why.
* * include/sys/termios.h (CBRK): Define as alias of CEOL.Yaakov Selkowitz2012-11-051-0/+9
| | | | | | (CREPRINT): Define as alias of CRPRNT. (CDISCARD): Define as alias of CFLUSH. (TTYDEF_*): Define.
* Fix copyrightCorinna Vinschen2012-10-311-1/+1
|
* * include/sys/param.h: Include stddef.h to define NULL.Corinna Vinschen2012-10-311-4/+3
|
* * include/sys/cygwin.h: Add missing defines for CW_ALLOC_DRIVE_MAP,Corinna Vinschen2012-10-301-0/+3
| | | | CW_MAP_DRIVE_MAP and CW_FREE_DRIVE_MAP.
* * include/cygwin/signal.h (sigset_t): Define here.Corinna Vinschen2012-10-261-0/+2
|
* * include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Bump to 18.Corinna Vinschen2012-10-211-1/+1
|
* * fhandler.h (class fhandler_dev_raw): Add members devbufalloc andCorinna Vinschen2012-10-131-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | devbufalign. (class fhandler_dev_floppy): Remove member bytes_per_sector; * fhandler_floppy.cc (bytes_per_sector): Define as devbufalign. (fhandler_dev_floppy::open): Set devbufalign to a multiple of the sector size and handle devbuf allocation and alignment in !O_DIRECT case here. Change comment accordingly. Call FSCTL_ALLOW_EXTENDED_DASD_IO for partitions as well. (fhandler_dev_floppy::raw_write): Fix comment. Rewrite and fix writing behaviour when application uses read and lseek. (fhandler_dev_floppy::lseek): Use rounddown macro. Call SetFilePointerEx rather than the old SetFilePointer. (fhandler_dev_floppy::ioctl): Reformat switch. Call IOCTL_DISK_UPDATE_PROPERTIES rather than IOCTL_DISK_UPDATE_DRIVE_SIZE in BLKRRPART case. Support BLKIOMIN, BLKIOOPT, BLKPBSZGET and BLKALIGNOFF. * fhandler_raw.cc (fhandler_dev_raw::fhandler_dev_raw): Initialize all devbuf-related members. (fhandler_dev_raw::~fhandler_dev_raw): Delete devbufalloc rather than devbuf. (fhandler_dev_raw::open): Drop allocating devbuf. (fhandler_dev_raw::dup): Allocate devbufalloc and set devbuf to support new sector-aligned devbuf handling. (fhandler_dev_raw::fixup_after_exec): Ditto. * fhandler_tape.cc (fhandler_dev_tape::open): Ditto, set devbufalign to 1. * include/cygwin/fs.h (BLKIOMIN): Define. (BLKIOOPT): Define. (BLKALIGNOFF): Define. (BLKPBSZGET): Define.
* * include/cygwin/in.h (struct in_addr): Guard with s_addr to avoidCorinna Vinschen2012-10-101-0/+4
| | | | potential collision with Win32 headers.
* * fhandler_clipboard.cc (fhandler_dev_clipboard::read): UseCorinna Vinschen2012-08-171-2/+1
| | | | | | read-ahead buffer for reading Windows clipboard if caller's buffer is too small for complete characters. * include/limits.h: Remove outdated TODO comment.
* * include/sys/wait.h (_wait): Define when building newlib.Corinna Vinschen2012-08-081-1/+5
|
* * include/cygwin/socket.h (MSG_BCAST): Define.Corinna Vinschen2012-08-011-0/+3
| | | | (MSG_MCAST): Define.