aboutsummaryrefslogtreecommitdiff
path: root/winsup/cygwin/lib
AgeCommit message (Collapse)AuthorFilesLines
2004-12-09* lib/libcmain.c (main): Properly deal with quoted first argument.Christopher Faylor1-10/+19
2004-09-27 * lib/_cygwin_crt0_common.cc: Revert patch from 2004-09-16. BrakesCorinna Vinschen1-0/+7
newly built DLLs.
2004-09-16 * cygwin.din (_impure_ptr): Don't export.Corinna Vinschen1-7/+0
(reent_data): Export. * lib/_cygwin_crt0_common.cc (_impure_ptr): Drop entirely. Don't initialize _impure_ptr or u->impure_ptr_ptr.
2004-09-16* cygwin.din (_impure_ptr): Export.Christopher Faylor1-1/+3
(reent_data): Don't export. * dcrt0.cc (reent_data): Drop. (__cygwin_user_data): Initialize impure_ptr as GLOBAL_REENT. (_dll_crt0): Initialize _impure_ptr as GLOBAL_REENT. * lib/_cygwin_crt0_common.cc (_impure_ptr): Drop. Declare extern as dllimport instead.
2003-12-31* cygwin.din: Make crt0 functions NOSIGFE.Christopher Faylor1-1/+0
* include/cygwin/version.h: Gratuitous comment change. * lib/_cygwin_crt0_common.cc: Remove unneeded declaration.
2003-09-10 * Makefile.in (DLL_OFILES): Add getopt.o and iruserok.o.Corinna Vinschen2-822/+0
* cygwin.din: Export __check_rhosts_file, __rcmd_errstr, optarg, opterr, optind, optopt, optreset, getopt, getopt_long, iruserok and ruserok. * getopt.c: Moved from lib to here. Define opt* variables as dllexport. * iruserok.c: Moved from lib to here. Rearrange function order. Prefer using 64/32 bit functions. * syscalls.cc (shell_fp): Define as struct __sFILE64. (getusershell): Use fopen64 instead of fopen. * winsup.h: Add declarations for seteuid32, fopen64, cygwin_gethostbyname and cygwin_inet_addr. * include/getopt.h: Declare opt* variables dllimport. * include/cygwin/version.h: Bump API minor number.
2003-09-10 * Makefile.in (DLL_OFILES): Add bsdlib.o.Corinna Vinschen1-0/+319
* autoload.cc (RegisterServiceProcess): Add. * bsdlib.cc: New file. (daemon): New function. (login_tty): Ditto. (openpty): Ditto. (forkpty): Ditto. * cygwin.din: Export daemon, forkpty, login_tty, logwtmp, updwtmp, openpty and revoke. * syscalls.cc (updwtmp): New function, writing to wtmp exclusively. (logwtmp): Ditto. (login): Call updwtmp instead of writing to wtmp by itself. (logout): Ditto. * tty.cc (revoke): New funtion. * include/paths.h: Define _PATH_DEVNULL. * include/pty.h: New header. * include/cygwin/version.h: Bump API minor number. * include/sys/utmp.h: Declare logwtmp with const arguments. Declare updwtmp. * lib/iruserok.c: New file. (ruserok): New function. (iruserok): Ditto. (__ivaliduser): Ditto. (__icheckhost): Ditto.
2003-03-03* lib/getopt.c: Refresh from NetBSD sources.Christopher Faylor1-18/+28
2003-03-02* lib/getopt.c: Nuke use of unneeded BSDisms.Christopher Faylor1-8/+3
2003-01-30* lib/getopt.c: Allow environment variable control of POSIXLY_INCORRECT ↵Christopher Faylor1-5/+2
behavior.
2002-12-09* lib/pseudo-reloc.c: New file.Christopher Faylor2-0/+49
* lib/_cygwin_crt0_common.cc: Perform pseudo-relocs during initialization of cygwin binary (.exe or .dll).
2002-06-24* lib/_cygwin_S_IEXEC.cc: Remove obsolete file.Christopher Faylor1-21/+0
2001-11-14 * winsup.h: Remove alloca definition since it's now defined throughCorinna Vinschen1-2/+1
inclusion of stdlib.h. * lib/cygwin_crt0.c: Ditto.
2001-11-07 * lib/getopt.c (getopt_internal): Reset optind to 1 only if optresetCorinna Vinschen1-1/+1
is not set.
2001-11-05Eliminate excess whitespace.Christopher Faylor2-7/+7
2001-09-24* select.cc (peek_pipe): Only grab mutex when we actually got something fromChristopher Faylor1-1/+6
the pipe.
2001-09-19* lib/getopt.c (__progname): Don't declare if not compiling for cygwin.Christopher Faylor1-2/+2
2001-09-19 * lib/getopt.c (getopt_long): Avoid compiler warning.Corinna Vinschen1-1/+1
2001-09-19* lib/getopt.c: Use __progname==__argv[0] when not compiling for cygwin.Christopher Faylor1-0/+3
* scandir.cc (scandir): Use correct default when compar == NULL.
2001-09-19* cygwin.din (__argv): Export.Christopher Faylor1-297/+399
(__argc): Ditto. (__progname): Ditto. * include/getopt.h (getopt_long): constify arguments. * lib/getopt.c: Import new file from NetBSD.
2001-09-11Update copyrights.Christopher Faylor6-6/+6
2001-05-08* cygheap.cc (_cfree): Add regparm attribute.Christopher Faylor1-6/+0
(_crealloc): Ditto. * dcrt0.cc (dll_crt0_1): Default to always checking for executable for now. * dtable.cc (dtable::not_open): Move method. * dtable.h (dtable): Here. * exceptions.cc (ctrl_c_handler): Don't expect process group leader to handle a signal if it doesn't exist. * fhandler.h (fhandler_base): Make openflags protected. * localtime.c (tzsetwall): Check for __CYGWIN__ as well as __WIN32__. * path.cc (path_conv::check): Add some comments. Change strcat to assignment. * lib/_cygwin_S_IEXEC.cc (_cygwin_bob__): Eliminate. * fhandler_tty.cc (fhandler_console::dup): Set controlling terminal if necessary. * fhandler_tty.cc (fhandler_tty_slave::dup): Ditto.
2001-03-28* lib/_cygwin_S_IEXEC.c: Remove "const" from globals or they never seem to beChristopher Faylor1-10/+8
defined. Wrap definitions in extern "C". Include winsup.h to assure proper definitions. * dcrt0.cc (dll_crt0_1): Call stdio_init after premain run so that binmode.o, etc., will control default stdio settings. * dtable.cc (dtable::init_std_file_from_handle): Allow __fmode to force binmode/textmode settings. Default pipes to binmode.
2001-03-05* dlopen.c (dlopen): Return NULL when name is NULL (suggested byChristopher Faylor1-0/+29
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.
2001-01-08* pinfo.cc (codepage_init): Move function.Christopher Faylor1-3/+3
* environ.cc (codepage_init): To here. * exceptoins.cc (SIG_NONMASKABLE): Remove SIGCONT from consideration since it is supposed to be maskable. * signal.cc (sigaction): Ditto. * sigproc.cc (wait_sig): Ditto. * winsup.h: Eliminate global declaration of codepage_init.
2000-11-13* path.cc (get_device_number): Allow /dev/ttySn to designate a com port.Christopher Faylor1-1/+1
2000-10-28Whitespace cleanup.Christopher Faylor3-4/+4
* configure.in: Eliminate subdir stuff. * configure: Regenerate. * include/getopt.h (option): Make name field 'const'.
2000-09-08* lib/_cygwin_crt0_common.cc: Add missing header files.Christopher Faylor1-0/+2
2000-07-29* include/cygwin/cygwin_dll.h: Update for modern compilers.Christopher Faylor1-0/+2
* lib/cygwin_crt0.c: Inexplicably need to define alloca for newer compilers. * fhandler.h (fhandler_console): Add new method. * fhandler.cc (fhandler_console::set_cursor_maybe): New method. (fhandler_console::read): Set cursor if it has moved to make it visible.
2000-07-17Throughout, eliminate third argument to path_conv and use new PC_* constantsChristopher Faylor2-1/+2
for second argument. * path.h: Generalize SYMLINK_* constants to PC_*. (path_conv): Create a new method. Fold third argument into second. * dll_init.cc (dll_list::alloc): Try harder to find space to allocate dll struct. (dll_dllcrt0): Don't check sanity if we've already called dll_crt0. * path.cc (path_conv::check): Don't check for a null or empty path unless specifically told with a flag setting. (check_null_empty_path): New function, adapted from macro. * syscalls.cc (_rename): Use already-determined file attributes rather than checking again. * lib/cygwin/cygwin_attach.dll.c (cygwin_attach_dll): Use a static per_process structure since this is apparently supposed to be zeroed. * lib/cygwin_crt0.c (cygwin_crt0): Zero per_process structure sent to older DLLs.
2000-07-17* _cygwin_crt0_common.cc: Undef 'environ' or suffer compiler error.Christopher Faylor1-0/+2
2000-07-15* hinfo.cc (hinfo::linearize_fd_array): Make max_used_fd an int so that we canChristopher Faylor2-13/+4
detect when there are no fds to pass. * dcrt0.cc (host_dependent_constants::init): Revert Sat Mar 18 01:32:04 2000 change. (dll_crt0_1): Set "cygwin_finished_initializing" flag. (dll_crt0): Don't perform memcpy if uptr is already set to internal structure. (_dll_crt0): Remember location of programs envptr. * dll_init.h (per_module, dll, dll_list): Revamp. * dll_init.cc: Revamp. Use new classes. * fork.cc (fork): Use new revamped dll, dll_list, and per_module stuff. * environ.cc: Use __cygwin_environ throughout rather than the user_data->envptr. * exec.cc: Ditto. * spawn.cc: Ditto. * winsup.h: Declare update_envptrs, cygwin_finished_initializing. * lib/_cygwin_crt0_common.cc (_cygwin_crt0_common): Revert previous change. * lib/cygwin_attach_dll.cc (cygwin_attach_dll): Always pass in own per_process structure or we end up overwriting information from the main program.
2000-07-12* lib/_cygwin_crt0_common.cc (_cygwin_crt0_common): Don't reset environ ifChristopher Faylor1-1/+4
already set.
2000-07-08* external.cc (cygwin_internal): Export __cygwin_user_data.Christopher Faylor4-39/+74
* include/sys/cygwin.h: Allow definition of per_process even when not compiling with C++. (cygwin_getinfo_types): Add CW_USER_DATA. * lib/_cygwin_crt0_common.cc (_cygwin_crt0_common): Get __cygwin_user_data pointer from cygwin_internal. If it doesn't exist, return failure. Use either this pointer or passed in pointer throughout. Clear forkee. * lib/crt0.h: Accomodate argument changes to _cygwin_crt0_common. * lib/cygwin_attach_dll.c (cygwin_attach_dll): Reorganize to allow use of newer binaries with older DLLs. Detect older DLLs when _cygwin_crt0_common returns 0 and allocate space for a per_process structure on the stack. * lib/cygwin_crt0.c (cygwin_crt0): Ditto.
2000-07-05* dcrt0.cc (__cygwin_user_data): Initialize.Christopher Faylor1-1/+1
(dll_crt0_1): Eliminate user_data initialization. (dll_crt0): Set up impure_ptr_ptr for older executables. (cygwin_dll_init): Eliminate user_data initializations. (__api_fatal): Don't check for user_data initialization. * dll_init.cc (struct dll): Store entire contents of per_process rather than just a pointer. (add): Ditto. (initOneDll): Don't check for user_data initialization. (DllList::recordDll): Store contents of per_process argument. (DllList::detachDll): Pass address of per_process field. (DllList::initAll): Ditto. (DllList::doGlobalDestructorsOfDlls): Ditto. (DllListIterator::operator *): Ditto. (dll_dllcrt0): Default to __cygwin_user_data if arg is NULL. * include/sys/cygwin.h: Reorganize per_process to eliminate obsolete fields and accomodate new way of initializing. * lib/_cygwin_crt0_common: Initialize _impure_ptr from __cygwin_user_data.impure_ptr.
2000-07-01* dcrt0.cc (_dll_crt0): Renamed from dll_crt0 ().Christopher Faylor1-2/+2
* winsup.h: Accomodate above change. * cygwin.din: Ditto. * lib/cygwin_crt0.c: Ditto.
2000-07-01* Makefile.in: Use variables rather than configure constructs whereChristopher Faylor12-0/+684
appropriate. (LIBCOS): Find additional stub library stuff in their own subdirectory. * dcrt0.cc: Convert user_data pointer to static __cygwin_user_data area. (do_global_ctors): Check magic_bisquit for initialization. (dll_crt0_1): First group of premain functions prior to fd initialization. Run second group before calling main. (dll_crt0 ()): New function, called from new initialization code. (dll_crt0 (per_process *uptr)): Call new dll_crt0 () function on initialization. * debug.cc (thread_stub): Initialize bottom of stack with per-thread info. * environ.cc (parse_thing): Use binmode global to control CYGWIN=binmode behavior. * fhandler.cc (fhandler_base::open): Allow explicit setting of __fmode to O_BINARY or O_TEXT to override disk mount settings. * libcmain.cc: Move to lib subdirectory. * libccrt0.cc: Ditto. * dll_main.cc: Ditto. * dll_entry.cc: Ditto. * getopt.c: Ditto. * thread.cc (thread_init_wrapper): Call ExitThread explicitly rather than returning, as a preliminary step towards placing per thread info at the bottom of the stack. * winsup.h: Move per_process class to include/sys/cygwin.h. Declare new dll_crt0(). * include/cygwin/version.h: Bump API minor version. * binmode.c: New file. * textmode.c: Ditto. * lib/_cygwin_crt0_common.cc: Ditto. * lib/crt0.h: Ditto. * lib/cygwin_attach_dll.c: Ditto. * lib/cygwin_crt0.c: Ditto. * lib/dll_entry.cc: Ditto. * lib/dll_main.cc: Ditto. * lib/getopt.c: Ditto. * lib/libcmain.c: Ditto. * lib/premain0.c: Ditto. * lib/premain1.c: Ditto. * lib/premain2.c: Ditto. * lib/premain3.c: Ditto.