summaryrefslogtreecommitdiffstats
path: root/winsup
Commit message (Collapse)AuthorAgeFilesLines
...
* whitespaceChristopher Faylor2002-09-221-4/+4
|
* * cygwin_ipc.h: Move to "include/cygwin/ipc.h".Conrad Scott2002-09-217-7/+17
| | | | | | | | | * cygwin_shm.h: Move to "include/cygwin/shm.h". * include/cygwin/ipc.h: New file. * include/cygwin/shm.h: New file. * ipc.c:c Update <cygwin/ipc.h> include. * cygserver_shm.cc: Update <cygwin/shm.h> include. * shm.cc: Ditto.
* 2002-09-21 Robert Collins <rbtcollins@hotmail.com>Robert Collins2002-09-214-68/+78
| | | | | | | | | | | | | | | | | | | | * pthread.cc: Use class::call for converted pthread and semaphore calls. * thread.cc: Convert various __pthread_call and __sem_call to pthread::call and sem::call throughout. * pthread.h (__pthread_cancel): Convert to pthread::cancel. (__pthread_join): Convert to pthread::join. (__pthread_detach): Convert to pthread::detach. (__pthread_create): Convert to pthread::create. (__pthread_once): Convert to pthread::once. (__pthread_atfork): Convert to pthread::atfork. (__pthread_suspend): Convert to pthread::suspend. (__pthread_continue): Convert to pthread::resume. (__sem_init): Convert to semaphore::init. (__sem_destroy): Convert to semaphore::destroy. (__sem_wait): Convert to semaphore::wait. (__sem_trywait): Convert to semaphore::trywait. (__sem_post): Convert to semaphore::post.
* 2002-09-21 Robert Collins <rbtcollins@hotmail.com>Robert Collins2002-09-213-148/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * thread.cc: Finish the removal of the separate pthread_key destructor list. Remove all pthread_key_destructor and pthread_key_destructor_list references throughout. (pthread::exit): Call the new pthread_key interface to activate destructors. (pthread_key::keys): Change into a list. (pthread_key::saveAKey): New method, used via forEach. (pthread_key::restoreAKey): Ditto. (pthread_key::destroyAKey): Ditto. (pthread_key::fixup_before_fork): Use the List::forEach functionality. (pthread_key::fixup_after_fork): Ditto. (pthread_key::runAllDestructors): New method implementation. (pthread_key::pthread_key): Use List::Insert rather than custom list code. (pthread_key::~pthread_key): Use List::Remove for the same reason. * thread.h: Remove all pthread_key_destructor and pthread_key_destructor_list references throughout. (List): Move the interface above pthread_key in the header. Use atomic operations during insert and delete. (List::forEach): A generic interface for doing something on each node. (pthread_key::runAllDestructors): New method, run all destructors. (pthread_key::fork_buf): Make private. (pthread_key::run_destructor): Ditto. (pthread_key::saveAKey): New method for clearer source. (pthread_key::restoreAKey): Ditto. (pthread_key::destroyAKey): Ditto. (MTinterface::destructors): Remove.
* 2002-09-21 Robert Collins <rbtcollins@hotmail.com>Robert Collins2002-09-213-33/+76
| | | | | | | | | | | | | | | | | * thread.cc: Partial refactoring of pthread_key destructor handling. Loosely based on Thomas Pfaff's work. (pthread_key_destructor_list::Insert): Remove. (pthread_key_destructor_list::Pop): Remove. (pthread_key_destructor_list::IterateNull): Call the key's run_destructor method. (pthread_key::pthread_key): Initialize new member. (pthread_key::get): Mark as const for correctness. (pthread_key::run_destructor): Implement. * thread.h (pthread_key::get): Mark as const for correctness. (pthread_key::run_destructor): Declare. (List): New template class that implements a generic list. (pthread_key_destructor_list): Inherit from List, and remove now duplicate functions.
* 2002-09-21 Robert Collins <rbtcollins@hotmail.com>Robert Collins2002-09-203-47/+134
| | | | | | | | | | | | | | | | | | | | | * thread.cc: Change verifyable_object_isvalid calls with PTHREAD_CONDATTR_MAGIC, PTHREAD_MUTEXATTR_MAGIC, PTHREAD_COND_MAGIC, SEM_MAGIC to objecttype::isGoodObject() calls throughout. (pthread_condattr::isGoodObject): Implement. (pthread_mutex::isGoodInitializer): Implement. (pthread_mutex::isGoodInitializerOrObject): Minor bugfix in the check for verifyable_object_isvalid result. (pthread_mutexattr::isGoodObject): Implement. (pthread_cond::isGoodObject): Ditto. (pthread_cond::isGoodInitializer): Ditto. (pthread_cond::isGoodInitializerOrObject): Ditto. (semaphore::isGoodObject): Ditto. * thread.h (pthread_mutex::isGoodInitializer): Declare. (pthread_condattr::isGoodObject): Ditto. (pthread_cond::isGoodObject): Const correctness. (pthread_cond::isGoodInitializer): Declare. (pthread_cond::isGoodInitializerOrObject): Ditto. (semaphore::isGoodObject): Const correctness.
* 2002-09-21 Robert Collins <rbtcollins@hotmail.com>Robert Collins2002-09-203-61/+99
| | | | | | | | | | | | | | | | | | | | | | * thread.cc: Change verifyable_object_isvalid calls with PTHREAD_MUTEX_MAGIC and PTHREAD_KEY_MAGIC and PTHREAD_ATTR_MAGIC to ::isGoodObject() calls throughout. (MTinterface::Init): Remove dead code. (pthread_attr::isGoodObject): Implement. (pthread_key::isGoodObject): Implement. (pthread_mutex::isGoodObject): Implement. (pthread_mutex::isGoodInitializerOrObject): Implement. (pthread::isGoodObject): Update signature. * thread.h (pthread_key::isGoodObject): Declare. (pthread_attr::isGoodObject): Ditto. (pthread_mutex::isGoodObject): Ditto. (pthread_mutex::isGoodInitializerOrObject): Ditto. (pthread::isGoodObject): Change to a const parameter for const correctness. (pthread_mutexattr::isGoodObject): Declare. (pthread_condattr::isGoodObject): Ditto. (pthread_cond::isGoodObject): Ditto. (semaphore::isGoodObject): Ditto.
* * mingwex/math/files.txt: Remove inadvertantly added file.Danny Smith2002-09-192-1/+4
|
* Cleanup calls to CreateFile throughout.Christopher Faylor2002-09-1911-65/+56
| | | | | | | * dcrt0.cc (__api_fatal): Correctly check for failing return from CreateFile. * assert.cc (__assert): Don't check return value from CreateFile for NULL. * fhandler_console.cc (set_console_state_for_spawn): Ditto. * fork.cc (fork_parent): Ditto.
* * include/string.h (_strerror): Move into #ifndefDanny Smith2002-09-192-1/+7
| | | | __STRICT_ANSI__ block.
* * cygcheck.cc: Include sys/time.h rather than time.h to avoid a compiler error.Christopher Faylor2002-09-192-1/+6
|
* * cygthread.cc (cygthread::initialized): Avoid copying on fork or some threadsChristopher Faylor2002-09-1920-112/+153
| | | | | | | | | | | | | | | | | | | | | | | may not end up in the pool. (cygthread::new): Avoid race when checking for initialized. Add debugging code. * fhandler.cc (fhandler_base::raw_read): Add case for ERROR_INVALID_HANDLE due to Win95 directories. (fhandler_base::open): Handle errors due to Win95 directories. (fhandler_base::close): Add get_nohandle () test. (fhandler_base::set_close_on_exec): Ditto. (fhandler_base::fork_fixup): Ditto. (fhandler_base::lock): Change error code to Posix EINVAL. (fhandler_base::dup): If get_nohandle (), set new value to INVALID_HANDLE_VALUE instead of NULL. * fhandler_disk_file.cc (fhandler_disk_file::fstat): Call fstat_by_name if get_nohandle (). Remove extraneous element from strpbrk. (fhandler_disk_file::open): Remove test for Win95 directory. * fhandler_random.cc (fhandler_dev_random::open): Add set_nohandle (). * fhandler_clipboard.cc (fhandler_dev_clipboard::open): Ditto. * fhandler_zero.cc (fhandler_dev_zero::open): Ditto. (fhandler_dev_zero::close): Delete. * fhandler.h (class fhandler_dev_zero): Ditto.
* 2002-09-18 Eric R. Krause <ekrause_98@users.sourceforge.net>Danny Smith2002-09-192-0/+5
| | | | * include/winuser.h (DS_SHELLFONT): Define.
* * include/time.h (__need_NULL): Define before includingDanny Smith2002-09-172-0/+6
| | | | stddef.h. Thanks to: R�diger Dehmel <de@lmnet.de>.
* 2002-09-17 Daniel Schlyder <daniel@dascdev.net>Danny Smith2002-09-172-0/+5
| | | | * include/winnt.h (VER_SUITE_BLADE): Define.
* * cygcheck.cc: Reorder includes to avoid compiler error.Christopher Faylor2002-09-172-2/+6
|
* 2002-09-17 Robert Collins <rbtcollins@hotmail.com>Robert Collins2002-09-172-2/+9
| | | | | * thread.cc (pthread_key::set): Preserve GetLastError(). Reported by Thomas Pffaf.
* 2002-09-17 Robert Collins <rbtcollins@hotmail.com>Robert Collins2002-09-174-37/+148
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This work inspires by Thomas Pfaff's pthread_fork patch (1). * fork.cc (fork_child): Remove MTinterface fixup call, it's adsorbed by pthread::atforkchild. Rename __pthread_atforkchild to pthread::atforkchild to give access to private members. (fork_parent): Rename __pthread_atforkparent to pthread::atforkparent to give it access to private members. Ditto for __pthread_atforkprepare. * thread.cc: Fix some formatting problems throughout. (MTinterface::fixup_before_fork): Implement. (MTinterface::fixup_after_fork): Fix pthread_keys. (pthread_key::keys): Implement. (pthread_key::fixup_before_fork): Ditto. (pthread_key::fixup_after_fork): Ditto. (pthread_key::pthread_key): Add to pthread_key::keys. (pthread_key::~pthread_key): Remove from pthread_key::keys. (pthread_key::saveKeyToBuffer): Implement. (pthread_key::recreateKeyFromBuffer): Ditto. (pthread::atforkprepare): Prepare all MT classes for fork. (pthread::atforkchild): And fix them up afterwards. * thread.h (pthread_key): Buffer the key value during fork in fork_buf. List the keys needing to be fixed up in a linked list with head pthread_key::keys. (pthread): Move atfork cygwin internal calls into the class. (MTInterface): Provide a fixup_before_fork for objecst that need to save state. (__pthread_atforkprepare): Remove. (__pthread_atforkparent): Remove. (__pthread_atforkchild): Remove.
* * include/shlobj.h (SHGetSpecialFolderPath[AW]): Add _WIN32_IE guard.Danny Smith2002-09-172-7/+33
| | | | | | | Correct prototype for wide version. (SHGetFolderPath): Add comment on shfolder.dll library. (SHGetFolderLocation): Add prototyope for WinME and W2K. (SHGetFolderPathAndSubDir[AW]): Add prototypes for XP.
* * init.cc: Cleanup slightly and remove obsolete code.Christopher Faylor2002-09-165-30/+21
|
* 2002-09-11 Robert Collins <rbtcollins@hotmail.com>Robert Collins2002-09-165-66/+298
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * init.cc (dll_entry): On thread detach, if the thread hasn't exit()ed, do so. * pthread.cc (pthread_getsequence_np): Remove the __pthread_getsequence_np wrapper. This requires errno.h. * thread.cc (pthread::self): Instantiate a new pthread object when called and none exists. return a NULL object if instantiation fails. (pthread::precreate): Factor out common code. (pthread::postcreate): Ditto. (pthread::create): Ditto. (pthread::exit): Remove the TLS value when we exit to prevent double exits. (MTinterface::Init): Bugfix - don't mark the TLS index as created if one was not allocated. Apply Extract Method to move pthread specific initialisation into pthread. (pthread::initMainThread): Extracted method from MTinterface::Init. (pthread::setTlsSelfPointer): Extracted method from various pthread calls, to make reading those functions easier. (pthread::setThreadIdtoCurrent): Ditto. (pthread::cancel_self): Bring into the .cc file, it's only used within the class. (pthread::getThreadId): Ditto. (pthread::thread_init_wrapper): Apply Extract Method to the TLS setting logic. (pthread::isGoodObject): Extracted method from various pthread wrapper calls, for clarity of reading. (pthread::getsequence_np): Converted from __pthread_getsquence_np. (__pthread_create): Apply Extract Method to the object validation. (__pthread_cancel): Ditto. (__pthread_join): Ditto. (__pthread_detach): Ditto. (__pthread_suspend): Ditto. (__pthread_continue): Ditto. (__pthread_getschedparam): Ditto. (__pthread_getsequence_np): Remove. (__pthread_setschedparam): Apply Extract Method to the object validation. (pthreadNull::getNullpthread): New method, return the pthreadNull object. (pthreadNull::pthreadNull): Private constructor to prevent accidental use. (pthreadNull::~pthreadNull): Prevent compile warnings. (pthreadNull::create): Override pthread behaviour. (pthreadNull::exit): Ditto. (pthreadNull::cancel): Ditto. (pthreadNull::testcancel): Ditto. (pthreadNull::setcancelstate): Ditto. (pthreadNull::setcanceltype): Ditto. (pthreadNull::push_cleanup_handler): Ditto. (pthreadNull::pop_cleanup_handler): Ditto. (pthreadNull::getsequence_np): Ditto. (pthreadNull::_instance): Ditto. * thread.h (pthread): Declare pre- and post-create. Move GetThreadId to private scope and rename to getThreadId. Move setThreadIdtoCurrent to private scope. Make create virtual. Make ~pthread virtual. Declare initMainThread. Declare isGoodObject. Make exit virtual. Make cancel virtual. Make testcancel virtual. Make setcancelstate virtual. Make setcanceltype virtual. Make push_cleanup_handler virtual. Make pop_cleanup_handler virtual. Declare getsequence_np. Declare setTlsSelfPointer. (pthreadNull): New null object class for pthread. (__pthread_getsequence_np): Remove.
* * lib/shell32.def (SHGetFolderPath[AW]): Add comment.Danny Smith2002-09-163-1/+12
| | | | * lib/shfolder.def: New file.
* 2002-09-16 Ranjit Matthew <rmathew@hotmail.com>Danny Smith2002-09-162-1/+5
| | | | * include/stdio.h: Correct comment about directory separator.
* Add final newlines to utilsJoshua Daniel Franklin2002-09-1514-13/+41
|
* 2002-09-12 Igor Pechtchanski <pechtcha@cs.nyu.edu>Joshua Daniel Franklin2002-09-152-2/+10
| | | | | | * cygpath.cc (options) New global variable. (main) Make short options global for easier change. (print_version) Add a missing newline.
* fix typoChristopher Faylor2002-09-131-1/+1
|
* fix typoChristopher Faylor2002-09-131-1/+1
|
* * syscalls.cc (seteuid32): Treat ILLEGAL_UID invalid.Corinna Vinschen2002-09-132-6/+19
| | | | (setegid32): Treat ILLEGAL_GID invalid.
* * include/sys/time.h (timeval): Add struct definition andDanny Smith2002-09-122-0/+21
| | | | associated macros (copied from w32api/include/winsock.h).
* * include/winsock.h (timeval): Guard struct and associatedDanny Smith2002-09-123-12/+24
| | | | | macros with _TIMEVAL_DEFINED. * include/winsock2.h (timeval): Likewise.
* * grp.cc (initgroups): Call groups::clear_supp to free theCorinna Vinschen2002-09-114-3/+21
| | | | | | | supplementary group sids that may have been set by setgroups. * security.cc (cygsidlist::free_sids): Also zero the class members. * security.h (groups::clear_supp): New. Rename cygsidlist_unknown to cygsidlist_empty.
* * ntsec.html: Add chapter for switching user context w/o password.Corinna Vinschen2002-09-112-2/+26
|
* * lib/shell32.def: Add missing stubs.Danny Smith2002-09-112-30/+85
|
* * fhandler_tty.cc (fhandler_tty_slave::open): Don't protect input/outputChristopher Faylor2002-09-083-4/+8
| | | | | handles since they are not properly manipulated later. * tty.cc (tty::make_pipes): Ditto.
* * include/windef.h (WINVER): Add documentation.Earnie Boyd2002-09-072-0/+17
| | | | | (_WIN32_WINNT): Ditto. Special thanks to Paul Schmidt <paul@tricattechnologies.com>
* whitespaceChristopher Faylor2002-09-061-4/+4
|
* * winsup.h (_WIN32_WINNT): Protect.Christopher Faylor2002-09-062-0/+6
|
* * winsup.h (_WIN32_WINNT): Define.Christopher Faylor2002-09-062-0/+6
|
* * lib/Makefile.in (TEST_OPTIONS): Define WINVER to 0x0666.Danny Smith2002-09-062-1/+6
|
* * include/_mingw.h: Increment version to 2.3.Earnie Boyd2002-09-053-3/+8
| | | | Makefile.in: Ditto.
* * mingwex/fegetenv.c: Change to \n line endings.Earnie Boyd2002-09-054-22/+28
| | | | | * mingwex/vsnprintf.c: Ditto. * mingwex/vsnwprintf.c: Ditto.
* 2002-09-04 Kevin Chase <kevincha99@hotmail.com>Danny Smith2002-09-043-0/+17
| | | | | | | * include/winbase.h (AllocateUserPhysicalPages, MapUserPhysicalPages, MapUserPhysicalPagesScatter, FreeUserPhysicalPages): Add prototypes. * lib/kernel32.def: Add function stubs for above.
* some editsChristopher Faylor2002-09-041-32/+43
|
* first draftChristopher Faylor2002-09-041-0/+55
|
* fix typoChristopher Faylor2002-09-041-1/+1
|
* * Makefile.in (DLL_OFILES): Drop shortcut.o.Corinna Vinschen2002-09-046-200/+95
| | | | | | | | * path.cc: Move all shortcut functions from shortcut.c to here. (check_shortcut): Implement without using COM interface. * path.h: Move definition of SHORTCUT_HDR_SIZE to here. * shortcut.c: Remove. * shortcut.h: Ditto.
* * fhandler.h (fhandler_socket::read): Remove method.Corinna Vinschen2002-09-044-113/+324
| | | | | | | | | | | | | | | | | (fhandler_socket::write): Ditto. (fhandler_socket::readv): New method. (fhandler_socket::writev): Ditto. (fhandler_socket::recvmsg): Add new optional argument. (fhandler_socket::sendmsg): Ditto. * fhandler.cc (fhandler_socket::read): Remove method. (fhandler_socket::write): Ditto. (fhandler_socket::readv): New method. (fhandler_socket::writev): Ditto. (fhandler_socket::recvmsg): Use win32's scatter/gather IO where possible. (fhandler_socket::sendmsg): Ditto. * net.cc (cygwin_recvmsg): Check the msghdr's iovec fields. (cygwin_sendmsg): Ditto. Add omitted sigframe.
* 2002-09-03 Ren� M�ller Fonseca <fonseca@users.sourceforge.net>Danny Smith2002-09-032-6/+19
| | | | | * include/winuser.h (IDTRYAGAIN,IDCONTINUE): Add defines. Add WINVER guards for dialog box command id defines.
* * include/wincon.h (GetConsoleWindow): Add _WIN32_WINNT >= 0x0500 guard.Earnie Boyd2002-09-032-0/+6
|
* * cygwin.din: Revert exporting new wchar functions.Corinna Vinschen2002-09-033-55/+6
| | | | * include/cygwin/version.h: Change comment for API minor 62.