summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin
Commit message (Collapse)AuthorAgeFilesLines
* * cygwin.din (ualarm): New export.Christopher Faylor2001-11-289-60/+183
| | | | | | | | | | | | * dcrt0.cc (_dll_crt0): Add experimental tls storage declaration. (dll_crt0): Ditto. * debug.cc (thread_stub): Ditto. * thread.cc: Minor cleanup. (__pthread_create): Add experimental tls storage declaration. * miscfuncs.cc: Define tls index. * winsup.h: Declare experimental tls storage. * window.cc (alarm): Use old timer return from setitimer. (ualarm): New function.
* Revert erroneous checkin.Christopher Faylor2001-11-261-5/+0
|
* * Makefile.in (libcygwin.a): Use ar commands to build libcygwin.a since addingChristopher Faylor2001-11-263-1/+11
| | | | an archive doesn't work the way we want it to.
* Add missing ChangeLog entries.Corinna Vinschen2001-11-251-0/+16
|
* * fhandler_disk_file.cc (fhandler_cygdrive::readdir): Avoid reportingChristopher Faylor2001-11-253-1/+11
| | | | inaccessible drives.
* * net.cc (cygwin_hstrerror): Allow s == NULL.Corinna Vinschen2001-11-241-1/+13
| | | | | (cygwin_rcmd): Add parameter checking. (cygwin_rexec): Ditto.
* * net.cc (cygwin_inet_ntoa): Add parameter checking.Corinna Vinschen2001-11-242-1/+12
| | | | | | | | | (cygwin_inet_network): Return INADDR_NONE instead of 0 in case of EFAULT. (cygwin_hstrerror): Add parameter checking. (cygwin_rresvport): Ditto. (socketpair): Ditto. * winsup.h (check_null_str): Add extern declaration.
* * path.cc (path_conv::check): Tighten FH_CYGDRIVE check to avoid matchingChristopher Faylor2001-11-242-11/+13
| | | | trailing component, like other devices.
* * autoload.cc (IsDebuggerPresent): Make conditional load since it is notChristopher Faylor2001-11-243-5/+14
| | | | | | available everywhere. * path.cc (mount_info::conv_to_win32_path): Only consider /cygdrive to be FH_CYGDRIVE, not /cygdrive/x.
* * net.cc (inet_makeaddr): Revert previous change.Christopher Faylor2001-11-242-1/+5
|
* * path.cc (chdir): Allow 'cd /cygdrive'.Christopher Faylor2001-11-242-6/+17
|
* fix typo.Christopher Faylor2001-11-241-1/+1
|
* * dtable.cc (dtable::vfork_parent_restore): Add debugging statement.Christopher Faylor2001-11-2412-146/+297
| | | | | | | | | | | | | | | | | | | | | | | | | | | * exceptions.cc (try_to_debug): Spin only as long as we don't have a debugger attached. * fhandler.h (fhandler_base::set_nohandle): New method. (fhandler_base::get_nohandle): New method. * fhandler.cc (fhandler_base::dup): Avoid duplicating handle if there is no handle. * fhandler_disk_file.cc (fhandler_disk_file::opendir): Set nohandle flag on dummy fd. * Makefile.in: Make intermediate library for eventual inclusion in libcygwin.a * fhandler.h (fhandler_pipe::fhandler_pipe): Remove default argument setting since it is no longer used. * miscfuncs.cc (check_null_str): New function. (+check_null_str_errno): Ditto. * net.cc: Add defensive buffer checking throughout. (cygwin_sendto): Protect against invalid fd. (cygwin_recvfrom): Ditto. (cygwin_getpeername): Ditto. (cygwin_recv): Ditto. (cygwin_send): Ditto. * winsup.h: Declare a new function. * select.cc (set_bits): Fix conditional for setting fd in exceptfds. * dtable.cc (dtable::build_fhandler): Create fhandler_pipe using correct device type. * path.cc (get_devn): Set correct pipe device type from device name.
* * path.cc (conv_path_list): Fix wild indexing into path due to conflictingChristopher Faylor2001-11-228-50/+239
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | methods for setting src pointer. * dir.cc (opendir): Only pass path_conv argument to opendir, since name is already part of the fhandler. * dtable.cc (dtable::build_fhandler): Accomodate new FH_CYGDRIVE type. * fhandler.cc (fhandler_base::opendir): Nuke name argument. * fhandler.h: Add FH_CYGDRIVE to "device" enum. (fhandler_base::opendir): Nuke name argument. (fhandler_disk_file::opendir): Ditto. (fhandler_disk_file::fhandler_disk_file): Declare new method which passes devtype through. (fhandler_cygdrive): Add elements for tracking drives. (fhandler_cygdrive::set_drives): Declare new method. (fhandler_cygdrive::iscygdrive_root): Declare new method. (fhandler_cygdrive::opendir): Declare new method. (fhandler_cygdrive::readdir): Declare new method. (fhandler_cygdrive::telldir): Declare new method. (fhandler_cygdrive::seekdir): Declare new method. (fhandler_cygdrive::rewinddir): Declare new method. (fhandler_cygdrive::closedir): Declare new method. (fhandler_cygdrive::fstat): Declare new method. * fhandler_disk_file.cc (fhandler_disk_file::fhandler_disk_file): Define new method which passes devtype through. (fhandler_disk_file::open): Tweak debug output. (fhandler_disk_file::opendir): Nuke first argument. Use info from path_conv and class rather than calling fstat. (fhandler_cygdrive::set_drives): New method. (fhandler_cygdrive::iscygdrive_root): New method. (fhandler_cygdrive::opendir): New method. (fhandler_cygdrive::readdir): New method. (fhandler_cygdrive::telldir): New method. (fhandler_cygdrive::seekdir): New method. (fhandler_cygdrive::rewinddir): New method. (fhandler_cygdrive::closedir): New method. (fhandler_cygdrive::fstat): New method. * path.cc (iscygdrive_device): Assume cygdriveness is already verified. (path_conv::check): Treat FH_CYGDRIVE "method" as a special case, setting file attributes as needed. (mount_info::conv_to_win32_path): Allow stand-alone /cygdrive, meaning "the directory which contains all of the drives on the system". (fillout_mntent): Use cyg_tolower for conversions. (mount_info::cygdrive_win32_path): Replace unused argument with unit number. * shared_info.h (mount_info::cygdrive_win32_path): Reflect argument change.
* * Makefile.in (DLL_OFILES): Add fhandler_disk_file.o.Christopher Faylor2001-11-218-744/+896
| | | | | | | | | | | | | | | | | | * cygheap.h (cygheap_fdnew::operator =): New operator. * dir.cc: Add invalid struct checking throughout. Use methods for all directory manipulation throughout. * fhandler.cc: Move fhandler_disk_file stuff to own file. (fhandler_base::opendir): New method. (fhandler_base::readdir): New method. (fhandler_base::telldir): New method. (fhandler_base::seekdir): New method. (fhandler_base::rewinddir): New method. (fhandler_base::closedir): New method. * fhandler_disk_file.cc: New file. * fhandler.h (fhandler_base): Declare new virtual methods. (fhandler_disk_file): Ditto. (fhandler_cygdrive): New class. * path.cc (conv_path_list): Use strccpy to break apart path.
* * path.cc (conv_path_list): Copy source paths before modifying them.Christopher Faylor2001-11-172-3/+12
|
* * fhandler_raw.cc (fhandler_dev_raw::clear): Don't reset unit.Corinna Vinschen2001-11-163-1/+7
| | | | | * fhandler_tape.cc (fhandler_dev_tape::fhandler_dev_tape): Add debug output.
* * include/pthread.h (PTHREAD_COND_INITIALIZER): Define.Egor Duda2001-11-154-4/+26
| | | | | | | | | | | | * thread.cc (__pthread_cond_destroy): Add support for PTHREAD_COND_INITIALIZER. (__pthread_cond_init): Ditto. (__pthread_cond_broadcast): Ditto. (__pthread_cond_signal): Ditto. (__pthread_cond_dowait): Ditto. (__pthread_mutex_init): Handle PTHREAD_MUTEX_INITIALIZER correctly, don't return error when it's passed as parameter. * winsup.h (check_null_invalid_struct): Call correct function.
* * exceptions.cc: Add stdlib.h include for alloca declaration.Christopher Faylor2001-11-155-7/+24
| | | | | | * poll.cc: Ditto. * termios.cc: Ditto. * syscalls.cc (_write): Only allow zero length when fd is valid.
* * fhandler.cc (fhandler_disk_file::fstat): Add setting access timeCorinna Vinschen2001-11-142-6/+25
| | | | | | | | and creation time to last modification time for files on filesystems not supporting multiple timestamps. (fhandler_disk_file::fstat_helper): Set access time and creation time in incoming Windows structure instead of in stat buf to avoid incorrectly overwriting Epoch timestamp.
* * winsup.h: Remove alloca definition since it's now defined throughCorinna Vinschen2001-11-143-3/+7
| | | | | inclusion of stdlib.h. * lib/cygwin_crt0.c: Ditto.
* * syscalls.cc (_write): Allow zero length as per SUSv2.Christopher Faylor2001-11-142-0/+7
|
* * dir.cc (mkdir): Add HIDDEN file attribute if file has leading dotCorinna Vinschen2001-11-135-6/+45
| | | | | | | | and HIDDEN_DOT_FILES is defined. * fhandler.cc (fhandler_base::open): Ditto. * path.cc (symlink): Ditto. * syscalls.cc (_rename): Ditto and remove HIDDEN file attribute if new filename does not begin with a dot.
* * fhandler_console.cc (fhandler_console::read): Revert 2001-10-23 change toChristopher Faylor2001-11-122-3/+5
| | | | only honor keydown events.
* * include/cygwin/version.h: Bump version to 1.3.6.Christopher Faylor2001-11-122-2/+6
|
* fix typo.Christopher Faylor2001-11-111-1/+1
|
* * dtable.cc (dtable::build_fhandler): Don't increment console fd count if newChristopher Faylor2001-11-103-8/+11
| | | | | | operation fails. Increment fork_fixup field here. (dtable::dup2): Don't increment fork_fixup field here. (fdsock): Ditto.
* * select.cc: Set errno using set_sig_errno() throughout.Corinna Vinschen2001-11-084-10/+18
| | | | | * signal.cc (signal): Always set SA_RESTART flag. * syscalls.cc (_read): Revert previous patch.
* * select.cc (fhandler_tty_slave::ready_for_read): Return 0 on EBADF.Corinna Vinschen2001-11-083-1/+8
| | | | | * syscalls.cc (_read): If ready_for_read() failed, save errno from being overwritten by signal handler call.
* * lib/getopt.c (getopt_internal): Reset optind to 1 only if optresetCorinna Vinschen2001-11-072-1/+6
| | | | is not set.
* * select.cc (fhandler_tty_slave::ready_for_read): Correct inverted not_openChristopher Faylor2001-11-062-1/+6
| | | | test.
* * include/cygwin/version.h: Bump version to 1.3.5.Christopher Faylor2001-11-052-2/+6
|
* * mmap.cc (mmap_record::find_empty): Add input parameter check.Corinna Vinschen2001-11-052-0/+6
|
* Eliminate excess whitespace.Christopher Faylor2001-11-0538-184/+183
|
* Add strace debugging section.Christopher Faylor2001-11-051-6/+29
|
* * dtable.cc (dtable::build_fhandler): Fix debug_printf to avoid SEGV due toChristopher Faylor2001-11-052-1/+6
| | | | incorrect parameter placement.
* * fhandler.h (fhandler_pipe::broken_pipe): Renamed from saweof.Christopher Faylor2001-11-053-5/+13
| | | | | | | (fhandler_pipe::set_eof): Reflect above change. * pipe.cc (fhandler_pipe::fhandler_pipe): Ditto. (fhandler_pipe::read): Ditto. (fhandler_pipe::hiteof): Ditto.
* * pipe.cc (fhandler_pipe::read): Narrow eof return to just the "broken pipe"Christopher Faylor2001-11-052-1/+6
| | | | test.
* * select.cc: Add more comments throughout. Use bool 'true' where appropriateChristopher Faylor2001-11-052-17/+34
| | | | | | | throughout. (fhandler_socket::select_read): Remove duplicate setting for *_ready which inadvertently overrode previous, correct setting. (fhandler_socket::select_write): Ditto.
* * select.cc (verify_console): New function.Christopher Faylor2001-11-042-2/+25
| | | | | | | (verify_windows): Ditto. (fhandler_console::select_read): Really do need to verify that there is something to read. (fhandler_console::select_windows): Ditto.
* * fhandler.h (fhandler_base::ready_for_read): Remove unused argument.Christopher Faylor2001-11-044-162/+128
| | | | | | | | | | | | | | (fhandler_tty_slave::ready_for_read): Ditto. (select_record): Remove poll, initialize peek. * select.cc: Remove all poll functions, throughout. Change second argument of peek_* functions to 'bool' throughout. Specifically initialize *_ready variables throughout. (select_stuff::poll): Subsume previous poll functionality. (peek_pipe): Don't grab guard mutex when in select loop. select()/read() is racy by design so there is no need to worry about a race in select(). (fhandler_base::ready_for_read): Remove unused argument. (fhandler_tty_slave::ready_for_read): Ditto. * syscalls.cc (_read): Eliminate third argument in ready_for_read call.
* * security.cc (get_supplementary_group_sidlist): New function.Corinna Vinschen2001-11-032-0/+38
| | | | | | (get_group_sidlist): Call get_supplementary_group_sidlist() to retrieve list of supplementary groups SIDs from /etc/group and add them to the user's group list.
* * fhandler.cc (fhandler_base::read): Return just read ahead characters if slowChristopher Faylor2001-11-035-46/+36
| | | | | | | | | | | device. * fhandler.h (fhandler_base::set_eof): New virtual method. (fhandler_pipe::set_eof): New method. * pipe.cc (fhandler_pipe::fhandler_pipe): Clear saweof flag. (fhandler_pipe::read): Return immediately if hit eof. (fhandler_pipe::hit_eof): Return true if saweof flag is set. * select.cc (peek_pipe): Don't call PeekNamedPipe if we couldn't grab the guard mutex.
* * dll_init.h (class dll_list): Reorder functions to avoid compiler "can'tChristopher Faylor2001-11-0310-58/+87
| | | | | | | | | | | | | | | | inline" warnings. * security.h (class cygsid): Ditto. * sigproc.cc (get_proc_lock): Ditto. * sigproc.h (class sigframe): Ditto. * sync.h (class muto): Ditto. * fhandler.h (fhandler_base::get_guard): Actually MAKE virtual as previously indicated. * pipe.cc (make_pipe): Remove extraneous set_errno. * syscalls.cc (_open): Ditto. * select.cc (peek_pipe): Need to check that there is still something to read from the pipe after acquiring the mutex since another process/thread could have eaten the input before we got to acquiring the lock. (Thanks to Nick Duffek for this inspiration.)
* * fhandler.h: Change Windows 'BOOL's to c++ 'bool's for all variables.Christopher Faylor2001-11-024-12/+21
| | | | | | * select.cc (fhandler_base::ready_for_read): Set read_ready to zero prior to testing it or it will be uninitialized. * Makefile.in (CFLAGS): Move setting to Makefile.common.
* * cygheap.h (cygheap_fdmanip::isopen): Set appropriate errno if fd not open.Christopher Faylor2001-11-014-2/+29
| | | | | | | * select.cc (fhandler_base::ready_for_read): Release an open guard mutex when exiting with an error condition. * syscalls.cc (_read): Check frequently for closed fd as a kludge until something better is invented.
* * dtable.cc (dtable::build_fhandler): Issue internal error on unknown device.Christopher Faylor2001-11-019-119/+146
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * fhandler.cc (fhandler_base::close): Show both name and handle in debugging output. * fhandler.h (fhandler_base::get_guard): New virtual method. (fhandler_pipe::get_guard): New method. (fhandler_socket::ready_for_read): Delete declaration. (fhandler_pipe::ready_for_read): Ditto. (fhandler_serial::ready_for_read): Ditto. (fhandler_console::ready_for_read): Ditto. (fhandler_tty_common::ready_for_read): Ditto. (fhandler_windows::ready_for_read): Ditto. (struct select_record::peek): Declare new method. * select.cc (MAKEready): Delete. (peek_pipe): Use get_guard method to retrieve potential guard mutex handle. (fhandler_base::ready_for_read): Rewrite as generic ready-for-read handler. Should only be called for "slow" devices. (fhandler_socket::ready_for_read): Delete definition. (fhandler_pipe::ready_for_read): Ditto. (fhandler_serial::ready_for_read): Ditto. (fhandler_console::ready_for_read): Ditto. (fhandler_tty_common::ready_for_read): Ditto. (fhandler_windows::ready_for_read): Ditto. (fhandler_pipe::select_read): Fill in new peek record in select_record structure. (fhandler_console::select_read): Ditto. (fhandler_tty_common::select_read): Ditto. (fhandler_serial::select_read): Ditto. (fhandler_socket::select_read): Ditto. (fhandler_socket::select_read): Ditto. (fhandler_tty_slave::ready_for_read): Check for tty not open. Set errnos appropriately. * syscalls.cc (_read): Allow ready_for_read to set errno. * pinfo.cc (pinfo::init): Return spawn/NO_WAIT process as valid if it is initializing. * sigproc.cc (getsem): Adjust wait for process to initialize downward to avoid huge waits.
* * environ.cc: Set reset_com to false to mimic linux behavior more closely.Christopher Faylor2001-10-313-1/+7
|
* * dtable.cc (dtable::vfork_child_dup): Revert impersonationCorinna Vinschen2001-10-312-0/+13
| | | | before duplicating fhandler.
* remove garbage ChangeLog entry.Christopher Faylor2001-10-311-4/+5
|