aboutsummaryrefslogtreecommitdiff
path: root/winsup/cygwin/libc
AgeCommit message (Collapse)AuthorFilesLines
2005-12-23* cygtls.cc (_cygtls::handle_threadlist_exception): Make an error fatal.Christopher Faylor1-1/+1
* cygtls.h (sockaddr_in): Use header rather than defining our own structure. * exceptions.cc (_cygtls::interrupt_setup): Use exact contents of sa_mask rather than assuming tht current sig should be masked, too. (_cygtls::call_signal_handler): Use more aggressive locking. * gendef (_sigbe): Wait until later before releasing incyg. (_sigreturn): Remove more arguments to accommodate quasi-sa_sigaction support. (_sigdelayed): Push arguments for sa_sigaction. More work needed here. * signal.cc (sigaction): Implement SA_NODEFER. * tlsoffsets.h: Regenerate. * sigproc.cc (wait_sig): Use default buffer size of Windows 9x complains. * pinfo.cc (_onreturn::dummy_handle): Remove. (_onreturn::h): Make this a pointer. (_onreturn::~_onreturn): Detect whether pointer is NULL rather than value is NULL. (_onreturn::_onreturn): Set h to NULL initially. (_onreturn::no_close_p_handle): Set h to NULL. (winpids::add): Initialize onreturn with value from p.hProcess immediately.
2005-11-18* strptime.cc (_strptime): Fix gcc warnings.Christopher Faylor1-0/+2
2005-11-18 * libc: Add subdirectory.Corinna Vinschen3-0/+733
* Makefile.in (VPATH): Add libc subdir. (DLL_OFILES): Add strptime.o and timelocal.o. * cygwin.din: Export timelocal and timegm. * localtime.cc: Define STD_INSPIRED unconditionally. * include/cygwin/time.h (timelocal): Add declaration. (timegm): Ditto. * include/cygwin/version.h: Bump API minor version. * libc/strptime.cc: New file. * libc/timelocal.cc: New file. * libc/timelocal.h: New file.
2005-11-08* memmem.cc: New file.Christopher Faylor1-0/+67
* include/cygwin/version.h: Bump API version number to 142. * cygwin.din: Export memmem.
2005-08-08 * ftw.c: Include winsup.h.Corinna Vinschen2-0/+6
* nftw.c: Ditto. * include/ftw.h: Guard declarations appropriately.
2005-08-08 * Makefile.in (DLL_OFILES): Add fts.o, ftw.o, nftw.o.Corinna Vinschen3-0/+1470
* cygwin.din: Export fts_children, fts_close, fts_get_clientptr, fts_get_stream, fts_open, fts_read, fts_set, fts_set_clientptr, ftw, nftw. * fts.c: New file, imported from FreeBSD. * ftw.c: Ditto. * nftw.c: Ditto. * include/fts.h: Ditto. * include/ftw.h: Ditto. * include/cygwin/version.h: Bump API minor number.
2005-07-03Replace valid memory checks with new myfault class "exception handling", almostChristopher Faylor1-1/+2
everywhere. Leave some thread.cc stuff alone for now. * cygtls.h: Kludge some definitions to avoid including a problematic windows header. (_cygtls::_myfault): New entry. (_cygtls::_myfault_errno): Ditto. (_cygtls::fault_guarded): New function. (_cygtls::setup_fault): Ditto. (_cygtls::return_from_fault): Ditto. (_cygtls::clear_fault): Ditto. (myfault): New class. * exceptions.cc (handle_exceptions): Handle case of guarded fault in system routine. * gendef: Add another entry point for setjmp that the compiler doesn't know about and won't complain about. * gentls_offsets: Just include windows.h rather than kludging a HANDLE def. * miscfuncs.cc (check_null_str): Delete. (check_null_empty_str): Ditto. (check_null_empty_str_errno): Ditto. (check_null_str_errno): Ditto. (__check_null_invalid_struct): Ditto. (__check_null_invalid_struct_errno): Ditto. (__check_invalid_read_ptr): Ditto. (__check_invalid_read_ptr_errno): Ditto. (dummytest): New function. (check_iovec_for_read): Delete. (chec_iovec): Rename from check_iovec_for_write. Take a read/write parameter. * tlsoffsets.h: Regenerate. * winsup.h: Remove check_* declarations. (check_iovec_for_read): Delete declaration. Turn into a define instead. (check_iovec_for_write): Ditto. (check_iovec): New declaration. * thread.h: Use ifdef guard name consistent with other header files.
2004-09-10 * Makefile.in: Create libutil.a from bsdlib.o exports.Corinna Vinschen1-0/+49
* bsdlib.cc (logwtmp): Move from syscalls.cc to here. (login): Ditto. (logout): Ditto. * winsup.h (EXPORT_ALIAS): New macro. * exec.cc: Define alias symbols using EXPORT_ALIAS macro. * syscalls.cc: Ditto. * times.cc: Ditto.
2004-05-28* path.cc (chdir): Always use the normalized_path as posix_cwd, except if itChristopher Faylor1-7/+7
starts with a drive. Also perform whitespace cleanup.
2004-02-20 * getopt.c: Avoid useless compiler warnings.Corinna Vinschen1-1/+5
2004-02-20 * getopt.c: Replace with latest vanilla(!) OpenBSD version 1.16.Corinna Vinschen1-251/+294
2004-02-14 * getopt.c: Replace with latest NetBSD version 1.16. Keep CygwinCorinna Vinschen1-47/+44
specific changes as minimal as possible.
2003-12-23* exceptions.cc (set_signal_mask): Redefine to not pass by address. ReportChristopher Faylor1-0/+2
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-11-17 * bsdlib.cc (getprogname): New function.Corinna Vinschen1-0/+22
(setprogname): New funtion. * cygwin.din: Export getprogname and setprogname. * include/cygwin/version.h: Bumb API version number.
2003-11-142003-11-11 Robert Collins <rbtcollins@hotmail.com>Robert Collins1-1/+1
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.
2003-11-06 * bsdlib.cc (_vwarnx): New function.Corinna Vinschen1-0/+73
(vwarn): Ditto. (vwarnx): Ditto. (warn): Ditto. (warnx): Ditto. (verr): Ditto. (verrx): Ditto. (err): Ditto. (errx): Ditto. * cygwin.din: Export above functions. * include/err.h: New file. * include/cygwin/version.h: Bump API minor number.
2003-09-16* getopt.cc (opterr): Reinstate initialization.Christopher Faylor1-3/+3
(optind): Ditto. (optopt): Ditto. * pinfo.cc: Include cygheap.h or suffer compile error. * shared.h: Reset magic number.
2003-09-10 * Makefile.in (DLL_OFILES): Add getopt.o and iruserok.o.Corinna Vinschen2-0/+774
* 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/+165
* 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-09-01* cygheap.cc (cygheap_init): Allocate space for sigaction array in cygheap.Christopher Faylor1-11/+1
* cygheap.h (cygheap_types): Add HEAP_SIGS. * exceptions.cc (signal_fixup_after_exec): Remove from this file. * pinfo.h (pinfo::getsig): Just return global_sigs array. (pinfo::sigs): Delete. * sigproc.cc (signal_fixup_after_exec): Move it here. (global_sigs): New global array, moved from pinfo structure. (sigalloc): New function. Allocate global sigaction array here. (proc_subproc): Remove copysigs call. It's automatic now. * include/sys/cygwin.h (PID_NOCLDSTOP): New value. * signal.cc (sigaction): Set myself->PID_NODCLDSTOP when appropriate. * sigproc.h (sigalloc): Declare. * fnmatch.c (fnmatch): Use C90 parameters. (rangematch): Ditto. * fhandler.cc (fhandler_base::raw_read): Use right coercion to avoid a compiler warning.
2002-01-17 * Makefile.in: Add fnmatch.o to DLL_OFILES.Corinna Vinschen1-0/+230
* cygwin.din: Add fnmatch export symbol. * fnmatch.c: New file. * include/fnmatch.h: Ditto. * include/cygwin/version.h: Bump API minor version to 50.
2000-07-01* Makefile.in: Use variables rather than configure constructs whereChristopher Faylor1-391/+0
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.
2000-05-18* select.cc (thread_pipe): Add paranoid check to ensure thread termination.Christopher Faylor1-1/+2
* external.cc: Eliminate obsolete include. * getopt.c (getopt_long): Fix compiler warning. * shared.h: Moved PID_ definitions to include/sys/cygwin so that they can be used by external programs. * include/sys/cygwin.h: Move external definitions here. Include sys/resource.h to avoid having to do this everywhere.
2000-02-17import winsup-2000-02-17 snapshotChristopher Faylor1-0/+390