Commit Graph

3763 Commits

Author SHA1 Message Date
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