Commit Graph

3860 Commits

Author SHA1 Message Date
Danny Smith cbae134251 2003-11-13 Martin Fuchs <martin-fuchs@gmx.net>
* include/shlobj.h (ILAppendID, ILClone, ILCloneFirst, ILCombine,
	ILFindChild, ILFindLastID, ILFree, ILGetNext, ILGetSize, ILIsEqual,
	ILIsParent, ILLoadFromStream, ILRemoveLastID, ILSaveToStream):
	Add prototypes.
	* lib/shell32.def: Add stubs.

	* include/commctrl.h (ListView_FindItem): Add type cast to avoid
	compiler warnings.

2003-11-13  Hans Leidekker <hans@it.vu.nl>

	* include/winbase.h (WIN32_STREAM_ID): Correct typedef.
2003-11-13 09:43:08 +00:00
Thomas Pfaff 068834a10f * thread.cc (pthread::exit): Cleanup on thread exit.
(__reent_t::init_clib): Set thread local clib __cleanup var
appropriately.
2003-11-11 19:10:47 +00:00
Christopher Faylor 8398809e7d * miscfuncs.cc (low_priority_sleep): Make a "C" function.
* winsup.h (low_priority_sleep): Revert previous change to declaration.
2003-11-10 21:28:02 +00:00
Corinna Vinschen 07ff303782 * winsup.h (low_priority_sleep): Fix declaration to avoid linker
warning.
2003-11-10 21:17:53 +00:00
Thomas Pfaff 73e36316cc * thread.cc (__reent_t::init_clib): Set thread local clib
__sdidinit var appropriately.
2003-11-10 19:44:53 +00:00
Corinna Vinschen 1db928422e * syscalls.cc (ftruncate64): Log length as long long.
(logout): Erase ut_host.  Don't write wtmp entry.  Return 1 only
	if matching utmp entry has been found, 0 otherwise.
2003-11-08 16:38:34 +00:00
Corinna Vinschen 8e68687d2a * external.cc (cygwin_internal): Add CW_GET_UID_FROM_SID and
CW_GET_GID_FROM_SID handling.
	* include/cygwin/version.h: Bump API minor number.
	* include/sys/cygwin.h (cygwin_getinfo_types): Add
	CW_GET_UID_FROM_SID and CW_GET_GID_FROM_SID.
2003-11-08 09:48:48 +00:00
Corinna Vinschen 0a5ea9471b * cygpath.cc (main): Allow multiple pathnames on command line. 2003-11-07 18:30:35 +00:00
Christopher Faylor 182d0e28a7 * fhandler_disk_file.cc (fhandler_disk_file::opendir): Reorganize to handle
freeing of memory on error condition.
2003-11-07 18:22:26 +00:00
Christopher Faylor ef4d65ba95 * cygthread.cc (cygthread::freerange): Set inuse count. Avoid setting ev from
h as h would be NULL at this point.
(cygthread::operator new): Issue debugging info when overflowing the thread
pool.
(cygthread::cygthread): Set ev from h here after h has been initialized.
2003-11-07 18:21:05 +00:00
Corinna Vinschen 03c8f22f77 * Missing patch to cygwin.din. 2003-11-06 21:36:17 +00:00
Corinna Vinschen 3e68e19f05 * bsdlib.cc (_vwarnx): New function.
(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-11-06 21:31:24 +00:00
Corinna Vinschen 6ef3b76be2 * syscalls.cc (getshmlba): New function.
* external.cc (cygwin_internal): Add CW_GET_SHMLBA handling.
	* mmap.cc (mmap64): Call getshmlba to evaluate granularity.
	* winsup.h (getshmlba): Add declaration.
	* include/cygwin/version.h: Bump API minor number.
	* include/sys/cygwin.h (cygwin_getinfo_types): Add CW_GET_SHMLBA.
2003-11-06 14:33:16 +00:00
Christopher Faylor fad5aef860 * winsup.h: Declare access_worker. 2003-11-06 13:58:45 +00:00
Corinna Vinschen 80ab7cb41f * include/cygwin/types.h: Fix preprocessor guards for vm_offset_t and
vm_size_t.  Add typedef for vm_object_t.
2003-11-06 10:46:49 +00:00
Christopher Faylor d417aec908 * fhandler_disk_file.cc (fhandler_disk_file::opendir): Detect attempt to open a
directory which lacks read privileges.
2003-11-05 16:53:55 +00:00
David Starks-Browning 1be28abadf Entry "Where is the su command?" -> "Why doesn't su work?" 2003-11-04 22:05:31 +00:00
Corinna Vinschen bcd06214e1 * external.cc (cygwin_internal): Add CW_GET_POSIX_SECURITY_ATTRIBUTE
handling.
	* include/cygwin/version.h: Bump API minor number.
	* include/sys/cygwin.h (cygwin_getinfo_types): Add
	CW_GET_POSIX_SECURITY_ATTRIBUTE.

	* exceptions.cc (init_global_security): Move from here...
	* sec_helper.cc (init_global_security): ...to here.
2003-11-04 15:48:19 +00:00
Christopher Faylor c35391d0d2 * net.cc (dup_ent): Use IsBadStringPtr for alignment checks. Don't use a known
bad pointer.
2003-11-04 13:15:47 +00:00
Corinna Vinschen 02bd05e386 * passwd.c (PrintPW): Turn around meaning printed for "Password not
required" option to be in line with Windows meaning.
	(main): Use more appropriate 1008 option when calling
	NetUserSetInfo to change flag values.
2003-11-04 10:54:47 +00:00
Corinna Vinschen 1f4e5e1571 * passwd.c (UF_LOCKOUT): Remove (defined in lmaccess.h).
(version): Bump version number to 1.5.
	(longopts): Add -c, -C, -e, -E, -p, -P options.
	(opts): Ditto.
	(PrintPW): Print values of UF_PASSWD_CANT_CHANGE and
	UF_DONT_EXPIRE_PASSWD flags. Slightly reformat output. Don't suppress
	correct system password settings just because the account has admin
	privileges.
	(usage): Define as "noreturn" function. Restructure and rephrase
	output. Accomodate new options.
	(print_version): Fix copyright dates.
	(main): Accomodate new options for setting UF_PASSWD_CANT_CHANGE,
	UF_DONT_EXPIRE_PASSWD and UF_PASSWD_NOTREQD settings.
2003-11-04 10:30:35 +00:00
Corinna Vinschen dff017b292 * net.cc (dup_ent): Move Win 95 misalignment recogition before
trying to evaluate string length.
2003-11-03 21:43:32 +00:00
Thomas Pfaff f796413184 * thread.cc (pthread::thread_init_wrapper): Initialize exception handling. 2003-10-31 20:47:14 +00:00
Thomas Pfaff c6e0f665bc Rename pthread::running to pthread::valid throughout.
* thread.h: (pthread::suspend_all_except_self): New static method.
(pthread::resume_all): Ditto.
(pthread::suspend_except_self): New method.
(pthread::resume): Ditto.
* thread.cc (pthread::suspend_except_self): Implement.
(pthread::resume): Ditto.
2003-10-31 20:42:56 +00:00
Corinna Vinschen d3f6bd13cb * include/stdint.h: Prevent signed->unsigned conversion for 32 and
64 bit min value constants.
2003-10-29 08:43:10 +00:00
Christopher Faylor 7825ed016f * path.cc (dot_special_chars): New global variable.
(special_name): Make files ending in "." special.
(fnunmunge): Allow encoded ".".
(mount_item::fnmunge): Handle trailing ".".
2003-10-29 01:15:12 +00:00
Christopher Faylor a4666b3d1b * include/stdint.h: Duplicate below effort for rest of *64_*. 2003-10-28 16:03:52 +00:00
Christopher Faylor 61c4ca410f * include/stdint.h: Correctly define INT64_MAX. 2003-10-28 15:13:06 +00:00
Danny Smith b19cda7bab * include/math.h: Guard ISO C99 additions with __cplusplus
not __GLIBCPP__.
2003-10-27 23:51:37 +00:00
Thomas Pfaff 7cba834bf2 * thread.h (fast_mutex::init): Initialize lock_counter. 2003-10-27 21:12:42 +00:00
Corinna Vinschen 56a4ceac3d * Makefile.in (OBSOLETE_FUNCTION): Add tmpfile.
(NEW_FUNCTIONS): Add _tmpfile64 -> tmpfile translation.
	* cygwin.din: Export _tmpfile64
	* include/cygwin/version.h: Bump api minor number.
2003-10-27 13:06:56 +00:00
Corinna Vinschen 072339664d * cygwin.din: Add sem_close, sem_getvalue, sem_open and sem_timedwait.
* pthread.cc (+mangle_sem_name): New function.
	(sem_open): Ditto.
	(sem_close: Ditto.
	(sem_timedwait): Ditto.
	(sem_getvalue): Ditto.
	* thread.cc (semaphore::semaphore): Rearrange member initialization.
	Use appropriate security attribute for process shared semaphores.
	(semaphore::semaphore): New constructor for named semaphores.
	(semaphore::~semaphore): Care for semaphore name.
	(semaphore::_post): Accomodate failing ReleaseSemaphore. Use value
	returned by ReleaseSemaphore vor currentvalue.
	(semaphore::_getvalue): New method.
	(semaphore::_timedwait): Ditto.
	(semaphore::_fixup_after_fork): Rearrange. Don't fail for process
	shared semaphores.
	(semaphore::open): New method.
	(semaphore::timedwait): Ditto.
	(semaphore::post): Fix return value.  Set errno appropriately.
	(semaphore::getvalue): New method.
	* thread.h (class semaphore): Add prototypes for open, getvalue,
	timedwait, _getvalue, _timedwait.  Add prototypes for new constructor.
	Add name member.
	* include/semaphore.h: Add prototypes for sem_open, sem_close,
	sem_timedwait and sem_getvalue.
	include/cygwin/version.h: Bump API minor number.
2003-10-27 11:48:29 +00:00
Corinna Vinschen d845665e0f * miscfunc.cc (__check_invalid_read_ptr): New function.
* winsup.h: Declare.
2003-10-27 08:28:37 +00:00
Corinna Vinschen db30fe125f * security.h (cygpsid::debug_print): Avoid compiler warnings. 2003-10-26 10:58:11 +00:00
Christopher Faylor 13d5cc4020 Remove file that was supposed to have disappeared a month ago. 2003-10-26 01:09:06 +00:00
Corinna Vinschen 504678827a * path.cc (normalize_posix_path): Test runs of more than two
dots for being a run of only dots.  Let it pass if not.
2003-10-25 16:12:45 +00:00
Corinna Vinschen 89256ff149 * fhandler.cc (fhandler_base::ioctl): Handle FIONBIO. 2003-10-25 12:32:56 +00:00
Thomas Pfaff 28194e813e Rename native_mutex to fast_mutex throughout.
Rename pthread_key::save_key_to_buffer to
pthread_key::_fixup_before_fork throughout.
Rename pthread_key::recreate_key_from_buffer to
pthread_key::_fixup_after_fork throughout.

* thread.cc (native_mutex::init): Remove.
(native_mutex::lock): Ditto.
(native_mutex::unlock): Ditto.
(pthread::push_cleanup_handler): InterlockedExchangePointer
is not needed here.
(pthread_rwlock::pthread_rwlock): Initialize readers list mutex.
(pthread_rwlock::add_reader): Add reader via List_insert.
(pthread_rwlock::lookup_reader): Lock list while walking through.
(pthread_cond::init): Locking the init mutex is now void.
(pthread_rwlock::init): Ditto.
(pthread_mutex::init): Ditto.
* thread.h: Include security.h.
(fast_mutex): New class. Replacement for native_mutex.
(List_insert): New template function.
(List_remove): Ditto.
(List::List): Initialize synchronising mutex.
(List::fixup_after_fork): New method.
(List::insert): Add node via List_insert.
(List::remove): Remove node via List_remove.
(List::pop): Remove.
(List::for_each): Lock list while walking through.
(List::mx_init): New method.
(pthread_mutex::fixup_after_fork): Fixup mutex list after fork.
(pthread::fixup_after_fork): Ditto.
(pthread_conds::fixup_after_fork): Ditto.
(pthread_rwlock::fixup_after_fork): Ditto.
(semaphore::fixup_after_fork): Ditto.
(pthread_rwlock::readers_mx): New member.
2003-10-24 19:34:47 +00:00
Corinna Vinschen 2b7dcf79ae * fhandler.cc (fhandler_base::fcntl): Don't clobber O_APPEND when
both O_NONBLOCK/O_NDELAY are set for F_SETFL.
2003-10-24 12:11:20 +00:00
Corinna Vinschen 0b4274f58b * path.cc (win32_device_name): Fix comment. 2003-10-24 08:13:15 +00:00
Christopher Faylor e64a50ed4e * fhandler_tty.cc (fhandler_tty_slave::ioctl): Properly set return value in
FIONBIO case.
2003-10-24 01:13:22 +00:00
Corinna Vinschen f49c14a197 * fhandler_proc.cc (format_proc_partitions): Use new device code
to get major and minor device numbers.  Fix size evaluation.
2003-10-23 08:54:00 +00:00
Corinna Vinschen 5ec9ea21a3 * external.cc (cygwin_internal): Add CW_GET_ERRNO_FROM_WINERROR
handling.
	* include/cygwin/version.h: Bump API minor number.
	* include/sys/cygwin.h (cygwin_getinfo_types): Add
	CW_GET_ERRNO_FROM_WINERROR.
2003-10-22 20:32:20 +00:00
Corinna Vinschen e217832c4c * Makefile.in: Add $(LIBSERVER) rule.
* cygserver.h: Moved from include/cygwin to here.
	* cygserver_ipc.h: Moved from ../cygserver to here.
	* cygserver_shm.h: Ditto.
	* cygwin.din: Add shmat, shmctl, shmdt and shmget.
	* fhandler_tty.cc (fhandler_tty_slave::open): Don't warn about handle
	dup'ing if not build with USE_SERVER.
	* shm.cc: Include cygerrno.h unconditionally.
	(shmat): Set errno to ENOSYS and return -1 if not build with
	USE_SERVER.
	(shmctl): Ditto.
	(shmdt): Ditto.
	(shmget): Ditto.
	* woutsup.h: Remove.
	* include/cygwin/cygserver_process.h: Moved to ../cygserver directory.
	* include/cygwin/cygserver_transport.h: Ditto.
	* include/cygwin/cygserver_transport_pipes.h: Ditto.
	* include/cygwin/cygserver_transport_sockets.h: Ditto.
	* include/cygwin/version.h: Bump API minor number.
2003-10-22 10:07:59 +00:00
Corinna Vinschen 567970786e Accomodate moving cygserver header files from cygwin/include/cygwin
to here and cygwin dir.
	* Makefile.in (EXEEXT): Drop as unused.
	(EXEEXT_FOR_BUILD): Ditto.
	(all): Don't build libcygserver.a.
	* cygserver_process.h: Moved from cygwin/include/cygwin to here.
	* cygserver_transport.h: Ditto.
	* cygserver_transport_pipes.h: Ditto.
	* cygserver_transport_sockets.h: Ditto.
	* ipc.h: Moved to ../cygwin and renamed to cygserver_ipc.h.
	* shm.h: Moved to ../cygwin and renamed to cygserver_shm.h.
2003-10-22 10:04:11 +00:00
Danny Smith 79be64037c * include/_mingw.h: Define __attribute__((x)) to nothing
if not __GNUC__.
2003-10-21 09:50:47 +00:00
Danny Smith 3c7a7a5fca Add ISO C99 complex support for doubles.
* include/complex.h: New file.
	* mingwex/complex: New directory.
	* mingwex/complex/cabs.c: New file.
	* mingwex/complex/cacos.c: New file.
	* mingwex/complex/cacosh.c: New file.
	* mingwex/complex/casin.c: New file.
	* mingwex/complex/casinh.c: New file.
	* mingwex/complex/catan.c: New file.
	* mingwex/complex/catanh.c: New file.
	* mingwex/complex/ccos.c: New file.
	* mingwex/complex/ccosh.c: New file.
	* mingwex/complex/cexp.c: New file.
	* mingwex/complex/cimag.c: New file.
	* mingwex/complex/clog.c: New file.
	* mingwex/complex/cpow.c: New file.
	* mingwex/complex/cproj.c: New file.
	* mingwex/complex/creal.c: New file.
	* mingwex/complex/csin.c: New file.
	* mingwex/complex/csinh.c: New file.
	* mingwex/complex/csqrt.c: New file.
	* mingwex/complex/ctan.c: New file.
	* mingwex/complex/ctanh.c: New file.
	* mingwex/Makefile.in (COMPLEX_DISTFILES): New list of
	files.
	(dist): Use it.
	(COMPLEX_OBJS): New list of objects.
	(LIB_OBJS): Include it in the library.
2003-10-21 09:43:22 +00:00
Danny Smith 6de52354eb * include/math.h (cabs): Remove non-ISO prototype. 2003-10-21 09:14:45 +00:00
Danny Smith 359e09e7fd * mingwex/math/cephes_mconf.h (NAN, NANF, NANL):
Use GCC __builtin's if available.
	(INFINITY, INFINITYF, INFINITYL): Likewise.
2003-10-21 09:10:51 +00:00
Danny Smith 672126d4f1 * mingwex/math/s_erf.c (erf): Set errno to ERANGE if
beyond approximation limit.
	* mingwex/math/sf_erf.c (erff): Likewise.
2003-10-21 09:05:24 +00:00
Danny Smith f25e45973d * include/stdio.h (_filbuf): Add prototype.
(_flsbuf): Add prototype.
	(getc): Add inline version.
	(putc): Likewise.
	(getchar): Likewise.
	(putchar): Likewise.
2003-10-17 21:43:31 +00:00
Christopher Faylor ce17145aa8 revert accidental checkin 2003-10-17 17:20:06 +00:00
Christopher Faylor fa10472e4a * cygcheck.cc (pretty_id): Don't exec if `id' program is not found. 2003-10-17 17:19:31 +00:00
Dimitri Papadopoulos 5320b93f4e Oooops... 2003-10-17 10:37:44 +00:00
Pierre Humblet 30f515c54f *** empty log message *** 2003-10-16 23:28:31 +00:00
Pierre Humblet 9808b5c420 2003-10-16 Pierre Humblet <pierre.humblet@ieee.org>
* syscalls.cc (seteuid32): Always construct a default DACL including
	the new sid, Admins and SYSTEM and copy it to the new thread token.
	* security.cc (create_token): Use a NULL default DACL in NtCreateToken.
2003-10-16 23:20:41 +00:00
Corinna Vinschen abfc9c412c * dcrt0.cc: Remove local variable alternate_charset_active.
* fhandler.h: Add variable alternate_charset_active, functions
	str_to_con, con_to_str to dev_console structure.
	* fhandler_console.cc (con_to_str): Move function into dev_console
	class.
	(str_to_con): Ditto.
	(fhandler_console::read): Call con_to_str on dev_state.
	(fhandler_console::write_normal): Call str_to_con on dev_state.
	(fhandler_console::char_command): Change active_charset_active
	assignment to be on dev_state.
	* winsup.h: Remove global external variable alternate_charset_active.
2003-10-16 14:08:28 +00:00
Corinna Vinschen ce34c904cc * fhandler_console.cc (char_command): Add escape sequence for codepage
ansi <-> oem switching for ncurses frame drawing capabilities.
	* dcrt0.cc: Add local variable alternate_charset_active.
	* winsup.h: Add global external variable alternate_charset_active.
2003-10-15 08:23:26 +00:00
Corinna Vinschen db3137ccb5 * exceptions.cc (ctrl_c_handler): Don't send SIGHUP on
CTRL_LOGOFF_EVENT to processes running in invisible Windows Stations.
	* window.cc (has_visible_window_station): New function.
	* winsup.h: Add declaration for has_visible_window_station.
2003-10-14 09:21:55 +00:00
Dimitri Papadopoulos 36ef425c19 * include/windows.h (CopyCursor): Although MSDN pretends this is
a function to be imported from user32.lib, it's actually a macro.
	From the Delphi FAQ:
		Question:
		Where is the Windows API function CopyCursor defined in
		32-Bit versions of Delphi and C++ Builder?
		Answer:
		While the call is documented in the Win32 help file, the
		function is simply mapped to the Windows API function
		CopyIcon(). Note that the 32 bit version of CopyIcon
		does not take a hInstance parameter.
2003-10-13 06:02:06 +00:00
Danny Smith 29598fc7e0 2003-10-13 Steven Edwards <Steven_Ed4153@yahoo.com>
* include/winnt.h (CONTAINING_RECORD): Add macro.
2003-10-13 05:22:30 +00:00
Danny Smith 851217a605 * include/winnt.h: (FILE_SUPERSEDED, FILE_OPENED, FILE_CREATED,
FILE_OVERWRITTEN, FILE_EXISTS, FILE_DOES_NOT_EXIST): remove
	defines.
2003-10-13 03:25:26 +00:00
Danny Smith 64c0532eb5 2003-10-13 Filip Navara <xnavara@volny.cz>
* include/commctrl.h: (DSA_*):Add prototypes, typedefs and
	defines for Dynamic Storage Arrays.
	(DPA_*): Likewise, for Dynamic Pointer Arrays.
	(FlatSB_*, InitializeFlatSB, InitializeFlatSB): Add prototypes
	and defines for Flat ScrollBars.
	(SetWindowSubclass, GetWindowSubclass, RemoveWindowSubclass,
	DefSubclassProc): Add prototypes for subclassing.
	(DrawShadowText) Add prototype.
`	(COMCTL32_VERSION): Define.
2003-10-13 02:46:36 +00:00
Danny Smith fad2aa1aad 2003-10-13 Martin Fuchs <Martin-Fuchs@gmx.net>
* include/shlobj.h (CFSTR_FILENAME, CFSTR_FILEDESCRIPTOR,
	CFSTR_FILENAMEMAP, CFSTR_SHELLURL): Correct UNICODE definitions.
2003-10-13 00:22:38 +00:00
Danny Smith 0c7a57ebc0 2003-10-13 Pierre Humblet <pierre.humblet@ieee.org>
* include/winnt.h (SM_REMOTESESSION): Add define.
	* include/winuser.h (SE_CREATE_GLOBAL_NAME): Ditto.
2003-10-12 23:38:57 +00:00
Danny Smith b3355c6592 * include/wincrypt (KP_IV, KP_SALT, KP_PADDING, KP_MODE,
KP_MODE_BITS, KP_PERMISSIONS, KP_ALGID, KP_BLOCKLEN): Remove
	duplicate definitions.
	(KP_X, KP_Y): Correct typos.
2003-10-12 23:34:13 +00:00
Manu B 986ee16a0c Dummy afxres header, richedit constants added 2003-10-11 08:00:38 +00:00
Christopher Faylor 7cf29f96e0 * fhandler_tty.cc (fhandler_tty_slave::open): Don't create a new window station
if one already exists.
2003-10-10 19:11:21 +00:00
Christopher Faylor 4a204f6625 * shared.cc (shared_info::initialize): Remove myself check since hMainProc
initialization will allow user initialization to work.
2003-10-10 19:07:08 +00:00
Earnie Boyd f3d0380417 * include/_mingw.h: Increment version to 3.2.
* Makefile.in: Ditto.
2003-10-10 18:25:10 +00:00
Christopher Faylor cca873af60 fix typo 2003-10-10 17:44:54 +00:00
Earnie Boyd 79b931ee81 * include/sys/types.h: Revert last change. 2003-10-10 15:09:55 +00:00
Earnie Boyd 92fda2d938 * include/sys/types.h (ssize_t): Correct the definition. 2003-10-10 11:49:36 +00:00
Corinna Vinschen a8e5f8c6c2 * include/sys/mman.h (MAP_FAILED): Define as void *. 2003-10-09 11:40:16 +00:00
Dimitri Papadopoulos 6ddad5e1dd * include/errorep.h: New file.
* lib/faultrep.def: New file.
2003-10-09 05:52:12 +00:00
Dimitri Papadopoulos 38f9123efd * include/winbase.h (AddVectoredExceptionHandler): Define if
_WIN32_WINNT >= 0x0500.

	* include/winnt.h (PVECTORED_EXCEPTION_HANDLER): Define if
	_WIN32_WINNT >= 0x0500.
2003-10-09 05:28:25 +00:00
Christopher Faylor ea4980efe1 * dcrt0.cc (hMainProc): Initialize to useful value for use when dll is
dynamically loaded.
(shared_info::initialize): Don't initialize user stuff if myself doesn't exit.
2003-10-08 21:40:33 +00:00
Corinna Vinschen 5df75951a5 * include/winbase.h (AddVectoredExceptionHandler): Only define if
_WIN32_WINNT >= 0x0501.
2003-10-08 15:58:58 +00:00
Corinna Vinschen 99439385c6 * syscalls.cc (unlink): Don't even try DELETE_ON_CLOSE technique on
systems not supporting it.
2003-10-08 09:17:08 +00:00
Dimitri Papadopoulos 56efe3a884 * include/winbase.h [_WIN32_WINNT >= 0x0500] (SetComputerNameEx[AW],
UnregisterWaitEx): Add functions.

	* include/winbase.h [_WIN32_WINNT >= 0x0500]
	(AddVectoredExceptionHandler, RemoveVectoredExceptionHandler): Add
	or guard function. The MSDN says it is available on Windows XP and
	better, and then it says it is declared for _WIN32_WINNT >= 0x0500.
	Huh?

	* include/winbase.h [_WIN32_WINNT >= 0x0501] (AddRefActCtx,
	CreateActCtx[AW], SetFileShortName[AW], SetFileValidData,
	ZombifyActCtx, QueryActCtxW): Add functions.

	* include/winbase.h [_WIN32_WINNT >= 0x0501]
	(QUERY_ACTCTX_FLAG_USE_ACTIVE_ACTCTX,
	QUERY_ACTCTX_FLAG_ACTCTX_IS_HMODULE,
	QUERY_ACTCTX_FLAG_ACTCTX_IS_ADDRESS): Add constants.

	* include/winbase.h [_WIN32_WINNT >= 0x0502] (SetDllDirectory[AW],
	SetFirmwareEnvironmentVariable[AW]): Add functions.

	* include/winnt.h [_WIN32_WINNT >= 0x0500] (VER_BUILDNUMBER,
	VER_MAJORVERSION, VER_MINORVERSION, VER_PLATFORMID,
	VER_SERVICEPACKMAJOR, VER_SERVICEPACKMINOR, VER_SUITENAME,
	VER_PRODUCT_TYPE, VER_EQUAL, VER_GREATER, VER_GREATER_EQUAL,
	VER_LESS, VER_LESS_EQUAL, VER_AND, VER_OR): Add constants.

	* include/winnt.h [_WIN32_WINNT >= 0x0501]
	(PVECTORED_EXCEPTION_HANDLER): Add callback.

	* include/winnt.h [_WIN32_WINNT >= 0x0501]
	(ACTIVATION_CONTEXT_INFO_CLASS,
	ACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION,
	ACTIVATION_CONTEXT_DETAILED_INFORMATION,
	ACTIVATION_CONTEXT_QUERY_INDEX, ASSEMBLY_FILE_DETAILED_INFORMATION):
	Add structures.

	* lib/user32.def (AddRefActCtx, AddVectoredExceptionHandler,
	CreateActCtx[AW], SetComputerNameEx[AW], SetDllDirectory[AW],
	SetFileShortName[AW], SetFileValidData,
	SetFirmwareEnvironmentVariable[AW], UnregisterWaitEx,
	VerSetConditionMask, ZombifyActCtx, QueryActCtxW): Add functions.
2003-10-07 12:55:00 +00:00
Dimitri Papadopoulos 2df2984b40 * include/winbase.h (GetWriteWatch, IsSystemResumeAutomatic,
ResetWriteWatch): Add function.

	* include/winbase.h [_WIN32_WINNT >= 0x0500]
	(GetSystemWindowsDirectory[AW], ProcessIdToSessionId, ReplaceFile[AW]):
	Add functions.

	* include/winbase.h [_WIN32_WINNT >= 0x0501]
	(GetSystemWow64Directory[AW], HeapQueryInformation,
	HeapSetInformation, InitializeSListHead, InterlockedFlushSList,
	InterlockedPopEntrySList, InterlockedPushEntrySList, IsProcessInJob,
	IsWow64Process, QueryMemoryResourceNotification, ReleaseActCtx,
	RemoveVectoredExceptionHandler): Add functions.

	* include/winnt.h [_WIN32_WINNT >= 0x0501] (HEAP_INFORMATION_CLASS):
	Add enumeration.

	* include/winbase.h [_WIN32_WINNT >= 0x0502] (GetThreadIOPendingFlag):
	Add function.

	* include/winbase.h [_WIN32_WINNT >= 0x0510] (RestoreLastError):
	Add function. The MSDN Magazine of June 2003 reads:
		RestoreLastError is an enigma. It's code is identical to
		SetLastError. It's unclear to me why it was made into a
		separate API.

	* lib/user32.def (GetSystemWindowsDirectory[AW],
	GetSystemWow64Directory[AW], GetThreadIOPendingFlag,
	HeapQueryInformation, HeapSetInformation, InitializeSListHead,
	InterlockedFlushSList, InterlockedPopEntrySList,
	InterlockedPushEntrySList, IsSystemResumeAutomatic, IsWow64Process,
	ProcessIdToSessionId, QueryMemoryResourceNotification, ReleaseActCtx,
	RemoveVectoredExceptionHandler, ReplaceFile[AW], ResetWriteWatch,
	RestoreLastError): Add functions.
2003-10-07 10:14:31 +00:00
Dimitri Papadopoulos f9a322ebf7 * include/winbase.h [_WIN32_WINNT >= 0x0500] (GetComputerNameEx[AW],
GetProcessIoCounters): Add functions.

	* include/winbase.h [_WIN32_WINNT >= 0x0500] (COMPUTER_NAME_FORMAT):
	Move around, needed by GetComputerNameEx.

	* include/winbase.h [_WIN32_WINNT >= 0x0501] (FindActCtxSectionGuid,
	FindActCtxSectionString[AW], GetCurrentActCtx, GetNativeSystemInfo):
	Add functions.

	* include/winbase.h [_WIN32_WINNT >= 0x0501]
	(ACTCTX_SECTION_KEYED_DATA): Add structure.

	* include/winbase.h [_WIN32_WINNT >= 0x0502] (GetDllDirectory[AW],
	GetFirmwareEnvironmentVariable[AW], GetProcessHandleCount,
	GetProcessId, GetSystemRegistryQuota): Add functions, available on
	Windows XP SP1 and better.

	* include/winnt.h [_WIN32_WINNT >= 0x0501]
	(ACTIVATION_CONTEXT_SECTION_ASSEMBLY_INFORMATION,
	ACTIVATION_CONTEXT_SECTION_DLL_REDIRECTION,
	ACTIVATION_CONTEXT_SECTION_WINDOW_CLASS_REDIRECTION,
	ACTIVATION_CONTEXT_SECTION_COM_SERVER_REDIRECTION,
	ACTIVATION_CONTEXT_SECTION_COM_INTERFACE_REDIRECTION,
	ACTIVATION_CONTEXT_SECTION_COM_TYPE_LIBRARY_REDIRECTION,
	ACTIVATION_CONTEXT_SECTION_COM_PROGID_REDIRECTION,
	ACTIVATION_CONTEXT_SECTION_CLR_SURROGATES): Add constants.

	* lib/user32.def (FindActCtxSectionGuid, FindActCtxSectionString[AW],
	GetComputerNameEx[AW], GetCurrentActCtx, GetDllDirectory[AW],
	GetFirmwareEnvironmentVariable[AW], GetModuleHandleEx[AW],
	GetNativeSystemInfo, GetProcessHandleCount, GetProcessIoCounters):
	Add functions.
2003-10-07 08:47:06 +00:00
Dimitri Papadopoulos d0ede583ee * include/winbase.h [_WIN32_WINNT >= 0x0501]
(CheckRemoteDebuggerPresent, DebugActiveProcessStop, DebugBreakProcess,
	DebugSetProcessKillOnExit): Add functions.

	* include/winbase.h [_WIN32_WINNT >= 0x0500] (DeleteTimerQueue,
	DeleteTimerQueueEx, DeleteTimerQueueTimer,
	DnsHostnameToComputerName[AW]): Add functions.

	* lib/user32.def (CheckRemoteDebuggerPresent, DebugActiveProcessStop,
	DebugBreakProcess, DebugSetProcessKillOnExit, DeleteTimerQueueEx,
	DeleteTimerQueueTimer, DnsHostnameToComputerName[AW]): Add functions.
2003-10-07 07:14:53 +00:00
Dimitri Papadopoulos b2608a4378 * include/winbase.h (GetVolumePathNamesForVolumeName): Available
on Windows XP and later.
2003-10-07 05:54:53 +00:00
Dimitri Papadopoulos 85c50f7194 * include/commctrl.h (TreeView_Select): Returns BOOL. 2003-10-07 05:41:46 +00:00
Dimitri Papadopoulos d645cc8736 * include/winbase.h (CancelDeviceWakeupRequest): Add function.
* include/winbase.h [_WIN32_WINNT >= 0x0501]
	(CreateMemoryResourceNotification, DeactivateActCtx): Add functions.

	* include/winbase.h [_WIN32_WINNT >= 0x0500] (CreateTimerQueue,
	CreateTimerQueueTimer): Add function.

	* include/winbase.h [_WIN32_WINNT >= 0x0501]
	(MEMORY_RESOURCE_NOTIFICATION_TYPE): Add enumeration.

	* include/winbase.h [_WIN32_WINNT >= 0x0501]
	(DEACTIVATE_ACTCTX_FLAG_FORCE_EARLY_DEACTIVATION): Add constant.

	* include/winnt.h (WT_*): Add constants.

	* lib/user32.def (CancelDeviceWakeupRequest,
	CreateMemoryResourceNotification, CreateTimerQueueTimer,
	DeactivateActCtx): Add functions.
2003-10-06 12:33:32 +00:00
Dimitri Papadopoulos 16640527a7 * include/winbase.h [_WIN32_WINNT >= 0x0400] (ConvertFiberToThread):
Add function. Sometimes I don't understand MSDN. This function is
	available on Windows XP and Server 2003, but the SDK is supposed to
	make it available when _WIN32_WINNT >= 0x0400, or so says the MSDN.
	Mmmh...

	* include/winbase.h [_WIN32_WINNT >= 0x0400] (CreateFiberEx):
	Guard function. Same remark as above.

	* lib/user32.def (ConvertFiberToThread, CreateFiberEx):
	Add functions.
2003-10-06 10:00:31 +00:00
Dimitri Papadopoulos a61556238e * include/winbase.h [_WIN32_WINNT >= 0x0501] (ACTCTX_FLAG_*):
Add constants.

	* include/winbase.h [_WIN32_WINNT >= 0x0501] (ACTCTX[AW]): Add
	structures.

	* include/winbase.h [_WIN32_WINNT >= 0x0501] (ActivateActCtx): Add
	function. MSDN says the first argument is HACTCTX but I'm not sure
	where such a specialized handle is defined, so use HANDLE instead.

	* include/winbase.h [_WIN32_WINNT >= 0x0501] (AttachConsole,
	CheckNameLegalDOS8Dot3[AW]): Add functions.

	* lib/user32.def (ActivateActCtx, AttachConsole,
	CheckNameLegalDOS8Dot3[AW]): Add functions.

	* lib/user32.def (AddLocalAlternateComputerName[AW]): Add functions.
	Unfortunately I don't know which header to put the declarations in.
2003-10-06 09:45:59 +00:00
Dimitri Papadopoulos 928bc4d571 * include/winnls.h (CTRY_KYRGYZSTAN, CTRY_MALDIVES, CTRY_MONGOLIA):
Add constants.

	* include/winnls.h (NLS_FUNCTION, SYSGEOCLASS, SYSGEOTYPE): Add
	constants for National Language Support.

	* include/winnls.h (NLSVERSIONINFO): Add structure for National
	Language Support.

	* include/winnls.h (GEO_ENUMPROC): Add callback for National
	Language Support.

	* include/winnls.h (EnumSystemGeoID, GetCalendarInfo[AW],
	GetGeoInfo[AW], GetUserGeoID, SetCalendarInfo[AW], SetUserGeoID):
	Add functions.

	* include/winnls.h (IsNLSDefinedString, GetNLSVersion): Add
	functions. Strange... I am unable to find which library contains
	these functions. Can't find anything with pexports. Any clue?

	* lib/user32.def (EnumSystemGeoID, GetGeoInfo[AW], GetUserGeoID,
	SetUserGeoID): Add functions.
2003-10-06 09:02:04 +00:00
Dimitri Papadopoulos 971a485f99 * include/winnt.h (LANG_KYRGYZ, LANG_MONGOLIAN, LANG_GALICIAN,
LANG_SYRIAC, LANG_INVARIANT, SUBLANG_KASHMIRI_SASIA): Add constants.

	* include/winnt.h (SUBLANG_AZERI_LATIN, SUBLANG_AZERI_CYRILLIC,
	SUBLANG_ENGLISH_ZIMBABWE, SUBLANG_ENGLISH_PHILIPPINES): Fix wrong
	value for constants.
2003-10-06 06:47:41 +00:00
Dimitri Papadopoulos 083817a45b * include/wincrypt.h (KP_SCHANNEL_ALG): Add constant. Specifying
the algorithms.
2003-10-03 12:14:13 +00:00
Dimitri Papadopoulos f9cb5fcec4 * include/wincrypt.h (SCHANNEL_MAC_KEY, SCHANNEL_ENC_KEY,
INTERNATIONAL_USAGE): Add constants. Specifying the Algorithms
2003-10-03 12:11:04 +00:00
Dimitri Papadopoulos 37b6c4adc5 * include/wincrypt.h (CRYPT_FLAGS_*): Add constants. Protocol flags. 2003-10-03 12:06:05 +00:00
Dimitri Papadopoulos 8e14117566 * include/wincrypt.h (KP_*): Add constants. Needed by
CryptSetKeyParam() and other functions.
2003-10-03 12:04:02 +00:00
Dimitri Papadopoulos b9c5ea438c * include/winuser.h [_WIN32_WINNT >= 0x0501] (EVENT_*, CONSOLE_*):
Add constants, related to Console Accessibility.
2003-10-03 11:38:07 +00:00
Dimitri Papadopoulos 4fd4d446d6 * include/winuser.h [WINVER >= 0x0500] (EVENT_MAX): Ooops...
wrong value for constant.
2003-10-03 10:29:16 +00:00
Dimitri Papadopoulos ba4ad171e6 * include/winuser.h [WINVER >= 0x0500] (EVENT_*): Add constants.
* include/uxtheme.h: Cleanup.
	* include/tmschema.h: Cleanup.
2003-10-03 10:27:27 +00:00
Danny Smith e1ce6d5f2a * include/stdio.h (_filbuf): Add prototype.
(_flsbuf): Add prototype.
	(getc): Add inline version.
	(putc): Likewise.
	(getchar): Likewise.
	(putchar): Likewise.
2003-10-03 10:16:53 +00:00
Danny Smith c536f54ada * mingwex/dirent.c (_treaddir): Reset errno to 0 if end
of directory.
2003-10-02 21:29:51 +00:00
Christopher Faylor 8923806299 * dcrt0.cc (dll_crt0_1): Call newlib __sinit routine to ensure that stdio
buffers are initialized to avoid thread initialization races.
2003-10-02 04:46:59 +00:00
Christopher Faylor 6cb54a4cee * path.cc (win32_device_name): Only fill out destination buffer when it's
really a device.
2003-10-02 03:50:10 +00:00
Luke Dunstan db0d31d13e 2003-10-02 Luke Dunstan <infidel@users.sourceforge.net>
* include/winspool.h (GetDefaultPrinter[AW]): Add functions.
	* lib/winspool.def (GetDefaultPrinter[AW]): Add stubs.
2003-10-02 02:39:43 +00:00
Danny Smith 334117a940 * include/winnt.h (INVALID_FILE_ATTRIBUTES): Fix define. 2003-10-01 21:40:43 +00:00
Christopher Faylor 0e1ba88882 * Makefile.in: Add YA method for generating devices.cc.
* child_info.h: YA update of another magic number.
* gendevices: New file.
* devices.in: New file.
* devices.cc: Regenerate.
* devices.shilka: Remove.
* devices.h: Correctly define device pointers.
(device): Remove now obsolete fields.
(device::native): Renamed from device::fmt.
* dtable.cc (build_fh_dev): Simplify in light of new unit parsing scheme.
(build_fh_pc): Ditto.
* path.cc (win32_device_name): Ditto.
* fhandler.h (fhandler_base::get_native_name): Reflect renaming of fmt to
native.
* fhandler_tty.cc (fhandler_tty_mster::init): Initialize slave device prior to
reporting unit.
2003-10-01 12:36:39 +00:00
Corinna Vinschen 883c5345d4 * fhandler.cc (fhandler_base::fstat): Drop FH_FLOPPY case. 2003-09-30 21:46:08 +00:00
Corinna Vinschen a4b25e31ca * fhandler.h (class fhandler_dev_raw): Add method fstat.
* fhandler_raw.cc (fhandler_dev_raw::fstat): New method.

	Add missing ChangeLog for previous patch.
2003-09-30 21:43:40 +00:00
Corinna Vinschen 7f7eda0780 * devices.h (enum fh_devices): Remove DEV_RAWDRIVE_MAJOR and
FH_RAWDRIVE.
	* devices.shilka (dev_rawdrive_storage): Remove.
	(unit_devices): Remove pointer to dev_rawdrive_storage.
	(uniq_devices): Remove rawdrive entry.
	* dtable.cc (build_fh_pc): Remove DEV_RAWDRIVE_MAJOR case.
	* path.cc (win32_device_name): ditto.
2003-09-30 21:03:57 +00:00
Danny Smith fe5fb62c09 Remove conflict indicator from ChangeLog 2003-09-30 07:53:10 +00:00
Danny Smith 4d36c543ea * include/winuser.h (BSF_*, BSM_*): Sync constants defined in
both winuser.h and dbt.h.
	* include/dbt.h (BSF_*, BSM_*): Likewise.

	* include/winuser.h (struct tagRAWINPUT): Remove
	_ANONYMOUS_UNION tag from named union.
	(struct tagRAWMOUSE): Add _ANONYMOUS_STRUCT to nameless struct.
2003-09-30 07:51:26 +00:00
Dimitri Papadopoulos 684f94e305 * include/dhcpcsvc.h: New file.
Note that MSDN is confused about whether it should start constant
	and structure names with DHCPCAPI or DHCPAPI. It's using both but
	experience suggests it's DHCPCAPI with `C'.

	* lib/dhcpcsvc.def: New file.
2003-09-30 07:40:46 +00:00
Dimitri Papadopoulos e7e4107e39 * include/winuser.h [_WIN32_WINNT >= 0x0501] (RIM_INPUT,
RIM_INPUTSINK): Add constants, for use by WM_INPUT notification.

	* include/winuser.h [_WIN32_WINNT >= 0x0501] (RIDEV_REMOVE,
	RIDEV_EXCLUDE, RIDEV_PAGEONLY, RIDEV_NOLEGACY, RIDEV_INPUTSINK,
	RIDEV_CAPTUREMOUSE, RIDEV_NOHOTKEYS, RIDEV_APPKEYS): Add constants,
	for use in RAWINPUTDEVICE.

	* include/winuser.h [_WIN32_WINNT >= 0x0501]
	(GetRawInputDeviceInfo[AW]): Ooops... there are
	ANSI/Unicode versions of this function.

	* lib/user32.def (GetRawInputDeviceInfo[AW]): Ooops... there
	are ANSI/Unicode versions of this function.
2003-09-30 06:57:46 +00:00
Corinna Vinschen d950ca774f * syslog.cc (vsyslog): Print debug message if ReportEventA fails. 2003-09-29 12:31:22 +00:00
Danny Smith 3c3b1816d8 * include/stdlib.h: Guard non-ISO functions with
!__STRICT_ANSI__, throughout.
2003-09-29 09:16:23 +00:00
Dimitri Papadopoulos 37048d3df7 * include/winuser.h [_WIN32_WINNT >= 0x0501] (RIM_TYPEMOUSE,
RIM_TYPEKEYBOARD, RIM_TYPEHID, MOUSE_MOVE_RELATIVE,
	MOUSE_MOVE_ABSOLUTE, MOUSE_VIRTUAL_DESKTOP,
	MOUSE_ATTRIBUTES_CHANGED, RI_MOUSE_LEFT_BUTTON_DOWN,
	RI_MOUSE_LEFT_BUTTON_UP, RI_MOUSE_RIGHT_BUTTON_DOWN,
	RI_MOUSE_RIGHT_BUTTON_UP, RI_MOUSE_MIDDLE_BUTTON_DOWN,
	RI_MOUSE_MIDDLE_BUTTON_UP, RI_MOUSE_BUTTON_1_DOWNT_BUTTON_DOWN,
	RI_MOUSE_BUTTON_1_UP, RI_MOUSE_BUTTON_2_DOWNHT_BUTTON_DOWN,
	RI_MOUSE_BUTTON_2_UP, RI_MOUSE_BUTTON_3_DOWNDLE_BUTTON_DOWN,
	RI_MOUSE_BUTTON_3_UP, RI_MOUSE_BUTTON_4_DOWN,
	RI_MOUSE_BUTTON_4_UP, RI_MOUSE_BUTTON_5_DOWN,
	RI_MOUSE_BUTTON_5_UP, RI_MOUSE_WHEEL, KEYBOARD_OVERRUN_MAKE_CODE,
	RI_KEY_MAKE, RI_KEY_BREAK, RI_KEY_E0, RI_KEY_E1,
	RI_KEY_TERMSRV_SET_LED, RI_KEY_TERMSRV_SHADOW, RID_INPUT,
	RID_HEADER, RIDI_PREPARSEDDATA, RIDI_DEVICENAME,
	RIDI_DEVICEINFO): Add constants.

	* include/winuser.h [_WIN32_WINNT >= 0x0501] (RAWINPUTHEADER,
	RAWMOUSE, RAWKEYBOARD, RAWHID, RAWINPUT, RAWINPUTDEVICE,
	RAWINPUTDEVICELIST): Add structures.

	* include/winuser.h [_WIN32_WINNT >= 0x0501] (DefRawInputProc,
	GetRawInputBuffer, GetRawInputData, GetRawInputDeviceInfo,
	GetRawInputDeviceList, GetRegisteredRawInputDevices): Add functions.

	* lib/user32.def (DefRawInputProc, GetRawInputBuffer,
	GetRawInputData, GetRawInputDeviceInfo, GetRawInputDeviceList,
	GetRegisteredRawInputDevices): Add functions.
2003-09-29 08:54:50 +00:00
Christopher Faylor e6ba835513 * sigproc.cc (proc_subproc): Restrict permissions on ppid_handle.
* devices.shilka (device::parse): Restore check for tty in unit handling, but
without the previous typo.
* devices.cc: Regenerate.
* devices.h (DEV_CYGDRIVE_MAJOR): Change major number to one used by linux for
"user-mode virtual block device".
2003-09-28 15:46:00 +00:00
Corinna Vinschen 5c770c8431 * devices.h: Move a few device major numbers. Fix typo of FH_UDP.
* device.shilka: Remove /dev/hd device entries, rename all device_hd*
	to device_sd*.
	(device::parse): Disallow units outside lower and upper bounds.
	* dtable.cc (build_fh_pc): Fix typo of FH_UDP.
	* path.cc (win32_device_name): Fix win32 name creation to match new
	device handling.
2003-09-28 09:44:13 +00:00
Christopher Faylor 83abcab4c0 * device.shilka (device::parse): Allow units on other than tty. 2003-09-27 15:19:29 +00:00
Corinna Vinschen 658b4ff8fd * wincap.cc (wincapc::init): Allow requesting server info for NT4 SP6. 2003-09-27 08:14:56 +00:00
Christopher Faylor 341d295422 * path.cc (symlink_info::check): Use new introducer for mknod'ed files.
(parse_device): Ditto.
* syscalls.cc (mknod_worker): Ditto.
2003-09-27 05:44:58 +00:00
Christopher Faylor 4cb3e57917 * devices.shilka: Add /dev/sda disk devices.
* devices.cc: Regenerate.
2003-09-27 05:38:01 +00:00
Christopher Faylor 3c1e8187bd * cygwin-shilka: Remove '#line directives' or suffer debugging oddities. Use
-length option so that device prefixes are used.
* devices.cc: Regenerate.
* syscalls.cc (ttyname): Add debugging output.
2003-09-27 05:35:02 +00:00
Christopher Faylor dfb2ac8088 remove accidental checkin 2003-09-27 03:44:57 +00:00
Christopher Faylor aff9630767 * Makefile.in: Add libusr32.a to DLL_IMPORTS.
* wincap.h (wincaps::is_server): New flag.
(wincapc::version): Change type to OSVERSIONINFOEX.
(wincapc::is_server): New function.
* wincap.cc (wincap_unknown::is_server): New initializer.
(wincap_95): Ditto.
(wincap_95osr2): Ditto.
(wincap_98): Ditto.
(wincap_me): Ditto.
(wincap_nt3): Ditto.
(wincap_nt4): Ditto.
(wincap_nt4sp4): Ditto.
(wincap_2000): Ditto.
(wincap_xp): Ditto.
(wincapc::init): Adapt to OSVERSIONINFOEX.  Add detection of NT server systems.
* sched.cc: Include windows.h and registry.h.
(sched_rr_get_interval): Re-implement for NT systems.
2003-09-27 03:44:31 +00:00
Christopher Faylor a3cbb4a7e0 * fhandler_tty.cc (fhandler_tty_slave::ioctl): Properly set ioctl_request event
when window size changes.  Store failing errno in ioctl_retval (needed?).
2003-09-27 03:14:07 +00:00
Christopher Faylor 63726a5eb4 * fhandler_console.c (fhandler_console::read): Record the state of the SHIFT,
CTRL and ALT keys at the time of the last keyboard input event.
(fhandler_console::ioctl): Handle requests to retrieve the keyboard modifiers
via the TIOCLINUX command.
* fhandler_tty.c (fhandler_tty_slave::read): Ditto.
* include/sys/termios.h (TIOCLINUX): New macro definition.
2003-09-27 02:36:50 +00:00
Pierre Humblet ecc28ff8db 2003-09-26 Pierre Humblet <pierre.humblet@ieee.org>
* pinfo.cc (pinfo::init): Do not give FILE_MAP_WRITE access to Everybody.
	* exceptions.cc (sig_handle_tty_stop): Do not create pinfo parent with
	PID_MAP_WRITE.
	* fhandler_process.cc (fhandler_process::fill_filebuf): Ditto for pinfo p.
	* signal.cc (kill_worker): Ditto for pinfo dest.
2003-09-27 02:30:46 +00:00
Pierre Humblet 1eb451937a 2003-09-26 Pierre Humblet <pierre.humblet@ieee.org>
* pinfo.h (pinfo::set_acl): Declare.
	* pinfo.cc (pinfo_fixup_after_fork): Duplicate with no rights.
	(pinfo::set_acl): New.
	* spawn.cc (spawn_guts): Call myself.set_acl.
2003-09-27 01:58:23 +00:00
Pierre Humblet 6806a8b51f 2003-09-26 Pierre Humblet <pierre.humblet@ieee.org>
* uinfo.cc (cygheap_user::init): Make sure the current user appears
	in the default DACL. Rearrange to decrease the indentation levels.
	Initialize the effec_cygsid directly.
	(internal_getlogin): Do not reinitialize myself->gid. Open the process
	token with the required access.
	* cygheap.h (class cygheap_user): Delete members pid and saved_psid.
	Create members effec_cygsid and saved_cygsid.
	(cygheap_user::set_sid): Define inline.
	(cygheap_user::set_saved_sid): Ditto.
	(cygheap_user::sid): Modify.
	(cygheap_user::saved_sid): Modify.
	* cygheap.cc (cygheap_user::set_sid): Delete.
	(cygheap_user::set_saved_sid): Ditto.
	* sec_helper.cc (sec_acl): Set the correct acl size.
	* autoload.cc (FindFirstFreeAce): Add.
	* security.h: Define ACL_DEFAULT_SIZE.
2003-09-27 01:56:36 +00:00
Dimitri Papadopoulos 349a6402fe * include/winable.h (BlockInput): Add function.
* include/winable.h (WS_ACTIVECAPTION): Add constant.
	For use with WINDOWINFO structure.

	* include/winuser.h [_WIN32_WINNT >= 0x0500] (LockWorkStation):
	Add function.

	* include/winuser.h [_WIN32_WINNT >= 0x0501] (IsWinEventHookInstalled):
	Add function.

	* include/winuser.h [WINVER >= 0x0500] (UnhookWinEvent):
	Add function...

	* include/winable.h [WINVER < 0x0500] (UnhookWinEvent):
	...and duplicate.

	* include/winuser.h [_WIN32_WINNT >= 0x0403] (SendInput):
	Guard function...

	* include/winable.h [_WIN32_WINNT < 0x0403] (SendInput):
	...and duplicate.

	* include/winuser.h [WINVER >= 0x0500] (NotifyWinEvent):
	Guard function...

	* include/winable.h [WINVER < 0x0500] (NotifyWinEvent):
	...and duplicate.

	* include/winuser.h [WINVER >= 0x0500] (MOUSEINPUT, KEYBDINPUT,
	HARDWAREINPUT, INPUT): Guard structures...

	* include/winable.h [WINVER < 0x0500] (MOUSEINPUT, KEYBDINPUT,
	HARDWAREINPUT, INPUT): ...and duplicate.

	* include/winuser.h [_WIN32_WINNT >= 0x0403] (INPUT_MOUSE,
	INPUT_KEYBOARD, INPUT_HARDWARE): Guard constants...

	* include/winable.h [_WIN32_WINNT < 0x0403] (INPUT_MOUSE,
	INPUT_KEYBOARD, INPUT_HARDWARE): ...and duplicate.

	* include/winuser.h: Move around some lines. Reformat according
	to recommended or dominant style. Remove FAR keyword.

	* include/winable.h: Move around some lines.

	* lib/user32.def (BlockInput, IsWinEventHookInstalled,
	LockWorkStation, UnhookWinEvent): Add functions.
2003-09-26 14:46:33 +00:00
Dimitri Papadopoulos b6c1b88ad4 * include/winuser.h [_WIN32_WINNT >= 0x0501] (PrintWindow,
PW_CLIENTONLY): Add function and constant.

	* lib/user32.def (PrintWindow): Add function.
2003-09-26 10:41:23 +00:00
Dimitri Papadopoulos 46ffaf5071 * include/winuser.h (RealGetWindowClassA[AW]): Add function.
* lib/user32.def (RealGetWindowClassA[AW]): Add function.
2003-09-26 10:31:43 +00:00
Dimitri Papadopoulos 2bbffa5b85 * include/winuser.h [WINVER >= 0x0500] (RegisterDeviceNotification[AW],
DEVICE_NOTIFY_WINDOW_HANDLE, DEVICE_NOTIFY_SERVICE_HANDLE,
	DEVICE_NOTIFY_ALL_INTERFACE_CLASSES): Add function and constants.

	* lib/user32.def (RegisterDeviceNotification[AW]): Add function.
2003-09-26 10:20:46 +00:00
Dimitri Papadopoulos d7a6ce1ab5 * include/winuser.h [WINVER >= 0x0500] (SetWinEventHook, WINEVENTPROC,
WINEVENT_OUTOFCONTEXT, WINEVENT_SKIPOWNTHREAD, WINEVENT_SKIPOWNPROCESS,
	WINEVENT_INCONTEXT): Add function, typedef, and constants.

	* include/winable.h [WINVER < 0x0500] (SetWinEventHook, WINEVENTPROC,
	WINEVENT_OUTOFCONTEXT, WINEVENT_SKIPOWNTHREAD, WINEVENT_SKIPOWNPROCESS,
	WINEVENT_INCONTEXT): Add function, typedef, and constants.

	* include/winuser.h [_WIN32_WINNT >= 0x0500] (UserHandleGrantAccess):
	Add function.

	* lib/user32.def (SetWinEventHook, UserHandleGrantAccess):
	Add functions.
2003-09-26 09:49:52 +00:00
Corinna Vinschen 186a0e42de * mmap.cc (munmap): Use correct address and length parameters when
calling fhandler's munmap.
2003-09-26 08:50:12 +00:00
Corinna Vinschen 0a0a45e22a * spawn.cc (spawn_guts): Set errno to E2BIG if command line is
longer than CreateProcess allows (32K).
2003-09-26 08:45:24 +00:00
Dimitri Papadopoulos 8ff4b3513d * include/winnt.h (ACE_INHERITED_OBJECT_TYPE_PRESENT,
ACE_OBJECT_TYPE_PRESENT): Add constants. For use with
	OBJECTS_AND_NAME structure.
2003-09-26 08:19:30 +00:00
Dimitri Papadopoulos 72b0db800a * include/aclapi.h [_WIN32_WINNT >= 0x0501] (GetInheritanceSource[AW]):
Add functions. Don't know what PFN_OBJECT_MGR_FUNCTS is so use
	void* instead.

	* include/accctrl.h [_WIN32_WINNT >= 0x0501] (INHERITED_FROM[AW],
	PINHERITED_FROM[AW]): Add structures.

	* lib/user32.def (GetInheritanceSource[AW]): Add functions.
2003-09-26 08:07:39 +00:00
Corinna Vinschen 32c9d3a91c Avoid compile time error when including winuser.h:
* include/winuser.h (FLASHWINFO, PFLASHWINFO): Define for 98/Me, too.
2003-09-26 07:51:26 +00:00
Christopher Faylor 912f81352f * dtable.cc (build_fh_name): Return pointer to a 'nodevice' rather than a NULL
pointer or suffer SEGVs with invalid paths.
2003-09-26 03:26:44 +00:00
Christopher Faylor 6c68fbbc61 * fork.cc (fork_parent): Detect failed pinfo constructor.
* spawn.cc (spawn_guts): Don't overwrite ENOMEM errno on failed pinfo
constructor.
2003-09-26 03:20:30 +00:00
Christopher Faylor 177989407a * spawn.cc (spawnve): Remove vfork short circuit and let caller deal with error
return.
2003-09-26 03:09:42 +00:00
Christopher Faylor 570be9788f * spawn.cc (spawn_guts): Catch potential error from pinfo.remember. Change
debug messages to make sense.  Pass correct value to pinfo constructor.  Ensure
cleanup after errors.  Always reimpersonate after errors.
2003-09-26 02:23:34 +00:00
Danny Smith 711d0c752a * lib/version.def (LIBRARY): Quote name. 2003-09-25 20:24:05 +00:00
Dimitri Papadopoulos e9c00b0eeb * include/winuser.h (GetClipboardSequenceNumber): Add functions
and constants.
* include/winuser.h (GetGuiResources, GR_GDIOBJECTS,
GR_USEROBJECTS): Add functions and constants.
* include/winuser.h (GetMouseMovePointsEx, GMMP_USE_DISPLAY_POINTS,
GMMP_USE_HIGH_RESOLUTION_POINTS): Add functions and constants.
* include/winuser.h (InSendMessageEx, ISMEX_NOSEND, ISMEX_CALLBACK,
ISMEX_NOTIFY, ISMEX_REPLIED, ISMEX_SEND): Add functions and
constants.
* lib/user32.def (GetClipboardSequenceNumber, GetGuiResources,
GetMouseMovePointsEx, InSendMessageEx): Add functions.
2003-09-25 15:04:55 +00:00
Dimitri Papadopoulos d20c4a577d * include/winuser.h (BroadcastSystemMessage, BroadcastSystemMessageA,
BroadcastSystemMessageW, BroadcastSystemMessageEx,
BroadcastSystemMessageExA, BroadcastSystemMessageExW,
BSMINFO, BSF_ALLOWSFW, BSF_SENDNOTIFYMESSAGE, BSF_LUID,
BSF_RETURNHDESK): Add functions and constants.
* include/winuser.h (EnumDisplaySettingsEx, EnumDisplaySettingsExA,
EnumDisplaySettingsExW, EDS_RAWMODE): Add functions and constant.
* include/winuser.h (IsGUIThread, IsHungAppWindow, FlashWindowEx,
GetProcessDefaultLayout, SetProcessDefaultLayout,
RealChildWindowFromPoint, SetProcessDefaultLayout,
SwitchToThisWindow): Add functions.
* lib/user32.def (BroadcastSystemMessageA, BroadcastSystemMessageW,
BroadcastSystemMessageExA, BroadcastSystemMessageExW,
EnumDisplaySettingsExA, EnumDisplaySettingsExW, FlashWindowEx,
GetProcessDefaultLayout, IsGUIThread, IsHungAppWindow,
RealChildWindowFromPoint, SetProcessDefaultLayout,
SwitchToThisWindow): Add function.
2003-09-25 14:11:47 +00:00
Christopher Faylor b498c877a1 * spawn.cc (spawn_guts): Move system signal handling stuff after CreateProcess
error check.
2003-09-25 13:49:21 +00:00
Dimitri Papadopoulos cb86a98b3b * include/winuser.h (DeregisterShellHookWindow): Add function.
* include/winuser.h [_WIN32_WINNT >= 0x0500] (EndTask): Add function.
* lib/user32.def (EndTask): Add function.
* include/winuser.h (WINVER, _WIN32_WINNT): It's better (?) to use _WIN32_WINNT instead of WINVER to test for Windows 2000.
* include/winable.h: Reorder target macros.
* lib/*.def: Cleanup.
2003-09-25 11:22:22 +00:00
Dimitri Papadopoulos 9a88a83d5a * include/winuser.h [WINVER >= 0x0500] (AnimateWindow): Add
function.
* lib/user32.def (AnimateWindow): Add function. By the way
there are ~ 140 symbols missing from this file when comparing
to user32.dll on Windows XP.
2003-09-25 08:26:00 +00:00
Dimitri Papadopoulos 12d295911e * include/winuser.h [WINVER >= 0x0500] (AW_SLIDE, AW_ACTIVATE,
AW_BLEND, AW_HIDE, AW_CENTER, AW_HOR_POSITIVE, AW_HOR_NEGATIVE,
AW_VER_POSITIVE, AW_VER_NEGATIVE): Add constants. For use by
AnimateWindow().
2003-09-25 08:04:30 +00:00
Dimitri Papadopoulos 75e1776af6 * include/winuser.h [WINVER >= 0x0500] (GetGUIThreadInfo,
LPGUITHREADINFO): Add function and associated typedef...
* include/winable.h [WINVER < 0x0500] (GetGUIThreadInfo,
LPGUITHREADINFO): ...and duplicate them in <winable.h> as
seems to be required on older versions of Windows.
2003-09-25 07:53:44 +00:00