summaryrefslogtreecommitdiffstats
path: root/winsup
Commit message (Collapse)AuthorAgeFilesLines
* Turn NEWVFORK off.Christopher Faylor2001-04-171-1/+1
|
* * path.h (cwdstuff): Move class.Christopher Faylor2001-04-178-70/+48
| | | | | | | | | | | | | | * cygheap.h (cwdstuff): To here. (init_cygheap): Add cwd field. * child_info.h (cygheap_exec_info): Eliminate cwd stuff. (child_info_spawn): Ditto. * dcrt0.cc (dll_crt0_1): Remove cygcwd.fixup_after_exec call. Convert cygcwd reference to cygheap->cwd. * path.cc: Ditto, throughout. (cwdstuff::copy): Eliminate. (cwdstuff::fixup_after_exec): Ditto. * spawn.cc (spawn_guts): Eliminate call to cygcwd.copy. * fhandler.h (FH_OSS_DSP): Move into "fast" device category.
* * mmap.cc: Move fh_paging_file from some functions to beCorinna Vinschen2001-04-162-40/+72
| | | | | | | | | | | | | | a global static variable. (class mmap_record): Add `devtype_' member to remember the device type of the file. Add declaration for methods `get_device', `alloc_fh' and `free_fh'. (mmap_record::mmap_record): Initialize `devtype_' correctly. (mmap_record::alloc_fh): New method. (mmap_record::free_fh): Ditto. (munmap): Use new mmap_record::alloc_fh and mmap_record::free_fh methods to create a correct fhandler. (msync): Ditto. (fixup_mmaps_after_fork): Ditto.
* * grp.cc (getgroups): If `allow_ntsec' is set, use the process tokenCorinna Vinschen2001-04-162-21/+59
| | | | information to evaluate the groups list.
* * mkgroup.c: Add function pointers `netlocalgroupgetmembers' andCorinna Vinschen2001-04-162-12/+107
| | | | | | | | | | | | | | | | | `netgroupgetusers'. (load_netapi): Load function pointers `netlocalgroupgetmembers' and `netgroupgetusers'. (enum_local_users): New function. (enum_local_groups): Call `enum_local_users' for each group if `print_users' is set. (enum_users): New function. (enum_groups): Call `enum_users' for each group if `print_users' is set. (usage): Add usage text for `-u/--users'. (longopts): Add option `--users'. (opts): Add option character `u'. (main): Set `print_users' according to option `-u/--users'. Call `enum_local_groups' and `enum_groups' with additional parameter `print_users'.
* * features.h: Remove this file as it is now being supplied by newlib.Christopher Faylor2001-04-162-1/+4
|
* * autoload.cc: Add winmm functions needed by fhandler_dsp.cc.Christopher Faylor2001-04-168-11/+1979
| | | | | | | | | * fhandler_dsp.cc: New file. Implements OSS like /dev/dsp. * include/sys/soundcard.h: New file. User land includes for OSS /dev/dsp. * fhandler.h: Add new class fhandler_dev_dsp and a FH_OSS_DSP definition. * dtable.cc (dtable::build_fhandler): Allow creation of the /dev/dsp device. * path.cc (windows_device_names): Add /dev/dsp into list of device names. * Makefile.in (DLL_OFILES): Add fhandler_dsp.o.
* * mount.cc (longopts): Add help to options list.Christopher Faylor2001-04-163-25/+34
| | | | | | (opts): Add 'h' to options string. * umount.cc (longopts): Add help to options list. (opts): Add 'h' to options string and change 'R' to 'A'.
* * uname.c (uname): Default n in in86 to 6 if Windows returns > 6.Christopher Faylor2001-04-152-1/+7
|
* Patch by Kazuhiro Fujieda <fujieda@jaist.ac.jp>:Corinna Vinschen2001-04-153-16/+44
| | | | | | | | | | | | * mkgroup.c (enum_groups): Use RID + offset specified an additional argument as ID. (usage): Add description of -o option. (longopts, opts): Add specifications of -o/--id-offset option. (main): Add -o option. Invoke enum_groups with specified offset. * mkpasswd.c (enum_users): Just like mkgroup.c. (usage, longopts, opts): Ditto. (main): Add -o option. Invoke enum_users with specified offset only against domain accounts.
* * path.cc (add_ext_from_sym): Redefine to call `add_ext_from_sym_'.Corinna Vinschen2001-04-152-4/+18
| | | | (add_ext_from_sym_): New inline function.
* * config.h.in: Turn on VFORK by default.Christopher Faylor2001-04-142-1/+5
|
* * net.cc (cygwin_socket): Set SO_LINGER to small value so closed UNIX domainChristopher Faylor2001-04-143-3/+24
| | | | | | sockets will not stay around. * select.cc (socket_cleanup): Set SO_LINGER to small value so closed dummy sockets do not stay around. Use correct value for second argument to shutdown.
* Sat Apr 14 17:04:00 2001 Robert Collins <rbtcollins@hotmail.com>Robert Collins2001-04-143-3/+15
| | | | | | | * thread.h (MTinterface): Add threadcount. * thread.cc (MTinterface::Init): Set threadcount to 1. (__pthread_create): Increment threadcount. (__pthread_exit): Decrement threadcount and call exit() from the last thread.
* Fix ChangeLog format.Christopher Faylor2001-04-131-1/+1
|
* * fork.cc (fork_child): Call the __pthread_atforkchild function.Christopher Faylor2001-04-137-4/+163
| | | | | | | | | | | | (fork_parent): Call the __pthread_atforkparent function. * cygwin.din: Export pthread_atfork. * thread.h (callback): New class. (MTinterface): Use it. * thread.cc (__pthread_atforkprepare): New function. (__pthread_atforkparent): New function. (__pthread_atforkchild): New function. (__pthread_atfork): New function. * pthread.cc (pthread_atfork): New function.
* * path.cc (add_ext_from_sym): New define evaluating `known'suffix'.Corinna Vinschen2001-04-132-19/+15
| | | | (path_conv::check): Use add_ext_from_sym throughout.
* * cygwinenv.sgml: Add text for `check_case' option.Corinna Vinschen2001-04-122-0/+31
|
* * dir.cc (mkdir): Check for case clash.Corinna Vinschen2001-04-128-45/+228
| | | | | | | | | | | | | | | | | | | | | | | | | | * environ.cc: Add extern declaration for `pcheck_case'. (check_case_init): New function. (struct parse_thing): Add "check_case" option. * errno.cc (_sys_nerrlist): Add text for ECASECLASH. (strerror): Add case branch for ECASECLASH. * fhandler.cc (fhandler_disk_file::open): Check for case clash. * path.cc: Add global variable `pcheck_case'. (struct symlink_info): Add member `case_clash' and method `case_check'. (path_prefix_p_): Call `pathnmatch' instead of `strncasematch'. (pathnmatch): New funtion. (pathmatch): Ditto. (path_conv::check): Add handling for case checking. (symlink): Check for case clash. (symlink_info::check): Add parameter for case checking. Handle case checking. (symlink_info::case_check): New method. (chdir): Don't use unconverted path if pcheck_case==PCHECK_STRICT. * path.h: Add extern declarations for `pathmatch' and `pathnmatch'. (enum case_checking): New enumeration type describing the case checking behaviour of path conversion routines. (class path_conv): Add member `case_clash'. * syscalls.cc (_link): Check for case clash.
* * syscalls.cc (mkfifo): New function stub.Christopher Faylor2001-04-122-0/+11
|
* * configure.in: Remove PTH_ALLOW.Christopher Faylor2001-04-122-73/+139
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * cygwin.din: Remove @PTH_ALLOW@ prefixes to pthread functions. Add new pthread exports. * pthread.cc: New wrapper functions for the above new exports. * sched.cc (valid_sched_parameters): New function. (sched_setparam): Use it. (sched_set_thread_priority): New function. Used by pthread_sched*. * thread.cc (pthread_key_destructor::InsertAfter): New function. (pthread_key_destructor::UnlinkNext): New function. (pthread_key_destructor::Next): New function. (pthread_key_destructor_list::Insert): New function. (pthread_key_destructor_list::Remove): New function. (pthread_key_destructor_list::Pop): New function. (pthread_key_destructor::pthread_key_destructor): New function. (pthread_key_destructor_list::IterateNull): New function. (MTinterface::Init): Initialise new member. (pthread::pthread): Initialise new members. (pthread::create): Copy new attributes. Set the new thread priority. (pthread_attr::pthread_attr): Initialise new members. (pthread_key::pthread_key): Setup destructor function. (pthread_key::~pthread_key): Remove destructor function. (pthread_mutexattr::pthread_mutexattr): New function. (pthread_mutexattr::~pthread_mutexattr): New function. (__pthread_once): New function. (__pthread_cleanup): New function. (__pthread_cancel): New function. (__pthread_setcancelstate): New function. (__pthread_setcanceltype): New function. (__pthread_testcancel): New function. (__pthread_attr_getinheritsched): New function. (__pthread_attr_getschedparam): New function. (__pthread_attr_getschedpolicy): New function. (__pthread_attr_getscope): New function. (__pthread_attr_setinheritsched): New function. (__pthread_attr_setschedparam): New function. (__pthread_attr_setschedpolicy): New function. (__pthread_attr_setscope): New function. (__pthread_exit): Call any key destructors on thread exit. (__pthread_join): Use the embedded attr values. (__pthread_detach): Use the embedded attr values. (__pthread_getconcurrency): New function. (__pthread_getschedparam): New function. (__pthread_key_create): Pass the destructor on object creation. (__pthread_key_delete): Correct incorrect prototype. (__pthread_setconcurrency): New function. (__pthread_setschedparam): New function. (__pthread_cond_timedwait): Support static mutex initialisers. (__pthread_cond_wait): Ditto. (__pthread_mutex_getprioceiling): New function. (__pthread_mutex_lock): Support static mutex initialisers. (__pthread_mutex_trylock): Ditto. (__pthread_mutex_unlock): Ditto. (__pthread_mutex_destroy): Ditto. (__pthread_mutex_setprioceiling): New function. (__pthread_mutexattr_getprotocol): New function. (__pthread_mutexattr_getpshared): New function. (__pthread_mutexattr_gettype): New function. (__pthread_mutexattr_init): New function. (__pthread_mutexattr_destroy): New function. (__pthread_mutexattr_setprotocol): New function. (__pthread_mutexattr_setprioceiling): New function. (__pthread_mutexattr_getprioceiling): New function. (__pthread_mutexattr_setpshared): New function. (__pthread_mutexattr_settype): New function. Remove stubs for non MT_SAFE compilation. * thread.h: Remove duplicate #defines. Add prototypes for new functions in thread.cc. (pthread_key_destructor): New class. (pthread_key_destructor_list): New class. (pthread_attr): Add new members. (pthread): Remove members that are duplicated in the pthread_attr class. (pthread_mutex_attr): Add new members. (pthread_once): New class. * include/pthread.h: Add prototypes for new functions exported from cygwin1.dll. Remove typedefs. * include/sched.h: Add prototypes for new functions in sched.cc. * include/cygwin/types.h: Add typedefs from pthread.h
* * configure.in: Remove PTH_ALLOW.Robert Collins2001-04-129-487/+1543
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * cygwin.din: Remove @PTH_ALLOW@ prefixes to pthread functions. Add new pthread exports. * pthread.cc: New wrapper functions for the above new exports. * sched.cc (valid_sched_parameters): New function. (sched_setparam): Use it. (sched_set_thread_priority): New function. Used by pthread_sched*. * thread.cc (pthread_key_destructor::InsertAfter): New function. (pthread_key_destructor::UnlinkNext): New function. (pthread_key_destructor::Next): New function. (pthread_key_destructor_list::Insert): New function. (pthread_key_destructor_list::Remove): New function. (pthread_key_destructor_list::Pop): New function. (pthread_key_destructor::pthread_key_destructor): New function. (pthread_key_destructor_list::IterateNull): New function. (MTinterface::Init): Initialise new member. (pthread::pthread): Initialise new members. (pthread::create): Copy new attributes. Set the new thread priority. (pthread_attr::pthread_attr): Initialise new members. (pthread_key::pthread_key): Setup destructor function. (pthread_key::~pthread_key): Remove destructor function. (pthread_mutexattr::pthread_mutexattr): New function. (pthread_mutexattr::~pthread_mutexattr): New function. (__pthread_once): New function. (__pthread_cleanup): New function. (__pthread_cancel): New function. (__pthread_setcancelstate): New function. (__pthread_setcanceltype): New function. (__pthread_testcancel): New function. (__pthread_attr_getinheritsched): New function. (__pthread_attr_getschedparam): New function. (__pthread_attr_getschedpolicy): New function. (__pthread_attr_getscope): New function. (__pthread_attr_setinheritsched): New function. (__pthread_attr_setschedparam): New function. (__pthread_attr_setschedpolicy): New function. (__pthread_attr_setscope): New function. (__pthread_exit): Call any key destructors on thread exit. (__pthread_join): Use the embedded attr values. (__pthread_detach): Use the embedded attr values. (__pthread_getconcurrency): New function. (__pthread_getschedparam): New function. (__pthread_key_create): Pass the destructor on object creation. (__pthread_key_delete): Correct incorrect prototype. (__pthread_setconcurrency): New function. (__pthread_setschedparam): New function. (__pthread_cond_timedwait): Support static mutex initialisers. (__pthread_cond_wait): Ditto. (__pthread_mutex_getprioceiling): New function. (__pthread_mutex_lock): Support static mutex initialisers. (__pthread_mutex_trylock): Ditto. (__pthread_mutex_unlock): Ditto. (__pthread_mutex_destroy): Ditto. (__pthread_mutex_setprioceiling): New function. (__pthread_mutexattr_getprotocol): New function. (__pthread_mutexattr_getpshared): New function. (__pthread_mutexattr_gettype): New function. (__pthread_mutexattr_init): New function. (__pthread_mutexattr_destroy): New function. (__pthread_mutexattr_setprotocol): New function. (__pthread_mutexattr_setprioceiling): New function. (__pthread_mutexattr_getprioceiling): New function. (__pthread_mutexattr_setpshared): New function. (__pthread_mutexattr_settype): New function. Remove stubs for non MT_SAFE compilation. * thread.h: Remove duplicate #defines. Add prototypes for new functions in thread.cc. (pthread_key_destructor): New class. (pthread_key_destructor_list): New class. (pthread_attr): Add new members. (pthread): Remove members that are duplicated in the pthread_attr class. (pthread_mutex_attr): Add new members. (pthread_once): New class. * include/pthread.h: Add prototypes for new functions exported from cygwin1.dll. Remove typedefs. * include/sched.h: Add prototypes for new functions in sched.cc. * include/cygwin/types.h: Add typedefs from pthread.h
* * include/windows.h (#include <winsock.h>): Include <winsock2.h>Earnie Boyd2001-04-122-0/+14
| | | | instead if (_WIN32_WINNT >= 0x0400)&&(__W32API_MAJOR_VERSION > 0).
* 2001-04-11 Danny Smith <danny_r_smith_2001@yahoo.co.nz>Earnie Boyd2001-04-122-13/+4
| | | | * include/winuser.h (WM_IME_*): Remove defines (now in imm.h).
* * include/windef.h (*PBOOL): Unprotect from XFree86Server.Earnie Boyd2001-04-122-1/+7
| | | | (*LPBOOL): Ditto.
* * path.cc (struct symlink_info): Add extn and ext_tacked_on fields.Christopher Faylor2001-04-112-7/+25
| | | | | | (path_conv::check): Only tack on extension if a known one didn't already exist. (suffix_scan::has): Return pointer to known extension. (symlink_info::check): Record location of extension, if any.
* * mkgroup.c (uni2ansi): Use native method to convert from UnicodeEgor Duda2001-04-113-14/+22
| | | | | | | | | to multi-byte strings. * mkpasswd.c (uni2ansi): Ditto. (enum_users): Pass buffer size when converting string. (enum_local_groups): Ditto. * mkgroup.c (enum_groups): Ditto. (enum_local_groups): Ditto.
* * fhandler.h (class fhandler_socket): Add members and methods toEgor Duda2001-04-094-9/+200
| | | | | | | | | | | | | | | | | support secure connections on AF_UNIX sockets. * fhandler_socket.cc (fhandler_socket::set_connect_secret): New method. (fhandler_socket::get_connect_secret): Ditto. (fhandler_socket::create_secret_event): Ditto. (fhandler_socket::close_secret_event): Ditto. (fhandler_socket::check_peer_secret_event): Ditto. (fhandler_socket::fixup_after_fork): Duplicate secret event to child. (fhandler_socket::dup): Copy address family. (fhandler_socket::close): Close secret event. * net.cc (get_inet_addr): Read secret cookie. (cygwin_connect): Check if peer knows secret cookie value. (cygwin_accept): Ditto. Copy address family to newly created socket. (cygwin_bind): Generate and write secret cookie. (wsock_init): Initialize random number generator.
* Work around new g++ problem.Christopher Faylor2001-04-091-0/+1
|
* * include/winnt.h (GetCurrentFiber): Make "external __inline" or asm code willChristopher Faylor2001-04-092-7/+12
| | | | | be included in every module which includes this header. (GetFiberData): Ditto.
* remove extra whitespace.Christopher Faylor2001-04-091-1/+1
|
* * Makefile.in: Put -lgcc last in list of libraries, since stdc++ library needsChristopher Faylor2001-04-098-444/+521
| | | | | | | | | | | | | | it. * cygwin.din: Remove obsolete "__empty" export. * exceptions.cc (call_signal_handler_now): Force inclusion of function even when -finline-functions is specified. * sigproc.h: Remove obsolete call_signal_handler declaration. * fhandler_console.cc (cp_get_internal): New function. (cp_convert): New function. (con_to_str): New function. (str_to_con): New function. (fhandler_console::read): Replace OemToCharBuff with con_to_str. (fhandler_console::write_normal): Replace CharToOemBuff with str_to_con.
* * include/winnt.h (GetCurrentFiber): Fix typo.Earnie Boyd2001-04-082-1/+5
|
* * include/shellapi.h: (CommandLineToArgvW): Add WINAPI declaration.Earnie Boyd2001-04-088-40/+238
| | | | | | | | | | | | | | | | * include/winbase.h: (GetFileAttributesExW): Fix typo. * include/wingdi.h: (StartDocA): Change LPDOCINFOA to DOCINFOA*. (StartDocB): Chage LNPDOCINFOB to DOCINFOB*. Thanks To: Kent Tamura <tkent@users.sourceforge.net> * include/winnt.h: (GetFiberData): Add __inline assembler coding. (GetCurrentFiber): Ditto. Thanks to: Andy Younger <AndyY@redlemon.com> * include/windef.h: (HMONITOR_DECLARED): New definition to stop DirectX 8 from complaining. Thanks to: Sigbj�rn Lund Olsen <mosikos@online.no> * include/commctrl.h Updated TreeView and ListView defines and macros. * include/winuser.h (MB_SERVICE_NOTIFICATION): Correct value for NT4 and above.
* * syscalls.cc (stat_worker): Fix conditional which still allowedCorinna Vinschen2001-04-052-2/+7
| | | | successful stat'ing of non-existant files.
* * child_info.h: Bump magic number for fork/exec/spawn.Christopher Faylor2001-04-042-1/+5
|
* * errno.cc (errmap): Map ERROR_FILE_INVALID to ENXIO.Corinna Vinschen2001-04-032-0/+5
|
* * winsup.api/mmaptest01.c: New test.Corinna Vinschen2001-04-032-0/+110
|
* * cygrun.c (main): Fix compiler warning.Christopher Faylor2001-04-038-28/+57
| | | | | | | | | | | * gmon.c (_mcleanup): Ditto. * profil.c (profile_off): Ditto. * net.cc (find_winsock_errno): New function. (__set_winsock_errno): Use find_winsock_errno. (cygwin_setsockopt): Detect SO_ERROR for debugging. (cygwin_getsockopt): Ditto. Translate error when getsockopt returns SO_ERROR. * winsup.h: regparmize __set_winsock_errno. * include/sys/strace.h: Document that strace functions can't use regparm.
* * mount.cc (main): Use getopt_long for parsing arguments.Christopher Faylor2001-04-033-154/+208
| | | | | (usage): Reformat, show long and short options. * umount.cc (main): Ditto, all of the above.
* * mount.cc (show_mounts): Change format string to more closely resemble UNIXChristopher Faylor2001-04-022-9/+8
| | | | when displaying mount table.
* * fhandler.cc (fhandler_disk_file::open): Avoid checking a magicCorinna Vinschen2001-04-022-0/+6
| | | | number of a directory.
* * shared_info.h (mount_info): Remove mnt_ elements.Christopher Faylor2001-04-024-22/+25
| | | | | * thread.h (struct _winsup_t): Add mnt_ elements. * path.cc (fillout_mntent): Use mnt_ elements from reent_winsup ().
* * exceptions.cc (sigframe::call_signal_handler): Return value ofChristopher Faylor2001-04-024-14/+20
| | | | | | call_signal_handler_now. * sigproc.h (sigframe): Use constructor. * syscalls.cc (_read): Correct errno test prior to calling signal handler.
* Fix typo.Christopher Faylor2001-04-011-1/+1
|
* * exceptions.cc (sigframe::call_signal_handler): Move out side of "C" block orChristopher Faylor2001-04-012-7/+16
| | | | some compilers will complain.
* * exceptions.cc (call_signal_handler_now): Rename from call_signal_handler toChristopher Faylor2001-04-012-10/+15
| | | | avoid C++ confusion.
* * path.cc (fillout_mntent): Always remove drive root directories from futureChristopher Faylor2001-04-012-14/+38
| | | | | | consideration by "/cygdrive" reporting. (cygdrive_getmnt): Avoid reporting removable drives or drives with no media mounted.
* * thread.h (struct _winsup_t): Remove obsolete elements. Add available_drivesChristopher Faylor2001-04-015-145/+140
| | | | | | | | | | | | element. * path.cc (mount_info::getmntent): Report "/cygdrive" drives when mounted drives are exhausted. (fillout_mntent): New function. (mount_item::getmntent): Use fillout_mntent. (cygdrives_mntent): New function. Returns next available "/cygdrive". (setmntent): Initialize available "/cygdrives". * syscalls.cc: Remove some if 0'ed code. * times.cc (timezone): Use more descriptive variable name.
* * sigproc.h (class sigframe): Implement 'unregister()' method.Christopher Faylor2001-04-017-117/+151
| | | | | | | | | | | | | (sigframe::~sigframe): Use unregister method. (sigframe::call_signal_handler): Declare new method. * exceptions.cc (sigframe::call_signal_handler): New method. Unregisters current sigframe before calling signal handler. (setup_handler): Clear waiting threads prior to arming signal_arrived. * syscalls.cc (_read): Change goto to loop. Recalculate sigframe inside of loop so that constructor is called when appropriate. * wait.cc (wait4): Ditto. * signal.cc: Change "sig" to "signal" in debugging messages throughout. * sigproc.cc: Ditto.