1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/test/lib-arm/newlib-1.8.2-aica.patch Thu Aug 28 00:08:12 2008 +0000
1.4 +diff -urN newlib-1.8.2/config.sub newlib-1.8.2-aica/config.sub
1.5 +--- newlib-1.8.2/config.sub 2008-08-15 12:02:09.000000000 +1000
1.6 ++++ newlib-1.8.2-aica/config.sub 2008-08-13 11:59:17.000000000 +1000
1.8 + | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
1.9 + | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
1.10 + | -interix* | -uwin* | -rhapsody* | -openstep* | -oskit* \
1.12 ++ | -dreamcast* | -aica* )
1.13 + # Remember, each alternative MUST END IN *, to match a version number.
1.15 + -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
1.16 +diff -urN newlib-1.8.2/configure.in newlib-1.8.2-aica/configure.in
1.17 +--- newlib-1.8.2/configure.in 2008-08-15 12:02:09.000000000 +1000
1.18 ++++ newlib-1.8.2-aica/configure.in 2008-08-13 11:58:57.000000000 +1000
1.19 +@@ -606,6 +606,9 @@
1.20 + target_configdirs="${target_configdirs} target-bsp target-cygmon"
1.24 ++ noconfigdirs="$noconfigdirs target-libgloss"
1.27 + noconfigdirs="$noconfigdirs target-libgloss"
1.29 +diff -urN newlib-1.8.2/newlib/configure.host newlib-1.8.2-aica/newlib/configure.host
1.30 +--- newlib-1.8.2/newlib/configure.host 2008-08-15 12:02:09.000000000 +1000
1.31 ++++ newlib-1.8.2-aica/newlib/configure.host 2008-08-13 20:01:25.000000000 +1000
1.32 +@@ -194,6 +194,10 @@
1.33 + *-*-dc* | *-*-dreamcast*)
1.38 ++ newlib_cflags="${newlib_cflags} -mcpu=arm7tdmi"
1.43 +diff -urN newlib-1.8.2/newlib/libc/sys/aica/Makefile.am newlib-1.8.2-aica/newlib/libc/sys/aica/Makefile.am
1.44 +--- newlib-1.8.2/newlib/libc/sys/aica/Makefile.am 1970-01-01 10:00:00.000000000 +1000
1.45 ++++ newlib-1.8.2-aica/newlib/libc/sys/aica/Makefile.am 2008-08-13 11:54:44.000000000 +1000
1.47 ++## Process this file with automake to generate Makefile.in
1.49 ++AUTOMAKE_OPTIONS = cygnus
1.51 ++INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
1.53 ++noinst_LIBRARIES = lib.a
1.55 ++lib_a_SOURCES = absolute_vfs.c chdir.c chmod.c close.c creat.c dcload_vfs.c dcload.S \
1.56 ++ exit.c fcntl.c fstat.c getpid.c gettimeofday.c ioctl.c isatty.c kill.c \
1.57 ++ link.c lseek.c mkdir.c open.c read.c rmdir.c sbrk.c scif.c stat.c \
1.58 ++ stdio_vfs.c times.c unlink.c vfs.c write.c dup.c
1.62 ++ACLOCAL_AMFLAGS = -I ../../..
1.63 ++CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
1.64 +diff -urN newlib-1.8.2/newlib/libc/sys/aica/Makefile.in newlib-1.8.2-aica/newlib/libc/sys/aica/Makefile.in
1.65 +--- newlib-1.8.2/newlib/libc/sys/aica/Makefile.in 1970-01-01 10:00:00.000000000 +1000
1.66 ++++ newlib-1.8.2-aica/newlib/libc/sys/aica/Makefile.in 2008-08-13 11:54:44.000000000 +1000
1.68 ++# Makefile.in generated automatically by automake 1.4 from Makefile.am
1.70 ++# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
1.71 ++# This Makefile.in is free software; the Free Software Foundation
1.72 ++# gives unlimited permission to copy and/or distribute it,
1.73 ++# with or without modifications, as long as this notice is preserved.
1.75 ++# This program is distributed in the hope that it will be useful,
1.76 ++# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
1.77 ++# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
1.78 ++# PARTICULAR PURPOSE.
1.84 ++top_srcdir = @top_srcdir@
1.87 ++exec_prefix = @exec_prefix@
1.90 ++sbindir = @sbindir@
1.91 ++libexecdir = @libexecdir@
1.92 ++datadir = @datadir@
1.93 ++sysconfdir = @sysconfdir@
1.94 ++sharedstatedir = @sharedstatedir@
1.95 ++localstatedir = @localstatedir@
1.97 ++infodir = @infodir@
1.99 ++includedir = @includedir@
1.100 ++oldincludedir = /usr/include
1.104 ++pkgdatadir = $(datadir)/@PACKAGE@
1.105 ++pkglibdir = $(libdir)/@PACKAGE@
1.106 ++pkgincludedir = $(includedir)/@PACKAGE@
1.110 ++ACLOCAL = @ACLOCAL@
1.111 ++AUTOCONF = @AUTOCONF@
1.112 ++AUTOMAKE = @AUTOMAKE@
1.113 ++AUTOHEADER = @AUTOHEADER@
1.115 ++INSTALL = @INSTALL@
1.116 ++INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
1.117 ++INSTALL_DATA = @INSTALL_DATA@
1.118 ++INSTALL_SCRIPT = @INSTALL_SCRIPT@
1.119 ++transform = @program_transform_name@
1.121 ++NORMAL_INSTALL = :
1.124 ++NORMAL_UNINSTALL = :
1.125 ++PRE_UNINSTALL = :
1.126 ++POST_UNINSTALL = :
1.127 ++host_alias = @host_alias@
1.128 ++host_triplet = @host@
1.133 ++EXEEXT = @EXEEXT@
1.134 ++MAKEINFO = @MAKEINFO@
1.135 ++NEWLIB_CFLAGS = @NEWLIB_CFLAGS@
1.136 ++PACKAGE = @PACKAGE@
1.137 ++RANLIB = @RANLIB@
1.138 ++VERSION = @VERSION@
1.139 ++machine_dir = @machine_dir@
1.140 ++newlib_basedir = @newlib_basedir@
1.141 ++sys_dir = @sys_dir@
1.143 ++AUTOMAKE_OPTIONS = cygnus
1.145 ++INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
1.147 ++noinst_LIBRARIES = lib.a
1.149 ++lib_a_SOURCES = absolute_vfs.c chdir.c chmod.c close.c creat.c dcload_vfs.c dcload.S exit.c fcntl.c fstat.c getpid.c gettimeofday.c ioctl.c isatty.c kill.c link.c lseek.c mkdir.c open.c read.c rmdir.c sbrk.c scif.c stat.c stdio_vfs.c times.c unlink.c vfs.c write.c dup.c
1.152 ++ACLOCAL_AMFLAGS = -I ../../..
1.153 ++CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
1.154 ++ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
1.155 ++mkinstalldirs = $(SHELL) $(top_srcdir)/../../../../mkinstalldirs
1.156 ++CONFIG_CLEAN_FILES =
1.157 ++LIBRARIES = $(noinst_LIBRARIES)
1.160 ++DEFS = @DEFS@ -I. -I$(srcdir)
1.161 ++CPPFLAGS = @CPPFLAGS@
1.162 ++LDFLAGS = @LDFLAGS@
1.165 ++lib_a_OBJECTS = absolute_vfs.o chdir.o chmod.o close.o creat.o \
1.166 ++dcload_vfs.o dcload.o exit.o fcntl.o fstat.o getpid.o gettimeofday.o ioctl.o \
1.167 ++isatty.o kill.o link.o lseek.o mkdir.o open.o read.o rmdir.o sbrk.o \
1.168 ++scif.o stat.o stdio_vfs.o times.o unlink.o vfs.o write.o dup.o
1.169 ++CFLAGS = @CFLAGS@
1.170 ++COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
1.172 ++LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
1.173 ++DIST_COMMON = Makefile.am Makefile.in aclocal.m4 configure configure.in
1.176 ++DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
1.179 ++GZIP_ENV = --best
1.180 ++SOURCES = $(lib_a_SOURCES)
1.181 ++OBJECTS = $(lib_a_OBJECTS)
1.183 ++all: all-redirect
1.185 ++.SUFFIXES: .S .c .o .s
1.186 ++$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
1.187 ++ cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile
1.189 ++Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
1.190 ++ cd $(top_builddir) \
1.191 ++ && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
1.193 ++$(ACLOCAL_M4): configure.in ../../../acinclude.m4 ../../../aclocal.m4
1.194 ++ cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
1.196 ++config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
1.197 ++ $(SHELL) ./config.status --recheck
1.198 ++$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
1.199 ++ cd $(srcdir) && $(AUTOCONF)
1.201 ++mostlyclean-noinstLIBRARIES:
1.203 ++clean-noinstLIBRARIES:
1.204 ++ -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
1.206 ++distclean-noinstLIBRARIES:
1.208 ++maintainer-clean-noinstLIBRARIES:
1.211 ++ $(COMPILE) -c $<
1.214 ++ $(COMPILE) -c $<
1.217 ++ $(COMPILE) -c $<
1.219 ++mostlyclean-compile:
1.220 ++ -rm -f *.o core *.core
1.224 ++distclean-compile:
1.227 ++maintainer-clean-compile:
1.229 ++lib.a: $(lib_a_OBJECTS) $(lib_a_DEPENDENCIES)
1.231 ++ $(AR) cru lib.a $(lib_a_OBJECTS) $(lib_a_LIBADD)
1.236 ++ID: $(HEADERS) $(SOURCES) $(LISP)
1.237 ++ list='$(SOURCES) $(HEADERS)'; \
1.238 ++ unique=`for i in $$list; do echo $$i; done | \
1.239 ++ awk ' { files[$$0] = 1; } \
1.240 ++ END { for (i in files) print i; }'`; \
1.241 ++ here=`pwd` && cd $(srcdir) \
1.242 ++ && mkid -f$$here/ID $$unique $(LISP)
1.244 ++TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
1.247 ++ list='$(SOURCES) $(HEADERS)'; \
1.248 ++ unique=`for i in $$list; do echo $$i; done | \
1.249 ++ awk ' { files[$$0] = 1; } \
1.250 ++ END { for (i in files) print i; }'`; \
1.251 ++ test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
1.252 ++ || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
1.254 ++mostlyclean-tags:
1.261 ++maintainer-clean-tags:
1.263 ++distdir = $(PACKAGE)-$(VERSION)
1.264 ++top_distdir = $(distdir)
1.266 ++# This target untars the dist file and tries a VPATH configuration. Then
1.267 ++# it guarantees that the distribution is self-contained by making another
1.270 ++ -rm -rf $(distdir)
1.271 ++ GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
1.272 ++ mkdir $(distdir)/=build
1.273 ++ mkdir $(distdir)/=inst
1.274 ++ dc_install_base=`cd $(distdir)/=inst && pwd`; \
1.275 ++ cd $(distdir)/=build \
1.276 ++ && ../configure --srcdir=.. --prefix=$$dc_install_base \
1.277 ++ && $(MAKE) $(AM_MAKEFLAGS) \
1.278 ++ && $(MAKE) $(AM_MAKEFLAGS) dvi \
1.279 ++ && $(MAKE) $(AM_MAKEFLAGS) check \
1.280 ++ && $(MAKE) $(AM_MAKEFLAGS) install \
1.281 ++ && $(MAKE) $(AM_MAKEFLAGS) installcheck \
1.282 ++ && $(MAKE) $(AM_MAKEFLAGS) dist
1.283 ++ -rm -rf $(distdir)
1.284 ++ @banner="$(distdir).tar.gz is ready for distribution"; \
1.285 ++ dashes=`echo "$$banner" | sed s/./=/g`; \
1.286 ++ echo "$$dashes"; \
1.287 ++ echo "$$banner"; \
1.290 ++ -chmod -R a+r $(distdir)
1.291 ++ GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
1.292 ++ -rm -rf $(distdir)
1.293 ++dist-all: distdir
1.294 ++ -chmod -R a+r $(distdir)
1.295 ++ GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
1.296 ++ -rm -rf $(distdir)
1.297 ++distdir: $(DISTFILES)
1.298 ++ -rm -rf $(distdir)
1.299 ++ mkdir $(distdir)
1.300 ++ -chmod 777 $(distdir)
1.301 ++ @for file in $(DISTFILES); do \
1.302 ++ if test -f $$file; then d=.; else d=$(srcdir); fi; \
1.303 ++ if test -d $$d/$$file; then \
1.304 ++ cp -pr $$d/$$file $(distdir)/$$file; \
1.306 ++ test -f $(distdir)/$$file \
1.307 ++ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
1.308 ++ || cp -p $$d/$$file $(distdir)/$$file || :; \
1.318 ++installcheck: installcheck-am
1.320 ++install-info: install-info-am
1.322 ++install-exec: install-exec-am
1.325 ++install-data: install-data-am
1.327 ++install-am: all-am
1.328 ++ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
1.329 ++install: install-am
1.331 ++uninstall: uninstall-am
1.332 ++all-am: Makefile $(LIBRARIES)
1.333 ++all-redirect: all-am
1.335 ++ $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
1.339 ++mostlyclean-generic:
1.343 ++distclean-generic:
1.344 ++ -rm -f Makefile $(CONFIG_CLEAN_FILES)
1.345 ++ -rm -f config.cache config.log stamp-h stamp-h[0-9]*
1.347 ++maintainer-clean-generic:
1.348 ++mostlyclean-am: mostlyclean-noinstLIBRARIES mostlyclean-compile \
1.349 ++ mostlyclean-tags mostlyclean-generic
1.351 ++mostlyclean: mostlyclean-am
1.353 ++clean-am: clean-noinstLIBRARIES clean-compile clean-tags clean-generic \
1.358 ++distclean-am: distclean-noinstLIBRARIES distclean-compile \
1.359 ++ distclean-tags distclean-generic clean-am
1.361 ++distclean: distclean-am
1.362 ++ -rm -f config.status
1.364 ++maintainer-clean-am: maintainer-clean-noinstLIBRARIES \
1.365 ++ maintainer-clean-compile maintainer-clean-tags \
1.366 ++ maintainer-clean-generic distclean-am
1.367 ++ @echo "This command is intended for maintainers to use;"
1.368 ++ @echo "it deletes files that may require special tools to rebuild."
1.370 ++maintainer-clean: maintainer-clean-am
1.371 ++ -rm -f config.status
1.373 ++.PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \
1.374 ++clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
1.375 ++mostlyclean-compile distclean-compile clean-compile \
1.376 ++maintainer-clean-compile tags mostlyclean-tags distclean-tags \
1.377 ++clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \
1.378 ++check-am installcheck-am installcheck install-info-am install-info \
1.379 ++install-exec-am install-exec install-data-am install-data install-am \
1.380 ++install uninstall-am uninstall all-redirect all-am all installdirs \
1.381 ++mostlyclean-generic distclean-generic clean-generic \
1.382 ++maintainer-clean-generic clean mostlyclean distclean maintainer-clean
1.387 ++# Tell versions [3.59,3.63) of GNU make to not export all variables.
1.388 ++# Otherwise a system limit (for SysV at least) may be exceeded.
1.390 +diff -urN newlib-1.8.2/newlib/libc/sys/aica/absolute_vfs.c newlib-1.8.2-aica/newlib/libc/sys/aica/absolute_vfs.c
1.391 +--- newlib-1.8.2/newlib/libc/sys/aica/absolute_vfs.c 1970-01-01 10:00:00.000000000 +1000
1.392 ++++ newlib-1.8.2-aica/newlib/libc/sys/aica/absolute_vfs.c 2008-08-13 11:54:44.000000000 +1000
1.396 ++int _newlib_vfs_is_absolute (void)
1.401 ++void _newlib_vfs_absolute_load (void)
1.403 ++ _newlib_vfs_initialized = VFS_LOADER_ABSOLUTE;
1.405 +diff -urN newlib-1.8.2/newlib/libc/sys/aica/aclocal.m4 newlib-1.8.2-aica/newlib/libc/sys/aica/aclocal.m4
1.406 +--- newlib-1.8.2/newlib/libc/sys/aica/aclocal.m4 1970-01-01 10:00:00.000000000 +1000
1.407 ++++ newlib-1.8.2-aica/newlib/libc/sys/aica/aclocal.m4 2008-08-13 11:54:44.000000000 +1000
1.409 ++dnl aclocal.m4 generated automatically by aclocal 1.3b
1.411 ++dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
1.412 ++dnl This file is free software; the Free Software Foundation
1.413 ++dnl gives unlimited permission to copy and/or distribute it,
1.414 ++dnl with or without modifications, as long as this notice is preserved.
1.416 ++dnl This program is distributed in the hope that it will be useful,
1.417 ++dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
1.418 ++dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
1.419 ++dnl PARTICULAR PURPOSE.
1.421 ++dnl This provides configure definitions used by all the newlib
1.422 ++dnl configure.in files.
1.424 ++dnl Basic newlib configury. This calls basic introductory stuff,
1.425 ++dnl including AM_INIT_AUTOMAKE and AC_CANONICAL_HOST. It also runs
1.426 ++dnl configure.host. The only argument is the relative path to the top
1.427 ++dnl newlib directory.
1.429 ++AC_DEFUN(NEWLIB_CONFIGURE,
1.431 ++dnl Default to --enable-multilib
1.432 ++AC_ARG_ENABLE(multilib,
1.433 ++[ --enable-multilib build many library versions (default)],
1.434 ++[case "${enableval}" in
1.435 ++ yes) multilib=yes ;;
1.436 ++ no) multilib=no ;;
1.437 ++ *) AC_MSG_ERROR(bad value ${enableval} for multilib option) ;;
1.438 ++ esac], [multilib=yes])dnl
1.440 ++dnl Support --enable-target-optspace
1.441 ++AC_ARG_ENABLE(target-optspace,
1.442 ++[ --enable-target-optspace optimize for space],
1.443 ++[case "${enableval}" in
1.444 ++ yes) target_optspace=yes ;;
1.445 ++ no) target_optspace=no ;;
1.446 ++ *) AC_MSG_ERROR(bad value ${enableval} for target-optspace option) ;;
1.447 ++ esac], [target_optspace=])dnl
1.449 ++dnl Support --enable-newlib-mb
1.450 ++AC_ARG_ENABLE(newlib-mb,
1.451 ++[ --enable-newlib-mb enable multibyte support],
1.452 ++[case "${enableval}" in
1.453 ++ yes) newlib_mb=yes ;;
1.454 ++ no) newlib_mb=no ;;
1.455 ++ *) AC_MSG_ERROR(bad value ${enableval} for newlib-mb option) ;;
1.456 ++ esac], [newlib_mb=no])dnl
1.458 ++dnl We may get other options which we don't document:
1.459 ++dnl --with-target-subdir, --with-multisrctop, --with-multisubdir
1.461 ++test -z "[$]{with_target_subdir}" && with_target_subdir=.
1.463 ++if test "[$]{srcdir}" = "."; then
1.464 ++ if test "[$]{with_target_subdir}" != "."; then
1.465 ++ newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}../$1"
1.467 ++ newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}$1"
1.470 ++ newlib_basedir="[$]{srcdir}/$1"
1.472 ++AC_SUBST(newlib_basedir)
1.474 ++AC_CANONICAL_HOST
1.476 ++AM_INIT_AUTOMAKE(newlib, 1.8.1)
1.478 ++# FIXME: We temporarily define our own version of AC_PROG_CC. This is
1.479 ++# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
1.480 ++# are probably using a cross compiler, which will not be able to fully
1.481 ++# link an executable. This should really be fixed in autoconf
1.484 ++AC_DEFUN(LIB_AC_PROG_CC,
1.485 ++[AC_BEFORE([$0], [AC_PROG_CPP])dnl
1.486 ++AC_CHECK_PROG(CC, gcc, gcc)
1.487 ++if test -z "$CC"; then
1.488 ++ AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
1.489 ++ test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
1.494 ++if test $ac_cv_prog_gcc = yes; then
1.496 ++dnl Check whether -g works, even if CFLAGS is set, in case the package
1.497 ++dnl plays around with CFLAGS (such as to build both debugging and
1.498 ++dnl normal versions of a library), tasteless as that idea is.
1.499 ++ ac_test_CFLAGS="${CFLAGS+set}"
1.500 ++ ac_save_CFLAGS="$CFLAGS"
1.503 ++ if test "$ac_test_CFLAGS" = set; then
1.504 ++ CFLAGS="$ac_save_CFLAGS"
1.505 ++ elif test $ac_cv_prog_cc_g = yes; then
1.512 ++ test "${CFLAGS+set}" = set || CFLAGS="-g"
1.518 ++# AC_CHECK_TOOL does AC_REQUIRE (AC_CANONICAL_BUILD). If we don't
1.519 ++# run it explicitly here, it will be run implicitly before
1.520 ++# NEWLIB_CONFIGURE, which doesn't work because that means that it will
1.521 ++# be run before AC_CANONICAL_HOST.
1.522 ++AC_CANONICAL_BUILD
1.524 ++AC_CHECK_TOOL(AS, as)
1.525 ++AC_CHECK_TOOL(AR, ar)
1.526 ++AC_CHECK_TOOL(RANLIB, ranlib, :)
1.530 ++#AM_MAINTAINER_MODE
1.532 ++# We need AM_EXEEXT to keep automake happy in cygnus mode. However,
1.533 ++# at least currently, we never actually build a program, so we never
1.534 ++# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
1.535 ++# fails, because we are probably configuring with a cross compiler
1.536 ++# which can't create executables. So we include AM_EXEEXT to keep
1.537 ++# automake happy, but we don't execute it, since we don't care about
1.543 ++. [$]{newlib_basedir}/configure.host
1.545 ++case [$]{newlib_basedir} in
1.546 ++/* | [A-Za-z]:[/\\]*) newlib_flagbasedir=[$]{newlib_basedir} ;;
1.547 ++*) newlib_flagbasedir='[$](top_builddir)/'[$]{newlib_basedir} ;;
1.550 ++newlib_cflags="[$]{newlib_cflags} -I"'[$](top_builddir)'"/$1/targ-include -I[$]{newlib_flagbasedir}/libc/include"
1.551 ++case "${host}" in
1.553 ++ newlib_cflags="[$]{newlib_cflags} -I[$]{newlib_flagbasedir}/../winsup/include"
1.557 ++newlib_cflags="[$]{newlib_cflags} -fno-builtin"
1.559 ++NEWLIB_CFLAGS=${newlib_cflags}
1.560 ++AC_SUBST(NEWLIB_CFLAGS)
1.562 ++AC_SUBST(machine_dir)
1.563 ++AC_SUBST(sys_dir)
1.566 ++# Do all the work for Automake. This macro actually does too much --
1.567 ++# some checks are only needed if your package does certain things.
1.568 ++# But this isn't really a big deal.
1.573 ++dnl AM_INIT_AUTOMAKE(package,version, [no-define])
1.575 ++AC_DEFUN(AM_INIT_AUTOMAKE,
1.576 ++[AC_REQUIRE([AM_PROG_INSTALL])
1.578 ++AC_SUBST(PACKAGE)
1.580 ++AC_SUBST(VERSION)
1.581 ++dnl test to see if srcdir already configured
1.582 ++if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1.583 ++ AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
1.586 ++AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
1.587 ++AC_DEFINE_UNQUOTED(VERSION, "$VERSION"))
1.588 ++AC_REQUIRE([AM_SANITY_CHECK])
1.589 ++AC_REQUIRE([AC_ARG_PROGRAM])
1.590 ++dnl FIXME This is truly gross.
1.591 ++missing_dir=`cd $ac_aux_dir && pwd`
1.592 ++AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
1.593 ++AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
1.594 ++AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
1.595 ++AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
1.596 ++AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
1.597 ++AC_REQUIRE([AC_PROG_MAKE_SET])])
1.602 ++AC_DEFUN(AM_PROG_INSTALL,
1.603 ++[AC_REQUIRE([AC_PROG_INSTALL])
1.604 ++test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1.605 ++AC_SUBST(INSTALL_SCRIPT)dnl
1.609 ++# Check to make sure that the build environment is sane.
1.612 ++AC_DEFUN(AM_SANITY_CHECK,
1.613 ++[AC_MSG_CHECKING([whether build environment is sane])
1.616 ++echo timestamp > conftestfile
1.617 ++# Do `set' in a subshell so we don't clobber the current shell's
1.618 ++# arguments. Must try -L first in case configure is actually a
1.619 ++# symlink; some systems play weird games with the mod time of symlinks
1.620 ++# (eg FreeBSD returns the mod time of the symlink's containing
1.623 ++ set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
1.624 ++ if test "[$]*" = "X"; then
1.625 ++ # -L didn't work.
1.626 ++ set X `ls -t $srcdir/configure conftestfile`
1.628 ++ if test "[$]*" != "X $srcdir/configure conftestfile" \
1.629 ++ && test "[$]*" != "X conftestfile $srcdir/configure"; then
1.631 ++ # If neither matched, then we have a broken ls. This can happen
1.632 ++ # if, for instance, CONFIG_SHELL is bash and it inherits a
1.633 ++ # broken ls alias from the environment. This has actually
1.634 ++ # happened. Such a system could not be considered "sane".
1.635 ++ AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
1.636 ++alias in your environment])
1.639 ++ test "[$]2" = conftestfile
1.645 ++ AC_MSG_ERROR([newly created file is older than distributed files!
1.646 ++Check your system clock])
1.649 ++AC_MSG_RESULT(yes)])
1.651 ++dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
1.652 ++dnl The program must properly implement --version.
1.653 ++AC_DEFUN(AM_MISSING_PROG,
1.654 ++[AC_MSG_CHECKING(for working $2)
1.655 ++# Run test in a subshell; some versions of sh will print an error if
1.656 ++# an executable is not found, even if stderr is redirected.
1.657 ++# Redirect stdin to placate older versions of autoconf. Sigh.
1.658 ++if ($2 --version) < /dev/null > /dev/null 2>&1; then
1.660 ++ AC_MSG_RESULT(found)
1.662 ++ $1="$3/missing $2"
1.663 ++ AC_MSG_RESULT(missing)
1.667 ++# Add --enable-maintainer-mode option to configure.
1.668 ++# From Jim Meyering
1.672 ++AC_DEFUN(AM_MAINTAINER_MODE,
1.673 ++[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
1.674 ++ dnl maintainer-mode is disabled by default
1.675 ++ AC_ARG_ENABLE(maintainer-mode,
1.676 ++[ --enable-maintainer-mode enable make rules and dependencies not useful
1.677 ++ (and sometimes confusing) to the casual installer],
1.678 ++ USE_MAINTAINER_MODE=$enableval,
1.679 ++ USE_MAINTAINER_MODE=no)
1.680 ++ AC_MSG_RESULT($USE_MAINTAINER_MODE)
1.681 ++ if test $USE_MAINTAINER_MODE = yes; then
1.686 ++# AC_SUBST(MAINT)dnl
1.690 ++# Check to see if we're running under Win32, without using
1.691 ++# AC_CANONICAL_*. If so, set output variable EXEEXT to ".exe".
1.692 ++# Otherwise set it to "".
1.695 ++dnl This knows we add .exe if we're building in the Cygwin32
1.696 ++dnl environment. But if we're not, then it compiles a test program
1.697 ++dnl to see if there is a suffix for executables.
1.698 ++AC_DEFUN(AM_EXEEXT,
1.699 ++[AC_REQUIRE([AM_CYGWIN32])
1.700 ++AC_REQUIRE([AM_MINGW32])
1.701 ++AC_MSG_CHECKING([for executable suffix])
1.702 ++AC_CACHE_VAL(am_cv_exeext,
1.703 ++[if test "$CYGWIN32" = yes || test "$MINGW32" = yes; then
1.704 ++am_cv_exeext=.exe
1.706 ++cat > am_c_test.c << 'EOF'
1.708 ++/* Nothing needed here */
1.711 ++${CC-cc} -o am_c_test $CFLAGS $CPPFLAGS $LDFLAGS am_c_test.c $LIBS 1>&5
1.713 ++for file in am_c_test.*; do
1.717 ++ *) am_cv_exeext=`echo $file | sed -e s/am_c_test//` ;;
1.720 ++rm -f am_c_test*])
1.721 ++test x"${am_cv_exeext}" = x && am_cv_exeext=no
1.724 ++test x"${am_cv_exeext}" != xno && EXEEXT=${am_cv_exeext}
1.725 ++AC_MSG_RESULT(${am_cv_exeext})
1.726 ++AC_SUBST(EXEEXT)])
1.728 ++# Check to see if we're running under Cygwin32, without using
1.729 ++# AC_CANONICAL_*. If so, set output variable CYGWIN32 to "yes".
1.730 ++# Otherwise set it to "no".
1.732 ++dnl AM_CYGWIN32()
1.733 ++AC_DEFUN(AM_CYGWIN32,
1.734 ++[AC_CACHE_CHECK(for Cygwin32 environment, am_cv_cygwin32,
1.735 ++[AC_TRY_COMPILE(,[return __CYGWIN32__;],
1.736 ++am_cv_cygwin32=yes, am_cv_cygwin32=no)
1.737 ++rm -f conftest*])
1.739 ++test "$am_cv_cygwin32" = yes && CYGWIN32=yes])
1.741 ++# Check to see if we're running under Mingw, without using
1.742 ++# AC_CANONICAL_*. If so, set output variable MINGW32 to "yes".
1.743 ++# Otherwise set it to "no".
1.746 ++AC_DEFUN(AM_MINGW32,
1.747 ++[AC_CACHE_CHECK(for Mingw32 environment, am_cv_mingw32,
1.748 ++[AC_TRY_COMPILE(,[return __MINGW32__;],
1.749 ++am_cv_mingw32=yes, am_cv_mingw32=no)
1.750 ++rm -f conftest*])
1.752 ++test "$am_cv_mingw32" = yes && MINGW32=yes])
1.754 +diff -urN newlib-1.8.2/newlib/libc/sys/aica/chdir.c newlib-1.8.2-aica/newlib/libc/sys/aica/chdir.c
1.755 +--- newlib-1.8.2/newlib/libc/sys/aica/chdir.c 1970-01-01 10:00:00.000000000 +1000
1.756 ++++ newlib-1.8.2-aica/newlib/libc/sys/aica/chdir.c 2008-08-13 11:54:44.000000000 +1000
1.761 ++chdir (const char *path)
1.763 ++ char *obj = _newlib_vfs_new_string (path);
1.765 ++ struct media_ops *mops = _newlib_vfs_get_media_ops (path);
1.766 ++ int res = mops->chdir (obj);
1.768 ++ _newlib_vfs_delete_string (obj);
1.772 +diff -urN newlib-1.8.2/newlib/libc/sys/aica/chmod.c newlib-1.8.2-aica/newlib/libc/sys/aica/chmod.c
1.773 +--- newlib-1.8.2/newlib/libc/sys/aica/chmod.c 1970-01-01 10:00:00.000000000 +1000
1.774 ++++ newlib-1.8.2-aica/newlib/libc/sys/aica/chmod.c 2008-08-13 11:54:44.000000000 +1000
1.776 ++#include <sys/types.h>
1.781 ++chmod (const char *path, mode_t mode)
1.783 ++ char *obj = _newlib_vfs_new_string (path);
1.785 ++ struct media_ops *mops = _newlib_vfs_get_media_ops (path);
1.786 ++ int res = mops->chmod (obj, mode);
1.788 ++ _newlib_vfs_delete_string (obj);
1.792 +diff -urN newlib-1.8.2/newlib/libc/sys/aica/close.c newlib-1.8.2-aica/newlib/libc/sys/aica/close.c
1.793 +--- newlib-1.8.2/newlib/libc/sys/aica/close.c 1970-01-01 10:00:00.000000000 +1000
1.794 ++++ newlib-1.8.2-aica/newlib/libc/sys/aica/close.c 2008-08-13 11:54:44.000000000 +1000
1.801 ++ struct file *pf = _newlib_vfs_get_file (fd);
1.802 ++ int res = pf->fops->close (pf);
1.806 ++ return _newlib_vfs_remove_file (pf);
1.811 +diff -urN newlib-1.8.2/newlib/libc/sys/aica/configure newlib-1.8.2-aica/newlib/libc/sys/aica/configure
1.812 +--- newlib-1.8.2/newlib/libc/sys/aica/configure 1970-01-01 10:00:00.000000000 +1000
1.813 ++++ newlib-1.8.2-aica/newlib/libc/sys/aica/configure 2008-08-13 11:54:44.000000000 +1000
1.814 +@@ -0,0 +1,1586 @@
1.817 ++# Guess values for system-dependent variables and create Makefiles.
1.818 ++# Generated automatically using autoconf version 2.13
1.819 ++# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
1.821 ++# This configure script is free software; the Free Software Foundation
1.822 ++# gives unlimited permission to copy, distribute and modify it.
1.826 ++ac_default_prefix=/usr/local
1.827 ++# Any additions from configure.in:
1.828 ++ac_help="$ac_help
1.829 ++ --enable-multilib build many library versions (default)"
1.830 ++ac_help="$ac_help
1.831 ++ --enable-target-optspace optimize for space"
1.832 ++ac_help="$ac_help
1.833 ++ --enable-newlib-mb enable multibyte support"
1.835 ++# Initialize some variables set by options.
1.836 ++# The variables have the same names as the options, with
1.837 ++# dashes changed to underlines.
1.839 ++cache_file=./config.cache
1.846 ++program_prefix=NONE
1.847 ++program_suffix=NONE
1.848 ++program_transform_name=s,x,x,
1.856 ++bindir='${exec_prefix}/bin'
1.857 ++sbindir='${exec_prefix}/sbin'
1.858 ++libexecdir='${exec_prefix}/libexec'
1.859 ++datadir='${prefix}/share'
1.860 ++sysconfdir='${prefix}/etc'
1.861 ++sharedstatedir='${prefix}/com'
1.862 ++localstatedir='${prefix}/var'
1.863 ++libdir='${exec_prefix}/lib'
1.864 ++includedir='${prefix}/include'
1.865 ++oldincludedir='/usr/include'
1.866 ++infodir='${prefix}/info'
1.867 ++mandir='${prefix}/man'
1.869 ++# Initialize some other variables.
1.871 ++MFLAGS= MAKEFLAGS=
1.872 ++SHELL=${CONFIG_SHELL-/bin/sh}
1.873 ++# Maximum number of lines to put in a shell here document.
1.874 ++ac_max_here_lines=12
1.880 ++ # If the previous option needs an argument, assign it.
1.881 ++ if test -n "$ac_prev"; then
1.882 ++ eval "$ac_prev=\$ac_option"
1.887 ++ case "$ac_option" in
1.888 ++ -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
1.889 ++ *) ac_optarg= ;;
1.892 ++ # Accept the important Cygnus configure options, so we can diagnose typos.
1.894 ++ case "$ac_option" in
1.896 ++ -bindir | --bindir | --bindi | --bind | --bin | --bi)
1.897 ++ ac_prev=bindir ;;
1.898 ++ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1.899 ++ bindir="$ac_optarg" ;;
1.901 ++ -build | --build | --buil | --bui | --bu)
1.902 ++ ac_prev=build ;;
1.903 ++ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1.904 ++ build="$ac_optarg" ;;
1.906 ++ -cache-file | --cache-file | --cache-fil | --cache-fi \
1.907 ++ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1.908 ++ ac_prev=cache_file ;;
1.909 ++ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1.910 ++ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1.911 ++ cache_file="$ac_optarg" ;;
1.913 ++ -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
1.914 ++ ac_prev=datadir ;;
1.915 ++ -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
1.917 ++ datadir="$ac_optarg" ;;
1.919 ++ -disable-* | --disable-*)
1.920 ++ ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
1.921 ++ # Reject names that are not valid shell variable names.
1.922 ++ if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
1.923 ++ { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
1.925 ++ ac_feature=`echo $ac_feature| sed 's/-/_/g'`
1.926 ++ eval "enable_${ac_feature}=no" ;;
1.928 ++ -enable-* | --enable-*)
1.929 ++ ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
1.930 ++ # Reject names that are not valid shell variable names.
1.931 ++ if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
1.932 ++ { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
1.934 ++ ac_feature=`echo $ac_feature| sed 's/-/_/g'`
1.935 ++ case "$ac_option" in
1.937 ++ *) ac_optarg=yes ;;
1.939 ++ eval "enable_${ac_feature}='$ac_optarg'" ;;
1.941 ++ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1.942 ++ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1.943 ++ | --exec | --exe | --ex)
1.944 ++ ac_prev=exec_prefix ;;
1.945 ++ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1.946 ++ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1.947 ++ | --exec=* | --exe=* | --ex=*)
1.948 ++ exec_prefix="$ac_optarg" ;;
1.950 ++ -gas | --gas | --ga | --g)
1.951 ++ # Obsolete; use --with-gas.
1.954 ++ -help | --help | --hel | --he)
1.955 ++ # Omit some internal or obsolete options to make the list less imposing.
1.956 ++ # This message is too long to be a string in the A/UX 3.1 sh.
1.958 ++Usage: configure [options] [host]
1.959 ++Options: [defaults in brackets after descriptions]
1.961 ++ --cache-file=FILE cache test results in FILE
1.962 ++ --help print this message
1.963 ++ --no-create do not create output files
1.964 ++ --quiet, --silent do not print \`checking...' messages
1.965 ++ --version print the version of autoconf that created configure
1.966 ++Directory and file names:
1.967 ++ --prefix=PREFIX install architecture-independent files in PREFIX
1.968 ++ [$ac_default_prefix]
1.969 ++ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1.970 ++ [same as prefix]
1.971 ++ --bindir=DIR user executables in DIR [EPREFIX/bin]
1.972 ++ --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
1.973 ++ --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
1.974 ++ --datadir=DIR read-only architecture-independent data in DIR
1.976 ++ --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
1.977 ++ --sharedstatedir=DIR modifiable architecture-independent data in DIR
1.979 ++ --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
1.980 ++ --libdir=DIR object code libraries in DIR [EPREFIX/lib]
1.981 ++ --includedir=DIR C header files in DIR [PREFIX/include]
1.982 ++ --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
1.983 ++ --infodir=DIR info documentation in DIR [PREFIX/info]
1.984 ++ --mandir=DIR man documentation in DIR [PREFIX/man]
1.985 ++ --srcdir=DIR find the sources in DIR [configure dir or ..]
1.986 ++ --program-prefix=PREFIX prepend PREFIX to installed program names
1.987 ++ --program-suffix=SUFFIX append SUFFIX to installed program names
1.988 ++ --program-transform-name=PROGRAM
1.989 ++ run sed PROGRAM on installed program names
1.993 ++ --build=BUILD configure for building on BUILD [BUILD=HOST]
1.994 ++ --host=HOST configure for HOST [guessed]
1.995 ++ --target=TARGET configure for TARGET [TARGET=HOST]
1.996 ++Features and packages:
1.997 ++ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1.998 ++ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1.999 ++ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1.1000 ++ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1.1001 ++ --x-includes=DIR X include files are in DIR
1.1002 ++ --x-libraries=DIR X library files are in DIR
1.1004 ++ if test -n "$ac_help"; then
1.1005 ++ echo "--enable and --with options recognized:$ac_help"
1.1009 ++ -host | --host | --hos | --ho)
1.1011 ++ -host=* | --host=* | --hos=* | --ho=*)
1.1012 ++ host="$ac_optarg" ;;
1.1014 ++ -includedir | --includedir | --includedi | --included | --include \
1.1015 ++ | --includ | --inclu | --incl | --inc)
1.1016 ++ ac_prev=includedir ;;
1.1017 ++ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1.1018 ++ | --includ=* | --inclu=* | --incl=* | --inc=*)
1.1019 ++ includedir="$ac_optarg" ;;
1.1021 ++ -infodir | --infodir | --infodi | --infod | --info | --inf)
1.1023 ++ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1.1024 ++ infodir="$ac_optarg" ;;
1.1026 ++ -libdir | --libdir | --libdi | --libd)
1.1028 ++ -libdir=* | --libdir=* | --libdi=* | --libd=*)
1.1029 ++ libdir="$ac_optarg" ;;
1.1031 ++ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1.1032 ++ | --libexe | --libex | --libe)
1.1033 ++ ac_prev=libexecdir ;;
1.1034 ++ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1.1035 ++ | --libexe=* | --libex=* | --libe=*)
1.1036 ++ libexecdir="$ac_optarg" ;;
1.1038 ++ -localstatedir | --localstatedir | --localstatedi | --localstated \
1.1039 ++ | --localstate | --localstat | --localsta | --localst \
1.1040 ++ | --locals | --local | --loca | --loc | --lo)
1.1041 ++ ac_prev=localstatedir ;;
1.1042 ++ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1.1043 ++ | --localstate=* | --localstat=* | --localsta=* | --localst=* \
1.1044 ++ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
1.1045 ++ localstatedir="$ac_optarg" ;;
1.1047 ++ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1.1049 ++ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1.1050 ++ mandir="$ac_optarg" ;;
1.1052 ++ -nfp | --nfp | --nf)
1.1053 ++ # Obsolete; use --without-fp.
1.1056 ++ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1.1060 ++ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1.1061 ++ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1.1064 ++ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1.1065 ++ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1.1066 ++ | --oldin | --oldi | --old | --ol | --o)
1.1067 ++ ac_prev=oldincludedir ;;
1.1068 ++ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1.1069 ++ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1.1070 ++ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1.1071 ++ oldincludedir="$ac_optarg" ;;
1.1073 ++ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1.1075 ++ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1.1076 ++ prefix="$ac_optarg" ;;
1.1078 ++ -program-prefix | --program-prefix | --program-prefi | --program-pref \
1.1079 ++ | --program-pre | --program-pr | --program-p)
1.1080 ++ ac_prev=program_prefix ;;
1.1081 ++ -program-prefix=* | --program-prefix=* | --program-prefi=* \
1.1082 ++ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1.1083 ++ program_prefix="$ac_optarg" ;;
1.1085 ++ -program-suffix | --program-suffix | --program-suffi | --program-suff \
1.1086 ++ | --program-suf | --program-su | --program-s)
1.1087 ++ ac_prev=program_suffix ;;
1.1088 ++ -program-suffix=* | --program-suffix=* | --program-suffi=* \
1.1089 ++ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1.1090 ++ program_suffix="$ac_optarg" ;;
1.1092 ++ -program-transform-name | --program-transform-name \
1.1093 ++ | --program-transform-nam | --program-transform-na \
1.1094 ++ | --program-transform-n | --program-transform- \
1.1095 ++ | --program-transform | --program-transfor \
1.1096 ++ | --program-transfo | --program-transf \
1.1097 ++ | --program-trans | --program-tran \
1.1098 ++ | --progr-tra | --program-tr | --program-t)
1.1099 ++ ac_prev=program_transform_name ;;
1.1100 ++ -program-transform-name=* | --program-transform-name=* \
1.1101 ++ | --program-transform-nam=* | --program-transform-na=* \
1.1102 ++ | --program-transform-n=* | --program-transform-=* \
1.1103 ++ | --program-transform=* | --program-transfor=* \
1.1104 ++ | --program-transfo=* | --program-transf=* \
1.1105 ++ | --program-trans=* | --program-tran=* \
1.1106 ++ | --progr-tra=* | --program-tr=* | --program-t=*)
1.1107 ++ program_transform_name="$ac_optarg" ;;
1.1109 ++ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1.1110 ++ | -silent | --silent | --silen | --sile | --sil)
1.1113 ++ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1.1115 ++ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1.1117 ++ sbindir="$ac_optarg" ;;
1.1119 ++ -sharedstatedir | --sharedstatedir | --sharedstatedi \
1.1120 ++ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1.1121 ++ | --sharedst | --shareds | --shared | --share | --shar \
1.1123 ++ ac_prev=sharedstatedir ;;
1.1124 ++ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1.1125 ++ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1.1126 ++ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1.1128 ++ sharedstatedir="$ac_optarg" ;;
1.1130 ++ -site | --site | --sit)
1.1132 ++ -site=* | --site=* | --sit=*)
1.1133 ++ site="$ac_optarg" ;;
1.1135 ++ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1.1137 ++ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1.1138 ++ srcdir="$ac_optarg" ;;
1.1140 ++ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1.1141 ++ | --syscon | --sysco | --sysc | --sys | --sy)
1.1142 ++ ac_prev=sysconfdir ;;
1.1143 ++ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1.1144 ++ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1.1145 ++ sysconfdir="$ac_optarg" ;;
1.1147 ++ -target | --target | --targe | --targ | --tar | --ta | --t)
1.1149 ++ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1.1150 ++ target="$ac_optarg" ;;
1.1152 ++ -v | -verbose | --verbose | --verbos | --verbo | --verb)
1.1155 ++ -version | --version | --versio | --versi | --vers)
1.1156 ++ echo "configure generated by autoconf version 2.13"
1.1160 ++ ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
1.1161 ++ # Reject names that are not valid shell variable names.
1.1162 ++ if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
1.1163 ++ { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
1.1165 ++ ac_package=`echo $ac_package| sed 's/-/_/g'`
1.1166 ++ case "$ac_option" in
1.1170 ++ eval "with_${ac_package}='$ac_optarg'" ;;
1.1172 ++ -without-* | --without-*)
1.1173 ++ ac_package=`echo $ac_option|sed -e 's/-*without-//'`
1.1174 ++ # Reject names that are not valid shell variable names.
1.1175 ++ if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
1.1176 ++ { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
1.1178 ++ ac_package=`echo $ac_package| sed 's/-/_/g'`
1.1179 ++ eval "with_${ac_package}=no" ;;
1.1182 ++ # Obsolete; use --with-x.
1.1185 ++ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1.1186 ++ | --x-incl | --x-inc | --x-in | --x-i)
1.1187 ++ ac_prev=x_includes ;;
1.1188 ++ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1.1189 ++ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1.1190 ++ x_includes="$ac_optarg" ;;
1.1192 ++ -x-libraries | --x-libraries | --x-librarie | --x-librari \
1.1193 ++ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1.1194 ++ ac_prev=x_libraries ;;
1.1195 ++ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1.1196 ++ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1.1197 ++ x_libraries="$ac_optarg" ;;
1.1199 ++ -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
1.1203 ++ if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
1.1204 ++ echo "configure: warning: $ac_option: invalid host type" 1>&2
1.1206 ++ if test "x$nonopt" != xNONE; then
1.1207 ++ { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
1.1215 ++if test -n "$ac_prev"; then
1.1216 ++ { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
1.1219 ++trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
1.1221 ++# File descriptor usage:
1.1224 ++# 2 errors and warnings
1.1225 ++# 3 some systems may open it to /dev/tty
1.1226 ++# 4 used on the Kubota Titan
1.1227 ++# 6 checking for... messages and results
1.1228 ++# 5 compiler messages saved in config.log
1.1229 ++if test "$silent" = yes; then
1.1237 ++This file contains any messages produced by compilers while
1.1238 ++running configure, to aid debugging if configure makes a mistake.
1.1241 ++# Strip out --no-create and --no-recursion so they do not pile up.
1.1242 ++# Also quote any args containing shell metacharacters.
1.1247 ++ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1.1248 ++ | --no-cr | --no-c) ;;
1.1249 ++ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1.1250 ++ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
1.1251 ++ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
1.1252 ++ ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1.1253 ++ *) ac_configure_args="$ac_configure_args $ac_arg" ;;
1.1258 ++# Only set these to C if already set. These must not be set unconditionally
1.1259 ++# because not all systems understand e.g. LANG=C (notably SCO).
1.1260 ++# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
1.1261 ++# Non-C LC_CTYPE values break the ctype check.
1.1262 ++if test "${LANG+set}" = set; then LANG=C; export LANG; fi
1.1263 ++if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
1.1264 ++if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
1.1265 ++if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
1.1267 ++# confdefs.h avoids OS command line length limits that DEFS can exceed.
1.1268 ++rm -rf conftest* confdefs.h
1.1269 ++# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1.1272 ++# A filename unique to this package, relative to the directory that
1.1273 ++# configure is in, which we can look for to find out if srcdir is correct.
1.1274 ++ac_unique_file=sbrk.c
1.1276 ++# Find the source files, if location was not specified.
1.1277 ++if test -z "$srcdir"; then
1.1278 ++ ac_srcdir_defaulted=yes
1.1279 ++ # Try the directory containing this script, then its parent.
1.1281 ++ ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
1.1282 ++ test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
1.1284 ++ if test ! -r $srcdir/$ac_unique_file; then
1.1288 ++ ac_srcdir_defaulted=no
1.1290 ++if test ! -r $srcdir/$ac_unique_file; then
1.1291 ++ if test "$ac_srcdir_defaulted" = yes; then
1.1292 ++ { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
1.1294 ++ { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
1.1297 ++srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
1.1299 ++# Prefer explicitly selected file to automatically selected ones.
1.1300 ++if test -z "$CONFIG_SITE"; then
1.1301 ++ if test "x$prefix" != xNONE; then
1.1302 ++ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1.1304 ++ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1.1307 ++for ac_site_file in $CONFIG_SITE; do
1.1308 ++ if test -r "$ac_site_file"; then
1.1309 ++ echo "loading site script $ac_site_file"
1.1314 ++if test -r "$cache_file"; then
1.1315 ++ echo "loading cache $cache_file"
1.1318 ++ echo "creating cache $cache_file"
1.1323 ++# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1.1324 ++ac_cpp='$CPP $CPPFLAGS'
1.1325 ++ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1.1326 ++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1.1327 ++cross_compiling=$ac_cv_prog_cc_cross
1.1331 ++if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
1.1332 ++ # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
1.1333 ++ if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
1.1340 ++ ac_n= ac_c='\c' ac_t=
1.1346 ++for ac_dir in ../../../.. $srcdir/../../../..; do
1.1347 ++ if test -f $ac_dir/install-sh; then
1.1349 ++ ac_install_sh="$ac_aux_dir/install-sh -c"
1.1351 ++ elif test -f $ac_dir/install.sh; then
1.1353 ++ ac_install_sh="$ac_aux_dir/install.sh -c"
1.1357 ++if test -z "$ac_aux_dir"; then
1.1358 ++ { echo "configure: error: can not find install-sh or install.sh in ../../../.. $srcdir/../../../.." 1>&2; exit 1; }
1.1360 ++ac_config_guess=$ac_aux_dir/config.guess
1.1361 ++ac_config_sub=$ac_aux_dir/config.sub
1.1362 ++ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1.1365 ++# Find a good install program. We prefer a C program (faster),
1.1366 ++# so one script is as good as another. But avoid the broken or
1.1367 ++# incompatible versions:
1.1368 ++# SysV /etc/install, /usr/sbin/install
1.1369 ++# SunOS /usr/etc/install
1.1372 ++# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1.1373 ++# AFS /usr/afsws/bin/install, which mishandles nonexistent args
1.1374 ++# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1.1375 ++# ./install, which can be erroneously created by make from ./install.sh.
1.1376 ++echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1.1377 ++echo "configure:564: checking for a BSD compatible install" >&5
1.1378 ++if test -z "$INSTALL"; then
1.1379 ++if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1.1380 ++ echo $ac_n "(cached) $ac_c" 1>&6
1.1382 ++ IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
1.1383 ++ for ac_dir in $PATH; do
1.1384 ++ # Account for people who put trailing slashes in PATH elements.
1.1386 ++ /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1.1388 ++ # OSF1 and SCO ODT 3.0 have their own names for install.
1.1389 ++ # Don't use installbsd from OSF since it installs stuff as root
1.1391 ++ for ac_prog in ginstall scoinst install; do
1.1392 ++ if test -f $ac_dir/$ac_prog; then
1.1393 ++ if test $ac_prog = install &&
1.1394 ++ grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1.1395 ++ # AIX install. It has an incompatible calling convention.
1.1398 ++ ac_cv_path_install="$ac_dir/$ac_prog -c"
1.1409 ++ if test "${ac_cv_path_install+set}" = set; then
1.1410 ++ INSTALL="$ac_cv_path_install"
1.1412 ++ # As a last resort, use the slow shell script. We don't cache a
1.1413 ++ # path for INSTALL within a source directory, because that will
1.1414 ++ # break other packages using the cache if that directory is
1.1415 ++ # removed, or if the path is relative.
1.1416 ++ INSTALL="$ac_install_sh"
1.1419 ++echo "$ac_t""$INSTALL" 1>&6
1.1421 ++# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1.1422 ++# It thinks the first close brace ends the variable substitution.
1.1423 ++test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1.1425 ++test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1.1427 ++test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1.1430 ++test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1.1432 ++echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
1.1433 ++echo "configure:620: checking whether build environment is sane" >&5
1.1436 ++echo timestamp > conftestfile
1.1437 ++# Do `set' in a subshell so we don't clobber the current shell's
1.1438 ++# arguments. Must try -L first in case configure is actually a
1.1439 ++# symlink; some systems play weird games with the mod time of symlinks
1.1440 ++# (eg FreeBSD returns the mod time of the symlink's containing
1.1443 ++ set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
1.1444 ++ if test "$*" = "X"; then
1.1446 ++ set X `ls -t $srcdir/configure conftestfile`
1.1448 ++ if test "$*" != "X $srcdir/configure conftestfile" \
1.1449 ++ && test "$*" != "X conftestfile $srcdir/configure"; then
1.1451 ++ # If neither matched, then we have a broken ls. This can happen
1.1452 ++ # if, for instance, CONFIG_SHELL is bash and it inherits a
1.1453 ++ # broken ls alias from the environment. This has actually
1.1454 ++ # happened. Such a system could not be considered "sane".
1.1455 ++ { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
1.1456 ++alias in your environment" 1>&2; exit 1; }
1.1459 ++ test "$2" = conftestfile
1.1465 ++ { echo "configure: error: newly created file is older than distributed files!
1.1466 ++Check your system clock" 1>&2; exit 1; }
1.1469 ++echo "$ac_t""yes" 1>&6
1.1470 ++if test "$program_transform_name" = s,x,x,; then
1.1471 ++ program_transform_name=
1.1473 ++ # Double any \ or $. echo might interpret backslashes.
1.1474 ++ cat <<\EOF_SED > conftestsed
1.1475 ++s,\\,\\\\,g; s,\$,$$,g
1.1477 ++ program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1.1480 ++test "$program_prefix" != NONE &&
1.1481 ++ program_transform_name="s,^,${program_prefix},; $program_transform_name"
1.1482 ++# Use a double $ so make ignores it.
1.1483 ++test "$program_suffix" != NONE &&
1.1484 ++ program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
1.1486 ++# sed with no file args requires a program.
1.1487 ++test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1.1489 ++echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1.1490 ++echo "configure:677: checking whether ${MAKE-make} sets \${MAKE}" >&5
1.1491 ++set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1.1492 ++if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1.1493 ++ echo $ac_n "(cached) $ac_c" 1>&6
1.1495 ++ cat > conftestmake <<\EOF
1.1497 ++ @echo 'ac_maketemp="${MAKE}"'
1.1499 ++# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1.1500 ++eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1.1501 ++if test -n "$ac_maketemp"; then
1.1502 ++ eval ac_cv_prog_make_${ac_make}_set=yes
1.1504 ++ eval ac_cv_prog_make_${ac_make}_set=no
1.1508 ++if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1.1509 ++ echo "$ac_t""yes" 1>&6
1.1512 ++ echo "$ac_t""no" 1>&6
1.1513 ++ SET_MAKE="MAKE=${MAKE-make}"
1.1516 ++if test $host != $build; then
1.1517 ++ ac_tool_prefix=${host_alias}-
1.1522 ++echo $ac_n "checking for Cygwin32 environment""... $ac_c" 1>&6
1.1523 ++echo "configure:710: checking for Cygwin32 environment" >&5
1.1524 ++if eval "test \"`echo '$''{'am_cv_cygwin32'+set}'`\" = set"; then
1.1525 ++ echo $ac_n "(cached) $ac_c" 1>&6
1.1527 ++ cat > conftest.$ac_ext <<EOF
1.1528 ++#line 715 "configure"
1.1529 ++#include "confdefs.h"
1.1535 ++if { (eval echo configure:722: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1.1539 ++ echo "configure: failed program was:" >&5
1.1540 ++ cat conftest.$ac_ext >&5
1.1548 ++echo "$ac_t""$am_cv_cygwin32" 1>&6
1.1550 ++test "$am_cv_cygwin32" = yes && CYGWIN32=yes
1.1551 ++echo $ac_n "checking for Mingw32 environment""... $ac_c" 1>&6
1.1552 ++echo "configure:739: checking for Mingw32 environment" >&5
1.1553 ++if eval "test \"`echo '$''{'am_cv_mingw32'+set}'`\" = set"; then
1.1554 ++ echo $ac_n "(cached) $ac_c" 1>&6
1.1556 ++ cat > conftest.$ac_ext <<EOF
1.1557 ++#line 744 "configure"
1.1558 ++#include "confdefs.h"
1.1564 ++if { (eval echo configure:751: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1.1568 ++ echo "configure: failed program was:" >&5
1.1569 ++ cat conftest.$ac_ext >&5
1.1577 ++echo "$ac_t""$am_cv_mingw32" 1>&6
1.1579 ++test "$am_cv_mingw32" = yes && MINGW32=yes
1.1581 ++# Check whether --enable-multilib or --disable-multilib was given.
1.1582 ++if test "${enable_multilib+set}" = set; then
1.1583 ++ enableval="$enable_multilib"
1.1584 ++ case "${enableval}" in
1.1585 ++ yes) multilib=yes ;;
1.1587 ++ *) { echo "configure: error: bad value ${enableval} for multilib option" 1>&2; exit 1; } ;;
1.1593 ++# Check whether --enable-target-optspace or --disable-target-optspace was given.
1.1594 ++if test "${enable_target_optspace+set}" = set; then
1.1595 ++ enableval="$enable_target_optspace"
1.1596 ++ case "${enableval}" in
1.1597 ++ yes) target_optspace=yes ;;
1.1598 ++ no) target_optspace=no ;;
1.1599 ++ *) { echo "configure: error: bad value ${enableval} for target-optspace option" 1>&2; exit 1; } ;;
1.1605 ++# Check whether --enable-newlib-mb or --disable-newlib-mb was given.
1.1606 ++if test "${enable_newlib_mb+set}" = set; then
1.1607 ++ enableval="$enable_newlib_mb"
1.1608 ++ case "${enableval}" in
1.1609 ++ yes) newlib_mb=yes ;;
1.1611 ++ *) { echo "configure: error: bad value ${enableval} for newlib-mb option" 1>&2; exit 1; } ;;
1.1618 ++test -z "${with_target_subdir}" && with_target_subdir=.
1.1620 ++if test "${srcdir}" = "."; then
1.1621 ++ if test "${with_target_subdir}" != "."; then
1.1622 ++ newlib_basedir="${srcdir}/${with_multisrctop}../../../.."
1.1624 ++ newlib_basedir="${srcdir}/${with_multisrctop}../../.."
1.1627 ++ newlib_basedir="${srcdir}/../../.."
1.1632 ++# Make sure we can run config.sub.
1.1633 ++if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1.1634 ++else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1.1637 ++echo $ac_n "checking host system type""... $ac_c" 1>&6
1.1638 ++echo "configure:825: checking host system type" >&5
1.1641 ++case "$host_alias" in
1.1645 ++ if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1.1646 ++ else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1.1648 ++ *) host_alias=$nonopt ;;
1.1652 ++host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1.1653 ++host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1.1654 ++host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1.1655 ++host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1.1656 ++echo "$ac_t""$host" 1>&6
1.1664 ++if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1.1665 ++ { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1.1667 ++cat >> confdefs.h <<EOF
1.1668 ++#define PACKAGE "$PACKAGE"
1.1671 ++cat >> confdefs.h <<EOF
1.1672 ++#define VERSION "$VERSION"
1.1677 ++missing_dir=`cd $ac_aux_dir && pwd`
1.1678 ++echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1.1679 ++echo "configure:866: checking for working aclocal" >&5
1.1680 ++# Run test in a subshell; some versions of sh will print an error if
1.1681 ++# an executable is not found, even if stderr is redirected.
1.1682 ++# Redirect stdin to placate older versions of autoconf. Sigh.
1.1683 ++if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1.1685 ++ echo "$ac_t""found" 1>&6
1.1687 ++ ACLOCAL="$missing_dir/missing aclocal"
1.1688 ++ echo "$ac_t""missing" 1>&6
1.1691 ++echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1.1692 ++echo "configure:879: checking for working autoconf" >&5
1.1693 ++# Run test in a subshell; some versions of sh will print an error if
1.1694 ++# an executable is not found, even if stderr is redirected.
1.1695 ++# Redirect stdin to placate older versions of autoconf. Sigh.
1.1696 ++if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1.1698 ++ echo "$ac_t""found" 1>&6
1.1700 ++ AUTOCONF="$missing_dir/missing autoconf"
1.1701 ++ echo "$ac_t""missing" 1>&6
1.1704 ++echo $ac_n "checking for working automake""... $ac_c" 1>&6
1.1705 ++echo "configure:892: checking for working automake" >&5
1.1706 ++# Run test in a subshell; some versions of sh will print an error if
1.1707 ++# an executable is not found, even if stderr is redirected.
1.1708 ++# Redirect stdin to placate older versions of autoconf. Sigh.
1.1709 ++if (automake --version) < /dev/null > /dev/null 2>&1; then
1.1711 ++ echo "$ac_t""found" 1>&6
1.1713 ++ AUTOMAKE="$missing_dir/missing automake"
1.1714 ++ echo "$ac_t""missing" 1>&6
1.1717 ++echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1.1718 ++echo "configure:905: checking for working autoheader" >&5
1.1719 ++# Run test in a subshell; some versions of sh will print an error if
1.1720 ++# an executable is not found, even if stderr is redirected.
1.1721 ++# Redirect stdin to placate older versions of autoconf. Sigh.
1.1722 ++if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1.1723 ++ AUTOHEADER=autoheader
1.1724 ++ echo "$ac_t""found" 1>&6
1.1726 ++ AUTOHEADER="$missing_dir/missing autoheader"
1.1727 ++ echo "$ac_t""missing" 1>&6
1.1730 ++echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1.1731 ++echo "configure:918: checking for working makeinfo" >&5
1.1732 ++# Run test in a subshell; some versions of sh will print an error if
1.1733 ++# an executable is not found, even if stderr is redirected.
1.1734 ++# Redirect stdin to placate older versions of autoconf. Sigh.
1.1735 ++if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1.1737 ++ echo "$ac_t""found" 1>&6
1.1739 ++ MAKEINFO="$missing_dir/missing makeinfo"
1.1740 ++ echo "$ac_t""missing" 1>&6
1.1745 ++# FIXME: We temporarily define our own version of AC_PROG_CC. This is
1.1746 ++# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
1.1747 ++# are probably using a cross compiler, which will not be able to fully
1.1748 ++# link an executable. This should really be fixed in autoconf
1.1753 ++# Extract the first word of "gcc", so it can be a program name with args.
1.1754 ++set dummy gcc; ac_word=$2
1.1755 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1.1756 ++echo "configure:943: checking for $ac_word" >&5
1.1757 ++if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1.1758 ++ echo $ac_n "(cached) $ac_c" 1>&6
1.1760 ++ if test -n "$CC"; then
1.1761 ++ ac_cv_prog_CC="$CC" # Let the user override the test.
1.1763 ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1.1765 ++ for ac_dir in $ac_dummy; do
1.1766 ++ test -z "$ac_dir" && ac_dir=.
1.1767 ++ if test -f $ac_dir/$ac_word; then
1.1776 ++if test -n "$CC"; then
1.1777 ++ echo "$ac_t""$CC" 1>&6
1.1779 ++ echo "$ac_t""no" 1>&6
1.1782 ++if test -z "$CC"; then
1.1783 ++ # Extract the first word of "cc", so it can be a program name with args.
1.1784 ++set dummy cc; ac_word=$2
1.1785 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1.1786 ++echo "configure:973: checking for $ac_word" >&5
1.1787 ++if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1.1788 ++ echo $ac_n "(cached) $ac_c" 1>&6
1.1790 ++ if test -n "$CC"; then
1.1791 ++ ac_cv_prog_CC="$CC" # Let the user override the test.
1.1793 ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1.1796 ++ for ac_dir in $ac_dummy; do
1.1797 ++ test -z "$ac_dir" && ac_dir=.
1.1798 ++ if test -f $ac_dir/$ac_word; then
1.1799 ++ if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1.1800 ++ ac_prog_rejected=yes
1.1808 ++if test $ac_prog_rejected = yes; then
1.1809 ++ # We found a bogon in the path, so make sure we never use it.
1.1810 ++ set dummy $ac_cv_prog_CC
1.1812 ++ if test $# -gt 0; then
1.1813 ++ # We chose a different compiler from the bogus one.
1.1814 ++ # However, it has the same basename, so the bogon will be chosen
1.1815 ++ # first if we set CC to just the basename; use the full file name.
1.1817 ++ set dummy "$ac_dir/$ac_word" "$@"
1.1825 ++if test -n "$CC"; then
1.1826 ++ echo "$ac_t""$CC" 1>&6
1.1828 ++ echo "$ac_t""no" 1>&6
1.1831 ++ test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1.1834 ++echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1.1835 ++echo "configure:1022: checking whether we are using GNU C" >&5
1.1836 ++if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1.1837 ++ echo $ac_n "(cached) $ac_c" 1>&6
1.1839 ++ cat > conftest.c <<EOF
1.1844 ++if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1031: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1.1851 ++echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1.1853 ++if test $ac_cv_prog_gcc = yes; then
1.1855 ++ ac_test_CFLAGS="${CFLAGS+set}"
1.1856 ++ ac_save_CFLAGS="$CFLAGS"
1.1858 ++ echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1.1859 ++echo "configure:1046: checking whether ${CC-cc} accepts -g" >&5
1.1860 ++if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1.1861 ++ echo $ac_n "(cached) $ac_c" 1>&6
1.1863 ++ echo 'void f(){}' > conftest.c
1.1864 ++if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1.1873 ++echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1.1874 ++ if test "$ac_test_CFLAGS" = set; then
1.1875 ++ CFLAGS="$ac_save_CFLAGS"
1.1876 ++ elif test $ac_cv_prog_cc_g = yes; then
1.1883 ++ test "${CFLAGS+set}" = set || CFLAGS="-g"
1.1887 ++# AC_CHECK_TOOL does AC_REQUIRE (AC_CANONICAL_BUILD). If we don't
1.1888 ++# run it explicitly here, it will be run implicitly before
1.1889 ++# NEWLIB_CONFIGURE, which doesn't work because that means that it will
1.1890 ++# be run before AC_CANONICAL_HOST.
1.1891 ++echo $ac_n "checking build system type""... $ac_c" 1>&6
1.1892 ++echo "configure:1079: checking build system type" >&5
1.1895 ++case "$build_alias" in
1.1898 ++ NONE) build_alias=$host_alias ;;
1.1899 ++ *) build_alias=$nonopt ;;
1.1903 ++build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1.1904 ++build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1.1905 ++build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1.1906 ++build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1.1907 ++echo "$ac_t""$build" 1>&6
1.1910 ++# Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
1.1911 ++set dummy ${ac_tool_prefix}as; ac_word=$2
1.1912 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1.1913 ++echo "configure:1100: checking for $ac_word" >&5
1.1914 ++if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
1.1915 ++ echo $ac_n "(cached) $ac_c" 1>&6
1.1917 ++ if test -n "$AS"; then
1.1918 ++ ac_cv_prog_AS="$AS" # Let the user override the test.
1.1920 ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1.1922 ++ for ac_dir in $ac_dummy; do
1.1923 ++ test -z "$ac_dir" && ac_dir=.
1.1924 ++ if test -f $ac_dir/$ac_word; then
1.1925 ++ ac_cv_prog_AS="${ac_tool_prefix}as"
1.1930 ++ test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="as"
1.1934 ++if test -n "$AS"; then
1.1935 ++ echo "$ac_t""$AS" 1>&6
1.1937 ++ echo "$ac_t""no" 1>&6
1.1942 ++# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
1.1943 ++set dummy ${ac_tool_prefix}ar; ac_word=$2
1.1944 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1.1945 ++echo "configure:1132: checking for $ac_word" >&5
1.1946 ++if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
1.1947 ++ echo $ac_n "(cached) $ac_c" 1>&6
1.1949 ++ if test -n "$AR"; then
1.1950 ++ ac_cv_prog_AR="$AR" # Let the user override the test.
1.1952 ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1.1954 ++ for ac_dir in $ac_dummy; do
1.1955 ++ test -z "$ac_dir" && ac_dir=.
1.1956 ++ if test -f $ac_dir/$ac_word; then
1.1957 ++ ac_cv_prog_AR="${ac_tool_prefix}ar"
1.1962 ++ test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
1.1966 ++if test -n "$AR"; then
1.1967 ++ echo "$ac_t""$AR" 1>&6
1.1969 ++ echo "$ac_t""no" 1>&6
1.1974 ++# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
1.1975 ++set dummy ${ac_tool_prefix}ranlib; ac_word=$2
1.1976 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1.1977 ++echo "configure:1164: checking for $ac_word" >&5
1.1978 ++if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1.1979 ++ echo $ac_n "(cached) $ac_c" 1>&6
1.1981 ++ if test -n "$RANLIB"; then
1.1982 ++ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1.1984 ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1.1986 ++ for ac_dir in $ac_dummy; do
1.1987 ++ test -z "$ac_dir" && ac_dir=.
1.1988 ++ if test -f $ac_dir/$ac_word; then
1.1989 ++ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
1.1996 ++RANLIB="$ac_cv_prog_RANLIB"
1.1997 ++if test -n "$RANLIB"; then
1.1998 ++ echo "$ac_t""$RANLIB" 1>&6
1.2000 ++ echo "$ac_t""no" 1>&6
1.2004 ++if test -z "$ac_cv_prog_RANLIB"; then
1.2005 ++if test -n "$ac_tool_prefix"; then
1.2006 ++ # Extract the first word of "ranlib", so it can be a program name with args.
1.2007 ++set dummy ranlib; ac_word=$2
1.2008 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1.2009 ++echo "configure:1196: checking for $ac_word" >&5
1.2010 ++if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1.2011 ++ echo $ac_n "(cached) $ac_c" 1>&6
1.2013 ++ if test -n "$RANLIB"; then
1.2014 ++ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1.2016 ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1.2018 ++ for ac_dir in $ac_dummy; do
1.2019 ++ test -z "$ac_dir" && ac_dir=.
1.2020 ++ if test -f $ac_dir/$ac_word; then
1.2021 ++ ac_cv_prog_RANLIB="ranlib"
1.2026 ++ test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1.2029 ++RANLIB="$ac_cv_prog_RANLIB"
1.2030 ++if test -n "$RANLIB"; then
1.2031 ++ echo "$ac_t""$RANLIB" 1>&6
1.2033 ++ echo "$ac_t""no" 1>&6
1.2043 ++test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1.2048 ++# We need AM_EXEEXT to keep automake happy in cygnus mode. However,
1.2049 ++# at least currently, we never actually build a program, so we never
1.2050 ++# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
1.2051 ++# fails, because we are probably configuring with a cross compiler
1.2052 ++# which can't create executables. So we include AM_EXEEXT to keep
1.2053 ++# automake happy, but we don't execute it, since we don't care about
1.2058 ++echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
1.2059 ++echo "configure:1246: checking for executable suffix" >&5
1.2060 ++if eval "test \"`echo '$''{'am_cv_exeext'+set}'`\" = set"; then
1.2061 ++ echo $ac_n "(cached) $ac_c" 1>&6
1.2063 ++ if test "$CYGWIN32" = yes || test "$MINGW32" = yes; then
1.2066 ++cat > am_c_test.c << 'EOF'
1.2068 ++/* Nothing needed here */
1.2071 ++${CC-cc} -o am_c_test $CFLAGS $CPPFLAGS $LDFLAGS am_c_test.c $LIBS 1>&5
1.2073 ++for file in am_c_test.*; do
1.2077 ++ *) am_cv_exeext=`echo $file | sed -e s/am_c_test//` ;;
1.2083 ++test x"${am_cv_exeext}" = x && am_cv_exeext=no
1.2086 ++test x"${am_cv_exeext}" != xno && EXEEXT=${am_cv_exeext}
1.2087 ++echo "$ac_t""${am_cv_exeext}" 1>&6
1.2091 ++. ${newlib_basedir}/configure.host
1.2093 ++case ${newlib_basedir} in
1.2094 ++/* | A-Za-z:/\\*) newlib_flagbasedir=${newlib_basedir} ;;
1.2095 ++*) newlib_flagbasedir='$(top_builddir)/'${newlib_basedir} ;;
1.2098 ++newlib_cflags="${newlib_cflags} -I"'$(top_builddir)'"/../../../targ-include -I${newlib_flagbasedir}/libc/include"
1.2101 ++ newlib_cflags="${newlib_cflags} -I${newlib_flagbasedir}/../winsup/include"
1.2105 ++newlib_cflags="${newlib_cflags} -fno-builtin"
1.2107 ++NEWLIB_CFLAGS=${newlib_cflags}
1.2115 ++cat > confcache <<\EOF
1.2116 ++# This file is a shell script that caches the results of configure
1.2117 ++# tests run on this system so they can be shared between configure
1.2118 ++# scripts and configure runs. It is not useful on other systems.
1.2119 ++# If it contains results you don't want to keep, you may remove or edit it.
1.2121 ++# By default, configure uses ./config.cache as the cache file,
1.2122 ++# creating it if it does not exist already. You can give configure
1.2123 ++# the --cache-file=FILE option to use a different cache file; that is
1.2124 ++# what configure does when it calls configure scripts in
1.2125 ++# subdirectories, so they share the cache.
1.2126 ++# Giving --cache-file=/dev/null disables caching, for debugging configure.
1.2127 ++# config.status only pays attention to the cache file if you give it the
1.2128 ++# --recheck option to rerun configure.
1.2131 ++# The following way of writing the cache mishandles newlines in values,
1.2132 ++# but we know of no workaround that is simple, portable, and efficient.
1.2133 ++# So, don't put newlines in cache variables' values.
1.2134 ++# Ultrix sh set writes to stderr and can't be redirected directly,
1.2135 ++# and sets the high bit in the cache file unless we assign to the vars.
1.2137 ++ case `(ac_space=' '; set | grep ac_space) 2>&1` in
1.2139 ++ # `set' does not quote correctly, so add quotes (double-quote substitution
1.2140 ++ # turns \\\\ into \\, and sed turns \\ into \).
1.2142 ++ -e "s/'/'\\\\''/g" \
1.2143 ++ -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
1.2146 ++ # `set' quotes correctly as required by POSIX, so do not add quotes.
1.2147 ++ sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
1.2150 ++if cmp -s $cache_file confcache; then
1.2153 ++ if test -w $cache_file; then
1.2154 ++ echo "updating cache $cache_file"
1.2155 ++ cat confcache > $cache_file
1.2157 ++ echo "not updating unwritable cache $cache_file"
1.2162 ++trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
1.2164 ++test "x$prefix" = xNONE && prefix=$ac_default_prefix
1.2165 ++# Let make expand exec_prefix.
1.2166 ++test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
1.2168 ++# Any assignment to VPATH causes Sun make to only execute
1.2169 ++# the first set of double-colon rules, so remove it if not needed.
1.2170 ++# If there is a colon in the path, we need to keep it.
1.2171 ++if test "x$srcdir" = x.; then
1.2172 ++ ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
1.2175 ++trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
1.2177 ++# Transform confdefs.h into DEFS.
1.2178 ++# Protect against shell expansion while executing Makefile rules.
1.2179 ++# Protect against Makefile macro expansion.
1.2180 ++cat > conftest.defs <<\EOF
1.2181 ++s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
1.2182 ++s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
1.2187 ++DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
1.2191 ++# Without the "./", some shells look in PATH for config.status.
1.2192 ++: ${CONFIG_STATUS=./config.status}
1.2194 ++echo creating $CONFIG_STATUS
1.2196 ++cat > $CONFIG_STATUS <<EOF
1.2198 ++# Generated automatically by configure.
1.2199 ++# Run this file to recreate the current configuration.
1.2200 ++# This directory was configured as follows,
1.2201 ++# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1.2203 ++# $0 $ac_configure_args
1.2205 ++# Compiler output produced by configure, useful for debugging
1.2206 ++# configure, is in ./config.log if it exists.
1.2208 ++ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
1.2211 ++ case "\$ac_option" in
1.2212 ++ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
1.2213 ++ echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
1.2214 ++ exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
1.2215 ++ -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
1.2216 ++ echo "$CONFIG_STATUS generated by autoconf version 2.13"
1.2218 ++ -help | --help | --hel | --he | --h)
1.2219 ++ echo "\$ac_cs_usage"; exit 0 ;;
1.2220 ++ *) echo "\$ac_cs_usage"; exit 1 ;;
1.2224 ++ac_given_srcdir=$srcdir
1.2225 ++ac_given_INSTALL="$INSTALL"
1.2227 ++trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
1.2229 ++cat >> $CONFIG_STATUS <<EOF
1.2231 ++# Protect against being on the right side of a sed subst in config.status.
1.2232 ++sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
1.2233 ++ s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
1.2238 ++s%@CPPFLAGS@%$CPPFLAGS%g
1.2239 ++s%@CXXFLAGS@%$CXXFLAGS%g
1.2242 ++s%@LDFLAGS@%$LDFLAGS%g
1.2244 ++s%@exec_prefix@%$exec_prefix%g
1.2246 ++s%@program_transform_name@%$program_transform_name%g
1.2248 ++s%@sbindir@%$sbindir%g
1.2249 ++s%@libexecdir@%$libexecdir%g
1.2250 ++s%@datadir@%$datadir%g
1.2251 ++s%@sysconfdir@%$sysconfdir%g
1.2252 ++s%@sharedstatedir@%$sharedstatedir%g
1.2253 ++s%@localstatedir@%$localstatedir%g
1.2255 ++s%@includedir@%$includedir%g
1.2256 ++s%@oldincludedir@%$oldincludedir%g
1.2257 ++s%@infodir@%$infodir%g
1.2259 ++s%@newlib_basedir@%$newlib_basedir%g
1.2261 ++s%@host_alias@%$host_alias%g
1.2262 ++s%@host_cpu@%$host_cpu%g
1.2263 ++s%@host_vendor@%$host_vendor%g
1.2264 ++s%@host_os@%$host_os%g
1.2265 ++s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
1.2266 ++s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
1.2267 ++s%@INSTALL_DATA@%$INSTALL_DATA%g
1.2268 ++s%@PACKAGE@%$PACKAGE%g
1.2269 ++s%@VERSION@%$VERSION%g
1.2270 ++s%@ACLOCAL@%$ACLOCAL%g
1.2271 ++s%@AUTOCONF@%$AUTOCONF%g
1.2272 ++s%@AUTOMAKE@%$AUTOMAKE%g
1.2273 ++s%@AUTOHEADER@%$AUTOHEADER%g
1.2274 ++s%@MAKEINFO@%$MAKEINFO%g
1.2275 ++s%@SET_MAKE@%$SET_MAKE%g
1.2278 ++s%@build_alias@%$build_alias%g
1.2279 ++s%@build_cpu@%$build_cpu%g
1.2280 ++s%@build_vendor@%$build_vendor%g
1.2281 ++s%@build_os@%$build_os%g
1.2286 ++s%@NEWLIB_CFLAGS@%$NEWLIB_CFLAGS%g
1.2287 ++s%@machine_dir@%$machine_dir%g
1.2288 ++s%@sys_dir@%$sys_dir%g
1.2293 ++cat >> $CONFIG_STATUS <<\EOF
1.2295 ++# Split the substitutions into bite-sized pieces for seds with
1.2296 ++# small command number limits, like on Digital OSF/1 and HP-UX.
1.2297 ++ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
1.2298 ++ac_file=1 # Number of current file.
1.2299 ++ac_beg=1 # First line for current file.
1.2300 ++ac_end=$ac_max_sed_cmds # Line after last line for current file.
1.2303 ++while $ac_more_lines; do
1.2304 ++ if test $ac_beg -gt 1; then
1.2305 ++ sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
1.2307 ++ sed "${ac_end}q" conftest.subs > conftest.s$ac_file
1.2309 ++ if test ! -s conftest.s$ac_file; then
1.2311 ++ rm -f conftest.s$ac_file
1.2313 ++ if test -z "$ac_sed_cmds"; then
1.2314 ++ ac_sed_cmds="sed -f conftest.s$ac_file"
1.2316 ++ ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
1.2318 ++ ac_file=`expr $ac_file + 1`
1.2320 ++ ac_end=`expr $ac_end + $ac_max_sed_cmds`
1.2323 ++if test -z "$ac_sed_cmds"; then
1.2328 ++cat >> $CONFIG_STATUS <<EOF
1.2330 ++CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
1.2332 ++cat >> $CONFIG_STATUS <<\EOF
1.2333 ++for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
1.2334 ++ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
1.2336 ++ *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
1.2337 ++ ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
1.2338 ++ *) ac_file_in="${ac_file}.in" ;;
1.2341 ++ # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
1.2343 ++ # Remove last slash and all that follows it. Not all systems have dirname.
1.2344 ++ ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
1.2345 ++ if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
1.2346 ++ # The file is in a subdirectory.
1.2347 ++ test ! -d "$ac_dir" && mkdir "$ac_dir"
1.2348 ++ ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
1.2349 ++ # A "../" for each directory in $ac_dir_suffix.
1.2350 ++ ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
1.2352 ++ ac_dir_suffix= ac_dots=
1.2355 ++ case "$ac_given_srcdir" in
1.2357 ++ if test -z "$ac_dots"; then top_srcdir=.
1.2358 ++ else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
1.2359 ++ /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
1.2361 ++ srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
1.2362 ++ top_srcdir="$ac_dots$ac_given_srcdir" ;;
1.2365 ++ case "$ac_given_INSTALL" in
1.2366 ++ [/$]*) INSTALL="$ac_given_INSTALL" ;;
1.2367 ++ *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
1.2370 ++ echo creating "$ac_file"
1.2372 ++ configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
1.2374 ++ *Makefile*) ac_comsub="1i\\
1.2375 ++# $configure_input" ;;
1.2379 ++ ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
1.2381 ++s%@configure_input@%$configure_input%g
1.2383 ++s%@top_srcdir@%$top_srcdir%g
1.2384 ++s%@INSTALL@%$INSTALL%g
1.2385 ++" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
1.2390 ++cat >> $CONFIG_STATUS <<EOF
1.2393 ++cat >> $CONFIG_STATUS <<\EOF
1.2397 ++chmod +x $CONFIG_STATUS
1.2398 ++rm -fr confdefs* $ac_clean_files
1.2399 ++test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
1.2401 +diff -urN newlib-1.8.2/newlib/libc/sys/aica/configure.in newlib-1.8.2-aica/newlib/libc/sys/aica/configure.in
1.2402 +--- newlib-1.8.2/newlib/libc/sys/aica/configure.in 1970-01-01 10:00:00.000000000 +1000
1.2403 ++++ newlib-1.8.2-aica/newlib/libc/sys/aica/configure.in 2008-08-13 11:54:44.000000000 +1000
1.2405 ++dnl This is the newlib/libc/sys/sh configure.in file.
1.2406 ++dnl Process this file with autoconf to produce a configure script.
1.2411 ++dnl Can't be done in NEWLIB_CONFIGURE because that confuses automake.
1.2412 ++AC_CONFIG_AUX_DIR(../../../..)
1.2414 ++NEWLIB_CONFIGURE(../../..)
1.2417 +diff -urN newlib-1.8.2/newlib/libc/sys/aica/creat.c newlib-1.8.2-aica/newlib/libc/sys/aica/creat.c
1.2418 +--- newlib-1.8.2/newlib/libc/sys/aica/creat.c 1970-01-01 10:00:00.000000000 +1000
1.2419 ++++ newlib-1.8.2-aica/newlib/libc/sys/aica/creat.c 2008-08-13 11:54:44.000000000 +1000
1.2421 ++#include <sys/types.h>
1.2422 ++#include <sys/fcntl.h>
1.2427 ++creat (const char *path, mode_t mode)
1.2429 ++ char *obj = _newlib_vfs_new_string (path);
1.2431 ++ struct media_ops *mops = _newlib_vfs_get_media_ops (path);
1.2432 ++ struct file *pf = mops->creat (obj, mode);
1.2434 ++ _newlib_vfs_delete_string (obj);
1.2438 ++ return _newlib_vfs_insert_file (pf);
1.2443 +diff -urN newlib-1.8.2/newlib/libc/sys/aica/crt0.S newlib-1.8.2-aica/newlib/libc/sys/aica/crt0.S
1.2444 +--- newlib-1.8.2/newlib/libc/sys/aica/crt0.S 1970-01-01 10:00:00.000000000 +1000
1.2445 ++++ newlib-1.8.2-aica/newlib/libc/sys/aica/crt0.S 2008-08-13 13:08:13.000000000 +1000
1.2455 ++/* Start by setting up a stack */
1.2456 ++ /* Set up the stack pointer to a fixed value */
1.2459 ++ /* Setup a default stack-limit in-case the code has been
1.2460 ++ compiled with "-mapcs-stack-check". Hard-wiring this value
1.2461 ++ is not ideal, since there is currently no support for
1.2462 ++ checking that the heap and stack have not collided, or that
1.2463 ++ this default 64k is enough for the program being executed.
1.2464 ++ However, it ensures that this simple crt0 world will not
1.2465 ++ immediately cause an overflow event: */
1.2466 ++ sub sl, sp, #64 << 10 /* Still assumes 256bytes below sl */
1.2468 ++ mov a2, #0 /* Second arg: fill value */
1.2469 ++ mov fp, a2 /* Null frame pointer */
1.2470 ++ mov r7, a2 /* Null frame pointer for Thumb */
1.2472 ++ ldr a1, .LC1 /* First arg: start of memory block */
1.2474 ++ sub a3, a3, a1 /* Third arg: length of block */
1.2477 ++#ifdef __thumb__ /* Enter Thumb mode.... */
1.2479 ++ add a4, pc, #1 /* Get the address of the Thumb block */
1.2480 ++ bx a4 /* Go there and start Thumb decoding */
1.2483 ++ .global __change_mode
1.2489 ++ mov r0, #0 /* no arguments */
1.2490 ++ mov r1, #0 /* no argv either */
1.2492 ++ /* Parse string at r1 */
1.2493 ++ mov r0, #0 /* count of arguments so far */
1.2495 ++/* Skip leading blanks */
1.2507 ++/* See whether we are scanning a string */
1.2518 ++ mov r2, #' ' /* terminator type */
1.2519 ++ sub r1, r1, #1 /* adjust back to point at start char */
1.2524 ++ movne r2, #' ' /* terminator type */
1.2525 ++ subne r1, r1, #1 /* adjust back to point at start char */
1.2528 ++/* Stack a pointer to the current argument */
1.2544 ++ cmp r2, r3 /* reached terminator? */
1.2548 ++ strb r2, [r3] /* terminate the arg string */
1.2552 ++ mov r1, sp /* point at stacked arg pointers */
1.2553 ++ /* We've now got the stacked args in order reverse the */
1.2570 ++ add r2, sp, r0, LSL #2 /* End of args */
1.2571 ++ mov r3, sp /* Start of args */
1.2573 ++ ldrhi r4,[r2, #-4] /* Reverse ends of list */
1.2575 ++ strhi r5, [r2, #-4]!
1.2582 ++ bl exit /* Should not return */
1.2585 ++ /* Come out of Thumb mode... This code should be redundant... */
1.2593 ++ /* Halt the execution. This code should never be executed. */
1.2595 ++ ** With no debug monitor, this probably aborts (eventually).
1.2596 ++ ** With a Demon debug monitor, this halts cleanly.
1.2597 ++ ** With an Angel debug monitor, this will report 'Unknown SWI'.
1.2602 ++ /* For Thumb, constants must be after the code since only
1.2603 ++ positive offsets are supported for PC relative addresses. */
1.2612 +diff -urN newlib-1.8.2/newlib/libc/sys/aica/dcload.S newlib-1.8.2-aica/newlib/libc/sys/aica/dcload.S
1.2613 +--- newlib-1.8.2/newlib/libc/sys/aica/dcload.S 1970-01-01 10:00:00.000000000 +1000
1.2614 ++++ newlib-1.8.2-aica/newlib/libc/sys/aica/dcload.S 2008-08-13 13:57:28.000000000 +1000
1.2618 ++.global dcloadsyscall
1.2619 ++.type dcloadsyscall, %function
1.2621 ++ @ args = 0, pretend = 0, frame = 0
1.2622 ++ @ frame_needed = 0, uses_anonymous_args = 0
1.2623 ++ @ link register save eliminated.
1.2629 ++ @ lr needed for prologue
1.2636 ++ .size dcloadsyscall, .-dcloadsyscall
1.2637 +diff -urN newlib-1.8.2/newlib/libc/sys/aica/dcload.c newlib-1.8.2-aica/newlib/libc/sys/aica/dcload.c
1.2638 +--- newlib-1.8.2/newlib/libc/sys/aica/dcload.c 1970-01-01 10:00:00.000000000 +1000
1.2639 ++++ newlib-1.8.2-aica/newlib/libc/sys/aica/dcload.c 2008-08-13 12:10:51.000000000 +1000
1.2641 ++#define SYSCALL_BASE 0x00000030
1.2643 ++struct syscall_struct {
1.2644 ++ unsigned int syscall;
1.2645 ++ unsigned int arg1, arg2, arg3;
1.2648 ++unsigned int dcloadsyscall(unsigned int syscall, unsigned int arg1, unsigned int arg2, unsigned int arg3)
1.2650 ++ volatile struct syscall_struct *p = (struct syscall_struct *)(SYSCALL_BASE);
1.2654 ++ p->syscall = syscall;
1.2655 ++ while( p->syscall != 0xFFFFFFFF );
1.2658 +diff -urN newlib-1.8.2/newlib/libc/sys/aica/dcload_vfs.c newlib-1.8.2-aica/newlib/libc/sys/aica/dcload_vfs.c
1.2659 +--- newlib-1.8.2/newlib/libc/sys/aica/dcload_vfs.c 1970-01-01 10:00:00.000000000 +1000
1.2660 ++++ newlib-1.8.2-aica/newlib/libc/sys/aica/dcload_vfs.c 2008-08-13 18:19:05.000000000 +1000
1.2662 ++/* Support routines for host access via Andrew K's dcload. dcload offers
1.2663 ++ full host file-system access along with a few POSIX-like functions. */
1.2665 ++/* FIXME: If the host is returning negative values (error codes), then
1.2666 ++ we need to assign the proper value to errno and return -1 as per newlib's
1.2669 ++/* FIXME: Split some of this off into a separate file, dcload.c. This will
1.2670 ++ contain public functions that coincide with the prototypes in
1.2673 ++#include <sys/types.h>
1.2674 ++#include <sys/stat.h>
1.2680 ++static struct media_ops dcload_host_media_ops;
1.2681 ++static struct file_ops dcload_host_file_ops;
1.2683 ++/* True if we have console/file-system access on the host */
1.2684 ++static int host_enabled = 1;
1.2686 ++/* Determine whether we're loaded under dcload and if so, whether or not
1.2687 ++ the console/file-server is enabled. If the console/file-server isn't
1.2688 ++ enabled, then we won't have anything meaningful to do in the host access
1.2689 ++ routines, so they'll be replaced with invalid media/file ops in our init
1.2692 ++int _newlib_vfs_is_dcload (void)
1.2697 ++void _newlib_vfs_dcload_init (void)
1.2699 ++ _newlib_vfs_initialized = VFS_LOADER_DCLOAD_NOHOST;
1.2703 ++ /* FIXME: Rework this... */
1.2704 ++ struct file * stdin_file = _newlib_vfs_first_file;
1.2705 ++ struct file * stdout_file = stdin_file->next;
1.2706 ++ struct file * stderr_file = stdout_file->next;
1.2708 ++ _newlib_vfs_initialized = VFS_LOADER_DCLOAD_HOST;
1.2709 ++ _newlib_vfs_host_media_ops = &dcload_host_media_ops;
1.2711 ++ /* Reroute stdin, stdout, and stderr through dcload's host console. */
1.2712 ++ stdin_file->fops = &dcload_host_file_ops;
1.2713 ++ stdout_file->fops = &dcload_host_file_ops;
1.2714 ++ stderr_file->fops = &dcload_host_file_ops;
1.2717 ++ /* All media ops are initially set to invalid so our work is done. */
1.2720 ++extern int dcloadsyscall (int func, ...);
1.2722 ++/* dcload host media operations */
1.2724 ++/* Perform the open/creat syscall and allocate space for a new file if
1.2725 ++ we get a valid fd. Otherwise return the errno and NULL on errror. */
1.2726 ++static struct file *do_open_media_op (int func, const char *obj, int arg, ...)
1.2729 ++ int res = dcloadsyscall (func, obj, arg);
1.2732 ++ pf = (struct file *) malloc (sizeof (struct file));
1.2736 ++ /* The library fd is set in _newlib_vfs_insert_file */
1.2740 ++ pf->fops = &dcload_host_file_ops;
1.2741 ++ pf->specifics = NULL;
1.2750 ++static struct file *dcload_open_media_op (const char *obj, int flags,
1.2753 ++ return do_open_media_op (OPEN_NR, obj, flags, mode);
1.2757 ++static struct file *dcload_creat_media_op (const char *obj, mode_t mode)
1.2759 ++ return do_open_media_op (CREAT_NR, obj, mode);
1.2763 ++static int dcload_link_media_op (const char *old_obj, const char *new_obj)
1.2765 ++ return dcloadsyscall (LINK_NR, old_obj, new_obj);
1.2769 ++static int dcload_unlink_media_op (const char *obj)
1.2771 ++ return dcloadsyscall (UNLINK_NR, obj);
1.2775 ++static int dcload_stat_media_op (const char *obj, struct stat *pstat)
1.2777 ++ return dcloadsyscall (STAT_NR, obj, pstat);
1.2781 ++static int dcload_chmod_media_op (const char *obj, mode_t mode)
1.2783 ++ return dcloadsyscall (CHMOD_NR, obj, mode);
1.2787 ++static int dcload_chdir_media_op (const char *obj)
1.2789 ++ return dcloadsyscall (CHDIR_NR, obj);
1.2792 ++/* dcload host file operations */
1.2794 ++static size_t do_rw_file_op (int func, struct file *pf, void *buf, size_t cnt)
1.2796 ++ return dcloadsyscall (func, pf->media_fd, buf, cnt);
1.2800 ++static size_t dcload_read_file_op (struct file *pf, void *buf, size_t cnt)
1.2802 ++ return do_rw_file_op (READ_NR, pf, buf, cnt);
1.2806 ++static size_t dcload_write_file_op (struct file *pf, void *buf, size_t cnt)
1.2808 ++ return do_rw_file_op (WRITE_NR, pf, buf, cnt);
1.2812 ++static off_t dcload_lseek_file_op (struct file *pf, off_t pos, int whence)
1.2814 ++ return dcloadsyscall (LSEEK_NR, pf->media_fd, pos, whence);
1.2818 ++static int dcload_close_file_op (struct file *pf)
1.2820 ++ return dcloadsyscall (CLOSE_NR, pf->media_fd);
1.2824 ++static int dcload_fstat_file_op (struct file *pf, struct stat *pstat)
1.2826 ++ return dcloadsyscall (FSTAT_NR, pf->media_fd, pstat);
1.2830 ++void _newlib_vfs_dcload_exit (int n)
1.2832 ++ dcloadsyscall (EXIT_NR, n);
1.2835 ++#define ASSIGN_WRKMEM_NR 14
1.2836 ++void dcload_assign_wrkmem (void *buf)
1.2838 ++ dcloadsyscall (ASSIGN_WRKMEM_NR, buf);
1.2841 ++/* media_ops for host file-system access */
1.2843 ++int dcload_mkdir_media_op( const char *c, mode_t mode )
1.2849 ++int dcload_rmdir_media_op( const char *c )
1.2855 ++int dcload_ioctl_file_op( )
1.2861 ++static struct media_ops dcload_host_media_ops =
1.2863 ++ open: dcload_open_media_op,
1.2864 ++ creat: dcload_creat_media_op,
1.2865 ++ link: dcload_link_media_op,
1.2866 ++ unlink: dcload_unlink_media_op,
1.2867 ++ stat: dcload_stat_media_op,
1.2868 ++ chmod: dcload_chmod_media_op,
1.2869 ++ mkdir: dcload_mkdir_media_op,
1.2870 ++ rmdir: dcload_rmdir_media_op,
1.2871 ++ chdir: dcload_chdir_media_op
1.2874 ++/* file_ops for a host file */
1.2876 ++static struct file_ops dcload_host_file_ops =
1.2878 ++ lseek: dcload_lseek_file_op,
1.2879 ++ close: dcload_close_file_op,
1.2880 ++ read: dcload_read_file_op,
1.2881 ++ write: dcload_write_file_op,
1.2882 ++ ioctl: dcload_ioctl_file_op,
1.2883 ++ fstat: dcload_fstat_file_op
1.2887 +diff -urN newlib-1.8.2/newlib/libc/sys/aica/dup.c newlib-1.8.2-aica/newlib/libc/sys/aica/dup.c
1.2888 +--- newlib-1.8.2/newlib/libc/sys/aica/dup.c 1970-01-01 10:00:00.000000000 +1000
1.2889 ++++ newlib-1.8.2-aica/newlib/libc/sys/aica/dup.c 2008-08-13 11:54:44.000000000 +1000
1.2891 ++/* This hack is required for libstdc++ to work properly */
1.2892 ++int dup(int fd) { return fd; }
1.2893 +diff -urN newlib-1.8.2/newlib/libc/sys/aica/exit.c newlib-1.8.2-aica/newlib/libc/sys/aica/exit.c
1.2894 +--- newlib-1.8.2/newlib/libc/sys/aica/exit.c 1970-01-01 10:00:00.000000000 +1000
1.2895 ++++ newlib-1.8.2-aica/newlib/libc/sys/aica/exit.c 2008-08-13 11:54:44.000000000 +1000
1.2897 ++/* TODO: Do different things depending on the loader present, e.g. dcload
1.2898 ++ has an exit() call, gdbstubs can tell gdb "W00", etc. */
1.2904 ++void exit (int n) { _exit (n); }
1.2906 ++extern void _newlib_vfs_dcload_exit (int);
1.2911 ++ if( _newlib_vfs_is_dcload() ) {
1.2912 ++ _newlib_vfs_dcload_exit (n);
1.2915 +diff -urN newlib-1.8.2/newlib/libc/sys/aica/fcntl.c newlib-1.8.2-aica/newlib/libc/sys/aica/fcntl.c
1.2916 +--- newlib-1.8.2/newlib/libc/sys/aica/fcntl.c 1970-01-01 10:00:00.000000000 +1000
1.2917 ++++ newlib-1.8.2-aica/newlib/libc/sys/aica/fcntl.c 2008-08-13 11:54:44.000000000 +1000
1.2919 ++#include <sys/fcntl.h>
1.2921 ++/* Minimal fcntl support is necessary for C++ console streams cin, cout, and
1.2924 ++_fcntl (int fd, int flag, ...)
1.2929 ++ case 0: return O_RDONLY;
1.2930 ++ case 1: return O_WRONLY;
1.2931 ++ case 2: return O_WRONLY;
1.2940 +diff -urN newlib-1.8.2/newlib/libc/sys/aica/fstat.c newlib-1.8.2-aica/newlib/libc/sys/aica/fstat.c
1.2941 +--- newlib-1.8.2/newlib/libc/sys/aica/fstat.c 1970-01-01 10:00:00.000000000 +1000
1.2942 ++++ newlib-1.8.2-aica/newlib/libc/sys/aica/fstat.c 2008-08-13 11:54:44.000000000 +1000
1.2944 ++#include <sys/types.h>
1.2945 ++#include <sys/stat.h>
1.2950 ++_fstat (int fd, struct stat *pstat)
1.2952 ++ struct file *pf = _newlib_vfs_get_file (fd);
1.2954 ++ return pf->fops->fstat (pf, pstat);
1.2956 +diff -urN newlib-1.8.2/newlib/libc/sys/aica/getpid.c newlib-1.8.2-aica/newlib/libc/sys/aica/getpid.c
1.2957 +--- newlib-1.8.2/newlib/libc/sys/aica/getpid.c 1970-01-01 10:00:00.000000000 +1000
1.2958 ++++ newlib-1.8.2-aica/newlib/libc/sys/aica/getpid.c 2008-08-13 11:54:44.000000000 +1000
1.2965 +diff -urN newlib-1.8.2/newlib/libc/sys/aica/gettimeofday.c newlib-1.8.2-aica/newlib/libc/sys/aica/gettimeofday.c
1.2966 +--- newlib-1.8.2/newlib/libc/sys/aica/gettimeofday.c 1970-01-01 10:00:00.000000000 +1000
1.2967 ++++ newlib-1.8.2-aica/newlib/libc/sys/aica/gettimeofday.c 2008-08-13 11:54:44.000000000 +1000
1.2970 ++#include <sys/time.h>
1.2972 ++/* Returns the number of seconds elapsed from the Unix epoch, January 1st,
1.2973 ++ 1970. Note that the Dreamcast counts time from January 1st, 1950, so we
1.2974 ++ need to subtract 20 years (and 5 leap days) from the Dreamcast RTC to
1.2975 ++ get valid values for libc's time functions. */
1.2977 ++#define TWENTY_YEARS ((20 * 365LU + 5) * 86400)
1.2980 ++_gettimeofday (struct timeval *tp, struct timezone *tzp)
1.2984 ++ unsigned long rtc_h = *(volatile unsigned long*)0x00810000;
1.2985 ++ unsigned long rtc_l = *(volatile unsigned long*)0x00810004;
1.2986 ++ unsigned long secs = ((rtc_h & 0xffff) << 16) | (rtc_l & 0xffff);
1.2988 ++ tp->tv_sec = secs - TWENTY_YEARS;
1.2993 ++ tzp->tz_minuteswest = 0;
1.2994 ++ tzp->tz_dsttime = 0;
1.2999 +diff -urN newlib-1.8.2/newlib/libc/sys/aica/ioctl.c newlib-1.8.2-aica/newlib/libc/sys/aica/ioctl.c
1.3000 +--- newlib-1.8.2/newlib/libc/sys/aica/ioctl.c 1970-01-01 10:00:00.000000000 +1000
1.3001 ++++ newlib-1.8.2-aica/newlib/libc/sys/aica/ioctl.c 2008-08-13 11:54:44.000000000 +1000
1.3006 ++ioctl (int fd, int func, long arg)
1.3008 ++ struct file *pf = _newlib_vfs_get_file (fd);
1.3010 ++ return pf->fops->ioctl (pf, func, arg);
1.3012 +diff -urN newlib-1.8.2/newlib/libc/sys/aica/isatty.c newlib-1.8.2-aica/newlib/libc/sys/aica/isatty.c
1.3013 +--- newlib-1.8.2/newlib/libc/sys/aica/isatty.c 1970-01-01 10:00:00.000000000 +1000
1.3014 ++++ newlib-1.8.2-aica/newlib/libc/sys/aica/isatty.c 2008-08-13 11:54:44.000000000 +1000
1.3016 ++/* Since file descriptors 0, 1, and 2 are always mapped to stdin, stdout,
1.3017 ++ and stderr, we assume these are the only fds that permit interactive I/O. */
1.3022 ++ if (fd >= 0 && fd < 3)
1.3026 +diff -urN newlib-1.8.2/newlib/libc/sys/aica/kill.c newlib-1.8.2-aica/newlib/libc/sys/aica/kill.c
1.3027 +--- newlib-1.8.2/newlib/libc/sys/aica/kill.c 1970-01-01 10:00:00.000000000 +1000
1.3028 ++++ newlib-1.8.2-aica/newlib/libc/sys/aica/kill.c 2008-08-13 11:54:44.000000000 +1000
1.3038 +diff -urN newlib-1.8.2/newlib/libc/sys/aica/link.c newlib-1.8.2-aica/newlib/libc/sys/aica/link.c
1.3039 +--- newlib-1.8.2/newlib/libc/sys/aica/link.c 1970-01-01 10:00:00.000000000 +1000
1.3040 ++++ newlib-1.8.2-aica/newlib/libc/sys/aica/link.c 2008-08-13 11:54:44.000000000 +1000
1.3045 ++_link (const char *old_path, const char *new_path)
1.3047 ++ char *old_obj = _newlib_vfs_new_string (old_path);
1.3048 ++ char *new_obj = _newlib_vfs_new_string (new_path);
1.3050 ++ struct media_ops *mops = _newlib_vfs_get_media_ops (old_path);
1.3051 ++ int res = mops->link (old_obj, new_obj);
1.3053 ++ _newlib_vfs_delete_string (old_obj);
1.3054 ++ _newlib_vfs_delete_string (new_obj);
1.3058 +diff -urN newlib-1.8.2/newlib/libc/sys/aica/lseek.c newlib-1.8.2-aica/newlib/libc/sys/aica/lseek.c
1.3059 +--- newlib-1.8.2/newlib/libc/sys/aica/lseek.c 1970-01-01 10:00:00.000000000 +1000
1.3060 ++++ newlib-1.8.2-aica/newlib/libc/sys/aica/lseek.c 2008-08-13 11:54:44.000000000 +1000
1.3062 ++#include <sys/types.h>
1.3067 ++_lseek (int fd, off_t pos, int whence)
1.3069 ++ struct file *pf = _newlib_vfs_get_file (fd);
1.3071 ++ return pf->fops->lseek (pf, pos, whence);
1.3073 +diff -urN newlib-1.8.2/newlib/libc/sys/aica/mkdir.c newlib-1.8.2-aica/newlib/libc/sys/aica/mkdir.c
1.3074 +--- newlib-1.8.2/newlib/libc/sys/aica/mkdir.c 1970-01-01 10:00:00.000000000 +1000
1.3075 ++++ newlib-1.8.2-aica/newlib/libc/sys/aica/mkdir.c 2008-08-13 11:54:44.000000000 +1000
1.3077 ++#include <sys/types.h>
1.3082 ++mkdir (const char *path, mode_t mode)
1.3084 ++ char *obj = _newlib_vfs_new_string (path);
1.3086 ++ struct media_ops *mops = _newlib_vfs_get_media_ops (path);
1.3087 ++ int res = mops->mkdir (obj, mode);
1.3089 ++ _newlib_vfs_delete_string (obj);
1.3093 +diff -urN newlib-1.8.2/newlib/libc/sys/aica/open.c newlib-1.8.2-aica/newlib/libc/sys/aica/open.c
1.3094 +--- newlib-1.8.2/newlib/libc/sys/aica/open.c 1970-01-01 10:00:00.000000000 +1000
1.3095 ++++ newlib-1.8.2-aica/newlib/libc/sys/aica/open.c 2008-08-13 11:54:44.000000000 +1000
1.3097 ++#include <sys/types.h>
1.3104 ++_open (const char *path, int flags, mode_t mode)
1.3106 ++ char *obj = _newlib_vfs_new_string (path);
1.3108 ++ struct media_ops *mops = _newlib_vfs_get_media_ops (path);
1.3109 ++ struct file *pf = mops->open (obj, flags, mode);
1.3111 ++ _newlib_vfs_delete_string (obj);
1.3115 ++ return _newlib_vfs_insert_file (pf);
1.3120 +diff -urN newlib-1.8.2/newlib/libc/sys/aica/read.c newlib-1.8.2-aica/newlib/libc/sys/aica/read.c
1.3121 +--- newlib-1.8.2/newlib/libc/sys/aica/read.c 1970-01-01 10:00:00.000000000 +1000
1.3122 ++++ newlib-1.8.2-aica/newlib/libc/sys/aica/read.c 2008-08-13 11:54:44.000000000 +1000
1.3124 ++#include <sys/types.h>
1.3129 ++_read (int fd, void *buf, size_t cnt)
1.3131 ++ struct file *pf = _newlib_vfs_get_file (fd);
1.3133 ++ return pf->fops->read (pf, buf, cnt);
1.3135 +diff -urN newlib-1.8.2/newlib/libc/sys/aica/rmdir.c newlib-1.8.2-aica/newlib/libc/sys/aica/rmdir.c
1.3136 +--- newlib-1.8.2/newlib/libc/sys/aica/rmdir.c 1970-01-01 10:00:00.000000000 +1000
1.3137 ++++ newlib-1.8.2-aica/newlib/libc/sys/aica/rmdir.c 2008-08-13 11:54:44.000000000 +1000
1.3142 ++rmdir (const char *path)
1.3144 ++ char *obj = _newlib_vfs_new_string (path);
1.3146 ++ struct media_ops *mops = _newlib_vfs_get_media_ops (path);
1.3147 ++ int res = mops->rmdir (obj);
1.3149 ++ _newlib_vfs_delete_string (obj);
1.3153 +diff -urN newlib-1.8.2/newlib/libc/sys/aica/sbrk.c newlib-1.8.2-aica/newlib/libc/sys/aica/sbrk.c
1.3154 +--- newlib-1.8.2/newlib/libc/sys/aica/sbrk.c 1970-01-01 10:00:00.000000000 +1000
1.3155 ++++ newlib-1.8.2-aica/newlib/libc/sys/aica/sbrk.c 2008-08-13 11:54:44.000000000 +1000
1.3159 ++#include <sys/types.h>
1.3161 ++extern char end; /* The end of the program (BSS section). */
1.3163 ++register char *stack_ptr asm ("r15");
1.3168 ++ static char *heap_end;
1.3169 ++ char *prev_heap_end;
1.3174 ++ prev_heap_end = heap_end;
1.3175 ++ if (heap_end + incr > stack_ptr)
1.3182 ++ return (caddr_t) prev_heap_end;
1.3184 +diff -urN newlib-1.8.2/newlib/libc/sys/aica/scif.c newlib-1.8.2-aica/newlib/libc/sys/aica/scif.c
1.3185 +--- newlib-1.8.2/newlib/libc/sys/aica/scif.c 1970-01-01 10:00:00.000000000 +1000
1.3186 ++++ newlib-1.8.2-aica/newlib/libc/sys/aica/scif.c 2008-08-13 11:54:44.000000000 +1000
1.3188 ++/* Blatantly stolen from libdream, others...
1.3189 ++ * Please fix this :) */
1.3190 ++#include <sys/types.h>
1.3192 ++/*#include "scif.h"*/
1.3194 ++#define ACK (volatile unsigned short *)0xffe80010
1.3195 ++#define WR_FIFO (volatile unsigned char *)0xffe8000c
1.3196 ++#define RD_FIFO (volatile unsigned char *)0xffe80014
1.3197 ++#define STATUS (volatile unsigned short *)0xffe8001c
1.3199 ++static void scif_flush ()
1.3203 ++ while (!(*ACK & 0x40)) ;
1.3208 ++size_t _newlib_vfs_scif_write (void *buf, size_t cnt)
1.3212 ++ while (!(*ACK & 0x20)) ;
1.3214 ++ *WR_FIFO = *(unsigned char *)buf++;
1.3222 ++size_t _newlib_vfs_scif_read (void *buf, size_t cnt)
1.3226 ++ while (*STATUS & 0x1f) ;
1.3228 ++ *(unsigned char *)buf++ = *RD_FIFO;
1.3234 +diff -urN newlib-1.8.2/newlib/libc/sys/aica/stat.c newlib-1.8.2-aica/newlib/libc/sys/aica/stat.c
1.3235 +--- newlib-1.8.2/newlib/libc/sys/aica/stat.c 1970-01-01 10:00:00.000000000 +1000
1.3236 ++++ newlib-1.8.2-aica/newlib/libc/sys/aica/stat.c 2008-08-13 11:54:44.000000000 +1000
1.3238 ++#include <sys/types.h>
1.3239 ++#include <sys/stat.h>
1.3243 ++/* Clunky, but remember we're "namespace clean" and library routines also
1.3244 ++ use _stat as a syscall... */
1.3247 ++stat (const char *path, struct stat *pstat)
1.3249 ++ return _stat (path, pstat);
1.3253 ++_stat (const char *path, struct stat *pstat)
1.3255 ++ char *obj = _newlib_vfs_new_string (path);
1.3257 ++ struct media_ops *mops = _newlib_vfs_get_media_ops (path);
1.3258 ++ int res = mops->stat (obj, pstat);
1.3260 ++ _newlib_vfs_delete_string (obj);
1.3264 +diff -urN newlib-1.8.2/newlib/libc/sys/aica/stdio_vfs.c newlib-1.8.2-aica/newlib/libc/sys/aica/stdio_vfs.c
1.3265 +--- newlib-1.8.2/newlib/libc/sys/aica/stdio_vfs.c 1970-01-01 10:00:00.000000000 +1000
1.3266 ++++ newlib-1.8.2-aica/newlib/libc/sys/aica/stdio_vfs.c 2008-08-13 18:19:58.000000000 +1000
1.3268 ++/* Support for Marcus Comstedt's serial slave and gdbstubs, e.g. generic
1.3269 ++ serial console I/O. */
1.3273 ++/* Only read and write are supported for stdio_file_ops, so these are
1.3274 ++ used for stdin, stdout, and stderr which are already "open" when the
1.3275 ++ program is started. */
1.3277 ++static size_t stdio_read_file_op (struct file *, void *, size_t);
1.3278 ++static size_t stdio_write_file_op (struct file *, void *, size_t);
1.3280 ++static struct file_ops stdio_file_ops =
1.3282 ++ lseek: _newlib_vfs_invalid_file_op,
1.3283 ++ close: _newlib_vfs_invalid_file_op,
1.3284 ++ read: stdio_read_file_op,
1.3285 ++ write: stdio_write_file_op,
1.3286 ++ ioctl: _newlib_vfs_invalid_file_op,
1.3287 ++ fstat: _newlib_vfs_invalid_file_op
1.3290 ++/* dcload or absolute may override these to go through their own console
1.3293 ++static struct file stdout_file;
1.3294 ++static struct file stderr_file;
1.3296 ++static struct file stdin_file =
1.3304 ++static struct file stdout_file =
1.3312 ++static struct file stderr_file =
1.3320 ++struct file * _newlib_vfs_first_file = &stdin_file;
1.3321 ++struct file * _newlib_vfs_last_file = &stderr_file;
1.3323 ++int _newlib_vfs_is_sslave (void)
1.3328 ++void _newlib_vfs_sslave_init (void)
1.3330 ++ /* Initialize serial console to a known state. We already assume that
1.3331 ++ we connected to the host, we just make sure the SCIF is setup the way
1.3333 ++ _newlib_vfs_initialized = VFS_LOADER_SERIAL_SLAVE;
1.3337 ++/* Detect gdbstubs. gdbstubs sets the border color to green to indicate that
1.3338 ++ it's active. While this can't reliably be used to detect it, we also look
1.3339 ++ for gdbstubs start code at two separate addresses (gdbstub can load itself
1.3340 ++ at either address). */
1.3342 ++int _newlib_vfs_is_gdbstubs (void)
1.3347 ++void _newlib_vfs_gdbstubs_init (void)
1.3349 ++ _newlib_vfs_initialized = VFS_LOADER_GDBSTUBS;
1.3352 ++extern size_t _newlib_vfs_scif_write (void *, size_t);
1.3353 ++extern size_t _newlib_vfs_scif_read (void *, size_t);
1.3355 ++static size_t stdio_read_file_op (struct file *pf, void *buf, size_t cnt)
1.3357 ++ return _newlib_vfs_scif_read (buf, cnt);
1.3360 ++static size_t stdio_write_file_op (struct file *pf, void *buf, size_t cnt)
1.3362 ++ return _newlib_vfs_scif_write (buf, cnt);
1.3364 +diff -urN newlib-1.8.2/newlib/libc/sys/aica/times.c newlib-1.8.2-aica/newlib/libc/sys/aica/times.c
1.3365 +--- newlib-1.8.2/newlib/libc/sys/aica/times.c 1970-01-01 10:00:00.000000000 +1000
1.3366 ++++ newlib-1.8.2-aica/newlib/libc/sys/aica/times.c 2008-08-13 11:54:44.000000000 +1000
1.3369 ++#include <sys/times.h>
1.3371 ++/* crt.S stores program startup time (Dreamcast-relative, epoch at 1/1/1950)
1.3372 ++ in the global variable _newlib_dreamcast_utime. We can use this variable to
1.3373 ++ determine the total amount of time that the program has been running. */
1.3375 ++/* This is raw seconds of program usage, we don't need to worry about
1.3376 ++ converting epochs or anything like that... */
1.3378 ++extern unsigned long _newlib_dreamcast_utime;
1.3381 ++_times (struct tms *buf)
1.3383 ++ if (_newlib_dreamcast_utime)
1.3385 ++ unsigned long rtc_h = *(volatile unsigned long*)0x00810000;
1.3386 ++ unsigned long rtc_l = *(volatile unsigned long*)0x00810004;
1.3387 ++ unsigned long secs = ((rtc_h & 0xffff) << 16) | (rtc_l & 0xffff);
1.3389 ++ clock_t utime = secs - _newlib_dreamcast_utime;
1.3392 ++ buf->tms_utime = utime;
1.3394 ++ buf->tms_cutime = 0;
1.3395 ++ buf->tms_cstime = 0;
1.3403 +diff -urN newlib-1.8.2/newlib/libc/sys/aica/unlink.c newlib-1.8.2-aica/newlib/libc/sys/aica/unlink.c
1.3404 +--- newlib-1.8.2/newlib/libc/sys/aica/unlink.c 1970-01-01 10:00:00.000000000 +1000
1.3405 ++++ newlib-1.8.2-aica/newlib/libc/sys/aica/unlink.c 2008-08-13 11:54:44.000000000 +1000
1.3410 ++_unlink (const char *path)
1.3412 ++ char *obj = _newlib_vfs_new_string (path);
1.3414 ++ struct media_ops *mops = _newlib_vfs_get_media_ops (path);
1.3415 ++ int res = mops->unlink (obj);
1.3417 ++ _newlib_vfs_delete_string (obj);
1.3421 +diff -urN newlib-1.8.2/newlib/libc/sys/aica/vfs.c newlib-1.8.2-aica/newlib/libc/sys/aica/vfs.c
1.3422 +--- newlib-1.8.2/newlib/libc/sys/aica/vfs.c 1970-01-01 10:00:00.000000000 +1000
1.3423 ++++ newlib-1.8.2-aica/newlib/libc/sys/aica/vfs.c 2008-08-13 11:54:44.000000000 +1000
1.3425 ++#include <sys/types.h>
1.3432 ++static struct file * invalid_open_media_op (void);
1.3434 ++static struct media_ops invalid_media_ops =
1.3436 ++ open: invalid_open_media_op,
1.3437 ++ creat: invalid_open_media_op,
1.3438 ++ link: _newlib_vfs_invalid_media_op,
1.3439 ++ unlink: _newlib_vfs_invalid_media_op,
1.3440 ++ stat: _newlib_vfs_invalid_media_op,
1.3441 ++ chmod: _newlib_vfs_invalid_media_op,
1.3442 ++ mkdir: _newlib_vfs_invalid_media_op,
1.3443 ++ rmdir: _newlib_vfs_invalid_media_op,
1.3444 ++ chdir: _newlib_vfs_invalid_media_op
1.3447 ++struct media_ops * _newlib_vfs_host_media_ops = &invalid_media_ops;
1.3448 ++struct media_ops * _newlib_vfs_cd_media_ops = &invalid_media_ops;
1.3449 ++struct media_ops * _newlib_vfs_vmu_media_ops = &invalid_media_ops;
1.3451 ++/* This is where we detect the loader and initialize the relevant *_ops
1.3454 ++enum _newlib_vfs_loader _newlib_vfs_initialized = VFS_LOADER_NONE;
1.3456 ++extern int _newlib_vfs_is_sslave (void);
1.3457 ++extern void _newlib_vfs_sslave_init (void);
1.3459 ++extern int _newlib_vfs_is_gdbstubs (void);
1.3460 ++extern void _newlib_vfs_gdbstubs_init (void);
1.3462 ++extern int _newlib_vfs_is_dcload (void);
1.3463 ++extern void _newlib_vfs_dcload_init (void);
1.3465 ++extern int _newlib_vfs_is_absolute (void);
1.3466 ++extern void _newlib_vfs_absolute_load (void);
1.3468 ++static void vfs_init (void)
1.3470 ++ _newlib_vfs_initialized = VFS_LOADER_UNKNOWN;
1.3472 ++ if (_newlib_vfs_is_sslave ()) /* Marcus Comstedt's serial slave */
1.3474 ++ _newlib_vfs_sslave_init ();
1.3476 ++ else if (_newlib_vfs_is_gdbstubs ()) /* Benoit Miller's port of gdbstubs */
1.3478 ++ _newlib_vfs_gdbstubs_init ();
1.3480 ++ else if (_newlib_vfs_is_dcload ()) /* Andrew K's dcload */
1.3482 ++ _newlib_vfs_dcload_init ();
1.3484 ++ else if (_newlib_vfs_is_absolute ()) /* my own absolute */
1.3486 ++ _newlib_vfs_absolute_load ();
1.3490 ++#define VFS_INIT { if (!_newlib_vfs_initialized) vfs_init (); }
1.3492 ++/* Each prefix, "/pc/", "/cd", and "/vmu" in little-endian. */
1.3493 ++#define PREFIX_HOST 0x2f63702f
1.3494 ++#define PREFIX_CD 0x2f64632f
1.3495 ++#define PREFIX_VMU 0x756d762f
1.3497 ++char *_newlib_vfs_new_string (const char *s)
1.3503 ++ unsigned long prefix = *(unsigned long *)s;
1.3506 ++ if (prefix == PREFIX_HOST || prefix == PREFIX_CD ||
1.3507 ++ prefix == PREFIX_VMU)
1.3509 ++ /* We snatch the prefix, accounting for the null byte (since we're
1.3510 ++ using memcpy; this could be changed to a simple copy loop... */
1.3511 ++ len = strlen (s) - 3;
1.3513 ++ if (!obj) return obj;
1.3515 ++ memcpy (obj, s + 4, len);
1.3517 ++ else /* Just return a copy of the string if no path given */
1.3519 ++ len = strlen (s) + 1;
1.3521 ++ if (!obj) return obj;
1.3523 ++ memcpy (obj, s, len);
1.3529 ++void _newlib_vfs_delete_string (char *s)
1.3534 ++/* When each media op calls this, it's already got a copy of the stripped
1.3535 ++ path so we just do simple comparisons on the path prefix here. */
1.3536 ++struct media_ops *_newlib_vfs_get_media_ops (const char *path)
1.3538 ++ unsigned long prefix = *(unsigned long *)path;
1.3540 ++ if (prefix == PREFIX_HOST)
1.3542 ++ return _newlib_vfs_host_media_ops;
1.3544 ++ else if (prefix == PREFIX_CD)
1.3546 ++ return _newlib_vfs_cd_media_ops;
1.3548 ++ else if (prefix == PREFIX_VMU)
1.3550 ++ return _newlib_vfs_vmu_media_ops;
1.3553 ++ return _newlib_vfs_host_media_ops;
1.3556 ++static struct file_ops invalid_file_ops =
1.3558 ++ lseek: _newlib_vfs_invalid_file_op,
1.3559 ++ close: _newlib_vfs_invalid_file_op,
1.3560 ++ read: _newlib_vfs_invalid_file_op,
1.3561 ++ write: _newlib_vfs_invalid_file_op,
1.3562 ++ ioctl: _newlib_vfs_invalid_file_op,
1.3563 ++ fstat: _newlib_vfs_invalid_file_op
1.3566 ++static struct file invalid_file =
1.3574 ++/* FIXME: A lookup for each fd could get expensive...find a better way to
1.3575 ++ "cache" frequently used fds */
1.3577 ++static struct file *cached_file = NULL;
1.3579 ++/* Find the file matching fd and return a pointer to its contents. If the
1.3580 ++ file isn't found, return a pointer to invalid_file, which represents a
1.3581 ++ non-existent file (all operations on it will fail). */
1.3582 ++struct file *_newlib_vfs_get_file (int fd)
1.3587 ++ struct file *next_file = _newlib_vfs_first_file;
1.3589 ++ if ((cached_file != NULL) && (cached_file->fd == fd))
1.3596 ++ if (next_file->fd == fd)
1.3598 ++ cached_file = next_file;
1.3601 ++ next_file = next_file->next;
1.3603 ++ return &invalid_file;
1.3607 ++static int last_fd = -1;
1.3609 ++/* Just insert the file at the end of the list, as it's already been
1.3610 ++ allocated by open/creat. Increase the library's fd by using the last
1.3612 ++int _newlib_vfs_insert_file (struct file *pf)
1.3616 ++ last_fd = _newlib_vfs_last_file->fd;
1.3620 ++ _newlib_vfs_last_file->next = pf;
1.3621 ++ _newlib_vfs_last_file = pf;
1.3625 ++int _newlib_vfs_remove_file (struct file *pf)
1.3629 ++ struct file *prev_file = _newlib_vfs_first_file;
1.3630 ++ struct file *next_file = NULL;
1.3634 ++ if (prev_file->next == pf)
1.3636 ++ prev_file->next = pf->next;
1.3637 ++ next_file = prev_file->next;
1.3640 ++ prev_file = next_file;
1.3641 ++ next_file = next_file->next;
1.3643 ++ _newlib_vfs_last_file = prev_file;
1.3647 ++ prev_file = prev_file->next;
1.3654 ++int _newlib_vfs_invalid_file_op (void)
1.3660 ++static struct file *invalid_open_media_op (void)
1.3666 ++int _newlib_vfs_invalid_media_op (void)
1.3671 +diff -urN newlib-1.8.2/newlib/libc/sys/aica/vfs.h newlib-1.8.2-aica/newlib/libc/sys/aica/vfs.h
1.3672 +--- newlib-1.8.2/newlib/libc/sys/aica/vfs.h 1970-01-01 10:00:00.000000000 +1000
1.3673 ++++ newlib-1.8.2-aica/newlib/libc/sys/aica/vfs.h 2008-08-13 11:54:44.000000000 +1000
1.3678 ++#include <sys/types.h>
1.3679 ++#include <sys/stat.h>
1.3681 ++/* Defines all of the operations that can be performed on a particular media
1.3682 ++ type. These are independent of file access routines. */
1.3685 ++ struct file * (*open) (const char *, int, mode_t);
1.3686 ++ struct file * (*creat) (const char *, mode_t);
1.3687 ++ int (*link) (const char *, const char *);
1.3688 ++ int (*unlink) (const char *);
1.3689 ++ int (*stat) (const char *, struct stat *);
1.3690 ++ int (*chmod) (const char *, mode_t);
1.3691 ++ int (*mkdir) (const char*, mode_t);
1.3692 ++ int (*rmdir) (const char *);
1.3693 ++ int (*chdir) (const char *);
1.3696 ++/* These are the operations that can be done to a file. Each media and stub
1.3697 ++ has it's own combination of routines (e.g. Absolute + VMU, dcload + host). */
1.3700 ++ off_t (*lseek) (struct file *, off_t, int);
1.3701 ++ int (*close) (struct file *);
1.3702 ++ size_t (*read) (struct file *, void *, size_t);
1.3703 ++ size_t (*write) (struct file *, void *, size_t);
1.3704 ++ /* Hmm, what to do with this one? */
1.3705 ++ int (*ioctl) (struct file *, int, long);
1.3706 ++ int (*fstat) (struct file *, struct stat *);
1.3709 ++/* We maintain a linked list of files so that we can remove and add files
1.3710 ++ to/from the list easier. Each file contains an fd, the "real" fd of whatever
1.3711 ++ media it resides upon, a pointer to the file_ops for the file, and a pointer
1.3712 ++ to media/stub specific data. */
1.3718 ++ struct file_ops *fops;
1.3723 ++/* Each load initializes the media_ops for each type based on the media it
1.3724 ++ supports. If a media type isn't supported, then it's ops points to
1.3725 ++ _newlib_vfs_invalid_media_ops. */
1.3726 ++extern struct media_ops * _newlib_vfs_host_media_ops;
1.3727 ++extern struct media_ops * _newlib_vfs_cd_media_ops;
1.3728 ++extern struct media_ops * _newlib_vfs_vmu_media_ops;
1.3730 ++/* Pointers to the first and last file in the list */
1.3731 ++extern struct file * _newlib_vfs_first_file;
1.3732 ++extern struct file * _newlib_vfs_last_file;
1.3734 ++/* Each loader initializer gives this a distinct value so that programs
1.3735 ++ can determine which loader they're being loaded under. */
1.3736 ++enum _newlib_vfs_loader
1.3740 ++ VFS_LOADER_SERIAL_SLAVE,
1.3741 ++ VFS_LOADER_GDBSTUBS,
1.3742 ++ VFS_LOADER_DCLOAD_HOST,
1.3743 ++ VFS_LOADER_DCLOAD_NOHOST,
1.3747 ++extern enum _newlib_vfs_loader _newlib_vfs_initialized;
1.3749 ++/* Generic media/file_ops that return ENOSYS */
1.3750 ++int _newlib_vfs_invalid_media_op (void);
1.3751 ++int _newlib_vfs_invalid_file_op (void);
1.3753 ++/* Using the path prefix, return the media_ops that handles it */
1.3754 ++struct media_ops *_newlib_vfs_get_media_ops (const char *path);
1.3756 ++/* Returns the file that matches the given fd */
1.3757 ++struct file *_newlib_vfs_get_file (int fd);
1.3759 ++/* Insert a new file into the list. Returns -1 and sets errno if the file
1.3760 ++ can't be inserted, otherewise returns 0 */
1.3761 ++int _newlib_vfs_insert_file (struct file *);
1.3763 ++/* Removes a file from the list. Returns -1 and sets errno if there was
1.3764 ++ a problem (e.g. invalid fd passed to close, etc.) */
1.3765 ++int _newlib_vfs_remove_file (struct file *);
1.3767 ++/* Copy the given string into a new buffer, while stripping the vfs prefix
1.3768 ++ at the same time. */
1.3769 ++char *_newlib_vfs_new_string (const char *s);
1.3771 ++/* Free the buffer previously allocated with *_new_string */
1.3772 ++void _newlib_vfs_delete_string (char *s);
1.3774 ++#endif /* __VFS_H__ */
1.3775 +diff -urN newlib-1.8.2/newlib/libc/sys/aica/write.c newlib-1.8.2-aica/newlib/libc/sys/aica/write.c
1.3776 +--- newlib-1.8.2/newlib/libc/sys/aica/write.c 1970-01-01 10:00:00.000000000 +1000
1.3777 ++++ newlib-1.8.2-aica/newlib/libc/sys/aica/write.c 2008-08-13 11:54:44.000000000 +1000
1.3779 ++#include <sys/types.h>
1.3784 ++_write (int fd, const void *buf, size_t cnt)
1.3786 ++ struct file *pf = _newlib_vfs_get_file (fd);
1.3788 ++ return pf->fops->write (pf, buf, cnt);