Commit Graph

12062 Commits

Author SHA1 Message Date
Corinna Vinschen d358c9e9b0 * fhandler_disk_file.cc (fhandler_disk_file::link): Only append .lnk
if the original device had one, too.  Add comment.

	* fhandler_socket.cc (fhandler_socket::fstat): Always return a size of
	0 on sockets.
2009-10-12 11:57:29 +00:00
Jeff Johnston 2072888e66 2009-10-09 Dave Korn <dave.korn@artimi.com>
* libc/include/sys/time.h (_TIMEVAL_DEFINED): Define when
        defining struct timeval.
2009-10-09 18:43:12 +00:00
DJ Delorie 84552b989d merge from gcc 2009-10-09 16:17:35 +00:00
Corinna Vinschen 220f363d20 * pathnames.sgml (pathnames-specialchars): Add control chars to the
list.  Explain backslash exception.
2009-10-09 11:19:18 +00:00
Corinna Vinschen 9fa1c6420b * path.cc (tfx_chars): Convert all ASCII control characters except
ASCII NUL as well.  Change layout to make the conversions more clear.
	Add comment.
2009-10-09 11:17:17 +00:00
Corinna Vinschen 1441f6a3d1 * include/cygwin/config.h (DEFAULT_LOCALE): Define as "C.UTF-8". 2009-10-09 08:36:21 +00:00
Corinna Vinschen ec4e5025e9 * libc/locale/locale.c (DEFAULT_LOCALE): New define.
(__default_locale): New global variable set to the default locale.
	(__get_locale_env): Return __default_locale rather than fixed "C".
2009-10-09 08:25:28 +00:00
Jeff Johnston a3a62ae7a5 2009-10-08 Jeff Johnston <jjohnstn@redhat.com>
* configure.host: For RTEMS, define HAVE_ASSERT_FUNC.
        * libc/stdlib/assert.c (_assert_func): Do not specify
        __assert_func if HAVE_ASSERT_FUNC flag is set.
2009-10-08 16:44:10 +00:00
Jeff Johnston b1da4d8277 2009-10-08 Jie Zhang <jie.zhang@analog.com>
* bfin/Makefile.in (basiccrt.o, basiccrts.o): Use
        -mcpu=bf532-any for the default multilib.
2009-10-08 16:35:34 +00:00
Jeff Johnston 85191fc5aa 2009-10-08 Eric Blake <ebb9@byu.net>
* libc/include/getopt.h (__getopt_r, __getopt_long_r)
        (__getopt_long_only_r): Protect declarations, to avoid compiler
        warning.
2009-10-08 16:26:28 +00:00
Christopher Faylor 5391a40c89 * exceptions.cc (_cygtls::signal_exit): There's no need to set signal_arrived
if we're exiting.
2009-10-08 15:56:14 +00:00
Eric Blake 80636211bc * fhandler_disk_file.cc (utimens_fs): Plug fd leak on EINVAL. 2009-10-08 11:13:45 +00:00
Corinna Vinschen 8bd7bd3bc0 * libc/locale/nl_langinfo.c (nl_langinfo): Just return current locale
charset on Cygwin.
2009-10-07 16:45:23 +00:00
Charles Wilson dc4e4aabba Support pseudo-reloc version 2 2009-10-07 15:47:38 +00:00
Corinna Vinschen dfbf36f8db * syscalls.cc (seteuid32): Call set_cygwin_privileges on primary token
as well.
2009-10-07 08:20:49 +00:00
Corinna Vinschen b4311a9067 * fhandler.h (fhandler_pty_master::tcgetpgrp): Declare.
* fhandler_termios.cc (fhandler_termios::tcgetpgrp): Only return
	valid pgid if tty is controlling tty.  Set errno to ENOTTY and
	return -1 otherwise.
	(fhandler_pty_master::tcgetpgrp): New function.  Return 0 for
	master side of pty if it's not the controlling tty of the process.
2009-10-07 07:52:30 +00:00
Ian Lance Taylor bd45d6fa76 Sync with gcc repository. 2009-10-07 05:57:49 +00:00
DJ Delorie 84e91636f7 merge from gcc 2009-10-07 02:57:27 +00:00
Charles Wilson c8ee587a8e Add cygwin wrapper for ExitProcess and TerminateProcess. 2009-10-06 21:51:17 +00:00
Ian Lance Taylor 960bdc0e74 Merge from gcc repository. 2009-10-06 20:14:06 +00:00
Christopher Faylor a12518a37c * exceptions.cc: Move global variable sigExeced...
* globals.cc: here.
* pinfo.cc (pinfo::maybe_set_exit_code_from_windows): Remove now unneeded
declaration.
2009-10-06 03:39:38 +00:00
Dave Korn 3772467948 * Makefile.in (CFLAGS): Add -mno-use-libstdc-wrappers. 2009-10-04 17:48:05 +00:00
Corinna Vinschen ef35acca22 * include/winbase.h (CreateRestrictedToken): Declare for >= Win 2000.
_WIN32_WINNT >= 0x0500.
	(DISABLE_MAX_PRIVILEGE, SANDBOX_INERT, LUA_TOKEN,
	WRITE_RESTRICTED): Define.
	(IsTokenRestricted): Declare for >= Win 2000.
2009-10-04 12:28:08 +00:00
Corinna Vinschen 960624f47e * syscalls.cc (internal_setlocale): Add comment. 2009-10-04 11:32:07 +00:00
Dave Korn 26f19ec1ad * faq-using.xml (faq.using.bloda): Add Lenovo IPS Core Service. 2009-10-03 13:33:18 +00:00
Corinna Vinschen 6ff28fc3b1 * libc/stdlib/mbtowc_r.c (__utf8_mbtowc): Allow CESU-8 surrogate
value encoding.
	* libc/stdlib/wctomb_r.c (__utf8_mbtowc): Allow CESU-8 surrogate
	value decoding.
2009-10-03 08:51:07 +00:00
DJ Delorie 9c47bbb6e9 merge from gcc 2009-10-02 18:22:51 +00:00
Corinna Vinschen 0ca6c6b802 * dcrt0.cc (dll_crt0_1): Drop calls to setlocale/_setlocale_r. Just
call initial_setlocale from here.
	* syscalls.cc (initial_setlocale): Set internal charset and revert
	application locale to "C".
	(setlocale): Don't set Cygwin's internal charset here.
2009-10-02 14:58:10 +00:00
Peter Bergner 0e03c708be gas/
* config/tc-ppc.c (md_show_usage): Document -m476.
	* doc/c-ppc.texi (PowerPC-Opts): Document -m476.

gas/testsuite/
	* gas/ppc/476.s: New test.
	* gas/ppc/476.d: Likewise.
	* gas/ppc/ppc.exp: Run the 476 test.

include/opcode/
	* ppc.h (PPC_OPCODE_476): Define.

opcodes/
	* ppc-dis.c (ppc_opts): Add "476" entry.
	* ppc-opc.c (PPC476): Define.
	(powerpc_opcodes): Update mnemonics where required for 476.
2009-10-02 14:42:42 +00:00
Alan Modra 8ddebae795 include/aout/
* aout64.h (N_SHARED_LIB): Define as zero if not already defined.
	* sun4.h (N_SHARED_LIB): Define.
	* hp300hpux.h (N_SHARED_LIB): Don't define.
bfd/
	* aout-cris.c (N_SHARED_LIB): Don't define.
	* hp300bsd.c (N_SHARED_LIB): Don't define.
	* i386bsd.c (N_SHARED_LIB): Don't define.
	* i386linux.c (N_SHARED_LIB): Don't define.
	* i386lynx.c (N_SHARED_LIB): Don't define.
	* m68klinux.c (N_SHARED_LIB): Don't define.
	* m88kmach3.c (N_SHARED_LIB): Don't define.
	* mipsbsd.c (N_SHARED_LIB): Don't define.
	* newsos3.c (N_SHARED_LIB): Don't define.
	* pc532-mach.c (N_SHARED_LIB): Don't define.
	* pdp11.c (N_SHARED_LIB): Don't define.
	* sparclinux.c (N_SHARED_LIB): Don't define.
	* vaxbsd.c (N_SHARED_LIB): Don't define.
2009-10-02 14:40:41 +00:00
Christopher Faylor a37e07482c * mkpasswd.c: Properly define __progname as __declspec(dllimport).
* mkgroup.c: Ditto.
2009-10-02 13:49:39 +00:00
Corinna Vinschen 45162575d2 * setup2.sgml (setup-locale-ov): Fix typo in C+charset example.
Rephrase how the locale environment variables are evaluated.
2009-10-02 12:35:52 +00:00
Christopher Faylor 284c5ea0a5 * dcrt0.cc (dll_crt0_1): Move cxx_malloc reset kluge from here.
(check_sanity_and_sync): to here.
* path.cc (has_dot_last_component): Rewrite to detect some corner cases that
were previously uncaught.
2009-10-02 06:04:57 +00:00
Peter Bergner 182f0f0f8c gas/
* config/tc-ppc.c (md_show_usage): Rename "ppca2" to "a2".
	* doc/c-ppc.texi (PowerPC-Opts): Likewise.

gas/testsuite/
	* gas/ppc/a2.d: Rename "ppca2" to "a2".

include/opcode/
	* ppc.h (PPC_OPCODE_A2): Rename from PPC_OPCODE_PPCA2.

opcodes/
	* ppc-opc.c (PPCA2): Use renamed mask PPC_OPCODE_A2.
	* ppc-dis.c (ppc_opts): Likewise.
	Rename "ppca2" to "a2".
2009-10-01 19:24:48 +00:00
Corinna Vinschen ffca4d278e * new-features.sgml (ov-new1.7-file): Ctrl-X, not Ctrl-N.
* pathnames.sgml (pathnames-unusual): Ditto.
	* setup2.sgml (setup-locale-ov): Change description according to
	latest changes.
	(setup-locale-how): Rewrite.
	(setup-locale-console): Enable section again.  Change to reflect
	recent changes.
	(setup-locale-problems): Change to reflect recent changes.
2009-09-30 09:45:01 +00:00
Corinna Vinschen 4180b64df4 * fhandler_console.cc (beep): Move up to avoid forward declaration.
(fhandler_console::read): Just beep on characters invalid in current
	charset.  Add comment.
2009-09-30 09:23:45 +00:00
Eric Blake 1c0909882c * syscalls.cc (rename): Fix regression in rename("dir","d/"). 2009-09-30 02:11:05 +00:00
Paolo Bonzini e634d38754 2009-09-29 Paolo Bonzini <bonzini@gnu.org>
Sync from gcc:
	2009-09-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>

	* configure.ac: Update minimum MPC version to 0.7.
	* configure: Regenerate.
2009-09-29 21:31:07 +00:00
Keith Marshall e97ad66a84 Make MinGW printf() "%p" format compatible with MSVCRT scanf(). 2009-09-29 20:43:50 +00:00
Corinna Vinschen 50e4e69c42 * libc/locale/locale.c (loadlocale): Allow "C." same as "C-" as locale
prefix.  Add some words to documentation.
2009-09-29 19:12:28 +00:00
Corinna Vinschen 99dbad651c * libc/stdlib/sb_charsets.c: Throughout, translate undefined
characters to their corresponding Windows Unicode value.
2009-09-29 19:11:01 +00:00
Nick Clifton 55c20b09b7 bfd
* Makefile.am (ALL_MACHINES): Add cpu-rx.lo.
        (ALL_MACHINES_CFILES): Add cpu-rx.c.
        (BFD32_BACKENDS): Add elf32-rx.lo.
        (BFD32_BACKENDS_CFILES): Add elf32-rx.c.
        * archures.c (bfd_architecture): Add bfd_arch_rx and bfd_mach_rx.
        Export bfd_rx_arch.
        (bfd_archures_list): Add bfd_rx_arch.
        * config.bfd: Add entry for rx-*-elf.
        * configure.in: Add entries for bfd_elf32_rx_le_vec and
        bfd_elf32_rx_be_vec.
        * reloc.c: Add RX relocations.
        * targets.c: Add RX target vectors.
        * Makefile.in: Regenerate.
        * bfd-in2.h: Regenerate.
        * configure: Regenerate.
        * libbfd.h: Regenerate.
        * cpu-rx.c: New file.
        * elf32-rx.c: New file.

binutils
        * readelf.c: Add support for RX target.
        * MAINTAINERS: Add DJ and NickC as maintainers for RX.

gas
        * Makefile.am: Add RX target.
        * configure.in: Likewise.
        * configure.tgt: Likewise.
        * read.c (do_repeat_with_expander): New function.
        * read.h: Provide a prototype for do_repeat_with_expander.
        * doc/Makefile.am: Add RX target documentation.
        * doc/all.texi: Likewise.
        * doc/as.texinfo: Likewise.
        * Makefile.in: Regenerate.
        * NEWS: Mention support for RX architecture.
        * configure: Regenerate.
        * doc/Makefile.in: Regenerate.
        * config/rx-defs.h: New file.
        * config/rx-parse.y: New file.
        * config/tc-rx.h: New file.
        * config/tc-rx.c: New file.
        * doc/c-rx.texi: New file.

gas/testsuite
        * gas/rx: New directory.
        * gas/rx/*: New set of test cases.
        * gas/elf/section2.e-rx: New expected output file.
        * gas/all/gas.exp: Add support for RX target.
        * gas/elf/elf.exp: Likewise.
        * gas/lns/lns.exp: Likewise.
        * gas/macros/macros.exp: Likewise.

include
        * dis-asm.h: Add prototype for print_insn_rx.

include/elf
        * rx.h: New file.

include/opcode
        * rx.h: New file.

ld
        * Makefile.am: Add rules to build RX emulation.
        * configure.tgt: Likewise.
        * NEWS: Mention support for RX architecture.
        * Makefile.in: Regenerate.
        * emulparams/elf32rx.sh: New file.
        * emultempl/rxelf.em: New file.

opcodes
        * Makefile.am: Add RX files.
        * configure.in: Add support for RX target.
        * disassemble.c: Likewise.
        * Makefile.in: Regenerate.
        * configure: Regenerate.
        * opc2c.c: New file.
        * rx-decode.c: New file.
        * rx-decode.opc: New file.
        * rx-dis.c: New file.
2009-09-29 14:17:13 +00:00
Corinna Vinschen 4abcdf2717 * fhandler_socket.cc (fhandler_socket::recv_internal): Always call
WSARecv on SOCK_STREAM sockets.
2009-09-29 08:46:29 +00:00
Jeff Johnston c38ed7c697 2009-09-28 Michael Eager <eager@eagercon.com>
* configure.in: Add microblaze-*-*.
        * configure: Add microblaze-*-* (not regenerated.)
        * microblaze: NEW microblaze target directory.
        * microblaze/configure.in: NEW.
        * microblaze/configure: Generate.
        * microblaze/Makefile.in: NEW.
        * microblaze/{crt0.S, crt1.S, crt2.S, crt3.S, crt4.S, crtinit.S}: NEW.
        * microblaze/{pgcrtinit.S, _program_clean.S, _program_init.S,
        sbrk.c, sim-crtinit.S, sim-pgcrtinit.S, timer.c, _exception_handler.S,
        _hw_exception_handler.S, _interrupt_handler.S, xil_malloc.c,
        nnxil_printf.c, xil_sbrk.c: NEW.
        * microblaze/xilinx.ld: NEW.
2009-09-28 16:43:57 +00:00
Jeff Johnston 6c249577fb 2009-09-28 Michael Eager <eager@eagercon.com>
* configure.host: Add microblaze.
        * libc/include/machine/ieeefp.h [MICROBLAZE]: Define __IEEE_BIG_ENDIAN.
        * libc/include/machine/setjmp.h [MICROBLAZE]: Define _JBLEN, _JBTYPE.
        * libc/include/sys/config.h [MICROBLAZE]: Define _REENT_SMALL,
        _UNIX98_THREAD_MUTEX_ATTRIBUTES.
        * libc/include/sys/types.h: Treat XMK like rtems, define
        PTHREAD_MUTEX_NORMAL, PTHREAD_MUTEX_ERRORCHECK, PTHREAD_MUTEX_RECURSIVE,
        PTHREAD_MUTEX_DEFAULT, PTHREAD_STACK_MIN, define stuct pthread_attr_s.
        * libc/machine/configure.in: Add microblaze.
        * libc/machine/configure: Add microblaze (not regenerated).
        * libc/machine/microblaze/configure.in: NEW.
        * libc/machine/microblaze/configure: Generate.
        * libc/machine/microblaze/Makefile.am: NEW.
        * libc/machine/microblaze/Makefile.in: Generate.
        * libc/machine/microblaze/{abort.c, strcmp.c, strcpy.c, strlen.c,
        mallocr.c, longjmp.S, setjmp.S}: NEW.
        * libc/stdlib/mallocr.c [MICROBLAZE]: Don't declare sbrk prototype,
        mALLOc(): return malloc value.
2009-09-28 16:42:21 +00:00
Corinna Vinschen 587b75f7bd * fhandler.h (class dev_console): Constify charset parameter of
str_to_con.
	* fhandler_console.cc (dev_console::con_to_str): Simplify.  Always
	default to the current internal locale.
	(dev_console::get_console_cp): Always use codepage 437 for alternate
	charset.
	(dev_console::str_to_con): Constify charset parameter.
	(fhandler_console::write_normal): Always use codepage 437 for alternate
	charset.  Otherwise always default to the current internal locale.
	Replace ASCII SO with ASCII CAN.
	* strfuncs.cc: Tweka comments according to below changes.
	(sys_cp_wcstombs): Constify charset parameter.  Convert all wchar_t
	values in the Unicode private use area U+F0xx to the singlebyte
	counterpart.  Drop special handling creating ASCII SO sequence from
	U+DCxx value.  Rearrange for performance.  Replace ASCII SO with
	ASCII CAN.
	(sys_cp_mbstowcs): Constify charset parameter.  Replace ASCII SO with
	ASCII CAN.  Drop special case for U+DCxx ASCII SO sequences.  Always
	create a replacement from the Unicode private use area U+F0xx for
	invalid byte values in a multibyte sequence.  Do the same for wchar_t
	values from the U+F0xx range to make them roundtrip safe.
	* wchar.h (sys_cp_wcstombs): Constify charset parameter.
	(sys_cp_mbstowcs): Ditto.
2009-09-28 12:10:32 +00:00
Corinna Vinschen d856640e1c * cygheap.cc (cygheap_init): Default locale.charset to "UTF-8".
* dcrt0.cc (dll_crt0_1): Call setlocale (LC_CTYPE, "") here, just
	before resetting application locale to "C".
	* environ.cc (environ_init): Drop code setting locale here.
	* syscalls.cc (check_codepage): Break out check for required codepage
	from internal_setlocale.
	(internal_setlocale): Just convert CWD and $PATH from old charset to
	new charset and set internal charset.
	(setlocale): Change accordingly.  Don't require LC_ALL or LC_CTYPE to
	store old locale value.  Always call internal_setlocale if charset
	changed due to locale environment changes.
2009-09-28 10:43:49 +00:00
Corinna Vinschen a58d484bcf * libc/locale/locale.c (lc_ctype_charset): Set to "UTF-8" on Cygwin.
(lc_message_charset): Ditto.
	(loadlocale): Set charset of the "C" locale to "UTF-8" on Cygwin.
	* libc/stdlib/mbtowc_r.c (__mbtowc): Default to __utf8_mbtowc on
	Cygwin.
	* libc/stdlib/wctomb_r.c (__wctomb): Default to __utf8_wctomb on
	Cygwin.
2009-09-27 12:21:16 +00:00
Eric Blake 7677a6b206 * new-features.sgml (ov-new1.7-file): Mention fexecve, execvpe. 2009-09-26 21:01:59 +00:00
Eric Blake 15e9ecd14a Add fexecve, execvpe.
* exec.cc (fexecve): New function.
* cygwin.din (execvpe, fexecve): Export new fexecve and existing
execvpe.
* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
* posix.sgml: Mention them.
2009-09-26 21:01:10 +00:00