summaryrefslogtreecommitdiffstats
path: root/winsup
Commit message (Collapse)AuthorAgeFilesLines
* * 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.
* * dcrt0.cc (dll_crt0_1): Remove getpagesize() call.Christopher Faylor2002-09-023-2/+6
| | | | * shared.cc (memory_init): Move it here.
* * mingwex/math/hypotl.c: Replace with version based on cephesDanny Smith2002-09-022-43/+63
| | | | library.
* * fhandler_proc.cc: Add <sys/param.h> include.Christopher Faylor2002-08-313-16/+24
| | | | | | | | | | (format_proc_uptime): Use KernelTime and UserTime only as they include the other counters. (format_proc_stat): KernelTime includes IdleTime, so subtract IdleTime from KernelTime. Make number of 'jiffies' per second same as HZ define. * fhandler_process.cc: Add <sys/param.h> include. (format_process_stat): Make number of 'jiffies' per second same as HZ define. Use KernelTime and UserTime only to calculate start_time.
* * fhandler_tty.cc (fhandler_tty_slave::fhandler_tty_slave): Set "don't needChristopher Faylor2002-08-312-2/+5
| | | | | | ready for read" flag. (fhandler_tty_slave::read): Don't do anything special with vtime when vmin == 0.
* (inspired by a patch from Egor Duda)Christopher Faylor2002-08-315-45/+22
| | | | | | | | * select.cc (fhandler_tty_slave::ready_for_read): Remove. * fhandler.h (fhandler_tty_slave::ready_for_read): Remove declaration. * fhandler_tty.cc (fhandler_tty_slave::read): Don't do anything special with vtime when vmin == 0. * autoload.cc (GetConsoleWindow): Correct parameter count.
* Christopher Faylor <cgf@redhat.com>Christopher Faylor2002-08-303-3/+14
| | | | | * tty.cc (tty_list::allocate_tty): Use GetConsoleWindow, if available. Call FindWindow in a loop.
* * include/wincon.h: Define GetConsoleWindow(void).Christopher Faylor2002-08-302-0/+5
|
* * miscfuncs.cc (check_iovec_for_read): Don't check buffer when zero lengthChristopher Faylor2002-08-308-130/+288
| | | | | | | | | | | | | | | | | | | | iov_len. (check_iovec_for_write): Ditto. * fhandler.h (fhandler_base::readv): New method. (fhandler_base::writev): Ditto. * fhandler.cc (fhandler_base::readv): New method. (fhandler_base::writev): Ditto. * syscalls.cc (_read): Delegate to readv(2). (_write): Ditto, mutatis mutandi. (readv): Rewrite, based on the old _read code, to use the new fhandler_base::readv method. Improve access mode handling and ensure all calls reach the final strace statement. (writev): Ditto, mutatis mutandi. * include/sys/uio.h (struct iovec): Change field types to match SUSv3. * winsup.h (check_iovec_for_read): New function. (check_iovec_for_write): Ditto. * miscfuncs.cc (check_iovec_for_read): Ditto. (check_iovec_for_write): Ditto.
* Sigh, mbsrtowcs was still missing...Corinna Vinschen2002-08-301-0/+2
|
* * cygwin.din: Add more prototypes for new wchar functions in newlib.Corinna Vinschen2002-08-302-0/+18
|
* * cygwin.din: Add prototypes for new wchar functions in newlib.Corinna Vinschen2002-08-303-1/+45
| | | | * include/cygwin/version.h: Bump API minor number.
* * how-api.texinfo: Remove a line from the CRLF discussion about lseek notChristopher Faylor2002-08-302-6/+7
| | | | working. Answer thread safe question more simply.
* * poll.cc (poll): Peek sockets ready for read to see if there'sCorinna Vinschen2002-08-292-1/+28
| | | | actually data.
* * cygthread.cc (hthreads): Remove unneeded global.Christopher Faylor2002-08-293-14/+72
| | | | | | | | | | (cygthread::simplestub): New static member function. (cygthread::runner): Don't set hthreads. (cygthread::freerange): New member function. (cygthread::operator new): Call freerange if all cygwin slots are used up. (cygthread::exit_thread): Don't mess with event if freerange thread. (cygthread::detach): Ditto. * cygthread.h (class cygthread): Declare new member functions and variables.
* removeChristopher Faylor2002-08-291-0/+0
|
* * include/w32api.h: Increment version to 2.1.Earnie Boyd2002-08-283-2/+7
| | | | * Makefile.in: Ditto.
* * include/sys/param.h: Add ENDIAN defines.Danny Smith2002-08-283-1/+13
| | | | * test_headers.c: Include sys/param.h.
* removeChristopher Faylor2002-08-281-29/+0
|
* * malloc.cc: Protect some definitions to avoid a compile time warning.Christopher Faylor2002-08-282-0/+8
|