Commit Graph

247 Commits

Author SHA1 Message Date
Christopher Faylor a0ee9f7574 * include/sys/statfs.h: New header file. 2002-07-03 20:31:39 +00:00
Corinna Vinschen b7e51146bf * include/cygwin/version.h: Bump API minor version. 2002-07-02 09:40:07 +00:00
Christopher Faylor 109e482278 * winsup.h: Minor cleanup.
* path.h (path_conv::[]): New operator.
* syscalls.cc (_link): Use path_conv operators rather than methods, where
appropriate.  Minor white space cleanup.
* include/cygwin/version.h: Bump DLL minor number.
* dcrt0.cc (sm): Make NO_COPY.
2002-06-26 04:21:01 +00:00
Christopher Faylor 85b995d4f1 Use cygwin_{shm,ipc}.h instead of /sys/{shm,ipc}.h throughout.
* sys/ipc.h: Remove.
* sys/shm.h: Remove.
* cygwin_ipc.h: New file.
* cygwin_shm.h: New file.
2002-06-23 22:56:58 +00:00
Christopher Faylor 85a238e1e8 revert erroneous checkin 2002-06-10 19:59:19 +00:00
Christopher Faylor b01cbd5de2 * include/sys/strace.h (strace): Avoid use of constructor. 2002-06-10 19:58:21 +00:00
Robert Collins 007276b30e 2002-06-10 Robert Collins <rbtcollins@hotmail.com>
* cygwin.din: Add _pthread_cleanup_push and _pthread_cleanup_pop.
        * pthread.cc: Change __pthread_self to pthread::self() thruoghout.
        (_pthread_cleanup_push): New function.
        (_pthread_cleanup_pop): Ditto.
        * thread.cc: Thanks to Thomas Pfaff for the pthread cleanup_push,_pop
        patch, this work is derived from that.
        Change __pthread_self to pthread::self() thruoghout.
        (__pthread_self): Rename to pthread::self.
        (pthread::self): New method.
        (pthread::pthread): Initialize new member.
        (pthread::push_cleanup_handler): New method.
        (pthread::pop_cleanup_handler): New method.
        (pthread::pop_all_cleanup_handlers): New method.
        (__pthread_exit): Pop all cleanup handlers.
        * thread.h (pthread::push_cleanup_handler): Declare.
        (pthread::pop_cleanup_handler): Ditto.
        (pthread::pop_all_cleanup_handlers): Ditto.
        (pthread::self): New static method.
        (__pthread_exit): Give C++ linkage.
        (__pthread_join): Ditto.
        (__pthread_detach): Ditto.
        (__pthread_self): Remove.

2002-04-24  Thomas Pfaff  <tpfaff@gmx.net>

        * include/pthread.h (__pthread_cleanup_handler): New structure
        (pthread_cleanup_push): Rewritten .
        (pthread_cleanup_pop): Ditto.
        (_pthread_cleanup_push): New prototype.
        (_pthread_cleanup_pop) Ditto.

2002-04-24  Thomas Pfaff  <tpfaff@gmx.net>

        * thread.cc (thread_init_wrapper): Check if thread is already joined.
        (__pthread_join): Set joiner first.
        (__pthread_detach): Ditto.
2002-06-10 01:10:45 +00:00
Christopher Faylor 50484e8e36 * external.cc (cygwin_internal): Make v1 mount table access invalid.
* path.cc (mount_info::init): Remove had_to_create_mount_areas initialization.
(mount_info::from_registry): Remove v1 table import.
(mount_info::read_v1_mounts): Eliminate.
(mount_info::import_v1_mounts): Ditto.
* shared_info.h (mount_info): Ditto for both of above.
* sys/mount.h (MOUNT_DEVFS): New enum.
(MOUNT_PROC): Ditto.
2002-06-09 00:31:03 +00:00
Christopher Faylor 2e2dcba320 * include/wchar.h: Define __need_size_t. 2002-06-08 16:55:47 +00:00
Corinna Vinschen c4e6ff484c * fhandler.cc (fhandler_base::fstat): Initialise tv_nsec member of
st_atim, st_mtim, and st_ctim fields.
	* fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): Ditto.
	* fhandler_process.cc (fhandler_process::fstat): Ditto.
	* glob.c (stat32_to_STAT): Copy across the whole st_atim,
	st_mtime, and st_ctim fields.
	* syscalls.cc (stat64_to_stat32): Ditto.
	* times.cc (to_timestruc_t): New function.
	(time_as_timestruc_t): New function.
	* winsup.h: Add to_timestruc_t and time_as_timestruc_t functions.
	* include/cygwin/stat.h: Replace time_t with timestruc_t
	throughout for all file times, removing the st_spare1, st_spare2,
	and st_spare3 fields in the process. Add macros to access tv_sec
	fields by old names.
	* include/cygwin/types.h: Typedef timespec_t and timestruc_t as
	struct timespec.
2002-06-06 15:35:09 +00:00
Corinna Vinschen 31b98a623c * external.cc (cygwin_internal): Add CW_EXTRACT_DOMAIN_AND_USER
handling to call extract_nt_dom_user() from applications.
	* include/sys/cygwin.h (cygwin_getinfo_types): Add
	CW_EXTRACT_DOMAIN_AND_USER.
2002-06-03 17:56:10 +00:00
Corinna Vinschen b3c2973142 * syscalls.cc (stat64_to_stat32): Transform st_dev correctly.
(fstat64): Add evaluating st_ino and st_dev.
	(stat_worker): Evaluate st_dev as 32 bit value.
	* include/cygwin/stat.h: Use new dev_t definition throughout.
	* include/cygwin/types.h: Define __dev16_t and __dev32_t.  Define
	dev_t according to __CYGWIN_USE_BIG_TYPES__ setting.
	* include/sys/sysmacros.h: Define major, minor and makedev
	according to __CYGWIN_USE_BIG_TYPES__ setting.
2002-06-03 17:44:09 +00:00
Christopher Faylor 186637a508 * include/sys/cygwin.h (EXTERNAL_PINFO_VERSION): Reinstate.
* external.cc (fillout_pinfo): Use it.
2002-05-29 21:00:55 +00:00
Corinna Vinschen 3a571063b3 * external.cc (fillout_pinfo): Use new version define.
* include/sys/cygwin.h (external_pinfo): Define
	EXTERNAL_PINFO_VERSION_16_BIT and EXTERNAL_PINFO_VERSION_32_BIT
	instead of just EXTERNAL_PINFO_VERSION.
2002-05-29 20:07:54 +00:00
Christopher Faylor 9fef0139c2 * external.cc (fillout_pinfo): Set new version field in external_pinfo
structure.
* include/sys/cygwin.h (external_pinfo): Replace strace_file with version
field.
2002-05-29 17:12:07 +00:00
Corinna Vinschen a8d7ae61e7 Change internal uid datatype from __uid16_t to __uid32_t
throughout.
	* cygwin.din: Export new symbols getpwuid32, getpwuid_r32, getuid32,
	geteuid32, setuid32, seteuid32.
	* passwd.cc (getpwuid32): New function.
	(getpwuid_r32): Ditto.
	* syscalls.cc (seteuid32): Ditto.
	(setuid32): Ditto.
	* uinfo.cc (getuid32): Ditto.
	(geteuid32): Ditto.
	* winsup.h (uid16touid32): New macro, correclt casting from __uid16_t
	to __uid32_t.
	(gid16togid32): Ditto fir gids.
	(getuid32): Declare.
	(geteuid32): Ditto.
	(getpwuid32): Ditto.
	* include/sys/cygwin.h (struct external_pinfo): Add members uid32 and
	gid32.
2002-05-29 15:04:29 +00:00
Corinna Vinschen 9854c44c43 * include/cygwin/socket.h: Protect some symbols against multiple
definition.
	* include/netinet/ip.h: Ditto.
	* include/netinet/tcp.h: Ditto.

	* include/netinet/ip.h: Replace by BSD derived version of the file.
	* include/netinet/tcp.h: Ditto.
	* include/netinet/udp.h: New file.
	* include/cygwin/ip.h: Remove.
2002-05-29 07:38:54 +00:00
Corinna Vinschen 7ea70e9970 * security.cc (set_security_attribute): Call getegid32() instead of
getegid().
	* include/cygwin/grp.h: Declare getegid32().
2002-05-28 14:58:13 +00:00
Corinna Vinschen 5719640581 Change internal gid datatype from __gid16_t to __gid32_t
throughout.
	* cygwin.din: Export new symbols chown32, fchown32, getegid32,
	getgid32, getgrgid32, getgrnam32, getgroups32, initgroups32, lchown32,
	setgid32, setegid32, getgrent32.
	* grp.cc (grp32togrp16): New static function.
	(getgrgid32): New function.
	(getgrnam32): Ditto.
	(getgrent32): Ditto.
	(getgroups32): Change name of internal function from getgroups.
	(getgroups32): New function.
	(initgroups32): Ditto.
	* syscalls.cc (chown32): Ditto.
	(lchown32): Ditto.
	(fchown32): Ditto.
	(setegid32): Ditto.
	(setgid32): Ditto.
	* uinfo.cc (getgid32): Ditto.
	(getegid32): Ditto.
	* include/cygwin/grp.h: Remove declaration of getgrgid() and getgrnam().
	Declare getgrgid32() and getgrnam32() instead.  Declare getgid32().
2002-05-28 14:10:55 +00:00
Corinna Vinschen 1d2b71d6a3 * include/cygwin/types.h: Revert previous patch. 2002-05-22 12:47:54 +00:00
Corinna Vinschen 36f86a5537 * include/cygwin/types.h: Define pthread stuff only if _POSIX_THREADS
is defined.
2002-05-22 10:33:39 +00:00
Christopher Faylor feb7f1a97d * cygwin.din: Add strlcat and strlcpy.
* include/cygwin/version.h: Increment API minor version number.
2002-05-13 19:53:46 +00:00
Christopher Faylor 29ee580d07 * fhandler.h (executable_states): For now, make dont_care_if_executable
equivalent to not_executable.
* sys/mount.h: Define MOUNT_NOTEXEC.
* path.h (fs_info): New class.
(path_conv): Move fs-specific fields to new 'fs' structure.
(path_conv::update_fs_info): Move to fs_info and rename to just 'update'.
* path.cc (fs_info::update): Ditto.  Return 'true' if successful.
(fillout_mntent): Add ',noexec' to list of reported options.
2002-05-12 03:08:59 +00:00
Christopher Faylor fee93846d6 * include/cygwin/types.h: Include <sys/sysmacros.h>. 2002-05-01 20:26:33 +00:00
Christopher Faylor dbe67a8103 * cygwin.din: Add strptime.
* include/cygwin/version.h: Increment API version number.
2002-04-09 23:47:26 +00:00
Christopher Faylor ca17537785 * pinfo.cc (pinfo::init): Use PID_ALLPIDS flag to control when a redirected
block should be marked as nonexistent.
(winpids::add): Use PID_ALLPIDS when looking for all pids.
* cygwin.h (PID_ALLPIDS): New enum element.
2002-03-15 21:49:12 +00:00
Corinna Vinschen 2f26318784 * glob.c (stat32_to_STAT): New function.
(g_lstat): Call user space functions always with 32 bit struct stat
	as a workaround.
	(g_stat): Ditto.
	* include/glob.h (struct glob): Don't prototype function pointers
	when compiling Cygwin.
2002-03-15 10:12:31 +00:00
Christopher Faylor 73ea29f42c whitespace cleanup, update copyright 2002-03-13 02:34:05 +00:00
Christopher Faylor 1f77d71b4c remove erroneous part of comment 2002-03-12 03:36:01 +00:00
Robert Collins 241a7c5a8c 2002-03-05 Robert Collins <rbtcollins@hotmail.com>
* cygserver_transport_pipes.cc (transport_layer_pipes::transport_layer_pipes):
        Always init - until static members work correctly.
        * shm.cc (shmget): Initialize the security descriptor - thanks Corinna!
        * include/sys/ipc.h: Make the ipc control constants partitioned off from the sem
        control constants.
2002-03-05 12:58:24 +00:00
Corinna Vinschen ad2864f4c8 * include/sys/termios.h: Define _POSIX_VDISABLE. Define CCEQ macro.
* fhandler_termios.cc: Include <sys/termios.h>.
	(line_edit): Recognize disabled c_cc[] chars.  Ignore VDISCARD when
	not in ICANON mode.
2002-03-05 08:15:28 +00:00
Robert Collins f449bfef40 2002-02-28 Robert Collins <rbtcollins@hotmail.com>
* Merged cygwin_daemon into head minus the new shm and ipc exports.

2002-02-28  Robert Collins  <rbtcollins@hotmail.com>

	* fhandler_tty.cc (fhandler_tty_slave::open): More debugging.
	(fhandler_tty_slave::read): Fix printf type for the handle.
	* tty.cc (tty::common_init): Add a FIXME for security.

2002-01-29  Robert Collins  <rbtcollins@hotmail.com>

	* Makefile.in (OBJS): Remove duplicate localtime.o.

2002-01-17  Robert Collins  <rbtcollins@hotmail.com>

	* cygserver.cc (check_and_dup_handle): Consolidate the two variants for
	simplicity.
	Add Some basic debug output.
	(client_request_attach_tty::serve): Use the new debug_printf for clarity.
	Mark the duplicated handles as inheritable - fixup_after_fork() doesn't reopen
	tty's.

2002-01-16  Robert Collins  <rbtcollins@hotmail.com>

	* cygserver.cc (transport): Correct scope.
	(client_request_attach_tty::serve): Add more debug information.
	Fix erroneous use of transport instead of conn.
	* cygserver_transport_pipes.cc (transport_layer_pipes::close): More debug.
	(transport_layer_pipes::read): Ditto.
	(transport_layer_pipes::write): Ditto.
	(transport_layer_pipes::impersonate_client): Ditto.

Mon Oct  8  7:41:00 2001  Robert Collins <rbtcollins@hotmail.com>

	* cygserver.cc (server_request::process): Rename client_request_shm_get to
	client_request_shm.
	* cygserver_process.cc (process_cache::add): Rename to add_task.
	Use process_cleanup instead of process_request.
	(process_cache::remove_process): New method.
	(process::process): Initialize new members.
	(process::~process): New member.
	(process::cleanup): New method.
	(process::add_cleanup_routine): New method.
	(process_request::process): Rename to process_cleanup.
	Call the process object's cleanup method and then delete it.
	(process_process_param::request_loop): Remove the signalling process.
	* cygserver_shm.cc: Globally rename client_request_shm_get to client_request_shm.
	(client_request_shm_get::serve): Handle attach request counting.
	* cygserver_shm.h: Globally rename client_request_shm_get to client_request_shm.
	(class shm_cleanup): New class.
	* shm.cc: Globally rename client_request_shm_get to client_request_shm.
	(client_request_shm::client_request_shm): New constructor for attach requests.
	(shmat): Use it.
	* include/cygwin/cygserver_process.h (class process_request): Rename to
	process_cleanup.
	(class cleanup_routine): New class.
	(class process): New members and methods to allow calling back when the process
	terminates.

Thu Oct  4 14:12:00 2001  Robert Collins <rbtcollins@hotmail.com>
	* cygserver.cc (request_loop): Make static.
	(main): Use new cache constructor syntax.
	Start cache worker threads.
	Cleanup the cache at shutdown.
	* cygserver_process.cc: Run indent.
	(process_cache::process_cache): Add a trigger to use when adding a process.
	(process_cache::process): Move process_entry to process.
	Insert at the end of the list.
	Trigger the request loop when new process's inserted.
	(process_cache::process_requests): Do it.
	(process_cache::add): New method.
	(process_cache::handle_snapshot): New method.
	(process::process): Merge in the process_entry fields.
	(process::handle): Make a stub function.
	(process::exit_code): New method.
	(process_request::process): New method.
	(process_process_param::request_loop): New method.
	* cygserver_shm.cc: New header dependency - threaded_queue.h.
	* threaded_queue.cc (threaded_queue::cleanup): Clearer messages.
	(queue_process_param::stop): Short spinlock on interruptible threads.
	* threaded_queue.h (class threaded_queue): New constructor.
	* include/cygwin/cygserver_process.h (process_request): New class.
	(process_entry): Remove.
	(process): Merge in process_entry.
	(process_cache): Inherit from threaded_queue.

Tue Oct  2 23:24:00 2001  Robert Collins <rbtcollins@hotmail.com>

	* cygserver.cc (class server_process_param): Use new constructor syntax.
	* cygserver_process.cc (process_cache::~process_cache): New function.
	* threaded_queue.cc: Define condition debug_printf.
	Run indent.
	(threaded_queue::cleanup): Move queue_process_param guts to a method.
	(threaded_queue::process_requests): Ditto.
	(queue_process_param::queue_process_param): New method.
	(queue_process_param::~queue_process_param): Ditto.
	(queue_process_param::start): Ditto.
	(queue_process_param::stop): Ditto.
	* threaded_queue.h (class queue_process_param): Add support for
	interruptible request loops.
	* cygwin/include/cygwin/cygserver_process.h (class process_cache): Add
	destructor.

Tue Oct  2 23:24:00 2001  Robert Collins <rbtcollins@hotmail.com>

	* cygserver_client.cc: New flag allow_daemon to disable the daemon completely.
	(cygserver_request): Check it.
	(cygserver_init): Ditto.
	* environ.cc (parse_thing): Add (no)daemon option.

Tue Oct  2 23:00:00 2001  Robert Collins <rbtcollins@hotmail.com>

	* shm.cc: Update to handle include changes from HEAD.

Tue Oct  2 16:06:00 2001  Robert Collins <rbtcollins@hotmail.com>

	* Makefile.in: Remove cygserver_shm.o from cygwin1.dll.
	Rename cygserver_shm_outside.o to cygserver_shm.o.
	* cygserver.cc (server_request::process): Use the new client_request
	constructor.
	* cygserver_client.cc: Remove the #ifdef's stubs for the server method
	within cygwin.
	(client_request_attach_tty::client_request_attach_tty): Use the new
	client_request constructor.
	(client_request_shutdown::client_request_shutdown): Ditto.
	(client_request::client_request): Ditto.
	* cygserver_shm.cc (client_request_shm_get::serve): Remove the
	#ifdef'd stub for in-cygwin builds.
	(client_request_shm_get::client_request_shm_get): Use the new
	client_request constructor, and remove the in-cygwin variants.
	* cygserver_shm.h (class client_request_shm_get): #ifndef test the
	serve method - it's only used in cygserver.
	* shm.cc (client_request_shm_get::client_request_shm_get): New function.
	* include/cygwin/cygserver.h (request_header): New constructor.
	(class client_request): Use it.
	New constructor accepting the header size.
	#ifndef test the server method - it's only used within cygserver.
	(client_request_get_version): #ifdef test the server method.
	(client_request_shutdown): Ditto.
	(client_request_attach_tty): Ditto.

Tue Oct  2  9:57:00 2001  Robert Collins <rbtcollins@hotmail.com>

	* Makefile.in: add threaded_queue.o to cygserver.exe.
	* cygserver.cc: Include threaded_queue.h
	(class server_request): Inherit from queue_request.
	(class server_process_param): Inherit from queue_process_param.
	(class server_request_queue): Inherit from threaded_queue.
	(request_loop): Adjust for new types.
	(server_request_queue::process_requests): Remove guts to
	threaded_queue::process_requests.
	(server_request::server_request): Adjust for new types.
	(worker_function): Delete.
	(server_request_queue::create_workers): Delete.
	(server_request_queue::cleanup): Delete.
	(server_request_queue::add): Move guts to threaded_queue::add.
	* threaded_queue.cc: New file.
	* threaded_queue.h: New file.

Mon Oct  1 12:38:00 2001  Robert Collins <rbtcollins@hotmail.com>

	* cygserver.cc (client_request::serve): New function.
	* cygserver_process.cc: Inlude <pthread.h> for pthread_once.
	(process_cache::process_cache): Initialise a crtiical section for write access.
	(process_cache::process): Use the critical section. Also add missing entries to
	the cache.
	(do_process_init): New function to initalise class process static variables.
	(process::process): Ensure that the process access critical section is
	initialised.
	(process::handle): Close the handle of old process's when they have terminated
	and we are returning the handle for a process with the same pid.
	* cygserver_shm.cc: Run indent.
	Include cygserver_process.h to allow process cache functionality.
	(client_request_shm_get::serve): New parameter for process cache support.
	Use the process cache, not OpenProcess to get a handle to the originating process.
	Fix a handle leak with token_handle.
	* cygserver_shm.h (class client_request_shm_get): Update ::serve for process
	cache support.
	* cygserver_transport_pipes.cc: Redefine debug_printf to be conditional on DEBUG.
	* include/cygwin/cygserver.h: Do not implement client_request::serve in the
	header.
	* include/cygwin/cygserver_process.h (class process_cache): Add a write access
	critical section to prevent races when requests from a  multithreaded
	application arrive.

Sun Sep 30 23:41:00 2001  Robert Collins <rbtcollins@hotmail.com>

	* Makefile.in: Add cygserver_process.o to cygserver.exe.
	* cygserver.cc: Include signal.h and cygwin_version.h.
	Define debug_printf as a macro.
	Define DEBUG to a value.
	(client_request_attach_tty::serve): Add beginning of process cache support.
	Change from #ifdef DEBUG to work with new DEBUG style.
	(client_request_get_version::serve): Add beginning of process cache support.
	(class server_request): New prototype for support of process cache.
	(class queue_process_param): New class to allow request loop threading.
	(class server_request_queue): Add beginning of process cache support.
	Allow request loop threading.
	(request_loop): Thread function for request loops.
	(server_request_queue::process_requests): Initiator for threaded request loops.
	(client_request_shutdown::serve): Add beginning of process cache support.
	(server_request::server_request): Ditto.
	(server_request::process): Use debug_printf. Add beginning of process cache
	support.
	(server_request_queue::cleanup): Kill off any request loop threads.
	(server_request_queue::add): Add beginning of process cache support.
	(handle_signal): Trigger a shutdown.
	(main): Print out some useful info at startup - version, date time.
	Add process cache support.
	Spawn a separate thread for the transport request loop, thus allowing concurrent
	support for multiple transports.
	* cygserver_client.cc (client_request_get_version::serve): Add process cache
	support.
	(client_request_attach_tty::serve): Add process cache support.
	(client_request_shutdown::serve): Add process cache support.
	* cygsserver_process.cc: New file with the process cache support.
	* cygserver_shm.cc: Redefine debug_printf to allow conditional output.
	* cygwin.din: Export shmdt().
	* shm.cc: Run indent.
	Update FIXME's.
	(shmdt): New function.
	* include/cygwin/cygserver.h (class client_request): Add process cache support.
	(class client_request_get_version): Ditto.
	(class client_request_shutdown): Ditto.
	(class client_request_attach_tty): Ditto.
	* include/cygwin/cygserver_process.h: New header for process cache support.

Sun Sep 30  8:52:00 2001  Robert Collins <rbtcollins@hotmail.com>

	* include/cygwin/cygserver_transport.h: Add copyright header.
	* include/cygwin/cygserver_transport_pipes.h: Ditto.
	* include/cygwin/cygserver_transport_sockets.h: Ditto.

Sat Sep 29 20:40:00 2001  Robert Collins <rbtcollins@hotmail.com>

	* Makefile.in: Add cygserver_transport_sockets.o to DLL_OFILES.
	Add cygserver_transport_sockets_outside.o to cygserver.exe.
	* cygserver.cc: Include new include files.
	* cygserver_client.cc: Ditto.
	* cygserver_shm.h: No need to include <sys/socket.h> now.
	* cygerver_transport.cc: Include new include files.
	(transport_layer_base::transport_layer_base): Strip back to a stub.
	(transport_layer_base::listen): Ditto.
	(transport_layer_base::accept): Ditto.
	(transport_layer_base::close): Ditto.
	(transport_layer_base::read): Ditto.
	(transport_layer_base::write): Ditto.
	(transport_layer_base::connect): Ditto.
	* cygserver_transport_pipes.cc: Include new header
	"cygwin/cygserver_transport_pipes.h".
	* cygserver_transport_sockets.cc: New file.
	* dcrt0.cc: No need to include <sys/socket.h> now.
	* fhandler_tty.cc: Ditto.
	* tty.cc: Ditto.
	* include/cygwin/cygserver_transport.h: Strip the base class to a stub.
	Remove the cygserver_transport_pipes class.
	* include/cygwin/cygserver_transport_pipes.h: New file.
	* include/cygwin/cygserver_transport_sockets.h: New file.

Tue Sep 25 16:22:00 2001  Robert Collins <rbtcollins@hotmail.com>

	* autoload.cc: Add dynamic load statement for 'ImpersonateNamedPipeClient'.
	* Makefile.in: Add new object files, and build instructions for cygserver.exe.
	* cygwin.din: Export ftok, shmat, shmctl and shmget.
	* dcrt0.cc: Additional includes for cygserver support.
	(dll_crt0_1): Initialise the cygserver client.
	* fhandler.h (fhandler_tty): New method cygserver_attach_tty.
	* fhandler_tty.cc: Additional includes for cygserver support.
	(fhandler_tty_slave::open): Attempt to use the cygserver when obtaining
	handles from the parent process. On failure or 9x use the current method.
	(fhandler_tty_slave::cygserver_attach_tty): New function.
	* fork.cc (fork_child): Fixup shm memory mapped areas.
	* pinfo.h: Declare fixup_shms_after_fork().
	* security.h: Declare alloc_sd().
	* tty.cc: Additonal includes to support cygserver.
	(tty::common_init): Don't allow others to open us if the cygserver is running.
	* winsup.h: Declare cygserver_running.
	* cygserver.cc: New file.
	* cygserver_client.cc: New file.
	* cygserver_shm.cc: New file.
	* cygserver_shm.h: New file.
	* cygserver_transport.cc: New file.
	* cygserver_transport_pipes.cc: New file.
	* ipc.cc: New file.
	* shm.cc: New file.
	* include/cygwin/cygserver.h: New file.
	* include/cygwin/cygserver_transport.h: New file.
	* include/sys/ipc.h: New file.
	* include/sys/shm.h: New file.

2002-02-28  Robert Collins  <rbtcollins@hotmail.com>

	* thread.cc (semaphore::TryWait): Set errno as required by posix 1003.1.
	(__sem_wait): Ditto.
	(__sem_trywait): Ditto.
2002-02-28 14:30:38 +00:00
Christopher Faylor d1f50ae546 * include/cygwin/version.h: Bump DLL minor number. 2002-02-27 23:06:55 +00:00
Corinna Vinschen acb5617538 * cygwin.din (fstat64): New symbol.
(ftruncate64): Ditto.
	(lseek64): Ditto.
	(lstat64): Ditto.
	(mmap64): Ditto.
	(seekdir64): Ditto.
	(stat64): Ditto.
	(telldir64): Ditto.
	(truncate64): Ditto.
	* dir.cc (telldir64): New function.
	(telldir): Call telldir64().
	(seekdir64): New function.
	(seekdir): Call seekdir64().
	* fhandler.h: Redefine all methods using __off32_t to use __off64_t.
	* fhandler.cc: Use __off64_t and struct __stat64 throughout.
	* fhandler_clipboard.cc: Ditto.
	* fhandler_disk_file.cc: Ditto.
	* fhandler_dsp.cc: Ditto.
	* fhandler_floppy.cc: Ditto.
	* fhandler_mem.cc: Ditto.
	* fhandler_random.cc: Ditto.
	* fhandler_socket.cc: Ditto.
	* fhandler_tape.cc: Ditto.
	* fhandler_zero.cc: Ditto.
	* pipe.cc: Ditto.
	* glob.c: Ditto, call lstat64 and stat64 in Cygwin.
	* mmap.cc: Use __off64_t throughout.
	(mmap64): New function.
	* sec_acl.cc (acl_worker): Use struct __stat64, call stat64 and lstat64.
	* syscalls.cc (lseek64): New function.
	(stat64_to_stat32): Ditto.
	(fstat64): Ditto.
	(stat64): Ditto.
	(lstat64): Ditto.
	(ftruncate64): Ditto.
	(truncate64): Ditto.
	(_fstat): Call fstat64.
	(_stat): Call stat64.
	(cygwin_lstat): Rename to avoid declaration problem.  Call lstat64.
	(stat_worker): Use struct __stat64.
	(access): Ditto.
	(ftruncate): Call ftruncate64.
	(truncate): Call truncate64.
	* wincap.cc: Set flag has_64bit_file_access appropriately.
	* wincap.h: Add flag has_64bit_file_access.
	* winsup.h (ILLEGAL_SEEK): Define as __off64_t.
	(stat_dev): Declare using struct __stat64.
	(stat_worker): Ditto.
	* include/cygwin/stat.h (struct __stat32): Define if compiling Cygwin.
	(struct __stat64): Ditto.
	(struct stat): Revert definition with explicitly sized datatypes.
	Eliminate sized field names.
	* include/cygwin/types.h (blksize_t): New type.
	(__blkcnt32_t): Ditto.
	(__blkcnt64_t): Ditto.
	(blkcnt_t): Ditto.
2002-02-25 17:47:51 +00:00
Christopher Faylor 3d45652083 * include/sys/cygwin.h (cygwin_getinfo_types): New CW_STRACE_ACTIVE.
* external.cc (cygwin_internal): Handle CW_STRACE_ACTIVE.
2002-02-14 21:31:23 +00:00
Christopher Faylor 907dc7d0c9 * exceptions.cc (unused_sig_wrapper): Eliminate unused parameter to asm.
* external.cc (cygwin_internal): Change CW_STRACE_ON to CW_STRACE_TOGGLE.
* strace.cc (strace::hello): Toggle strace on and off.
* sync.cc (muto::init): Renamed from constructor.
* sync.h (muto::new): Delete.
(muto::delete): Ditto.
(new_muto): Simplify.  Use muto.init for nearly everything.
* uinfo.cc (uinfo_init): Avoid closing a NULL handle.
* include/sys/cygwin.h (cygwin_getinfo_types): Rename CW_STRACE_OFF to
CW_STRACE_TOGGLE.  Delete CW_STRACE_OFF.
* include/sys/strace.h (strace): Add "inited" field.
2002-02-14 21:20:06 +00:00
Corinna Vinschen 4753a17b28 * include/cygwin/acl.h: Fix definition of aclent_t. 2002-02-12 21:21:32 +00:00
Corinna Vinschen b31c68c447 * child_info.h, cygheap.h, fhandler_clipboard.cc, fhandler_dsp.cc,
fhandler_floppy.cc, fhandler_mem.cc, fhandler_random.cc,
	fhandler_tape.cc, fhandler_zero.cc, grp.cc, mmap.cc, passwd.cc,
	pinfo.cc, pinfo.h, pipe.cc, sec_acl.cc, sec_helper.cc, security.cc,
	security.h, thread.h, uinfo.cc, include/cygwin/acl.h: Fix copyright.
2002-02-10 13:50:13 +00:00
Corinna Vinschen de4e0d3001 * (child_info.h, cygheap.h, dcrt0.cc, dir.cc, fhandler.cc, fhandler.h,
fhandler_clipboard.cc, fhandler_disk_file.cc, fhandler_dsp.cc,
	fhandler_floppy.cc, fhandler_mem.cc, fhandler_random.cc,
	fhandler_tape.cc, fhandler_zero.cc, grp.cc, mmap.cc, passwd.cc,
	pinfo.cc, pinfo.h, pipe.cc, sec_acl.cc, sec_helper.cc, security.cc,
	security.h, spawn.cc, syscalls.cc, thread.h, uinfo.cc, winsup.h):
	Change usage of uid_t to __uid16_t, gid_t to __gid16_t and
	off_t to __off32_t throughout.  Use INVALID_UID, INVALID_GID and
	INVALID_SEEK instead casting -1 to the appropriate type.
	* winsup.h: Define INVALID_UID, INVALID_GID and INVALID_SEEK.
	* include/cygwin/acl.h: Define internal __aclent16_t and __aclent32_t
	types.  Don't declare acl functions when compiling Cygwin.
	* include/cygwin/grp.h: Declare getgrgid() and getgrnam() with
	correct types for internal usage.
2002-02-10 13:38:51 +00:00
Corinna Vinschen 52296b850c * include/cygwin/grp.h: New file.
* include/cygwin/stat.h: Ditto.
	* include/cygwin/types.h: Add definitions for __off32_t,
	__off64_t, off_t, __uid16_t, __uid32_t, uid_t, __gid16_t,
	__gid32_t and gid_t.
	* include/sys/cygwin.h: Use correct uid and gid types.
2002-02-09 20:39:55 +00:00
Christopher Faylor 494a66d9c5 * external.cc (cygwin_internal): Initialize various internal settings if
required to allow use of some things from user loaded DLL.
(CW_STRACE_ON): Add new feature.
(CW_CYGWIN_PID_TO_WINPID): Ditto.
* pinfo.cc (set_myself): Call "strace.hello" to initiate possible strace
session.
(pinfo::init): Guard against dereferencing uninitialized myself.
* sigproc.cc (wait_sig): Call strace.hello() when __SIGTRACE "signal" received.
* strace.cc (strace::hello): New method.
* wincap.cc (wincapc::init): Avoid initializing if already initialized.
* wincap.h (wincapc::wincapc): New method.
* include/sys/cygwin.h: Add new CW_ enums.  Kludge typedefs of {g,u}id_t if
required.
* strace.h (strace::hello): Declare new method.
2002-01-29 02:02:03 +00:00
Christopher Faylor 6616e6cf76 * include/sys/strace.h (_STRACE_ON): Define.
(_STRACE_OFF): Ditto.
2002-01-28 18:03:40 +00:00
Christopher Faylor 0ac2abea6c * include/cygwin/version.h: Bump DLL minor number. 2002-01-21 20:55:59 +00:00
Christopher Faylor 07cc1f1fd8 * include/cygwin/version.h: Bump DLL minor number. 2002-01-21 03:36:16 +00:00
Christopher Faylor 5946622e72 * include/cygwin/version.h: Bump DLL minor number. 2002-01-19 23:06:28 +00:00
Corinna Vinschen df3af7731e * include/cygwin/version.h: Bump API minor version to 51. 2002-01-19 16:17:59 +00:00
Corinna Vinschen 7d6be0d616 * cygwin.din: Add recvmsg and sendmsg.
* net.cc: Add cygwin_recvmsg and cygwin_sendmsg.
        * /usr/include/sys/socket.h: Add recvmsg and sendmsg.
2002-01-19 16:11:00 +00:00
Corinna Vinschen 104c3be681 * Makefile.in: Add fnmatch.o to DLL_OFILES.
* cygwin.din: Add fnmatch export symbol.
	* fnmatch.c: New file.
	* include/fnmatch.h: Ditto.
	* include/cygwin/version.h: Bump API minor version to 50.
2002-01-17 10:39:37 +00:00
Christopher Faylor 33ad2bf9d1 Add copyright stuff 2002-01-13 20:03:03 +00:00
Corinna Vinschen d6154fb758 * ioctl.cc (ioctl): Make third argument optional.
* include/sys/ioctl.h: Ditto in declaration.
	* dtable.cc (dtable::init_std_file_from_handle): Revert previous
	bogus patch.
	* window.cc (WndProc): Raise SIGURG instead of SIGIO in case of FD_OOB
	message.
2002-01-06 09:28:13 +00:00
Christopher Faylor 6d218bb5c6 * include/getopt.h: Fix define. 2001-12-31 04:00:07 +00:00
Corinna Vinschen 971ec8d310 * cygwin.din: Add symbols for endutent(), getutent(), getutid(),
getutline(), setutent() and utmpname().
	* syscalls.cc (setutent): New function.
	(endutent): Ditto.
	(utmpname): Ditto.
	(getutent): Ditto.
	(getutid): Ditto.
	(getutline): Ditto.
	* include/cygwin/version.h: Bump API minor version.
2001-12-28 15:53:27 +00:00
Christopher Faylor dcd8b9be82 * include/getopt.h: Protect a declaratin. 2001-12-26 17:48:44 +00:00
Christopher Faylor 77f4a25028 * Makefile.in: Autogenerate some header files which provide magic numbers.
Force dependencies for files which depend on autogenerated headers to ensure
that they are always built.
* child_info.h (child_info): Add new fields to accommodate new magic number
header stuff.
* dcrt0.cc: Rely on "child_info_magic.h" to ensure that correct child_info
magic numbers are used.
(dll_crt0_1): Temporarily remove _cygwin_testing_magic test.
(_dll_crt0): Do more testing on magic numbers from fork_info structure.  Call
"multiple_cygwin_problem" where appropriate.
(multiple_cygwin_problem): Rename from multiple_cygwin_die.  Issue a warning or
die, as appropriate based on cygwin version/magic number mismatch.
* pinfo.cc (pinfo::exit): Don't attempt to dereference `this' if it doesn't
exist.  This can happen when a fatal error occurs early in process
initialization.
* shared.cc: Rely on "shared_info_magic.h" to accommodate that new magic number
header stuff.
(shared_info::initialize): Use new magic number stuff, for shared region.
(memory_init): Ditto, for mount table.
* shared_info.h: Accomodate new magic number stuff for shared region and mount
table.
* sigproc.cc: Rely on "child_info_magic.h" to accommodate new magic number
header stuff.
(init_child_info): Initialize new fields in child_info) to accomodate magic
numbers.
* winsup.h: Rename multiple_cygwin_die to multiple_cygwin_problem.
* include/cygwin/version.h: Define macros for manipulating version magic.
* cygmagic: New shell script for generating magic numbers.
2001-12-26 04:53:34 +00:00
Christopher Faylor 4f235c9559 * include/cygwin/version.h: Bump API minor version for below changes. 2001-12-20 18:54:30 +00:00
Christopher Faylor 4b31ae795b Fix up comments. 2001-12-19 20:10:03 +00:00
Corinna Vinschen 6d114a5dea * include/getopt.h: Don't define getopt_long() and friends when
included through unistd.h.
2001-12-17 21:34:59 +00:00
Christopher Faylor a318eb217d * include/limits.h: Define LLONG_MIN, LLONG_MAX, ULLONG_MAX. 2001-12-17 01:41:07 +00:00
Christopher Faylor 9b02812029 * include/getopt.h: Add HAVE_DECL_GETOPT to save pain elsewhere. 2001-12-11 22:22:43 +00:00
Christopher Faylor cf77faefc8 whitespace cleanup 2001-12-10 03:35:54 +00:00
Christopher Faylor 2a50e3df6f * path.cc (mount_info::conv_to_win32_path): Avoid returning error if cygdrive
== '/'.
(mount_info::cygdrive_win32_path): Return 0 if invalid cygdrive path.
2001-12-03 16:47:18 +00:00
Egor Duda f38ac9b70c * include/pthread.h (PTHREAD_COND_INITIALIZER): Define.
* thread.cc (__pthread_cond_destroy): Add support for
PTHREAD_COND_INITIALIZER.
(__pthread_cond_init): Ditto.
(__pthread_cond_broadcast): Ditto.
(__pthread_cond_signal): Ditto.
(__pthread_cond_dowait): Ditto.
(__pthread_mutex_init): Handle PTHREAD_MUTEX_INITIALIZER correctly,
don't return error when it's passed as parameter.
* winsup.h (check_null_invalid_struct): Call correct function.
2001-11-15 11:10:38 +00:00
Christopher Faylor a36ee0b6b9 * include/cygwin/version.h: Bump version to 1.3.6. 2001-11-12 00:40:29 +00:00
Christopher Faylor 82105181d8 * include/cygwin/version.h: Bump version to 1.3.5. 2001-11-05 23:13:47 +00:00
Christopher Faylor 9c510edc61 Eliminate excess whitespace. 2001-11-05 06:09:15 +00:00
Christopher Faylor a9f20457f3 * Makefile.in: Only build testsuite directory on first 'make check'.
* configure.in: Remove testsuite from SUBDIRS.
* configure: Regenerate.
2001-10-24 21:56:54 +00:00
Corinna Vinschen b20e2ee663 * fhandler_tape.cc (fhandler_dev_tape::tape_status): Report
EOTWarningZoneSize in get->mt_eotwarningzonesize.
        * include/cygwin/mtio.h: Define DEFTAPE.
        (struct mtget): Add member `mt_eotwarningzonesize'. Add a comment.
        * include/cygwin/version.h: Bump API minor version to 47.
2001-10-16 16:28:39 +00:00
Robert Collins c918cf9421 Tue Sep 25 21:25:00 2001 Robert Collins <rbtcollins@hotmail.com>
* thread.cc (pthread_cond::BroadCast): Use address with verifyable_object_isvalid().
        (pthread_cond::Signal): Ditto.
        (__pthread_create): Ditto.
        (__pthread_cleanup): Ditto.
        (__pthread_attr_init): Ditto.
        (__pthread_attr_getinheritsched): Ditto.
        (__pthread_attr_getschedparam): Ditto.
        (__pthread_attr_getschedpolicy): Ditto.
        (__pthread_attr_getscope): Ditto.
        (__pthread_attr_setdetachstate): Ditto.
        (__pthread_attr_getdetachstate): Ditto.
        (__pthread_attr_setinheritsched): Ditto.
        (__pthread_attr_setschedparam): Ditto.
        (__pthread_attr_setschedpolicy): Ditto.
        (__pthread_attr_setscope): Ditto.
        (__pthread_attr_setstacksize): Ditto.
        (__pthread_attr_getstacksize): Ditto.
        (__pthread_attr_destroy): Ditto.
        (__pthread_join): Ditto.
        (__pthread_detach): Ditto.
        (__pthread_suspend): Ditto.
        (__pthread_continue): Ditto.
        (__pthread_getschedparam): Ditto.
        (__pthread_getsequence_np): Ditto.
        (__pthread_key_create): Ditto.
        (__pthread_key_delete): Ditto.
        (__pthread_setschedparam): Ditto.
        (__pthread_setspecific): Ditto.
        (__pthread_getspecific): Ditto.
        (__pthread_cond_destroy): Ditto.
        (__pthread_cond_init): Ditto.
        (__pthread_cond_broadcast): Ditto.
        (__pthread_cond_signal): Ditto.
        (__pthread_cond_timedwait): Ditto.
        (__pthread_cond_wait): Ditto.
        (__pthread_condattr_init): Ditto.
        (__pthread_condattr_getpshared): Ditto.
        (__pthread_condattr_setpshared): Ditto.
        (__pthread_condattr_destroy): Ditto.
        (__pthread_kill): Ditto.
        (__pthread_mutex_init): Ditto.
        (__pthread_mutex_getprioceiling): Ditto.
        (__pthread_mutex_lock): Ditto.
        (__pthread_mutex_trylock): Ditto.
        (__pthread_mutex_unlock): Ditto.
        (__pthread_mutex_destroy): Ditto.
        (__pthread_mutex_setprioceiling): Ditto.
        (__pthread_mutexattr_getprotocol): Ditto.
        (__pthread_mutexattr_getpshared): Ditto.
        (__pthread_mutexattr_gettype): Ditto.
        (__pthread_mutexattr_init): Ditto.
        (__pthread_mutexattr_destroy): Ditto.
        (__pthread_mutexattr_setprotocol): Ditto.
        (__pthread_mutexattr_setprioceiling): Ditto.
        (__pthread_mutexattr_getprioceiling): Ditto.
        (__pthread_mutexattr_setpshared): Ditto.
        (__pthread_mutexattr_settype): Ditto.
        (__sem_init): Ditto.
        (__sem_destroy): Ditto.
        (__sem_wait): Ditto.
        (__sem_trywait): Ditto.
        (__sem_post): Ditto.
        (verifyable_object_isvalid): Recieve a pointer to a pointer for verification.
        (__pthread_mutexattr_getprotocol): Fix typo in magic number.
        (__pthread_mutexattr_getpshared): Ditto.
        (__pthread_mutexattr_gettype): Ditto.
        * thread.h (verifyable_object_isvalid): Change prototype to recieve a pointer to a
        pointer for verification.
        * include/pthread.h: Fix typo for __cleanup_routine_type typedef. (Contrib from Net).
2001-09-25 11:45:26 +00:00
Christopher Faylor 5733509e25 * cygwin.din (__argv): Export.
(__argc): Ditto.
(__progname): Ditto.
* include/getopt.h (getopt_long): constify arguments.
* lib/getopt.c: Import new file from NetBSD.
2001-09-19 01:07:11 +00:00
Christopher Faylor c98b577d40 * include/io.h: Add access declaration. 2001-09-17 21:29:19 +00:00
Corinna Vinschen ba94682838 * Makefile.in: Build wincap.o.
* wincap.cc: New file.
        * wincap.h: Ditto.
        * autoload.cc: Add dynamic load statement for `CreateHardLinkA'.
        * dcrt0.cc (os_being_run): Eliminated.
        (osname): Ditto.
        (iswinnt): Ditto.
        (set_os_type): Ditto.
        (dll_crt0_1): Call wincap.init() instead of set_os_type().
        (_dll_crt0): Ditto.
        * environ.cc (set_chunksize): New function.
        (parse_thing): `forkchunk' setting now invokes function `set_chunksize'.
        * fork.cc (chunksize): Eliminated. Moved to be member of wincap.
        * host_dependent.h: Removed.
        * syscalls.cc (_link): Try using `CreateHardLinkA' first, if available.
        * cygheap.cc, dcrt0.cc, delqueue.cc, dir.cc,
        environ.cc, fhandler.cc, fhandler.h, fhandler_console.cc,
        fhandler_mem.cc, fork.cc, mmap.cc, net.cc, pinfo.cc, pinfo.h,
        security.cc, syscalls.cc, sysconf.cc, syslog.cc, thread.cc,
        times.cc, tty.cc, uinfo.cc, uname.cc, winsup.h: Use new wincap
        capability check throughout.
        * winsup.h: Include wincap.h. Eliminate extern declarations of
        `os_being_run' and `iswinnt'. Eliminate `os_type" definition.
        * include/cygwin/version.h: Bump version to 1.3.4.
2001-09-12 17:46:37 +00:00
Christopher Faylor e3c25c4a47 Update copyrights. 2001-09-11 20:01:02 +00:00
Christopher Faylor dbc82a87a3 * cygwin.din: Remove cygwin_getshared.
* shared.cc: Ditto.
* include/cygwin/version.h: Bump API minor number.
* dtable.cc (dtable::build_fhandler): Fix incorrect test for socket.
2001-09-11 15:25:08 +00:00
Corinna Vinschen d969111291 * include/cygwin/version.h: Bump API minor version to 45 according
to adding the gamm*_r functions.
2001-09-09 12:32:54 +00:00
Christopher Faylor c12a96d12f * cygwin.din: Add gamm*_r function exports. 2001-09-08 01:35:55 +00:00
Christopher Faylor 1ff9f4b937 * cygheap.h (init_cygheap): Move heap pointers here.
* include/sys/cygwin.h (perprocess): Remove heap pointers.
* dcrt0.cc (__cygwin_user_data): Reflect obsolete perprocess stuff.
(_dll_crt0): Don't initialize heap pointers.
(cygwin_dll_init): Ditto.
(release_upto): Use heap pointers from cygheap.
* heap.h: Ditto.
* fork.cc (fork_parent): Ditto.  Don't set heap pointers in ch.
(fork_child): Remove obsolete sigproc_fixup_after_fork.
* shared.cc (memory_init): Reorganize so that cygheap initialization is called
prior to regular heap since regular heap uses cygheap now.
* sigproc.cc (proc_subproc): Eliminate zombies allocation.
(sigproc_init): Move zombies alloation here.  Don't free up array on fork, just
reuse it.
(sigproc_fixup_after_fork): Eliminate.
* sigproc.h: Ditto.
* include/cygwin/version.h: Reflect change to perprocess structure.
2001-09-07 21:32:07 +00:00
Corinna Vinschen b0cce7e127 * include/limits.h: Define PIPE_BUF.
* syscalls.cc (fpathconf): Use PIPE_BUF instead of numerical constant.
        (pathconf): Ditto.
2001-09-07 08:31:16 +00:00
Corinna Vinschen a71aee46c4 * cygwin.din: Add `dirfd'.
* dir.cc (dirfd): New function.
        (opendir): Open a directory file descriptor and save it in
        __d_dirent->d_fd.
        (closedir): Close directory file descriptor.
        * include/cygwin/version.h: Bump API minor version to 44.
2001-09-03 16:36:54 +00:00
Corinna Vinschen 3171175e90 * resource.cc (getrlimit): Return OPEN_MAX as current limit
on RLIMIT_NOFILE.
        * syscalls.cc (getdtablesize): Return OPEN_MAX.
        * sysconf.cc (sysconf): Return OPEN_MAX on _SC_OPEN_MAX.
        * include/limits.h (OPEN_MAX): Define as 256.
2001-08-16 14:20:09 +00:00
Christopher Faylor 3ca6bcc4d0 * include/cygwin/version.h: Bump API version. 2001-08-14 15:05:43 +00:00
Christopher Faylor 29a075260a Oops. Forgot to check in include/wchar.h??? 2001-08-11 01:56:53 +00:00
Christopher Faylor 96a3f4ae68 * cygheap.cc (cygheap_root::set): Avoid treating '/' specially.
* fhandler.cc (fhandler_base::fcntl): Only set specific O_NDELAY style flag
passed in from application.
* fhandler_socket.cc (fhandler_socket::fcntl): Ditto.
* fhandler.h: Set constant for future use.
* winsup.h: Define OLD_O_NDELAY only for old programs.
* include/cygwin/version.h: Define CYGWIN_VERSION_CHECK_FOR_OLD_O_NONBLOCK.
2001-08-07 00:01:42 +00:00
Corinna Vinschen 7eb971a561 * net.cc (cygwin_accept): Allow NULL peer and len parameters.
* include/cygwin/socket.h: Define socklen_t as int.
2001-08-03 12:06:29 +00:00
Christopher Faylor 8e4e3874c4 * cygwin.din: Export sys_errlist, sys_nerr.
* include/cygwin/version.h: Bump minor version number.
2001-07-27 16:33:20 +00:00
Christopher Faylor 351a85482c Christopher Faylor <cgf@cygnus.com>
* cygwin.din: Export __signgam.
* include/cygwin/version.h: Bump minor version number.
2001-07-26 20:42:52 +00:00
Corinna Vinschen 463513f0e2 * cygwin.din: Add fchdir symbols.
* path.cc (chdir): Guard against invalid parameter.
         (fchdir): New function.
         * include/cygwin/version.h: Bump API minor version to 40.
         * uinfo.cc (internal_getlogin): Remove unused variable.
2001-06-10 10:00:21 +00:00
Christopher Faylor f01fb5e796 * include/cygwin/version.h: Bump minor version number. 2001-05-21 15:50:36 +00:00
Christopher Faylor 00b59ce9c9 * include/pthread.h: Remove C++ comment. 2001-05-09 14:45:47 +00:00
Christopher Faylor ef8b659086 * include/sys/file.h: Revert special X_OK usage. Just make it a constant. 2001-05-08 01:36:50 +00:00
Christopher Faylor 620dd06d15 * include/pthread.h (pthread_cleanup_push): Eliminate space preceding
arguments.
(pthread_cleanup_pop): Ditto.
2001-05-03 20:42:28 +00:00
Christopher Faylor b98ebf5470 Throughout, change 'tty_attached' to 'real_tty_attached', for clarity.
Throughout, change 'OutputStopped' to 'output_stopped', for consistency.
* dtable.cc (stdio_init): Set controlling tty if not set by stdio opens.
* exceptions.cc (ctrl_c_handler): Avoid special pgid checking if no tty is
associated with the process.
(Suggested by Tim Baker <dbaker@direct.ca>)
* external.cc (fillout_pinfo): Return actual tty number for ctty.
* fhandler_console.cc (get_tty_stuff): Set ctty when shared memory is
allocated.  Accept flags input from open().
(set_console_ctty): New function.
(fhandler_console::open): Pass flags to get_tty_stuff and rely on this function
to set the ctty, if appropriate.
* fhandler_termios.cc (fhandler_termios::set_ctty): Move to tty_min class.
* fhandler_tty.cc (fhandler_tty_slave::open): Use tc field to access
set_ctty().
* tty.h (TTY_CONSOLE): Move to include/sys/cygwin.h.
(tty_min): Add set_ctty class here.
* include/sys/cygwin.h (TTY_CONSOLE): New home here.
* path.cc (symlink_info): Make contents an actual buffer.  Pass more flags to
case_check.
(path_conv::check): Reorganize to do parsing based on posix path rather than
native path.
(symlink_info::check): Expect posix path as input.  Translate to native path
here.  Accept path_conv flags.  Stop parsing if not a symlink regardless of
whether previous path was a symlink.
2001-04-28 23:48:28 +00:00
Egor Duda 86699e1555 * cygwin.din: Export asctime_r, ctime_r, gmtime_r, localtime_r
* include/cygwin/version.h: Bump CYGWIN_VERSION_API_MINOR to 39
2001-04-25 16:18:43 +00:00
Christopher Faylor edc4bfd9da * include/cygwin/version.h: Bump minor version number.
* childinfo.h: Bump child structure magic number.
2001-04-25 14:59:49 +00:00
Christopher Faylor c02e9189cf * include/cygwin/version.h: Bump Cygwin version and API version. 2001-04-23 00:48:23 +00:00
Christopher Faylor 1acf5c29c8 * features.h: Reinstate as wrapper for sys/features.h. 2001-04-22 23:18:28 +00:00
Christopher Faylor cbd8868713 * include/sys/file.h: More cleanup for X_OK. 2001-04-20 16:36:17 +00:00
Christopher Faylor cdcfe4e8e9 * include/sys/file.h: Move X_OK protection earlier.
* dtable.cc (dtable::vfork_child_fixup): Avoid closing already closed handles.
2001-04-20 15:50:03 +00:00
Christopher Faylor 0381fec68f Throughout, change fdtab references to cygheap->fdtab.
* child_info.h (cygheap_exec_info): Eliminate special fdtab stuff.
* spawn.cc (spawn_guts): Ditto.
* cygheap.cc (cygheap_init): Initialize fdtab, if appropriate.
* cygheap.h (CYGHEAPSIZE): Include size of init_cygheap.
(_cmalloc_entry): Include fdtab here.
* dtable.h (dtable): Declare/define new methods.
* dtable.cc (dtable::vfork_child_fixup): New method.
(dtable::fixup_after_exec): Remove unneeded extra arguments.
* dcrt0.cc (dll_crt0_1): Ditto.
* environ.cc (getwinenv): Use case sensitive comparison.
(winenv): Make a copy of environment cache to avoid realloc problems when
duplicate environment variables exist in the environment.  (From Egor Duda)
* net.cc (cygwin_socket): Revert Apr 14 change.
* include/sys/file.h: Protect against previous X_OK definition.
* passwd.cc: Eliminate passwd_sem throughout.
* security.cc: Ditto.
* cygwin.din: Export New functions.
* passwd.cc (read_etc_passwd): Make race safe.
(getpwuid_r): New function.
(getpwnam_r): New function.
2001-04-18 21:10:15 +00:00
Christopher Faylor 3b3b19d258 * features.h: Remove this file as it is now being supplied by newlib. 2001-04-16 04:08:05 +00:00
Christopher Faylor b0a50cf34c * autoload.cc: Add winmm functions needed by fhandler_dsp.cc.
* fhandler_dsp.cc: New file.  Implements OSS like /dev/dsp.
* include/sys/soundcard.h: New file.  User land includes for OSS /dev/dsp.
* fhandler.h: Add new class fhandler_dev_dsp and a FH_OSS_DSP definition.
* dtable.cc (dtable::build_fhandler): Allow creation of the /dev/dsp device.
* path.cc (windows_device_names): Add /dev/dsp into list of device names.
* Makefile.in (DLL_OFILES): Add fhandler_dsp.o.
2001-04-16 03:27:16 +00:00