summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/include
Commit message (Collapse)AuthorAgeFilesLines
...
* Make pty.h match recent glibc.Eric Blake2009-12-261-2/+4
| | | | | | * include/pty.h (openpty, forkpty): Mark last two arguments const, to match glibc 2.8. * libc/bsdlib.cc (openpty, forkpty): Likewise.
* * fhandler_fifo.cc (fhandler_fifo::open): Avoid resetting errno after it hasChristopher Faylor2009-12-091-1/+1
| | | | | been explicitly set. * include/cygwin/version.h: Bump DLL minor version number to 2.
* * include/cygwin/version.h: Bump DLL minor version number to 1.Corinna Vinschen2009-12-061-1/+1
|
* * sysconf.cc (get_nprocs): New function.Corinna Vinschen2009-11-122-1/+29
| | | | | | | | | | (get_nprocs_conf): Ditto. (get_avphys_pages): Ditto. (get_phys_pages): Ditto. * cygwin.din: Export them. * include/sys/sysinfo.h: New header, decalre above new functions. * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump. * posix.sgml: Mention them as GNU extensions.
* * cygprops.h: New file.Corinna Vinschen2009-10-312-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * dtable.cc (handle_to_fn): Add check for correct installation_key string in object name for pipes and ttys. * external.cc (cygwin_internal): Add CW_GET_INSTKEY to allow fetching the installation_key from cygserver. * fhandler_fifo.cc (fhandler_fifo::fifo_name): Add installation_key to fifo name. * globals.cc: Include cygprops.h. (_RDATA): Move slightly and add comment. (cygwin_props): Define. * mount.cc (mount_info::init): Accommodate the fact that installation_root is now a global variable in DLL common shared memory, rather than a member of cygwin_shared. * pipe.cc (fhandler_pipe::create_selectable): Add installation_key to pipe name. * shared.cc (installation_root): Define here for storage in DLL common shared memory. (installation_key): Ditto. (installation_key_buf): Ditto. (init_installation_root): Convert from shared_info method to ordinary function. Add initializing installation_key. Invalidate installation_key depending of value of disable_key property. Add comment to explain. (get_shared_parent_dir): Add installation_key to directory name. (get_session_parent_dir): Ditto. (shared_info::initialize): Move call to init_installation_root from here... (memory_init): ...to here. Add debug output to print installation root and installation key. Add comment to explain why. * shared_info.h (SHARED_INFO_CB): Recalculate. (CURR_SHARED_MAGIC): Ditto. (class shared_info): Remove definition of installation_root and declaration of init_installation_root. (init_installation_root): Declare. (installation_root): Declare. (installation_key): Declare. * uinfo.cc (pwdgrp::load): Accommodate the fact that installation_root is now a global variable in DLL common shared memory. * include/cygwin/version.h: Bump API minor number. (CYGWIN_INFO_INSTALLATIONS_NAME): Add. * include/sys/cygwin.h (cygwin_getinfo_types): Add CW_GET_INSTKEY.
* * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.Corinna Vinschen2009-10-131-1/+2
|
* * include/sys/cygwin.h: Add new cygwin_getinfo_typeCorinna Vinschen2009-10-131-1/+9
| | | | | | | | | | | | | | | | | | CW_SET_EXTERNAL_TOKEN. Add new enum CW_TOKEN_IMPERSONATION, CW_TOKEN_RESTRICTED. * cygheap.h (cyguser): New flags ext_token_is_restricted, curr_token_is_restricted and setuid_to_restricted. * external.cc (cygwin_internal): Add CW_SET_EXTERNAL_TOKEN. * sec_auth.cc (set_imp_token): New function. (cygwin_set_impersonation_token): Call set_imp_token (). * security.h (set_imp_token): New prototype. * spawn.cc (spawn_guts): Use CreateProcessAsUserW if restricted token was enabled by setuid(). Do not create new window station in this case. * syscalls.cc (seteuid32): Add handling of restricted external tokens. Set HANDLE_FLAG_INHERIT for primary token. (setuid32): Set setuid_to_restricted flag. * uinfo.cc (uinfo_init): Do not reimpersonate if restricted token was enabled by setuid (). Initialize user.*_restricted flags.
* * include/cygwin/config.h (DEFAULT_LOCALE): Define as "C.UTF-8".Corinna Vinschen2009-10-091-0/+2
|
* Add cygwin wrapper for ExitProcess and TerminateProcess.Charles Wilson2009-10-062-2/+4
|
* Add fexecve, execvpe.Eric Blake2009-09-261-1/+2
| | | | | | | | * exec.cc (fexecve): New function. * cygwin.din (execvpe, fexecve): Export new fexecve and existing execvpe. * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump. * posix.sgml: Mention them.
* Provide euidaccess, canonicalize_file_name; fix fchmodat.Eric Blake2009-09-252-2/+4
| | | | | | | | | | | * syscalls.cc (fchmodat): lchmod is not yet implemented. (euidaccess): New function. * path.cc (realpath): Update comment. (canonicalize_file_name): New function. * include/cygwin/stdlib.h (canonicalize_file_name): Declare it. * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump. * cygwin.din: Export canonicalize_file_name, eaccess, euidaccess. * posix.sgml: Mention them.
* * cxx.cc (default_cygwin_cxx_malloc): Enhance commenting.Corinna Vinschen2009-08-131-0/+2
| | | | | | | | | * dll_init.cc (dll_dllcrt0_1): Likewise. * dlfcn.cc (dlopen): Prevent dlopen()'d DLL from installing any cxx malloc overrides. * include/cygwin/cygwin_dll.h (__dynamically_loaded): New variable. * lib/_cygwin_crt0_common.cc (_cygwin_crt0_common): Check it and only install cxx malloc overrides when statically loaded. Extend comments.
* * include/limits.h (NGROUPS_MAX): Set to a more sane value.Corinna Vinschen2009-08-112-2/+2
| | | | * include/sys/param.h (NGROUPS): Ditto.
* * exceptions.cc (sig_handle_tty_stop): Set stopsig to SIGCONT when continuing.Christopher Faylor2009-07-181-1/+4
| | | | | | | | (stopped_or_terminated): Honor WCONTINUED. * wait.cc (wait4): Ditto. * include/cygwin/wait.h (WCONTINUED): Define. (__W_CONTINUED): Ditto. (WIFCONTINUED): Ditto.
* winsup/ChangeLog:Dave Korn2009-07-072-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Makefile.common (COMPILE_CXX): Add support for per-file overrides to exclude $(nostdinc) and $(nostdincxx) from compiler flags. (COMPILE_CC): Likewise for $(nostdinc). winsup/cygwin/ChangeLog: * Makefile.in (DLL_OFILES): Add libstdcxx_wrapper.o (libstdcxx_wrapper_CFLAGS): Add flags for new module. (_cygwin_crt0_common_STDINCFLAGS): Define per-file override. (libstdcxx_wrapper_STDINCFLAGS, cxx_STDINCFLAGS): Likewise. * cxx.cc: Include "cygwin-cxx.h". (operator new): Tweak prototype for full standards compliance. (operator new[]): Likewise. (operator new (nothrow)): New fallback function. (operator new[] (nothrow), operator delete (nothrow), operator delete[] (nothrow)): Likewise. (default_cygwin_cxx_malloc): New struct of pointers to the above, for final last-resort fallback default. * cygwin-cxx.h: New file. (struct per_process_cxx_malloc): Define. (default_cygwin_cxx_malloc): Declare extern. * cygwin.din (__wrap__ZdaPv): Export new wrapper. (__wrap__ZdaPvRKSt9nothrow_t, __wrap__ZdlPv, __wrap__ZdlPvRKSt9nothrow_t, __wrap__Znaj, __wrap__ZnajRKSt9nothrow_t, __wrap__Znwj, __wrap__ZnwjRKSt9nothrow_t): Likewise. * globals.cc (__cygwin_user_data): Init newly-repurposed 'forkee' field (now 'cxx_malloc') to point to default_cygwin_cxx_malloc. * libstdcxx_wrapper.cc: New file. (__wrap__ZdaPv, __wrap__ZdaPvRKSt9nothrow_t, __wrap__ZdlPv, __wrap__ZdlPvRKSt9nothrow_t, __wrap__Znaj, __wrap__ZnajRKSt9nothrow_t, __wrap__Znwj, __wrap__ZnwjRKSt9nothrow_t): Define wrapper functions for libstdc++ malloc operators and their overrides. * winsup.h (default_cygwin_cxx_malloc): Declare extern. * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump. * include/sys/cygwin.h (struct per_process_cxx_malloc): Forward declare here. (struct per_process::forkee): Rename and repurpose from this ... (struct per_process::cxx_malloc): ... to this. * lib/_cygwin_crt0_common.cc: Include cygwin-cxx.h. (WEAK): Define shorthand helper macro. (__cygwin_cxx_malloc): Define and populate with weak references to whatever libstdc++ malloc operators will be visible at final link time for Cygwin apps and dlls. (_cygwin_crt0_common): Always look up cygwin DLL's internal per_process data, and don't test for (impossible) failure. Inherit any members of __cygwin_cxx_malloc that we don't have overrides for from the DLL's default and store the resulting overall set of overrides back into the DLL's global per_process data.
* * cygwin.din (fpurge, mkstemps): New exports.Corinna Vinschen2009-07-031-1/+2
| | | | | | | * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump. * mktemp.cc (_gettemp): Add parameter. (mkstemps): New function. (mkstemp, mkdtemp, mktemp): Adjust clients.
* * cygwin/include/sys/termios.h: Make default erase character "^?".Christopher Faylor2009-05-301-1/+1
|
* cygwin ChangeLogChristopher Faylor2009-05-141-15/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2009-05-13 Corinna Vinschen <corinna@vinschen.de> Christopher Faylor <me+cygwin@cgf.cx> * mount.cc (mount_info::got_usr_bin): Define. (mount_info::got_usr_lib): Ditto. (mount_info::root_idx): Ditto. (mount_info::create_root_entry): Create root entry as immutable and flag as automatic. (mount_info::init): Remove "Huh? No /etc/fstab..." warning. Unconditionally call from_fstab for user and system tables. Fill in /usr/bin and /usr/lib if they have not been specified in /etc/fstab. (oopts): Alphabetize. Add "override" option to allow overriding immutable mount points. (mount_info::add_item): Accommodate new MOUNT_IMMUTABLE flag intended for root mount. (mount_info::add_item): Detect "/usr/bin", "/usr/lib", and "/" and set appropriate global state. (fillout_mntent): Add ,auto to mount points added by Cygwin DLL. (mount): Remove masking of MOUNT_SYSTEM. Allow user to shoot themselves. Add comment. * mount.h (mount_info::got_usr_bin): Declare. (mount_info::got_usr_lib): Ditto. (mount_info::root_idx): Ditto. * include/sys/mount.h: Reformat enum. Add MOUNT_{OVERRIDE,IMMUTABLE,AUTOMATIC}. doc ChangeLog 2009-05-13 Corinna Vinschen <corinna@vinschen.de> Christopher Faylor <me+cygwin@cgf.cx> * pathnames.sgml (mount-table): Sort mount options and add override option. Add description of root mount handling. utils ChangeLog 2009-05-13 Corinna Vinschen <corinna@vinschen.de> Christopher Faylor <me+cygwin@cgf.cx> * mount.cc (oopts): Sort. Add override option. Add dummy "auto" option for consistency. (mount_entries): Avoid adding auto-mounted entries to -m output. * utils.sgml: Sort mount options. Add description of override option.
* * cygwin/version.h (CYGWIN_VERSION_CYGWIN_CONV): New define.Christopher Faylor2009-05-091-0/+2
|
* * include/sys/select.h: Guard definitions with __USE_W32_SOCKETS asCorinna Vinschen2009-05-081-2/+2
| | | | the accompanying fd_set definitions in newlib's sys/types.h.
* * include/cygwin/socket.h: Define SOL_IPV6.Christopher Faylor2009-04-271-0/+1
|
* * include/stdint.h (intptr_t): Remove long from type.Dave Korn2009-04-131-5/+5
| | | | | | (uintptr_t): Likewise. (INTPTR_MIN): Remove 'L' suffix. (INTPTR_MAX, UINTPTR_MAX): Likewise.
* * include/stdint.h (INTPTR_MIN, INTPTR_MAX): Add 'L' suffix.Corinna Vinschen2009-04-111-4/+4
| | | | (WINT_MAX): Add 'U' suffix.
* * include/stdint.h (int_least32_t): Define as int.Corinna Vinschen2009-04-071-12/+12
| | | | | | | | | | | | | | (uint_least32_t): Ditto, unsigned. (int_fast16_t): Define as int. (int_fast32_t): Ditto. (uint_fast16_t): Ditto, unsigned. (uint_fast32_t): Ditto. (UINT32_MAX): Remove `L' long marker. (UINT_LEAST32_MAX): Ditto. (UINT_FAST16_MAX): Ditto. (UINT_FAST32_MAX): Ditto. (INT32_C): Ditto. (UINT32_C): Ditto.
* * include/asm/byteorder.h (__ntohl): Prototype before define to avoidCorinna Vinschen2009-04-041-8/+6
| | | | | | a warning with -Wmissing-prototypes. Use _ELIDABLE_INLINE macro from _ansi.h. (__ntohs): Ditto.
* * include/netdb.h: #include <inttypes.h>, <netinet/in.h>,Corinna Vinschen2009-04-021-2/+5
| | | | and <sys/socket.h> per SUSv3.
* * ctype.cc: Remove implementation of ctype functions in favor ofCorinna Vinschen2009-03-313-75/+8
| | | | | | | | | | | | | | | pointer-based newlib implementation. (_ctype_b): Declare. (__ctype_cp): Move to newlib. Declare. (__ctype_iso): Ditto. (__set_ctype): Implement changing __ctype_ptr__. Only copy character class data in applications built under older Cygwin. * cygwin.din (__ctype_ptr__): Export. * include/ctype.h: Remove in favor of newlib implementation. * include/cygwin/config.h (__EXPORT): Define alongside __IMPORT. * include/cygwin/version.h (CYGWIN_VERSION_CHECK_FOR_OLD_CTYPE): Define check for old vs. new ctype implementation. Bump API minor number.
* * include/asm/byteorder.h (__ntohl): Align definition to ISO C99.Corinna Vinschen2009-03-261-5/+8
| | | | (__ntohs): Ditto.
* * ctype.cc (_CTYPE_DATA_0_127): Add _B class to TAB character.Corinna Vinschen2009-03-241-7/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (__ctype_default): New character class array for default ASCII character set. (__ctype_iso): New array of character class array for ISO charsets. (__ctype_cp): Ditto for singlebyte Windows codepages. (tolower): Implement as distinct function to support any singlebyte charset. (toupper): Ditto. (__set_ctype): New function to copy singlebyte character classes corresponding to current charset to ctype_b array. Align copyright text to upstream. * dcrt0.cc (dll_crt0_1): Reset current locale to "C" per POSIX. * environ.cc (set_file_api_mode): Remove. (codepage_init): Remove. (parse_thing): Remove "codepage" setting. (environ_init): Set locale according to environment settings, or to current codepage, before converting environment to multibyte. * fhandler.h (fhandler_console::write_replacement_char): Drop argument. * fhandler_console.cc (dev_console::str_to_con): Call sys_cp_mbstowcs rather than MultiByteToWideChar. (fhandler_console::write_replacement_char): Always print a funny half filled square if a character isn't in the current charset. (fhandler_console::write_normal): Convert to using __mbtowc rather than next_char. * fork.cc (frok::child): Drop call to set_file_api_mode. * globals.cc (enum codepage_type) Remove. (current_codepage): Remove. * miscfuncs.cc (cygwin_wcslwr): Unused, dangerous. Remove. (cygwin_wcsupr): Ditto. (is_cp_multibyte): Remove. (next_char): Remove. * miscfuncs.h (is_cp_multibyte): Drop declaration. (next_char): Ditto. * strfuncs.cc (get_cp): Remove. (__db_wctomb): New function to implement _wctomb_r functionality for doublebyte charsets using WideCharToMultiByte. (__sjis_wctomb): New function to replace unusable newlib function. (__jis_wctomb): Ditto. (__eucjp_wctomb): Ditto. (__gbk_wctomb): New function. (__kr_wctomb): Ditto. (__big5_wctomb): Ditto. (__db_mbtowc): New function to implement _mbtowc_r functionality for doublebyte charsets using MultiByteToWideChar. (__sjis_mbtowc): New function to replace unusable newlib function. (__jis_mbtowc): Ditto. (__eucjp_mbtowc): Ditto. (__gbk_mbtowc): New function. (__kr_mbtowc): New function (__big5_mbtowc): New function (__set_charset_from_codepage): New function. (sys_wcstombs): Reimplement, basically using same wide char to multibyte conversion as newlib's application level functions. Plus extras. Add lengthy comment to explain. Change return type to size_t. (sys_wcstombs_alloc): Just use sys_wcstombs. Change return type to size_t. (sys_cp_mbstowcs): Replace sys_mbstowcs, take additional codepage argument. Explain why. Change return type to size_t. (sys_mbstowcs_alloc): Just use sys_mbstowcs. Change return type to size_t. * wchar.h: Declare internal functions implemented in strfuncs.cc. (wcscasecmp): Remove. (wcsncasecmp): Remove. (wcslwr): Remove. (wcsupr): Remove. * winsup.h (codepage_init): Remove declaration. (get_cp): Ditto. (sys_wcstombs): Align declaration to new implementation. (sys_wcstombs_alloc): Ditto. (sys_cp_mbstowcs): Add declaration. (sys_mbstowcs): Define as inline function. (sys_mbstowcs_alloc): Align declaration to new implementation. (set_file_api_mode): Remove declaration. * include/ctype.h (isblank): Redefine to use _B character class. (toupper): Remove ASCII-only definition. (tolower): Ditto.
* * include/mntent.h: Remove declarations of nonexistant addmntentCorinna Vinschen2009-03-241-6/+5
| | | | and hasmntopt. Update and clarify the /etc/mtab comment.
* * include/asm/byteorder.h (__constant_ntohs): Remove declaration.Corinna Vinschen2009-03-231-2/+0
| | | | (__constant_ntohl): Ditto.
* * cygwin.din: Export wordexp, wordfree.Corinna Vinschen2009-03-231-1/+2
| | | | | * posix.sgml: Move them to SUSv4 list. * include/cygwin/version.h: Bump API minor number.
* * include/sys/un.h: #include <string.h> for strlen.Corinna Vinschen2009-03-231-1/+2
|
* * cygwin.din: Export log2, log2f as functions.Corinna Vinschen2009-03-191-1/+2
| | | | | * posix.sgml: Add them to SUSv4 list. * include/cygwin/version.h: Bump API minor number.
* * cygwin.din: Export wcsdup.Corinna Vinschen2009-03-151-1/+2
| | | | | * posix.sgml: Add wcsdup to SUSv4 list. * include/cygwin/version.h: Bump API minor number.
* * include/inttypes.h: Remove "l" size specifier from all 16 and 32 bitCorinna Vinschen2009-03-151-44/+44
| | | | definitions.
* * cygwin.din: Export wcscasecmp, wcsncasecmp.Corinna Vinschen2009-03-111-1/+2
| | | | | * posix.sgml: Move wcscasecmp, wcsncasecmp to SUSv4 list. * include/cygwin/version.h: Bump API minor number.
* * cygwin.din: Export wscanf, fwscanf, swscanf, vwscanf, vfwscanf,Corinna Vinschen2009-03-111-1/+2
| | | | | | | vswscanf. * posix.sgml: Move fwscanf, swscanf, vwscanf, vfwscanf, vswscanf to SUSv4 list. * include/cygwin/version.h: Bump API minor number.
* * fhandler.h (fhandler_socket::wait_for_events): Take additionalCorinna Vinschen2009-03-092-2/+4
| | | | | | | | | | | parameter "dontwait". * fhandler_socket.cc (fhandler_socket::wait_for_events): Act as if the socket is non-blocking if dontwait is true. (fhandler_socket::recv_internal): Use incoming MSG_DONTWAIT flag to set the wait_for_events dontwait parameter. (fhandler_socket::send_internal): Ditto. Optimize code slightly. * include/cygwin/socket.h (MSG_DONTWAIT): Define. * include/cygwin/version.h: Bump API minor number.
* * cygwin.din: Export wcsftime.Corinna Vinschen2009-03-091-1/+2
| | | | | * posix.sgml: Move wcsftime to SUSv4 list. * include/cygwin/version.h: Bump API minor number.
* * cygwin.din: Export gethostbyname2.Corinna Vinschen2009-03-061-1/+2
| | | | | | | | | | | | | | | | * net.cc: define _CYGWIN_IN_H and include resolv.h. (realloc_ent): New function. (dup_ent): Call realloc_ent. (memcpy4to6): New function. (dn_length1): New function. (gethostby_helper): New function. (gethostbyname2): New function. * posix.sgml: Add gethostbyname2. * include/cygwin/version.h: Bump API minor number. * libc/minires.c (get_options): Look for "inet6" and apply bounds to "retry" and "retrans". (res_ninit): Set the default options at the beginning. (dn_expand): Fix "off by one".
* * cygwin.din: Export wprintf, fwprintf, swprintf, vwprintf, vfwprintf,Corinna Vinschen2009-03-061-1/+2
| | | | | | | vswprintf. Sort. * posix.sgml: Move fwprintf, swprintf, vwprintf, vfwprintf, vswprintf to SUSv4 list. Sort SUSv4 list. * include/cygwin/version.h: Bump API minor number.
* * net.cc: Include asm/byteorder.h.Corinna Vinschen2009-03-031-2/+1
| | | | | | | | | (htonl): Move to end of file. Add comment to explain why. Align definition to POSIX. Use related macro from asm/byteorder.h. (ntohl): Ditto. (htons): Ditto. (ntohs): Ditto. * include/asm/byteorder.h: Revert previous patch.
* * include/asm/byteorder.h: Disable optimization when buildingCorinna Vinschen2009-03-031-2/+3
| | | | Cygwin network code.
* * cygwin.din: Export mbsnrtowcs and wcsnrtombs.Corinna Vinschen2009-02-191-1/+2
| | | | | * posix.sgml: Move mbsnrtowcs and wcsnrtombs to SUSv4 section. * include/cygwin/version.h: Bump API minor number.
* * cygwin.din: Export open_wmemstream.Corinna Vinschen2009-02-181-1/+2
| | | | | * posix.sgml: Move open_wmemstream to SUSv4 section. * include/cygwin/version.h: Bump API minor number.
* * cygwin.din: Export reallocf.Corinna Vinschen2009-02-161-1/+2
| | | | | | | * malloc_wrapper.cc( reallocf): New function. * posix.sgml: Add reallocf to BSD section. * include/cygwin/version.h: Bump API minor number. * libc/fts.c: Remove erroneous reallocf definition.
* * cygwin.din: Export wcstoimax, wcstoumax.Corinna Vinschen2009-02-162-5/+5
| | | | | | * posix.sgml: Move wcstoimax and wcstoumax to SUSv4 section. * include/inttypes.h: Declare wcstoimax and wcstoumax. * include/cygwin/version.h: Bump API minor number.
* * cygwin.din: Export wcsnlen.Corinna Vinschen2009-02-131-1/+2
| | | | | * posix.sgml: Move wcsnlen to SUSv4 section. * include/cygwin/version.h: Bump API minor number.
* * cygwin.din: Export wcstod and wcstof.Corinna Vinschen2009-02-131-1/+2
| | | | * include/cygwin/version.h: Bump API minor number.