Commit Graph

99 Commits

Author SHA1 Message Date
Corinna Vinschen b8dc053d2b *** empty log message *** 2013-10-30 10:00:32 +00:00
Corinna Vinschen 352d0b831e *** empty log message *** 2013-10-28 10:57:33 +00:00
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 c8ae71316f * devices.in (dev_storage): Map /dev/dsp to \Device\Null.
* devices.cc: Regenerate.
	* fhandler_dsp.cc (fhandler_dev_dsp::open): Call fhandler_base::open.
	(fhandler_dev_dsp::close): Call fhandler_base::close.
	(fhandler_dev_dsp::fixup_after_fork): Call
	fhandler_base::fixup_after_fork.

	* fhandler_raw.cc (fhandler_dev_raw::fixup_after_fork): Call
	fhandler_base::fixup_after_fork.
2013-10-26 13:23:54 +00:00
Corinna Vinschen 7a1dc2a940 * flock.cc (fhandler_base::lock): Only refuse to lock nohandle and
old-style console devices when called to perform BSD flock locking.
	Add a FIXME to comment and align description.

	* ntdll.h (THREADINFOCLASS): Following MSDN, rename throughout from
	THREAD_INFORMATION_CLASS.
2013-10-25 18:40:57 +00:00
Corinna Vinschen 2118eee1ce * devices.in (dev_storage): Map /dev/clipboard to \Device\Null.
* devices.cc: Regenerate.
	* fhandler.h (fhandler_dev_clipboard::open): Drop declaration.
	* fhandler_clipboard.cc (fhandler_dev_clipboard::dup): Drop call to
	open.  Set private members to 0 and call fhandler_base::dup.
	(fhandler_dev_clipboard::open): Remove so that default
	fhandler_base::open is used to open \Device\Null.
	(set_clipboard): Drop gratuitios call to RegisterClipboardFormatW.
	(fhandler_dev_clipboard::close): Call fhandler_base::close from here.
2013-10-25 16:16:50 +00:00
Corinna Vinschen f0b101007a * fhandler_clipboard.cc (fhandler_dev_clipboard::open): Drop gratuitios
handling of membuffer.  It's NULL anyway.
	(fhandler_dev_clipboard::lseek): Set membuffer to NULL after freeing
	it to avoid subsequent crashes when accessing invalid pointer.
2013-10-25 15:04:24 +00:00
Corinna Vinschen 494c626414 * devices.in (dev_storage): Map /dev/random and /dev/urandom to
\Device\Null.
	* devices.cc: Regenerate.
	* fhandler.h (fhandler_dev_random::open): Drop declaration.
	(fhandler_dev_random::close): Ditto.
	(fhandler_dev_random::crypt_gen_random): Convert to static method.
	* fhandler_random.cc (fhandler_dev_random::open): Remove so that default
	fhandler_base::open is used to open \Device\Null.
	(fhandler_dev_random::close): Ditto.
	* fhandler_socket.cc (entropy_source): Delete.
	(fhandler_socket::af_local_set_secret): Remove entropy_source code and
	call fhandler_dev_random::crypt_gen_random directly instead.
2013-10-25 12:21:59 +00:00
Corinna Vinschen 95ff6fc6da * devices.in (dev_storage): Map /dev/zero and /dev/full to \Device\Null.
* devices.cc: Regenerate.
	* dtable.h (struct dtable): Make fhandler_base friend, rather
	than fhandler_disk_file.
	* fhandler.cc (fhandler_base::open_with_arch): Create unique id.
	(fhandler_base::cleanup): Call del_my_locks.
	(fhandler_base::fcntl): Handle F_GETLK, F_SETLK and F_SETLKW.
	* fhandler.h (fhandler_base::get_dev): Return real device number.
	(fhandler_base::set_unique_id): New inline method.
	(fhandler_disk_file::lock): Drop declaration.
	(fhandler_disk_file::get_dev): New method, return pc.fs_serial_number.
	(fhandler_dev_zero::open): Drop declaration.
	* fhandler_disk_file.cc (fhandler_disk_file::close): Move
	del_my_locks call to fhandler_base::open_with_arch.
	(fhandler_disk_file::fcntl): Move handling of locking commands to
	fhandler_base::fcntl.
	(fhandler_base::open_fs): Drop call to NtAllocateLocallyUniqueId.
	* fhandler_zero.cc (fhandler_dev_zero::open): Remove so that default
	fhandler_base::open is used to open \Device\Null.
	* flock.cc (fixup_lockf_after_exec): Finding a single fhandler is
	enough here.
	(fhandler_base::lock): Replace fhandler_disk_file::lock.  Refuse to lock
	nohandle devices.  Handle read/write test using POSIX flags.  Explain
	why.  Never fail on SEEK_CUR or SEEK_END, rather assume position 0,
	just as Linux.
	* net.cc (fdsock): Create unique id.
2013-10-24 09:41:17 +00:00
Christopher Faylor 41f4cb7311 . 2013-10-19 14:37:29 +00:00
Corinna Vinschen 340854dda8 * fhandler_process.cc (format_process_ctty): Fix random content of
/proc/$PID/ctty if the process has no controlling tty.  Set to just
	"\n" instead.
2013-10-16 15:14:22 +00:00
Corinna Vinschen f51d15eaf6 *** empty log message *** 2013-10-15 16:53:46 +00:00
Christopher Faylor 6aa3bb2f66 * sigproc.h (hold_everything::ischild): Declare as reference.
(hold_everything::hold_everything): Store address of caller's notion of
"ischild".
2013-09-25 15:58:45 +00:00
Corinna Vinschen 348f503460 *** empty log message *** 2013-08-30 21:42:40 +00:00
Christopher Faylor 617b2bf99f . 2013-08-30 21:33:43 +00:00
Christopher Faylor 1560d3e281 cygwin changes:
* spawn.cc (child_info_spawn): Revert previous change.  Always set
	lpReserved2.
	* release/1.7.25: Change wording.
doc changes:
	* new-features.xml (ov-new1.7.25): Change wording.
2013-08-23 18:19:46 +00:00
Corinna Vinschen bb1114d912 *** empty log message *** 2013-08-23 09:43:58 +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 30990eaa27 * fhandler_tape.cc (mtinfo_drive::create_partitions): Fix long-standing
bug disabling creation of two partitions on drives supporting initiator
	partitions.
	(mtinfo_drive::set_blocksize): Update media information after setting
	blocksize succeeded.
	(mtinfo_drive::get_status): Fetch fresh media information.
2013-08-20 20:17:14 +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 c39e8632d1 *** empty log message *** 2013-07-31 10:32:46 +00:00
Corinna Vinschen 4a4b9b4813 *** empty log message *** 2013-07-30 08:06:04 +00:00
Christopher Faylor 033fe7d87f cygwin directory changes:
* environ.cc (tty_is_gone): Delete.
	(known): Delete tty, add wincmdln.
	* globals.cc: Reorganize list of environment bools, remove explicit =
	false for slight load time optimization.
	(wincmdln): New global.
	* spawn.cc (child_info_spawn::worker): Honor wincmdln.

doc directory changes:
	* new-features.sgml (ov-new1.7.23): Add new section.  Mention wincmdln.
	* cygwinenv.xml: Mention wincmdln.
2013-07-26 17:28:00 +00:00
Corinna Vinschen 9f7d1ba43d *** empty log message *** 2013-07-24 13:02:15 +00:00
Corinna Vinschen e6ff6a18d4 * regex/regcomp.c (wgetnext): Add a kludge to be more glibc compatible.
Add comment to explain.
2013-07-21 19:28:45 +00:00
Christopher Faylor fb6cf945f9 * exceptions.cc (signal_exit): Add a FIXME comment. 2013-07-19 23:13:58 +00:00
Christopher Faylor 4741932459 . 2013-07-19 17:45:18 +00:00
Corinna Vinschen 4b25516b5d *** empty log message *** 2013-07-19 12:13:21 +00:00
Corinna Vinschen 4c4693008a Remove /dev/mem, /dev/kmem, /dev/port support.
* Makefile.in (DLL_OFILES): Drop fhandler_mem.o.
	(fhandler_mem_CFLAGS): Remove rule.
	* devices.in (enum fh_devices): Remove FH_MEM, FH_KMEM and FH_PORT.
	* devices.cc: Regenerate.
	* dtable.cc (fh_alloc): Drop handling for FH_MEM, FH_KMEM and FH_PORT.
	* fhandler.h (class fhandler_dev_mem): Remove.
	* fhandler_mem.cc: Remove file.
	* globals.cc (ro_u_pmem): Remove.
	* mmap.cc (fhandler_dev_mem::mmap): Remove.
	(fhandler_dev_mem::munmap): Remove.
	(fhandler_dev_mem::fixup_mmap_after_fork): Remove.
2013-07-15 13:54:27 +00:00
Corinna Vinschen b14cc73a4a *** empty log message *** 2013-07-15 10:04:03 +00:00
Christopher Faylor 57e9250aa2 Add an entry. 2013-07-08 04:03:58 +00:00
Christopher Faylor 286eeb8fae . 2013-07-03 20:29:03 +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 44f65eb9bb *** empty log message *** 2013-06-19 16:05:04 +00:00
Corinna Vinschen ac0937807d *** empty log message *** 2013-06-18 10:12:16 +00:00
Corinna Vinschen 2566c2e600 * path.cc (cnt_bs): New inline function.
(symlink_native): Fix creating relative native symlink.
2013-06-17 12:37:09 +00:00
Corinna Vinschen 42c8e85109 * fhandler_clipboard.cc (fhandler_dev_clipboard::read): Fix buffer
read access overrun when pos > 0.
2013-06-17 10:11:54 +00:00
Corinna Vinschen 0b8722c2db * path.cc (normalize_posix_path): Fix long-standing problem which
allows to access files via ".." using an invalid POSIX path.
2013-06-12 17:45:42 +00:00
Corinna Vinschen 8b7f83e68f *** empty log message *** 2013-06-06 15:31:15 +00:00
Corinna Vinschen 0ec4e9966a *** empty log message *** 2013-06-05 07:21:56 +00:00
Corinna Vinschen edd73646f3 * fhandler.cc (fhandler_base::lock): Move to flock.cc.
(fhandler_base::fixup_after_exec): Reset mandatory_locking.
	* fhandler.h (class fhandler_base): Add mandatory_locking status flag.
	Add mandatory_locking accessor methods.  Accommodate change throughout.
	(fhandler_base::mand_lock): Declare.
	(class fhandler_disk_file): Drop in favor of new status flag.
	* (fhandler_disk_file::fcntl): Call need_fork_fixup if mandatory_locking
	flag gets set.
	* flock.cc (fhandler_base::lock): Define here.
	(flock): Handle mandatory_locking.
	(lockf): Ditto.
	(fhandler_base::mand_lock): Define.
2013-06-04 10:24:43 +00:00
Corinna Vinschen 86c126b6e3 *** empty log message *** 2013-06-03 10:40:41 +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 697ce3c45f *** empty log message *** 2013-05-31 08:41:39 +00:00
Corinna Vinschen b09e6ec935 * fhandler_procsys.cc (fhandler_procsys::read): Just call
fhandler_base::raw_read from here.  Drop comment.
	(fhandler_procsys::write): Drop comment.
2013-05-28 15:07:01 +00:00
Corinna Vinschen 0dd70ae521 *** empty log message *** 2013-05-27 19:41:54 +00:00
Corinna Vinschen 7e925d9ac1 *** empty log message *** 2013-05-25 09:00:43 +00:00
Corinna Vinschen 61fb9713c6 * fork.cc (frok::parent): Call CreateProcessW with command line set
to the parent command line.  Change comment to explain why.
2013-05-23 20:47:45 +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 ccd40e46d7 * grp.cc (get_groups): Convert to void function.
(initgroups32): Accommodate the aforementioned change.
	(getgrouplist): Ditto.
2013-05-14 09:07:30 +00:00