Jeff Johnston [Wed, 13 Jun 2007 17:55:28 +0000 (17:55 +0000)]
2007-06-13 Patrick Mansfield <patmans@us.ibm.com>
* libc/machine/spu/creat.c: New file copied from libc/posix/creat.c,
it just calls open with appropriate arguments.
* libc/machine/spu/Makefile.am: Add creat.c.
* libc/machine/spu/Makefile.in: Regenerate.
Jeff Johnston [Wed, 13 Jun 2007 17:44:24 +0000 (17:44 +0000)]
2007-06-13 Patrick Mansfield <patmans@us.ibm.com>
* libc/include/sys/features.h: Define _POSIX_TIMERS for spu.
* libc/include/sys/unistd.h: Change usleep prototype to Posix
form and move outside of OS flag checks.
* libc/machine/spu/Makefile.am: Add sleep and usleep.
* libc/machine/spu/Makefile.in: Regenerate.
* libc/machine/spu/sleep.c: Copy libc/posix/sleep.c.
* libc/machine/spu/usleep.c: Copy libc/posix/usleep.c.
Corinna Vinschen [Mon, 11 Jun 2007 17:38:27 +0000 (17:38 +0000)]
* cygwin.din (confstr): Export.
* posix.sgml (confstr): Move to list of implemented SUSv3 functions.
* sysconf.cc (confstr): Implement.
* include/cygwin/version.h: Bump API minor number.
Bob Wilson [Mon, 11 Jun 2007 16:53:08 +0000 (16:53 +0000)]
bfd/
* elf32-xtensa.c (extend_ebb_bounds_forward): Use renamed
XTENSA_PROP_NO_TRANSFORM flag instead of XTENSA_PROP_INSN_NO_TRANSFORM.
(extend_ebb_bounds_backward, compute_text_actions): Likewise.
(compute_ebb_proposed_actions, coalesce_shared_literal): Likewise.
(xtensa_get_property_predef_flags): Likewise.
(compute_removed_literals): Pass new arguments to is_removable_literal.
(is_removable_literal): Add sec, prop_table and ptblsize arguments.
Do not remove literal if the NO_TRANSFORM property flag is set.
gas/
* config/tc-xtensa.c (XTENSA_PROP_INSN_NO_TRANSFORM): Renamed to...
(XTENSA_PROP_NO_TRANSFORM): ...this.
(frag_flags_struct): Move is_no_transform out of the insn sub-struct.
(xtensa_mark_frags_for_org): New.
(xtensa_handle_align): Set RELAX_ORG frag subtype for rs_org.
(xtensa_post_relax_hook): Call xtensa_mark_frags_for_org.
(get_frag_property_flags): Adjust reference to is_no_transform flag.
(xtensa_frag_flags_combinable): Likewise.
(frag_flags_to_number): Likewise. Use XTENSA_PROP_NO_TRANSFORM.
* config/tc-xtensa.h (xtensa_relax_statesE): Add RELAX_ORG.
include/elf/
* xtensa.h (XTENSA_PROP_INSN_NO_TRANSFORM): Renamed to...
(XTENSA_PROP_NO_TRANSFORM): ...this.
ld/
* emultempl/xtensaelf.em (replace_insn_sec_with_prop_sec): Use renamed
XTENSA_PROP_NO_TRANSFORM flag instead of XTENSA_PROP_INSN_NO_TRANSFORM.
* libc/sys/mmixware/access.c (access): Do not try to use a magic
file-handle and a direct syscall, just use _open.
* libc/sys/mmixware/sys/syscall.h (TMPFNO): Remove this magic
file-handle.
* libc/sys/mmixware/_exit.c (_exit): Update comment about
passing on the exit value.
Jeff Johnston [Tue, 5 Jun 2007 19:01:30 +0000 (19:01 +0000)]
2007-06-05 Patrick Mansfield <patman@us.ibm.com>
* spu/jsre.h: Remove the assist call structs and defines that are
specific to one assist call from here.
* spu/access.c: Move struct syscall_access_t to here.
* spu/fstat.c: Move struct syscall_fstat_t to here.
* spu/ftruncate.c: Move struct syscall_ftruncate_t to here.
* spu/gettimeofday.c: Move struct syscall_gettimeofday_t to here.
* spu/lseek.c: Move struct syscall_lseek_t and JSRE_SEEK defines to
here.
* spu/open.c: Move struct syscall_open_t and JSRE_O_ defines to here.
* spu/read.c: Move struct syscall_read_t to here, and actually use
it (it is the same as syscall_write_t).
* spu/stat.c: Move struct syscall_stat_t to here.
* spu/write.c: Move struct syscall_write_t to here.
* spu/close.c: Pass the address of the first and only argument to
__send_to_ppe rather than using an automatic variable and a
special struct.
* spu/dup.c: Ditto.
* spu/unlink.c: Ditto.
* cygcheck.cc (pathlike): New class.
(paths): Redefine as type pathlike.
(display_error): Declare a few different ways to allow more flexible usage
throughout.
(display_error_fmt): New function for those cases where C++ just isn't enough.
(add_path): Rewrite to allocate pathlike paths. Always tack on a trailing
slash since that's what everyone who uses it wants. NULL terminate the path
list. Register "it's a system path" field.
(init_path): Call add_path with info regarding whether path is a system path or
not.
(pathlike::check_existence): Move into pathlike class. Accept file and
extension arguments to build up path on the fly. Modify other arguments.
(find_on_path): Constify return value and appropriate arguments. Eliminate
short-circuit for fully-qualified paths. Simplify loop which iterates over
path.
(already_did): Constify argument.
(track_down): Ditto. Regularize some error messages.
(find_app_on_path): Ditto.
(cygcheck): Constify argument. Use 20th century string handling functions.
(dump_sysinfo): Remove odd inclusion of '\\bin' "Just in case". Accommodate
change of paths to pathlike.
* path.cc (isslash): Rename from SLASH_P and use throughout.
(rel_vconcat): Front-end to vconcat which prepends cwd to path before passing
along for conversion to native windows.
(cygpath): Remove "./" test. Call rel_vconcat if filename appears to be
relative.
Corinna Vinschen [Tue, 29 May 2007 17:25:36 +0000 (17:25 +0000)]
* dtable.cc (dtable::set_file_pointers_for_exec): Call SetFilePointer
correctly for 64 bit file access. Comment out functionality.
* fhandler.cc (fhandler_base::open): Don't set append_mode.
(fhandler_base::write): Check for O_APPEND instead of append_mode.
Call SetFilePointer correctly for 64 bit file access. Handle
errors from SetFilePointer.
* fhandler.h (class fhandler_base): Drop append_mode status flag.
* fhandler_disk_file.cc (fhandler_base::fstat_helper): Handle
seeking correctly for 64 bit file access.
Corinna Vinschen [Tue, 29 May 2007 07:54:45 +0000 (07:54 +0000)]
* cygpath.cc (do_options): Allow outputflag combined with other
basic flags. Only check options_from_file_flag if reading options
from command line.
(main): Check for NULL argz vector. Don't free argz vector prematurely.
Don't force flag combination in !options_from_file_flag case.
Eric Blake [Thu, 24 May 2007 04:25:18 +0000 (04:25 +0000)]
* libc/stdio/vfprintf.c (_VFPRINTF_R): Don't truncate %p when
sizeof(void*) is 8 but sizeof(long) is 4.
* libc/stdio/vfscanf.c (__SVFSCANF_R): Likewise. Fix %i scanning
of "-0x". Support "-nan" and "inf" for %e. Audit usage of ungetc
to fix reentrancy and bug on encoding error in multibyte locales.
Always return EOF on read error.
Jeff Johnston [Wed, 23 May 2007 21:39:54 +0000 (21:39 +0000)]
2007-05-23 Patrick Mansfield <patmans@us.ibm.com>
* spu/syscalls.c: Change __send_to_ppe to return the result stored
in stored in slot 0 of the data, rather than have each assisted
call retrieve the value.
* spu/jsre.h: Remove the now unused syscall_out_t.
* spu/access.c: Use the __send_to_ppe result instead of the slot 0
value, remove unused syscall_out_t variable.
* spu/close.c: Ditto.
* spu/dup.c: Ditto.
* spu/fstat.c: Ditto.
* spu/ftruncate.c: Ditto.
* spu/gettimeofday.c: Ditto.
* spu/lseek.c: Ditto.
* spu/open.c: Ditto.
* spu/read.c: Ditto.
* spu/stat.c: Ditto.
* spu/unlink.c: Ditto.
* spu/write.c: Ditto.
Corinna Vinschen [Wed, 23 May 2007 16:45:03 +0000 (16:45 +0000)]
* cygpath.cc: Include argz.h.
(options_from_file_flag): Move from main to global static variable.
(mode_flag): Ditto.
(do_sysfolders): Rename from dowin and accommodate throughout.
Don't exit from here.
(do_pathconv): Rename from doit and accommodate throughout.
(print_version): Change copyright.
(do_options): New function, centralizing option processing.
Rework checking options for correctness.
(action): New function, centralizing calling worker functions.
(main): Simplify. Move option processing to do_options. Move calling
worker functions to action. Rework getting arguments from files.
Corinna Vinschen [Wed, 23 May 2007 16:36:23 +0000 (16:36 +0000)]
* libc/argz/argz_create_sep.c (argz_create_sep): Initialize *argz_len
to zero.
* libc/include/argz.h: Guard against multiple inclusion. Guard for
use with C++.
Caroline Tice [Fri, 18 May 2007 19:42:42 +0000 (19:42 +0000)]
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.
Eric Blake [Wed, 16 May 2007 20:06:08 +0000 (20:06 +0000)]
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.
Corinna Vinschen [Tue, 15 May 2007 16:33:20 +0000 (16:33 +0000)]
* 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.
* 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.
Eric Blake [Mon, 14 May 2007 19:42:47 +0000 (19:42 +0000)]
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.
Alan Modra [Fri, 11 May 2007 03:10:10 +0000 (03:10 +0000)]
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.
Danny Smith [Mon, 7 May 2007 23:42:27 +0000 (23:42 +0000)]
* 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.
Kazu Hirata [Thu, 3 May 2007 19:45:26 +0000 (19:45 +0000)]
* 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.
Alan Modra [Wed, 2 May 2007 13:44:36 +0000 (13:44 +0000)]
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.
Jeff Johnston [Tue, 1 May 2007 18:42:15 +0000 (18:42 +0000)]
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.
Jeff Johnston [Fri, 27 Apr 2007 22:10:47 +0000 (22:10 +0000)]
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.