summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin
Commit message (Collapse)AuthorAgeFilesLines
* white spaceChristopher Faylor2003-12-021-14/+14
|
* Change tab to space in Changelog.Thomas Pfaff2003-12-011-1/+1
|
* * thread.cc (pthread_rwlock::add_reader): Remove mx parameter forThomas Pfaff2003-12-013-35/+31
| | | | | | | | | | | List_insert call. (pthread::prepare): Ensure race safeness when adding function pointers to atfork lists by using List_insert. * thread.h (List_insert): Use InterlockedCompareExchangePointer to ensure race safeness without using a mutex. (List_remove): Use InterlockedCompareExchangePointer to ensure race safeness with List_insert. (List::insert): Remove mx parameter for List_insert call.
* * Makefile.in (OBSOLETE_FUNCTIONS): Add fcntl.Corinna Vinschen2003-12-019-35/+130
| | | | | | | | | | | | | | | | | (NEW_FUNCTIONS): Add fcntl64. * cygwin.din: Export fcntl64. Make fcntl being SIGFE. * fcntl.cc (fcntl_worker): New function. (fcntl64): New function. (_fcntl): Call fcntl_worker. Convert 32 bit flock structure into 64 bit flock structure and vice versa. * fhandler.cc (fhandler_base::lock): Change 2nd parameter to struct __flock64 *. * fhandler_disk_file.cc (fhandler_disk_file::lock): Ditto. Rework to be 64 bit aware. * fhandler.h: Accomodate above method argument changes. * include/cygwin/types.h: Add struct __flock32 and __flock64. Define struct flock according to setting of __CYGWIN_USE_BIG_TYPES__. * include/cygwin/version.h: Bump API minor number.
* * cygheap.cc (cygheap_init): Set cygheap->shared_prefix.Corinna Vinschen2003-12-014-5/+14
| | | | | * cygheap.h (struct init_cygheap): Add shared_prefix. * shared.cc (shared_name): Use cygheap->shared_prefix.
* * shared.cc (shared_name): Take into account the SE_CREATE_GLOBAL_NAMECorinna Vinschen2003-12-012-21/+26
| | | | | | | | privilege when building the name string. (open_shared): Remove the call to OpenFileMapping. (shared_info::initialize): Move cygheap initialization to ... (memory_init): ... here. Suppress now useless shared_h variable. (user_shared_initialize): Make tu a cygpsid.
* * include/tzfile.h: Remove duplicate definition of TM_SUNDAY.Corinna Vinschen2003-12-013-2/+7
| | | | | * localtime.cc: Point TZDIR to the /usr/share/zoneinfo directory used by the tzcode package.
* * flock.cc: Renamed from flock.c.Corinna Vinschen2003-11-302-0/+4
|
* * pinfo.h: Remove global_sigs declaration.Christopher Faylor2003-11-301-0/+6
| | | | | * siginfo.h: Move global_sigs declaration here. * Makefile.in: Remove duplicate compiler flag.
* * exceptions.cc (_threadinfo::pop): Zero *contents* of popped stack locationChristopher Faylor2003-11-305-5/+10
| | | | rather than the actual stack pointer.
* * Makefile.in: (DLL_OFILES): Add flock.o.Corinna Vinschen2003-11-296-9/+137
| | | | | | | | | | | | * cygwin.din: Export flock. * flock.c: New file. * include/sys/file.h: Include sys/cdefs.h. Add function prototype for flock(). Add some comments from BSD's header for further clarity. (L_SET, L_CURR, L_INCR, L_XTND): Redefine as the macros SEEK_SET, SEEK_CUR, SEEK_CUR, & SEEK_END respectively. (LOCK_SH,LOCK_EX,LOCK_NB,LOCK_UN): New macros for flock(). * include/cygwin/version.h: Bump API minor number.
* * sigproc.cc (no_signals_available): Fix so that non-zero exit state is a trueChristopher Faylor2003-11-293-7/+11
| | | | | condition rather than errnoneously only checking other states when exist_state was zero.
* * pinfo.h (_pinfo::getthread2signal): Remove obsolete function.Christopher Faylor2003-11-296-22/+22
| | | | | | | | | * cygtls.h (_threadinfo): Define tid more precisely. (_threadinfo::operator HANDLE): Define. * exceptions.cc (_threadinfo::interupt_now): Use _threadinfo HANDLE operator to derive thread handle. (setup_handler): Ditto. * sigproc.cc: Reorganize includes.
* * pinfo.h (_pinfo::getsig): Remove obsolete function, here and throughout.Christopher Faylor2003-11-288-44/+36
| | | | | | | | | * exceptions.cc: Ditto. * fhandler_termios.cc: Ditto. * signal.cc: Ditto. * sigproc.cc: Ditto. * Makefile.in: Revert previous change which made a cygwin.din newer than a version.h a warning rather than an error.
* * cygwin.din: Re-add inexplicably missing semaphore/msg functions.Christopher Faylor2003-11-282-0/+15
|
* * gendevices: Issue error when shilka is missing.Christopher Faylor2003-11-282-1/+9
|
* * include/cygwin/signal.h: New file.Christopher Faylor2003-11-283-0/+235
| | | | (also check in tlsoffsets.h, missed by previous checkin)
* Eliminate use of sigframe and sigthread throughout.Christopher Faylor2003-11-2850-3464/+3309
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Makefile.in (DLL_OFILES): Add sigfe.o. Remove reliance on cygwin.def from cygwin0.dll dependency since dependence on sigfe.o implies that. Generate def file on the fly using 'gendef'. * configure.in: Don't auto-generate cygwin.def. * configure: Regenerate. * cygwin.din: Add SIGFE stuff where appropriate. * dcrt0.cc (dll_crt0_1): Initialize cygwin tls early in process startup. Set _main_tls to address of the main thread's cygwin tls. * debug.h: Remove now unneeded WFSO and WFMO declarations. * exceptions.cc (_last_thread): Define. (set_thread_state_for_signals): New function. (reset_thread_exception_for_signals): Ditto. (init_thread_for_signals): Ditto. (delete_thread_for_signals): Ditto. (capture_thread_for_signals): Ditto. (handle_exceptions): Set return address explicitly for exceptions prior to calling sig_send. (interrupt_on_return): Eliminate. (setup_handler): Add preliminary implementation for dealing with thread-specific signals by querying _main_tls. (signal_exit): Use cygthread::main_thread_id instead of mainthread.id. (call_signal_handler_now): For now, just handle the main thread. * fork.cc (vfork): Save and restore main _my_tls. * gendef: New file. Generates def file and sigfe.s file. * gentls_offsets: New file. Generates offsets for perl to use in sigfe.s. * how-signals-work.txt: Mention that info is obsolete. * init.cc (dll_entry): Initialize cygwin tls storage here. * miscfuncs.cc (low_priority_sleep): Make a C function for easier calling from asm. * perthread.h (vfork_save::tls): New element. * signal.cc (nanosleep): Replace previous use of sigframe.call_signal_handler_now with straight call to call_signal_handler_now. (abort): Ditto. * syscalls.cc (readv): Ditto. * termios.cc (tcsetattr): Ditto. * wait.cc (wait4): Ditto. * sigproc.cc (sig_dispatch_pending): Ditto. (sig_send): Ditto. * sigproc.h: Declare call_signal_handler_now. * thread.cc (pthread::thread_init_wrapper): Initialize cygwin tls. Remove obsolete and unworking signal stuff. * thread.h (verifyable_object::sigs): Eliminate. (verifyable_object::sigmask): Eliminate. (verifyable_object::sigtodo): Eliminate. (verifyable_object::exit): Make attribute noreturn. (verifyable_object::thread_init_wrapper): Ditto. (pthread_null::exit): Ditto. * winbase.h (__stackbase): Always define. * winsup.h (low_priority_sleep): Declare as a "C" function. * include/cygwin/version.h: Bump API version to reflect sigwait export. * include/sys/queue.h: Protect SLIST_ENTRY from previous declaration. * signal.cc (sigwait): Implement. * select.cc (fhandler_base::ready_for_read): Add debugging output. * devices.h: Define more device pointers via their storage. * devices.in: Don't parse things like /dev/inet/tcp, as they really have no meaning. * devices.cc: Regenerate. * gendevices: Set proper protection for output file. * cygtls.h: New file. * gendef: New file. * gentls_offsets: New file. * tlsoffsets.h: New file. Autogenerated. * config/i386/longjmp.c: Remove. File subsumed by gendef output. * config/i386/makefrag: Remove obsolete file. * fhandler.cc: Remove spurious access_worker declaration. * spawn.cc (spawnve): Make debugging output more accurate. * cygwin-gperf: Remove. * devices.cc: Remove.
* * speclib: Use correct EOF marker. Ensure that directory is actually deletedChristopher Faylor2003-11-281-2/+2
| | | | when running under Windows.
* * speclib: Use correct EOF marker. Ensure that directory is actually deletedChristopher Faylor2003-11-281-0/+5
| | | | when running under Windows.
* * fhandler_disk_file.cc (fhandler_disk_file::readdir): Reorganize to avoidChristopher Faylor2003-11-272-8/+14
| | | | inappropriate .lnk extensions with munged filenames under managed mode.
* * sec_helper.cc (set_process_privilege): Rename restore_priv toCorinna Vinschen2003-11-262-8/+18
| | | | | | | priv_luid. * sec_helper.cc (set_process_privilege): Call LookupPrivilegeValue before opening the token.
* * dir.cc (mkdir): Use local security_descriptor. CallCorinna Vinschen2003-11-2611-116/+200
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | set_security_attribute appropriately. * external.cc (cygwin_internal): Ditto. * fhandler.cc (fhandler_base::open): Ditto. * fhandler_socket.cc (fhandler_socket::bind): Ditto. * path.cc (symlink_worker): Ditto. * sec_acl.cc (setacl): Ditto. Call read_sd appropriately. (getace): Ditto. * sec_helper.cc (security_descriptor::malloc): New method. (security_descriptor::realloc): New method. (security_descriptor::free): New method. * security.cc (read_sd): Get security_descriptor as parameter instead of PSECURITY_DESCRIPTOR and a size. Drop unnecessary parameter check. Allocate the security_descriptor buffer according to size returned by a call to GetFileSecurity. Return buffer size on success. (write_sd): Get security_descriptor as parameter instead of PSECURITY_DESCRIPTOR and a size. (get_nt_attribute): Use local security_descriptor. (get_nt_object_attribute): Ditto in case of type == SE_REGISTRY_KEY. Allocate security_descriptor buffer according to size returned by a call to RegGetKeySecurity. (alloc_sd): Make static. Get security_descriptor as parameter instead of PSECURITY_DESCRIPTOR and a size. Drop unnecessary parameter check. (set_security_attribute): Get security_descriptor as parameter instead of PSECURITY_DESCRIPTOR and a size. (set_nt_attribute): Use local security_descriptor. (check_file_access): Ditto. * security.h: Add class security_descriptor. (read_sd): Change declaration to get security_descriptor as parameter instead of PSECURITY_DESCRIPTOR and a size. (write_sd): Ditto. (set_security_attribute): Ditto. (alloc_sd): Remove declaration. * thread.cc (semaphore::semaphore): Use local security_descriptor. Call set_security_attribute appropriately.
* * sec_acl.h (getace): Use FILE_*_BITS as permission mask.Corinna Vinschen2003-11-264-12/+24
| | | | | | | * security.cc (get_attribute_from_acl): Ditto. * security.h (FILE_READ_BITS): Define to match also GENERIC bits. (FILE_WRITE_BITS): Ditto. (FILE_EXEC_BITS): Ditto.
* more white spaceChristopher Faylor2003-11-251-5/+5
|
* more white spaceChristopher Faylor2003-11-251-2/+3
|
* more white spaceChristopher Faylor2003-11-251-4/+3
|
* more white spaceChristopher Faylor2003-11-251-1/+1
|
* * thread.cc: Minor whitespace cleanup. Remove some obsolete code.Christopher Faylor2003-11-252-17/+7
|
* * dtable.cc (build_fh_name): Set error in dummy fhandler when one is notedChristopher Faylor2003-11-253-1/+10
| | | | | during path_conv. * fhandler.h (fhandler_base::set_error): New method.
* * configure.in: Avoid using cygserver unless hosting on cygwin.Christopher Faylor2003-11-243-47/+53
|
* white spaceChristopher Faylor2003-11-231-1/+1
|
* * sigproc.cc (sig_send): Correct below checkin. UseChristopher Faylor2003-11-232-1/+6
| | | | thisframe.call_signal_handler.
* * sigproc.cc (proc_exists): A zombie process does not exist.Christopher Faylor2003-11-232-7/+22
| | | | | | (sig_send): Improve debugging output. Wait for pipe to be created before trying to send to it. Call call_signal_handler_now if sending a signal to myself.
* * dcrt0.cc (check_sanity_and_sync): Correct api major version check so thatChristopher Faylor2003-11-222-2/+7
| | | | newer dlls will work with older apps but not vice versa.
* * sem.cc: Always include signal.h to handle SIGSYS raise when !USE_SERVER.Christopher Faylor2003-11-213-1/+10
| | | | | * shm.cc: Ditto. * msg.cc: Always include signal.h to handle SIGSYS raise when !USE_SERVER.
* * msg.cc: Always include signal.h to handle SIGSYS raise when !USE_SERVER.Christopher Faylor2003-11-212-0/+5
|
* * configure.in: Make --use-server the default. Remove powerpc target.Christopher Faylor2003-11-203-19/+18
| | | | * configure: Regenerate.
* * msg.cc (msgctl): Raise SIGSYS if call not available.Corinna Vinschen2003-11-204-0/+47
| | | | | | | | | | | | | (msgget): Ditto. (msgrcv): Ditto. (msgsnd): Ditto. * sem.cc (semctl): Ditto. (semget): Ditto. (semop): Ditto. * shm.cc (shmat): Ditto. (shmctl): Ditto. (shmget): Ditto. (shmdt): Ditto.
* * cygserver.h (client_request::request_code_t): AddCorinna Vinschen2003-11-1924-904/+1799
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CYGSERVER_REQUEST_MSG and CYGSERVER_REQUEST_SEM. (admininstrator_group_sid): Add extern declaration. * cygserver_ipc.h: Rewrite. * cygserver_msg.h: New file. * cygserver_sem.h: New file. * cygserver_shm.h: More or less rewrite. * cygwin.din: Add msgctl, msgget, msgrcv, msgsnd, semctl, semget and semop. * msg.cc: Rewrite. * safe_memory.h: Remove. * sem.cc: Rewrite. * shm.cc: Rewrite. * include/cygwin/ipc.h: Use appropriate guard. (struct ipc_perm): Add seq. (IPCID_TO_IX): New define from BSD. (IPCID_TO_SEQ): Ditto. (IXSEQ_TO_IPCID): Ditto. (IPC_R): Ditto. (IPC_W): Ditto. (IPC_M): Ditto. * include/cygwin/msg.h: Use appropriate guard. #ifdef _KERNEL all stuff not explicitely defined by SUSv3. Use signed types in structs to match types used in BSD. (msgqnum_t): Define unsigned. (msglen_t): Ditto. (struct msqid_ds): Add msg_first and msg_last. (struct msginfo): Remove msgpool. Add msgssz and msgseg. * include/cygwin/sem.h: Use appropriate guard. #ifdef _KERNEL all stuff not explicitely defined by SUSv3. Use signed types in structs to match types used in BSD. (SEM_UNDO): Define appropriately. (struct semid_ds): Add sem_base. (struct seminfo): Add semmap and semusz. (SEM_A): New define from BSD. (SEM_R): Ditto. (SEM_ALLOC): Ditto. (union semun): Define. * include/cygwin/shm.h: Use appropriate guard. #ifdef _KERNEL all stuff not explicitely defined by SUSv3. Use signed types in structs to match types used in BSD. (SHMLBA): Define using cygwin_internal(CW_GET_SHMLBA) call. (struct shmid_ds): Add shm_internal. (struct shm_info): Rename shm_ids to used_ids as in BSD. Add define for shm_ids. * include/cygwin/sysproto.h: New file. * include/cygwin/version.h: Bump API minor number. * include/sys/ipc.h: New file. * include/sys/msg.h: New file. * include/sys/queue.h: New file from BSD. * include/sys/sem.h: New file. * include/sys/shm.h: New file. * include/sys/sysproto.h: New file.
* * dtable.cc (build_fh_pc): Resurrect accidentally removedCorinna Vinschen2003-11-192-0/+8
| | | | DEV_CYGDRIVE_MAJOR case.
* * fhandler.cc (fhandler_base::lseek): Include high order offsetCorinna Vinschen2003-11-172-0/+8
| | | | bits in return value.
* * bsdlib.cc (getprogname): New function.Corinna Vinschen2003-11-174-1/+33
| | | | | | (setprogname): New funtion. * cygwin.din: Export getprogname and setprogname. * include/cygwin/version.h: Bumb API version number.
* * include/limits.h: Revert unsanctioned changes below.Christopher Faylor2003-11-154-4/+10
| | | | | * include/cygwin/config.h: Ditto. * include/sys/param.h: Ditto.
* 2003-11-11 Robert Collins <rbtcollins@hotmail.com>Robert Collins2003-11-1441-151/+204
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* * dtable.cc (build_fh_pc): Use DEV_SERIAL_MAJOR to catch all serial ports.Christopher Faylor2003-11-142-9/+9
| | | | Remove redundant FH_CYGDRIVE case since it is handled by DEV_CYGDRIVE_MAJOR.
* * thread.cc (pthread::exit): Cleanup on thread exit.Thomas Pfaff2003-11-112-0/+10
| | | | | (__reent_t::init_clib): Set thread local clib __cleanup var appropriately.
* * miscfuncs.cc (low_priority_sleep): Make a "C" function.Christopher Faylor2003-11-103-2/+7
| | | | * winsup.h (low_priority_sleep): Revert previous change to declaration.
* * winsup.h (low_priority_sleep): Fix declaration to avoid linkerCorinna Vinschen2003-11-102-1/+6
| | | | warning.
* * thread.cc (__reent_t::init_clib): Set thread local clibThomas Pfaff2003-11-102-0/+6
| | | | __sdidinit var appropriately.