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
2009-02-04 * fhandler_proc.cc (proc_tab): Add entry for mounts symlink.Corinna Vinschen
(format_proc_mounts): New function to implement mounts symlink. * fhandler_process.cc (process_tab): Add entry for mounts file. (format_process_mounts): New function to implement mounts file.
2009-01-20 * fhandler_procnet.cc: Reorganize global procnet content data into aCorinna Vinschen
new struct virt_tab_t. Accommodate throughout. * fhandler.h: Fix copyright dates. * fhandler_process.cc: Ditto. * fhandler_registry.cc: Ditto.
2009-01-20 * devices.h (FH_PROCESSFD): New device type.Corinna Vinschen
* dtable.cc (build_fh_pc): Add case for FH_PROCESSFD. * fhandler.h (class fhandler_virtual): Drop bufalloc member. * fhandler_virtual.h: New header. * fhandler_proc.cc: Remove types proc_type_t and proc_tab_t in favor of types virt_type_t and virt_tab_t from fhandler_virtual.h. Change prototypes of format_XXX functions accordingly. (proc_tab): Drop size member info. (fhandler_proc::fill_filebuf): Don't allocate filebuf here. Allocate it in the format_XXX functions. * fhandler_process.cc: Reorganize global process content data into a new struct virt_tab_t. Accommodate throughout. (format_process_winexename): New function. (format_process_winpid): New function. (format_process_exename): New function. (format_process_root): New function. (format_process_cwd): New function. (format_process_cmdline): New function. (format_process_ppid): New function. (format_process_uid): New function. (format_process_pgid): New function. (format_process_sid): New function. (format_process_gid): New function. (format_process_ctty): New function. (format_process_fd): New function. * fhandler_procnet.cc (fhandler_procnet::fill_filebuf): Don't use bufalloc. * fhandler_registry.cc (fhandler_registry::fill_filebuf): Define bufalloc locally. * fhandler_virtual.cc (fhandler_virtual::fhandler_virtual): Drop initialization of bufalloc. (fhandler_virtual::dup): Drop copying bufalloc.
2008-09-11* cygheap.cc (creturn): Reorganize to avoid a new compiler warning/error.Christopher Faylor
* dtable.cc (handle_to_fn): Ditto. * fhandler_console.cc (fhandler_console::read): Ditto. (fhandler_console::scroll_screen): Ditto. (dev_console::set_color): Ditto. * fhandler_dsp.cc (fhandler_dev_dsp::write): Ditto. (fhandler_dev_dsp::read): Ditto. * fhandler_tape.cc (mtinfo_drive::get_status): Ditto. * hookapi.cc (find_first_notloaded_dll): Ditto. * mmap.cc (msync): Ditto. * pipe.cc (pipesync::pipesync): Ditto. * sec_acl.cc (getace): Ditto. * sec_auth.cc (create_token): Ditto. (lsaauth): Ditto. * select.cc (peek_pipe): Ditto. * spawn.cc (av::fixup): Ditto. * syscalls.cc (popen): Ditto. * tty.cc (tty::init_session): Ditto. * uinfo.cc (pwdgrp::load): Ditto. * fhandler.cc (fhandler_base::setup_overlapped): Ditto. (fhandler_base::wait_overlapped): Rename second use of res variable to wres or errors are not returned correctly. * dcrt0.cc: Remove obsolete variable. * dll_init.cc (release_upto): Fix typo involving incorrect use of '|'. * fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Avoid a compiler warning regarding coercing type-punned variables. (fhandler_base::fstat_by_name): Ditto. fhandler_fifo.cc (fhandler_fifo::open_nonserver): Fix = vs. == typo. (fhandler_fifo::wait): Add all conditions to switch statement to avoid a compiler warning. * fhandler_process.cc: Avoid unneeded initialization of variables to zero. (fhandler_socket::listen): Add braces around initializer. * flock.cc (inode_t::get_all_locks_list): Reorganize to avoid a compiler warning. Fix problem with EWOULDBLOCK error return. * path.cc (GUID_shortcut): Use braces around struct initializer. (cygwin_conv_path): Reorganize to avoid a compiler warning. * random.cc (dummy): Mark variable as volatile to avoid a "used uninitialized" warning. * libc/getopt.c: Mark some variables as dllexport although gcc doesn't seem to do the right thing with them. * libc/minires-os-if.c (get_registry_dns_items): Coerce some function arguments to avoid a compiler warning.
2008-07-17 Add case-sensitivity.Corinna Vinschen
Unconditionally handle mount points case-sensitive. Unconditionally handle virtual paths case-sensitive. Unconditionally handle registry paths case-insensitive. Otherwise, accommodate case-sensitivity of given path throughout. * cygheap.cc (cygheap_root::set): Get additional caseinsensitive parameter and store it. * cygheap.h (struct cygheap_root_mount_info): Add member caseinsensitive. * dlfcn.cc (get_full_path_of_dll): Drop PC_NOFULL parameter from call to path_conv::check. * environ.cc (pcheck_case): Remove. (check_case_init): Remove. (known): Drop "check_case" option. * exceptions.cc (open_stackdumpfile): Add comment. * fhandler.cc (fhandler_base::get_default_fmode): Call pathmatch instead of strcasematch. * fhandler_disk_file.cc: Accommodate case-sensitivity of given path throughout. (__DIR_mounts::check_mount): Unconditionally check virtual paths case-sensitive. (fhandler_disk_file::link): Drop case clash handling. (fhandler_disk_file::open): Ditto. (fhandler_disk_file::readdir_helper): Drop managed mount code. * mount.cc: Remove managed mount code and datastructures. (struct opt): Remove "managed" option. Add "posix=0" and "posix=1" options. (fillout_mntent): Remove "managed" output. Add "posix" output. * path.cc (struct symlink_info): Remove case_clash member and case_check method. (pcheck_case): Remove. (path_prefix_p): Take additional bool parameter "caseinsensitive". (pathnmatch): Ditto. (pathmatch): Ditto. (mkrelpath): Ditto. (fs_info::update): Set caseinsensitive flag according to file system name and FILE_CASE_SENSITIVE_SEARCH flag. Add comment. (tfx_chars_managed): Remove. (transform_chars): Drop "managed" parameter. Always use tfx_chars. (get_nt_native_path): Drop "managed" parameter. Make sure drive letters are always upper case. (getfileattr): Change second parameter to denote caseinsensitivity. (path_conv::check): Initialize caseinsensitive to OBJ_CASE_INSENSITIVE. Set caseinsensitive according to global obcaseinsensitive flag, file system case sensitivity and MOUNT_NOPOSIX mount flag. Drop case_clash and all the related code. (symlink_worker): Drop case clash handling. (symlink_info::set): Drop setting case_clash. (symlink_info::case_check): Remove. (cwdstuff::set): Add comment. (etc::init): Take path_conv instead of PUNICODE_STRING as parameter to allow case sensitivity. * path.h (enum pathconv_arg): Drop PC_SYM_IGNORE. (enum case_checking): Remove. (enum path_types): Drop PATH_ENC, add PATH_NOPOSIX flag. (struct fs_info): Add caseinsensitive flag and accessor methods. (class path_conv): Add caseinsensitive member and define objcaseinsensitive method. Drop case_clash member and isencoded method. (pathmatch): Change prototype according to above change. (pathnmatch): Ditto. (path_prefix_p): Ditto. (get_nt_native_path): Ditto. (class etc): Ditto. (fnunmunge): Remove prototype. * shared.cc (shared_info::init_obcaseinsensitive): Initialize obcaseinsensitive flag from obcaseinsensitive registry value. (shared_info::initialize): Call init_obcaseinsensitive here by the first process creating the shared memory. * shared_info.h (mount_item::fnmunge): Remove. (shared_info::obcaseinsensitive): Rename from obcaseinsensitivity. (shared_info::init_obcaseinsensitive): Declare. * syscalls.cc (try_to_bin): Add comment. * include/sys/mount.h (MOUNT_ENC): Remove flag. (MOUNT_NOPOSIX): Add flag.
2008-04-13 * fhandler_disk_file.cc (fhandler_disk_file::readdir_helper): SimplifyCorinna Vinschen
code which checks for symlinks. Fix problem with UNC paths. * environ.cc (struct parse_thing): Remove transparent_exe option. * syscalls.cc (transparent_exe): Remove. (unlink): Always add stat_suffixes, drop transparent_exe check. (open): Ditto. (link): Ditto. (pathconf): Ditto. * fhandler_disk_file.cc (fhandler_disk_file::link): Ditto. * fhandler_process.cc (fhandler_process::fill_filebuf): Always remove .exe suffix. * path.cc (realpath): Never attach known_suffix.
2008-04-07Remove unneeded header files from source files throughout.Christopher Faylor
2008-04-01 * Fix copyright dates.Corinna Vinschen
2008-03-07 * Makefile.in (DLL_OFILES): Add tls_pbuf.o.Corinna Vinschen
* autoload.cc (CreateDesktopW): Replace CreateDesktopA. (CreateWindowStationW): Replace CreateWindowStationA. (GetUserObjectInformationW): Replace GetUserObjectInformationA. * cygheap.h (cwdstuff::get): Assume default buffer size NT_MAX_PATH. * cygtls.cc (_cygtls::remove): Free temporary TLS path buffers. * cygtls.h (TP_NUM_C_BUFS): Define. (TP_NUM_W_BUFS): Define. (class tls_pathbuf): New class to store pointers to thread local temporary path buffers. (_local_storage::pathbufs): New member. * environ.cc (win_env::add_cache): Use temporary TLS path buffer instead of stack based buffer. (posify): Get temporary outenv buffer from calling function. (environ_init): Create temporary TLS path buffer for posify. (build_env): Create Windows environment block as WCHAR buffer. * environ.h (build_env): Change declaration accordingly. * external.cc (sync_winenv): Accommodate build_env change. * fhandler_console.cc (fhandler_console::need_invisible): Use GetUserObjectInformationW and CreateWindowStationW. * fhandler_process.cc (format_process_maps): Use temporary TLS path buffer instead of stack based buffer. * fork.cc (frok::parent): Convert to use CreateProcessW. * path.cc: Throughout use temporary TLS path buffers instead of stack based buffer. Replace checks for CYG_MAX_PATH by checks for NT_MAX_PATH. (getfileattr): New function to replace GetFileAttributesA. (normalize_win32_path): Remove Win32 and NT long path prefixes. (getwd): Assume PATH_MAX + 1 buffer per SUSv3. * path.h (class path_conv): Set path buffer to size NT_MAX_PATH. (iswdrive): Define. * pinfo.cc (commune_process): Use temporary TLS path buffer instead of stack based buffer. * registry.cc (get_registry_hive_path): Ditto. (load_registry_hive): Ditto. * spawn.cc (spawn_guts): Convert to use CreateProcessW and CreateProcessAsUserW. (av::fixup): Open/close file using NtOpenFile/NtClose. * syscalls.cc (mknod_worker): Allow PATH_MAX file name. (mknod32): Ditto. (getusershell): Ditto. * tls_pbuf.cc: New file implementing tls_pathbuf and tmp_pathbuf methods. * tls_pbuf.h: New header for files using tmp_pathbuf. * tlsoffsets.h: Regenerate. * winsup.h (NT_MAX_PATH): Define as 32767 to avoid USHORT overflow.
2008-02-15Perform whitespace cleanup throughout.Christopher Faylor
* dcrt0.cc (signal_shift_subtract): Eliminate ancient backwards compatibility. (check_sanity_and_sync): Ditto. * winsup.h (SIGTOMASK): Ditto. Just use constant in signal calculation. * include/cygwin/version: Remove backwards signal mask compatibility define. * path.cc (symlink_info::check_sysfile): Cosmetic change. * registry.cc (get_registry_hive_path): Remove unneeded variable. * exceptions.cc (handle_sigsuspend): Eliminate thread signal mask and use either main sigmask or current thread sigmask. (set_process_mask): Ditto. (sighold): Ditto. (sigrelse): Ditto. (sigset): Ditto. (set_process_mask_delta): Ditto. (_cygtls::call_signal_handler): Ditto. * fhandler_process.cc (format_process_status): Ditto. * fhandler_termios.cc (fhandler_termios::bg_check): Ditto. * pinfo.h (class pinfo): Ditto. * select.cc (pselect): Ditto. * signal.cc (sigprocmask): Ditto. (abort): Ditto. (sigpause): Ditto. (sigsend): Ditto. (wait_sig): Ditto. * thread.h (pthread::parent_tls): New member. * thread.cc (pthread::pthread): Record parent_tls here. (pthread::thread_init_wrapper): Initialize sigmask from parent thread.
2008-02-14 * cygheap.cc (cwcsdup): New function.Corinna Vinschen
(cwcsdup1): New function. * cygheap.h (cygheap_user::get_windows_id): New method returning PWCHAR. (cwcsdup): Declare. (cwcsdup1): Declare. * registry.cc (get_registry_hive_path): Use WCHAR instead of char throughout. (load_registry_hive): Ditto. * registry.h (get_registry_hive_path): Change declaration accordingly. (load_registry_hive): Ditto. * sec_helper.cc (cygpsid::string): New method returning PWCHAR. * security.h (cygpsid::string): Declare. * syscalls.cc (seteuid32): Convert local name var to WCHAR. * uinfo.cc (cygheap_user::env_userprofile): Convert local name buffers to WCHAR. Call sys_wcstombs_alloc to generate puserprof buffer. * winsup.h: Fix comment. (NT_MAX_PATH): New definition for maximum internal path length. Use throughout where appropriate. * include/limits.h (PATH_MAX): Set to 4096 as on Linux.
2008-02-01 * string.h: Re-enable inline strcasematch and strncasematchCorinna Vinschen
implementations and rename to ascii_strcasematch/ascii_strncasematch. * dcrt0.cc: Replace str[n]casematch with ascii_str[n]casematch where applicable. * environ.cc: Ditto. * fhandler_process.cc: Ditto. * hookapi.cc: Ditto. * path.cc: Ditto. * spawn.cc: Ditto. * strace.cc: Ditto. * syscalls.cc: Ditto. * uinfo.cc: Ditto. * winf.cc: Ditto.
2007-12-06 * dcrt0.cc (initial_env): Use PATH_MAX instead of CYG_MAX_PATH for pathCorinna Vinschen
name buffer size. (dll_crt0_1): Allocate new_argv0 with PATH_MAX size. * exceptions.cc (debugger_command): Set size to 2 * PATH_MAX + 20; (error_start_init): Use PATH_MAX instead of CYG_MAX_PATH for path name buffer size. * external.cc (fillout_pinfo): Always fill out ep.progname 0-terminated. Fill out ep.progname_long. * fhandler_process.cc (fhandler_process::fill_filebuf): Allocate buffer for executable filename with PATH_MAX size. * pinfo.cc: Throughout use PATH_MAX instead of CYG_MAX_PATH. * pinfo.h (class _pinfo): Set progname size to PATH_MAX. * smallprint.cc: Include limits.h. Use PATH_MAX instead of CYG_MAX_PATH for path name buffer size. * strace.cc (strace::vsprntf): Ditto. * include/sys/cygwin.h (EXTERNAL_PINFO_VERSION_32_LP): Define. (EXTERNAL_PINFO_VERSION): Set to EXTERNAL_PINFO_VERSION_32_LP. (struct external_pinfo): Add progname_long member. * include/sys/dirent.h: Correctly include limits.h instead of sys/limits.h.
2007-12-03 * autoload.cc (GetModuleFileNameExW): Replace definition ofCorinna Vinschen
GetModuleFileNameExA. * fhandler_process.cc (format_process_maps): Change modname type to WCHAR. Set buffer sizes to PATH_MAX. Call GetModuleFileNameExW instead of GetModuleFileNameExA. Call mount_info::conv_to_posix_path instead of cygwin_conv_to_full_posix_path. Set posix_modname to modname if that call fails. (format_process_stat): Set cmd buffer size to NAME_MAX + 1. Simplify setting cmd to process name. (format_process_status): Ditto. * path.cc (mount_info::conv_to_posix_path): Call sys_wcstombs correctly.
2007-11-27Change many cygheap allocation routines to their *_abort analogs.Christopher Faylor
* cygheap.cc (cmalloc_abort): New function. (crealloc_abort): Ditto. (ccalloc_abort): Ditto.
2007-06-29 * cygwin.din: Export fdopendir.Corinna Vinschen
* dir.cc (opendir): Call fhandler's opendir with fd set to -1. (fdopendir): New function. (seekdir64): Use dirent_info_mask. (rewinddir): Ditto. (closedir): Only release underlying file descriptor if it has been reserved by opendir itself. * fhandler.cc (fhandler_base::opendir): Accommodate new parameter. * fhandler.h (dirent_states): Add dirent_valid_fd and dirent_info_mask. (fhander_XXX::opendir): Add file descriptor parameter. Use regparms. (fhandler_procnet::opendir): Drop declaration. * fhandler_disk_file.cc (fhandler_disk_file::opendir): Ditto. If called from fdopendir, use existing handle to re-open directory with valid flags. Rename fd to cfd. Use only if no valid incoming fd. (fhandler_cygdrive::opendir): Accommodate new parameter. * fhandler_process.cc (fhandler_process::opendir): Ditto. * fhandler_procnet.cc (fhandler_procnet::opendir): Drop definition. * fhandler_virtual.cc (fhandler_virtual::opendir): Accommodate new parameter. Only create new file descriptor entry if called from opendir. Remove duplicated setting of dir->__flags. * posix.sgml: Add fdopendir to list of implemented Solaris functions. * include/cygwin/version.h: Bump API minor number. * include/sys/dirent.h: Declare fdopendir.
2007-03-06 * fhandler_mailslot.cc (fhandler_mailslot::fstat): Set new stat memberCorinna Vinschen
st_birthtim to useful value. * fhandler_process.cc (fhandler_process::fstat): Ditto. * fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Take additional parameter for creation time. Fill st_birthtim with it. Accomodate additional creation time parameter throughout. * fhandler_raw.cc (fhandler_dev_raw::fstat): Set new stat member st_birthtim to useful value. * fhandler.cc (fhandler_base::fstat): Ditto. * fhandler_registry.cc (fhandler_registry::fstat): Ditto. * include/cygwin/version.h: Bump API minor number. * include/cygwin/stat.h (struct __stat64): Replace st_spare4 with timestruc_t st_birthtim. (struct stat): Ditto if __CYGWIN_USE_BIG_TYPES__ is defined. (st_birthtime): Define if __CYGWIN_USE_BIG_TYPES__ is defined.
2007-02-22 * Makefile.in (DLL_IMPORTS): Add libntdll.a.Corinna Vinschen
* autoload.cc: Remove all symbols from advapi32.dll, kernel32.dll and ntdll.dll available on all platforms since NT4. Throughout remove all usage of wincap.is_winnt. * dcrt0.cc (dll_crt0_0): Remove call to mmap_init. * fhandler.h (class fhandler_base): Remove has_changed flag. (fhandler_disk_file::touch_ctime): Remove declaration. (fhandler_disk_file::readdir_9x): Ditto. (fhandler_disk_file::touch_ctime): Remove. (fhandler_disk_file::readdir_9x): Remove. (fhandler_disk_file::closedir): Call NtClose instead of CloseHandle. * mmap.cc: Throughout call CreateMapping and MapView directly. (VirtualProt9x): Remove. (VirtualProtNT): Remove. (VirtualProtEx9x): Remove. (VirtualProtExNT): Remove. (VirtualProtect): Remove define. (VirtualProtectEx): Remove define. (CreateMapping9x): Remove. (CreateMappingNT): Rename to CreateMapping. (MapView9x): Remove. (MapViewNT): Rename to MapView. (struct mmap_func_t): Remove definition. (mmap_funcs_9x): Remove. (mmap_funcs_nt): Remove. (mmap_func): Remove. (mmap_init): Remove. * net.cc (getdomainname): Drop comment. Use NT4 registry key only. (get_95_ifconf): Remove. * pinfo.cc (winpids::enumNT): Rename to winpids::enum_processes. (winpids::enum9x): Remove. (winpids::set): Just call enum_processes directly. (winpids::enum_init): Ditto. * pinfo.h (class winpids): Drop enum_processes pointer. Rename enumNT to enum_processes. Drop enum9x declaration. Drop initialization of enum_processes throughout. * registry.cc (get_registry_hive_path): Just create NT key. (load_registry_hive): Only load NT specific file. * syscalls.cc (unlink_9x): Remove. (unlink): Just call unlink_nt. * wincap.cc: Remove is_winnt flag throughout. * wincap.h: Ditto. * winsup.h: Remove mmap_init declaration.
2006-02-11* fhandler_process.cc (format_process_stat): Use cygwin-derived start time evenChristopher Faylor
on NT since it is the logical start time of the "process". * pinfo.cc (set_myself): Don't set start time when it should have already been set previously.
2006-02-05 * environ.cc (struct parse_thing): Add transparent_exe option.Corinna Vinschen
* fhandler_disk_file.cc (fhandler_disk_file::link): Accomodate transparent_exe option. Add .exe suffix for links to executable files, if transparent_exe is set. * fhandler_process.cc (fhandler_process::fill_filebuf): Remove .exe suffix if transparent_exe option is set. * path.cc (symlink_worker): Accomodate transparent_exe option. (realpath): Don't tack on .exe suffix if transparent_exe is set. * syscalls.cc (transparent_exe): New global variable. (unlink): Accomodate transparent_exe option. (open): Ditto. (link): Ditto. (rename): Ditto. Maybe add .exe suffix when renaming executable files. (pathconf): Accomodate transparent_exe option. * winsup.h: Declare transparent_exe.
2006-01-28 * autoload.cc (NtQueryDirectoryFile): Define.Corinna Vinschen
* 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.
2006-01-24 * fhandler_process.cc (fhandler_process::fill_filebuf): DisableCorinna Vinschen
stripping the .exe suffix from the link target in PROCESS_EXE and PROCESS_EXENAME case. * path.cc (realpath): Tack on .exe suffix if necessary.
2006-01-04* fhandler_process.cc (fhandler_process::readdir): Add missing argument toChristopher Faylor
syscall_printf. * fhandler_console.cc (fhandler_console::need_invisible): Use made-up name for windows station rather than asking Windows to create one for us. * spawn.cc (spawn_guts): Don't mess with console if we're detaching.
2005-11-29 * autoload.cc (NtCreateSection): Define.Corinna Vinschen
* cygheap.cc (_csbrk): Call getpagesize instead of getshmlba. * dcrt0.cc (dll_crt0_0): Call mmap_init. * external.cc (cygwin_internal): Call getpagesize instead of getshmlba. * fhandler.h (fhandler_base::mmap): Change access to prot parameter. (fhandler_base::fixup_mmap_after_fork): Ditto. (fhandler_disk_file::mmap): Ditto. (fhandler_disk_file::fixup_mmap_after_fork): Ditto. (fhandler_dev_mem::mmap): Ditto. (fhandler_dev_mem::fixup_mmap_after_fork): Ditto. * fhandler_mem.cc (fhandler_dev_mem::write): Call getsystempagesize instead of getpagesize. (fhandler_dev_mem::read): Ditto. (fhandler_dev_mem::fstat): Ditto. (fhandler_dev_mem::mmap): Move to mmap.cc. (fhandler_dev_mem::munmap): Ditto. (fhandler_dev_mem::msync): Ditto. (fhandler_dev_mem::fixup_mmap_after_fork): Ditto. * fhandler_proc.cc (format_proc_meminfo): Call getsystempagesize instead of getpagesize. * fhandler_process.cc (format_process_stat): Ditto. (format_process_status): Ditto. (get_mem_values): Ditto. * mmap.cc: Fix formatting. Try to make more readable and modular. Take advantage of pagesize==granularity. (gen_protect): New static function to evaluate Windows protection bits from POSIX protection and flags. (gen_access): Ditto for Windows access mode. (VirtualProt9x): Wrapper function to call VirtualProtect on 9x. (VirtualProtNT): Ditto for NT. (VirtualProtEx9x): Ditto for VirtualProtectEx on 9x. (VirtualProtExNT): Ditto for NT. (CreateMapping9x): Wrapper function for creating a mapping handle on 9x. (CreateMappingNT): Ditto for NT. (MapView9x): Wrapper function to map a view on 9x. (MapViewNT): Ditto for NT. (mmap_funcs_9x): Structure containing function pointers to wrapper functions for 9x. (mmap_funcs_nt): Ditto for NT. (mmap_func): Pointer to wrapper functions used in subsequent code. (mmap_init): Initialize mmap_func depending on OS. (class mmap_record): Use sensible member names. Add POSIX protection member. Drop Windows access flags member. Constify more methods. Use accessors instead of direct member access inside of own methods. (mmap_record::gen_protect): Class wrapper to evaluate matching Windows protection bits. (mmap_record::gen_access): Ditto for Windows access flags. (mmap_record::compatible_flags): New function to check if flags are compatible with flags of existing map. (list::add_record): Drop offset and length arguments. (class map): Change counters to unsigned. Match usage throughout. (mmapped_areas): Convert from pointer to global struct. (mmap_record::alloc_page_map): Simplify. (mmap_record::map_pages): Ditto. (mmap_record::fixup_page_map): Delete. (mmap64): Simplify. Add workaround for Windows 98 bug. Fix bug on NT that existing anonymous mappings weren't searched for a match. (munmap): Add workaround for Windows 98 bug. (msync): Simplify. (mprotect): Handle existing maps correctly. (mlock): Add local pagesize variable and enlightening comment. (fhandler_disk_file::mmap): Main functionality now in CreateMapping/ MapView wrapper functions. (fhandler_disk_file::fixup_mmap_after_fork): Call MapView wrapper. (fhandler_dev_mem::mmap): Moved from fhandler_mem.cc. Simplify by calling MapViewNT. (fhandler_dev_mem::munmap): Moved from fhandler_mem.cc. (fhandler_dev_mem::msync): Ditto. (fhandler_dev_mem::fixup_mmap_after_fork): Ditto. Call MapViewNT. (fixup_mmaps_after_fork): Restructure and hopefully speed up loop for setting protection and memory content on MAP_PRIVATE maps. * ntdll.h (AT_ROUND_TO_PAGE): Remove define. (AT_EXTENDABLE_FILE): Add define. (NtCreateSection): Add prototype. * syscalls.cc (getpagesize): Return granularity as pagesize now. (getsystempagesize): New function to retrieve "real" pagesize. (getshmlba): Delete since it's replaced by getpagesize now. * wincap.h (wincaps::has_mmap_alignment_bug): New element. * wincap.cc: Implement above element throughout. * winsup.h (getshmlba): Drop prototype. (getsystempagesize): Add prototype. (mmap_init): Ditto. * include/sys/mman.h: (Not yet) define MAP_NORESERVE.
2005-08-24* cygheap.h (cygheap_types): Add HEAP_COMMUNE.Christopher Faylor
* fhandler_proc.cc: Use cygheap rather than user heap for allocation of filebuf throughout. * fhandler_registry.cc: Ditto. * fhandler_virtual.cc: Ditto. * fhandler_process.cc: Ditto. (get_mem_values): Use malloc/realloc/free rather than new. * pinfo.cc (_pinfo::commune_send): Allocate on cygwin heap rather than user heap. Avoid calling ReadFile when correct number of characters have been read or suffer buffer corruption. (_pinfo::fd): Allocate on cygwin heap rather than user heap. (_pinfo::fds): Ditto. (_pinfo::root): Ditto. (_pinfo::cwd): Ditto. (_pinfo::cmdline): Ditto. * devices.h (FH_DEV): New define. * devices.in: Detect lone /dev. * devices.cc: Regenerate. * path.cc (path_conv::check): Treat FH_DEV as a special case.
2005-08-20* cygerrno.h (geterrno_from_win_error): Change declaration to default to usingChristopher Faylor
GetLastError and EACCESS. * cygwin.din: Export readdir_r. * include/cygwin/version.h: Bump API version number to 138. * syscalls.cc (readdir_worker): New function, renamed from old readdir() function. (readdir): Use readdir_worker. (readdir_r): New function. * fhandler.h (fhandler_base::readdir): Accommodate second argument indicating dirent buffer. (fhandler_disk_file::readdir): Ditto. (fhandler_cygdrive::readdir): Ditto. (fhandler_proc::readdir): Ditto. (fhandler_netdrive::readdir): Ditto. (fhandler_registry::readdir): Ditto. (fhandler_process::readdir): Ditto. * fhandler.cc (fhandler_base::readdir): Ditto. * fhandler_disk_file.cc (fhandler_disk_file::readdir): Ditto. * fhandler_cygdrive.cc (fhandler_cygdrive::readdir): Ditto. * fhandler_proc.cc (fhandler_proc::readdir): Ditto. * fhandler_netdrive.cc (fhandler_netdrive::readdir): Ditto. * fhandler_registry.cc (fhandler_registry::readdir): Ditto. * fhandler_process.cc (fhandler_process::readdir): Ditto.
2005-08-19* fhandler.h (dirent_states): Add dirent_isroot, dirent_saw_cygdrive,Christopher Faylor
dirent_saw_dev. * dir.cc (opendir): Don't zero __flags here. Push that responsibility to opendir methods. (seekdir): Preserve dirent_isrrot in __flags. (rewinddir): Ditto. * fhandler_disk_file.cc (fhandler_disk_file::opendir): Set dirent_isroot appropriately. (fhandler_disk_file::readdir): Fill in "cygdrive" and "dev" if it is the root dir and they are missing. * fhandler_process.cc (fhandler_process::opendir): Set __flags here. * fhandler_virtual.cc (fhandler_virtual::opendir): Set __flags here.
2005-08-08 * fhandler_process.cc (fhandler_process::open): Allow opening ofCorinna Vinschen
/proc/<pid>/fd for reading. * fhandler_registry.cc (fhandler_registry::open): Ditto for registry keys.
2005-07-07Eliminate (void) cast on standalone function calls throughout.Christopher Faylor
2005-05-02white space and minor comment cleanup.Christopher Faylor
2005-04-13 * cygerrno.h (__seterrno_from_nt_status): Define. Always set Win32Corinna Vinschen
error code as well as errno. Use throughout where errno is set from NT status. (set_errno): Evaluate val only once. * fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Fix typo in debug output. * fhandler_mem.cc (fhandler_dev_mem::open): Rely on __seterrno_from_nt_status setting Win32 error code in debug output. * fhandler_proc.cc (format_proc_uptime): Ditto. (format_proc_stat): Ditto. * fhandler_process.cc (format_process_stat): Ditto. * sysconf.cc (sysconf): Ditto.
2005-04-03 Unify usage of CYG_MAX_PATH throughout. Change buffers fromCorinna Vinschen
size CYG_MAX_PATH + 1 to CYG_MAX_PATH. Change length tests accordingly.
2005-03-29 * fhandler_process.cc: Re-add exename.Corinna Vinschen
2005-02-13white spaceChristopher Faylor
2005-02-01 * fhandler.cc (fhandler_base::get_proc_fd_name): Don't generateCorinna Vinschen
"device:" entry. * fhandler.h (fhandler_socket::open): New method. (fhandler_pipe::open): New method. * fhandler_proc.cc (fhandler_proc::exists): Return -2 in case of /proc/self. * fhandler_process.cc (fhandler_process::exists): Return -2 in case of symlinks, -3 for pipes and -4 for sockets. (fhandler_process::fstat): Handle pipes and sockets. (fhandler_process::open): Handle opening /proc/<pid>/fd. (fhandler_process::fill_filebuf): Generate empty names for non exisiting file descriptors. * fhandler_socket.cc (fhandler_socket::get_proc_fd_name): Always generate "socket:[number]" strings as on Linux. (fhandler_socket::open): New method. (fhandler_socket::fstat): Always return socket type. * path.cc (symlink_info::set): Remove unused second parameter. (path_conv::check): Handle pipes and sockets in /proc. Set correct device type for AF_LOCAL sockets. * pinfo.cc (_pinfo::commune_recv): Generate empty names for non exisiting file descriptors. (_pinfo::fd): Ditto. * pipe.cc (fhandler_pipe::open): New method.
2005-01-31 * fhandler_process.cc (format_process_maps): Get destbuf argument byCorinna Vinschen
reference. Allow resizing of destbuf as necessary. Fix string handling.
2005-01-31 * cygheap.h (class cygheap_fdenum): New class to enumerate usedCorinna Vinschen
fhandlers. * dtable.h (class dtable): Add cygheap_fdenum as friend class. * fhandler.h (fhandler_base::get_proc_fd_name): New virtual method to return a name for /proc/<pid>/fd. (fhandler_socket::get_proc_fd_name): Ditto. (fhandler_pipe::get_proc_fd_name): Ditto. (fhandler_virtual::opendir): Make virtual method. (fhandler_process::opendir): New method. * fhandler.cc (fhandler_base::get_proc_fd_name): New method. * fhandler_process.cc: Include ctype.h. (PROCESS_FD): Define. (process_listing): Add "fd". (fhandler_process::exists): Fix comment. Return 1 in case of "fd" directory. Handle files below "fd". (fhandler_process::fstat): Drop "self" handling. Set correct link count for directories. (fhandler_process::opendir): New method to handle "fd" directory. (fhandler_process::readdir): Add "fd" handling. (fhandler_process::open): Drop "self" handling. (fhandler_process::fill_filebuf): Ditto. Add "fd" handling. Fix "maps" output string. * fhandler_registry.cc (fhandler_registry::fstat): Set correct link count for directories. * fhandler_socket.cc (fhandler_socket::get_proc_fd_name): New method. * path.cc (symlink_info::set): Fix thinko. * pinfo.cc (_pinfo::commune_recv): Rename pathbuf to path throughout. Drop local path variable in PICOM_FIFO case. Fix debug output. Close handles as early as possible. Add PICOM_FDS and PICOM_FD handling. (_pinfo::commune_send): Add PICOM_FDS and PICOM_FD handling. (_pinfo::fd): New method. (_pinfo::fds): New method. * pinfo.h (enum picom): Add PICOM_FDS and PICOM_FD. (_pinfo::fd): Declare. (_pinfo::fds): Declare. * pipe.cc (fhandler_pipe::get_proc_fd_name): New method.
2005-01-29 * smallprint.c (rn): Change uval to unsigned long long to fix 64 bitCorinna Vinschen
handling. * fhandler_process.cc (format_process_maps): Print major, minor and inode numbers correctly.
2005-01-29 * autoload.cc (GetModuleFileNameExA): Add.Corinna Vinschen
(GetModuleInformation): Add. (QueryWorkingSet): Add. * fhandler.h (fhandler_virtual::get_filebuf): New method. * fhandler_proc.cc (PROC_SELF): Define. (proc_fhandlers): Change type of self to FH_PROC. (fhandler_proc::exists): Return -3 if self. (fhandler_proc::fstat): Handle self as symlink. (fhandler_proc::fill_filebuf): Handle self. * fhandler_process.cc: Include psapi.h. (PROCESS_EXENAME): Remove. (PROCESS_MAPS): Define. (PROCESS_ROOT): Define. (PROCESS_EXE): Define. (PROCESS_CWD): Define. (process_listing): Remove "exename", add "maps, "root", "exe" and "cwd" elements. (fhandler_process::exists): Return -2 for symlinks. (fhandler_process::fstat): Handle symlinks. (fill_filebuf): Evaluate pid if pid is 0. Use exename handling for exe. Handle maps, root and cwd. (format_process_maps): New function evaluating "maps". * path.cc (symlink_info::set): New method to fill symlink_info with data matching virtual symlinks. (path_conv::check): Handle virtual symlinks. * pinfo.cc (_pinfo::commune_recv): Add PICOM_CWD and PICOM_ROOT handling. (_pinfo::commune_send): Ditto. (_pinfo::root): New function. (_pinfo::cwd): New function. * pinfo.h (enum picom): Add PICOM_CWD and PICOM_ROOT. (_pinfo::root): Declare. (_pinfo::cwd): Declare.
2005-01-16* init.cc (dll_entry): Remove unused extern.Christopher Faylor
* include/sys/cygwin.h: Remove PID_ZOMBIE. * pinfo.h: Rename EXITCODE_* defines. (pinfo::set_exit_state): Remove parameter. * pinfo.cc (set_exit_state): Remove parameter. Reverse sense of test so that exitcode is checked for having been set rather than not having been set. Set flag when exitcode has been established. Don't set PID_STATE here. (pinfo::init): Remove exitcode initialization. (pinfo::exit): Reflect change in EXITCODE_* naming. Set flag when exitcode has been established. Reflect change in arguments to set_process_state. (proc_waiter): Reflect change in arguments to set_process_state. Set process_state here and only here. * fhandler_process.cc (fhandler_process::fill_filebuf): Reflect removal of PID_ZOMBIE define. (format_process_stat): Ditto. (format_process_status): Ditto. * sigproc.cc (pid_exists): Ditto. (stopped_or_terminated): Ditto. Make sure that only low-order 16 bits of exitcode are used. * spawn.cc (spawn_guts): Reflect change in EXITCODE_* naming.
2005-01-07 * fhandler_process.cc: Fix copyright date.Corinna Vinschen
2005-01-07 * fhandler_process.cc: Use strcasematch instead of strcasecmpCorinna Vinschen
throughout.
2004-12-22 * fhandler_process.cpp (format_process_status): Use tabs in formattingCorinna Vinschen
instead of spaces.
2004-12-18revert erroneous checkinChristopher Faylor
2004-12-18* fhandler_proc.cc (proc_listing): Add entry for "self".Christopher Faylor
(proc_fhandlers): Add entry for "self". * fhandler_process.cc (fhandler_process::fstate): Handle "self". (fhandler_process::open): Handle "self".
2004-09-03Regularize most strace_prints throughout so that %E is always preceded by aChristopher Faylor
comma and elminate most uses of "foo = %s" to "foo %s".
2004-04-10 * Use new unified status_flag accessor methods from classes fhandler_*,Corinna Vinschen
tty_min, mtinfo and fs_info thoroughout. * fhandler.h: Redefine all set_close_on_exec methods to take a bool argument. (enum conn_state): Rename from connect_state. (class fhandler_base): Rename some status flags to align with accessor method names. Drop encoded flag entirely. Unify status accessor methods. Const'ify all read accessor methods. (class fhandler_socket): Ditto. (class fhandler_dev_raw): Ditto. * fhandler_disk_file.cc (fhandler_base::fstat_fs): Use fs.fs_is_fat() instead of evaluating FATness of file system here. (fhandler_disk_file::opendir): Drop call to set_encoded(). (fhandler_disk_file::readdir): Use pc.isencoded() directly. * mtinfo.h (class mtinfo_drive): Const'ify all read accessor methods. * path.cc (fsinfo_cnt): Add. (fs_info::update): Accomodate class changes. Evaluate file system name specific flags right here. Add thread safety for reading and writing global fsinfo array. * path.h (enum path_types): Drop values for flags kept in fs already. (struct fs_info): Move status informatin into private struct type status_flags. Add accessor methods. Remove path and file system name string arrays in favor of status bits. (class path_conv): Use new fs_info status information where appropriate. (path_conf::fs_has_ea): Rename from fs_fast_ea. (path_conf::fs_has_acls): New method. (path_conf::root_dir): Remove. (path_conf::volname): Remove. * syscalls (statfs): Evaluate root dir locally. * tty.h (class tty_min): Unify status accessor methods. Const'ify all read accessor methods.
2004-02-09* debug.h (console_printf): Define for non-debugging condition.Christopher Faylor
* cygtls.h (_threadinfo::lock): Remove wait argument. (_threadinfo::interrupt_setup): Remove retaddr argument. * exceptions.cc (_threadinfo::interrupt_setup): Ditto. (_threadinfo::interrupt_now): Accommodate change to interrupt_setup argument. (setup_handler): Ditto. Always lock sig stack prior to determining interrupt method. * gendef (_sigfe): Correct thinko regarding cmpxchg. (_sigbe): Ditto. (_threadinfo::lock): Ditto. (_threadinfo::pop): Eliminate left-over stack unlock. * sigproc.cc (proc_subproc): Chnage debugging output to printed warning.
2003-12-26* dcrt0.cc (reent_data): Reluctantly resurrect.Christopher Faylor
(__cygwin_user_data::impure_ptr): Ditto. (_dll_crt0): Reluctantly initialize _impure_ptr here. (initialize_main_tls): Eliminate local_clib initialization since it now happens in init_thread. * init.cc (dll_entry): Reluctantly remove code which set _impure_ptr to the main thread's local_clib. * perthread.h (reent_data): Remove obsolete declaration. * sigproc.cc (proc_subproc): Add more debugging output. (get_proc_lock): Ditto. *dcrt0.cc (dll_crt0_1): Allocate argv[0] via malloc since main thread could exit.
2003-11-152003-11-11 Robert Collins <rbtcollins@hotmail.com>Robert Collins
Ron Parker <rdparker@butlermfg.com> * bsdlib.cc: Update throughout to use CYG_MAX_PATH rather than MAX_PATH. * cygheap.h: Ditto. * dcrt0.cc: Ditto. * delqueue.cc: Ditto. * dlfcn.cc: Ditto. * dll_init.cc: Ditto. * dll_init.h: Ditto. * dtable.cc: Ditto. * environ.cc: Ditto. * environ.h: Ditto. * exceptions.cc: Ditto. * external.cc: Ditto. * fhandler_disk_file.cc: Ditto. * fhandler_proc.cc: Ditto. * fhandler_process.cc: Ditto. * fhandler_raw.cc: Ditto. * fhandler_registry.cc: Ditto. * fhandler_socket.cc: Ditto. * fhandler_virtual.cc: Ditto. * miscfuncs.cc: Ditto. * mmap.cc: Ditto. * netdb.cc: Ditto. * path.cc: Ditto. * path.h: Ditto. * pinfo.cc: Ditto. * pinfo.h: Ditto. * pthread.cc: Ditto. * registry.cc: Ditto. * shared.cc: Ditto. * shared_info.h: Ditto. * smallprint.c: Ditto. * spawn.cc: Ditto. * strace.cc: Ditto. * syscalls.cc: Ditto. * thread.h: Ditto. * uinfo.cc: Ditto. * winsup.h: Ditto. * include/limits.h: Ditto. * include/cygwin/config.h: Ditto. * include/sys/param.h: Ditto.