aboutsummaryrefslogtreecommitdiff
path: root/winsup/cygwin/errno.cc
AgeCommit message (Collapse)AuthorFilesLines
2005-09-26 * errno.cc (errmap): Map ERROR_SEEK and ERROR_SECTOR_NOT_FOUND.Corinna Vinschen1-0/+2
2005-09-13* dcrt0.cc (do_exit): Rely on sigproc_terminate to set exit_stateChristopher Faylor1-1/+0
appropriately. * pinfo.cc (pinfo::exit): Always call sigproc_terminate here. Rely on sigproc_terminate to signal signal thread to handle eventual process exit. * sigproc.cc (no_signals_available): Change criteria for determining if this process can handle signals to itself. (my_sendsig): New variable. Copy of my sendsig handle. (proc_can_be_signalled): Don't send signals if exit code is set. (sigproc_terminate): Use and set exit_state appropriately to determine when to do anything. Send __SIGEXIT to self to control process exit. (sig_send): Use my_sendsig for sending signals. Don't call proc_can_be_signalled for myself since the criteria is now different for sending signals to myself. (wait_sig): Copy myself->sendsig to my_sendsig for future use. Exit signal loop when __SIGEXIT is received. Wait for main thread to exit and use its exit status to actually exit process. * sigproc.h (__SIGEXIT): New enum. * dcrt0.cc (alloc_stack): Eliminate superfluous "return;". * debug.cc (add_handle): Ditto. * devices.in (device::parse): Ditto. * dtable.cc (dtable::vfork_parent_restore): Ditto. (dtable::vfork_child_fixup): Ditto. * environ.cc (parse_options): Ditto. * errno.cc (seterrno_from_win_error): Ditto. * exceptions.cc (sig_handle_tty_stop): Ditto. (set_signal_mask): Ditto. * fhandler.cc (fhandler_base::read): Ditto. (fhandler_base::operator delete): Ditto. (fhandler_base::seekdir): Ditto. (fhandler_base::rewinddir): Ditto. * fhandler_console.cc (fhandler_console::read): Ditto. (fhandler_console::fixup_after_exec): Ditto. * sigproc.cc (sigproc_init): Ditto. (sigproc_terminate): Ditto. * devices.cc: Regenerate.
2005-08-28* cygwin.din: Correct readdir_r typo.Christopher Faylor1-18/+29
2005-08-25* errno.cc (errmap): Translate ERROR_NO_MORE_ITEMS to ENMFILE.Christopher Faylor1-0/+1
2005-08-18 * errno.cc (strerror): Check errnum for underflow.Corinna Vinschen1-1/+1
2005-05-22* spawn.cc (find_exec): Accept a PATH-like string in place of an environmentChristopher Faylor1-0/+1
variable. * dlfcn.cc (get_full_path_of_dll): Search /usr/bin (for windows compatibility) and /usr/lib (for UNIX compatibility) when looking for shared libraries. * environ.cc (conv_envvars): Put back LD_LIBRARY_PATH since it is used by get_full_path_of_dll(). * errno.cc (errmap): Map MOD_NOT_FOUND to ENOENT. * cygmagic: Remove debugging cruft.
2005-04-30* errno.cc (errmap): Sort table.Christopher Faylor1-79/+79
2005-04-30* errno.cc (errmap): Map ERROR_NETNAME_DELETED to ENOSHARE.Christopher Faylor1-0/+1
2005-03-30 * errno.cc (NO_SYSTEM_RESOURCES): Map to EAGAIN.Corinna Vinschen1-0/+6
(NONPAGED_SYSTEM_RESOURCES): Ditto. (PAGED_SYSTEM_RESOURCES): Ditto. (WORKING_SET_QUOTA): Ditto. (PAGEFILE_QUOTA): Ditto. (COMMITMENT_LIMIT): Ditto.
2005-03-28* timer.cc (timer_tracker::timer_tracker): Eliminate simple constructor.Christopher Faylor1-1/+1
(ttstart): Fully initialize. * errno.cc: Fix typo introduced in previous change.
2005-03-28* errno.cc (FILENAME_EXCED_RANGE): Map to ENAMETOOLONG.Christopher Faylor1-1/+1
2005-03-16* errno.cc (errmap): Correct typo in previous change.Christopher Faylor1-1/+1
2005-03-15* cygtls.cc (_cygtls::remove): Free process_ident, if it exists.Christopher Faylor1-0/+1
* errno.cc (errmap): ERROR_DISK_CORRUPT -> EIO.
2005-02-20copyrightChristopher Faylor1-1/+2
2005-01-11* pinfo.h (_pinfo::set_exit_state): Declare new function.Christopher Faylor1-0/+1
(pinfo::exit): Move here from _pinfo::exit. * sigproc.cc (child_info::sync): Use new function to set exitcode and process_state. * pinfo.cc (_pinfo::exit): Ditto. (proc_waiter): Ditto. (_pinfo::set_exit_state): Define new function. (_pinfo::dup_proc_pipe): Close handle when there is no parent process around to care about the exit value. * dcrt0.cc (dll_crt0_0): Move subproc_ready synchronization later to make sure that myself is still mapped in parent. (do_exit): Reflect movement to pinfo::exit. (__api_fatal): Ditto. * exceptions.cc (signal_exit): Ditto. * errno.cc (errmap): Map PROC_NOT_FOUND. * init.cc (dll_entry): Release myself before exiting. * sigproc.cc (proc_can_be_signalled): Set errno appropriately. (sig_send): Ditto. Also remove ill-advised test for !myself->sendsig since this is an indication of a process which is still initializating -- it is not an error. (child_info::sync): Don't set exitcode here. Assume that will happen in proc_waiter, if necessary. * spawn.cc (spawn_guts): Delay "wait_for_myself" logic until later. Don't wait at all if the process has already exited. Reflect movement to pinfo::exit.
2004-12-10 * errno.cc (errmap): Map ERROR_INVALID_ADDRESS to EINVAL instead ofCorinna Vinschen1-1/+1
EOVERFLOW.
2004-08-19 * errno.cc (_sys_errlist): Change various text to their english LinuxCorinna Vinschen1-506/+138
counterparts. Unify layout. (strerror): Remove switch statement.
2004-08-03 * errno.cc (errmap): Add ERROR_TOO_MANY_LINKS -> EMLINK mapping.Corinna Vinschen1-0/+1
* syscalls.cc (link): Only copy files if FS doesn't support hard links.
2004-04-19 * errno.cc (errmap): Handle ERROR_IO_PENDING.Corinna Vinschen1-0/+1
* fhandler.cc (fhandler_base::open): Make tape I/O asynchronous. * fhandler.h (class fhandler_dev_tape): Add mt_evt member. * fhandler_tape.cc (mtinfo_drive::initialize): Initialize async_writes. (mtinfo_drive::close): Handle async writes. (mtinfo_drive::read): Add mt_evt parameter. Use overlapped I/O. (mtinfo_drive::async_wait): New function. (mtinfo_drive::write): Add mt_evt parameter. Use overlapped I/O. Handle async writes. (mtinfo_drive::_set_pos): Handle async writes. (mtinfo_drive::set_partition): Ditto. (mtinfo_drive::prepare): Ditto. (mtinfo_drive::get_status): Drop useless "else". Handle async_writes flag. (mtinfo_drive::set_options): Handle async_writes flags. (fhandler_dev_tape::close): Close mt_evt handle. (fhandler_dev_tape::raw_read): Create mt_evt handle and use in call to mtinfo_drive::read. (fhandler_dev_tape::raw_write): Create mt_evt handle and use in call to mtinfo_drive::write. * mtinfo.h (MTINFO_VERSION): Bump. (enum dirty_state): Add async_write_pending state. (class mtinfo_drive): Add OVERLAPPED struct "ov". Add async_writes flag. (mtinfo_drive::async_wait): Add declaration. (mtinfo_drive::read): Add mt_evt parameter. (mtinfo_drive::write): Ditto. * registry.cc (load_registry_hive): Call enable_restore_privilege instead of set_process_privilege.
2004-03-26 * errno.cc (errmap): Map ERROR_SHARING_VIOLATION to EBUSY,Corinna Vinschen1-3/+6
ERROR_EOM_OVERFLOW and ERROR_NO_DATA_DETECTED to EIO. Add mappings for ERROR_NO_MEDIA_IN_DRIVE, ERROR_DEVICE_REQUIRES_CLEANING and ERROR_DEVICE_DOOR_OPEN. * fhandler.h (class fhandler_dev_raw): Drop varblkop member. (fhandler_dev_raw::is_eom): De-virtualize. (fhandler_dev_raw::is_eof): Ditto. (class fhandler_dev_tape): Drop lasterr and dp member. Add mt_mtx member. Drop all private methods formerly used by ioctl. (fhandler_dev_tape::is_rewind_device): Use get_minor for clarity. (fhandler_dev_tape::driveno): New method. (fhandler_dev_tape::drive_init): New method. (fhandler_dev_tape::clear): Remove method. (fhandler_dev_tape::is_eom): Ditto. (fhandler_dev_tape::is_eof): Ditto. (fhandler_dev_tape::write_file): Ditto. (fhandler_dev_tape::read_file): Ditto. (fhandler_dev_tape::_lock): New method. (fhandler_dev_tape::unlock): New method. (fhandler_dev_tape::raw_read): New method. (fhandler_dev_tape::raw_write): New method. * fhandler_raw.cc (fhandler_dev_raw::is_eom): New method. (fhandler_dev_raw::is_eof): New method. (fhandler_dev_raw::open): Allow setting write through option by using the O_TEXT flag as ... flag. (fhandler_dev_raw::writebuf): Remove usage of varblkop and other tape specific code. (fhandler_dev_raw::raw_read): Ditto. (fhandler_dev_raw::dup): Ditto. * fhandler_tape.cc: Rewrite tape operations entirely. Implement new tape driver classes mtinfo, mtinfo_drive and mtinfo_part. Reduce fhandler_dev_tape methods to mostly just calling appropriate mtinfo_drive methods. (mtinfo_init): New function adding the mtinfo shared memory area. * mtinfo.h: New file, containing the definition of the new tape driver classes. * shared.cc: Include mtinfo.h. (offsets): Add entry for mtinfo shared memory area. (memory_init): Call mtinfo_init. * shared_info.h (shared_locations): Add SH_MTINFO shared location. * include/cygwin/mtio.h: Change and add various comments. Add GMT_xxx macros for new generic flags. Add MT_ST_xxx bitfield definitions for MTSETDRVBUFFER ioctl. * include/cygwin/version.h: Bump API minor version number.
2004-03-14 * errno.cc (errmap): Map ERROR_BEGINNING_OF_MEDIA andCorinna Vinschen1-2/+3
ERROR_SETMARK_DETECTED to EIO instead of ESPIPE. Handle ERROR_FILEMARK_DETECTED. * fhandler_tape.cc (TAPE_FUNC): Add comment that ERROR_BUS_RESET has still to be handled correctly. (fhandler_dev_tape::open): Accomodate fact that get.mt_dsreg also contains density code. (fhandler_dev_tape::ioctl): Rearrange slightly. Reset devbuf also on MTNOP, MTWSM, MTSETBLK, MTSETDRVBUFFER, MTSETPART and MTMKPART. (fhandler_dev_tape::tape_set_pos): Rearrange. Match behaviour to the Linux tape driver. (fhandler_dev_tape::tape_status): Call IOCTL_STORAGE_GET_MEDIA_TYPES_EX if available. Return device type and density code in appropriate mtget members. * wincap.h (wincaps::has_ioctl_storage_get_media_types_ex): New element. * wincap.cc: Implement above element throughout. * include/cygwin/mtio.h: Add tape device types as returned by IOCTL_STORAGE_GET_MEDIA_TYPES_EX. (MT_TAPE_INFO): Use above type codes. (struct mtget): Change mt_dsreg comment.
2004-03-13 * errno.cc (errmap): Handle ERROR_BUS_RESET.Corinna Vinschen1-0/+1
* fhandler.h (fhandler_dev_raw::write_file): New method, created from former static function. (fhandler_dev_raw::read_file): Ditto. (reset_devbuf): New inline method. (class fhandler_dev_tape): Add TAPE_GET_DRIVE_PARAMETERS member `dp'. (fhandler_dev_tape::write_file): New method. (fhandler_dev_tape::read_file): Ditto. (fhandler_dev_tape::tape_get_feature): Convert to inline method. (fhandler_dev_tape::tape_error): New method, created from former static function. (fhandler_dev_tape::tape_get_blocksize): Remove declaration. * fhandler_raw.cc (fhandler_dev_raw::write_file): New method, created from former static function. (fhandler_dev_raw::read_file): Ditto. (fhandler_dev_raw::writebuf): Accomodate the fact that no devbuf exists under variable block size condition. (fhandler_dev_raw::raw_read): Ditto. Add local p pointer to simplify pointer arithmetic. (fhandler_dev_raw::raw_write): Always set devbufend to 0 when starting with writing. Accomodate the fact that no devbuf exists under variable block size condition. * fhandler_tape.cc: Various formatting changes. (TAPE_FUNC): New macro. Use throughout as tape function loop. (get_ll): Convert into macro. (IS_EOM): New macro. (IS_EOF): New macro. (fhandler_dev_tape::is_eom): Use IS_EOM macro. (fhandler_dev_tape::is_eof): Use IS_EOF macro. (fhandler_dev_tape::write_file): New method. (fhandler_dev_tape::read_file): New method. (fhandler_dev_tape::open): Get drive information block here once. (fhandler_dev_tape::lseek): Remove unneeded duplicate code. (fhandler_dev_tape::dup): Duplicate drive information block. (fhandler_dev_tape::ioctl): Remove drvbuf in variable block size mode. Return ERROR_INVALID_BLOCK_LENGTH instead of ERROR_MORE_DATA if buffer contains data which would get lost on buffer size changing. Use absolute tape positioning also if drive only supports logical block positioning. (fhandler_dev_tape::tape_error): New method, created from former static function. (fhandler_dev_tape::tape_get_pos): Allow logical block reporting. Workaround tape driver bug. (fhandler_dev_tape::_tape_set_pos): Reset device buffer and flags after successful repositioning. (fhandler_dev_tape::tape_set_pos): Allow logical block positioning. Workaround tape driver bug. (fhandler_dev_tape::tape_erase): Use dp instead of calling GetTapeParameters. (fhandler_dev_tape::tape_prepare): Ditto. (fhandler_dev_tape::tape_get_blocksize): Remove. (fhandler_dev_tape::tape_set_blocksize): Don't call tape_get_blocksize. Error handling already done in fhandler_dev_tape::ioctl. (fhandler_dev_tape::tape_status): Remove local `dp' variable. Accomodate logical tape reporting. Call tape_get_feature instead of accessing feature words directly. (fhandler_dev_tape::tape_compression): Use dp instead of calling GetTapeParameters. Fix resetting datcompression.
2003-12-23* exceptions.cc (set_signal_mask): Redefine to not pass by address. ReportChristopher Faylor1-7/+3
calculated mask in debugging output. * sigproc.h (set_signal_mask): Reflect above change in declaration. * path.cc (mount_item::build_win32): Take path apart before feeding it to fnmunge. Throughout, change use of _reent_winsup()-> to _my_tls.locals. instead. Throughout, remove obsolete MT_SAFE/_CYG_THREAD_FAILSAFE considerations. Througout, add cygtls.h include. * Makefile.in (DLL_OFILES): Add cygtls.o. Add some more objects to the -fomit-frame-pointer list. * acconfig.h: Remove obsolete settings. * config.h.in: Ditto. * bsdlib.cc: Add cygtls.h include. * configure.in: Remove --enable-extra-threadsafe-checking. * configure: Regenerate. * cygtls.h (_local_storage): New struct renamed from _winsup_t (sic). (_threadinfo:local_clib): Add new field. (_threadinfo::locals): Ditto. (_threadinfo::init_thread): Accept second _reent * argument. (_threadinfo::call): Define as regparm. (CYGTLS_PADSIZE): Remove unnecessary slop. (_getreent): Define as a macro. * thread.h: Remove _CYG_THREAD_FAILSAFE and MT_SAFE stuff. (_winsup_t): Move to cygtls.h. (ResourceLocks::ResourceLocks): Eliminate empty constructor. (MTinterface::reents): Eliminate. (MTinterface::thread_self_key): Eliminate. (MTinterface::MTinterface): Eliminate. * dcrt0.cc: Include stdio.h for _impure_ptr initialization. (do_global_ctors): Remove run_ctors_p (sic) considerations. Don't call atexit here. (__main): Initialize destructors for user here. (dll_crt0_1): Accept a dummy argument. Don't call init_thread here. Don't set _impure_ptr here. Call do_global_ctors after more things have been initialized. (_dll_crt0): Define zeros buffer as max of needed size of CYGTLS_PADSIZE so that it can be used for two purposes while minimizing stack usage. Initialize _impure_ptr specifically, for speed. Call dll_crt0_1 with buffer argument. (cygwin_dll_init): Call dll_crt0_1 with dummy argument. * dtable.cc (dtable::find_unused_handle): Remove call to AssertResourceOwner. * exceptions.cc: Move _threadinfo stuff to new file. * cygtls.cc: New file. * gentls_offsets: Accommodate increasing complexity of cygtls.h. * hires.h (hires_base::~hires_base): Remove. * init.cc (dll_entry): Remove setting of reents. * thread.cc: Remove syslog.h include. (__getreent): Simplify to use _my_tls. (_reent_winsup): Delete. (AssertResourceOwner): Delete. (MTinterface::Init): Remove setting of _clib and _winsup, with all that entails. (MTinterface::fixup_after_fork): Ditto. (pthread::thread_init_wrapper): Ditto. Also remove call to set_tls_self_pointer. (pthread::set_tls_self_pointer): Eliminate. (pthread::get_tls_self_pointer): Just return _my_tls.tid; (__reent_t::init_clib): Eliminate. * tlsoffsets.h: Regenerate.
2003-08-17 * errno.cc (errmap): Map ERROR_INVALID_BLOCK_LENGTH to EIO.Corinna Vinschen1-0/+1
* fhandler_raw.cc (fhandler_dev_raw::raw_read): Set more accurate errnos instead of EACCES. (fhandler_dev_raw::raw_write): Ditto.
2003-06-16Throughout, remove "include <errno.h>" from files which already includeChristopher Faylor1-2/+0
cygerrno.h. * include/cygwin/config.h (__DYNAMIC_REENT__): Define. * include/cygwin/version.h: Bump API minor version. * cygwin.din: Export __getreent * cygerrno.h: Include errno.h. Fix places where _impure_ptr is used directly to store the errno value. * debug.cc (__set_errno): Ditto. * errno.cc: Remove _RRENT_ONLY define to get errno.cc compiled. * signal.cc: Rename _reent_clib to _REENT throughout. * thread.h (reent_clib): Remove prototype. * thread.cc (reent_clib): Rename reent_clib to __getreent. Return _impure_ptr until MTinterface is initialized. (reent_winsup): Fix a possible SEGV when _r == NULL. Return NULL instead. * MTinterface::fixup_after_fork: Switch reent back to _impure_ptr to keep signal handling running when fork is called from a thread other than the mainthread.
2003-05-11* dir.cc (readdir): Fill out new old_d_ino field.Christopher Faylor1-43/+44
* fhandler.h (fhandler_base::namehash): Define as ino_t. (fhandler_base::get_namehash): Ditto. * fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): Accommodate new 64 bit st_ino. * fhandler_socket.cc (fhandler_socket::fstat): Ditto. * path.cc (hash_path_name): Return ino_t. * syscalls.cc (stat64_to_stat32): Convert 64 bit inode to 32 bit. * winsup.h (hash_path_name): Declare as returning ino_t. * include/cygwin/stat.h (__stat32): Use 32 bit st_ino. (__stat64): Use 64 bit st_ino. * include/cygwin/types.h (__ino64_t): Define. (__ino32_t): Ditto. (ino_t): Define appropriately.
2003-05-09revert errnoneous checkinChristopher Faylor1-129/+127
2003-05-09* cygthread.cc (cygthread::detach): Prioritize waiting for I/O completion overChristopher Faylor1-127/+129
waiting for signal delivery.
2003-04-27really check in correct fix.Christopher Faylor1-1/+1
2003-04-27* errno.cc (_sys_nerr): Fix compile error erroneously checked in on 2003-04-23.Christopher Faylor1-1/+1
2003-04-24* fork.cc: Change SLOW_PID_REUSE to NO_SLOW_PID_REUSE and invert ifdef senseChristopher Faylor1-3/+3
throughout.
2002-09-24 * errno.cc (errmap): Map ERROR_INVALID_ADDRESS to new errno codeCorinna Vinschen1-0/+9
EOVERFLOW. (_sys_errlist): Add entries for EILSEQ and EOVERFLOW. (strerror): Ditto. * mmap.cc (map_map): Set errno in case of error. (mmap64): Remove setting errno explicitely to ENOMEM.
2002-09-22* fhandler.cc (fhandler_base::dup): Don't set handle on failure. Caller hasChristopher Faylor1-1/+1
already taken care of that. * fhandler_console.cc (fhandler_console::open): Initialize handles to NULL. (fhandler_console::close): Ditto. GNUify non-GNU formatted functions calls throughout.
2002-07-01* syscalls.c (seteuid32): Do not return an error when the token cannot beChristopher Faylor1-1/+1
created only because of a problem with the gid.
2002-06-21* errno.cc: Change text description for EBADF throughout.Christopher Faylor1-2/+2
2002-06-05* dtable.cc (handle_to_fn): Attempt to handle "raw" accesses to remote shares.Christopher Faylor1-1/+1
* path.cc (mount_info::conv_to_win32_path): Set flags to binary when mount entry is not found. (mount_info::set_flags_from_win32_path): Ditto.
2002-03-05* errno.cc: Change EPERM associated text to "Operation not permitted"Christopher Faylor1-2/+5
throughout.
2001-10-13* fhandler_dsp.cc (fhandler_dsp::ioctl): Return 0 for successfulChristopher Faylor1-3/+8
SNDCTL_DSP_GETBLKSIZE operation. Remove obsolete 'name' arg from fhandler_* constructors throughout. * winsup.h (winsock_active): New macro. (winsock2_active): Ditto. * autoload.cc (wsock_init): Use new macros to decide if winsock or winsock2 is loaded. (nonexist_wsock32): Dummy function to force winsock load. (nonexist_ws2_32): Dummy function to force winsock2 load. * fhandler.h (fhandler_socket::fstat): Declare new method. Currently unused. * fhandler_socket.cc (fhandler_socket::fixup_before_fork_exec): Check that winsock2 is active before trying WSADuplicateSocketA. (fhandler_socket::fixup_after_fork): Add extra check for winsock2_active. Otherwise use iffy procedures for Windows 95. (fhandler_socket::fixup_after_exec): Add debugging. (fhandler_socket::dup): Add debugging. (fhandler_socket::fstat): New method. (fhandler_socket::set_close_on_exec): Attempt to perform iffy stuff on Windows 95. * errno.cc (_sys_nerr): Work around compiler strangeness. * pinfo.cc (winpids::add): Add extra element at end of allocated array for setting to NULL. (winpids::enumNT): Ditto. (winpids::init): Don't modify pidlist if it hasn't been allocated (possibly due to malloc problem).
2001-09-06Move appropriate variables to NO_COPY segment, throughout.Christopher Faylor1-3/+3
2001-05-14* errno.cc (_sys_errlist): Add missing commas.Christopher Faylor1-2/+2
2001-04-12 * dir.cc (mkdir): Check for case clash.Corinna Vinschen1-1/+5
* environ.cc: Add extern declaration for `pcheck_case'. (check_case_init): New function. (struct parse_thing): Add "check_case" option. * errno.cc (_sys_nerrlist): Add text for ECASECLASH. (strerror): Add case branch for ECASECLASH. * fhandler.cc (fhandler_disk_file::open): Check for case clash. * path.cc: Add global variable `pcheck_case'. (struct symlink_info): Add member `case_clash' and method `case_check'. (path_prefix_p_): Call `pathnmatch' instead of `strncasematch'. (pathnmatch): New funtion. (pathmatch): Ditto. (path_conv::check): Add handling for case checking. (symlink): Check for case clash. (symlink_info::check): Add parameter for case checking. Handle case checking. (symlink_info::case_check): New method. (chdir): Don't use unconverted path if pcheck_case==PCHECK_STRICT. * path.h: Add extern declarations for `pathmatch' and `pathnmatch'. (enum case_checking): New enumeration type describing the case checking behaviour of path conversion routines. (class path_conv): Add member `case_clash'. * syscalls.cc (_link): Check for case clash.
2001-04-03 * errno.cc (errmap): Map ERROR_FILE_INVALID to ENXIO.Corinna Vinschen1-0/+1
2001-03-18Update copyrights.Christopher Faylor1-1/+1
2001-02-22 * cygerrno.h: Revert previous patch.Corinna Vinschen1-1/+1
* errno.cc: Ditto. * dir.cc: Eliminate `dir_suffixes'. (opendir): Remove usage of `dir_suffixes'. (rmdir): Ditto. * fhandler.cc (fhandler_disk_file::open): Remove usage of `inner_suffixes'. * path.cc: Rename `inner_suffixes' to `lnk_suffixes'. (path_conv::check): Remove usage of `inner_suffixes'. (symlink): Ditto. (symlink_info::check): Handle checking for `.lnk' in path_conv exclusively here. (chdir): Remove usage of `dir_suffixes'. * shortcut.c: Eliminate debug_printf lines. (check_shortcut): Don't set error except on failing ReadFile. * spawn.cc: Remove ".lnk" from `std_suffixes'. * syscalls.cc (_unlink): Remove usage of `inner_suffixes'. Remove ".lnk" from `stat_suffixes'. (_rename): Add check for renaming a symlink to keep the ".lnk" suffix after renaming.
2001-02-22 * shortcut.c: New file. Provides a C interface to reading ofCorinna Vinschen1-1/+1
Windows shortcuts to avoid compiler flag `-fvtable-thunks'. * shortcut.h: Ditto. * Makefile.in: Add shortcut.o to DLL_OFILES. * cygerrno.h: Provide a C interface to `geterrno_from_win_error' for using in shortcut.c. * errno.cc (geterrno_from_win_error): Define as extern "C". * path.cc (struct symlink_info): Remove methods `check_shortcut' and `check_sysfile'. (shortcut_header): Move to shortcut.c. (shortcut_initalized): Ditto. (create_shortcut_header): Ditto. (cmp_shortcut_header): Ditto. (symlink_info::check_shortcut): Ditto. Reorganize as a plain C function. (symlink_info::check_sysfile): Redefine as a global function using the same parameter list as `check_shortcut' for clearness. (symlink_info::check): Change parameter list for calls to `check_shortcut' and `check_sysfile'.
2000-11-06* errno.cc (strerror): Change EAGAIN case to return "Resource temporarilyChristopher Faylor1-1/+1
unavailable" instead of "No more processes".
2000-10-12* errno.cc (seterrno_from_win_error): Fix debugging output.Christopher Faylor1-1/+1
* fhandler.cc (fhandler_base::fstat): Move to inline method in fhandler.h. (fhandler_base::set_io_handle): Ditto. * fhandler.h (fhandler_base): Make some methods inline. * fhandler_console.cc (fhandler_console::write_normal): Make buffer larger. * sigproc.h (sigframe::sigframe): Actually use set ebp parameter correctly. * spawn.cc (spawn_guts): Set dwProcessId when exec'ing. Just exit immediately after reparenting. * syscalls.cc: Sprinkle sigframe stuff throughout. * wait.cc (wait4): Set signal frame here. * dcrt0.cc (__api_fatal): Don't rely on small_printf to display errors. Always display problems to the console, if possible.
2000-08-31* errno.cc (set_errno_from_win_error): Actually use arguments to strace_printf.Christopher Faylor1-6/+6
2000-08-22* winsup.h: Eliminate inclusion of most of the cygwin .h files. Use .h filesChristopher Faylor1-0/+1
only in sources which require them. * Makefile.in: Generate dependencies with -MD option.
2000-08-22* cygerrno.h: New file. Use this throughout whenever errno manipulation isChristopher Faylor1-24/+23
required. * errno.cc: Use DWORD to hold Windows errors. (geterrno_from_win_error): New function. (seterrno_from_win_error): Use geterrno_from_win_error to convert supplied windows error (suggested by Corinna Vinschen). * path.cc (symlink_info): Add error element. * path.cc (path_conv::check): Remove errno setting. Use new symlink_info errno element to set path_conv error, where appropriate. (symlink_info::check): Set error element rather than attempting to manipulate errno. Add more checks for trailing / and /.. even though they are currently useless. Avoid setting EINVAL. * path.cc (normalize_posix_path): Correct check for trailing /.