Commit Graph

9295 Commits

Author SHA1 Message Date
Jeff Johnston 12cb181da7 2006-12-11 Kazu Hirata <kazu@codesourcery.com>
Merge from newlib-csl-20060320-branch:
	2006-12-01  Nathan Sidwell  <nathan@codesourcery.com>
		    Kazu Hirata  <kazu@codesourcery.com>

	* m68k/Makefile.in (CF_ISRS): Use addprefix.

	2006-11-01 Nathan Sidwell <nathan@codesourcery.com>

	* m68k/Makefile.in (CFLAGS): Do not clear.  Add to all compilations.
	(ARFLAGS): Remove commented out definition.


	* m68k/configure.in (DO) Set to list of target cpu families.
	* m68k/configure: Rebuilt.
	* m68k/Makefile.in (DO): New.
	(UNHOSTED_BSP, UNHOSTED_OBJS, HOSTED_BSP, HOSTED_OBJS): Move
	later.
	(m5208evb, m5213evb, m52235evb, m5235evb, m5273c3, m5275evb,
	m5282evb, m5329evb, m5485evb): Move earlier.
	(all): Add all_$DO dependencies.
	(all_cf, all_m68k): New targets, depend on cf & m68k bsps as
	appropriate.
	(m%-ram.ld, m%-rom.ld, m%-ram-hosted.ld, m%-rom-hosted.ld): Add
	'm' prefix.
	(install): Add install_$DO dependencies.
	(install_cf, install_m68k): New targets.  Perform cf and m68k
	installs as appropriate.
	(install_io): New, install the io libraries.


	2006-10-23 Nathan Sidwell <nathan@codesourcery.com>

	* m68k/Makefile.in (CF_CRT0): Rename to CF_CRT0S, separate hosted
	& unhosted versions.
	(CF_OBJS): Add cf-isv.o.
	(CF_SOURCES): Add cf-isv.S.
	(cf-hosted-crt0.o, cf-unhosted-crt0.o): New targets.
	* m68k/cf-isv.S: New, broken out of ...
	* m68k/cf-crt0.S: ... here.  Add HOSTED & UNHOSTED differences.
	* m68k/cf-crt1.c (__start1): Add heap_limit argument.
	(__heap_limit): Define.
	* m68k/cf-sbrk.c (__heap_limit): Declare.
	(sbrk): Adjust for __heap_limit.
	* m68k/cf.sc: Use different crt0's for hosted & unhosted.
	Install a separate isv.o file.
	* m68k/io.h (HOSTED_PUTCHAR): Replace with ...
	(HOSTED_INIT_SIM): ... this.


	2006-10-20 Nathan Sidwell <nathan@codesourcery.com>

	* m68k/Makefile.in (CF_BOARDS): Add m5275evb.
	(m5275evb): New board.


	2006-10-20 Vladimir Prus <vladimir@codesourcery.com>

	* m68k/cf.sc: Add linkonce sections and
	DWARF sections.


	2006-10-07 Nathan Sidwell <nathan@codesourcery.com>

	* m68k/Makefile.in: Adjust Coldfire rules.
	(BDM_CRT0, BDM_BSP, BDM_OBJS, BDM_ISRS): Rename	to ...
	(CF_CRT0, CF_BSP, CF_OBJS, CF_ISRS): ... here.  Adjust.
	(BDM_OTHER_OBJS): Remove.
	(BDM_SYSOBJS): Rename to ...
	(UNHOSTED_OBJS): ... here.  Adjust.
	(UNHOSTED_BSP, HOSTED_OBJS, HOSTED_BSP): New.
	(CF_HOSTED_SCRIPTS): New.
	(CF_SCRIPTS, CF_SOURCES): Adjust.
	* m68k/cf.sc: Add IO library variable.
	* m68k/bdm-crt0.S, m68k/bdm-crt1.c, m68k/bdm-isrs.c,
	m68k/bdm-sbrk.c, m68k/bdm-semihost.S: Rename to ...
	* m68k/cf-crt0.S, m68k/cf-crt1.c, m68k/cf-isrs.c, m68k/cf-sbrk.c,
	m68k/cf-hosted.S: ... here.
	* m68k/cf-exit.c: New.
	* m68k/bdm-gdb.h, m68k/bdm-semihost.h: Merge into ...
	* m68k/io.h: ... here.  Add unhosted support.  Adjust conversion
	function names.
	* m68k/bdm-gdb.c: Rename to ...
	* m68k/io-gdb.c: ... here.  Adjust names of conversion functions.
	* m68k/bdm-close.c, m68k/bdm-exit.c, m68k/bdm-fstat.c,
	m68k/bdm-gettimeofday.c, m68k/bdm-isatty.c, m68k/bdm-lseek.c,
	m68k/bdm-open.c, m68k/bdm-read.c, m68k/bdm-rename.c,
	m68k/bdm-stat.c, m68k/bdm-system.c, m68k/bdm-time.c,
	m68k/bdm-unlink.c, m68k/bdm-write.c: Rename to ...
	* m68k/io-close.c, m68k/io-exit.c, m68k/io-fstat.c,
	m68k/io-gettimeofday.c, m68k/io-isatty.c, m68k/io-lseek.c,
	m68k/io-open.c, m68k/io-read.c, m68k/io-rename.c, m68k/io-stat.c,
	m68k/io-system.c, m68k/io-time.c, m68k/io-unlink.c,
	m68k/io-write.c: ... here.  Include io.h. Adjust for hosted &
	unhosted libraries.  Adjust names of gdb conversion functions.


	2006-09-29 Nathan Sidwell <nathan@codesourcery.com>

	* m68k/bdm-semihost.S: Add more comments. Make instruction weirder.

	2006-09-22 Nathan Sidwell <nathan@codesourcery.com>

	* m68k/bdm-crt1.c (hardware_init_hook): Use #defines for CACR bits.

	2006-09-18 Nathan Sidwell <nathan@codesourcery.com>

	* m68k/Makefile.in: Don't force a frame pointer on the ISRs.
	* m68k/bdm-crt1.c (__start1): Don't set the VBR here.
	(hardeare_init_hook): Define weakly.  Set VBR here, enable caching
	if supported.


	* m68k/Makefile.in (bdm-semihost.o): Build from bdm-semihost.S.
	* m68k/bdm-semihost.c: Remove.
	* m68k/bdm-semihost.S: New.
	* m68k/bdm-crt0.S: Don't install semihosting trap handler.
	* m68k/bdm-close.c, bdm-exit.c, bdm-fstat.c, bdm-gettimeofday.c,
	bdm-isatty.c, bdm-lseek.c, bdm-open.c, bdm-read.c, bdm-rename.c,
	bdm-stat.c, bdm-system.c, bdm-unlink.c, bdm-write.c): Update.
	* m68k/bdm-isrs.c: Update comment.
	* m68k/bdm-semihost.h (BDM_TRAPNUM, BDM_FUNC_REG, BDM_ARG_REG,
	BDM_TRAP): Remove.
	(__bdm_semihost): Declare.


	2006-09-15 Nathan Sidwell <nathan@codesourcery.com>

	* m68k/Makefile.in (BDM_OTHER_OBJS): Remove sbrk.o.
	(BDM_SYSOBJS): Add bdm-sbrk.o.
	* m68k/bdm-sbrk.c: New.


	2006-09-06 Nathan Sidwell <nathan@codesourcery.com>

	* m68k/Makefile.in (CF_SOURCES): New.
	(install): Install them.


	2006-09-01 Nathan Sidwell <nathan@codesourcery.com>

	* m68k/cf.sc: Add .jcr section to .text.
2006-12-11 19:58:01 +00:00
Christopher Faylor 7dfad3a0c6 * sigproc.cc (child_info::child_info): Move old comment about msv_count here.
Edit it slightly to reflect new sensibilities.
2006-12-11 19:17:20 +00:00
Christopher Faylor 6dcb2ec441 * dumper.cc: Add an include to accommodate new include/elf usage. 2006-12-11 19:17:17 +00:00
Jeff Johnston 23995dad75 2006-12-11 Ben Elliston <bje@au.ibm.com>
* configure.in: Remove extra whitespace from config_testsuite =
        VALUE statements to eliminate shell errors. Remove superfluous
        semicolons.
        * configure: Regenerate.
2006-12-11 19:04:14 +00:00
Christopher Faylor fc32d70841 correct email address 2006-12-11 18:58:40 +00:00
Christopher Faylor c16548b2a2 * child_info.h (child_info_spawn::__stdin): New element.
(child_info_spawn::__stdin): Ditto.
(CURR_CHILD_INFO_MAGIC): Regenerate.
* dcrt0.cc (check_sanity_and_sync): Minor cleanup.
(child_info_spawn::handle_spawn): Handle new __std* elements by calling
move_fd.
* dtable.cc (dtable::move_fd): Define new function.
* dtable.h (dtable::move_fd): Declare new function.
* fhandler.h (fhandler_pipe::popen_pid): Declare new element.
* fhandler.h (fhandler_pipe::get_popen_pid): Define new function.
* fhandler.h (fhandler_pipe::set_popen_pid): Ditto.
* pipe.cc (fhandler_pipe::fhandler_pipe): Zero popen_pid.
(fhandler_pipe::dup): Ditto.
* spawn.cc (handle): Change second argument to bool.
(spawn_guts): Accept __stdin/__stdout arguments and set them appropriately in
child_info structure and in STARTUPINFO structure.
* syscalls.cc (popen): New cygwin-specific implementation using spawn.
(pclose): Ditto.
* winsup.h (spawn_guts): Accommodate new arguments for spawn_guts.
* fhandler.cc (fhandler_base::set_no_inheritance): Make second arg a bool.
* fhandler.h (fhandler_base::set_no_inheritance): Ditto for declaration.
* child_info.h (child_info::msv_count): Rename from the now-inappropriate
"zero".
(child_info_spawn::filler): Add filler to work around Vista bug.
(child_info_fork::filler): Ditto.
* dcrt0.cc (get_cygwin_startup_info): Remove "zero" check since it is now
always filled out.
* fork.cc (frok::parent): Move ch.zero manipulation to constructor.
* spawn.cc (spawn_guts): Ditto.  Remove _ch wrapper.
* sigproc.cc (child_info::child_info): Initialize starter[].
* shared.cc (shared_info::heap_slop_size): Remove noisy system_printfs.
* shared_info.h (CURR_SHARED_MAGIC): Regenerate.
2006-12-11 18:55:29 +00:00
Corinna Vinschen e79c01f84e * fhandler.cc (rootdir): Fix typo in comment.
* syscalls.cc (try_to_bin): Ditto.
2006-12-11 09:07:22 +00:00
Alan Modra e53c5df0a1 * configure.in: Handle spu makefile frag.
* config/mt-spu: New file.
	* Makefile.tpl (MAINT): Define
	(MAINTAINER_MODE_FALSE, MAINTAINER_MODE_TRUE): Define.
	* configure: Regenerate.
	* Makefile.in: Regenerate.
2006-12-11 06:47:57 +00:00
Ben Elliston 18bff3e03b * config.sub, config.guess: Update from upstream sources. 2006-12-11 04:12:46 +00:00
Ben Elliston 3fce2c7f21 * configure.in: Sync with GCC (spu-*-*).
* configure: Sync with GCC.
2006-12-11 00:25:59 +00:00
Ben Elliston 931e17a3ca * spu/exit.c (libgloss_exit): Rename from this ..
(_exit): .. to this. Overhaul.
        (exit): Remove.
2006-12-11 00:04:00 +00:00
Ben Elliston 1ad5a4066d Resurrect. 2006-12-10 23:53:07 +00:00
Ben Elliston 401f89de6b Remove (missed in previous commit). 2006-12-10 23:14:32 +00:00
Ben Elliston 54ff7fb424 Typo fix. 2006-12-10 22:49:53 +00:00
Christopher Faylor c2b8862303 * mount.cc (do_mount): Avoid unnecessary cygwin_conv_to_win32_path and pass
POSIX path directly - this avoids a cygwin DLL warning.
2006-12-10 21:50:06 +00:00
Corinna Vinschen cbfb7b1b23 * autoload.cc (SHFileOperationA): Drop definition.
* ntdll.h (struct _FILE_RENAME_INFORMATION): Define.
	* path.cc (fs_info::update): Note length of rootdir prefix in
	root_len.
	(get_nt_native_path): New function, taking over functionality of
	path_conv::get_nt_native_path.
	(path_conv::get_nt_native_path): Just call get_nt_native_path.
	* path.h (get_nt_native_path): Declare.
	(struct fs_info): New member root_len.
	(fs_info::length): New inline method returning root_len.
	(path_conv::rootdir): New inline method returning rootdir prefix.
	* syscalls.cc (try_to_bin): Rewrite using only system calls.
	(unlink_nt): Call try_to_bin with additional handle to open file
	parameter.
	(statvfs): Use path_conv::rootdir method.
	* wincap.h: Define has_recycle_dot_bin throughout.
	* wincap.cc: Ditto.
2006-12-10 16:43:30 +00:00
Corinna Vinschen 6c64fb2fda * fhandler.cc (rootdir): Clarify comment. 2006-12-10 16:20:43 +00:00
Corinna Vinschen 37ae69e8b1 * fhandler.cc (rootdir): Don't look for volume mount points on remote
shares.
2006-12-10 16:18:51 +00:00
Corinna Vinschen 30cf835f7e * fhandler.cc (rootdir): Drop useless post-increment. Take volume
mount points into account.
	(check_posix_perm): Allocate space for root directory big enough.
2006-12-10 12:56:50 +00:00
Corinna Vinschen 8af19fdb25 * syscalls.cc (try_to_bin): Add comment that this is not possibly
the final version.
2006-12-09 09:29:47 +00:00
Jeff Johnston b81d0f0ec6 2006-12-08 Sa Liu <saliu@de.ibm.com>
* spu/exit.c (libgloss_exit): Rename from this ..
        (_exit): .. to this. Overhaul.
        (exit): Remove.
        * spu/crt0.S, spu/crti.S, spu/crtn.S: New files.
        * spu/crt0.C, spu/init.c: Remove.
        * spu/configure.in (AC_INIT): Check for crt0.S, not crt0.C.
        * spu/configure: Regenerate.
        * spu/Makefile.in (crti.o, crtn.o, crt1.o, crt2.o): New targets.
        (OBJS): Remove init.o.
        (CRTOBJS): New.
        (OUTPUTS): Add $(CRTOBJS).
2006-12-08 21:50:56 +00:00
Mike Stump da6b5ab61f * Makefile.def (dependencies): Add dependency for
install-target-libssp and install-target-libgomp on
        install-gcc.
        * Makefile.in: Regenerate.
2006-12-08 21:05:25 +00:00
Corinna Vinschen e563a4d5b8 * syscalls.cc (unlink_nt): Open native symlinks with
FILE_OPEN_REPARSE_POINT flag.
2006-12-07 17:53:05 +00:00
Corinna Vinschen 1c9b2968fa * ntdll.h (STATUS_DELETE_PENDING): Define.
(struct _FILE_DISPOSITION_INFORMATION): Define.
	* syscalls.cc (unlink_9x): new function to delete file on 9x.
	* syscalls.cc (unlink_nt): new function to delete file on NT.
	(unlink): Simplify.  Move OS dependent stuff into aforementioned
	functions.  Also handle FILE_ATTRIBUTE_HIDDEN as R/O-like flag.
2006-12-07 17:40:24 +00:00
Kazu Hirata 07ec6541ab bfd/
* elf32-m68k.c: Update uses of EF_M68K_*.

binutils/
	* readelf.c: Update uses of EF_M68K_*.

gas/
	* config/tc-m68k.c: Update uses of EF_M68K_*.

include/elf
	* m68k.h (EF_M68K_ISA_MASK, EF_M68K_ISA_A_NODIV,
	EF_M68K_ISA_A, EF_M68K_ISA_A_PLUS, EF_M68K_ISA_B_NOUSP,
	EF_M68K_ISA_B, EF_M68K_ISA_C, EF_M68K_MAC_MASK, EF_M68K_MAC,
	EF_M68K_EMAC, EF_M68K_EMAC_B, EF_M68K_FLOAT): Rename to
	EF_M68K_CF_ISA_MASK, EF_M68K_CF_ISA_A_NODIV, EF_M68K_CF_ISA_A,
	EF_M68K_CF_ISA_A_PLUS, EF_M68K_CF_ISA_B_NOUSP,
	EF_M68K_CF_ISA_B, EF_M68K_CF_ISA_C, EF_M68K_CF_MAC_MASK,
	EF_M68K_CF_MAC, EF_M68K_CF_EMAC, EF_M68K_CF_EMAC_B,
	EF_M68K_CF_FLOAT, respectively.
2006-12-07 15:39:02 +00:00
Corinna Vinschen 398e28fbbc * autoload.cc (SHFileOperationA): Define.
* syscalls.cc (try_to_bin): New function trying to move a file to
	the recycle bin.
	(unlink): Fix arguments used in CreateFile for delete on close.
	Before closing the handle, try to move the file to the recycle bin.
2006-12-07 11:53:46 +00:00
Corinna Vinschen 2ffc166d07 * cygheap.h (struct cwdstuff): Add "sync" member and accompanying
"keep_in_sync" methods.
	* external.cc (cygwin_internal): Call above keep_in_sync method when
	CW_SYNC_WINENV is requested.
	* path.cc (cwdstuff::init): Don't change to windows_system_directory
	if keep_in_sync is requested.
	(cwdstuff::keep_in_sync): New method.
	(cwdstuff::set): Take sync flag into account.
2006-12-07 10:04:52 +00:00
Corinna Vinschen 63f33caadc * termios.cc: Change include order to accomodate change to sys/ioctl.h. 2006-12-06 19:44:07 +00:00
DJ Delorie ad1fcc4a3c merge from gcc 2006-12-06 19:28:41 +00:00
Corinna Vinschen 8b8273781b * fhandler_mem.cc (fhandler_dev_mem::open): Fix comment.
* wincap.cc (has_physical_mem_access): Reflect the fact that physical
	memory access has been made a protected operation beginning with
	2003 Server.
2006-12-06 16:33:03 +00:00
Nick Clifton 017b276a76 Define ATTRIBUTE_PACKED and use as necessary. 2006-12-06 14:36:41 +00:00
Corinna Vinschen bf8ea306ec * include/sys/ioctl.h: Pick up termios.h, for TIOCGWINSZ. 2006-12-06 14:08:08 +00:00
Corinna Vinschen 6acc178a24 * winsup.h (WINVER): Set to 0x0600 to cover Vista. 2006-12-06 14:06:38 +00:00
Corinna Vinschen ad7915ffca * fhandler_disk_file.cc (fhandler_disk_file::rmdir): Fix typo. 2006-12-06 14:05:59 +00:00
Corinna Vinschen 3c788ea42a * path.cc (cwdstuff::init): Don't change to windows_system_directory
if Cygwin DLL has been loaded dynamically.
2006-12-05 21:46:26 +00:00
Corinna Vinschen 2156546df2 * path.cc (cwdstuff::set): Don't try to open directory on systems not
supporting that.
2006-12-05 13:20:38 +00:00
Corinna Vinschen a83c59fbc3 * dcrt0.cc (get_cygwin_startup_info): Fix comment.
* wincap.cc (wincapc::init): Always reset needs_count_in_si_lpres2 to
	false on non 64-bit systems.
2006-12-05 13:16:24 +00:00
Corinna Vinschen 301cd37dda Fix date. 2006-12-05 11:07:12 +00:00
Corinna Vinschen c6674b53d3 * dcrt0.cc (get_cygwin_startup_info): Change zeros to DWORD array.
Expect first DWORD in child_info struct being set to non-zero if
	wincap.needs_count_in_si_lpres2 is set.  Add comment to explain why.
	* fork.cc (frok::parent): Set ch.zero[0] to a sensible count value
	if wincap.needs_count_in_si_lpres2 is set.
	* spawn.cc (spawn_guts): Ditto.  Add filler bytes after ch on stack
	to accomodate needs_count_in_si_lpres2.
	* wincap.h: Define needs_count_in_si_lpres2 throughout.
	* wincap.cc: Ditto.
2006-12-05 10:59:21 +00:00
Jeff Johnston 489bb390ce 2006-12-04 Kazunori Asayama <asayama@sm.sony.co.jp>
* libc/machine/spu/strncpy.c: Add padding.
2006-12-04 17:29:10 +00:00
Jeff Johnston 3e2d7a911f 2006-12-04 Kazunori Asayama <asayama@sm.sony.co.jp>
* testsuite/newlib.string/tstring.c:
2006-12-04 17:25:13 +00:00
Jeff Johnston 0a2ef99804 2006-12-01 Kazunori Asayama <asayama@sm.sony.co.jp>
* libc/machine/spu/strchr.c: Fix mask for misaligned string.
        * libc/machine/spu/strrchr.c: Ditto.
2006-12-01 17:18:36 +00:00
Jeff Johnston 75190a8fa2 2006-11-30 Lev Bishop <lev.bishop@gmail.com>
* libc/include/math.h: Allow C99 functions/macros to be
        defined for C++ even when __STRICT_ANSI__.
2006-11-30 23:40:12 +00:00
Joern Rennecke 76c4048648 include:
2006-05-03  Andrew Stubbs  <andrew.stubbs@st.com>
            J"orn Rennecke <joern.rennecke@st.com>

	PR driver/29931
	* libiberty.h (make_relative_prefix_ignore_links): Declare.

libiberty:
2006-05-03  Andrew Stubbs  <andrew.stubbs@st.com>
            J"orn Rennecke <joern.rennecke@st.com>

	PR driver/29931
	* make-relative-prefix.c (make_relative_prefix_1): New function,
	broken out of make_relative_prefix.  Make link resolution dependent
	on new parameter.
	(make_relative_prefix): Use make_relative_prefix_1.
	(make_relative_prefix_ignore_links): New function.
2006-11-30 17:36:10 +00:00
Corinna Vinschen 8eca536272 * dir.cc (mkdir): Check last path component for "..".
(rmdir): Don't check last path component for "..".
	* fhandler_disk_file.cc (fhandler_disk_file::rmdir): Drop kludge
	which tries to allow deleting the current working directory.
	* path.cc (has_dot_last_component): Add parameter to indicate testing
	for "..".  Take trailing slash into account.
	(symlink_info::posixify): Rely on cygheap->cwd.win32 having a
	useful value.
	(cwdstuff::init): Initialize cygheap->cwd with current working
	directory.  Change to windows_system_directory afterwards.
	(cwdstuff::set): Never call SetCurrentDirectory here.  Just check
	if changing into target directory would be allowed.  Add comment to
	explain why.
	* path.h (has_dot_last_component): Declare with second parameter.
	* pinfo.cc (pinfo::zap_cwd): Remove.
	(pinfo::exit): Drop call to zap_cwd.
	* pinfo.h (class pinfo): Remove declaration of zap_cwd.
	* spawn.cc (spawn_guts): Set current working directory for non-Cygwin
	child applications.  Drop call to zap_cwd.
2006-11-30 10:17:24 +00:00
Jeff Johnston 7d79436443 2006-11-29 Jeff Johnston <jjohnstn@redhat.com>
* libc/stdio/makebuf.c (__smakebuf): If dealing with
        an asprintf-family buffer, make the default initial size 64.
2006-11-30 00:35:57 +00:00
Jeff Johnston c4c7f13966 2006-11-29 Eric Blake <ebb9@byu.net>
* libc/stdio/fvwrite.c (__sfvwrite_r): Avoid off-by-one error in
        asprintf, as well as quadratic realloc behavior.
2006-11-29 21:36:54 +00:00
Jeff Johnston 80c6ead242 2006-11-29 Kazunori Asayama <asayama@sm.sony.co.jp>
* libc/machine/spu/memset.c: Fix type of explicit cast.
        * libc/machine/spu/strncmp.c: Add explicit cast.
        * libc/machine/spu/strrchr.c: Ditto.
        * libc/machine/spu/strspn.c: Ditto.
2006-11-29 19:54:05 +00:00
Corinna Vinschen 75bb63452d * security.cc (create_token): Revert erroneous change to test
subauth_token for INVAILD_HANDLE_VALUE.
	* syscalls.cc (seteuid32): Set create_token's subauth_token parameter
	back to NULL.
2006-11-28 23:15:01 +00:00
Corinna Vinschen 902716e599 * fhandler.cc (fhandler_base::open): Fix previous patch to handle the
SYSTEM attribute as well.
2006-11-28 09:57:01 +00:00