summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/include
Commit message (Collapse)AuthorAgeFilesLines
* * fhandler_disk_file.cc (fhandler_disk_file::fchown): Fix typo inCorinna Vinschen2014-02-061-0/+12
| | | | | | | | | | | comment. * mount.cc (mount_info::from_fstab): Use tmp_pathbuf rather than stack for big local buffer. * net.cc (cygwin_gethostname): Call GetComputerNameExA rather than GetComputerNameA if gethostname failed. * shared.cc (user_info::initialize): Fix formatting. * include/sys/file.h: Define flock and accompanying macros if not already defined in sys/_default_fcntl.h.
* * include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Bump to 29.Corinna Vinschen2014-02-041-1/+1
|
* * include/cygwin/in6.h (struct ipv6_rt_hdr): Define.Corinna Vinschen2014-01-202-14/+24
| | | | | | | | | | * include/cygwin/socket.h: Fix formatting. (IP_UNICAST_IF): Define. (IPV6_JOIN_GROUP): Remove Windowism. (IPV6_LEAVE_GROUP): Ditto. (IPV6_UNICAST_IF): Define. (IPV6_TCLASS): Ditto. (IPV6_RECVTCLASS): Ditto.
* * include/netinet/ip6.h: New file, copied from FreeBSD vebatim.Corinna Vinschen2014-01-181-0/+352
|
* * include/sys/file.h (LOCK_SH): Drop definition in favor of newCorinna Vinschen2014-01-171-20/+0
| | | | | | | | | | | | definitions in newlib. (LOCK_EX): Ditto. (LOCK_NB): Ditto. (LOCK_UN): Ditto. (flock): Ditto. (F_OK): Drop. Already correctly defined in unistd.h. (X_OK): Ditto. (W_OK): Ditto. (R_OK): Ditto.
* * include/cygwin/config.h (_STDIO_BSD_SEMANTICS): Define as 1.Corinna Vinschen2014-01-171-1/+2
|
* * external.cc (fillout_pinfo): Remove nonsensical loop.Christopher Faylor2013-12-181-1/+1
| | | | | | | | | | | | | | | | | | | | * fork.cc (frok::parent): When initializing pinfo for child new PID_NEW flag + actual defined constant rather than raw number. Don't set start_time here. * pinfo.cc (pinfo::thisproc): Use PID_NEW when initializing pinfo. Avoid checking h for NULL multiple times. Don't set start_time here. (pinfo_init): Aways set ppid last. Tweak strace output. (pinfo::init): Handle new PID_NEW flag. Wait for shared memory to contain useful information. Set start_time if PID_NEW. (_onreturn:h): Define as HANDLE rather than HANDLE *. (_onreturn::~onreturn): Accommodate h definition change. (_onreturn::no_close_handle): Rename from no_close_p_handle. Take a pinfo arg and set hProcess to h before zeroing. (winpids::add): Don't open a handle to our own process. Change logic associated with when a handle gets closed. Accommodate no_close_handle changes. (winpids::enum_processes): Simplify process enumeration loop. (winpids::set): Eliminate ill-considered malloc locking. * sigproc.cc (proc_subproc): Always set ppid last.
* * include/cygwin/stdlib.h (initstate, random, setstate, srandom):Corinna Vinschen2013-12-091-1/+3
| | | | | Harden _XOPEN_SOURCE guard against applications defining _XOPEN_SOURCE with empty value.
* * include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Bump to 28.Corinna Vinschen2013-12-081-1/+1
|
* * include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Bump to 27.Christopher Faylor2013-11-291-1/+1
|
* * include/cygwin/stdlib.h(initstate, random, setstate, srandom) :Jon TURNEY2013-11-291-0/+4
| | | | Prototype if not __STRICT_ANSI__ or _XOPEN_SOURCE is defined appropriately.
* * include/glob.h: Fix invalid use of 'restrict' error.Corinna Vinschen2013-11-281-1/+1
|
* * common.din: Export posix_spawn[...] functions.Corinna Vinschen2013-11-261-1/+2
| | | | | | | * exec.cc (execve): Add EXPORT_ALIAS _execve. * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump. * posix.sgml (std-susv4): Add posix_spawn[...] here. (std-notimpl): Drop here.
* 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.