summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/include
Commit message (Collapse)AuthorAgeFilesLines
* * cygwin.din: Add pthread_rwlock_destroy, pthread_rwlock_init,Thomas Pfaff2003-03-182-2/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pthread_rwlock_rdlock, pthread_rwlock_tryrdlock, pthread_rwlock_wrlock, pthread_rwlock_trywrlock, pthread_rwlock_unlock, pthread_rwlockattr_init, pthread_rwlockattr_getpshared, pthread_rwlockattr_setpshared, and pthread_rwlockattr_destroy. * include/cygwin/version.h: Bump API minor number. * include/pthread.h (PTHREAD_RWLOCK_INITIALIZER): Define a reasonable value. Add prototypes for pthread_rwlock_destroy, pthread_rwlock_init, pthread_rwlock_rdlock, pthread_rwlock_tryrdlock, pthread_rwlock_wrlock, pthread_rwlock_trywrlock, pthread_rwlock_unlock, pthread_rwlockattr_init, pthread_rwlockattr_getpshared, pthread_rwlockattr_setpshared, and pthread_rwlockattr_destroy. * thread.h (PTHREAD_ONCE_MAGIC): Remove superflous semicolon. (PTHREAD_RWLOCK_MAGIC): New define. (PTHREAD_RWLOCKATTR_MAGIC): Ditto. (pthread_rwlockattr): New class. (pthread_rwlock): Ditto. (MTinterface::rwlocks): New member. (MTinterface::MTinterface): Initialize rwlocks. Add prototypes for __pthread_rwlock_destroy, __pthread_rwlock_wrlock, __pthread_rwlock_trywrlock, __pthread_rwlock_unlock, __pthread_rwlockattr_init, __pthread_rwlockattr_getpshared, __pthread_rwlockattr_setpshared, and __pthread_rwlockattr_destroy. * thread.cc (MTinterface::Init): Initialize rwlock internal mutex. (MTinterface::fixup_after_fork): Fixup rwlocks after fork. (pthread_rwlockattr::isGoodObject): Implement. (pthread_rwlockattr::pthread_rwlockattr): Ditto. (pthread_rwlockattr::~pthread_rwlockattr): Ditto. (pthread_rwlock::initMutex): Ditto. (pthread_rwlock::pthread_rwlock): Ditto. (pthread_rwlock::~pthread_rwlock): Ditto. (pthread_rwlock::RdLock): Ditto. (pthread_rwlock::TryRdLock): Ditto. (pthread_rwlock::WrLock): Ditto. (pthread_rwlock::TryWrLock): Ditto. (pthread_rwlock::UnLock): Ditto. (pthread_rwlock::addReader): Ditto. (pthread_rwlock::removeReader): Ditto. (pthread_rwlock::lookupReader): Ditto. (pthread_rwlock::RdLockCleanup): Ditto. (pthread_rwlock::WrLockCleanup): Ditto. (pthread_rwlock::fixup_after_fork): Ditto. (pthread_rwlock::isGoodObject): Ditto. (pthread_rwlock::isGoodInitializer): Ditto. (pthread_rwlock::isGoodInitializerOrObject): Ditto. (pthread_rwlock::isGoodInitializerOrBadObject): Ditto. (__pthread_rwlock_destroy): Ditto. (pthread_rwlock::init): Ditto. (__pthread_rwlock_rdlock): Ditto. (__pthread_rwlock_tryrdlock): Ditto. (__pthread_rwlock_wrlock): Ditto. (__pthread_rwlock_trywrlock): Ditto.
* * include/pthread.h (PTHREAD_MUTEX_NORMAL): New define.Thomas Pfaff2003-03-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * thread.cc: Remove errno.h include. (pthread::precreate): Change internal mutex type to normal. (pthread_mutex::canBeUnlocked): Implement. (pthread_mutex::pthread_mutex): Initialize lock_counter with 0. (pthread_mutex::Lock): Rename to _Lock. Add self parameter. Change lock_counter logic. Update SetOwner call. (pthread_mutex::TryLock): Rename to _TryLock. Add self parameter. Change lock_counter logic. Update SetOwner call. (pthread_mutex::UnLock): Rename to _UnLock. Add self parameter. Change lock_counter logic. (pthread_mutex::Destroy): Rename to _Destroy. Update TryLock call. (pthread_mutex::SetOwner): Move to thread.h as inline. (pthread_mutex::LockRecursive): Ditto. (pthread_mutex::fixup_after_fork): Change lock_counter logic. (__pthread_mutexattr_settype): Add PTHREAD_MUTEX_NORMAL to valid types check. * thread.h: Include errno.h and limits.h. (MUTEX_LOCK_COUNTER_INITIAL): Remove. (MUTEX_OWNER_ANONYMOUS): New define. (pthread_mutex::canBeUnlocked): New static method. (pthread_mutex::lock_counter): Change type to unsigned long. (pthread_mutex::GetPthreadSelf): New method. (pthread_mutex::Lock): Call _Lock with pthread_self pointer. (pthread_mutex::TryLock): Call _TryLock with pthread_self pointer. (pthread_mutex::UnLock): Call _UnLock with pthread_self pointer. (pthread_mutex::Destroy): Call _Destroy with pthread_self pointer. (pthread_mutex::SetOwner): Moved from thread.cc as inline. (pthread_mutex::LockRecursive): Ditto. (pthread_mutex::_Lock): New method. (pthread_mutex::_TryLock): New method. (pthread_mutex::_UnLock): New method. (pthread_mutex::_Destroy): New method.
* * include/cygwin/version.h: Reorganize last two api versions so that btowc andChristopher Faylor2003-03-171-3/+3
| | | | | | trunc exports show up before previous bump since there has been no exported version of the DLL with the 64 bit changes yet but 1.3.22 will have the btowc and trunc.
* * cygwin.din: Export btowc, trunc.Christopher Faylor2003-03-171-2/+3
| | | | | | | | | | | | | | | | * include/cygwin/version.h: Reflect new exports. * syscalls.cc (_stat): Rename to stat to avoid newlib wrapper. * syscalls.cc (_fstat): Ditto. * fhandler_console.cc (fhandler_console::close): Correct check for current tty. Add debugging output when console is freed. (set_console_state_for_spawn): Add debugging output. * fhandler_tty.cc (fhandler_tty_slave::open): Don't decrement console open flag when vforking. * sigproc.cc (sigproc_terminate): Fix debugging output. * spawn.cc (handle): Eliminate second argument. (spawn_guts): Reflect elimination of argument change to handle. * syscalls.cc (setsid): Add debugging output when console is freed. * syscalls.cc (rename): Revert assumption that DELETE_ON_CLOSE works on Win9x.
* * include/cygwin/version.h: Bump DLL minor number to 23.Christopher Faylor2003-03-131-1/+1
|
* Switch to 32/64 datatypes:Corinna Vinschen2003-03-093-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Makefile.in (OBSOLETE_FUNCTIONS): Add open acl aclcheck aclfrommode aclfrompbits aclfromtext aclsort acltomode acltopbits acltotext chown facl fchown fgetpos fopen freopen fseeko fsetpos fstat ftello ftruncate getegid geteuid getgid getgrent getgrgid getgrnam getgroups getpwuid getpwuid_r getuid initgroups lchown lseek lstat mknod mmap seekdir setegid seteuid setgid setgroups setregid setreuid setuid stat telldir truncate. (NEW_FUNCTIONS): Add _open64 acl32 aclcheck32 aclfrommode32 aclfrompbits32 aclfromtext32 aclsort32 acltomode32 acltopbits32 acltotext32 chown32 facl32 fchown32 fgetpos64 fopen64 freopen64 fseeko64 fsetpos64 fstat64 ftello64 ftruncate64 getegid32 geteuid32 getgid32 getgrent32 getgrgid32 getgrnam32 getgroups32 getpwuid32 getpwuid_r32 getuid32 initgroups32 lchown32 lseek64 lstat64 mknod32 mmap64 seekdir64 setegid32 seteuid32 setgid32 setgroups32 setregid32 setreuid32 setuid32 stat64 telldir64 truncate64 to substitute the above. * cygserver_shm.h (class client_request_shm): Change uid_t and gid_t members to __uid32_t and __gid32_t. * cygwin.din: Add symbols acl32 aclcheck32 aclfrommode32 aclfrompbits32 aclfromtext32 aclsort32 acltomode32 acltopbits32 acltotext32 facl32 fgetpos64 fopen64 freopen64 fseeko64 fsetpos64 _fstat64 ftello64 _lseek64 mknod32 _open64. * glob.c: Include perprocess.h. (globtilde): Call getpwuid32 and getuid32 instead of getpwuid and getuid. (g_lstat): Check for applications API version to call the appropriate typed gl_lstat function. (g_stat): Ditto for gl_stat. * shm.cc (client_request_shm::client_request_shm): Call geteuid32 and getegid32 instead of geteuid and getegid throughout. * syscalls.cc (_open64): New alias for open. (_lseek64): New alias for lseek64. (_fstat64): New alias for fseek64. (mknod32): New function. (mknod): Calls mknod32 now. * winsup.h: Make function declarations for getuid32, geteuid32, and getpwuid32 accessible for plain C sources. Add declarations for getegid32 and getpwnam. * include/cygwin/version.h: Bum API minor number to 78. * include/sys/cygwin.h: Guard C++ specific members of struct per_process against inclusion in plain C sources. * include/sys/mman.h (mman): Add guard to avoid type clash when compiling Cygwin.
* * include/cygwin/version.h: Bump DLL minor number to 21.Christopher Faylor2003-03-091-1/+1
|
* * include/cygwin/socket.h: Set SOMAXCONN to Winsock2 value.Corinna Vinschen2003-03-091-1/+1
|
* * cygwin.din: Wrap atexit and exit with cygwin, thread-safe functions.Christopher Faylor2003-03-011-1/+2
| | | | | * dcrt0.cc (cygwin_atexit): New function. (cygwin_exit): Ditto.
* whitespaceChristopher Faylor2003-02-221-1/+1
|
* * syslog.cc (syslog): Do not print the Windows pid. Print the Cygwin pid as anChristopher Faylor2003-02-221-1/+2
| | | | | unsigned decimal. On Win95 print a timestamp and attempt to lock the file up to four times in 3 ms.
* * cygwin.din: Export all appropriate newlibc libm functions. Sort.Christopher Faylor2003-02-161-1/+5
| | | | * include/cygwin/version.h: Bump API minor number.
* * cygwin.din: Export all appropriate newlib functions.Christopher Faylor2003-02-151-1/+10
| | | | * include/cygwin/version.h: Bump API minor number.
* * include/cygwin/types.h: Use correct ifdef guard for u_ definitions.Christopher Faylor2003-02-131-8/+8
|
* oops.Christopher Faylor2003-02-131-1/+1
|
* * include/cygwin/in.h (in_attr_t): Define new type.Christopher Faylor2003-02-103-74/+202
| | | | | | | | | | | | | | | | | | * include/arpa/inet.h (inet_addr): Change return type to in_addr_t. (inet_lnaof): Ditto. (inet_netof): Ditto. (inet_network): Ditto. * include/cygwin/types.h: Move many *_t typedefs here. Protect them with ifdefs. * fhandler_disk_file.cc (fhandler_disk_file::fstat): Change ntsec_atts to mode_t. * security.cc (get_attribute_from_acl): Accept mode_t attribute. (get_nt_attribute): Ditto. (get_file_attribute): Ditto. (get_nt_object_attribute): Ditto. (get_object_attribute): Ditto. * security.h: Reflect above changes. * syscalls.cc (chown_worker): Change attrib to mode_t.
* * include/cygwin/version.h: Bump DLL minor number.Christopher Faylor2003-02-081-1/+1
| | | | | * malloc.cc (DEFAULT_MMAP_THRESHOLD): Bump down to 16MB thanks to below changes.
* * include/sys/cygwin.h: Use C-style comments.Christopher Faylor2003-02-051-21/+21
|
* * include/sys/strace.h (paranoid_printf): Define as not being part of "all"Christopher Faylor2003-01-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | output. * pwdgrp.h (pwdgrp::next_num): Rename from next_int. Returns true/false if parse operation succeeded. (pwdgrp::reparse): Remove. (pwdgrp::raw_ptr): New function. Returns pointer in line. (pwdgrp::next_num): New functions for parsing other than unsigned long. * grp.cc (pwdgrp::parse_group): Reinstate previous parsing behavior. Don't fill in fields with NULL and assign empty gr_mem to known pointer rather than doing a pointless calloc. Streamline gr_mem parsing. Don't increment curr_lines here. * passwd.cc (pwdgrp::parse_passwd): Use new behavior of next_num. Don't increment curr_lines here. * uinfo.cc (pwdgrp::next_str): Keep returning EOL if out of data. (pwdgrp::reparse): Remove. (pwdgrp::next_num): Rename from next_int. Return bool indicating success of parse, argument returns value parsed. (pwdgrp::add_line): Increment curr_lines here on successful parse. (pwdgrp::load): (from Pierre Humblet) Don't return status. Just report it here.
* * cygwin.din: Export setreuid32, setreuid, setregid32, setregid.Corinna Vinschen2003-01-241-1/+2
| | | | | | | | * syscalls.cc (setreuid32): New function. (setreuid): Ditto. (setregid32): Ditto. (setregid): Ditto. * include/cygwin/version.h: Bump API minor number.
* * include/pthread.h (PTHREAD_MUTEX_RECURSIVE): Revert changes from ↵Thomas Pfaff2003-01-221-2/+2
| | | | | | 2003-01-09 mutex patch. (PTHREAD_MUTEX_ERRORCHECK): Ditto.
* * cygwin.din: Export nanosleep().Corinna Vinschen2003-01-221-1/+2
| | | | | | | * signal.cc (nanosleep): New function. (sleep): Move old functionality to nanosleep(). Call nanosleep(). (usleep): Remove old functionality. Call nanosleep(). * include/cygwin/version.h: Bump API minor number.
* * include/cygwin/version.h: Bump DLL minor number.Christopher Faylor2003-01-211-1/+1
|
* * cygwin.din: Add strerror_r.Corinna Vinschen2003-01-171-1/+2
| | | | * include/cygwin/version.h: Bump API minor number.
* Split ChangeLog, create ChangeLog-2002.Corinna Vinschen2003-01-105-5/+5
| | | | Fix copyright dates.
* * cygwin.din: add asprintf and vasprintf, as well as the reentrantCorinna Vinschen2003-01-101-1/+2
| | | | | versions and underscore variants. * include/cygwin/version.h: bump CYGWIN_VERSION_API_MINOR.
* Apply pthread_types_patchThomas Pfaff2003-01-093-12/+12
|
* Applied pthread_mutex patchThomas Pfaff2003-01-091-4/+3
|
* Use isdirsep rather than SLASH_P throughout.Christopher Faylor2003-01-091-1/+2
| | | | | | | | | | * path.cc (iscygdrive): Disallow /cygdrive\x. (normalize_posix_path): "Normalize" a windows path, if detected, rather than converting to posix. * fhandler_serial.cc (fhandler_serial::tcsetattr): Add support and capability checking for B230400 bitrate. (fhandler_serial::tcgetattr): Add support for B230400 bitrate. * include/sys/termios.h: Add B230400 definition for Posix support of 230.4Kbps.
* * include/cygwin/version.h: Bump DLL minor number.Christopher Faylor2002-12-251-1/+1
|
* whitespaceChristopher Faylor2002-12-122-2/+2
|
* * cygwin.din: Reflect name change from strtodf to strtof. Export strtof.Christopher Faylor2002-12-061-1/+2
| | | | * include/cygwin/version.h: Bump API minor number.
* * netdb.cc: New file.Christopher Faylor2002-12-041-1/+2
| | | | | | * Makeile.in (DLL_OFILES): Add reference to the new netdb.cc file. * cygwin.din : Add new aliased exports for service and protocol enumerations in netdb.cc.
* * include/cygwin/version.h: Bump DLL minor number.Christopher Faylor2002-11-281-1/+1
|
* * cygwin.din: Export pthread_getsequence_np.Christopher Faylor2002-11-271-1/+2
| | | | * include/cygwin/version.h: Bump API minor version.
* * cygwin.din: Export nl_langinfo().Christopher Faylor2002-11-271-1/+2
| | | | * include/cygwin/version.h: Bump API minor version.
* * include/cygwin/version.h: Bump DLL minor number.Christopher Faylor2002-11-231-1/+1
|
* fix typoChristopher Faylor2002-11-231-1/+1
|
* * include/cygwin/version.h: Fix comment.Christopher Faylor2002-11-221-3/+3
|
* * include/cygwin/version.h: Bump API_MINOR to accommodate below changes.Christopher Faylor2002-11-151-1/+2
| | | | | * cygwin.din (siginterrupt): New export. * signal.cc (siginterrupt): New.
* * include/cygwin/fs.h: New file.Corinna Vinschen2002-11-072-0/+46
| | | | | | * include/cygwin/hdreg.h: New file. * fhandler_floppy.cc (fhandler_floppy::ioctl): Add implementation for HDIO_GETGEO, BLKGETSIZE, BLKGETSIZE64, BLKRRPART and BLKSSZGET ioctls.
* * cygwin.din: Export fseeko() and ftello().Corinna Vinschen2002-11-071-1/+2
| | | | * include/cygwin/version.h: Bump API minor version.
* * include/cygwin/version.h: Bump API minor number for below export.Christopher Faylor2002-11-071-1/+2
| | | | | | | | | | | * cygwin.din (pututline): New exported function. * syscalls.cc (login): Use pututiline(). (setutent): Open utmp as read/write. (endutent): Check if utmp file is open. (utmpname): call endutent() to close current utmp file. (getutid): Enable all cases, use strncmp() to compare ut_id fields. (pututline): New. * tty.cc (create_tty_master): Set ut_pid to current pid.
* * include/cygwin/version.h: Bump DLL minor number.Christopher Faylor2002-11-041-1/+1
|
* * include/cygwin/version.h: Bump DLL minor number.Christopher Faylor2002-10-301-1/+1
|
* * external.cc (cygwin_internal): Implement CW_CMDLINE.Christopher Faylor2002-10-301-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * pinfo.h (SIGCOMMUNE): New signal type. (commune_result): New structure for commune functions. (picom): New enum for commune functions. (_pinfo::hello_pid): New. Pid who's communicating with me. (_pinfo::tothem): New. Handle of communicating pipe. (_pinfo::fromthem): Ditto. (_pinfo::commune_recv): Declare. (_pinfo::commune_send): Declare. (_pinfo::alive): Declare. (_pinfo::cmdline): Declare. (_pinfo::lock): Declare. * pinfo.cc (set_myself): Initialize new _pinfo lock. (_pinfo::alive): Define. Determines if process still exists. (_pinfo::commune_recv): Define. Receive info from another cooperating process. (_pinfo::commune_send): Define. Send info to another cooperating process. (_pinfo::cmdline): Define. Determine command line of a given process. * include/sys/cygwin.h (CW_CMDLINE): Define. *sigproc.cc (talktome): Communicate with any processes who want to talk to me. (wait_sig): Honor __SIGCOMMUNE. * fhandler.cc (fhandler_virtual::fixup_after_exec): Declare. * fhandler_proc.cc: Use malloc/free/realloc throughout rather than cmalloc since buffers don't need to be propagated to subprocesses. * fhandler_registry.cc: Ditto. * fhandler_virtual.cc: Ditto. (fhandler_virtual::fixup_after_exec): Define. * fhandler_process.cc: Ditto for malloc/free/realloc. (process_listin): Add "cmdline". (fhandler_process::fill_filebuf): Implement PROCESS_CMDLINE. * miscfuncs.cc (isalpha_array): New array populated with xor values for alpha characters to switch from one case to another. * string.h (cygwin_strcasematch): New asm implementation of case match. * string.h (cygwin_nstrcasematch): New asm implementation of counted case match.
* * shared.cc (shared_info::initialize): Use correct value for versionChristopher Faylor2002-10-231-1/+1
| | | | | | comparison. * include/cygwin/version.h (CYGWIN_VERSION_MAGIC): Use all of a DWORD for magic calculation.
* Change _function() to function() throughout.Christopher Faylor2002-10-211-1/+1
| | | | | | | | | | | | | | | | | | * cygwin.din: Remove last vestiges (?) of newlib wrappers. * cygthread.cc (cygthread::detach): Always wait for event or suffer an apparently inavoidable race. * dcrt0.cc (dll_crt0_1): Allocate threads after stack has been relocated. * debub.cc (lock_debug): Don't acquire lock on exit. * fork.cc (fork_child): Recreate mmaps before doing anything else since Windows has a habit of using blocks of memory in the child that could previously have been occupied by shared memory in the parent. * mmap.cc (fhandler_disk_file::fixup_mmap_after_fork): Issue error here and provide some details about what went wrong. (fixup_mmaps_after_fork): Remove error message. * shared.cc (open_shared): Move warning message so that more detail is possible. * sigproc.cc (sigproc_init): Initialize sync_proc_subproc to avoid a race. (sigproc_terminate): Specifically wait for process thread to terminate.
* * child_info.h (CURR_CHILD_INFO_MAGIC): Reset.Christopher Faylor2002-10-141-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (child_info_fork::heaptop): Remove obsolete element. (child_info_fork::heabbase): Ditto. (child_info_fork::heapptr): Ditto. (child_info_fork::mount_table): New element. (child_info_fork::myself_addr): Ditto. * dcrt0.cc (dll_crt0_1): Set mount_table and myself_addr when forking. (initial_env): Add newline to "sleeping" message. * dll_init.cc (reserve_upto): Accommodate cygwin heap when freeing memory. Make debugging output a little more descriptive. * fork.cc (fork_parent): Save mount_table and myself_addr. * pinfo.cc (myself_addr): New variable. (set_myself): Pass PID_MYSELF flag to init. (pinfo::Init): Honor PID_MYSELF. Save address where myself shared memory resides in myself_addr, for fork. * pinfo.h (myself_addr): Declare. * shared.cc (memory_init): On fork, use previously saved address for location of mount table. * include/sys/cygwin.h (PID_MYSELF): New value. * dtable.cc (dtable::stdio_init): Don't pass access type to init_std_file_from_handle. It's always the same. (dtable::init_std_file_from_handle): Remove access type argument. Assume read/write. * dtable.h (dtable::init_std_file_from_handle): Ditto for declaration. * exceptions.cc (try_to_debug): Don't try to debug if already being debugged. * fhandler_console.cc (shared_console_info_save): New variable. (fhandler_console::get_tty_stuff): Save address of shared console stuff for fork.
* * include/cygwin/version.h: Bump DLL minor number.Christopher Faylor2002-10-141-3/+1
|