Commit Graph

1977 Commits

Author SHA1 Message Date
Corinna Vinschen 54152c7e7e * cygwin.din: Add vsyslog.
* fhandler.cc (fhandler_base::write): Only make file sparse if the
	seeked area is >= 128K.
	* syslog.cc (vsyslog): New function, overtaking functionality from
	syslog.
	(syslog): Just call vsyslog.
	* include/cygwin/version.h: Bump API minor.
	* include/sys/syslog.h: Add vsyslog declaration.
2003-06-06 08:11:19 +00:00
Christopher Faylor 979233a51a * cygthread.cc (cygthread::terminate_thread): Change system_printf to
debug_printf.
2003-06-05 19:18:33 +00:00
Christopher Faylor f51e42acc8 * shared.cc (shared_info::heap_chunk_size): Be really defensive about making
sure that heap_chunk is set.
2003-06-05 02:56:27 +00:00
Christopher Faylor 7b17543fb2 * path.cc (conv_path_list): Use correct value when calculating length to avoid
a potential SEGV.
2003-06-04 22:59:55 +00:00
Pierre Humblet 9f033c223c 2003-06-03 Pierre Humblet <pierre.humblet@ieee.org>
* fhandler_disk_file.cc (fhandler_disk_file::fstat): Mark the pc
        as non-executable if the file cannot be opened for read. Retry query
        open only if errno is EACCES. Never change the mode, even if it is 000
        when query open() fails.
2003-06-04 01:57:44 +00:00
Christopher Faylor 1e61337ccf * configure.in: Allow any i?86 variant.
* configure: Regenerate.
2003-06-04 01:44:07 +00:00
Corinna Vinschen fb6b1418e4 * fhandler_socket.cc (connect_thread): Remove.
(accept_thread): Remove.
	(fhandler_socket::connect): Remove all special blocking handling.
	(fhandler_socket::accept): Ditto.
	* net.cc (cygwin_connect): Make blocking sockets temporarily
	non-blocking and call cygwin_select on them to be interruptible.
	(cygwin_accept):  Ditto.
2003-06-03 14:05:17 +00:00
Christopher Faylor 0c8fe17278 * spawn.cc (spawn_guts): Don't hang around if the parent doesn't exist. 2003-06-03 02:32:49 +00:00
Christopher Faylor 3786526ea8 * cygthread.h (cygthread::terminate_thread): Mark private.
* cygthread.cc (cygthread::terminate_thread): Deallocate free_range thread
stuff.
2003-06-02 21:22:02 +00:00
Corinna Vinschen cbdc3d1780 * fhandler_socket.cc (fhandler_socket::accept): Rename `signalled'
to `interrupted' as used in fhandler_socket::connect.
2003-06-02 21:20:22 +00:00
Corinna Vinschen dfe7d28850 * fhandler_socket.cc (fhandler_socket::connect): Simplify previous
patch.
	(fhandler_socket::accept): Ditto.
2003-06-02 21:14:39 +00:00
Corinna Vinschen 8e13bd144d * fhandler_socket.cc: Include cygthread.h.
(class sock_event): Remove.
	(thread_connect): New function.
	(thread_accept): Ditto.
	(fhandler_socket::connect): Use cygthread instead of socket event
	handling for blocking sockets.
	(fhandler_socket::accept): Ditto.
2003-06-02 17:52:16 +00:00
Christopher Faylor 418c623614 * fhandler.cc (fhandler_base::write): Correct minor printf formatting style
glitch.
2003-06-02 14:07:48 +00:00
Pierre Humblet c17e8306d0 2003-06-01 Pierre Humblet <pierre.humblet@ieee.org>
* fhandler_disk_file.cc (fhandler_disk_file::fstat_by_name): Assume
        an existing directory is a root if FindFirstFile fails.
2003-06-01 19:37:13 +00:00
Christopher Faylor e59c6ff448 * path.cc (mount_info::conv_to_win32_path): gcc warning about chroot_ok was
actually valid.  Fix it.
2003-05-30 23:43:24 +00:00
Christopher Faylor cbe5375437 * cygheap.cc (init_cheap): Temporarily remove inline that newer gcc's have
problems with.
* path.cc (path_conv::check): Rework has_acls logic slightly.  Uncouple exec
tests away from filesystem tests.
2003-05-30 15:01:33 +00:00
Corinna Vinschen 4aa10069db * include/sys/param.h: Add DEV_BSIZE. 2003-05-30 08:39:02 +00:00
Corinna Vinschen 4e2db52c1c * fhandler_socket.cc (fhandler_socket::dup): Rearrange. Fix
conditional.
2003-05-29 16:16:59 +00:00
Christopher Faylor b666c2eb34 * mkvers.sh: Avoid "-dontuse" tags.
* path.cc (path_conv::check): Set exec state based on known situations.
* path.cc (mount_item::fnmunge): New function.
(mount_item::build_win32): New function.
(mount_info::conv_to_win32_path): Use build_win32 to build windows path.
* path.h (mount_item::fnmunge): Declare new function.
(mount_item::build_win32): Ditto.
* sys/mount.h (MOUNT_ENC): Define.
2003-05-29 03:50:15 +00:00
Corinna Vinschen 72c1470d67 * fhandler_socket.cc (fhandler_socket::dup): If running impersonated,
revert to original account before calling fixup_before_fork_exec
	and impersonate again afterwards.  Change comment accordingly.
	Clean up error handling and debug output.
2003-05-28 22:05:56 +00:00
Thomas Pfaff a946fb037d * fhandler_socket.cc (sock_event::~sock_event): New method.
(sock_event::load): Change to void. Check if winsock2 is available.
(socke_event::wait): Return 0 if interruptible mode is not available.
(fhandler_socket::connect): Remove checks for winsock2 availability.
(fhandler_socket::accept): Ditto.
2003-05-27 18:30:29 +00:00
Corinna Vinschen dae86e4507 * fhandler_socket.cc (fhandler_socket::dup): First try duplicating
using WSADuplicateSocket/WSASocket, if that fails, try DuplicateHandle.
2003-05-27 07:50:00 +00:00
Corinna Vinschen 2311f6b0e4 * fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): Filter
permissions throug umask on FAT or if ntsec is off.
2003-05-27 07:44:26 +00:00
Corinna Vinschen ada0376f64 * syscalls.cc (statfs): Call GetDiskFreeSpaceEx before GetDiskFreeSpace. 2003-05-26 16:52:58 +00:00
Corinna Vinschen 0372ad9f11 * fhandler.cc (is_at_eof): Fix conditional. Use INVALID_FILE_SIZE
instead of numeric constant.
2003-05-26 15:43:54 +00:00
Corinna Vinschen 6852f6c0f6 * fhandler_socket.cc (fhandler_socket::connect): Guard calls to
sock_event methods by a check for WinSock2 availability.
	(fhandler_socket::accept): Ditto.
2003-05-26 11:11:22 +00:00
Corinna Vinschen fac297d5f8 * fhandler.h: Rename FH_W95LSBUG flag to FH_LSEEKED.
(fhandler_base::set_did_lseek): Rename from set_check_win95_lseek_bug.
	(fhandler_base::get_did_lseek): Rename from get_check_win95_lseek_bug.
	(fhandler_base::set_fs_flags): New method.
	(fhandler_base::get_fs_flags): Ditto.
	* fhandler.cc (fhandler_base::write): Make 64 bit clean.  Convert file
	to a "sparse" file when writing after a long lseek (>64K) beyond EOF.
	(fhandler_base::lseek): Call set_did_lseek() instead of
	set_check_win95_lseek_bug().
	(fhandler_base::fhandler_base): Initialize fs_flags to 0.
	* fhandler_disk_file.cc (fhandler_disk_file::open): Don't create files
	as "sparse" unconditionally.  Set fs_flags member.
2003-05-26 09:54:01 +00:00
Corinna Vinschen a80229fd49 * autoload.cc (GetDiskFreeSpaceEx): Add.
* syscalls.cc (statfs): Call full_path.root_dir() instead of
	rootdir(full_path). Use GetDiskFreeSpaceEx when available and
	report space available in addition to free space.
	* fhandler_disk_file.cc (fhandler_disk_file::fstat_by_name):
	Do not call FindFirstFile for disk root directories.
2003-05-25 09:18:43 +00:00
Corinna Vinschen c295ce6f6e * fhandler_process.cc (format_process_stat): use PagefileUsage
instead of VirtualSize.
	(get_mem_values): Ditto.
2003-05-24 20:14:19 +00:00
Corinna Vinschen 5c768c978c * shared_info.h: Match shared_name declaration with below change.
* shared.cc (shared_name): Use incoming char * parameter instead of
	local static buffer.
	(open_shared): Accomodate new calling convention for shared_name.
	* exceptions.cc (events_init): Ditto.
	* sigproc.cc (getsem): Ditto.
	* syscalls.cc (login): Ditto.
	(logout): Ditto.
	(pututline): Ditto.
2003-05-21 08:01:57 +00:00
Corinna Vinschen 44be819760 * fhandler_socket.cc (secret_event_name): Return void. Use incoming
char *parameter instead of local static buffer.
	(fhandler_socket::create_secret_event): Accomodate new calling
	convention for secret_event_name.
	(fhandler_socket::close_secret_event): Ditto.
2003-05-20 17:39:46 +00:00
Corinna Vinschen d4f3ce316c * fhandler_socket.cc (SECRET_EVENT_NAME): Remove.
(ENTROPY_SOURCE_NAME): Ditto.
	(secret_event_name): New static function.  Create shared event name
	with "Global\" prefix on systems supporting terminal services.
	(fhandler_socket::set_connect_secret): Fix conditional.
	(fhandler_socket::create_secret_event): Create secret event using
	secret_event_name().
	(fhandler_socket::close_secret_event): Ditto.
	* shared.cc (shared_name): Create shared object name with "Global\"
	prefix on systems supporting terminal services.
	* wincap.cc: Set has_terminal_services capability throughout.
	(wincap_2003): New global object representing Windows 2003 Server
	capabilities.
	(wincapc::init): Accomodate Windows 2003 Server.
	* wincap.h (struct wincaps): Add has_terminal_services capability.
2003-05-20 15:22:09 +00:00
Corinna Vinschen 10bada05fa * winsup/cygwin/include/cygwin/version.h: Bump API minor version.
* winsup/cygwin/include/cygwin/types.h: Define key_t as long long.
	* winsup/cygwin/cygwin.din: Add ftok, _ftok.
	* winsup/cygwin/ipc.cc (ftok): Rework implementation.
2003-05-20 12:38:04 +00:00
Christopher Faylor d8ee8ca551 * spawn.cc (spawn_guts): Show more of command line in strace output. 2003-05-19 01:43:31 +00:00
Thomas Pfaff c8fa3426af * thread.h (pthread::init_mainthread): Remove function parameter.
(MTinterface::Init): Ditto.
* thread.cc (MTinterface::Init): Remove function parameter.
Always initialize reent_key.
(pthread::init_mainthread): Remove function parameter.
(MTinterface::fixup_after_fork): Fix pthread::init_mainthread call.
* dcrt0.cc (dll_crt_0_1) Fix calls to MTinterface::Init and
pthread::init_mainthread.
Call pthread::init_mainthread only when not forked.
2003-05-15 19:42:51 +00:00
Corinna Vinschen f2669f5d16 * fhandler_proc.cc (format_proc_meminfo): Make swap memory output
Linux style values.
2003-05-15 11:56:51 +00:00
Corinna Vinschen 5d575f7dcd * include/cygwin/config.h: Define __USE_INTERNAL_STAT64 appropriately. 2003-05-13 09:26:17 +00:00
Corinna Vinschen 194d9eb318 * Makefile.in (CYGWIN_START): Define as crt0.o. Add to TARGET_LIBS.
* fhandler.h (fhandler_virtual::fstat): Remove useless declaration.
	* fhandler_virtual.cc: Remove _COMPILING_NEWLIB define.
	* ipc.cc (ftok): Use stat64.
	* syscalls.cc (_fstat64): Remove alias.
	(_fstat): Ditto.
	(_stat): Ditto.
	(_fstat64_r): New function.
	(_fstat_r): Ditto.
	(_stat64_r): Ditto.
	(stat_r): Ditto.
	* crt0.o: New file, moved from newlib.
	* include/sys/param.h: Ditto.
	* include/sys/utime.h: Ditto.
	* include/sys/utmp.h: Ditto.
	* include/sys/dirent.h: Ditto.  Expose different struct dirent,
	dependening of the environment.
2003-05-12 11:06:27 +00:00
Corinna Vinschen cc95baad41 Replace ino_t by __ino64_t throughout. 2003-05-11 21:52:09 +00:00
Corinna Vinschen aee7085346 * include/cygwin/types.h: Add key_t typedef. 2003-05-11 12:50:18 +00:00
Christopher Faylor 066ca06fd0 * dir.cc (readdir): Fill out new old_d_ino field.
* fhandler.h (fhandler_base::namehash): Define as ino_t.
(fhandler_base::get_namehash): Ditto.
* fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): Accommodate new 64
bit st_ino.
* fhandler_socket.cc (fhandler_socket::fstat): Ditto.
* path.cc (hash_path_name): Return ino_t.
* syscalls.cc (stat64_to_stat32): Convert 64 bit inode to 32 bit.
* winsup.h (hash_path_name): Declare as returning ino_t.
* include/cygwin/stat.h (__stat32): Use 32 bit st_ino.
(__stat64): Use 64 bit st_ino.
* include/cygwin/types.h (__ino64_t): Define.
(__ino32_t): Ditto.
(ino_t): Define appropriately.
2003-05-11 00:10:11 +00:00
Corinna Vinschen 3e66a81cd1 * Makefile.in (NEW_FUNCTIONS): All 32/64 from 0.79 API get
leading underscore.
	* cygwin.din: Ditto.
	* include/cygwin/version.h: Bump API minor number.
2003-05-09 22:11:25 +00:00
Corinna Vinschen d3b450f3a1 * include/cygwin/config.h: New file. 2003-05-09 21:27:40 +00:00
Christopher Faylor 9508ebc53d * cygthread.cc (cygthread::detach): Prioritize waiting for I/O completion over
waiting for signal delivery.
2003-05-09 17:56:58 +00:00
Thomas Pfaff 0bb7254f38 * signal.cc (nanosleep): Do not wait twice for signal arrival. 2003-05-06 19:39:10 +00:00
Corinna Vinschen a6d745f53c * include/cygwin/types.h: Fix erroneous definition of ino_t from
2003-04-28.
2003-05-03 18:14:29 +00:00
Corinna Vinschen 40d3c80413 * syscalls.cc (chown_worker): Allow chown'ing of socket files. 2003-05-03 16:03:19 +00:00
Thomas Pfaff 2238537c36 * Makefile.in: Revert patch from 2003-04-17. 2003-04-30 22:18:24 +00:00
Christopher Faylor 6ef342e460 * profil.h (PROFADDR): Prevent overflow when text segments are larger than
256k.
* profil.c (profthr_func): Raise thread priority for more accurate sampling.
* path.cc (hash_path_name): Use ino_t as type.
2003-04-28 20:10:54 +00:00
Christopher Faylor 7d6d38aaec * errno.cc (_sys_nerr): Fix compile error erroneously checked in on 2003-04-23. 2003-04-27 03:09:17 +00:00
Corinna Vinschen f615d74b72 * include/netinet/ip.h: Include netinet/in_systm.h and netinet/in.h
to allow standalone usage (autoconf).
2003-04-25 08:32:30 +00:00
Christopher Faylor 5d9a7c875a * fork.cc: Change SLOW_PID_REUSE to NO_SLOW_PID_REUSE and invert ifdef sense
throughout.
2003-04-24 01:57:07 +00:00
Christopher Faylor 5f92bef8a8 fix typo 2003-04-23 01:54:17 +00:00
Christopher Faylor 0eaf24fead * select.cc (fhandler_pipe::ready_for_read): Assure that get_guard is called
for successful non-blocking pipe reads.
2003-04-23 01:27:51 +00:00
Corinna Vinschen e8a57b4fc7 * include/inttypes.h: New file.
* include/stdint.h: New file.
	* include/cygwin/in.h: Include stdint.h instead of sys/types.h.
	* include/cygwin/types.h: Include stdint.h.  Remove typedefs for
	intN_t and uintN_t since these are defined in stdint.h now.
2003-04-22 14:55:01 +00:00
Christopher Faylor 650dc784e5 Clarify number bump 2003-04-21 04:33:00 +00:00
Christopher Faylor 99b1a40dc1 * include/cygwin/version.h: Bump DLL major number to 5. Change DLL minor
number to 0.  Bump API minor number.
2003-04-21 04:31:06 +00:00
Corinna Vinschen beb5408583 * autoload.cc (CreateWindowStationA): Add.
(SetProcessWindowStation): Add.
2003-04-20 08:56:42 +00:00
Christopher Faylor 6b3bdf38e0 * wincap.h (wincaps:pty_needs_alloc_console): New element.
(wincapc:pty_needs_alloc_console): New function.
* wincap.cc: Add pty_needs_alloc_console throughout.
* fhandler_tty.cc (fhandler_tty_slave::open): Open an "invisible" console on
first pty allocation.
2003-04-20 01:36:15 +00:00
Christopher Faylor afa18d8a69 * fhandler_tty.cc (fhandler_tty_slave::open): Allocate a console whenever a pty
is allocated.
2003-04-19 02:04:55 +00:00
Christopher Faylor 4e0d877875 * Makefile.in: Use ${nostdlib} variable.
* fhandler_proc.cc (format_proc_cpuinfo): Change /proc/cpuinfo "vendor id"
string to "vendor_id" to conform with Linux systems.
2003-04-19 01:03:16 +00:00
Christopher Faylor 4e837e7368 * syscalls.cc (setsid): Don't call FreeConsole if ctty is already < 0. 2003-04-18 00:25:41 +00:00
Thomas Pfaff f3c1c54051 * Makefile.in: Add finline-functions optimization to CXXFLAGS.
* autoload.cc (LoadDLLprime): Rename std_dll_init to
_std_dll_init.
(std_dll_init): Remove name mangling prototype. Add attributes
used and noinline.
(wsock_init): Ditto.
Change wsock_init to _wsock_init in wsock32 and ws2_32
LoadDLLprime.
* exceptions.cc (unused_sig_wrapper): Remove prototype. Add
attributes used and noinline.
* pwdgrp.h ((pwdgrp (passwd *&)): Remove inline code.
(pwdgrp (__group32 *&)): Ditto.
* grp.cc (pwdgrp (passwd *&)): Outline constructor.
(pwdgrp (__group32 *&)): Ditto.
2003-04-17 20:05:15 +00:00
Thomas Pfaff a4cea44072 * thread.h (pthread::equal): New static method.
* thread.cc: Rename pthread_equal to pthread::equal throughout.
(pthread_equal): Use pthread::equal to compare threads ids.
2003-04-17 19:57:01 +00:00
Christopher Faylor c448f78fd5 * termios.cc (setspeed): New function.
(cfsetospeed): Use setspeed to set speed.
(cfsetispeed): Use setspeed to set speed.
* autoload.cc: Add load statement for UuidCreate, and UuidCreateSequential.
* cpuid.h: New file.
* cygwin.din: Export gethostid.
* fhandler_proc.cc (cpuid): Move to cpuid.h.
(can_set_flag): Move to cpuid.h.
* syscalls.cc (gethostid): New function.
* version.h: Bump DLL minor version number to 83.
2003-04-16 03:03:45 +00:00
Thomas Pfaff ffb576fbf2 Fix a race in pthread_rwlock caused by simultanoues unlock and cancelation.
* thread.h (pthread_rwlock::release): New method.
* thread.cc (pthread_rwlock::unlock): Use release to signal
waiting threads.
(pthread_rwlock::rdlock_cleanup): Signal waiting threads after a
cancelation.
(pthread_rwlock::wrlock_cleanup): Ditto.
2003-04-15 20:14:12 +00:00
Christopher Faylor b3acb772c0 * mkvers.sh: Prefix day with 0 in date only when day < 10. 2003-04-14 02:09:57 +00:00
Corinna Vinschen 2e23862a8a * security.cc (get_info_from_sd): New function.
(get_nt_attribute): Only call read_sd and get_info_from_sd.
	Return void.
	(get_file_attribute): Move sd error handling to get_info_from_sd.
	and symlink handling to fhandler_disk_file::fstat_helper.
	(get_nt_object_attribute): Only call read_sd and get_info_from_sd.
	Return void.
	(get_object_attribute): Remove symlink handling and simply return -1
	when ntsec is off.
	* fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): For
	symlinks set the attribute, call get_file_attribute to get the ids
	and return.  In the normal case call get_file_attribute with the
	addresses of the buffer ids and do not recheck if the file is a socket.
2003-04-11 09:38:07 +00:00
Christopher Faylor 73afb2abb0 * cygthread.cc (cygthread::stub): Initialize stack pointer earlier.
(cygthread::simplestub): Initialize stack pointer.
(cygthread::terminate_thread): Account for possibility that stack pointer has
not been set.  Issue warnings for unusual conditions.
2003-04-11 02:16:17 +00:00
Corinna Vinschen 2a1e8e117e * regex/regex.h: Define regoff_t as _off_t.
* regex/regex2.h: Ditto.
2003-04-10 19:49:30 +00:00
Corinna Vinschen ac5ec96137 * cygwin.din: Export wcscoll, wcswidth and wcwidth.
* include/cygwin/version.h: Bump API minor number.
2003-04-10 08:22:42 +00:00
Christopher Faylor e5d6d53590 * cygthread.h: Change 'avail' cygthread element to 'inuse' throughout.
* cygthread.cc: Ditto.
(cygthread::stub): Don't initialize already initialized events.
(cygthread::freerange): Don't create thread here.
(cygthread::cygthread): Create thread here.  Die if thread not created.
(cygthread::operator new): Simplify.  Just grab a thread structure from the
pool.  Don't try to start the thread.
(cygthread::terminate_thread): Don't close event handles.  Just reuse them.
Call MEM_RELEASE rather than MEM_DECOMMIT (from Joe Buehler).
2003-04-10 05:27:34 +00:00
Christopher Faylor ca81cd60ce * fhandler_console.cc (fhandler_console::read) Handle certain key up events, to
allow pasting accented characters and typing them using the "alt + numerics"
sequences.
* include/limits.h (IOV_MAX): Set to a number which is small enough to use in
an array.
2003-04-08 21:19:33 +00:00
Christopher Faylor 9dbe3289ee * cygthread.h (cygthread::avail): Make LONG for easier use with Interlocked*
functions.
* cygthread.cc (cygthread::init): Eliminate unneeded muto.
(cygthread::operator new): Don't lock.  Instead change use of avail variable
into tri-state: available (1), not available (-1), uninitialized (0).
(cygthread::terminate_thread): Set avail to uninitialized.
(cygthread::detach): Eliminate local 'avail'.  Always set avail to 1 unless
signalled.
* cygthread.cc (cygthread::operator new): Be more defensive when messing with
2003-04-04 18:52:11 +00:00
Christopher Faylor b410f1680f * cygthread.cc (operator new): Be more defensive when messing with threads that
are marked "unavailable".
2003-04-04 05:58:06 +00:00
Christopher Faylor a61bf8c369 * fhandler_console.cc (CONVERT_LIMIT): Use a size for the 21st century. 2003-04-03 14:05:30 +00:00
Corinna Vinschen d5292d66a4 * external.cc (check_ntsec): Return general ntsec state on NULL
filename.  Check wincap.is_security() additionally.
2003-04-03 08:18:43 +00:00
Christopher Faylor 1ce82d241f fix usage 2003-04-03 04:07:57 +00:00
Christopher Faylor 5a87c6163b * Makefile.in (EXTRA_OFILES): Remove debugging object. 2003-04-03 01:23:37 +00:00
Christopher Faylor d99c61760e * external.cc (check_ntsec): New function.
(cygwin_internal): Add CW_CHECK_NTSEC handling to call check_ntsec() from
applications.
* include/cygwin/version.h: Bump API minor number.
* include/sys/cygwin.h (cygwin_getinfo_types): Add CW_CHECK_NTSEC.
* cygthread.cc (cygthread::new): Add more defensive debugging.
2003-04-02 23:01:11 +00:00
Corinna Vinschen 2d388e433f * fhandler.cc (fhandler_base::fstat): Set the uid and gid fields
from the current effective ids.
	* fhandler_socket.cc (fhandler_socket::fstat): Keep the uid and gid set
	by fhandler_base::fstat.
	* security.cc (get_nt_attribute): Do not test wincap.has_security ().
	(get_nt_object_attribute): Ditto.
	(get_file_attribute): Add test for wincap.has_security ().
	(get_object_attribute): Ditto.
2003-04-01 17:17:46 +00:00
Corinna Vinschen 1727fba007 * dir.cc: Change __off32_t to _off_t and __off64_t to _off64_t
throughout.
	* fhandler.cc: Ditto.
	* fhandler.h: Ditto.
	* fhandler_clipboard.cc: Ditto.
	* fhandler_disk_file.cc: Ditto.
	* fhandler_dsp.cc: Ditto.
	* fhandler_floppy.cc: Ditto.
	* fhandler_mem.cc: Ditto.
	* fhandler_proc.cc: Ditto.
	* fhandler_process.cc: Ditto.
	* fhandler_random.cc: Ditto.
	* fhandler_registry.cc: Ditto.
	* fhandler_tape.cc: Ditto.
	* fhandler_termios.cc: Ditto.
	* fhandler_virtual.cc: Ditto.
	* fhandler_zero.cc: Ditto.
	* mmap.cc: Ditto.
	* pipe.cc: Ditto.
	* syscalls.cc: Ditto.
	* winsup.h: Ditto.
	* include/cygwin/stat.h: Ditto.
	* include/cygwin/types.h: Ditto.  Remove definition of __off32_t
	and __off64_t.
2003-04-01 16:11:41 +00:00
Christopher Faylor 333879e77b * exceptions.cc (setup_handler): Make sure winapi lock is released when exiting
loop.
2003-03-31 21:27:06 +00:00
Christopher Faylor a2105d9387 * include/cygwin/fs.h: Remove unneeded include.
* include/cygwin/in.h: Include sys/types.h rather than cygwin/types.h.
2003-03-30 17:28:52 +00:00
Corinna Vinschen 856a9750ba * syscalls.cc (login): Fix comment.
(logout): Ditto.
2003-03-29 13:15:55 +00:00
Corinna Vinschen 8304de2e34 * syscalls.cc: Slightly cleanup all utmp functions.
(login): Use mutex to secure against concurrent access to wtmp file.
	(logout): Rewrite using POSIX calls.
	(utmp_fd): Initialized to -1 now.  Any value < 0 is treated as closed
	in subsequent functions.
	(utmp_readonly): New variable, indicating utmp file open for reading
	only.
	(internal_setutent): New function implementing setutent().
	(setutent): Call internal_setutent now.
	(endutent): Reset utmp_readonly.
	(getutent): Return immediately if utmp file can't be opened.
	(getutid): Ditto.
	(getutline): Ditto.
	(pututline): Ditto. Use mutex to secure against concurrent access to
	utmp file.
2003-03-29 12:44:01 +00:00
Christopher Faylor 46c8214c77 * Makefile.in: Remove EXE_LDFLAGS. Fix fhandler_CFLAGS typo. Recognize .s
suffix.
* configure.in: Remove EXE_LDFLAGS.
* configure: Regenerate.
2003-03-29 04:20:45 +00:00
Christopher Faylor a7ab35c1bb * include/sys/cygwin.h: Declare cygwin_internal as unsigned long.
* external.cc (cygwin_internal): Define as unsigned long.
* include/sys/cygwin.h: Move cygwin_internal outside of WINVER conditional.
2003-03-28 14:21:40 +00:00
Thomas Pfaff eff6c00e19 * thread.cc: Change 1==foo equations to foo==1 throughout. 2003-03-27 19:57:06 +00:00
Thomas Pfaff 15648790f4 * thread.h: Change class names, methods, members and local vars
according to the GNU coding style.
* thread.cc: Ditto.
* dcrt0.cc (dll_crt0_1): Rename pthread::initMainThread call to
pthread::init_mainthread.
* pthread.cc (pthead_getsequence_np): Rename pthread::isGoodObject
call to pthread::is_good_object.
2003-03-27 19:52:20 +00:00
Corinna Vinschen 98b36ec8ed * autoload.cc: added RegGetKeySecurity()
* security.cc (get_nt_object_attribute): use RegGetKeySecurity() for
	performance.
2003-03-27 09:40:25 +00:00
Christopher Faylor 85738bf7e3 Joe Buehler <jhpb@draco.hekimian.com>
* fork.cc (fork_parent): Don't copy signals from parent to child here.
* sigproc.cc (proc_subproc): Copy signals from parent to child pinfo here.
2003-03-26 04:18:01 +00:00
Thomas Pfaff b2ee9a5565 *** empty log message *** 2003-03-23 10:56:19 +00:00
Thomas Pfaff 9306ba2ee4 * thread.h (class List): Move inline code inside class
declaration.
(List::forEach): Change callback parameter to template class
member functionpointer.
(pthread_keys::fixup_before_fork): Change to inline. Use
List::forEach to fixup keys.
(pthread_keys::fixup_after_fork): Ditto.
(pthread_keys::runAllDestructors): Ditto.
(pthread_key::saveAKey): Remove.
(pthread_key::restoreAKey): Ditto.
(pthread_key::destroyAKey): Ditto.
(pthread_key::run_destructor): Rename to runDestructor.
(pthread_mutex::fixup_after_fork): Change to inline. Use
List::forEach to fixup mutexes after a fork.
(pthread_mutex::FixupAfterFork): New method.
(pthread_mutex::mutexes): New member.
(pthread_cond::fixup_after_fork): Change to inline. Use
List::forEach to fixup conds after a fork.
(pthread_cond::FixupAfterFork): New method.
(pthread_cond::conds): New member.
(pthread_rwlock::fixup_after_fork): Change to inline. Use
List::forEach to fixup rwlocks after a fork.
(pthread_rwlock::FixupAfterFork): New method.
(pthread_rwlock::rwlocks): New member.
(semaphore::fixup_after_fork): Change to inline. Use
List::forEach to fixup mutexes after a fork.
(semaphore::FixupAfterFork): New method.
(semaphore::semaphores): New member.
(MTinterface::mutexs): Remove.
(MTinterface::conds): Ditto.
(MTinterface::rwlocks): Ditto.
(MTinterface::semaphores): Ditto.
(pthread_equal): Add extern "C".
(pthread_mutex_lock): Ditto.

* thread.cc (MTinterface::fixup_after_fork): Change
fixup_after_fork calls for pthread objects.
(semaphore::conds): Instantiate.
(pthread_cond::pthread_cond): Use List::Insert rather than
custom list code.
(pthread_cond::~pthread_cond): Use List::Remove rather than
custom list code.
(pthread_cond::fixup_after_fork): Rename to FixupAfterFork.
(pthread_rwlock::rwlocks): Instantiate.
(pthread_rwlock::pthread_crwlock): Use List::Insert rather than
custom list code.
(pthread_rwlock::~pthread_rwlock): Use List::Remove rather than
custom list code.
(pthread_rwlock::fixup_after_fork): Rename to FixupAfterFork.
(pthread_key::saveAKey): Remove.
(pthread_key::fixup_before_fork): Ditto.
(pthread_key::restoreAKey): Ditto.
(pthread_key::fixup_after_fork): Ditto.
(pthread_key::destroyAKey): Ditto.
(pthread_key::runAllDestructors): Ditto.
(pthread_key::run_destructor): Rename to runDestructor.
(pthread_mutex::mutexes): Instantiate.
(pthread_mutex::pthread_mutex): Use List::Insert rather than
custom list code.
(pthread_mutex::~pthread_mutex): Use List::Remove rather than
custom list code.
(pthread_mutex::fixup_after_fork): Rename to FixupAfterFork.
(semaphore::conds): Instantiate.
(semaphore::semaphore): Use List::Insert rather than custom list
code.
(semaphores::~semaphore): Use List::Remove rather than custom
list code.
(semaphore::fixup_after_fork): Rename to FixupAfterFork.
2003-03-23 10:52:02 +00:00
Christopher Faylor ff3ef36d88 * pipe.cc (fhandler_pipe::dup): Don't dup input_handle if it doesn't exist. 2003-03-22 18:30:58 +00:00
Christopher Faylor ca04f61fc7 * syscalls.cc (unlink): Be more defensive when SetFileAttributes is called.
Fix typo in debugging output.
2003-03-22 17:48:40 +00:00
Christopher Faylor 89e7a1ced9 * fork.cc: Conditionalize use of slow_pid_reuse throughout. It's not necessary
for newer versions of bash.
2003-03-22 01:45:18 +00:00
Corinna Vinschen fa85038b5f * fhandler_socket.cc (fhandler_socket::sendto): Restrict EPIPE and
SIGPIPE handling to connection oriented sockets.  Add comment.
2003-03-20 08:53:28 +00:00
Christopher Faylor 4da34970de * sigproc.h (signal_fixup_after_exec): Eliminate argument in declaration.
* exceptions.cc (signal_fixup_after_exec): Eliminate argument in definition.
Don't reset signal handlers after spawm.  Just treat like fork/exec.
* dcrt0.cc (dll_crt0_1): Don't pass PROC_SPAWN argument to
signal_fixup_after_exec.
* syscalls.cc (unlink): Don't change attributes of file if not readonly/system.
Ditto for resetting of arguments.
2003-03-20 01:34:53 +00:00
Corinna Vinschen 036ac6b3a2 * glob.c: Eliminate __INSIDE_CYGWIN__ preprocessor conditionals
throughout.
2003-03-19 21:38:25 +00:00