Commit Graph

3948 Commits

Author SHA1 Message Date
Christopher Faylor 970ca29242 more white space 2003-11-25 22:57:22 +00:00
Christopher Faylor 3654a9dd2f more white space 2003-11-25 22:56:58 +00:00
Christopher Faylor e2b9eb11e5 * thread.cc: Minor whitespace cleanup. Remove some obsolete code. 2003-11-25 22:55:31 +00:00
Christopher Faylor 84f08ba160 * winsup.api/known_bugs.tcl: Remove lseek10 since mknod now works. 2003-11-25 19:24:46 +00:00
Christopher Faylor e00700cd80 * dtable.cc (build_fh_name): Set error in dummy fhandler when one is noted
during path_conv.
* fhandler.h (fhandler_base::set_error): New method.
2003-11-25 02:03:17 +00:00
Christopher Faylor 46c6a3e8eb * configure.in: Avoid using cygserver unless hosting on cygwin. 2003-11-24 17:03:50 +00:00
Danny Smith 3ad60fc808 * include/winnt.h (PAGE_*): Group defines together. Change
constants to hex notation.
2003-11-23 20:29:02 +00:00
Christopher Faylor 4b1bc69287 white space 2003-11-23 17:55:37 +00:00
Corinna Vinschen 95b1156144 * Makefile.in: Make cygserver depending on cygwin. 2003-11-23 09:02:26 +00:00
Christopher Faylor 0af8d6110b * sigproc.cc (sig_send): Correct below checkin. Use
thisframe.call_signal_handler.
2003-11-23 05:42:47 +00:00
Christopher Faylor 0670609d12 * sigproc.cc (proc_exists): A zombie process does not exist.
(sig_send): Improve debugging output.  Wait for pipe to be created before
trying to send to it.  Call call_signal_handler_now if sending a signal to
myself.
2003-11-23 05:34:00 +00:00
Corinna Vinschen c026d84209 * msg.cc (client_request_msg::serve): Add default case to msgop switch.
* sem.cc (client_request_sem::serve): Add default case to semop switch.
	* shm.cc (client_request_shm::serve): Add default case to shmop switch.
2003-11-22 22:37:13 +00:00
Christopher Faylor 876083f32e * dcrt0.cc (check_sanity_and_sync): Correct api major version check so that
newer dlls will work with older apps but not vice versa.
2003-11-22 17:22:59 +00:00
Christopher Faylor ef7acb98aa * sem.cc: Always include signal.h to handle SIGSYS raise when !USE_SERVER.
* shm.cc: Ditto.
* msg.cc: Always include signal.h to handle SIGSYS raise when !USE_SERVER.
2003-11-21 22:22:08 +00:00
Christopher Faylor bfa2e9cbb1 * msg.cc: Always include signal.h to handle SIGSYS raise when !USE_SERVER. 2003-11-21 22:21:05 +00:00
Corinna Vinschen 4bd6628553 * Makefile.in (install): Explicitely create directories. Install
README to $(prefix)/share/doc/Cygwin.
	* README: New file.
2003-11-21 18:10:49 +00:00
Corinna Vinschen e74c79a870 * cygserver.cc (print_usage): Fix scrambled output. 2003-11-21 13:30:33 +00:00
Corinna Vinschen 94cacaf60b * cygserver-config: Slightly modify printed message. 2003-11-20 19:34:00 +00:00
Christopher Faylor d012506e3c * configure.in: Make --use-server the default.
* configure: Regenerate.
2003-11-20 19:31:52 +00:00
Christopher Faylor 7ee8258620 * configure.in: Make --use-server the default. Remove powerpc target.
* configure: Regenerate.
2003-11-20 19:31:41 +00:00
Corinna Vinschen d26c0ff955 * winsup.api/msgtest.c (main): Revert to use the SIGSYS signal handler.
* winsup.api/semtest.c (main): Ditto.
	* winsup.api/shmtest.c (main): Ditto.
2003-11-20 18:25:36 +00:00
Corinna Vinschen bd0e35213d * msg.cc (msgctl): Raise SIGSYS if call not available.
(msgget): Ditto.
	(msgrcv): Ditto.
	(msgsnd): Ditto.
	* sem.cc (semctl): Ditto.
	(semget): Ditto.
	(semop): Ditto.
	* shm.cc (shmat): Ditto.
	(shmctl): Ditto.
	(shmget): Ditto.
	(shmdt): Ditto.
2003-11-20 18:09:44 +00:00
Corinna Vinschen 72f11cac65 * Makefile.in (install): Install cygserver-config script to bindir.
* cygserver-config: New script.
2003-11-20 13:51:34 +00:00
Corinna Vinschen 2010ab333f * winsup.api/msgtest.c: New file derived from FreeBSD, testing
XSI Message Queue support.
	* winsup.api/semtest.c: Ditto, testing XSI Semaphore support.
	* winsup.api/shmtest.c: Ditto, testing XSI Shared Memory support.
2003-11-19 18:51:18 +00:00
Corinna Vinschen e545df31d5 * Makefile.in: Add rules to build ipcrm and ipcs.
* ipcrm.c: New file.
	* ipcs.c: New file.
2003-11-19 18:50:52 +00:00
Corinna Vinschen a6df500f7d * cygserver.h (client_request::request_code_t): Add
CYGSERVER_REQUEST_MSG and CYGSERVER_REQUEST_SEM.
	(admininstrator_group_sid): Add extern declaration.
	* cygserver_ipc.h: Rewrite.
	* cygserver_msg.h: New file.
	* cygserver_sem.h: New file.
	* cygserver_shm.h: More or less rewrite.
	* cygwin.din: Add msgctl, msgget, msgrcv, msgsnd, semctl, semget and
	semop.
	* msg.cc: Rewrite.
	* safe_memory.h: Remove.
	* sem.cc: Rewrite.
	* shm.cc: Rewrite.
	* include/cygwin/ipc.h: Use appropriate guard.
	(struct ipc_perm): Add seq.
	(IPCID_TO_IX): New define from BSD.
	(IPCID_TO_SEQ): Ditto.
	(IXSEQ_TO_IPCID): Ditto.
	(IPC_R): Ditto.
	(IPC_W): Ditto.
	(IPC_M): Ditto.
	* include/cygwin/msg.h: Use appropriate guard. #ifdef _KERNEL all stuff
	not explicitely defined by SUSv3. Use signed types in structs to match
	types used in BSD.
	(msgqnum_t): Define unsigned.
	(msglen_t): Ditto.
	(struct msqid_ds): Add msg_first and msg_last.
	(struct msginfo): Remove msgpool. Add msgssz and msgseg.
	* include/cygwin/sem.h: Use appropriate guard. #ifdef _KERNEL all stuff
	not explicitely defined by SUSv3. Use signed types in structs to match
	types used in BSD.
	(SEM_UNDO): Define appropriately.
	(struct semid_ds): Add sem_base.
	(struct seminfo): Add semmap and semusz.
	(SEM_A): New define from BSD.
	(SEM_R): Ditto.
	(SEM_ALLOC): Ditto.
	(union semun): Define.
	* include/cygwin/shm.h: Use appropriate guard. #ifdef _KERNEL all stuff
	not explicitely defined by SUSv3. Use signed types in structs to match
	types used in BSD.
	(SHMLBA): Define using cygwin_internal(CW_GET_SHMLBA) call.
	(struct shmid_ds): Add shm_internal.
	(struct shm_info): Rename shm_ids to used_ids as in BSD.  Add define
	for shm_ids.
	* include/cygwin/sysproto.h: New file.
	* include/cygwin/version.h: Bump API minor number.
	* include/sys/ipc.h: New file.
	* include/sys/msg.h: New file.
	* include/sys/queue.h: New file from BSD.
	* include/sys/sem.h: New file.
	* include/sys/shm.h: New file.
	* include/sys/sysproto.h: New file.
2003-11-19 18:50:23 +00:00
Corinna Vinschen 282113ba89 Don't use safe_new but new throughout. Fix copyright dates
throughout.
	* Makefile.in: Accomodate all new files and name changes.
	Add a *.d dependency.
	(sbindir): Add.
	(etcdir): Drop in favor of more appropriate sysconfdir definition.
	(sysconfdir): Add.
	(CXXFLAGS): Add -MMD flag. Add SYSCONFDIR definition.
	(.SUFFIXES): Add.
	(install): Add action items.
	(libclean): New target.
	(fullclean): Ditto.
	* bsd_helper.cc: New file.
	* bsd_helper.h: Ditto.
	* bsd_log.cc: Ditto.
	* bsd_log.h: Ditto.
	* bsd_mutex.cc: Ditto.
	* bsd_mutex.h: Ditto.
	* client.cc: Rearrange to build as less as possible if
	__INSIDE_CYGWIN__.
	(client_request::handle_request): Add Message Queue and Semaphore
	handling.
	* cygserver.cc: Rearrange to build as less as possible if
	__INSIDE_CYGWIN__. Use new debug/log/panic logging functions.
	(DEF_CONFIG_FILE): New definition for configuration file.  Use
	throughout.
	(getfunc): Remove.
	(__cygserver__printf): Remove.
	(client_request_attach_tty::serve): Return error if impersonation
	fails.
	(print_usage): Pump up help message.
	(print_version): Add output of default configuration file.
	(main): Accommodate new options.  Allow overwrite of threading options
	from config file.  Call several new initialization functions.  Drop
	printing dots.  Don't define SIGHANDLE inline.
	* cygserver.conf: New file.
	* cygserver_process.h: Rename to process.h.
	* cygserver_transport.h: Rename to transport.h.
	* cygserver_transport_pipes.h: Rename to transport_pipes.h.
	* cygserver_transport_sockets.h: Rename to transport_sockets.h.
	* msg.cc: Rewrite.
	* sem.cc: Rewrite.
	* shm.cc: Rewrite.
	* sysv_msg.cc: New file, derived from FreeBSD version 1.52.
	* sysv_sem.cc: New file, derived from FreeBSD version 1.66.
	* sysv_shm.cc: New file, derived from FreeBSD version 1.89.
	* threaded_queue.cc: Rearrange to build as less as possible if
	__INSIDE_CYGWIN__.
	* transport.cc (transport_layer_base::impersonate_client): Define bool.
	(transport_layer_base::revert_to_self): Ditto.
	* transport.h (transport_layer_base::impersonate_client): Declare bool.
	(transport_layer_base::revert_to_self): Ditto.
	* transport_pipes.cc (transport_layer_pipes::transport_layer_pipes):
	Don't call init_security.
	(init_security): Remove.
	(transport_layer_pipes::accept): Use global sec_all_nih.
	(transport_layer_pipes::connect): Ditto.
	(transport_layer_pipes::impersonate_client): Define bool.
	(transport_layer_pipes::revert_to_self): Ditt.
	* transport_pipes.h (transport_layer_pipes::impersonate_client): Declare
	bool.
	(transport_layer_pipes::revert_to_self): Ditto.
	* woutsup.h: Include bsd compatibility headers.
	(SIGHANDLE): Add definition.
	(__cygserver__printf): Remove definition.
	(__noop_printf): Ditto.
	(debug_printf): Define using debug.
	(syscall_printf): Define using log.
	(system_printf): Ditto.
	Drop all other _printf definitions.
2003-11-19 18:49:41 +00:00
Corinna Vinschen fcd3838ab5 * dtable.cc (build_fh_pc): Resurrect accidentally removed
DEV_CYGDRIVE_MAJOR case.
2003-11-19 11:19:27 +00:00
Corinna Vinschen 7326e3ffd9 Revert most of last check in to ChangeLog. It duplicated
accidentally a big bunch of old entries.
2003-11-19 10:11:46 +00:00
Corinna Vinschen 8f4dfcaa1f * fhandler.cc (fhandler_base::lseek): Include high order offset
bits in return value.
2003-11-17 22:18:42 +00:00
Corinna Vinschen 6e17cee57b * bsdlib.cc (getprogname): New function.
(setprogname): New funtion.
	* cygwin.din: Export getprogname and setprogname.
	* include/cygwin/version.h: Bumb API version number.
2003-11-17 17:25:59 +00:00
Christopher Faylor 490d129f4a * include/limits.h: Revert unsanctioned changes below.
* include/cygwin/config.h: Ditto.
* include/sys/param.h: Ditto.
2003-11-15 17:04:10 +00:00
Manu B 5cdbbdb385 Add Tab control macro 2003-11-15 01:00:06 +00:00
Robert Collins 95d02d5b9b 2003-11-11 Robert Collins <rbtcollins@hotmail.com>
Ron Parker <rdparker@butlermfg.com>

	* bsdlib.cc: Update throughout to use CYG_MAX_PATH rather than MAX_PATH.
	* cygheap.h: Ditto.
	* dcrt0.cc: Ditto.
	* delqueue.cc: Ditto.
	* dlfcn.cc: Ditto.
	* dll_init.cc: Ditto.
	* dll_init.h: Ditto.
	* dtable.cc: Ditto.
	* environ.cc: Ditto.
	* environ.h: Ditto.
	* exceptions.cc: Ditto.
	* external.cc: Ditto.
	* fhandler_disk_file.cc: Ditto.
	* fhandler_proc.cc: Ditto.
	* fhandler_process.cc: Ditto.
	* fhandler_raw.cc: Ditto.
	* fhandler_registry.cc: Ditto.
	* fhandler_socket.cc: Ditto.
	* fhandler_virtual.cc: Ditto.
	* miscfuncs.cc: Ditto.
	* mmap.cc: Ditto.
	* netdb.cc: Ditto.
	* path.cc: Ditto.
	* path.h: Ditto.
	* pinfo.cc: Ditto.
	* pinfo.h: Ditto.
	* pthread.cc: Ditto.
	* registry.cc: Ditto.
	* shared.cc: Ditto.
	* shared_info.h: Ditto.
	* smallprint.c: Ditto.
	* spawn.cc: Ditto.
	* strace.cc: Ditto.
	* syscalls.cc: Ditto.
	* thread.h: Ditto.
	* uinfo.cc: Ditto.
	* winsup.h: Ditto.
	* include/limits.h: Ditto.
	* include/cygwin/config.h: Ditto.
	* include/sys/param.h: Ditto.
2003-11-14 23:40:06 +00:00
Corinna Vinschen 508682370b * mkgroup.c: Avoid compiler warnings throughout.
* mkpasswd.c: Ditto.
	* passwd.c: Ditto.
2003-11-14 19:14:43 +00:00
Christopher Faylor 22ec16a830 * dtable.cc (build_fh_pc): Use DEV_SERIAL_MAJOR to catch all serial ports.
Remove redundant FH_CYGDRIVE case since it is handled by DEV_CYGDRIVE_MAJOR.
2003-11-14 01:37:23 +00:00
David Starks-Browning d15d293f97 minor adjustments to Elfyn's contribution. 2003-11-13 22:23:59 +00:00
David Starks-Browning 10c43de319 Apply Elfyn's patches as supplied in <http://cygwin.com/ml/cygwin-patches/2003-q3/msg00156.html>. 2003-11-13 22:07:36 +00:00
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
Pierre Humblet 64150cfc6a 2003-09-25 Pierre Humblet <pierre.humblet@ieee.org>
* shared_info.h: Update CURR_USER_MAGIC, CURR_SHARED_MAGIC and
	SHARED_INFO_CB.
	(mount_info::cb): Delete.
	(mount_info::version): Delete.
	(shared_info::delqueue): Delete.
	* Makefile.in: Do magic for USER_MAGIC, class user_info, instead
	of for mount_info.
2003-09-25 04:03:53 +00:00
Christopher Faylor cd2bce7142 * include/tzfile.h: Add some missing entries. 2003-09-25 03:51:51 +00:00
Christopher Faylor dbf193cea8 * include/paths.h: Add some missing entries. 2003-09-25 03:46:20 +00:00
Christopher Faylor 7759daa979 * shared_info.h (CURR_MOUNT_MAGIC): Fix.
* sigproc.cc (sigpacket): New structure.
(sig_send): Fill out sigpacket structure to send to signal thread rather than
racily sending separate packets.
(wait_sig): Use sigpacket structure to receive info from signal sender.
2003-09-25 03:06:36 +00:00
Pierre Humblet 64f74184bb *** empty log message *** 2003-09-25 02:33:27 +00:00
Pierre Humblet 138847683d 2003-09-24 Pierre Humblet <pierre.humblet@ieee.org>
* shared_info.h (class user_info): New.
	(cygwin_user_h): New.
	(user_shared): New.
	(enum shared_locations): Replace SH_MOUNT_TABLE by SH_USER_SHARED;
	(mount_table): Change from variable to macro.
	* shared.cc: Use sizeof(user_info) in "offsets".
	(user_shared_initialize): Add "reinit" argument to indicate need
	to reinitialize the mapping. Replace "mount_table" by "user_shared"
	throughout. Call user_shared->mountinfo.init and
	user_shared->delqueue.init.
	(shared_info::initialize): Do not call delqueue.init.
	(memory_init): Add argument to user_shared_initialize.
	* child_info.h (child_info::mount_h): Delete.
	(child_info::user_h): New.
	* sigpproc.cc (init_child_info): Use user_h instead of mount_h.
	* dcrt0.cc (_dll_crt0): Ditto.
	* fhandler_disk_file.cc (fhandler_disk_file::close): Use
	user_shared->delqueue instead of cygwin_shared->delqueue.
	* fhandler_virtual.cc (fhandler_virtual::close): Ditto.
	* syscalls.cc (close_all_files): Ditto.
	(unlink): Ditto.
	(seteuid32): Add argument to user_shared_initialize.
2003-09-25 02:29:05 +00:00
Christopher Faylor a4e167fa27 correct incorrect checkin 2003-09-25 00:38:45 +00:00
Christopher Faylor 7ac6173643 * devices.cc: New file.
* devices.gperf: New file.
* devices.shilka: New file.
* cygwin-gperf: New file.
* cygwin-shilka: New file.
* fhandler_fifo.cc: New file.
* fhandler_nodevice.cc : New file.  Reorganize headers so that path.h precedes
fhandler.h throughout.  Remove device argument and unit arguments from fhandler
constructors throughout.  Remove pc arguments to fhandler functions and use
internal pc element instead, throughout.  Use dev element in pc throughout.
Use major/minor elements rather than units and device numbers previously in
fhandler class.  Use correct methods for fhandler file names rather than
directly accessing file name variables, throughout.
* Makefile.in (DLL_OFILES): Add devices.o, fhandler_fifo.o
* dcrt0.cc (dll_crt0_1): Call device::init.
* devices.h: Renumber devices based on more Linux-like major/minor numbers.
Add more devices.  Declare standard device storage.
(device): Declare struct.
* dir.cc (opendir): Use new 'build_fh_name' to construct a fhandler_* type.
* dtable.cc (dtable::get_debugger_info): Ditto.
(cygwin_attach_handle_to_fd): Ditto.
(dtable::release): Remove special FH_SOCKET case in favor of generic
"need_fixup_before" test.
(dtable::init_std_file_from_handle): Use either build_fh_dev or build_fh_name
to build standard fhandler.
(dtable::build_fh_name): Renamed from dtable::build_fhandler_from_name.  Move
out of dtable class.  Don't accept a path_conv argument.  Just build it here
and pass it to:
(build_fh_pc): Renamed from dtable::build_fhandler.  Move out of dtable class.
Use intrinsic device type in path_conv to create new fhandler.
(build_fh_dev): Renamed from dtable::build_fhandler.  Move out of dtable class.
Simplify arguments to just take new 'device' type and a name.  Just return
pointer to fhandler rather than trying to insert into dtable.
(dtable::dup_worker): Accommodate above build_fh name changes.
(dtable::find_fifo): New (currently broken) function.
(handle_to_fn): Use strechr for efficiency.
* dtable.h: Reflect above build_fh name changes and argument differences.
(fhandler_base *&operator []): Return self rather than copy of self.
* fhandler.cc (fhandler_base::operator =): Use pc element to set normalized
path.
(fhandler_base::set_name): Ditto.
(fhandler_base::raw_read): Use method to access name.
(fhandler_base::write): Correctly use get_output_handle rather than get_handle.
(handler_base::device_access_denied): New function.
(fhandler_base::open): Eliminate pc argument and use pc element of
fhandler_base throughout.
(fhandler_base::fstat): Detect if device is based in filesystem and use
fstat_fs to calculate stat, if so.
(fhandler_base::fhandler_base): Eliminate handling of file names and, instead,
just free appropriate component from pc.
(fhandler_base::opendir): Remove path_conv parameter.
* fhandler.h: Remove all device flags.
(fhandler_base::pc): New element.
(fhandler_base::set_name): Change argument to path_conv.
(fhandler_base::error): New function.
(fhandler_base::exists): New function.
(fhandler_base::pc_binmode): New function.
(fhandler_base::dev): New function.
(fhandler_base::open_fs): New function.
(fhandler_base::fstat_fs): New function.
(fhandler_base::fstat_by_name): New function.
(fhandler_base::fstat_by_handle): New function.
(fhandler_base::isfifo): New function.
(fhandler_base::is_slow): New function.
(fhandler_base::is_auto_device): New function.
(fhandler_base::is_fs_special): New function.
(fhandler_base::device_access_denied): New function.
(fhandler_base::operator DWORD&): New operator.
(fhandler_base::get_name): Return normalized path from pc.
(fhandler_base::get_win32_name): Return windows path from pc.
(fhandler_base::isdevice): Renamed from is_device.
(fhandler_base::get_native_name): Return device format.
(fhandler_fifo): New class.
(fhandler_nodevice): New class.
(select_stuff::device_specific): Remove array.
(select_stuff::device_specific_pipe): New class element.
(select_stuff::device_specific_socket): New class element.
(select_stuff::device_specific_serial): New class element.
(select_stuff::select_stuff): Initialize new elements.
* fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Move to base class
from fhandler_disk_file.
(fhandler_base::fstat_by_name): Ditto.
(fhandler_base::fstat_by_name): Ditto.
(fhandler_disk_file::open): Move most functionality into
fhandler_base::open_fs.
(fhandler_base::open_fs): New function.
(fhandler_disk_file::close): Move most functionality into
fhandler_base::close_fs.
(fhandler_base::close_fs): New function.
* fhandler_mem.cc (fhandler_dev_mem::open): Use device name in debugging
output.
* fhandler_socket.cc (fhandler_socket::set_connect_secret): Copy standard
urandom device into appropriate place.
(fhandler_socket::accept): Reflect change in fdsock return value.
* fhandler_tty.cc: See "throughouts" above.
* net.cc: Accommodate fdsock change throughout.
(fdsock): Return success or failure, accept fd argument and device argument.
* path.cc (symlink_info::major): New element.
(symlink_info::minor): New element.
(symlink_info::parse_device): Declare new function.
(fs_info::update): Accommodate changes in path_conv class.
(path_conv::fillin): Ditto.
(path_conv::return_and_clear_normalized_path): Eliminate.
(path_conv::set_normalized_path): New function.
(path_conv::path_conv): Set info in dev element.  Use path_conv methods Check
for FH_FS rather than FH_BAD to indicate when to fill in filesystem stuff.
where appropriate rather than direct access.  Use set_normalized_path to set
normalized path.
(windows_device_names): Eliminate.
(get_dev): Ditto.
(get_raw_device_number): Ditto.
(get_device_number): Ditto.
(win32_device_name): Call new device name parser to do most of the heavy
lifting.
(mount_info::conv_to_win32_path): Fill in dev field as appropriate.
(symlink_worker): Handle new device files.
(symlink_info::check): Ditto.
(symlink_info::parse_device): Define new function.
* path.h (executable_states): Move here from fhandler.h.
(fs_info): Rename variables to *_storage and create methods for accessing same.
(path_conv): Add dev element, remove devn and unit and adjust inline methods to
accommodate.
(set_normalized_path): Declare new function.
* pinfo.cc (_pinfo::commune_recv): Add broken support for handling fifos.
(_pinfo::commune_send): Ditto.
* pipe.cc (fhandler_pipe::close): check for existence of handle before closing
it.
(handler_pipe::create): Rename from make_pipe.  Change arguments to accept
fhandler_pipe array.  Accommodate fifos.
(pipe): Rework to deal with fhandler_pipe::create changes.
(_pipe): Ditto.
* select.cc: Use individual device_specific types throughout rather than
indexing with obsolete device number.
(set_bits): Use is_socket call rather than checking device number.
* shared_info.h (CURR_MOUNT_MAGIC): Update.
(conv_to_win32_path): Reflect addition of device argument.
* syscalls.cc (mknod_worker): New function.
(open): Use build_fh_name to build fhandler.
(chown_worker): Detect if this is an 'auto' device rather than an on-filesystem
device and handle appropriately.
(chmod_device): New function.
(chmod): Detect if this is an 'auto' device rather than an on-filesystem device
and handle appropriately.  Use chmod_device to set mode of in-filesystem
devices.
(stat_worker): Eliminate path_conv argument.  Call build_fh_name to construct
fhandler.  Use fh->error() rather than pc->error to detect errors in fhandler
construction.
(access_worker): New function pulled from access.  Accommodate in-filesystem
devices.
(access): Use access_worker.
(fpathconf): Detect if this is an 'auto' device rather than an on-filesystem
device and handle appropriately.
(mknod_worker): New function.
(mknod32): New function.
(chroot): Free normalized path -- assuming it was actually cmalloced.
* tty.cc (create_tty_master): Tweak for new device class.
(tty::common_init): Ditto.
* winsup.h (stat_worker): Remove.
(symlink_worker): Declare.
* exceptions.cc (set_process_mask): Just call sig_dispatch_pending and don't
worry about pending_signals since sig_dispatch_pending should always do the
right thing now.
(sig_handle): Reorganize SIGCONT handling to more closely conform to SUSv3.
* pinfo.h: Move __SIG enum to sigproc.h.
(PICOM_FIFO): New enum element.
(_pinfo): Remove 'thread2signal' stuff throughout class.
(_pinfo::commune_send): Make varargs.
(_pinfo::sigtodo): Eliminate.
(_pinfo::thread2signal): Ditto.
* signal.cc (kill_worker): Eliminate call to setthread2signal.
* sigproc.cc (local_sigtodo): Eliminate.
(getlocal_sigtodo): Ditto.
(sigelem): New class.
(pending_signals): New class.
(sigqueue): New variable, start of sigqueue linked list.
(sigcatch_nonmain): Eliminate.
(sigcatch_main): Eliminate.
(sigcatch_nosync): Eliminate.
(sigcomplete_nonmain): Eliminate.
(pending_signals): Eliminate.
(sig_clear): Call signal thread to clear pending signals, unless already in
signal thread.
(sigpending): Call signal thread to get pending signals.
(sig_dispatch_pending): Eliminate use of pending_signals and just check
sigqueue.
(sigproc_terminate): Eliminate all of the obsolete semaphore stuff.  Close
signal pipe handle.
(sig_send): Eliminate all of the obsolete semaphore stuff and use pipe to send
signals.
(getevent): Eliminate.
(pending_signals::add): New function.
(pending_signals::del): New function.
(pending_signals::next): New function.
(wait_sig): Eliminate all of the obsolete semaphore stuff.  Use pipe to
communicate and maintain a linked list of signals.
* sigproc.h: Move __SIG defines here.  Add __SIGPENDING.
(sig_dispatch_pending): Remove "C" specifier.
(sig_handle): Accept a mask argument.
* thread.cc: Remove signal handling considerations throughout.
2003-09-25 00:37:18 +00:00
Dimitri Papadopoulos 2d9af27bf3 Remove test code. 2003-09-24 13:47:46 +00:00
Dimitri Papadopoulos e3ae4e4f62 * include/GL/glu.h (gluErrorUnicodeStringWIN): Add macro
function. MSDN suggests using gluErrorUnicodeStringWIN
instead of gluErrorString, as it allows both ANSI and Unicode
error strings.
* include/GL/glu.h (gluErrorUnicodeStringEXT): Make the
returned pointer const for consistency reasons.
2003-09-24 13:21:52 +00:00
Dimitri Papadopoulos 288beac8c6 * include/GL/glu.h (gluErrorUnicodeStringEXT): Add function.
Function exists in glu32.def but is undocumented on MSDN.
A Google search came up with this declaration.
2003-09-24 12:44:09 +00:00
Dimitri Papadopoulos ea6a4e6c11 * include/GL/glu.h: Rewritten from scratch. Started from GLU 1.3
headers from OpenGL Sample Implementation. Windows ships with
GLU 1.2 so some constants and functions were removed. Then some
typedef's and function declarations were reworked to look like
the previous GL/glu.h.
2003-09-24 12:33:20 +00:00