Corinna Vinschen [Tue, 23 Oct 2007 16:26:28 +0000 (16:26 +0000)]
* cygheap.h (struct cwdstuff): Drop hash member. Drop get_hash,
get_initial, and fixup_after_exec declarations.
Convert win32 to UNICODE_STRING.
(cwdstuff::get_drive): Convert win32 path in current codepage.
(cwdstuff::set): Take native NT path.
* ntdll.h (struct _TEB): Typedef.
* path.cc (mount_info::conv_to_posix_path): Add variant taking
wide char DOS paths.
(symlink_info::posixify): Simplify concatenating cwd and relative path.
(hash_path_name): Drop special relative path handling.
(chdir): Drop special "drive only" handling. Call cwdstuff::set with
native path.
(cwdstuff::get_hash): Remove.
(windows_system_directory): Remove.
(_upp): Remove.
(get_user_proc_parms): Make inline. Get PEB pointer by calling
NtCurrentTeb.
(cwdstuff::init): Simplify.
(cwdstuff::set): Rework to handle incoming native NT path. Workaround
a Vista problem with CWD handle in the user process parameter block.
(cwdstuff::get): Simplify locking. Accommodate type change of win32.
* shared_info.h (mount_info): Add declaration for new conv_to_posix_path
method.
* strfuncs.cc (sys_wcstombs): Return correct length of created
multi-byte string.
Jeff Johnston [Thu, 18 Oct 2007 00:03:32 +0000 (00:03 +0000)]
2007-10-17 Jeff Johnston <jjohnstn@redhat.com>
* libm/mathfp/s_logarithm.c: Fix error introduced by previous
fix when handling negative input values. Make function
consistent with math directory and glibc version such that
inf and nan values return inf and nan respectively with no
errno setting.
* libm/mathfp/sf_logarithm.c: Ditto.
* libm/math/w_log.c: Set errno to ERANGE when input is 0.0.
* libm/math/wf_log.c: Ditto.
* libm/math/w_log10.c: Ditto.
* libm/math/wf_log10.c: Ditto.
Jeff Johnston [Mon, 15 Oct 2007 20:47:15 +0000 (20:47 +0000)]
2007-10-15 Patrick Mansfield <patmans@us.ibm.com>
* Makefile.def: To avoid problems running with parallel makes,
build newlib before libgloss so that target specific header
files are availble.
* Makefile.in: Regenerate.
* NEWS: Document target described register support for PowerPC.
* ppc-tdep.h: Remove ppc_spr constants.
(struct gdbarch_tdep): Remove regs, ppc_sr0_regnum, and
ppc_builtin_type_vec128 members.
(PPC_R0_REGNUM, PPC_F0_REGNUM, PPC_PC_REGNUM, PPC_MSR_REGNUM)
(PPC_CR_REGNUM, PPC_LR_REGNUM, PPC_CTR_REGNUM, PPC_XER_REGNUM)
(PPC_FPSCR_REGNUM, PPC_MQ_REGNUM, PPC_SPE_UPPER_GP0_REGNUM)
(PPC_SPE_ACC_REGNUM, PPC_SPE_FSCR_REGNUM, PPC_VR0_REGNUM)
(PPC_VSCR_REGNUM, PPC_VRSAVE_REGNUM, PPC_NUM_REGS): New constants.
* rs6000-tdep.c: Include preparsed descriptions.
(init_sim_regno_table): Do not iterate over pseudo registers.
Look up segment registers by name. Use sim_spr_register_name
for SPRs.
(rs6000_register_sim_regno): Call init_sim_regno_table here.
(rs6000_builtin_type_vec128): Delete.
(rs6000_register_name): Only handle SPE pseudo registers and upper
halves. Call tdesc_register_name for everything else.
(rs6000_register_type): Delete. Replace with...
(rs6000_pseudo_register_type): ...this new function. Only handle
SPE pseudo registers.
(rs6000_register_reggroup_p): Delete. Replace with...
(rs6000_pseudo_register_reggroup_p): ...this new function. Only
handle SPE pseudo registers.
(rs6000_convert_register_p): Use ppc_fp0_regnum instead of
"struct reg".
(rs6000_register_to_value, rs6000_value_to_register): Remove check
of reg->fpr.
(e500_register_reggroup_p): Delete.
(STR, R, R4, R8, R16, F, P8, R32, R64, R0, A4, S, S4, SN4, S64)
(COMMON_UISA_REGS, PPC_UISA_SPRS, PPC_UISA_NOFP_SPRS)
(PPC_SEGMENT_REGS, PPC_OEA_SPRS, PPC_ALTIVEC_REGS, PPC_SPE_GP_REGS)
(PPC_SPE_UPPER_GP_REGS, PPC_EV_PSEUDO_REGS): Delete macros.
(registers_powerpc, registers_403, registers_403GC, registers_505)
(registers_860, registers_601, registers_602, registers_603)
(registers_604, registers_750, registers_7400, registers_e500): Delete
variables.
(struct variant): Delete nregs, npregs, num_tot_regs, and regs. Add
tdesc.
(tot_num_registers, num_registers, num_pseudo_registers): Delete.
(variants): Delete outdated comment. Use standard target descriptions
instead of "struct reg" arrays.
(init_variants): Delete.
(rs6000_gdbarch_init): Do not guess word size from the BFD
architecture if we have a target description. Select a variant
before creating a new architecture. Use the variant's target
description if the target did not define a register layout.
Validate target-supplied registers. Reject mismatches. Use
fixed register numbers and new constants instead of magic
numbers. Call set_gdbarch_ps_regnum. Call tdesc_use_registers.
(_initialize_rs6000_tdep): Initialize the preparsed target
descriptions.
* target-descriptions.c (tdesc_predefined_types): Add int128 and
uint128.
(tdesc_find_register_early): New function.
(tdesc_numbered_register): Use it.
(tdesc_register_size): New function.
(tdesc_use_registers): Take a target_desc argument. Do not use
gdbarch_target_desc.
* target-descriptions.h (tdesc_use_registers): Update prototype
and comment.
(tdesc_register_size): New prototype.
* Makefile.in (powerpc_32_c, powerpc_403_c, powerpc_403gc_c)
(powerpc_505_c, powerpc_601_c, powerpc_602_c, powerpc_603_c)
(powerpc_604_c, powerpc_64_c, powerpc_7400_c, powerpc_750_c)
(powerpc_860_c, powerpc_e500_c, rs6000_c): New macros.
(rs6000-tdep.o): Update.
* arm-tdep.c (arm_gdbarch_init): Update call to tdesc_use_registers.
* m68k-tdep.c (m68k_gdbarch_init): Likewise.
* mips-tdep.c (mips_gdbarch_init): Likewise.
Corinna Vinschen [Mon, 15 Oct 2007 08:25:38 +0000 (08:25 +0000)]
* fhandler.cc (is_at_eof): Rewrite using NT functions.
(off_current): New static variable.
(off_append): Ditto.
(fhandler_base::raw_write): Use NtWriteFile. Accommodate O_APPEND here.
(fhandler_base::write): Drop O_APPEND hack. Use NT functions.
(fhandler_base::lseek): Rewrite using NT functions.
* fhandler_disk_file.cc (fhandler_disk_file::fstatvfs): Add space in
debug output.
(fhandler_disk_file::ftruncate): Ditto.
* ntdll.h (STATUS_DISK_FULL): Define.
(FILE_USE_FILE_POINTER_POSITION): Define.
(FILE_WRITE_TO_END_OF_FILE): Define.
Corinna Vinschen [Sat, 13 Oct 2007 11:06:43 +0000 (11:06 +0000)]
* ntdll.h (STATUS_END_OF_FILE): Define.
* path.cc (symlink_info::check_shortcut): Use NT function to get file
size. Reintroduce checking file size before reading it. Eliminiate
close_it label.
(symlink_info::check_sysfile): Check for EOF condition.
Corinna Vinschen [Wed, 10 Oct 2007 16:54:09 +0000 (16:54 +0000)]
* path.cc (struct symlink_info): Change size of contents member to
be able to keep SYMLINK_MAX sized strings.
(symlink_worker): Rework for long path names. When writing windows
shortcuts, store pathname additionally "hidden" after the actual
shortcut data to workaround size limitations of the description field.
(symlink_info::check_shortcut): Drop file name parameter. Drop max
file size check. Use NT functions. Use appended full path if
available, description otherwise. Check symlink string length for
not exceeding SYMLINK_MAX. Don't close file here.
(symlink_info::check_sysfile): Drop file name parameter. Use NT
functions. Check symlink string length for not exceeding SYMLINK_MAX.
Don't close file here.
(symlink_info::check_reparse_point): Drop file name parameter. Drop
useless length checks. Allow SYMLINK_MAX length symlink strings.
Don't close file here.
(symlink_info::posixify): Allow SYMLINK_MAX length symlink strings.
(symlink_info::check): Turn around checking for symlink file attributes.
Use NT functions. Close symlink file here.
* include/limits.h (PATH_MAX): Define as 32760. Change comment.
(SYMLINK_MAX): Define as PATH_MAX - 1.
Corinna Vinschen [Wed, 10 Oct 2007 16:07:46 +0000 (16:07 +0000)]
* fhandler_socket.cc (fhandler_socket::bind): Open file for deletion,
too. Don't write to file and especially don't close handle if file
couldn't be created. Set delete disposition if writing failed,
instead of calling unlink_nt.
Ben Elliston [Tue, 9 Oct 2007 04:24:11 +0000 (04:24 +0000)]
* libm/machine/spu/headers/acosd2.h: Include spu_intrinsics.h
before simdmath.h to get a definition for `vector'.
* libm/machine/spu/headers/asind2.h: Likewise.
Nick Clifton [Mon, 8 Oct 2007 09:30:35 +0000 (09:30 +0000)]
* configure.ac (CFLAGS_FOR_BUILD, CXXFLAGS_FOR_BUILD, LDFLAGS_FOR_BUILD): Default them to host flags
only for $host = $build.
Set default CXXFLAGS_FOR_BUILD to CXXFLAGS, not CFLAGS.
Set default LDFLAGS_FOR_BUILD to LDFLAGS, not CFLAGS.
* configure: Regenerate.
* include/io.h (__finddata64_t, __wfinddata64_t): changed member 'size'
from '_fsize_t' to '__int64' to be consistent with the other ...64
structures and the value set there is 8 bytes not 4. Add guard for both
as the are only used by functions available from 6.1 on.
* include/math.h: fixed a typo in a comment.
(atanhf): Fixed declaration.
* include/wchar.h (__wfinddata64_t): changed member 'size' from '_fsize_t'
to '__int64' to be consistent with the other ...64 structures and the value
set there is 8 bytes not 4. Added guard as this function is only used by
functions available from 6.1 on.
* include/sys/stat.h: some members of 'stat' were declared with types with
a prefixed underscore, while the ones without the underscore should have
been used. Added guard to '__stat64' as it is only used by functions
available from 6.1 on. Added the wide character versions of the
exec()/spawn() family for completion
(_stati64): changed the type of the 'st_mode' member from 'unsigned int' to
'_mode_t'
* include/sys/timeb.h (timeb, _timb): changed the type of the 'time' member
from 'long' to 'time_t'
(__timeb64): moved declaration of structure directly before the declaration
of the function '_ftime64()', so it is guarded as well
* include/sys/utime.h (__utimbuf64): moved declaration of structure directly
before the declaration of the functions using it, so it is guarded as well
Jeff Johnston [Mon, 1 Oct 2007 18:22:50 +0000 (18:22 +0000)]
2007-10-01 Patrick Mansfield <patmans@us.ibm.com>
* spu/sbrk.c: Use the current stack pointer value rather than the
maximum available memory to determine the amount of heap space
left. Without this change calling sbrk() can allocate space that
is currently in use on the stack.
Jeff Johnston [Fri, 21 Sep 2007 21:14:41 +0000 (21:14 +0000)]
2007-09-21 Patrick Mansfield <patmans@us.ibm.com>
* spu/Makefile.in: Add new files.
* spu/jsre.h: Add JSRE_PREAD, JSRE_PWRITE, JSRE_READV, and
JSRE_WRITEV opcodes.
* spu/pread.c: New file to add pread via assist call.
* spu/pwrite.c: New file to add pwrite via assist call.
* spu/readv.c: New file to add readv via assist call.
* spu/writev.c: New file to add writev via assist call.
Jeff Johnston [Fri, 21 Sep 2007 21:06:58 +0000 (21:06 +0000)]
2007-09-21 Patrick Mansfield <patmans@us.ibm.com>
* spu/jsre.h: Add JSRE_SCHED_YIELD, JSRE_UMASK, JSRE_UTIME, and
JSRE_UTIMES.
* spu/sched_yield.c: New file add sched_yield via assist call.
* spu/umask.c: New file add umask via assist call.
* spu/utime.c: New file add utime via assist call.
* spu/utimes.c: New file add utimes via assist call.
* spu/Makefile.in: Add new files.
Jeff Johnston [Fri, 21 Sep 2007 21:02:15 +0000 (21:02 +0000)]
2007-09-21 Patrick Mansfield <patmans@us.ibm.com>
* libc/include/sched.h: New file, just include sys/sched.h.
* libc/machine/spu/sys/sched.h: New file, has just sched_yield
prototype.
* libc/machine/spu/sys/utime.h: New file, has utime prototype and
struct utimbuf definition.
Jeff Johnston [Fri, 21 Sep 2007 20:45:17 +0000 (20:45 +0000)]
2007-09-21 Patrick Mansfield <patmans@us.ibm.com>
* spu/jsre.h: Add JSRE_SHM_OPEN and JSRE_SHM_UNLINK opcodes.
* spu/shm_open.c: New file to add shm_open via assist call.
* spu/shm_unlink.c: New file to add shm_unlink via assist call.
* spu/Makefile.in: Add shm_open.o and shm_unlink.o
Jeff Johnston [Fri, 21 Sep 2007 20:40:52 +0000 (20:40 +0000)]
2007-09-21 Patrick Mansfield <patmans@us.ibm.com>
* spu/dirfuncs.c: New file, holds the opendir, closedir, readdir,
rewinddir, seekdir and telldir implementations. These are
grouped in one file so that we do not need a separate file for
the struct dirent and DIR allocation code.
* spu/jsre.h: Add JSRE_OPENDIR and other dir opcodes.
* spu/Makefile.in: Add dirfuncs.o.
Jeff Johnston [Tue, 18 Sep 2007 20:05:17 +0000 (20:05 +0000)]
2007-09-18 Patrick Mansfield <patmans@us.ibm.com>
* libc/include/sys/types.h: Use __dev_t, __uid_t, and __gid_t to
typedef dev_t, gid_t, and uid_t.
* libc/include/sys/_types.h: Move previous dev_t, uid_t and gid_t
types.h code to here, but typedef __dev_t, __uid_t, and __gid_t instead.
Change to lower case for all __foo_t_defined names.
* libc/machine/spu/machine/_types.h: Add SPU specific __dev_t,
__uid_t, and __gid_t making them all four bytes. Change to lower case
for all __foo_t_defined names.
Jeff Johnston [Tue, 18 Sep 2007 19:32:43 +0000 (19:32 +0000)]
2007-09-18 Jeff Johnston <jjohnstn@redhat.com>
* libc/reent/renamer.c: New file.
* libc/reent/Makefile.am: Add new file.
* libc/reent/Makefile.in: Regenerated.
* libc/stdio/rename.c: Break out _rename_r code into reent/renamer.c
and add check for rename syscall.
* mmap.cc (fh_disk_file): Delete as global static variable and...
(mmap64): ...define as local pointer to make mmap thread-safe.
Accommodate throughout. Only initialize fh_disk_file after file could
be opened with GENERIC_EXECUTE access. Call fstat_by_handle instead of
fstat to avoid overhead.
* ldexp.c (fold_binary): Set expld.dataseg.relro to
exp_dataseg_relro_start or exp_dataseg_relro_end when
seeing DATA_SEGMENT_ALIGN or DATA_SEGMENT_RELRO_END,
respectively.
* ldlang.c (lang_size_sections_1): Properly set
expld.dataseg.relro_start_stat and
expld.dataseg.relro_end_stat.
(find_relro_section_callback): New function.
(lang_find_relro_sections_1): Likewise.
(lang_find_relro_sections): Likewise.
(lang_process): Call lang_find_relro_sections for
non-relocatable link.
ld/testsuite/
2007-09-17 H.J. Lu <hongjiu.lu@intel.com>
PR binutils/3281
PR binutils/5037
* ld-elf/binutils.exp: Update "-z relro" tests to use relro1.s.
Add "-z relro" tests with relro2.s. Add "-z relro" tests with
TLS for objcopy.
* ld-elf/relro1.s: New file.
* ld-elf/relro2.s: Likewise.
Eric Blake [Mon, 17 Sep 2007 20:14:29 +0000 (20:14 +0000)]
Obey POSIX on printf("%.s", (char*)NULL).
* libc/stdio/vfprintf.c (_VFPRINTF_R): Take precision into account
for %s on NULL. Skip NULL check when optimizing for size.
* fhandler.cc (fhandler_base::open): Partly revert change from
2007-08-24: Call has_acls to avoid permission problems getting
a handle to a file on a remote share. Add comment.
* configure.ac (mips*-sde-elf*): New stanza. Add target-libiberty
to $skipdirs and only disable gprof for newlib. Use the normal
mips*-elf* handling in other respects.
* configure: Regnerate.
* configure.ac (--enable-stage1-checking): If neither --enable-checking
nor --disable-checking is provided also turn on yes and types
checking for stage1.
* configure: Re-generate.
DJ Delorie [Tue, 11 Sep 2007 00:22:05 +0000 (00:22 +0000)]
2007-09-10 Rask Ingemann Lambertsen <rask@sygehus.dk>
PR other/32154
* configure.ac: For libgloss targets, point the linker to the linker
script, startup code and simulator library.
* configure: Regenerate.
Jeff Johnston [Fri, 7 Sep 2007 21:16:25 +0000 (21:16 +0000)]
2007-09-07 Patrick Mansfield <patmans@us.ibm.com>
* libc/include/machine/_default_types.h: New file, contains what
was previously in libc/include/machine/_types.h.
* libc/include/machine/_types.h: Now only includes
machine/_default_types.h.
* libc/include/sys/reent.h: Remove _fpos_t and _fpos64_t.
* libc/include/sys/_types.h: Move _fpos_t and _fpos64_t to here,
with conditional declarations.
* libc/machine/spu/machine/_types.h: New file, add SPU specific
typedefs for _fpos_t and _fpos64_t.