summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/include
Commit message (Collapse)AuthorAgeFilesLines
* * include/cygwin/version.h: Bump DLL minor version number to 22.Christopher Faylor2006-07-241-1/+1
|
* * include/cygwin/types.h: Update copyright.Christopher Faylor2006-07-141-1/+1
|
* * fhandler_socket.cc: Update copyright.Corinna Vinschen2006-07-131-1/+1
| | | | * include/pthread.h: Ditto.
* * include/pthread.h: Define PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT andCorinna Vinschen2006-07-121-3/+5
| | | | PTHREAD_PRIO_PROTECT only if _POSIX_THREAD_PRIO_INHERIT is defined.
* * fhandler.h (class dev_console): Add `metabit' indicating theCorinna Vinschen2006-07-032-0/+40
| | | | | | | | | | | | | current meta key mode. * fhandler_console.cc (fhandler_console::read): Set the top bit of the character if metabit is true. * fhandler_console.cc (fhandler_console::ioctl): Implement KDGKBMETA and KDSKBMETA commands. * fhandler_tty.cc (process_ioctl): Support KDSKBMETA. (fhandler_tty_slave::ioctl): Send KDGKBMETA and KDSKBMETA to the master. * include/cygwin/kd.h: New file for the meta key mode. * include/sys/kd.h: New file.
* * include/stdint.h (UINT8_C, UINT16_C): Unsigned types smallerCorinna Vinschen2006-07-031-3/+3
| | | | than int promote to signed int.
* * net.cc (cygwin_sendto): Define appropriate parameters usingCorinna Vinschen2006-07-032-14/+19
| | | | | | | | | | | | | | | | socklen_t type according to SUSv3. (cygwin_recvfrom): Ditto. (cygwin_setsockopt): Ditto. (cygwin_getsockopt): Ditto. (cygwin_connect): Ditto. (cygwin_accept): Ditto. (cygwin_bind): Ditto. (cygwin_getsockname): Ditto. (cygwin_getpeername): Ditto. (cygwin_recv): Ditto. (cygwin_send): Ditto. * include/cygwin/socket.h (socklen_t): Typedef and define. * include/sys/socket.h: Declare socket functions using socklen_t type.
* * include/cygwin/version.h: Bump DLL minor version number to 21.Christopher Faylor2006-07-021-1/+1
|
* * cygwin.din: Export __srget_r, __swbuf_r.Corinna Vinschen2006-06-151-1/+2
| | | | * include/cygwin/version.h: Bump API minor number to 156.
* * include/sys/wait.h: Move definition of wait constants from here...Corinna Vinschen2006-06-123-22/+40
| | | | | * include/cygwin/wait.h: ...to here. New file. * include/cygwin/stdlib.h: Include cygwin/wait.h to conform with SUSv3.
* white spaceChristopher Faylor2006-05-282-7/+7
|
* * cygtls.cc (_cygtls::call): Call call2 using _my_tls.Christopher Faylor2006-05-251-1/+2
| | | | | | | | | | | | (_cygtls::init_exception_handler): Always replace existing exception handler with cygwin exception handler. * cygtls.h (_cygtls::call2): Remove static designation. * dcrto.cc (dll_crt0_1): Define in a way that allows calling via _cygtls::call. (_initialize_main_tls): Delete. (_dll_crt0): Call dll_crt0_1 via cygtls::call. Set _main_tls here. * external.cc (cygwin_internal): Implement CW_CYGTLS_PADSIZE. * include/sys/cygwin.h (CW_CYGTLS_PADSIZE): Define. * tlsoffsets.h: Regenerate.
* * include/asm/byteorder.h (__ntohl): Fix the missing uint32_t.Corinna Vinschen2006-04-211-1/+1
|
* * include/asm/byteorder.h: Include stdint.h. Per standard, changeCorinna Vinschen2006-04-211-26/+19
| | | | datatypes in ntohX and htonX functions to uintXX_t types.
* * sigproc.cc (sigalloc): Don't set SA_RESTART here.Christopher Faylor2006-03-231-0/+4
| | | | | | | | | | | * signal.cc (_SA_NORESTART): New flag. (sigaction_worker): New function, derived from sigaction. Don't set internal flags unless called internally. (sigaction): Use sigaction_worker. (signal): Honor new _SA_NORESTART flag. (siginterrupt): Set _SA_NORESTART flag appropriately. Use sigaction_worker to set flags. * include/cygwin/signal.h: Define _SA_INTERNAL_MASK here.
* * include/sys/dirent.h (struct __DIR): Rename __d_unused toCorinna Vinschen2006-03-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | __d_internal. * fhandler_disk_file.cc (struct __DIR_cache): Remove useless "typedef". (d_dirname): Remove useless "struct". (d_cachepos): Ditto. (d_cache): Ditto. (class __DIR_mounts): New class, implementing mount point tracking for readdir. (d_mounts): New macro for easy access to __DIR_mounts structure. (fhandler_disk_file::opendir): Allocate __DIR_mounts structure and let __d_internal element of dir point to it. (fhandler_disk_file::readdir_helper): Add mount points in the current directory, which don't have a real directory backing them. Don't generate an inode number for /dev. Add comment, why. (fhandler_disk_file::readdir): Move filling fname to an earlier point. Check if current entry is a mount point and evaluate correct inode number for it. (fhandler_disk_file::readdir_9x): Ditto. (fhandler_disk_file::rewinddir): Set all mount points in this directory to "not found" so that they are listed again after calling rewinddir(). (fhandler_disk_file::closedir): Deallocate __DIR_mounts structure. * path.cc (mount_info::get_mounts_here): New method to evaluate a list of mount points in a given parent directory. * shared_info.h (class mount_info): Declare get_mounts_here.
* * cygwin.din: Export __isinff, __isinfd, __isnanf, __isnand.Corinna Vinschen2006-02-281-1/+2
| | | | * include/cygwin/version.h: Bump API minor number to 155.
* * include/sys/termios.h (cfsetispeed): Just define as a function rather thanChristopher Faylor2006-02-281-21/+23
| | | | | resorting to a macro. (cfsetospeed): Ditto.
* * cygwin.din: Export sigignore and sigset.Corinna Vinschen2006-02-162-1/+7
| | | | | | | | | * exceptions.cc (sigset): New function. (sigignore): New function. * include/cygwin/signal.h (SIG_HOLD): Define. (sigignore): Declare. (sigset): Declare. * include/cygwin/version.h: Bump API minor number to 154.
* * include/mntent.h: Add missing #include.Christopher Faylor2006-02-131-1/+2
|
* * external.cc (sync_winenv): Rename from "setup_winenv". Use same mechanism asChristopher Faylor2006-02-101-1/+1
| | | | | | | spawn to determine environment variables which should be converted back to windows form. (cygwin_internal): Reflect setup_winenv -> sync_winenv name change. * include/sys/cygwin.h: Ditto.
* Always zero all elements of siginfo_t throughout.Christopher Faylor2006-02-061-8/+41
| | | | | | | | | | | | | | | | | | | | | | | | | * cygtls.h (_cygtls::thread_context): Declare new field. (_cygtls::thread_id): Ditto. (_cygtls::signal_exit): Move into this class. (_cygtls::copy_context): Declare new function. (_cygtls::signal_debugger): Ditto. * cygtls.cc (_cygtls::init_thread): Fill out thread id field. * exceptions.cc (exception): Change message when exception info is unknown. Copy context to thread local storage. (_cygtls::handle_exceptions): Avoid double test for fault_guarded. Reflect move of signal_exit to _cygtls class. (sigpacket::process): Copy context to thread local storage. (_cygtls::signal_exit): Move to _cygtls class. Call signal_debugger to notify debugger of exiting signal (WIP). Call stackdump here (WIP). (_cygtls::copy_context): Define new function. (_cygtls::signal_debugger): Ditto. * tlsoffsets.h: Regenerate. * include/cygwin.h (_fpstate): New internal structure. (ucontext): Declare new structure (WIP). (__COPY_CONTEXT_SIZE): New define. * exceptions.cc (_cygtls::interrupt_setup): Clear "threadkill" field when there is no sigwaiting thread. (setup_handler): Move event handling into interrupt_setup.
* * include/cygwin/socket.h (CMSG_FIRSTHDR): Avoid compiler warning.Corinna Vinschen2006-02-061-1/+1
|
* * include/features.h: Add comment to explain what's going to happenCorinna Vinschen2006-02-052-0/+20
| | | | | | here at one point. * include/sys/stdio.h: Guard getline and getdelim prototypes with _GNU_SOURCE to avoid collision with old-style declarations.
* * cygwin/version.h: Mention CW_SETUP_WINENV in comment for API minor 153.Christopher Faylor2006-02-021-1/+1
|
* * cygwin.din (updwtmpx): Export.Corinna Vinschen2006-02-022-1/+3
| | | | | | * syscalls.cc (updwtmpx): New function. * include/utmpx.h (updwtmpx): Declare. * include/cygwin/version.h: Bump API minor number to 153.
* * external.cc (setup_winenv): New function.Christopher Faylor2006-02-021-1/+2
| | | | | (cygwin_internal): Implement CW_SETUP_WINENV. * sys/cygwin.h (cygwin_getinfo_types): Define CW_SETUP_WINENV.
* * dir.cc (readdir_worker): Add comment about writing old 32 bit d_ino.Corinna Vinschen2006-01-311-8/+6
| | | | | * include/cygwin/version.h: Bump API minor number to 152. (CYGWIN_VERSION_CHECK_FOR_NEEDS_D_INO): Remove.
* * include/sys/dirent.h (struct dirent): Revert misguided attempt toCorinna Vinschen2006-01-281-1/+1
| | | | rename __d_unused1 to __d_fd.
* * autoload.cc (NtQueryDirectoryFile): Define.Corinna Vinschen2006-01-271-12/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * dir.cc (__opendir_with_d_ino): Just call opendir. (opendir): Remove CYGWIN_VERSION_CHECK_FOR_NEEDS_D_INO handling. (readdir_worker): Only try generating d_ino if it's 0. Utilize namehash of directories fhandler. Call readdir_get_ino to generate d_ino for "..". (seekdir64): Keep dirent_set_d_ino flag. * fhandler.h (enum dirent_states): Add dirent_get_d_ino. (class fhandler_disk_file): Declare new private methods readdir_helper and readdir_9x. * fhandler_disk_file.cc (path_conv::hasgood_inode): New method to evaluate if a filesystem has reliable inode numbers. (fhandler_base::fstat_by_handle): Accomodate structure member name change from IndexNumber to FileId. (fhandler_base::fstat_helper): Call hasgood_inode here. (fhandler_disk_file::opendir): Call fhaccess only for real files. Don't append '*' to __d_dirname here, move to readdir_9x. On NT, open directory handle here. Set dirent_get_d_ino and dirent_set_d_ino flags according to wincap and filesystem. (fhandler_disk_file::readdir_helper): New method to implement readdir postprocessing only once. (readdir_get_ino_by_handle): New static function. (readdir_get_ino): New function to centralize inode number evaluation in case inode number hasn't been returned by NtQueryDirectoryFile. (fhandler_disk_file::readdir): Move old functionality to readdir_9x. Call readdir_9x when on 9x/Me. Implement NT specific readdir here. (fhandler_disk_file::readdir_9x): Move 9x specific readdir here. (fhandler_disk_file::seekdir): Accomodate new NT readdir method. (fhandler_disk_file::closedir): Ditto. (fhandler_cygdrive::fstat): Set d_ino to namehash. Add comment. (fhandler_cygdrive::opendir): Call get_namehash to prepare later correct evaluation of d_ino. (fhandler_cygdrive::readdir): Replace recursion with loop. Evaluate drive's d_ino by calling readdir_get_ino. * fhandler_proc.cc (fhandler_proc::readdir): Set dirent_saw_dot and dirent_saw_dot_dot to avoid seeing . and .. entries twice. * fhandler_process.cc (fhandler_process::readdir): Ditto. * fhandler_registry.cc (fhandler_registry::readdir): Ditto. * ntdll.h (STATUS_INVALID_PARAMETER): New define. (STATUS_INVALID_LEVEL): New define. (struct _FILE_INTERNAL_INFORMATION): Rename member IndexNumber to FileId (as in Nebbitt). * path.h (path_conv::hasgood_inode): Now implemented in fhandler_disk_file.cc. * wincap.h (wincaps::has_fileid_dirinfo): New element. * wincap.cc: Implement above element throughout. * winsup.h (readdir_get_ino): Add declaration. * include/sys/dirent.h (struct dirent): Slightly rename structure members to accomodate changes. Remove __USE_EXPENSIVE_CYGWIN_D_INO handling and declaration of __opendir_with_d_ino.
* * include/cygwin/version.h: Bump API minor number to 151.Christopher Faylor2006-01-212-19/+16
| | | | | | | | | | | | | | | * dir.cc (__opendir_with_d_ino): New function. (opendir): Set flag if we should be calculating inodes. (readdir_worker): Calculate d_ino by calling stat if the user has asked for it. (seekdir64): Maintain all persistent flag settings. * fhandler.h (dirent_states): Add dirent_set_d_ino. * fhandler_disk_file.cc (fhandler_disk_file::opendir): Reflect changes to dirent structure. * fhandler_virtual.cc (fhandler_virtual::opendir): Ditto. * include/sys/dirent.h (struct dirent): Coalesce two similar structures. Remove all threads of the apparently highly confusing references to inodes. Add support for calculating a real inode if __USE_EXPENSIVE_CYGWIN_D_INO is defined.
* * include/sys/dirent.h: Add comments for people who are REALLY confused aboutChristopher Faylor2006-01-201-13/+13
| | | | whether they should be using something called __invalid_d_ino or not.
* * dir.cc (readdir_worker): Fill in invalid fields with -1. Accommodate nameChristopher Faylor2006-01-191-2/+4
| | | | | | change from __ino32 to __invalid_ino32. * include/sys/dirent.h (__invalid_ino32): Rename from __ino32. Don't define unused d_type macros.
* * include/cygwin/socket.h (struct sockaddr_storage): Fix typo inCorinna Vinschen2006-01-181-1/+1
| | | | ss_family member name.
* * include/cygwin/version.h: Bump DLL minor version number to 20.Christopher Faylor2006-01-171-1/+1
|
* * Update copyrights.Corinna Vinschen2006-01-121-1/+2
|
* * include/getopt.h (getopt_long_only): Declare.Corinna Vinschen2006-01-091-0/+2
|
* * cygwin.din: Export getsubopt.Corinna Vinschen2006-01-091-1/+2
| | | | * include/cygwin/version.h: Bump API minor version.
* * include/getopt.h: Accommodate recent unfortunate newlib changes.Christopher Faylor2006-01-051-0/+4
|
* Bump copyright dates.Corinna Vinschen2006-01-021-1/+1
|
* * exceptions.cc (_cygtls::interrupt_setup): Implement SA_RESETHAND.Christopher Faylor2006-01-011-0/+2
| | | | | * include/cygwin/signal.h: Define SA_ONESHOT and SA_NOMASK. * dcrt0.cc (get_cygwin_startup_info): Remove commented out code.
* * include/cygwin/in.h: Drop including stdint.h. Move definitionCorinna Vinschen2005-12-313-18/+39
| | | | | | | | | | | of in_port_t and in_addr_t to top of file and use throughout. Use sa_family_t type where appropriate. (struct in6_addr): Change `unsigned char' to `uint8_t'. (struct sockaddr_in6): Add sin6_scope_id member. Add comments. * include/cygwin/socket.h: Include stdint.h. Move definition of socklen_t to top of file. Define sa_family_t. Define struct sockaddr_storage as per SUSv3. * include/sys/un.h: Include cygwin/socket.h. Use sa_family_t type.
* *** cygwin DLL Changes:Christopher Faylor2005-12-291-17/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * child_info.h (CURR_CHILD_INFO_MAGIC): Reset. (child_info::dwProcessId): Delete. (child_info::straced): New variable. (child_info::handle_fork): New member function. * dcrt0.cc (in_forkee): New global variable. (__cygwin_user_data::forkee): Mark as obsolete. (do_global_ctors): Use in_forkee rather than user_data->forkee. (get_cygwin_startup_info): Ditto. Deal with new straced field to allow strace to deal with children of attached processes. (initial_env): Accommodate changes to strace::hello. (child_info_fork::handle_fork): Rename from plain old 'handle_fork'. Move alloc_stack() call elsewhere. (dll_crt0_0): Fill out more of user_data. Reference handle_fork via fork_info. Add some debugging output. (_dll_crt0): Don't wait for sync thread if sync_startup is invalid. Zero sync_startup here. Call alloc_stack() here, if appropriate. (dll_crt0_1): Use in_forkee rather than user_data->forkee. (dll_crt0): Ditto. * malloc_wrapper.cc (malloc_init): Ditto. * dll_init.cc (in_forkee): Remove local static version of this variable. (dll_list::load_after_fork): Don't set in_forkee here. * external.cc (cygwin_internal): Use strace method rather than accessing field directly. * fhandler.cc (fhandler_base::read): Ditto. * fhandler_tty.cc (fhandler_tty_common::__acquire_output_mutex): Ditto. * fork.cc (frok::parent): Invoke strace write_childpid to communicate with potential strace. (child_copy): Add more detail to debugging output. * init.cc (calibration_id): New static variable. (prime_threads): Set sync_startup to invalid handle if we already know about thread_func_ix. Use static calibration_id to hold calibration thread id. * munge_threadfunc (munge_threadfunc): Don't try to debug if we don't find threadfunc_ix. (dll_entry): Avoid calling munge_threadfunc and _cygtls::remove on non-cygwin threads invoked during process startup. * pinfo.cc (set_myself): Always call strace.hello here regardless of DEBUGGING. * sigproc.cc (child_info::child_info): Remove spurious handling of dwProcessId. Set straced as appropriate. * spawn.cc (spawn_guts): Rename ciresrv to ch. Invoke strace write_childpid to communicate with potential strace. * strace.cc: Include child_info.h. (strace::hello): Remove inited test. Use active() method to test if strace has been activated. Handle case where we are started before (mypid): New function. (strace::vsprntf): Try to deal more intelligently with case where progname may not be filled out. Put pid in parentheses if it is a windows pid rather than a cygwin pid. myself has been filled out. (strace::write_childpid): New function for notifying strace about the creation of children. (strace::vprntf): Use strace method rather than accessing field directly. (strace_printf): Ditto. (strace::wm): Ditto. * winsup.h (in_forkee): Declare. * include/sys/strace.h (strace::write_childpid): Declare new function. (strace::attached): Define new function. (strace::active): Ditto. (strace::active_val): Ditto. (_STRACE_ON): Delete. (_STRACE_OFF): Ditto. (define_strace0): Use strace method rather than accessing field directly. (strace_printf_wrap): Ditto. (strace_printf_wrap1): Ditto. *** cygwin utils changes: * strace.cc (nprocesses): Make static global. (quiet): New variable. (strace_active): Ditto. (add_child): Increment nprocesses here. Don't add a child if it is already added (windows bug?). Report on child if not quiet. (get_child): Just return NULL if child not found. (remove_child): Report on child if not quiet. (attach_process): Don't complain if given a windows process. Use windows pid in error. (handle_output_debug_string): Issue error if trying to manipulate a process that we don't know about. Handle _STRACE_CHILD_PID - attach to reported child when we get this. (proc_child): Move nprocesses to file scope. Report on exceptions. (longopts): Implement "--quiet". (opts): Implement "-q". (main): Manipulate quiet flag. * utils.sgml (strace): Add words describing '-q'.
* * fhandler.h (fhandler_base::issymlink): New method.Corinna Vinschen2005-12-222-1/+4
| | | | | | | * syscalls.cc (open): Handle O_NOFOLLOW flag. * include/fcntl.h (_FNOFOLLOW): New define. (O_NOFOLLOW): Ditto. * include/cygwin/version.h: Bump API minor number.
* * include/sys/dirent.h: Change __deprecated_d_ino to __invalid_d_ino throughoutChristopher Faylor2005-12-191-3/+3
| | | | | to make things a little clearer. * dir.cc (readdir_worker): Reflect above change.
* * fhandler.cc (fhandler_base::open_9x): Handle O_SYNC and O_DIRECTCorinna Vinschen2005-12-142-2/+10
| | | | | | | | | | | | | | | | flags. (fhandler_base::open): Ditto. * fhandler_floppy.cc (fhandler_dev_floppy::open): Don't allocate devbuf in O_DIRECT case. * fhandler_raw.cc (fhandler_dev_raw::ioctl): Don't allow buffer changes in O_DIRECT case. Allow returning a buffer size 0, which indicates O_DIRECT. * fhandler_tape.cc (fhandler_dev_tape::open): Use O_SYNC flag to hand down the !buffer_writes case. Don't allocate devbuf in O_DIRECT case. (fhandler_dev_tape::raw_read): Don't mess with devbuf if it's NULL. * include/fcntl.h: Define _FDIRECT, O_DIRECT, O_DSYNC and O_RSYNC. * include/cygwin/version.h: Bump API minor version.
* * dirent.h: Change the rest of the d_ino's to __deprecated_d_ino.Christopher Faylor2005-12-101-4/+4
|
* * include/cygwin/stdlib.h: Guard compilation of *unsetenv* in newlib.Christopher Faylor2005-12-071-0/+5
|
* * include/cygwin/stdlib.h: New file.Christopher Faylor2005-12-052-1/+63
| | | | | * environ.cc (unsetenv): Change to return -1 on input error. * include/cygwin/version.h: Add more description to latest api bump.
* * dir.cc (readdir_workdir): Only fill out d_ino when linked into older app.Christopher Faylor2005-12-052-19/+15
| | | | | | | * include/cygwin/version.h: Bump api minor number to 147, reflecting obsolescence of d_ino. (CYGWIN_VERSION_USER_API_VERSION_COMBINED): New convenience macro. (CYGWIN_VERSION_CHECK_FOR_NEEDS_D_INO): New convenience macro.