Commit Graph

12156 Commits

Author SHA1 Message Date
Corinna Vinschen 9d5bf1b13c * fhandler_socket.cc (fhandler_socket::accept4): Set nonblocking
flag exactly according to flags, as on Linux.
	* net.cc (cygwin_accept): Maintain BSD semantics here.
2010-01-15 21:34:27 +00:00
Christopher Faylor be0ca195b9 * faq-setup.xml: Add missing setup options. Sort options. 2010-01-15 18:47:31 +00:00
Corinna Vinschen 0d6531551b * cygwin.din (accept4): Export.
* fhandler.h (fhandler_socket::accept4): Rename from accept.  Take
	additional flag parameter.
	* fhandler_socket.cc (fhandler_socket::accept4): Ditto.  Handle
	SOCK_NONBLOCK and SOCK_CLOEXEC flags.
	* net.cc (cygwin_socket): Handle SOCK_NONBLOCK and SOCK_CLOEXEC flags
	in type.  Check for invalid flag values.
	(socketpair): Ditto.
	(cygwin_accept): Accommodate renaming of fhandler_socket::accept
	function to accept4.
	(accept4): New function.
	* posix.sgml: Mention accept4 as GNU extensions.
	* include/cygwin/socket.h (SOCK_NONBLOCK): Define.
	(SOCK_CLOEXEC): Define.
	(_SOCK_FLAG_MASK): Define when building Cygwin.
	* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
	* include/sys/socket.h (accept4): Declare.
2010-01-15 15:40:05 +00:00
Corinna Vinschen 14c800a5ba * posix.sgml: Mention dup3 and pipe2 as GNU extensions. 2010-01-15 14:22:42 +00:00
Corinna Vinschen 41d184bb62 * dcrt0.cc (dll_crt0_1): Reset locale to "C" at the last moment before
calling the application's main.
	* syscalls.cc (internal_setlocale): Don't reset locale to "C here.
	Change comment accordingly.
2010-01-14 18:56:24 +00:00
Corinna Vinschen 37671b5114 * libc/include/sys/_default_fcntl.h (O_CLOEXEC): Define as _FNOINHERIT.
(F_DUPFD_CLOEXEC): Define for Cygwin.
	* libc/include/sys/unistd.h (dup3): Define for Cygwin.
	(pipe2): Ditto.
2010-01-14 18:49:13 +00:00
Corinna Vinschen e70fdfb99f * cygwin.din (dup3): Export.
(pipe2): Export.
	* dtable.cc (dtable::dup_worker): Take additional flags parameter.
	Handle O_CLOEXEC flag.
	(dtable::dup3): Rename from dup2.  Take additional flags parameter.
	Check for valid flags.  Drop check for newfd == oldfd.
	* dtable.h (dtable::dup_worker): Add flags parameter.
	(dtable::dup3): Rename from dup2.
	* fcntl.cc (fcntl64): Add F_DUPFD_CLOEXEC case.
	* fhandler.h (fhandler_mailslot::get_object_attr): Add flags parameter.
	* fhandler.cc (fhandler_base::open): Use security attribute with
	inheritance according to setting of O_CLOEXEC flag.
	* fhandler_console.cc (fhandler_console::open): Ditto.
	* fhandler_fifo.cc (sec_user_cloexec): New inline function to
	create security attribute with inheritance according to setting of
	O_CLOEXEC flag.
	(fhandler_fifo::open): Call sec_user_cloexec to fetch security
	attribute.
	(fhandler_fifo::wait): Ditto.
	* fhandler_mem.cc (fhandler_dev_mem::open): Ditto.
	* fhandler_mailslot.cc (fhandler_mailslot::get_object_attr): Take
	additional flags parameter.  Use security attribute with inheritance
	according to setting of O_CLOEXEC flag.
	(fhandler_mailslot::open): Call get_object_attr with flags parameter.
	* fhandler_registry.cc (fhandler_registry::open): Call set_close_on_exec
	on real handles to accommodate O_CLOEXEC flag.
	* fhandler_tty.cc (fhandler_tty_slave::open): Ditto.
	* fhandler_tape.cc: Create mutex with inheritance according to setting
	of O_CLOEXEC flag.
	* pipe.cc: Replace usage of O_NOINHERIT with O_CLOEXEC.
	 (fhandler_pipe::init): Simplify setting close_on_exec flag.
	(fhandler_pipe::open): Remove setting close_on_exec flag.
	(fhandler_pipe::create): Use security attribute with inheritance
	according to setting of O_CLOEXEC flag.
	(pipe2): New exported function.
	* posix_ipc.cc: Throughout, open backing files with O_CLOEXEC
	flag to follow POSIX semantics.
	* security.h (sec_none_cloexec): New define.
	* syscalls.cc (dup): Add missing extern "C" qualifier.  Accommodate
	renaming of dtable::dup2 to dtable::dup3.
	(dup2): Ditto.  Check newfd == oldfd here.
	(dup3): New function.  Check newfd == oldfd here.
	(open): Set close_on_exec flag according to O_CLOEXEC flag before
	calling fhandler->open.
	* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
2010-01-14 18:46:02 +00:00
H.J. Lu 491912bffe Remove argument name.
2010-01-14  H.J. Lu  <hongjiu.lu@intel.com>

	* ia64.h (ia64_find_opcode): Remove argument name.
	(ia64_find_next_opcode): Likewise.
	(ia64_dis_opcode): Likewise.
	(ia64_free_opcode): Likewise.
	(ia64_find_dependency): Likewise.
2010-01-14 15:18:42 +00:00
Corinna Vinschen 131dbdfccb Drop accidentally applied ChangeLog entry. 2010-01-14 12:49:43 +00:00
Corinna Vinschen 0b82c17d57 * libc/stdio/vfprintf.c (_VFPRINTF_R): Just wave bytes invalid in
the current charset through.
2010-01-14 12:48:58 +00:00
Corinna Vinschen 811de4bff3 * include/fcntl.h (O_TTY_INIT): Define as 0. 2010-01-13 16:51:37 +00:00
Joel Brobecker 2e31b6574a Add new DW_AT_use_GNAT_descriptive_type CU attribute.
* dwarf2.h (dwarf_attribute): Add DW_AT_use_GNAT_descriptive_type.
2010-01-13 11:09:31 +00:00
Corinna Vinschen c013520152 * fhandler_tty.cc (fhandler_tty_master::init): Don't erase all default
termios settings of slave console.
2010-01-13 11:06:21 +00:00
Corinna Vinschen 4bcdec7276 * syscalls.cc (rename): Don't exit prematurely with EROFS when trying
to rename an AF_LOCAL socket or when trying to replace an AF_LOCAL
	socket.
2010-01-13 09:45:18 +00:00
Corinna Vinschen 4aab0ed828 * cygwinenv.sgml (cygwinenv-implemented-options): Try to make
compatibility new symlinks vs. old Cygwin clearer.
2010-01-12 16:40:53 +00:00
Corinna Vinschen c04ed45d82 * globals.cc (ro_u_nwfs): New R/O unicode string.
* mount.cc (fs_info::update): Check for NWFS filesystem.  Set
	has_buggy_basic_info, if so.  Add comment to explain why.
	(fillout_mntent): Add "nwfs" string to fs_names array.
	* mount.h (enum fs_info_type): Add nwfs.
	(class fs_info): Add has_buggy_basic_info status flag.  Add accessors
	for has_buggy_basic_info and is_nwfs.
	* fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Accommodate
	filesystems with broken FileBasicInformation handling.
	* path.cc (symlink_info::check): Ditto.
	* path.h (path_conv::has_buggy_basic_info): Add method.
2010-01-12 14:47:46 +00:00
Corinna Vinschen 4ee93264fd * dtable.cc (build_fh_name_worker): Remove. Move all functionality
back into build_fh_name.
	(build_fh_name): Drop unused HANDLE parameter.  Drop call to pc.fillin.
	Remove disabled build_fh_name with UNICODE_STRING name parameter.
	* dtable.h (build_fh_name): Drop HANDLE parameter from declaration.
	Remove declaration for build_fh_name with UNICODE_STRING name parameter.
	* path.cc (path_conv::fillin): Remove.
	(symlink_info::check): Fix comment.
	* path.h (path_conv::fillin): Remove declaration.
	* dir.cc: Accommodate change in build_fh_name parameters throughout.
	* sec_acl.cc: Ditto.
	* syscalls.cc: Ditto.

	* ntea.cc (getxattr_worker): Fix debug output.
	(setxattr_worker): Ditto.
	* times.cc (utimens_worker): Ditto.
2010-01-12 10:14:59 +00:00
Jeff Johnston eeda30d7d5 2010-01-11 Sebastian Huber <sebastian.huber@embedded-brains.de>
* libc/posix/telldir.c (_cleanupdir): Fixed usage of freed memory.
2010-01-11 23:24:47 +00:00
Jeff Johnston d8a439359a 2010-01-11 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
* libc/include/math.h (log2, log2f): Disable macro versions for C++,
        as they are incompatible with OpenMP/C++ headers.

2
2010-01-11 22:55:47 +00:00
DJ Delorie ab48bd3b04 merge from gcc 2010-01-11 19:12:42 +00:00
Corinna Vinschen 2e74cde7cb * pathnames.sgml (mount-table): Add info that posix=0 is default for
the cygdrive prefix.
2010-01-11 18:00:14 +00:00
Corinna Vinschen 523a66d91d * fhandler_proc.cc (format_proc_stat): Use new in_buf.
(format_proc_cpuinfo): Replace szBuffer with a union in_buf.  Use type
	correct throughout.  Add a couple of missing or newer cpu flags.  Allow
	certain AMD flags for intel as well.
2010-01-11 15:10:21 +00:00
Corinna Vinschen f380ca5803 * mount.cc (do_mount_from_fstab): Allow to change cygdrive prefix, too. 2010-01-11 12:13:55 +00:00
Corinna Vinschen 2b77087a48 * libc/stdlib/mbtowc_r.c (__ascii_mbtowc): Disallow conversion of
non-ASCII chars on Cygwin.
	* libc/stdlib/wctomb_r.c (__ascii_wctomb): Ditto.
2010-01-10 13:54:34 +00:00
Corinna Vinschen f1817d368a * fhandler.h (fhandler_base::fstat_helper): Declare timestamps as
PLARGE_INTEGER.
	* fhandler_disk_file.cc (fhandler_base::fstat_by_handle):
	Accommodate fstat_helper change of timestamp arguments.
	(fhandler_base::fstat_by_name): Ditto.
	(fhandler_base::fstat_helper): Define with timestamps as PLARGE_INTEGER.
	Accommodate in call to to_timestruc_t.
2010-01-10 11:12:52 +00:00
Ralf Wildenhues 7bc1f6c6c1 Sync Libtool from GCC.
/:
	* libtool.m4: Sync from git Libtool.
	* ltmain.sh: Likewise.
	* ltoptions.m4: Likewise.
	* ltversion.m4: Likewise.
	* lt~obsolete.m4: Likewise.

sim/iq2000/:
	* configure: Regenerate.

sim/d10v/:
	* configure: Regenerate.

sim/m32r/:
	* configure: Regenerate.

sim/frv/:
	* configure: Regenerate.

sim/:
	* avr/configure: Regenerate.
	* cris/configure: Regenerate.
	* microblaze/configure: Regenerate.

sim/h8300/:
	* configure: Regenerate.

sim/mn10300/:
	* configure: Regenerate.

sim/erc32/:
	* configure: Regenerate.

sim/arm/:
	* configure: Regenerate.

sim/m68hc11/:
	* configure: Regenerate.

sim/lm32/:
	* configure: Regenerate.

sim/sh64/:
	* configure: Regenerate.

sim/v850/:
	* configure: Regenerate.

sim/cr16/:
	* configure: Regenerate.

sim/moxie/:
	* configure: Regenerate.

sim/m32c/:
	* configure: Regenerate.

sim/mips/:
	* configure: Regenerate.

sim/mcore/:
	* configure: Regenerate.

sim/sh/:
	* configure: Regenerate.

gprof/:
	* Makefile.in: Regenerate.
	* configure: Regenerate.

opcodes/:
	* Makefile.in: Regenerate.
	* configure: Regenerate.

gas/:
	* Makefile.in: Regenerate.
	* configure: Regenerate.
	* doc/Makefile.in: Regenerate.

ld/:
	* configure: Regenerate.

gdb/testsuite/:
	* gdb.cell/configure: Regenerate.

binutils/:
	* Makefile.in: Regenerate.
	* configure: Regenerate.
	* doc/Makefile.in: Regenerate.

bfd/:
	* Makefile.in: Regenerate.
	* configure: Regenerate.

bfd/doc/:
	* Makefile.in: Regenerate.
2010-01-09 21:11:32 +00:00
Kaveh Ghazi 74fabfaff7 PR bootstrap/42424
* configure.ac: Include libtool m4 files.
        (_LT_CHECK_OBJDIR): Call it.
	(extra_mpc_mpfr_configure_flags, extra_mpc_gmp_configure_flags,
	gmplibs, ppllibs, clooglibs): Use $lt_cv_objdir.

	* configure: Regenerate.
2010-01-08 15:59:17 +00:00
Corinna Vinschen 9f00d74664 * sec_auth.cc (get_token_group_sidlist): Add BUILTIN\Users account
to all created tokens.
	* sec_helper.cc (well_known_users_sid): Define as BUILTIN\Users.
	* security.h (well_known_users_sid): Declare.
2010-01-08 15:55:27 +00:00
Ralf Wildenhues ca888f9cba Sync from GCC: Makefile.tpl (BASE_TARGET_EXPORTS) fix
/:
	PR bootstrap/41818
	* Makefile.tpl (BASE_TARGET_EXPORTS): Only add TARGET_LIB_PATH
	to $(RPATH_ENVVAR) if bootstrapping.  Fix typo in comment.
	* Makefile.in: Regenerate.
2010-01-07 20:00:52 +00:00
Corinna Vinschen bf4b80201a * cygpath.cc: Throughout, free obsolete path buffers. 2010-01-07 17:19:12 +00:00
Corinna Vinschen 781be3b173 * overview.sgml: Fix Red Hat brand name. 2010-01-07 12:18:01 +00:00
Corinna Vinschen 6004370ba1 * cygpath.cc (main): Remove enforcing "en_US.UTF-8" locale.
Revert usage of argz functions when reading input from file and
	simplify option usage.  Allow only one option argument and use
	the rest as filename argument to allow spaces in filenames.  Restrict
	processing special folder type options to one line.
2010-01-07 12:08:11 +00:00
Doug Evans 8c7d5f45ee * basic-modes.h (MAKEDI): New macro. 2010-01-06 05:25:24 +00:00
DJ Delorie 7fce58cbda merge from gcc 2010-01-05 21:10:23 +00:00
Christopher Faylor 37f42cc1c8 * overview.sgml: Fix Red Hat URL. 2010-01-04 16:24:06 +00:00
Christopher Faylor e1212c436b * dcrt0.cc: Bump copyright.
Do the changelog shuffle.
2010-01-01 19:28:15 +00:00
Christopher Faylor 1afba8e5f2 * dcrt0.cc (dll_crt0_1): Move internal locale setting prior to potential
globify to prevent creation of unglobbed filenames in the wrong character set.
2010-01-01 19:15:11 +00:00
Joel Brobecker 6684d8814f Update copyright notices to add year 2010. 2010-01-01 10:03:25 +00:00
Joel Brobecker 5592e8833e * dwarf2.h (enum dwarf_attribute): Add DW_AT_GNAT_descriptive_type. 2009-12-29 04:12:11 +00:00
Corinna Vinschen 935d37f116 * fhandler.h (fhandler_socket::wait_for_events): Drop parameter default
value.
	* fhandler_socket.cc (fhandler_socket::connect): Add false as second
	parameter to wait_for_events call.
	(fhandler_socket::accept): Ditto.
	(fhandler_socket::send_internal): Fix typo in call to wait_for_events.
2009-12-28 17:24:03 +00:00
Eric Blake 1c0a4c3a8e Make pty.h match recent glibc.
* include/pty.h (openpty, forkpty): Mark last two arguments const,
to match glibc 2.8.
* libc/bsdlib.cc (openpty, forkpty): Likewise.
2009-12-26 06:20:56 +00:00
Christopher Faylor 37520977df * fhandler_console.cc (handler_console::read): Use the tty's VERASE character
as the backspace keycode.
2009-12-25 17:38:46 +00:00
Corinna Vinschen 14c622c6e3 * path.cc (symlink_info::check): Set fileattr to
FILE_ATTRIBUTE_DIRECTORY in a certain error condition.  Explain why.
2009-12-24 12:53:43 +00:00
Corinna Vinschen daee16e053 * pathnames.sgml (mount-table): Add missing slash in pathname. 2009-12-23 10:43:45 +00:00
Christopher Faylor 4c9a77261e * select.cc (fhandler_fifo::select_read): Fill in device specific record.
(fhandler_fifo::select_write): Ditto.
(fhandler_fifo::select_except): Ditto.
2009-12-23 00:35:18 +00:00
Eric Blake b2e79f9800 Fix getsubopt declaration.
* libc/include/sys/unistd.h (suboptarg, getsubopt): Move...
* libc/include/stdlib.h: ...here, to match POSIX for getsubopt.
2009-12-22 13:07:24 +00:00
Corinna Vinschen 59cb363a5f * path.cc (cygwin_conv_path): Add band-aid including comment to avoid
conversion from POSIX "." to Win32 ".\\".
2009-12-21 16:44:37 +00:00
Corinna Vinschen 6d63272b53 * exec.cc (execvp): Call find_exec with FE_NNF flag to enforce
a NULL return when executable isn't found in $PATH.  Convert NULL
	to "".
	(execvpe): Ditto.
	* spawn.cc (spawn_guts): Return with EFAULT if prog_arg is NULL.
	Return with ENOENT if prog_arg is empty string.  Add a comment.
2009-12-21 15:16:28 +00:00
Corinna Vinschen b2d6e5dfd3 * fhandler_console.cc (get_nonascii_key): Generate ESC prefix
for Alt modifier generically for function keys and keypad keys.
	Distinguish Normal, Ctrl, Shift, Ctrl-Shift rather
	than Normal, Ctrl, Shift, Alt, so that in combination with generic
	Alt handling all 8 combinations of these modifiers are distinguished.
	(keytable): Add escape sequences for remaining modified
	function keys as a compatible extension using rxvt escape codes.
	Also distinguish keypad keys modified with Ctrl, Shift, Ctrl-Shift
	using xterm-style modifier coding.
2009-12-21 10:11:27 +00:00
Corinna Vinschen 1b71ce005c Throughout, revert ill-conceived replacement of hMainThread with
GetCurrentThread/NtCurrentThread.
	* dcrt0.cc (dll_crt0_0): Duplicate main thread handle to hMainThread
	again.
2009-12-21 09:38:25 +00:00