Commit Graph

2394 Commits

Author SHA1 Message Date
Christopher Faylor 8861377a2d more white space 2003-11-25 22:58:32 +00:00
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 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
Christopher Faylor 4b1bc69287 white space 2003-11-23 17:55:37 +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
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
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 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 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 fcd3838ab5 * dtable.cc (build_fh_pc): Resurrect accidentally removed
DEV_CYGDRIVE_MAJOR case.
2003-11-19 11:19:27 +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
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
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
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
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
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 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
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