summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/include/limits.h
Commit message (Collapse)AuthorAgeFilesLines
* Switching the Cygwin DLL to LGPLv3+, dropping commercial buyout optioncygwin-2_5_2-releaseCorinna Vinschen2016-06-231-3/+0
| | | | | | | | | | | | | | Bump GPLv2+ to GPLv3+ for some files, clarify BSD 2-clause. Everything else stays under GPLv3+. New Linking Exception exempts resulting executables from LGPLv3 section 4. Add CONTRIBUTORS file to keep track of licensing. Remove 'Copyright Red Hat Inc' comments. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Feature test macros overhaul: limits.hYaakov Selkowitz2016-03-171-1/+1
| | | | | | Simplify the C99 conditional, and use the internal macro for GNU extensions. Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
* * Merge in cygwin-64bit-branch.Corinna Vinschen2013-04-231-11/+17
|
* Throughout, update copyrights to reflect dates which correspond to main-branchChristopher Faylor2013-01-211-2/+2
| | | | checkins. Regularize copyright format.
* * 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.
* * sysconf.cc (sca): Return -1 for _SC_THREAD_ROBUST_PRIO_INHERIT,Yaakov Selkowitz2011-07-181-0/+8
| | | | | | | | | | _SC_THREAD_ROBUST_PRIO_PROTECT, and _SC_XOPEN_UUCP. (SC_MAX): Redefine accordingly. (csa): Return strings for _CS_POSIX_V7_THREADS_CFLAGS, _CS_POSIX_V7_THREADS_LDFLAGS, and _CS_V7_ENV. (CS_MAX): Redefine accordingly. * include/limits.h (LONG_BIT): Define. (WORD_BIT): Define.
* * include/limits.h (NGROUPS_MAX): Set to a more sane value.Corinna Vinschen2009-08-111-1/+1
| | | | * include/sys/param.h (NGROUPS): Ditto.
* * include/limits.h (PATH_MAX): Add comment.Corinna Vinschen2008-06-211-0/+1
| | | | | * include/cygwin/config.h (__FILENAME_MAX__): Define as 4096. Add comment.
* * cygheap.cc (cwcsdup): New function.Corinna Vinschen2008-02-141-3/+4
| | | | | | | | | | | | | | | | | | | | | | (cwcsdup1): New function. * cygheap.h (cygheap_user::get_windows_id): New method returning PWCHAR. (cwcsdup): Declare. (cwcsdup1): Declare. * registry.cc (get_registry_hive_path): Use WCHAR instead of char throughout. (load_registry_hive): Ditto. * registry.h (get_registry_hive_path): Change declaration accordingly. (load_registry_hive): Ditto. * sec_helper.cc (cygpsid::string): New method returning PWCHAR. * security.h (cygpsid::string): Declare. * syscalls.cc (seteuid32): Convert local name var to WCHAR. * uinfo.cc (cygheap_user::env_userprofile): Convert local name buffers to WCHAR. Call sys_wcstombs_alloc to generate puserprof buffer. * winsup.h: Fix comment. (NT_MAX_PATH): New definition for maximum internal path length. Use throughout where appropriate. * include/limits.h (PATH_MAX): Set to 4096 as on Linux.
* * fhandler.h (fhandler_console::trunc_buf): Add to use as cache forCorinna Vinschen2008-02-061-1/+3
| | | | | | | | | | | | | | | | | | | | | | truncated multibyte characters on input. (fhandler_console::write_replacement_char): Declare new method. * fhandler_console.cc (CONVERT_LIMIT): Raise to 64K. (fhandler_console::fhandler_console): Initialize trunc_buf. (ERR): Define as independent value again. (fhandler_console::write_replacement_char): New method to print replacement chars. (fhandler_console::write_normal): Add handling for truncated multibyte sequences. Call next_char instead of pathetic CharNextExA function. Don't change src, rather just work with found later on. * miscfuncs.cc (is_cp_multibyte): Move here from strfuncs.cc. Don't call Windows function, restrict to well-known ANSI/OEM codepages and UTF-8. (next_char): Call CharNextExA only for doublebyte codepages. Implement for UTF-8 here. * strfuncs.cc (is_cp_multibyte): Move to miscfuncs.cc. * winsup.h (next_char): Declare. * include/limits.h (MB_LEN_MAX): Set to maximum value of MB_CUR_MAX as defined by newlib for now.
* * fhandler.h: Update copyright.Corinna Vinschen2008-01-071-1/+2
| | | | * include/limits.h: Ditto.
* * include/limits.h (TTY_NAME_MAX): Increase size to same as linux to allow forChristopher Faylor2008-01-061-1/+1
| | | | (at least) null terminating byte for "/dev/console".
* * path.cc (struct symlink_info): Change size of contents member toCorinna Vinschen2007-10-101-3/+4
| | | | | | | | | | | | | | | | | | | | | | be able to keep SYMLINK_MAX sized strings. (symlink_worker): Rework for long path names. When writing windows shortcuts, store pathname additionally "hidden" after the actual shortcut data to workaround size limitations of the description field. (symlink_info::check_shortcut): Drop file name parameter. Drop max file size check. Use NT functions. Use appended full path if available, description otherwise. Check symlink string length for not exceeding SYMLINK_MAX. Don't close file here. (symlink_info::check_sysfile): Drop file name parameter. Use NT functions. Check symlink string length for not exceeding SYMLINK_MAX. Don't close file here. (symlink_info::check_reparse_point): Drop file name parameter. Drop useless length checks. Allow SYMLINK_MAX length symlink strings. Don't close file here. (symlink_info::posixify): Allow SYMLINK_MAX length symlink strings. (symlink_info::check): Turn around checking for symlink file attributes. Use NT functions. Close symlink file here. * include/limits.h (PATH_MAX): Define as 32760. Change comment. (SYMLINK_MAX): Define as PATH_MAX - 1.
* * Makefile.in (DLL_OFILES): Add posix_ipc.o.Corinna Vinschen2007-02-141-6/+4
| | | | | | | | | | | | | | | | | | | | | | * cygwin.din (mq_close): Export. (mq_getattr): Export. (mq_notify): Export. (mq_open): Export. (mq_receive): Export. (mq_send): Export. (mq_setattr): Export. (mq_timedreceive): Export. (mq_timedsend): Export. (mq_unlink): Export. * posix_ipc.cc: New file implementing the above functions. Move shm_open and shm_unlink from syscalls.cc here. * sysconf.cc (sca): Set value of _SC_MQ_OPEN_MAX to MQ_OPEN_MAX, _SC_MQ_PRIO_MAX to MQ_PRIO_MAX, _SC_MESSAGE_PASSING to _POSIX_MESSAGE_PASSING. * include/limits.h (MQ_OPEN_MAX): Define. (MQ_PRIO_MAX): Define. * include/mqueue.h: New file. * include/cygwin/version.h: Bump API minor number.
* * cygmalloc.h (MALLOC_FAILURE_ACTION): Define empty.Corinna Vinschen2007-02-071-39/+211
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * cygwin.din (posix_madvise): Export. (posix_memalign): Export. * fhandler.cc (fhandler_base::fpathconf): Return useful values in _PC_VDISABLE, _PC_SYNC_IO and _PC_SYMLINK_MAX cases. * malloc_wrapper.cc (malloc): Set errno here since it's not set in dlmalloc.c anymore. (realloc): Ditto. (calloc): Ditto. (memalign): Ditto. (valloc): Ditto. (posix_memalign): New function. * mmap.cc (posix_madvise): New function. * sysconf.cc (get_open_max): New function. (get_page_size): Ditto. (get_nproc_values): Ditto. (get_avphys): Ditto. (sc_type): New type. (sca): New array to map _SC_xxx options to sysconf return values. (sysconf): Reimplement using sca array. * include/limits.h: Add all missing values as defined by SUSv3. * include/pthread.h (PTHREAD_DESTRUCTOR_ITERATIONS): Move definition to sys/limits.h. (PTHREAD_KEYS_MAX): Ditto. * include/semaphore.h (SEM_VALUE_MAX): Ditto. * include/cygwin/stdlib.h (posix_memalign): Declare. * include/cygwin/version.h: Bump API minor number. * include/sys/mman.h: Add posix_madvise flags. (posix_madvise): Declare. * include/sys/termios.h (_POSIX_VDISABLE): Move definition to sys/limits.h.
* * fhandler.cc (check_posix_perm): Moved here from syscalls.cc.Corinna Vinschen2006-11-071-27/+149
| | | | | | | | | | | | | | | | (fhandler_base::fpathconf): New method implementing (f)pathconf. * fhandler.h (class fhandler_base): Declare fpathconf method. * path.cc (path_conv::check): Replace MAX_LINK_DEPTH with SYMLOOP_MAX. * path.h (MAX_LINK_DEPTH): Delete. * syscalls.cc (check_posix_perm): Move to fhandler.cc. (fpathconf): Call fhandler's fpathconf method. (pathconf): Build fhandler and call fhandler's fpathconf method. * sysconf.cc (sysconf): Reorder switch according to order of flags in sys/unistd.h. Add handling for some missing flags. * include/limits.h: Reorder according to SUSv3 description. Add some missing definitions. Add comments. * include/sys/syslimits.h: New file overriding newlib's syslimits.h file.
* * include/limits.h (LLONG_MIN, LLONG_MAX, ULLONG_MAX): Always define.Corinna Vinschen2005-05-291-2/+0
|
* * include/limits.h: Include features.h, as on linux.Christopher Faylor2005-05-191-1/+4
|
* * include/limits.h (NAME_MAX): New define.Corinna Vinschen2005-03-291-1/+4
| | | | (PATH_MAX): POSIX allows PATH_MAX to include trailing NUL.
* * cygwin.din: Export getpriority and setpriority.Corinna Vinschen2005-01-251-0/+3
| | | | | | | | | | | | | | | | | | | | | | * fork.cc (fork_parent): Copy parent's nice value into child. * spawn.cc (spawn_guts): Ditto. * miscfuncs.cc (winprio_to_nice): New function. (nice_to_winprio): Ditto. * pinfo.cc (pinfo_init): If parent is not a Cygwin process, set default nice value according to current Win32 priority class. * pinfo.h (class _pinfo): Add nice member. * syscalls.cc (setpriority): New function, only implementing PRIO_PROCESS for now. (getpriority): Ditto. (nice): Just call setpriority. * wincap.h (wincaps::has_extended_priority_class): New element. * wincap.cc: Implement above element throughout. * winsup.h: Add prototypes for winprio_to_nice and nice_to_winprio. * include/limits.h (NZERO): New define. * include/cygwin/types.h (id_t): New datatype. * include/cygwin/version.h: Bump API minor version. * include/sys/resource.h: Add PRIO_XXX defines and prototypes for getpriority and setpriority.
* * cygwin.din: Add symbols flockfile, ftrylockfile, funlockfile,Corinna Vinschen2004-05-171-0/+4
| | | | | | | | | | | | | | | | | | getgrgid_r, getgrnam_r and getlogin_r. * grp.cc (getgrgid_r): New function. (getgrnam_r): Ditto. * syscalls.cc (flockfile): Ditto. (ftrylockfile): Ditto. (funlockfile): Ditto. * sysconf.cc (sysconf): Return LOGIN_NAME_MAX in case of _SC_LOGIN_NAME_MAX. * thread.cc (__cygwin_lock_trylock): Define int. Return value from call to pthread_mutex_trylock. * uinfo.cc (getlogin_r): New function. * include/limits.h: Define LOGIN_NAME_MAX. * include/cygwin/version.h: Bump API minor number. * include/sys/lock.h: Add declarations for __cygwin_lock_xxx functions. * include/sys/stdio.h: Add define for _ftrylockfile.
* * autoload.cc (NtSetSecurityObject): Add.Corinna Vinschen2004-04-141-0/+5
| | | | | | | | | | | | | * fhandler_disk_file.cc (fhandler_disk_file::fchmod): Only request READ_CONTROL rights when opening the file. * ntdll.h (NtSetSecurityObject): Add declaration. * security.cc (write_sd): Call NtSetSecurityObject instead of BackupWrite. (get_nt_object_security): Don't free security descriptor here. * syscalls.cc (ttyname): Use buffer of length TTY_NAME_MAX + 1. * sysconf.cc (sysconf): Handle _SC_TTY_NAME_MAX request. * include/limits.h: Define TTY_NAME_MAX and _POSIX_TTY_NAME_MAX.
* * exceptions.cc (setup_handler): Signal event for any sigwaitinfo if it existsChristopher Faylor2004-02-261-0/+5
| | | | | | | | | | | | | | | | | | | | | to force signal to be handled. Zero event here to prevent races. * signal.cc (sigwaitinfo): Use local handle value for everything since signal thread could zero event element at any time. Detect when awaking due to thread not in mask and set return value and errno accordingly. Don't set signal number to zero unless we've recognized the signal. * sigproc.cc (sigq): Rename from sigqueue throughout. * thread.cc (pthread::join): Handle signals received while waiting for thread to terminate. * cygwin.din: Export sighold, sigqueue. * exceptions.cc (sighold): Define new function. * signal.cc (handle_sigprocmask): Set correct errno for invalid signal. Simplify debugging output. (sigqueue): Define new function. * include/cygwin/signal.h (sighold): Declare new function. (sigqueue): Ditto. * include/cygwin/version.h: Bump API minor version number. * include/limits.h (TIMER_MAX): Define. (_POSIX_TIMER_MAX): Ditto.
* * Makefile.in (DLL_OFILES): Add strsig.o.Christopher Faylor2004-02-031-1/+4
| | | | | | | | | | | | * cygtls.h (_local_storage::signamebuf) New element. * sysconf.cc (sysconf): Implement _SC_RTSIG_MAX. * tlsoffset.h: Regenerate. * include/limits.h (_POSIX_RTSIG_MAX): New define. (RTSIG_MAX): Ditto. * include/cygwin/signal.h (SIGRTMIN): New define. (SIGRTMAX): Ditto. (NSIG): Bump. * strsig.cc: New file.
* * include/limits.h: Revert unsanctioned changes below.Christopher Faylor2003-11-151-1/+1
| | | | | * include/cygwin/config.h: Ditto. * include/sys/param.h: Ditto.
* 2003-11-11 Robert Collins <rbtcollins@hotmail.com>Robert Collins2003-11-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ron Parker <rdparker@butlermfg.com> * bsdlib.cc: Update throughout to use CYG_MAX_PATH rather than MAX_PATH. * cygheap.h: Ditto. * dcrt0.cc: Ditto. * delqueue.cc: Ditto. * dlfcn.cc: Ditto. * dll_init.cc: Ditto. * dll_init.h: Ditto. * dtable.cc: Ditto. * environ.cc: Ditto. * environ.h: Ditto. * exceptions.cc: Ditto. * external.cc: Ditto. * fhandler_disk_file.cc: Ditto. * fhandler_proc.cc: Ditto. * fhandler_process.cc: Ditto. * fhandler_raw.cc: Ditto. * fhandler_registry.cc: Ditto. * fhandler_socket.cc: Ditto. * fhandler_virtual.cc: Ditto. * miscfuncs.cc: Ditto. * mmap.cc: Ditto. * netdb.cc: Ditto. * path.cc: Ditto. * path.h: Ditto. * pinfo.cc: Ditto. * pinfo.h: Ditto. * pthread.cc: Ditto. * registry.cc: Ditto. * shared.cc: Ditto. * shared_info.h: Ditto. * smallprint.c: Ditto. * spawn.cc: Ditto. * strace.cc: Ditto. * syscalls.cc: Ditto. * thread.h: Ditto. * uinfo.cc: Ditto. * winsup.h: Ditto. * include/limits.h: Ditto. * include/cygwin/config.h: Ditto. * include/sys/param.h: Ditto.
* * fhandler_console.cc (fhandler_console::read) Handle certain key up events, toChristopher Faylor2003-04-081-2/+2
| | | | | | | allow pasting accented characters and typing them using the "alt + numerics" sequences. * include/limits.h (IOV_MAX): Set to a number which is small enough to use in an array.
* * include/limits.h: Define LLONG_MIN, LLONG_MAX, ULLONG_MAX.Christopher Faylor2001-12-171-1/+14
|
* Update copyrights.Christopher Faylor2001-09-111-1/+1
|
* * include/limits.h: Define PIPE_BUF.Corinna Vinschen2001-09-071-0/+5
| | | | | * syscalls.cc (fpathconf): Use PIPE_BUF instead of numerical constant. (pathconf): Ditto.
* * resource.cc (getrlimit): Return OPEN_MAX as current limitCorinna Vinschen2001-08-161-0/+7
| | | | | | | on RLIMIT_NOFILE. * syscalls.cc (getdtablesize): Return OPEN_MAX. * sysconf.cc (sysconf): Return OPEN_MAX on _SC_OPEN_MAX. * include/limits.h (OPEN_MAX): Define as 256.
* import winsup-2000-02-17 snapshotChristopher Faylor2000-02-171-0/+144