summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin
Commit message (Collapse)AuthorAgeFilesLines
* * include/a.out.h: Add copyright hint.Corinna Vinschen2001-03-0548-0/+524
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * include/fcntl.h: Ditto. * include/lastlog.h: Ditto. * include/memory.h: Ditto. * include/mntent.h: Ditto. * include/paths.h: Ditto. * include/poll.h: Ditto. * include/syslog.h: Ditto. * include/termio.h: Ditto. * include/tzfile.h: Ditto. * include/arpa/inet.h: Ditto. * include/asm/byteorder.h: Ditto. * include/asm/socket.h: Ditto. * include/asm/types.h: Ditto. * include/cygwin/if.h: Ditto. * include/cygwin/mtio.h: Ditto. * include/cygwin/rdevio.h: Ditto. * include/cygwin/socket.h: Ditto. * include/net/if.h: Ditto. * include/netinet/in.h: Ditto. * include/netinet/in_systm.h: Ditto. * include/netinet/ip.h: Ditto. * include/netinet/ip_icmp.h: Ditto. * include/netinet/tcp.h: Ditto. * include/sys/cdefs.h: Ditto. * include/sys/cygwin.h: Ditto. * include/sys/ioctl.h: Ditto. * include/sys/mman.h: Ditto. * include/sys/mount.h: Ditto. * include/sys/mtio.h: Ditto. * include/sys/procfs.h: Ditto. * include/sys/resource.h: Ditto. * include/sys/smallprint.h: Ditto. * include/sys/socket.h: Ditto. * include/sys/strace.h: Ditto. * include/sys/syslog.h: Ditto. * include/sys/sysmacros.h: Ditto. * include/sys/termio.h: Ditto. * include/sys/termios.h: Ditto. * include/sys/uio.h: Ditto. * include/sys/un.h: Ditto. * include/sys/utsname.h: Ditto. * include/sys/vfs.h: Ditto. * include/sys/wait.h: Ditto. * regexp/regerror.c: Ditto. * regexp/regexp.h: Ditto. * regexp/regmagic.h: Ditto.
* * dlopen.c (dlopen): Return NULL when name is NULL (suggested byChristopher Faylor2001-03-0528-147/+315
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | chrisiasci@aol.com). * cygwin.din: Add a new, internally used export - _check_for_executable. * dcrt0.cc (dll_crt0_1): Set _check_for_executable for older binaries. Pass user_data to premain functions. * fhandler.cc (fhandler_disk_file::open): Only check for executable if the linked program is intereested in the executable bit. (fhandler_disk_file::check_execable_p): Delete. * fhandler.h (executable_states): New enumeration of various states of executable bit caring. (fhandler_base::set_execable_p): New method. * fhandler_termios.cc (fhandler_termios::line_edit): Flag when a signal has been sent to the tty. Return -1 when this is so. * fhandler_console.cc (fhandler_console::read): Return -1 when signal sending character encountered. * path.cc (path_conv::check): Record when path refers to a disk device. Move executable extension check here. (check_sysfile): Accomodate new EXEC path states. (has_suffix): Remove. (next_suffix): Remove. (class suffix_scan): New clas. (suffix_scan::has): New method. (suffix_scan:next): New method. (symlink_info::check): Use suffix_scan method to control for scanning for suffixes. * path.h (path_conv::exec_state): New method. * perprocess.h: Make "C" friendly. * include/cygwin/version.h: Define CYGWIN_VERSION_CHECK_FOR_S_IEXEC. Bump CYGWIN_VERSION_API_MINOR. * include/sys/cygwin.h: Change premain declarations. * winsup.h: Move __cplusplus test to after builtin defines.
* * fhandler.h (class fhandler_tty_common): New mutex and event toEgor Duda2001-03-045-68/+188
| | | | | | | | | | | | | | | | | | syncronize input on master tty with slave tty. * fhandler_tty.cc (fhandler_pty_master::accept_input): Use them to syncronize with slave. * fhandler_tty.cc (fhandler_tty_slave::read): Use input mutex and event to syncronize with master. Do not limit amount of data read from master to vmin value. Interrupt on signal and return already read data, if any. * fhandler_tty.cc (fhandler_tty_slave::open): Handle input mutex and event. * fhandler_tty.cc (fhandler_tty_common::close): Ditto. * fhandler_tty.cc (fhandler_tty_common::set_close_on_exec): Ditto. * fhandler_tty.cc (fhandler_tty_common::fixup_after_fork): Ditto. * fhandler_tty.cc (fhandler_tty_common::dup): Ditto. * tty.h (tty::open_input_mutex): New function. * tty.cc (tty::common_init): Create input mutex and event.
* *** empty log message ***Christopher Faylor2001-03-035-171/+171
|
* * dir.cc (readdir): Fix creating path in symlink check.Corinna Vinschen2001-03-022-1/+5
|
* * dir.cc (readdir): Fix shortcut==symlink condition.Corinna Vinschen2001-03-026-89/+141
| | | | | | | | | | | | | * environ.cc: Add extern decl for `allow_winsymlinks'. (struct parse_thing): Add entry for `[no]winsymlinks'. * path.cc (symlink): Change to be able to create both, symlink==shortcut and symlink==systemfile, dependent of the setting of `allow_winsymlinks'. * security.cc (cygwin_logon_user): Add debug output. * shortcut.c: Add defines from path.h. (has_exec_chars): Copy from path.h. (check_shortcut): Check for executable file condition if not a shortcut.
* * exceptions.cc (sig_handle_tty_stop): Ignore attempts to suspend a process ifChristopher Faylor2001-03-022-0/+9
| | | | started by non-cygwin parent.
* * select.cc (peek_console): Don't report read_ready on mouse events unless weChristopher Faylor2001-03-023-1/+11
| | | | | are looking for mouse events. * fhandler.h (fhandler_console::mouse_aware): New method.
* * uinfo.cc: Eliminate `#include <wchar.h>'.Corinna Vinschen2001-02-282-1/+4
|
* * fhandler_floppy.cc (fhandler_dev_floppy::lseek): DetermineEgor Duda2001-02-282-47/+91
| | | | | | drive geometry or partition size to allow seeking from the end of raw floppy device. Don't allow positioning past the end of media or to offsets bigger then max off_t.
* * fhandler.h (class fhandler_console): Make all variables thatEgor Duda2001-02-273-95/+245
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | describe "state" of console to be members of fhandler_console. default_color is now the color which is set when console recieves reset command. * fhandler_console.cc (fhandler_console::fhandler_console): Turn mouse handling and raw keyboard mode off by default. Initialize state information. * fhandler.cc (fhandler_console::set_raw_win32_keyboard_mode): New function. * fhandler_console.cc (fhandler_console::set_default_attr): New function. Reset console attributes to default values. * fhandler_console.cc (fhandler_console::open): Reset attributes. * fhandler_console.cc (fhandler_console::get_win32_attr): New function. Calculate win32-style console attribute based on terminal attributes. * fhandler_console.cc (fhandler_console::set_cursor_maybe): Use member variable. * fhandler_console.cc (fhandler_console::read): If in raw-win32 keyboard mode, encode win32 keyboard events in \033{x;y;z;t;u;wK sequences. * fhandler_console.cc (fhandler_console::dup): Copy all state information to the dup()ed handle. * fhandler_console.cc (fhandler_console::scroll_screen): Use current fill-in attribute. * fhandler_console.cc (fhandler_console::clear_screen): Ditto. * fhandler_console.cc (fhandler_console::char_command): Check if we saw '?' symbol by member variable. Set terminal attributes on \033[Xm commands. \033[24m - turn off underline mode, \033[27m - turn off reverse mode, \033[39m - restore default foreground color. \033[49m - restore default background color. \033[2000h - turn on raw keyboard mode, \033[2000l - turn off raw keyboard mode. * fhandler_console.cc (fhandler_console::write): Set attribues to default values on reset command.
* * times.cc (settimeofday): Replace function stub with working code.Christopher Faylor2001-02-262-3/+27
|
* * strace.cc (strace::vprntf): Move prntf functionality to this functionCorinna Vinschen2001-02-263-4/+50
| | | | | | | | | adding an va_list interface to strace. (strace::printf): Calls strace::vprntf now. (strace_printf): New function providing an extern "C" interface to trace output. * include/sys/strace.h: Make plain C clean. (class strace): Add `vprntf' method.
* * shortcut.c: Remove #include <sys/strace.h>.Corinna Vinschen2001-02-252-1/+4
|
* * path.cc (symlink): Add a ".lnk" suffix regardless. Add a comment.Corinna Vinschen2001-02-252-6/+10
|
* * shortcut.c: Change symlink condition.Corinna Vinschen2001-02-252-2/+7
|
* * mmap.cc (fhandler_disk_file::mmap): Use `addr' correctly.Corinna Vinschen2001-02-233-3/+8
| | | | * fhandler_mem.cc (fhandler_dev_mem::mmap): Ditto.
* * path.cc (symlink): Keep relative paths relative in the DOSCorinna Vinschen2001-02-222-11/+14
| | | | | path inside of a shortcut. If that's impossible or the target path is already absolute save an absolute path.
* * path.cc (symlink): Keep relative paths relative in the DOSCorinna Vinschen2001-02-222-4/+39
| | | | | path inside of a shortcut. If that's impossible for some reason, save an absolute path.
* * cygerrno.h: Revert previous patch.Corinna Vinschen2001-02-229-71/+72
| | | | | | | | | | | | | | | | | | | | | | * 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.
* * shortcut.c: New file. Provides a C interface to reading ofCorinna Vinschen2001-02-227-168/+253
| | | | | | | | | | | | | | | | | | | | 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'.
* * fhandler.cc (fhandler_disk_file::open): Use `inner_suffixes' whenCorinna Vinschen2001-02-223-2/+10
| | | | | resolving real_path. * path.cc (symlink): Ditto for win32_topath.
* Add copyright year 2001Corinna Vinschen2001-02-216-7/+7
|
* * Makefile.in: Add `-lshell32 -luuid' to link pass for new-cygwin1.dll.Corinna Vinschen2001-02-219-70/+403
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * autoload.cc: Add LoadDLLinitfunc for ole32.dll. Add LoadDLLfuncEx statements for CoInitialize@4, CoUninitialize@0 and CoCreateInstance@20. * dir.cc (dir_suffixes): New datastructure. (readdir): Check for R/O *.lnk files to hide the suffix. (opendir): Use `dir_suffixes' in path conversion. (rmdir): Ditto. * fhandler.cc (fhandler_disk_file::fstat): Add S_IFLNK flag before calling `get_file_attribute'. Take FILE_ATTRIBUTE_READONLY into account only if the file is no symlink. * path.cc (inner_suffixes): New datastructure. (SYMLINKATTR): Eliminated. (path_conv::check): Use `inner_suffixes' on inner path components. (shortcut_header): New global static variable. (shortcut_initalized): Ditto. (create_shortcut_header): New function. (cmp_shortcut_header): Ditto. (symlink): Create symlinks by creating windows shortcuts. Preserve the old code. (symlink_info::check_shortcut): New method. (symlink_info::check_sysfile): Ditto. (symlink_info::check): Check for shortcuts. Move code reading old system attribute symlinks into symlink_info::check_sysfile(). (chdir): Use `dir_suffixes' in path conversion. * security.cc (get_file_attribute): Check for S_IFLNK flag. Force 0777 permissions then. * spawn.cc (std_suffixes): Add ".lnk" suffix. * syscalls.cc (_unlink): Use `inner_suffixes' in path conversion. Check for shortcut symlinks to eliminate R/O attribute before calling DeleteFile(). (stat_suffixes): Add ".lnk" suffix. (stat_worker): Force 0777 permissions if file is a symlink.
* * sigproc.cc (getsem): Make semaphore always non-inheritable.Egor Duda2001-02-212-1/+5
|
* * dcrt0.cc (locale_init): Remove.Christopher Faylor2001-02-202-3/+4
|
* * cygwin.din: Export rand48 functions.Christopher Faylor2001-02-205-10/+33
| | | | | | * thread.cc (MTinterface::Init): Remove the initialization of `reent_data'. * dcrt0.cc: Add the initalizer to the declaration of `reent_data'. * include/cygwin/version.h: Bump CYGWIN_VERSION_API_MINOR to 35.
* * signal.cc (signal): Prohibit setting handlers for SIGKILL and SIGSTOPEgor Duda2001-02-163-3/+15
| | | | | * signal.cc (sigaction): Ditto * syscalls.cc (_lseek): Return EINVAL on invalid input
* * dlfcn.cc (dlopen): Do not call LoadLibrary with a NULL pointer, when theChristopher Faylor2001-02-142-1/+7
| | | | library is not found
* * fhandler_console.cc (fhandler_console::char_command): Ignore unknownChristopher Faylor2001-02-142-7/+5
| | | | rendition codes in \033[xx;yym control sequences
* * fork.cc (fork_parent): Return EAGAIN when can't record pid.Christopher Faylor2001-02-104-6/+26
| | | | | * pinfo.h (pinfo::remember): Return value of call to proc_subproc. * sigproc.cc (proc_subproc): Return error if can't record pid.
* * syscalls.cc (mknod): Add valid parameters.Christopher Faylor2001-02-092-1/+5
|
* * mmap.cc (mmap): Check for reusing a mapping only on MAP_SHAREDCorinna Vinschen2001-02-082-2/+8
| | | | and on MAP_PRIVATE|MAP_ANON in the special case of offset 0.
* * mmap.cc (class list): Add member `hash'.Corinna Vinschen2001-02-082-8/+25
| | | | | | | | (list::list): Initialize `hash'. (list::get_list_by_fd): Use filepath hash value to get the correct mapping list if it's not an anonymous mapping. (map::add_list): Initialize `hash' with filepath hash value. (mmap): Check for reusing a mapping only on MAP_SHARED.
* * signal.cc (killpg): Correct first argument.Christopher Faylor2001-02-072-1/+5
|
* * autoload.cc: Add LoadDLLinitfunc for iphlpapi.dll.Corinna Vinschen2001-02-076-163/+263
| | | | | | | | | | | | | | | | | | | | Add LoadDLLfuncEx statements for GetIfTable@12 and GetIpAddrTable@12. * fhandler_socket.cc (fhandler_socket::ioctl): Move variable definitions to the beginning of the function to allow better debugging. Add handling for SIOCGIFHWADDR, SIOCGIFMETRIC and SIOCGIFMTU. * net.cc: Include iphlpapi.h. (get_2k_ifconf): Rewritten. Uses IP Helper API now. (get_nt_ifconf): Add handling for SIOCGIFHWADDR, SIOCGIFMETRIC and SIOCGIFMTU. (get_95_ifconf): Ditto. Renamed from `get_9x_ifconf'. (get_ifconf): Name loopback `lo' instead of `lo0' as in Linux. Add handling for SIOCGIFHWADDR, SIOCGIFMETRIC and SIOCGIFMTU. Call `get_95_ifconf' only on Windows 95, `get_nt_ifconf' only on Windows NT < Service Pack 3, `get_2k_ifconf otherwise. * include/asm/socket.h: Add defines for SIOCGIFHWADDR, SIOCGIFMETRIC and SIOCGIFMTU. * include/cygwin/if.h: Add `ifr_hwaddr', `ifr_metric' and `ifr_mtu'. (struct ifreq): Add `ifru_hwaddr'.
* * syscalls.cc (stat_worker): Add a check for the special case whenCorinna Vinschen2001-02-062-18/+47
| | | | a process creates a file using mode 000 using ntsec.
* * fhandler.cc (fhandler_base::open): Always add GENERIC_READ accessCorinna Vinschen2001-02-054-6/+101
| | | | | | | | | | when opening raw disk devices. * fhandler_floppy.cc (fhandler_dev_floppy::lseek): Implement bytewise access. * fhandler_raw.cc (fhandler_dev_raw::open): Always open raw disk device binary. (fhandler_dev_raw::raw_write): Don't drop read buffer content when writing after read.
* * mmap.cc (mmap_record::fixup_map): New method to duplicateCorinna Vinschen2001-02-052-45/+83
| | | | | | | | | the memory protection in a just forked child. (mmap): Realign gran_len to page boundary only on anonymous mapping before saving in the mmap_record. (munmap): Cleanup code. (msync): Ditto. (fixup_mmaps_after_fork): Ditto. Call mmap_record::fixup_map now.
* * cygheap.cc (creturn): Correctly calculate cygheap_max.Christopher Faylor2001-02-022-2/+7
|
* * shared.cc (shared_info::initialize): Reduce size of heap.Christopher Faylor2001-01-312-1/+5
|
* * include/sys/resource.h: Fix typo.Corinna Vinschen2001-01-312-2/+6
|
* * include/sys/resources.h: Add RLIMIT_NLIMITS and RLIM_NLIMITS.Corinna Vinschen2001-01-312-0/+7
|
* * include/cygwin/version.h: Bump version to 1.3.0.Christopher Faylor2001-01-302-3/+7
|
* * pinfo.cc (pinfo::init): Use INVALID_HANDLE_VALUE instead ofCorinna Vinschen2001-01-303-3/+9
| | | | | explicit cast (HANDLE) 0xffffffff. * shared.cc (open_shared): Ditto.
* * fhandler_serial.cc (raw_write): Use local copy of OVERLAPPED structureChristopher Faylor2001-01-302-7/+15
| | | | instead of shared structure to fix a race condition between read/write.
* * mmap.cc (mmap): Remove obsolete check for MAP_SHARED|MAP_ANON asCorinna Vinschen2001-01-292-12/+7
| | | | being invalid.
* * mmap.cc (mmap_record::find_empty): Fix loop condition.Corinna Vinschen2001-01-292-1/+5
|
* * syscalls.cc (_link): Make sure that newpath does not exist. Set errno if itChristopher Faylor2001-01-298-59/+88
| | | | | | | | | | | | | | | does. * cygheap.cc (init_cheap): Don't specify a load address for the heap. It doesn't work on #!*& Windows 9x. (cygheap_init): Move GetUserName to memory_init. * dcrt0.cc (dll_crt0_1): Call new memory_init functin, eliminate call to heap_init. * heap.cc (heap_init): Improve error output. * heap.h: Correct some declarations. * shared.cc (mount_table_init): Remove. (memory_init): Renamed from shared_init. Reorganize to accomodate strange Windows 9x problems with cygheap/heap interaction. * shared_info.h: Rename shared_init to memory_init.
* * include/cygwin/version.h: Bump API version.Christopher Faylor2001-01-282-1/+6
|