Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2003-06-16Throughout, remove "include <errno.h>" from files which already includeChristopher Faylor
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-04-01 * dir.cc: Change __off32_t to _off_t and __off64_t to _off64_tCorinna Vinschen
throughout. * fhandler.cc: Ditto. * fhandler.h: Ditto. * fhandler_clipboard.cc: Ditto. * fhandler_disk_file.cc: Ditto. * fhandler_dsp.cc: Ditto. * fhandler_floppy.cc: Ditto. * fhandler_mem.cc: Ditto. * fhandler_proc.cc: Ditto. * fhandler_process.cc: Ditto. * fhandler_random.cc: Ditto. * fhandler_registry.cc: Ditto. * fhandler_tape.cc: Ditto. * fhandler_termios.cc: Ditto. * fhandler_virtual.cc: Ditto. * fhandler_zero.cc: Ditto. * mmap.cc: Ditto. * pipe.cc: Ditto. * syscalls.cc: Ditto. * winsup.h: Ditto. * include/cygwin/stat.h: Ditto. * include/cygwin/types.h: Ditto. Remove definition of __off32_t and __off64_t.
2002-12-14Throughout, change fhandler_*::read and fhandler_*::raw_read to void functionsChristopher Faylor
whose second arguments are both the lenght and the return value. * fhandler.cc (fhandler_base::read): Rework slightly to use second argument as input/output. Tweak CRLF stuff. (fhandler_base::readv): Accommodate fhandler_*::read changes. * cygthread.h (cygthread::detach): Declare as taking optional handle argument. (cygthread::detach): When given a handle argument, wait for the handle to be signalled before waiting for thread to detach. Return true when signal detected.
2002-09-30Remove \n from calls to strace class printfs throughout.Christopher Faylor
2002-09-19* cygthread.cc (cygthread::initialized): Avoid copying on fork or some threadsChristopher Faylor
may not end up in the pool. (cygthread::new): Avoid race when checking for initialized. Add debugging code. * fhandler.cc (fhandler_base::raw_read): Add case for ERROR_INVALID_HANDLE due to Win95 directories. (fhandler_base::open): Handle errors due to Win95 directories. (fhandler_base::close): Add get_nohandle () test. (fhandler_base::set_close_on_exec): Ditto. (fhandler_base::fork_fixup): Ditto. (fhandler_base::lock): Change error code to Posix EINVAL. (fhandler_base::dup): If get_nohandle (), set new value to INVALID_HANDLE_VALUE instead of NULL. * fhandler_disk_file.cc (fhandler_disk_file::fstat): Call fstat_by_name if get_nohandle (). Remove extraneous element from strpbrk. (fhandler_disk_file::open): Remove test for Win95 directory. * fhandler_random.cc (fhandler_dev_random::open): Add set_nohandle (). * fhandler_clipboard.cc (fhandler_dev_clipboard::open): Ditto. * fhandler_zero.cc (fhandler_dev_zero::open): Ditto. (fhandler_dev_zero::close): Delete. * fhandler.h (class fhandler_dev_zero): Ditto.
2002-07-01* fhandler_clipboard.c (fhandler_dev_clipboard::open): Force text mode.Christopher Faylor
* fhandler_console.cc (fhandler_console::open): *Really* force binary mode rather than make it optional. * fhandler_proc.cc (fhandler_proc::open): Ditto. * fhandler_process.cc (fhandler_process::open): Ditto. * fhandler_random.cc (fhandler_dev_random::fhandler_dev_random): Ditto. * fhandler_raw.cc (fhandler_dev_raw::open): Ditto. * fhandler_registry.cc (fhandler_registry::open): Ditto. * fhandler_tty.cc (fhandler_tty_slave::open): Ditto. * fhandler_virtual.cc (fhandler_virtual::open): Ditto. * fhandler_windows.cc (fhandler_windows::open): Ditto. * fhandler_zero.cc (fhandler_dev_zero::open): Ditto. * net.cc (fdsock): Ditto. * path.cc (set_flags): Add more debugging.
2002-06-05Remove fcntl.h includes throughout.Christopher Faylor
* fhandler.h: Move fcntl.h include here. (fhandler_base::set_flags): Accept supplied_bin argument. Make non-inlined. * dtable.cc (dtable::init_std_file_from_handle): Just use binmode from pc. (reset_to_open_binmode): Use set_flags. * cygwin.din (open): Avoid newlib wrapper. (read): Ditto. (unlink): Ditto. (write): Ditto. * fhandler.cc (fhandler_base::set_flags): Accept supplied_bin argument. Make binmode decisions here. (fhandler_base::open): Avoid using pc if it is NULL. Eliminate binmode logic. Just call set_flags with binmode argument. (fhandler_base::init): Call set_flags with binmode argument. * fhandler_clipboard.cc (fhandler_dev_clipboard::open): Ditto. * fhandler_console.cc (fhandler_console::open): Ditto. (fhandler_console::init): Force binary on open. * fhandler_disk_file.cc (fhandler_disk_file::open): Don't set binmode here. Let it happen in base class. * fhandler_dsp.cc (fhandler_dev_dsp::open): Force binmode open. Set return value appropriately if unable to open. * fhandler_proc.cc (fhandler_proc::open): Make sure flags are set before open_status. * fhandler_process.cc (fhandler_process::open): Ditto. * fhandler_registry.cc (fhandler_registry::open): Ditto. * fhandler_random.cc (fhandler_dev_random::fhandler_dev_random): Ditto. * fhandler_raw.cc (fhandler_dev_raw::open): Force O_BINARY by default. * fhandler_serial.cc (fhandler_serial::init): Ditto. * fhandler_tty.cc (fhandler_tty_slave::open): Ditto. (fhandler_pty_master::open): Ditto. * fhandler_virtual.cc (fhandler_virtual::open): Ditto. * fhandler_windows.cc (fhandler_windows::open): Ditto. * fhandler_zero.cc (fhandler_dev_zero::open): Ditto. * net.cc (fdsock): Ditto. * path.cc (path_conv::check): Avoid checking for extension when error or directory. (set_flags): Set PATH_TEXT explicitly, when appropriate. (mount_info::conv_to_win32_path): Use set_flags() to set path flags. * path.h (PATH_TEXT): New enum. (path_conv::binmode): Return appropriate constant based on binmode. * pipe.cc (make_pipe): Set binmode to O_TEXT xor O_BINARY. * syscalls.cc (setmode_helper): Make debugging message a little clearer. (setmode): Set binmode via set_flags.
2002-02-25 * cygwin.din (fstat64): New symbol.Corinna Vinschen
(ftruncate64): Ditto. (lseek64): Ditto. (lstat64): Ditto. (mmap64): Ditto. (seekdir64): Ditto. (stat64): Ditto. (telldir64): Ditto. (truncate64): Ditto. * dir.cc (telldir64): New function. (telldir): Call telldir64(). (seekdir64): New function. (seekdir): Call seekdir64(). * fhandler.h: Redefine all methods using __off32_t to use __off64_t. * fhandler.cc: Use __off64_t and struct __stat64 throughout. * fhandler_clipboard.cc: Ditto. * fhandler_disk_file.cc: Ditto. * fhandler_dsp.cc: Ditto. * fhandler_floppy.cc: Ditto. * fhandler_mem.cc: Ditto. * fhandler_random.cc: Ditto. * fhandler_socket.cc: Ditto. * fhandler_tape.cc: Ditto. * fhandler_zero.cc: Ditto. * pipe.cc: Ditto. * glob.c: Ditto, call lstat64 and stat64 in Cygwin. * mmap.cc: Use __off64_t throughout. (mmap64): New function. * sec_acl.cc (acl_worker): Use struct __stat64, call stat64 and lstat64. * syscalls.cc (lseek64): New function. (stat64_to_stat32): Ditto. (fstat64): Ditto. (stat64): Ditto. (lstat64): Ditto. (ftruncate64): Ditto. (truncate64): Ditto. (_fstat): Call fstat64. (_stat): Call stat64. (cygwin_lstat): Rename to avoid declaration problem. Call lstat64. (stat_worker): Use struct __stat64. (access): Ditto. (ftruncate): Call ftruncate64. (truncate): Call truncate64. * wincap.cc: Set flag has_64bit_file_access appropriately. * wincap.h: Add flag has_64bit_file_access. * winsup.h (ILLEGAL_SEEK): Define as __off64_t. (stat_dev): Declare using struct __stat64. (stat_worker): Ditto. * include/cygwin/stat.h (struct __stat32): Define if compiling Cygwin. (struct __stat64): Ditto. (struct stat): Revert definition with explicitly sized datatypes. Eliminate sized field names. * include/cygwin/types.h (blksize_t): New type. (__blkcnt32_t): Ditto. (__blkcnt64_t): Ditto. (blkcnt_t): Ditto.
2002-02-10 * child_info.h, cygheap.h, fhandler_clipboard.cc, fhandler_dsp.cc,Corinna Vinschen
fhandler_floppy.cc, fhandler_mem.cc, fhandler_random.cc, fhandler_tape.cc, fhandler_zero.cc, grp.cc, mmap.cc, passwd.cc, pinfo.cc, pinfo.h, pipe.cc, sec_acl.cc, sec_helper.cc, security.cc, security.h, thread.h, uinfo.cc, include/cygwin/acl.h: Fix copyright.
2002-02-10 * (child_info.h, cygheap.h, dcrt0.cc, dir.cc, fhandler.cc, fhandler.h,Corinna Vinschen
fhandler_clipboard.cc, fhandler_disk_file.cc, fhandler_dsp.cc, fhandler_floppy.cc, fhandler_mem.cc, fhandler_random.cc, fhandler_tape.cc, fhandler_zero.cc, grp.cc, mmap.cc, passwd.cc, pinfo.cc, pinfo.h, pipe.cc, sec_acl.cc, sec_helper.cc, security.cc, security.h, spawn.cc, syscalls.cc, thread.h, uinfo.cc, winsup.h): Change usage of uid_t to __uid16_t, gid_t to __gid16_t and off_t to __off32_t throughout. Use INVALID_UID, INVALID_GID and INVALID_SEEK instead casting -1 to the appropriate type. * winsup.h: Define INVALID_UID, INVALID_GID and INVALID_SEEK. * include/cygwin/acl.h: Define internal __aclent16_t and __aclent32_t types. Don't declare acl functions when compiling Cygwin. * include/cygwin/grp.h: Declare getgrgid() and getgrnam() with correct types for internal usage.
2001-10-24Ensure that all fhandler_*::read definitions are __stdcall throughout.Christopher Faylor
* fhandler.cc (fhandler_base::set_inheritance): Be more defensive in debugging code. * fhandler.h: Adjust regparms throughout to reflect passing 'this' parameter. * fhandler_console.cc (fhandler_console::read): Remove unneeded test. Only honor "key down" events. * miscfuncs.cc (strcasestr): Reorganize for efficient code use. (check_null_empty_str_errno): Ditto. (__check_null_invalid_struct_errno): Ditto. (__check_invalid_read_ptr_errno): Ditto. * syscalls.cc (_read): Return 0 when length == 0, as per Single UNIX Specification.
2001-10-22Remove 'cb' parameter and modify fhandler_* constructors throughout.Christopher Faylor
* dtable.cc (dtable::build_fhandler): Remove debugging output which uses 'cb'. * exec.cc (execvp): New function. (execvpe): Ditto. * fhandler.cc (fhandler_base::fhandler_base): Use constructor initialization. * fhandler.h (fhandler_tty_common::fhandler_tty_common): Ditto. * fhandler_clipboard.cc (fhandler_dev_clipboard::fhandler_dev_clipboard): Ditto. * fhandler_console.cc (fhandler_console::fhandler_console): Ditto. * fhandler_raw.cc (fhandler_dev_raw::fhandler_dev_raw): Ditto. * fhandler_serial.cc (fhandler_serial::fhandler_serial): Ditto. * fhandler_tty.cc (fhandler_tty_master::fhandler_tty_master): Ditto. (fhandler_tty_slave::fhandler_tty_slave): Ditto. (fhandler_pty_master::fhandler_pty_master): Ditto. * fhandler_windows.cc (fhandler_windows::fhandler_windows): Ditto.
2001-10-13* fhandler_dsp.cc (fhandler_dsp::ioctl): Return 0 for successfulChristopher Faylor
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-10-04* dcrt0.cc (dll_crt0_1): Don't close hexec_proc if it is NULL.Christopher Faylor
* fork.cc (vfork): Add debugging statements. * path.cc (get_device_number): Make static. Rewrite to inspect both unix and windows paths. (get_raw_device_number): Just check for parts of raw device that we care about. (get_devn): New function, pulled from get_device_number. (win32_device_name): Accomodate arg changes to get_device_number. (mount_info::get_device_number): Call get_device_number on translated Windows path. * spawn.cc (spawn_guts): Don't treat P_VFORK differently from P_NOWAIT. Add handle to child's shared region to child so that it will be preserved if the parent goes away. * fhandler.h: Throughout, simplify to one open method for all fhandler classes, requiring a path_conv first element. * fhandler.cc (fhandler_base::open): Remove obsolete method. Generalize to require path_conv * as first argument. (fhandler_disk_file::open): Remove obsolete method. (fhandler_disk_file::open): Use path_conv pointer rather than reference. * fhandler_clipboard.cc (fhandler_dev_clipboard::dup): Use new open method. (fhandler_dev_clipboard::open): Accomodate new argument for open methods. * fhandler_console.cc (fhandler_console::open): Ditto. (fhandler_console::dup): Use new open method. (fhandler_console::fixup_after_fork): Ditto. (fhandler_console::fixup_after_exec): Ditto. * fhandler_dsp.cc (fhandler_dev_dsp::open): Accomodate new argument for open methods. * fhandler_floppy.cc (fhandler_dev_floppy::open): Ditto. * fhandler_mem.cc (fhandler_dev_mem::open): Ditto. * fhandler_random (fhandler_dev_random::open): Ditto. * fhandler_raw.cc (fhandler_dev_raw::open): Ditto. * fhandler_serial.cc (fhandler_serial::open): Ditto. * fhandler_tape.cc (fhandler_dev_tape::open): Ditto. * fhandler_tty.cc (fhandler_tty_slave::open): Ditto. (fhandler_pty_master::open): Ditto. * fhandler_windows.cc (fhandler_windows::open): Ditto. * fhandler_zero.cc (fhandler_dev_zero::open): Ditto. * fhandler_socket.cc (fhandler_socket::set_connect_secret): Accomodate new argument for open methods. * syscalls.cc (_open): Ditto. (stat_worker): Ditto.
2001-09-06Move appropriate variables to NO_COPY segment, throughout.Christopher Faylor
2001-09-06Remove initialization of static or global values to zero, throughout. ThisChristopher Faylor
just needlessly grows the size of the DLL. * tty.cc (tty::alive): Make inuse handle non-inheriting on open, just for thread safety.
2001-07-26Throughout, reorganize header file inclusion to put security.h prior toChristopher Faylor
fhandler.h. * fhandler.h (fhandler_base::get_inheritance): New method. * fhandler_socket.cc (fhandler_socket::create_secret_event): Use proper close-on-exec inheritance when creating. (fhandler_socket::check_peer_secret_event): Create handle as non-inheritable.
2001-04-24Remove trailing underscore from fhandler_base and friends, throughout.Christopher Faylor
* fhandler.h (fhandler_base::set_open_status): New method. Stores original open status. (fhandler_base::get_open_status): New method. Retrieves original open status. (fhandler_base::reset_to_open_binmode): New method. * fhandler.cc (fhandler_base::open): Save open status. (fhandler_base::init): Ditto. * fhandler_clipboard.cc (fhandler_clipboard::open): Ditto. * fhandler_console.cc (fhandler_console::open): Ditto. * fhandler_dsp.cc (fhandler_dsp::open): Ditto. * fhandler_dev_mem.cc (fhandler_dev_mem::open): Ditto. * fhandler_dev_random.cc (fhandler_dev_random::open): Ditto. * fhandler_serial.cc (fhandler_serial::open): Ditto. * fhandler_tty_slave.cc (fhandler_tty_slave::open): Ditto. * fhandler_tty_master.cc (fhandler_tty_master::open): Ditto. * fhandler_dev_zero.cc (fhandler_dev_zero::open): Ditto. * syscalls.cc (setmode): Rework so that 0 mode value causes reversion to open state. * fhandler_tty_slave.cc (fhandler_tty_slave::read): Use correct multiplier when converting from deciseconds to milliseconds.
2001-03-23* fhandler.h (fhandler_dev_clipboard): Extend to support writing.Christopher Faylor
* fhandler_clipboard.cc (fhandler_dev_clipboard::fhandler_dev_clipboard): Initialize new fields. Open clipboard here. (fhandler_dev_clipboard::dup): New method. (fhandler_dev_clipboard::open): Accomodate new fields. Register clipboard here, if appropriate. (set_clipboard): New function. Moves buffer to clipboard. (fhandler_dev_clipboard::write): Truly implement clipboard writing. (fhandler_dev_clipboard::read): Reimplement to allow successive reads. (fhandler_dev_clipboard::lseek): Truly implement seeks in clipboard. (fhandler_dev_clipboard::close): Clear out new fields. Support sequential reads and sequential writes. Support for binary data via a native clipboard format.
2000-12-10* autoload.cc: Autoload CharToOemA.Christopher Faylor
* dcrt0.cc (dll_crt0_1): Translate command line to OEM if current codepage is OEM. * environ.cc: Add new option 'codepage' to CYGWIN environment variable. * fhandler_clipboard.cc (fhandler_clipboard::read): Read clipboard in OEM mode if current codepage is OEM. * fhandler_console.cc (fhandler_console::read): Only translate console input if current codepage is ANSI. * fhandler_console.cc (fhandler_console::write_normal): Translate output data if current codepage is ANSI. * pinfo.cc (codepage_init): New function. Setup current codepage from CYGWIN environment variable and set codepage for file APIs. * security.cc (read_sd): Translate file name to it if current codepage is OEM. * winsup.h: (sys_wcstombs,sys_mbstowcs): Use current codepage for translations between multibyte and widechar string and vice versa.
2000-10-28Whitespace cleanup.Christopher Faylor
* configure.in: Eliminate subdir stuff. * configure: Regenerate. * include/getopt.h (option): Make name field 'const'.
2000-10-17* fhandler_clipboard.cc: new fileDJ Delorie
* Makefile.in: include fhandler_clipboard.o in DLL_OFILES list. * fhandler.h: add FH_CLIPBOARD to the devices enum. (fhandler_dev_clipboard): new * path.cc (windows_device_names): add "\\dev\\clipboard" (get_device_number): check for "clipboard" * dcrt0.cc: declare a few more functions from winuser.h * dtable.cc (dtable::build_fhandler): check for FH_CLIPBOARD in switch().