Commit Graph

2570 Commits

Author SHA1 Message Date
Danny Smith b04b30b914 2002-10-11 Steven Edwards <Steven_Ed4153@yahoo.com>
* lib/ntdll.def (RtlAcquireResourceExclusive,
	RtlAcquireResourceShared, RtlDeleteResource,
	RtlInitializeResource, RtlReleaseResource,
	RtlTimeToSecondsSince1970) : Added missing exports.
	* include/olectl.h (PROPPAGEINFO): Change type of
	field cb to ULONG.
2002-10-11 03:38:14 +00:00
Danny Smith 798a4740d7 * include/stdint.h (INT64_C, UINT64_C ): Append suffix to let
macros work with C89.
	(INTMAX_C, UINTMAX_C): Likewise.
2002-10-11 02:21:56 +00:00
Danny Smith f98e630084 * include/string.h (strcasecmp): Make extern __inline__.
(strncasecmp): Likewise.
	(wcscmpi): Likewise.
2002-10-11 01:41:31 +00:00
Christopher Faylor b01ff453d9 * window.cc (gethwnd): Use SetThreadPriority method. 2002-10-10 05:31:43 +00:00
Christopher Faylor 2a3bf3e2ce * Makefile.in (new-cygwin1.dll): Reorganize library order.
* dcrt0.cc (do_exit): Move thread stuff after vfork stuff or threads are
terminated during vfork.
* sigproc.cc (proc_terminate): Grab proc lock prior to signalling subproc
thread exit to avoid an extra "wait-for-thread-to-exit".
2002-10-10 05:23:23 +00:00
Christopher Faylor c4ec64d76b * cygthread.cc (cygthread::stub): Don't create an event for "cygself" threads.
Assume that they exit via an ExitThread call.
* cygthread.h (cygthread::SetThreadPriority): New function.
(cygthread::zap_h): New function.
* dcrt0.cc (do_exit): Move cygthread::terminate earlier and establish
exit_state guard.
* fhandler.h (fhandler_tty_master::output_thread): Delete.
* fhandler_tty.cc (fhandler_tty_master::init): Set priority for threads via
method.  Zap handles when done.  Don't treat process_output specially.
(process_output): Call ExitThread directly.
(fhandler_tty_master::fixup_after_fork): Don't worry about output_thread.
(fhandler_tty_master::fixup_after_exec): Ditto.
* sigproc.cc (proc_terminate): Don't detach from hwait_subproc.  Just let it
exit.
(sigproc_init): Close thread handle after initialization.
(wait_sig): Use GetCurrentThread() as SetThreadPriority call rather than
*event* handle.  Call ExitThread directly on termination.
(wait_subproc): Call ExitThread directly on termination.
* tty.cc (tty_list::terminate): Don't attempt t detach from output_thread.
2002-10-09 05:55:40 +00:00
Christopher Faylor 7da53596cf * cygheap.cc (dup_now): Make fatal error a little more informative.
(cygheap_setup_for_child): Detect when default size of shared region is less
than the current size and allocate that much.
(_cbrk): Just return NULL on inability to allocate.
(_cmalloc): Ditto.
* cygheap.h (CYGHEAPSIZE): Change size to reflect newer, tinier fhandler sizes.
* spawn.cc (av::error): New element, reflects potential errno from cmalloc.
(av::~av): Don't free NULL pointers.
(av::replace0_maybe): Detect out-of-memory conditions.
(av::dup_maybe): Ditto.
(av::dup_all): Ditto.
(av::unshift): Ditto.
(spawn_guts): Set errno and return if argv creation ran into problems.
* fhandler.h (fhandler_union): Change member names to something safer.
* fhandler_console.cc (fhandler_console::get_tty_stuff): Always set
fhandler_console::dev_state regardless of whether shared region is initialized.
* cygthread.cc (cygthread::runner): Use ExitThread rather than return
(planning for future).
2002-10-09 04:08:05 +00:00
Danny Smith ce6ac4003f 2002-10-08 Heiko Gerdau <hg@technosis.de>
* include/oleacc.h: New file.
	* include/winuser.h (ENDSESSION_LOGOFF) Add define.
	(OBJID_*) Add defines.
	* lib/uuid.c: Add DEFINE_GUID for IID_IAccessible.
	* lib/test.c: Include oleacc.h.
2002-10-09 00:16:22 +00:00
Danny Smith 32fef334cd 2002-10-08 Heiko Gerdau <hg@technosis.de>
* include/tchar.h (_tchdir. _tgetcwd, _tgetdcwd.
	_tmkdir, _trmdir, _tstat): Add ASCII and UNICODE
	mappings.
2002-10-08 20:28:14 +00:00
Christopher Faylor 3c66c0707c * fhandler.h (dev_console): New class.
(fhandler_console::dev_state): New class element.
(fhandler_console::mouse_aware): Use dev_state element.
(fhandler_console::get_tty_stuff): Declare new function.
* fhandler_console.cc: Use dev_state fhandler_console element, throughout.
(fhandler_console::get_tty_stuff): Move to fhandler_console class.  Incorporate
dev_console information.  Move constructor stuff here.
2002-10-08 06:16:16 +00:00
Christopher Faylor 9655ff2680 * dtable.cc (dtable::init_std_file_from_handle): Try to mimic standard open
behavior with files redirected from stdin/stdout/stderr, i.e., fmode settings
take precedence over mount settings.
2002-10-08 02:44:35 +00:00
Christopher Faylor dd76747b8e * dtable.cc (unknown_file): New variable.
(dtable::init_std_file_from_handle): Don't set binmode if we couldn't determine
the actual file name on stdin/stdout/stderr.
(handle_to_fn): Return unknown_file when can't determine filename.
2002-10-07 20:06:16 +00:00
Christopher Faylor bc63ea872c * dcrt0.cc (do_exit): Call DisableThreadLibraryCalls since we don't need to
track thread detaches.
* init.cc (dll_entry): Reorganize slightly.  Fix api_fatal message.
2002-10-07 04:12:54 +00:00
Danny Smith 66451d9590 * mingwex/math/powil.c: Rename powil to __powil.
* mingwex/math/powl.c: Adjust declaration and call
	to __powil. Remove comment on powil.
	* mingwex/math/powi.c: New file.
	* mingwex/math/powif.c: New file.
	* mingwex/math/pow.c: New file.
	* mingwex/math/cephes_mconf.h. Add double and float
	versions of constants.
	(polevl): Add double precision function.
	(p1evl): Likewise.
	* mingwex/Makefile.in (MATH_DISTFILES): Add pow.c,
	powi.c, powif.c.
	(MATH_OBJS): Add pow.o,	powi.o, powif.o.
2002-10-06 23:26:43 +00:00
Earnie Boyd 2bacbfb1d1 2002-10-06 Casper Hornstrup <chorns@it.dk>
* include/ddk: New subdir.
	* lib/ddk: Ditto.
	* include/ddk/(atm.h, batclass.h, cfg.h, cfgmgr32.h, d4drvif.h,
	d4iface.h, ddkmapi.h, hidclass.h, hidpi.h, hidusage.h, mcd.h,
	miniport.h, minitape.h, mountdev.h, mountmgr.h, ndis.h,
	ndisquid.h, ndistapi.h, ndisvan.h, netevent.h, netpnp.h,
	netdev.h, ntapi.h, ntdd8042.h, ntddbeep.h, ntddcdrm.h,
	ntddcdvd.h, ntddchgr.h, ntdddisk.h, ntddk.h, ntddkbd.h,
	ntddmou.h, ntddndis.h, ntddpar.h, ntddpcm.h, ntddscsi.h,
	ntddser.h, ntddstor.h, ntddtape.h, ntddtdi.h, ntddvdeo.h,
	ntddvol.h, ntifs.h, ntpoapi.h, ntstatus.h, parallel.h, pfhook.h,
	poclass.h, scsi.h, scsiscan.h, scsiwmi.h, smbus.h, srb.h,
	storport.h, tdi.h, tdiinfo.h, tdikrnl.h, tdistat.h, tvout.h,
	upssvc.h, usb.h, usb100.h, usbcamdi.h, usbdi.h, usbioctl.h,
	usbiodef.h, usbscan.h, usbuser.h, video.h, videoagp.h, win2k.h,
	winddi.h, winddk.h, winnt4.h, winxp.h, ws2san.h,
	xfilter.h): New files.
	* lib/ddk/(Makefile.in, apcups.def, cfgmgr32.def, dxapi.def,
	hal.def, hid.def, hidparse.def, mcd.def, ndis.def, ntoskrnl.def,
	scsiport.def, tdi.def, usbcamd.def, usbcamd2.def, videoprt.def,
	win32k.def): Ditto.
2002-10-06 22:18:26 +00:00
Christopher Faylor 09663d31bb * cygthread.cc (cygthread::stub): Very minor cleanup.
(cygthread::stub): Report overflows in cygwin thread pool when DEBUGGING is on
and special environment variable is not set.
(cygthread::terminate): Set event only when event actually exists.
* exceptions.cc (signal_exit): Set priority of main thread to low before
setting current thread to high.
2002-10-06 01:01:58 +00:00
Christopher Faylor f8f63f9bc1 whitespace 2002-10-05 17:47:25 +00:00
Danny Smith b63ad95b8d 2002-10-04 Steven Edwards <Steven_Ed4153@yahoo.com>
* lib/ntdll.def (NtAccessCheck, NtAdjustPrivilegesToken,
	NtCreateKey, NtDeleteKey, NtDeleteValueKey, NtEnumerateKey,
	NtEnumerateValueKey, NtOpenKey, NtOpenProcessToken,
	NtOpenThreadToken, NtQueryInformationToken, NtQueryKey,
	NtQueryValueKey, NtSetSecurityObject, NtSetValueKey,
	RtlAddAccessAllowedAce, RtlCreateAcl,
	RtlCreateSecurityDescriptor, RtlCreateUnicodeStringFromAsciiz,
	RtlGetAce, RtlGetControlSecurityDescriptor,
	RtlGetDaclSecurityDescriptor,RtlGetGroupSecurityDescriptor,
	RtlGetOwnerSecurityDescriptor,RtlGetSaclSecurityDescriptor,
	RtlImpersonateSelf, RtlIsTextUnicode, RtlLargeIntegerAdd,
	RtlLengthSecurityDescriptor, RtlMakeSelfRelativeSD,
	RtlMultiByteToUnicodeN RtlMultiByteToUnicodeSize,
	RtlOpenCurrentUser, RtlSetDaclSecurityDescriptor,
	RtlSetGroupSecurityDescriptor, RtlSetOwnerSecurityDescriptor,
	RtlSetSaclSecurityDescriptor, RtlValidSecurityDescriptor,
	ZwAccessCheck, ZwAdjustPrivilegesToken, ZwCreateKey,
	ZwDeleteValueKey, ZwEnumerateKey, ZwEnumerateValueKey,
	ZwOpenKey, ZwOpenProcessToken, ZwOpenThreadToken,
	ZwQueryInformationToken, ZwQueryKey, ZwQueryValueKey
	ZwSetSecurityObject, ZwSetValueKey): Added missing exports.

ChangeLog whitespace cleanup.
2002-10-04 04:39:26 +00:00
Danny Smith d905b7d0ce 2002-10-04 "KJK::Hyperion" <noog@libero.it>
*include/windef.h (WPARAM): Update typedef.
	(LPARAM): Ditto.
	(LRESULT): Ditto.
2002-10-04 04:25:00 +00:00
Danny Smith 6930d6cdd0 2002-10-04 "KJK::Hyperion" <noog@libero.it>
* include/shlobj.h (CSIDL_*): Add defines.
2002-10-04 04:18:55 +00:00
Danny Smith 3073f3f29d * include/cytpe.h (_imp____mbcur_max): Add missing ';'.
(_imp____mbcur_max_dll): Likewise.
2002-10-03 00:51:25 +00:00
Danny Smith 7c3de623b6 * include/fcntl.h (_fmode): Remove declarations and
compatibility defines.
	(_setmode, setmode): Remove prototypes.
	* include/stdlib (_fmode): Add declarations and
	compatibility defines.  Change type to int.
	* include/io.h (_setmode, setmode): Add prototypes.
	* samples/fmode/all.c: Adjust includes.
	* samples/fmode/test.c: Likewise.
	* crt1.c (_CRT_fmode): Declare as int.
	* CRTfmode.c (_CRT_fmode): Likewise.

	* include/stdlib: Remove comment about MB_CUR_MAX.
2002-10-03 00:49:21 +00:00
Danny Smith 516658560f * include/stdlib.h (_imp____mbcur_max): add missing ';'.
(_imp____mbcur_max_dll): Likewise.
2002-10-02 03:43:33 +00:00
Robert Collins 404f35cb5c 2002-10-01 Robert Collins <rbtcollins@hotmail.com>
* thread.cc (pthread_key::keys): Copy on fork. Add a comment explaining
        why.
        (pthreadNull::_instance): Copy on fork. Absolutely no state exists
        in pthreadNull.
2002-09-30 21:06:05 +00:00
Conrad Scott 18be975d30 * cygserver_transport_pipes.cc (transport_layer_pipes::accept):
Remove trailing \n from debug_printf.
2002-09-30 18:31:56 +00:00
Christopher Faylor 6cae97d5dc whitespace 2002-09-30 15:17:44 +00:00
Christopher Faylor 66dca8bb0d * thread.cc (pthread_mutex::initMutex): Remove \n from api_fatal. 2002-09-30 15:11:55 +00:00
Christopher Faylor bd2b5664a1 * thread.cc (pthread::precreate): Use explicit "no inherit" option when
creating mutex.
(pthread_mutex::nativeMutex::init): Ditto.
(semaphore::semaphore): Ditto.
2002-09-30 15:05:00 +00:00
Christopher Faylor e58273df45 * thread.cc (pthread_key::keys): Do not copy on fork.
(pthread_mutex::mutexInitializationLock): Ditto.
(pthreadNull::_instance): Ditto.
2002-09-30 15:00:52 +00:00
Christopher Faylor 63e5f2006d * exceptions.cc (unused_sig_wrapper): Still need additional level of
indirection when setting errno.
2002-09-30 14:18:43 +00:00
Robert Collins 06175d0acd 2002-09-30 Robert Collins <rbtcollins@hotmail.com>
* thread.cc (pthread_mutex::initMutex): Use the wrapper init call.
        (pthread_mutex::nativeMutex::init): Implement.
        (pthread_mutex::nativeMutex::lock): Ditto.
        (pthread_mutex::nativeMutex::unlock): Ditto.
        (pthread_mutex::init): Use the wrapper lock and unlockcalls.
        * thread.h (pthread_mutex): Move mutexInitializationLock into a
        nativeMutex wrapper class.
2002-09-30 11:43:43 +00:00
Christopher Faylor f70389b541 Remove \n from calls to strace class printfs throughout. 2002-09-30 04:35:18 +00:00
Christopher Faylor da77b2c84c remove newline 2002-09-30 04:27:32 +00:00
Christopher Faylor e7733defb9 * exceptions.cc (unused_sig_wrapper): Accommodate newer compilers. 2002-09-30 04:26:52 +00:00
Christopher Faylor f789fbbf35 * security.cc (allow_ntsec): Default to zero.
* environ.cc (environ_init): Set allow_ntsec to TRUE by default, assuming OS
allows it.
2002-09-30 03:05:13 +00:00
Christopher Faylor 0fa64fa3a7 * cygpath.cc (close_arg): Remove unused static.
* mkgroup.c (enum_local_users): Avoid compiler warning.
(enum_users): Ditto.
* mkpasswd.c: Ditto throughout.
* ssp.c: Ditto throughout.
2002-09-30 03:01:17 +00:00
Christopher Faylor 9d1e72a175 * environ.cc (environ_init): Avoid a compiler warning.
* path.cc (path_conv::check): Ditto.
* path.h (path_conv::operator int): Ditto.
* regex/engine.c: Ditto throughout.
* regex/regcomp.c: Ditto throughout.
* regex/regexec.c: Ditto throughout.
2002-09-30 02:51:22 +00:00
Christopher Faylor 79ed43004f * thread.cc: Use "%E" in *_printf throughout rather than calling GetLastError.
GNUify comments.
(__pthread_mutex_lock): Don't return error on EBUSY since that just means that
the mutex has already been initialized.
2002-09-30 01:19:45 +00:00
Christopher Faylor 881ffcb478 GNUify slightly. 2002-09-29 23:56:57 +00:00
Robert Collins eb208df05a 2002-09-30 Robert Collins <rbtcollins@hotmail.com>
* pthread.cc (pthread_mutex_init): Use new pthread_mutex::init.
        * thread.cc: Change __pthread_mutex_init to pthread_mutex::init
        throughout.
        (MTinterface::Init): Initialise pthread_mutex support.
        (pthread_mutex::mutexInitializationLock): Instantiate.
        (pthread_mutex::initMutex): New method.
        (__pthread_cond_dowait): Don't dereference untrusted pointers.
        Use the new pthread_mutex::init method.
        (__pthread_condattr_init): Don't dereference untrusted pointers.
        (__pthread_mutex_init): Rename to pthread_mutex::init.
        Lock and release mutexInitializationLock to prevent races on
        mutex initialisation.
        * thread.h (pthread_mutex::initMutex): New method, initialise
        pthread_mutex supporting state on process initialisation.
        (pthread_mutex::init): Initialise a single mutex.
        (pthread_mutex::mutexInitializationLock): A win32 mutex for
        syncronising pthread mutex initialisation.
        (__pthread_mutex_init): Remove this.
2002-09-29 23:47:45 +00:00
Christopher Faylor 4d8eba164f Add missing ChangeLog entry. 2002-09-29 03:15:55 +00:00
Christopher Faylor aea1f301fc * cygthread.h (cygthread::terminate): Declare new function.
(cygthread::initialized): Change to 'int'.
* cygthread.cc (cygthread::stub): Exit thread if initialized < 0.
(cygthread::new): Ditto.
(cygthread::runner): Ditto.  Set initialized using xor to preserve sign.
(cygthread::terminate): New function.
* dcrt0.cc (do_exit): Call cygthread::terminate.
2002-09-29 02:19:35 +00:00
Christopher Faylor fc5dae1cca * Makefile.in (check): Be more defensive when creating testsuite config.status. 2002-09-28 03:15:44 +00:00
Robert Collins da6a08decb 2002-09-27 Robert Collins <rbtcollins@hotmail.com>
* thread.cc (pthread_key::run_destructor): Run_destructor is not
       const as it needs to set the key value.
       * thread.h (pthread_key::run_destructor): Ditto.

2002-09-27  Robert Collins <rbtcollins@hotmail.com>

       * thread.cc (pthread_key::run_destructor): Follow opengroup algorithm.
       I.e. only run the destructor NON-NULL key values, and reset the key
       to NULL before running the destructor. Reported by Thomas Pfaff.
2002-09-27 15:08:50 +00:00
Christopher Faylor 961973e7a4 * cygrun.c (main): Fix setting of CYGWIN environment variable.
* Makefile.in: Remove linking of unnecessary libraries.
2002-09-25 13:53:46 +00:00
Christopher Faylor 38c77307c5 * fhandler_proc.cc (format_process_stat): make ctty a real device number.
(format_process_status): use effective uid/gid as real and saved uid/gid.
2002-09-25 12:24:23 +00:00
Corinna Vinschen f4b098d95e * errno.cc (errmap): Map ERROR_INVALID_ADDRESS to new errno code
EOVERFLOW.
	(_sys_errlist): Add entries for EILSEQ and EOVERFLOW.
	(strerror): Ditto.
	* mmap.cc (map_map): Set errno in case of error.
	(mmap64): Remove setting errno explicitely to ENOMEM.
2002-09-24 14:17:50 +00:00
Corinna Vinschen 6b579509ea * mmap.cc (map_map): Add debug output.
(mmap64): Evaluate gran_len correctly even if offset isn't 0.
2002-09-24 13:48:07 +00:00
Danny Smith 1878ede072 * include/ws2tcpip.h: Throw error if winsock.h, not winsock2.h
has been included first.
2002-09-24 01:47:27 +00:00
Danny Smith 7aaee7b646 2002-09-24 Rene Moeller Fonseca <fonseca@users.sourceforge.net>
* include/winbase.h (FindFirstFileEx): Fixed ANSI mode.
        * include/wingdi.h (PFD_SWAP_LAYER_BUFFERS):Added define.
        * include/winuser.h (AppendMenu[AW]): Fixed prototypes.
2002-09-24 01:28:00 +00:00