Commit Graph

9673 Commits

Author SHA1 Message Date
Paolo Bonzini 8ebdc5d855 moved to the attic to please handling of src-support module 2007-05-21 16:07:45 +00:00
Paolo Bonzini c6f19a8386 add this momentarily, will move them to the attic soon 2007-05-21 16:05:57 +00:00
Corinna Vinschen 8e563c2741 * include/search.h (hsearch_r): Provide declaration. 2007-05-21 13:34:12 +00:00
Corinna Vinschen b7a37e8d7c * fhandler_floppy.cc (fhandler_dev_floppy::lseek): Set buf size to
sector size.  Simplify non-sector aligned case.  Handle errors from
	raw_read.
2007-05-21 09:11:27 +00:00
Chris Sutcliffe 2c656a51c9 2007-05-19 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
* include/shellapi.h (NIN_POPUPOPEN, NIN_POPUPCLOSE): Define.
2007-05-19 23:52:44 +00:00
Caroline Tice 7ce1923125 Add ability to report when a variable's value is uninitialized,
based on information provided by the compiler.  Also add new
DWARF OP, DW_OP_GNU_uninit, for this purpose.
2007-05-18 19:42:42 +00:00
Eric Blake 8aab2bc260 * libc/stdio/vfprintf.c [_WANT_IO_LONG_LONG]: Allow non-gcc
compilers.
* libc/stdio/vfscanf.c: Likewise.
2007-05-18 14:33:30 +00:00
Jeff Johnston b2250c70bd 2007-05-17 Cary R. <cygcary <at> yahoo.com>
* libm/math/w_atan2.c: Fix atan2 to be consistent with glibc
        (atan2(+0,-0), atan2(-0,-0) and atan(-0,+0))
        * libm/math/wf_atan2.c: Ditto.
2007-05-17 21:52:11 +00:00
Jeff Johnston e0500490bc 2007-05-17 Yaakov Selkowitz <yselkowitz <at> users.sourceforge.net>
* libm/common/Makefile.am: Add support for exp10, exp10f,
        pow10, and pow10f functions.
        * libm/common/Makefile.in: Regenerated.
        * libm/common/s_pow10.c: New file.
        * libm/common/sf_pow10.c: Ditto.
        * libm/common/s_exp10.c: Ditto.
        * libm/common/sf_exp10.c: Ditto.
        * libc/include/math.h [!pow10]: New pow10 prototype.
        [!pow10f]: New pow10f prototype.
        [!exp10]: New exp10 prototype.
        [!exp10f]: New exp10f prototype.
2007-05-17 18:50:57 +00:00
Eric Blake 487e9075d0 * stdio/tmpfile.c: Include <sys/stat.h>.
* stdio64/tmpfile64.c: Ditto.
2007-05-17 12:10:29 +00:00
Eric Blake d009633d30 Close security hole in tmpfile.
* libc/stdio/tmpfile.c (_tmpfile_r): Avoid window between filename
generation and opening the fd.
* libc/stdio64/tmpfile64.c (_tmpfile64_r): Likewise.
2007-05-16 20:06:08 +00:00
Eric Blake 895d76fed6 * libc/include/math.h (INFINITY, NAN, FP_ILOGB0, FP_ILOGBNAN)
(MATH_ERRNO, MATH_ERREXCEPT, math_errhandling): Add macros
	required by POSIX.
	* libc/stdlib/ldtoa.c (USE_INFINITY): Rename from INFINITY, to
	avoid clash with <math.h>.
2007-05-16 19:59:40 +00:00
Eric Blake f65607751c * libc/stdlib/wctomb_r.c (_wctomb_r): Avoid gcc warnings on cygwin.
* libc/search/hash.c (__hash_open): Likewise.
2007-05-16 19:31:08 +00:00
Paolo Bonzini 2ba0944446 2007-05-16 Paolo Bonzini <bonzini@gnu.org>
* Makefile.def (bootstrap_stage): Replace stage_make_flags with
	stage_cflags.
	* Makefile.tpl (POSTSTAGE1_HOST_EXPORTS, POSTSTAGE1_FLAGS_TO_PASS):
	Remove CFLAGS/LIBCFLAGS.
	(configure-stage[+id+]-[+prefix+][+module+],
	all-stage[+id+]-[+prefix+][+module+]): Pass it from [+stage_cflags+].
	* Makefile.in: Regenerate.
2007-05-16 09:03:22 +00:00
Corinna Vinschen f9a963b8a0 * fhandler_socket.cc (adjust_socket_file_mode): New inline function.
(fhandler_socket::fchmod): Squeeze mode through adjust_socket_file_mode
	before using it.
	(fhandler_socket::bind): Ditto.
2007-05-15 16:33:20 +00:00
Christopher Faylor 90c2ba7806 * path.cc (fs_info::update): Set and use is_cdrom.
* path.cc (fillout_mntent): Set ret.mnt_type to something more Linux-like,
based on data from fs_info.  Move "system" and "user" strings from mnt_type to
mnt_opts.
* path.h (struct fs_info): Add is_cdrom field.
* path.h (fs_info::clear): Initialize is_cdrom.
* path.h (struct fs_info): Add IMPLEMENT_STATUS_FLAG(bool,is_cdrom).
* path.h (class path_conv): Add fs_is_cdrom method.  Add missing fs_is_netapp
method.
2007-05-15 01:27:30 +00:00
Christopher Faylor 22ed94e503 * cygwin.din (asnprintf, dprint, _Exit, vasnprintf, vdprintf): Export.
* include/cygwin/version.h: Bump API minor number.
2007-05-15 01:23:30 +00:00
Eric Blake 34507ce026 Reduce stack size of *printf.
* libc/stdio/vfprintf.c (_VFPRINTF_R): Fix use of decimal point
in %f.  Avoid malloc when possible for %S.
(BUF): Improve stack locality by using smaller size.
(MAXEXPLEN, _PRINTF_FLOAT_TYPE): Define.
(exponent): Use smaller stack size.
2007-05-14 19:42:47 +00:00
Alan Modra 7b63e3a697 include/elf/
* spu.h (R_SPU_ADDR16X): Define.
	(R_SPU_PPU32, R_SPU_PPU64): Renumber.
bfd/
	* elf32-spu.c (elf_howto_table): Add howto for R_SPU_ADDR16X.
2007-05-12 06:45:32 +00:00
Eric Blake 0962fe9178 Minimize printf/scanf size on platforms that don't need C99.
* acconfig.h (_WANT_IO_C99_FORMATS): New macro.
* newlib.hin (_WANT_IO_C99_FORMATS): Likewise.
* configure.in (newlib-io-c99-formats): New configure option.
(_WANT_IO_C99_FORMATS): Define appropriately.
* configure.host (*-linux*, cygwin): Default c99-formats to yes.
* libc/stdio/vfprintf.c (_VFPRINTF_R) [!_WANT_IO_C99_FORMATS]:
Cripple ' flag; hh, z, j, t sizes; a, A, F, C, S specifiers.
* libc/stdio/vfscanf.c (_VFSCANF_R) [!_WANT_IO_C99_FORMATS]:
Likewise.
* configure: Regenerate.
2007-05-11 20:09:00 +00:00
Eric Blake b8a37af936 * libc/stdio/vfprintf.c (_VFPRINTF_R, cvt, exponent, chclass)
(get_arg): Support '%a' and '%A'.
2007-05-11 13:09:44 +00:00
Alan Modra a7af95ad76 include/elf/
* spu.h (R_SPU_PPU32, R_SPU_PPU64): Define.
bfd/
	* reloc.c (BFD_RELOC_SPU_PPU32, BFD_RELOC_SPU_PPU64): Define.
	* elf-bfd.h (struct elf_backend_data): Change return type of
	elf_backend_relocate_section to int.
	* elf32-spu.c (elf_howto_table): Add howtos for R_SPU_PPU32 and
	R_SPU_PPU64.
	(spu_elf_bfd_to_reloc_type): Convert new relocs.
	(spu_elf_count_relocs): New function.
	(elf_backend_count_relocs): Define.
	(spu_elf_relocate_section): Arrange to emit R_SPU_PPU32 and
	R_SPU_PPU64 relocs.
	* elflink.c (elf_link_input_bfd): Emit relocs if relocate_section
	returns 2.
	* bfd-in2.h: Regenerate.
	* libbfd.h: Regenerate.
gas/
	* config/tc-spu.c (md_pseudo_table): Add int, long, quad.  Call
	spu_cons for word.
	(md_assemble): Tidy use of insn.flag.
	(get_imm): Likewise.  Handle uppercase input too.
	(spu_cons): New function.
	* config/tc-spu.h (tc_fix_adjustable): Don't adjust SPU_PPU relocs.
	(TC_FORCE_RELOCATION): Don't resolve them either.
binutils/
	* embedspu.sh (find_prog): Prefer prog in same dir as embedspu
	over one found on the users path.
	(main): Generate .reloc for each R_SPU_PPU* reloc.
2007-05-11 03:10:10 +00:00
Eric Blake 81274c6726 Allow zero size with non-null buf in *asnprintf.
* libc/stdio/asnprintf.c (_asnprintf_r, asnprintf): Avoid free'ing
user's buf.
* libc/stdio/asniprintf.c (_asniprintf_r, asniprintf): Likewise.
* libc/stdio/vasniprintf.c (_vasniprintf_r): Likewise.
* libc/stdio/vasnprintf.c (_vasnprintf_r): Likewise.
2007-05-09 19:27:30 +00:00
Eric Blake 38ed4e5111 * libc/stdio/vfprintf.c: Fix typo in comments that breaks docs. 2007-05-08 03:59:13 +00:00
Danny Smith 22af2ce141 * include/stdint.h (intptr_t): Fix typo.
Thanks to Charles Wilson for report.
2007-05-08 03:19:28 +00:00
DJ Delorie eb4b7204c2 merge from gcc 2007-05-08 01:29:28 +00:00
Danny Smith 993e75f677 * include/stdint.h (intptr_t): Protect with _INTPTR_T_DEFINED.
Condition on _WIN64.
	(uintptr_t): Protect with _UINTPTR_T_DEFINED.  Condition on _WIN64.
	(INTPTR_MIN, INTPTR_MAX, UINTPTR_MAX): Condition on _WIN64.
	(PTRDIFF_MIN): Define as INTPTR_MIN.
	(PTRDIFF_MAX): Define as INTPTR_MAX.
	(SIG_ATOMIC_MIN): Define as INTPTR_MIN.
	(SIG_ATOMIC_MAX): Define as INTPTR_MAX.
2007-05-07 23:42:27 +00:00
Jeff Johnston 8f954ad3f8 2007-05-07 Patrick Mansfield <patmans@us.ibm.com>
* spu/open.c: Unconditionally set the "mode" to fix a bug where
        mode was not properly set.
2007-05-07 22:22:05 +00:00
Eric Blake b9db529222 Add support for asnprintf, and improve *printf documentation.
* libc/stdio/Makefile.am (ELIX_SOURCES): Rename...
	(ELIX_2_SOURCES): ...to this.
	(ELIX_4_SOURCES): Add new variable.  Build asnprintf.
	(GENERAL_SOURCES): Move dprintf to ELIX_4_SOURCES.
	(CHEWOUT_FILES): Include diprintf in documentation.
	* libc/stdio/Makefile.in: Regenerate.
	* libc/stdio/diprintf.c: Improve documentation.
	* libc/stdio/dprintf.c: Likewise.
	* libc/stdio/siprintf.c: Likewise.
	* libc/stdio/sprintf.c: Likewise.
	* libc/stdio/vfprintf.c: Likewise.
	* libc/stdio/viprintf.c: Likewise.
	* libc/stdio/vsniprintf.c: Consolidate documentation.
	* libc/stdio/asiprintf.c: Refer to documentation.
	* libc/stdio/asprintf.c: Likewise.
	* libc/stdio/fiprintf.c: Likewise.
	* libc/stdio/fprintf.c: Likewise.
	* libc/stdio/iprintf.c: Likewise.
	* libc/stdio/printf.c: Likewise.
	* libc/stdio/sniprintf.c: Likewise.
	* libc/stdio/vdiprintf.c: Likewise.
	* libc/stdio/vdprintf.c: Likewise.
	* libc/stdio/vsiprintf.c: Likewise.
	* libc/stdio/fvwrite.c (__sfvwrite_r): Handle asnprintf.
	* libc/stdio/asniprintf.c (asniprintf, _asniprintf_r): New file.
	* libc/stdio/asnprintf.c (asnprintf, _asnprintf_r): New file.
	* libc/stdio/vasniprintf.c (vasniprintf, _vasniprintf_r): New
	file.
	* libc/stdio/vasnprintf.c (vasnprintf, _vasnprintf_r): New file.
	* libc/stdio/vdprintf.c (_vdprintf_r): Rewrite to avoid malloc in
	typical case.
	* libc/stdio/vdiprintf.c (_vdiprintf_r): Likewise.
	* libc/include/stdio.h: Add prototypes for new functions; sort
	existing functions.
2007-05-04 02:55:16 +00:00
Kazu Hirata fb3937fade * libc/machine/m68k/Makefile.am (lib_a_SOURCES): Add memcpy.S
and memset.S.
	* libc/machine/m68k/Makefile.in: Regenerate.
	* libc/machine/m68k/memcpy.S: Use sub.l followed by dbra.
	* libc/machine/m68k/memset.S: Likewise.
2007-05-03 19:45:26 +00:00
Kazu Hirata a562045661 * m68k/fido-_exit.c (_exit): Use stop #0x700. 2007-05-03 01:19:45 +00:00
Alan Modra c7e9b095ac include/elf/
* internal.h (ELF_IS_SECTION_IN_SEGMENT): Check both file offset
	and vma for appropriate sections.
bfd/
	* elf.c (assign_file_positions_for_load_sections): Set sh_offset
	here.  Set sh_type to SHT_NOBITS if we won't be allocating
	file space.  Don't bump p_memsz for non-alloc sections.  Adjust
	section-in-segment check.
	(assign_file_positions_for_non_load_sections): Don't set sh_offset
	here for sections that have already been handled above.
2007-05-02 13:44:36 +00:00
Alan Modra 211f9f1fce gas/
PR 4448
	* config/tc-ppc.c (ppc_insert_operand): Don't increase min for
	PPC_OPERAND_PLUS1.
include/opcode/
	* ppc.h (PPC_OPERAND_PLUS1): Update comment.
2007-05-02 11:24:17 +00:00
Eric Blake b4f095585f * libc/stdio64/local64.h: Delete, move contents to...
* libc/stdio/local.h: ...here.
	* libc/stdio64/fdopen64.c: Update includes.
	* libc/stdio64/fopen64.c: Likewise.
	* libc/stdio64/freopen64.c: Likewise.
	* libc/stdio64/fseeko64.c: Likewise.
	* libc/stdio64/ftello64.c: Likewise.
	* libc/stdio/findfp.c (std) [__LARGE64_FILES]: Open stdin, stdout,
	and stderr with 64-bit offset.
	* libc/stdio/fseek.c (_fseek_r): Avoid compile warning.
	* libc/stdio/makebuf.c (__smakebuf_r): Likewise.
	* libc/stdio/mktemp.c (_gettemp): Likewise.
2007-05-01 23:03:36 +00:00
Jeff Johnston 2babeb3d94 2007-05-01 Cary R. <cygcary <at> yahoo.com>
* libm/math/e_pow.c: Fix to be consistent with glibc with regards
        to treatment of NaN and +-inf arguments.
        * libm/math/ef_pow.c: Ditto.
        * libm/math/w_pow.c: Ditto.
        * libm/math/wf_pow.c: Ditto.
        * libm/math/w_acos.c: Fix domain errors to return NaN.
        * libm/math/w_asin.c: Ditto.
        * libm/math/wf_acos.c: Ditto.
        * libm/math/wf_asin.c: Ditto.
        * libm/math/w_log.c: Fix to return NaN for negative number inputs.
        * libm/math/wf_log.c: Ditto.
        * libm/math/wf_log10.c: Ditto.
        * libm/math/w_log10.c: Ditto.
2007-05-01 18:42:15 +00:00
Alan Modra bb57ddfeb7 bfd/
* elf32-spu.c (struct spu_link_hash_table): Add stack_analysis
	and emit_stack_syms bitfields.
	(get_sym_h): Read all symbols if stack analysis will be done.
	(spu_elf_create_sections): Add stack_analysis and emit_stack_syms
	params, and stash in hash table.
	(is_hint): Split off from..
	(is_branch): ..here.  Adjust callers.
	(spu_elf_size_stubs): Add stack_analysis param.  Arrange to read
	and keep all syms.
	(write_one_stub): Fix mem leak.
	(find_function_stack_adjust): New function.
	(sort_syms_syms, sort_syms_psecs): New vars.
	(sort_syms): New function.
	(struct call_info, struct function_info): New.
	(struct spu_elf_stack_info): New.
	(alloc_stack_info, maybe_insert_function, func_name): New functions.
	(is_nop, insns_at_end, check_function_ranges): Likewise.
	(find_function, insert_callee, mark_functions_via_relocs): Likewise.
	(pasted_function, interesting_section, discover_functions): Likewise.
	(mark_non_root, call_graph_traverse, build_call_tree): Likewise.
	(sum_stack, spu_elf_stack_analysis, spu_elf_final_link): Likewise.
	(bfd_elf32_bfd_final_link): Define.
	* elf32-spu.h (struct _spu_elf_section_data): Add stack_info field.
	(spu_elf_create_sections, spu_elf_size_stubs): Update prototypes.
include/
	* bfdlink.h (struct bfd_link_info): Add "info" and "minfo".
ld/
	* ldmain.c (link_callbacks): Init info and minfo fields.
	* ldmisc.c (minfo): Do nothing if no map file.
	* emultempl/spuelf.em (stack_analysis, emit_stack_syms): New vars.
	(spu_after_open): Adjust spu_elf_create_sections call.
	(spu_before_allocation): Likewise for spu_elf_size_stubs.
	(OPTION_SPU_STACK_ANALYSIS, OPTION_SPU_STACK_SYMS): Define.
	(PARSE_AND_LIST_LONGOPTS): Add new entries.
	(PARSE_AND_LIST_OPTIONS, PARSE_AND_LIST_ARGS_CASES): Likewise.
	* gen-doc.texi: Add @set for SPU and other missing targets.
	* ld.texinfo: Update man page selection to match gen-doc.texi.
	Document SPU features.
2007-04-30 14:06:40 +00:00
Jeff Johnston 643aff874d 2007-04-27 Jeff Johnston <jjohnstn@redhat.com>
* libc/machine/m68k/Makefile.am: Temporarily remove
        memcpy.S and memset.S until logic can be confirmed for
        !(__mcoldfile__) case.
        * libc/machine/m68k/Makefile.in: Regenerated.
2007-04-27 22:10:47 +00:00
Jeff Johnston 9e5957de57 2007-04-27 Kazu Hirata <kazu@codesourcery.com>
* libc/machine/m68k/Makefile.am (lib_a_SOURCES): Add memcpy.S
	and memset.S.
	* libc/machine/m68k/Makefile.in: Regenerate.
	* libc/machine/m68k/memcpy.S, libc/machine/m68k/memset.S: New.
2007-04-27 16:05:35 +00:00
Jeff Johnston 7369eb7af3 2007-04-27 Kazu Hirata <kazu@codesourcery.com>
* libgloss/m68k/fido.sc: Catch .text.*, .rodata.*, .data.*,
        .bss.*, .ctor.*, and .dtor.*.  Wrap ctor/dtor-related sections
        with KEEP.
2007-04-27 16:00:45 +00:00
Christopher Faylor 5682d0f1a7 * include/cygwin/time.h: Use __cdecl on declaration. Remove
declarations which are duplicated in include/time.h.
2007-04-27 13:34:25 +00:00
Alan Modra 2388178da8 Write Mimi's name in ASCII. 2007-04-27 03:37:43 +00:00
Jeff Johnston 976e9d281b 2007-04-26 Patrick Mansfield <patmans@us.ibm.com>
* libc/include/ieeefp.h: use prefixed __ieeefp_ macros that can be
        overridden via machine/ieeefp.h.
        * libc/include/machine/ieeefp.h: Add SPU specific C99 and ieeefp
        macros for isnan and related macros.
        * libc/include/math.h: Allow C99 isfinite, isinf, and isnan to be
        overridden via machine/ieeefp.h.
        * libm/machine/spu/Makefile.am: Add new files.
        * libm/machine/spu/Makefile.in: Autogenerate with new files.
        * libm/machine/spu/sf_fpclassify.c: Add SPU specific __fpclassifyf.
        * libm/machine/spu/sf_finite.c: Add SPU specific finitef.
        * libm/machine/spu/sf_isinf.c: Add SPU specific isinff.
        * libm/machine/spu/sf_isinff.c: Add SPU specific __isinff.
        * libm/machine/spu/sf_isnan.c: Add SPU specific isnanf.
        * libm/machine/spu/sf_isnanf.c: Add SPU specific __isnanf.
        * libm/machine/spu/sf_nan.c: Add SPU specific nanf.
2007-04-26 19:23:37 +00:00
Jan Beulich 0e78d0f675 Revert the value change of DT_ENCODING from 2003-01-17. Luckily (and
surprisingly) the value isn't really being used anywhere, henc no other
changes are needed.

include/elf/
2007-04-26  Jan Beulich  <jbeulich@novell.com>

	* common.h (DT_ENCODING): Correct value (back to spec mandated
	value).
2007-04-26 06:59:55 +00:00
DJ Delorie 9c6c22286c merge from gcc 2007-04-26 03:13:46 +00:00
Jeff Johnston 34450bd565 2007-04-25 Jeff Johnston <jjohnstn@redhat.com>
* libm/common/s_fpclassify.c (__fpclassifyf): Move this to...
        * libm/common/sf_fpclassify.c: ...here.  New file.
        * libm/common/Makefile.am: Add sf_fpclassify.c.
        * libm/common/Makefile.in: Regenerated.
2007-04-25 22:28:19 +00:00
Jeff Johnston 42cd3e6c52 2007-04-25 Patrick Mansfield <patmans@us.ibm.com>
* libc/machine/spu/sys/errno.h: New file, so spu errno values match
	ppu linux values. This file is a copy of the cris/sys/errno.h plus
	a few changes (see spu errno.h comments).
2007-04-25 20:45:39 +00:00
Jeff Johnston 8b36608695 2007-04-25 Eric Blake <ebb9@byu.net>
* libc/stdio/vfprintf.c (get_arg): Support %1$lc.  Simplify types
        that promote to int.
2007-04-25 19:47:36 +00:00
Jeff Johnston 245240b5e9 2007-04-25 Patrick Mansfield <patmans@us.ibm.com>
* feholdexcept.h: Use *envp not env so we clear the proper bits in
        the fpscr, and don't set some random ones.
2007-04-25 17:36:32 +00:00
Eric Blake 5866c02352 * libc/stdio/vfprintf.c (_VFPRINTF_R): Don't zero pad on infinity
or NaN with %05f.
2007-04-24 20:09:50 +00:00
Eric Blake 27e5e9ab05 * libc/stdio/vfprintf.c (_VFPRINTF_R): Avoid multibyte when not
_MB_CAPABLE.
2007-04-24 19:55:28 +00:00