Commit Graph

895 Commits

Author SHA1 Message Date
Corinna Vinschen 14be153e9b * exception.h: Fold in content of include/exceptions.h.
* include/exceptions.h: Remove.
2013-10-27 09:42:17 +00:00
Corinna Vinschen 2e178c6909 * exception.h (_exception_list): Drop redefinition for x86_64.
* include/exceptions.h: Disable content for x86_64 since it's not
	using frame based exception handling anymore.
2013-10-26 09:37:34 +00:00
Corinna Vinschen 158508011c * include /cygwin/config.h (_READ_WRITE_BUFSIZE_TYPE): Define. 2013-10-23 10:06:17 +00:00
Christopher Faylor ade2acf274 * include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Bump to 26. 2013-09-25 16:17:59 +00:00
Corinna Vinschen 3c654cd48a * include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Belatedly bump
to 25.
2013-08-31 18:05:31 +00:00
Corinna Vinschen 3ee82da30d * fhandler_tape.cc (mtinfo_drive::create_partitions): Allow partitioning
of drives supporting select partitions.
	(mtinfo_drive::get_status): Fill in current partition and number of
	partitions on tape into mt_resid.
	* include/cygwin/mtio.h (struct mtget): Align mt_resid comment to
	aforementioned change.
	* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
2013-08-21 20:28:12 +00:00
Corinna Vinschen ef23b0a6a4 * include/sys/cygwin.h (struct per_process): Add posix_memalign. Reduce
size of unused2 accordingly.
	* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
	* lib/_cygwin_crt0_common.cc (_cygwin_crt0_common): Initialize
	u->posix_memalign with address of posix_memalign.
	* malloc_wrapper.cc (posix_memalign): Call user-provided posix_memalign
	rather than just returning ENOSYS.
	* globals.cc (__cygwin_user_data): Initialize posix_memalign member.
2013-08-14 11:44:23 +00:00
Corinna Vinschen 2da426bee6 * include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Bump to 24. 2013-08-09 09:12:55 +00:00
Corinna Vinschen 5709fcbfe5 Fix copyright date 2013-07-24 14:21:13 +00:00
Corinna Vinschen 3fdddd7d77 * include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Bump to 23. 2013-07-22 15:08:54 +00:00
Christopher Faylor 521953a83a * common.din: Export GetCommandLine{A,W}.
* kernel32.cc: Add includes needed for GetCommandLine functions.
(ucmd): New function.
(cygwin_GetCommandLineW): Ditto.
(cygwin_GetCommandLineA): Ditto.
* spawn.cc (child_info_spawn::worker): Rename one_line -> cmd.  Use lb_wcs
macro to generate a wide character version of the line buffer.  Remove
duplicate printing of command line.  Don't access members of linebuf directly.
* winf.h: Use pragma once.
(linebuf): Make storage private.
(linebuf::operator size_t): New operator.  Return size of buf.
(linebuf::operator wchar_t): New operator.
(linebuf::wcs): New function.
(lb_wcs): New macro.
* include/cygwin/version.h: Bump API minor number to 268.
* strfuncs.cc: Clarify descriptive file comment.
2013-07-19 17:28:34 +00:00
Corinna Vinschen 7ea982e75a * include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Bump to 22. 2013-07-15 11:44:04 +00:00
Yaakov Selkowitz ccccd71d58 * common.din (rawmemchr): Export.
* posix.sgml (std-gnu): Add rawmemchr.
* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
2013-06-24 15:12:40 +00:00
Corinna Vinschen 34ec6f665b * include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Bump to 21. 2013-06-07 09:21:53 +00:00
Corinna Vinschen aa6aee7dd7 * include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Bump to 20. 2013-06-05 09:37:53 +00:00
Corinna Vinschen a24ad2c346 * autoload.cc (CancelSynchronousIo): Define.
* fcntl.cc (fcntl64): Drop handling of locking commands.
	* fhandler.h (class fhandler_disk_file): Add mandatory_locking.
	(fhandler_disk_file::fcntl): Declare.
	(fhandler_disk_file::mand_lock): Declare.
	* fhandler_disk_file.cc (fhandler_disk_file::fhandler_disk_file):
	Initialize mandatory_locking.
	(fhandler_disk_file::fcntl): New method.  Handle F_LCK_MANDATORY and
	locking commands.
	(fhandler_disk_file::dup): Duplicate mandatory_locking.  Fix a bug
	when duplicating prw_handle failed.
	(fhandler_disk_file::fixup_after_fork): Reset mandatory_locking.
	* flock.cc (fhandler_disk_file::lock): Add comment.
	(struct lock_parms): New struct to pass parameters to blocking_lock_thr
	thread function.
	(blocking_lock_thr): New thread function.
	(fhandler_disk_file::mand_lock): New methof implementing mandatory
	locking with Windows semantics.
	* ntdll.h (NtLockFile): Declare.
	(NtUnlockFile): Declare.
	* include/fcntl.h: Fix a comment.
	(F_LCK_MANDATORY): Define.  Add lengthy comment to explain.
2013-06-02 10:22:14 +00:00
Corinna Vinschen cd9ca871b0 * include/sys/socket.h: Move SHUT_xx definitoins from here...
* include/cygwin/socket.h: ...to here.
2013-05-31 18:08:25 +00:00
Corinna Vinschen 9fccd63bc3 * include/cygwin/if.h: Include cygwin/socket.h rather than sys/socket.h
to avoid circular dependency resulting in bogus compile time warnings.
2013-05-31 08:40:35 +00:00
Corinna Vinschen 291d93b58b * Makefile.in (DLL_OFILES): Add arc4random.o.
* common.din: Export arc4random, arc4random_addrandom, arc4random_buf,
	arc4random_stir and arc4random_uniform.
	* mktemp.cc (arc4random): Remove static replacement function.
	* posix.sgml (std-bsd): Add arc4random functions.
	* include/cygwin/stdlib.h: Declare arc4random functions.
	* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
	* libc/arc4random.cc: New file implementing arc4random functions taken
	from FreeBSD.
2013-05-21 19:04:49 +00:00
Corinna Vinschen e99674fb55 * libc/base64.c: New file.
* Makefile.in (DLL_OFILES): Add base64.o.
	* common.din: Export __b64_ntop and __b64_pton.
	* posix.sgml (std-bsd): Add __b64_ntop and __b64_pton.
	* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
2013-05-21 10:07:55 +00:00
Christopher Faylor 73dfbd86bd * include/cygwin/version.h: Bump api minor number to reflect previous change. 2013-05-13 19:27:34 +00:00
Corinna Vinschen 61522196c7 * Merge in cygwin-64bit-branch. 2013-04-23 09:44:36 +00:00
Corinna Vinschen 40702aef2c * include/sys/queue.h: Delete in favor of more complete newlib file. 2013-04-22 10:35:02 +00:00
Corinna Vinschen a1467f6434 Adapt to changes in newlib's sys/cdefs.h:
* include/sys/sysinfo.h (struct sysinfo): Rename __unused member to __f.
	* libc/fts.c (__FBSDID): Drop definition.
	* regex/regexec.c (__unused): Drop definition.
2013-04-22 10:33:09 +00:00
Corinna Vinschen fc1ff1150c * include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Bump to 19. 2013-04-22 10:13:30 +00:00
Corinna Vinschen 8981489bec * include/sys/un.h (UNIX_PATH_MAX): Rename from UNIX_PATH_LEN to
follow Linux.
	* fhandler_socket.cc: Change UNIX_PATH_LEN to UNIX_PATH_MAX throughout.
	(fhandler_socket::recv_internal): Don't return prematurely in case of
	successful return.  For AF_LOCAL sockets, overwrite returned AF_INET
	name with AF_LOCAL name.
2013-03-07 15:39:35 +00:00
Corinna Vinschen 1ef8ce71a8 * include/pthread.h (pthread_atfork): Add missing declaration. 2013-02-26 10:32:36 +00:00
Yaakov Selkowitz 7b3739f2ae * include/error.h (error_message_count): Declare as dllimport.
(error_one_per_line): Ditto.
(error_print_progname): Ditto.
2013-02-21 03:15:47 +00:00
Christopher Faylor 118e51be1d * DevNotes: Add entry cgf-000022.
* cygtls.h (_cygtls::func): Define as a sa_sigaction style function.
* exceptions.cc (sig_handle_tty_stop): Ditto.
(_cygtls::interrupt_setup): Fix coercion to accommodate 'func' change.
(ctrl_c_handler): Use tty kill_pgrp to send a signal.
(sigpacket::process): Don't process sigflush here.
(_cygtls::call_signal_handler): Reorganize to avoid a race.  Always call
sa_sigaction style function.
* fhandler_termios.cc (is_flush_sig): Define new function.
(tty_min::kill_pgrp): Handle tty flush when signal detected.
(fhandler_termios::bg_check): Be slightly more paranoid about checking for
valid tty.
(fhandler_termios::sigflush): Don't flush unless tty owner.
* fhandler_tty.cc (fhandler_pty_slave::ioctl): Use tty kill_pgrp to send
signal.
(fhandler_pty_master::ioctl): Ditto.
* signal.cc (killsys): Delete definition.
* sigproc.h (killsys): Delete declaration.
* include/cygwin/signal.h (siginfo_t): Simplify union/struct nesting slightly.
Implement mechanism to allow cygwin data passing.
2013-01-31 05:26:47 +00:00
Christopher Faylor bc837d22f3 Throughout, update copyrights to reflect dates which correspond to main-branch
checkins.  Regularize copyright format.
2013-01-21 04:38:31 +00:00
Christopher Faylor b8540dae6c * include/pthread.h (pthread_exit): Mark as "noreturn". 2013-01-14 21:17:37 +00:00
Christopher Faylor ca77b848e7 * cygtls.h (_cygtls::signal_exit): Delete from class.
* exception.h (cygwin_exception): New class.
(cygwin_exception::dumpstack): Declare new function.
(cygwin_exception::context): Ditto.
(cygwin_exception::dump_exception): Ditto.
* exceptions.cc (cygwin_exception::dump_exception): Move into cygwin_exception
class.  Accommodate new variable names.
(cygwin_exception::dumpstack): Ditto stackdump -> dumpstack.
(exception::handle): Move andreas processing earlier.  Defer signal processing
decisions to the signal thread where they belong.  Pass exception information
to sig_send via new siginfo_t si_cyg field.
(ctrl_c_handler): Wait for SIGHUP signal to be processed since it could cause a
process exit and we don't want races with thread exit lock.
(signal_exit): Move back here from sigproc.cc.  Modify arguments and remove
from sigpacket class.  Decide when to dump core based on signal type.
(sigpacket::process): Handle exiting signals in context of threads rather than
in the signal thread.  Signal debugger on non-Windows signals.  Remove
setup_signal_exit call.
* sigproc.cc (no_signals_available): Remove argument.
(signal_exit_code): Delete.
(close_my_readsig): Ditto.
(_cygtls::signal_exit): Move to exceptions.cc.
(sigproc_terminate): Don't attempt to terminate signal thread.
(setup_signal_exit): Delete.
(exit_thread): Use new si_cyg entry in siginfo_t.
(sig_send): Just use empty initializer for si.  Accommodate change in
no_signals_available argument.
(wait_sig): Remove attempt to "go asynchronous" on process exit.  Delete
__SIGEXIT handling.  Don't ever exit.
* sigproc.h: Remove __SIGEXIT from signal enum.  Renumber.
* include/cygwin/signal.h (siginfo_t): Add si_cyg entry.
2013-01-02 18:34:06 +00:00
Corinna Vinschen 05297cca5f * fhandler.cc (fhandler_base::write): Don't attempt to sparsify
an already sparse file.  Drop check for FILE_SUPPORTS_SPARSE_FILES
	flag.  Explicitely set FILE_ATTRIBUTE_SPARSE_FILE attribute in
	cached attributes.
	(fhandler_base::lseek): Only set did_lseek if sparseness is supported.
	* fhandler_disk_file.cc (fhandler_disk_file::ftruncate): Don't attempt
	to sparsify an already sparse file.  Explicitely set
	FILE_ATTRIBUTE_SPARSE_FILE attribute in cached attributes.
	* mount.cc (oopt): Add "sparse" flag.
	(fillout_mntent): Ditto.
	* path.h (enum path_types): Add PATH_SPARSE.
	(path_conv::support_sparse): New method.
	(path_conv::fs_flags): Constify.
	(path_conv::fs_name_len): Ditto.
	include/sys/mount.h: Replace unused MOUNT_MIXED flag with MOUNT_SPARSE.
2012-12-14 10:45:29 +00:00
Yaakov Selkowitz 0ba7e5d36b * include/cygwin/wait.h (WAIT_ANY): Define.
(WAIT_MYPGRP): Define.
2012-12-06 08:32:58 +00:00
Yaakov Selkowitz beaf1df02c * termios.cc (cfsetspeed): New function.
* cygwin.din (cfsetspeed): Export.
* posix.sgml (std-bsd): Add cfsetspeed.
* include/sys/termios.h (cfsetspeed): Declare.
* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
2012-11-21 20:13:07 +00:00
Corinna Vinschen bd249f0177 * include/mntent.h: Only include paths.h when building for Cygwin.
Add comment to explain why.
2012-11-16 17:35:14 +00:00
Yaakov Selkowitz 650dc73fa5 * include/sys/termios.h (CBRK): Define as alias of CEOL.
(CREPRINT): Define as alias of CRPRNT.
	(CDISCARD): Define as alias of CFLUSH.
	(TTYDEF_*): Define.
2012-11-05 03:19:28 +00:00
Corinna Vinschen e9fe565052 Fix copyright 2012-10-31 16:49:25 +00:00
Corinna Vinschen f54898bac9 * include/sys/param.h: Include stddef.h to define NULL. 2012-10-31 16:48:50 +00:00
Corinna Vinschen b120088ccd * include/sys/cygwin.h: Add missing defines for CW_ALLOC_DRIVE_MAP,
CW_MAP_DRIVE_MAP and CW_FREE_DRIVE_MAP.
2012-10-30 10:32:46 +00:00
Corinna Vinschen 422743b6ec * include/cygwin/signal.h (sigset_t): Define here. 2012-10-26 09:21:48 +00:00
Corinna Vinschen 3f30575344 * include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Bump to 18. 2012-10-21 10:20:53 +00:00
Corinna Vinschen db8224e8be * fhandler.h (class fhandler_dev_raw): Add members devbufalloc and
devbufalign.
	(class fhandler_dev_floppy): Remove member bytes_per_sector;
	* fhandler_floppy.cc (bytes_per_sector): Define as devbufalign.
	(fhandler_dev_floppy::open): Set devbufalign to a multiple of the
	sector size and handle devbuf allocation and alignment in !O_DIRECT
	case here.  Change comment accordingly.
	Call FSCTL_ALLOW_EXTENDED_DASD_IO for partitions as well.
	(fhandler_dev_floppy::raw_write): Fix comment.  Rewrite and fix
	writing behaviour when application uses read and lseek.
	(fhandler_dev_floppy::lseek): Use rounddown macro.  Call
	SetFilePointerEx rather than the old SetFilePointer.
	(fhandler_dev_floppy::ioctl): Reformat switch.  Call
	IOCTL_DISK_UPDATE_PROPERTIES rather than IOCTL_DISK_UPDATE_DRIVE_SIZE
	in BLKRRPART case.  Support BLKIOMIN, BLKIOOPT, BLKPBSZGET and
	BLKALIGNOFF.
	* fhandler_raw.cc (fhandler_dev_raw::fhandler_dev_raw): Initialize
	all devbuf-related members.
	(fhandler_dev_raw::~fhandler_dev_raw): Delete devbufalloc rather than
	devbuf.
	(fhandler_dev_raw::open): Drop allocating devbuf.
	(fhandler_dev_raw::dup): Allocate devbufalloc and set devbuf to support
	new sector-aligned devbuf handling.
	(fhandler_dev_raw::fixup_after_exec): Ditto.
	* fhandler_tape.cc (fhandler_dev_tape::open): Ditto, set devbufalign
	to 1.
	* include/cygwin/fs.h (BLKIOMIN): Define.
	(BLKIOOPT): Define.
	(BLKALIGNOFF): Define.
	(BLKPBSZGET): Define.
2012-10-13 12:34:18 +00:00
Corinna Vinschen 9b4d1964a7 * include/cygwin/in.h (struct in_addr): Guard with s_addr to avoid
potential collision with Win32 headers.
2012-10-10 08:36:33 +00:00
Corinna Vinschen 74d1d0ee80 * fhandler_clipboard.cc (fhandler_dev_clipboard::read): Use
read-ahead buffer for reading Windows clipboard if caller's
	buffer is too small for complete characters.
	* include/limits.h: Remove outdated TODO comment.
2012-08-17 09:23:34 +00:00
Corinna Vinschen 34a4d873ad * include/sys/wait.h (_wait): Define when building newlib. 2012-08-08 09:39:36 +00:00
Corinna Vinschen 458e15e7d7 * include/cygwin/socket.h (MSG_BCAST): Define.
(MSG_MCAST): Define.
2012-08-01 18:56:45 +00:00
Corinna Vinschen a2b7f56971 * include/inttypes.h: Add x86_64 target considerations throughout.
Define macros in C++ according to C99 requirements.
	* include/stdint.h: Ditto.
2012-07-28 14:21:34 +00:00
Christopher Faylor b8a84b73d7 * include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Bump to 17. 2012-07-21 17:13:42 +00:00
Corinna Vinschen 010f7350ba * cygwin.din (getmntent_r): Export.
* mount.cc (getmntent_r): New function.
	* posix.sgml (std-gnu): Add getmntent_r.
	* include/mntent.h (getmntent_r): Declare.
	* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
2012-07-18 11:17:25 +00:00