Search
lxdream.org :: lxdream/test/lib/newlib-1.8.2-dc.patch
lxdream 0.9.1
released Jun 29
Download Now
filename test/lib/newlib-1.8.2-dc.patch
changeset 185:6755a04c447f
author nkeynes
date Wed Feb 15 17:54:51 2012 +1000 (10 years ago)
permissions -rw-r--r--
last change Use GL_TEXTURE_2D instead of GL_TEXTURE_RECTANGLE_ARB for frame buffers, for
systems that don't provide the latter (and there's not really much
difference anyway).
Add macro wrangling for GL_DEPTH24_STENCIL8 format
view annotate diff log raw
     1 diff -urN newlib-1.8.2/config.sub newlib-1.8.2-dc/config.sub
     2 --- newlib-1.8.2/config.sub	1999-11-21 07:42:37.000000000 +1000
     3 +++ newlib-1.8.2-dc/config.sub	2006-07-06 18:28:31.000000000 +1000
     4 @@ -231,7 +231,8 @@
     5  	      | alpha-* | alphaev[4-8]-* | alphaev56-* | alphapca5[67]-* \
     6  	      | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \
     7  	      | clipper-* | orion-* \
     8 -	      | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
     9 +	      | sparclite-* | pdp11-* | sh-* | sh[1234]-* | sh[1234]eb-* \
    10 +	      | powerpc-* | powerpcle-* \
    11  	      | sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \
    12  	      | mips64el-* | mips64orion-* | mips64orionel-* \
    13  	      | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \
    14 @@ -348,6 +349,10 @@
    15  	da30 | da30-*)
    16  		basic_machine=m68k-da30
    17  		;;
    18 +	dc | dreamcast)
    19 +		basic_machine=sh-sega
    20 +		os=-dreamcast
    21 +		;;
    22  	decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
    23  		basic_machine=mips-dec
    24  		;;
    25 @@ -950,7 +955,8 @@
    26  	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
    27  	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
    28  	      | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
    29 -	      | -interix* | -uwin* | -rhapsody* | -openstep* | -oskit*)
    30 +	      | -interix* | -uwin* | -rhapsody* | -openstep* | -oskit* \
    31 +		  | -dreamcast* )
    32  	# Remember, each alternative MUST END IN *, to match a version number.
    33  		;;
    34  	-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
    35 @@ -1097,6 +1103,9 @@
    36  	sparc-* | *-sun)
    37  		os=-sunos4.1.1
    38  		;;
    39 +	sh-sega)
    40 +		os=-dreamcast
    41 +		;;
    42  	*-be)
    43  		os=-beos
    44  		;;
    45 diff -urN newlib-1.8.2/configure.in newlib-1.8.2-dc/configure.in
    46 --- newlib-1.8.2/configure.in	1999-11-21 07:57:50.000000000 +1000
    47 +++ newlib-1.8.2-dc/configure.in	2006-07-06 18:28:31.000000000 +1000
    48 @@ -831,6 +831,15 @@
    49    romp-*-*)
    50      noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss"
    51      ;;
    52 +  sh*-*-dreamcast*)
    53 +    case "${host}" in
    54 +      i[3456]86-*-vsta) ;; # don't add gprof back in
    55 +      i[3456]86-*-go32*) ;; # don't add gprof back in
    56 +      i[3456]86-*-msdosdjgpp*) ;; # don't add gprof back in
    57 +      *) skipdirs=`echo " ${skipdirs} " | sed -e 's/ gprof / /'` ;;
    58 +    esac
    59 +    noconfigdirs="$noconfigdirs target-libgloss"
    60 +    ;;
    61    sh-*-*)
    62      case "${host}" in
    63        i[3456]86-*-vsta) ;; # don't add gprof back in
    64 diff -urN newlib-1.8.2/newlib/configure.host newlib-1.8.2-dc/newlib/configure.host
    65 --- newlib-1.8.2/newlib/configure.host	1999-11-21 07:47:53.000000000 +1000
    66 +++ newlib-1.8.2-dc/newlib/configure.host	2006-07-06 18:31:57.000000000 +1000
    67 @@ -129,7 +129,7 @@
    68    powerpc*)
    69  	machine_dir=powerpc
    70  	;;
    71 -  sh)
    72 +  sh*)
    73  	machine_dir=sh
    74  	;;
    75    sparc*)
    76 @@ -191,6 +191,9 @@
    77  	sys_dir=cygwin
    78  	posix_dir=posix
    79  	;;
    80 +  *-*-dc* | *-*-dreamcast*)
    81 +	sys_dir=dreamcast
    82 +	;;
    83    *-*-netware*)
    84  	signal_dir=
    85  	sys_dir=netware
    86 @@ -245,7 +248,7 @@
    87  	posix_dir=posix
    88  	;;
    89    sh*-*)
    90 -	sys_dir=sh
    91 +	sys_dir=dreamcast
    92  	;;
    93    sparc-sun-sunos*)
    94  	sys_dir=sun4
    95 @@ -296,6 +299,10 @@
    96  	newlib_cflags="${newlib_cflags} -DHAVE_OPENDIR -DHAVE_RENAME -DSIGNAL_PROVIDED -DWANT_PRINTF_LONG_LONG -D_COMPILING_NEWLIB"
    97  	syscall_dir=syscalls
    98  	;;
    99 +  *-*-dc* | *-*-dreamcast*)
   100 +	newlib_cflags="${newlib_cflags} -DNO_EXEC -DHAVE_GETTIMEOFDAY"
   101 +	syscall_dir=syscalls
   102 +	;;
   103  # RTEMS supplies its own versions of some routines:
   104  #       malloc()            (reentrant version)
   105  #       exit()              RTEMS has a "global" reent to flush
   106 diff -urN newlib-1.8.2/newlib/libc/ctype/Makefile.in newlib-1.8.2-dc/newlib/libc/ctype/Makefile.in
   107 --- newlib-1.8.2/newlib/libc/ctype/Makefile.in	1998-12-01 08:03:43.000000000 +1000
   108 +++ newlib-1.8.2-dc/newlib/libc/ctype/Makefile.in	2006-07-06 18:28:31.000000000 +1000
   109 @@ -1,6 +1,6 @@
   110 -# Makefile.in generated automatically by automake 1.3b from Makefile.am
   111 +# Makefile.in generated automatically by automake 1.4 from Makefile.am
   113 -# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
   114 +# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
   115  # This Makefile.in is free software; the Free Software Foundation
   116  # gives unlimited permission to copy and/or distribute it,
   117  # with or without modifications, as long as this notice is preserved.
   118 @@ -46,7 +46,7 @@
   119  AUTOHEADER = @AUTOHEADER@
   121  INSTALL = @INSTALL@
   122 -INSTALL_PROGRAM = @INSTALL_PROGRAM@
   123 +INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
   124  INSTALL_DATA = @INSTALL_DATA@
   125  INSTALL_SCRIPT = @INSTALL_SCRIPT@
   126  transform = @program_transform_name@
   127 @@ -78,7 +78,6 @@
   128  PACKAGE = @PACKAGE@
   129  RANLIB = @RANLIB@
   130  VERSION = @VERSION@
   131 -mach_add_objs = @mach_add_objs@
   132  machine_dir = @machine_dir@
   133  newlib_basedir = @newlib_basedir@
   134  sys_dir = @sys_dir@
   135 @@ -89,40 +88,11 @@
   137  noinst_LIBRARIES = lib.a
   139 -lib_a_SOURCES = \
   140 -	ctype_.c \
   141 -	isalnum.c \
   142 -	isalpha.c \
   143 -	isascii.c \
   144 -	iscntrl.c \
   145 -	isdigit.c \
   146 -	islower.c \
   147 -	isupper.c \
   148 -	isprint.c \
   149 -	ispunct.c \
   150 -	isspace.c \
   151 -	isxdigit.c \
   152 -	toascii.c \
   153 -	tolower.c \
   154 -	toupper.c \
   155 -	_tolower.c \
   156 -	_toupper.c
   157 -
   158 -CHEWOUT_FILES= \
   159 -	isalnum.def	\
   160 -	isalpha.def	\
   161 -	isascii.def	\
   162 -	iscntrl.def	\
   163 -	isdigit.def	\
   164 -	islower.def	\
   165 -	isprint.def	\
   166 -	ispunct.def	\
   167 -	isspace.def	\
   168 -	isupper.def	\
   169 -	isxdigit.def	\
   170 -	toascii.def	\
   171 -	tolower.def	\
   172 -	toupper.def	
   173 +lib_a_SOURCES =  	ctype_.c 	isalnum.c 	isalpha.c 	isascii.c 	iscntrl.c 	isdigit.c 	islower.c 	isupper.c 	isprint.c 	ispunct.c 	isspace.c 	isxdigit.c 	toascii.c 	tolower.c 	toupper.c 	_tolower.c 	_toupper.c
   174 +
   175 +
   176 +CHEWOUT_FILES =  	isalnum.def		isalpha.def		isascii.def		iscntrl.def		isdigit.def		islower.def		isprint.def		ispunct.def		isspace.def		isupper.def		isxdigit.def		toascii.def		tolower.def		toupper.def	
   177 +
   179  SUFFIXES = .def
   181 @@ -146,22 +116,22 @@
   182  toascii.o tolower.o toupper.o _tolower.o _toupper.o
   183  CFLAGS = @CFLAGS@
   184  COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
   185 -LINK = $(CC) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
   186 +CCLD = $(CC)
   187 +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
   188  DIST_COMMON =  Makefile.am Makefile.in
   191  DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
   193  TAR = tar
   194 -GZIP = --best
   195 +GZIP_ENV = --best
   196  SOURCES = $(lib_a_SOURCES)
   197  OBJECTS = $(lib_a_OBJECTS)
   199 -all: Makefile $(LIBRARIES)
   200 -
   201 +all: all-redirect
   202  .SUFFIXES:
   203  .SUFFIXES: .S .c .def .o .s
   204 -$(srcdir)/Makefile.in: @MAINT@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
   205 +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
   206  	cd $(top_srcdir) && $(AUTOMAKE) --cygnus ctype/Makefile
   208  Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
   209 @@ -205,8 +175,12 @@
   210  tags: TAGS
   212  ID: $(HEADERS) $(SOURCES) $(LISP)
   213 +	list='$(SOURCES) $(HEADERS)'; \
   214 +	unique=`for i in $$list; do echo $$i; done | \
   215 +	  awk '    { files[$$0] = 1; } \
   216 +	       END { for (i in files) print i; }'`; \
   217  	here=`pwd` && cd $(srcdir) \
   218 -	  && mkid -f$$here/ID $(SOURCES) $(HEADERS) $(LISP)
   219 +	  && mkid -f$$here/ID $$unique $(LISP)
   221  TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) $(LISP)
   222  	tags=; \
   223 @@ -234,28 +208,39 @@
   224  distdir: $(DISTFILES)
   225  	@for file in $(DISTFILES); do \
   226  	  if test -f $$file; then d=.; else d=$(srcdir); fi; \
   227 -	  test -f $(distdir)/$$file \
   228 -	  || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
   229 -	  || cp -p $$d/$$file $(distdir)/$$file; \
   230 +	  if test -d $$d/$$file; then \
   231 +	    cp -pr $$d/$$file $(distdir)/$$file; \
   232 +	  else \
   233 +	    test -f $(distdir)/$$file \
   234 +	    || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
   235 +	    || cp -p $$d/$$file $(distdir)/$$file || :; \
   236 +	  fi; \
   237  	done
   238 -info:
   239 -dvi:
   240 -check:
   241 -installcheck:
   242 -install-info:
   243 -install-exec: 
   244 -	@$(NORMAL_INSTALL)
   245 -
   246 -install-data: 
   247 -	@$(NORMAL_INSTALL)
   248 -
   249 -install: install-exec install-data all
   250 -	@:
   251 -
   252 -uninstall: 
   253 -
   254 +info-am:
   255 +info: info-am
   256 +dvi-am:
   257 +dvi: dvi-am
   258 +check-am:
   259 +check: check-am
   260 +installcheck-am:
   261 +installcheck: installcheck-am
   262 +install-info-am: 
   263 +install-info: install-info-am
   264 +install-exec-am:
   265 +install-exec: install-exec-am
   266 +
   267 +install-data-am:
   268 +install-data: install-data-am
   269 +
   270 +install-am: all-am
   271 +	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
   272 +install: install-am
   273 +uninstall-am:
   274 +uninstall: uninstall-am
   275 +all-am: Makefile $(LIBRARIES)
   276 +all-redirect: all-am
   277  install-strip:
   278 -	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
   279 +	$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
   280  installdirs:
   283 @@ -269,29 +254,38 @@
   284  	-rm -f config.cache config.log stamp-h stamp-h[0-9]*
   286  maintainer-clean-generic:
   287 -mostlyclean:  mostlyclean-noinstLIBRARIES mostlyclean-compile \
   288 +mostlyclean-am:  mostlyclean-noinstLIBRARIES mostlyclean-compile \
   289  		mostlyclean-tags mostlyclean-generic
   291 -clean:  clean-noinstLIBRARIES clean-compile clean-tags clean-generic \
   292 -		mostlyclean
   293 +mostlyclean: mostlyclean-am
   295 -distclean:  distclean-noinstLIBRARIES distclean-compile distclean-tags \
   296 -		distclean-generic clean
   297 -	-rm -f config.status
   298 +clean-am:  clean-noinstLIBRARIES clean-compile clean-tags clean-generic \
   299 +		mostlyclean-am
   301 -maintainer-clean:  maintainer-clean-noinstLIBRARIES \
   302 +clean: clean-am
   303 +
   304 +distclean-am:  distclean-noinstLIBRARIES distclean-compile \
   305 +		distclean-tags distclean-generic clean-am
   306 +
   307 +distclean: distclean-am
   308 +
   309 +maintainer-clean-am:  maintainer-clean-noinstLIBRARIES \
   310  		maintainer-clean-compile maintainer-clean-tags \
   311 -		maintainer-clean-generic distclean
   312 +		maintainer-clean-generic distclean-am
   313  	@echo "This command is intended for maintainers to use;"
   314  	@echo "it deletes files that may require special tools to rebuild."
   316 +maintainer-clean: maintainer-clean-am
   317 +
   318  .PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \
   319  clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
   320  mostlyclean-compile distclean-compile clean-compile \
   321  maintainer-clean-compile tags mostlyclean-tags distclean-tags \
   322 -clean-tags maintainer-clean-tags distdir info dvi installcheck \
   323 -install-info install-exec install-data install uninstall all \
   324 -installdirs mostlyclean-generic distclean-generic clean-generic \
   325 +clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \
   326 +check-am installcheck-am installcheck install-info-am install-info \
   327 +install-exec-am install-exec install-data-am install-data install-am \
   328 +install uninstall-am uninstall all-redirect all-am all installdirs \
   329 +mostlyclean-generic distclean-generic clean-generic \
   330  maintainer-clean-generic clean mostlyclean distclean maintainer-clean
   333 diff -urN newlib-1.8.2/newlib/libc/errno/Makefile.in newlib-1.8.2-dc/newlib/libc/errno/Makefile.in
   334 --- newlib-1.8.2/newlib/libc/errno/Makefile.in	1998-12-01 08:03:43.000000000 +1000
   335 +++ newlib-1.8.2-dc/newlib/libc/errno/Makefile.in	2006-07-06 18:28:31.000000000 +1000
   336 @@ -1,6 +1,6 @@
   337 -# Makefile.in generated automatically by automake 1.3b from Makefile.am
   338 +# Makefile.in generated automatically by automake 1.4 from Makefile.am
   340 -# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
   341 +# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
   342  # This Makefile.in is free software; the Free Software Foundation
   343  # gives unlimited permission to copy and/or distribute it,
   344  # with or without modifications, as long as this notice is preserved.
   345 @@ -46,7 +46,7 @@
   346  AUTOHEADER = @AUTOHEADER@
   348  INSTALL = @INSTALL@
   349 -INSTALL_PROGRAM = @INSTALL_PROGRAM@
   350 +INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
   351  INSTALL_DATA = @INSTALL_DATA@
   352  INSTALL_SCRIPT = @INSTALL_SCRIPT@
   353  transform = @program_transform_name@
   354 @@ -78,7 +78,6 @@
   355  PACKAGE = @PACKAGE@
   356  RANLIB = @RANLIB@
   357  VERSION = @VERSION@
   358 -mach_add_objs = @mach_add_objs@
   359  machine_dir = @machine_dir@
   360  newlib_basedir = @newlib_basedir@
   361  sys_dir = @sys_dir@
   362 @@ -91,7 +90,7 @@
   364  lib_a_SOURCES = errno.c
   366 -CHEWOUT_FILES =
   367 +CHEWOUT_FILES = 
   369  SUFFIXES = .def
   371 @@ -113,22 +112,22 @@
   372  lib_a_OBJECTS =  errno.o
   373  CFLAGS = @CFLAGS@
   374  COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
   375 -LINK = $(CC) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
   376 +CCLD = $(CC)
   377 +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
   378  DIST_COMMON =  Makefile.am Makefile.in
   381  DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
   383  TAR = tar
   384 -GZIP = --best
   385 +GZIP_ENV = --best
   386  SOURCES = $(lib_a_SOURCES)
   387  OBJECTS = $(lib_a_OBJECTS)
   389 -all: Makefile $(LIBRARIES)
   390 -
   391 +all: all-redirect
   392  .SUFFIXES:
   393  .SUFFIXES: .S .c .def .o .s
   394 -$(srcdir)/Makefile.in: @MAINT@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
   395 +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
   396  	cd $(top_srcdir) && $(AUTOMAKE) --cygnus errno/Makefile
   398  Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
   399 @@ -172,8 +171,12 @@
   400  tags: TAGS
   402  ID: $(HEADERS) $(SOURCES) $(LISP)
   403 +	list='$(SOURCES) $(HEADERS)'; \
   404 +	unique=`for i in $$list; do echo $$i; done | \
   405 +	  awk '    { files[$$0] = 1; } \
   406 +	       END { for (i in files) print i; }'`; \
   407  	here=`pwd` && cd $(srcdir) \
   408 -	  && mkid -f$$here/ID $(SOURCES) $(HEADERS) $(LISP)
   409 +	  && mkid -f$$here/ID $$unique $(LISP)
   411  TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) $(LISP)
   412  	tags=; \
   413 @@ -201,28 +204,39 @@
   414  distdir: $(DISTFILES)
   415  	@for file in $(DISTFILES); do \
   416  	  if test -f $$file; then d=.; else d=$(srcdir); fi; \
   417 -	  test -f $(distdir)/$$file \
   418 -	  || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
   419 -	  || cp -p $$d/$$file $(distdir)/$$file; \
   420 +	  if test -d $$d/$$file; then \
   421 +	    cp -pr $$d/$$file $(distdir)/$$file; \
   422 +	  else \
   423 +	    test -f $(distdir)/$$file \
   424 +	    || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
   425 +	    || cp -p $$d/$$file $(distdir)/$$file || :; \
   426 +	  fi; \
   427  	done
   428 -info:
   429 -dvi:
   430 -check:
   431 -installcheck:
   432 -install-info:
   433 -install-exec: 
   434 -	@$(NORMAL_INSTALL)
   435 -
   436 -install-data: 
   437 -	@$(NORMAL_INSTALL)
   438 -
   439 -install: install-exec install-data all
   440 -	@:
   441 -
   442 -uninstall: 
   443 -
   444 +info-am:
   445 +info: info-am
   446 +dvi-am:
   447 +dvi: dvi-am
   448 +check-am:
   449 +check: check-am
   450 +installcheck-am:
   451 +installcheck: installcheck-am
   452 +install-info-am: 
   453 +install-info: install-info-am
   454 +install-exec-am:
   455 +install-exec: install-exec-am
   456 +
   457 +install-data-am:
   458 +install-data: install-data-am
   459 +
   460 +install-am: all-am
   461 +	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
   462 +install: install-am
   463 +uninstall-am:
   464 +uninstall: uninstall-am
   465 +all-am: Makefile $(LIBRARIES)
   466 +all-redirect: all-am
   467  install-strip:
   468 -	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
   469 +	$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
   470  installdirs:
   473 @@ -236,29 +250,38 @@
   474  	-rm -f config.cache config.log stamp-h stamp-h[0-9]*
   476  maintainer-clean-generic:
   477 -mostlyclean:  mostlyclean-noinstLIBRARIES mostlyclean-compile \
   478 +mostlyclean-am:  mostlyclean-noinstLIBRARIES mostlyclean-compile \
   479  		mostlyclean-tags mostlyclean-generic
   481 -clean:  clean-noinstLIBRARIES clean-compile clean-tags clean-generic \
   482 -		mostlyclean
   483 +mostlyclean: mostlyclean-am
   484 +
   485 +clean-am:  clean-noinstLIBRARIES clean-compile clean-tags clean-generic \
   486 +		mostlyclean-am
   488 -distclean:  distclean-noinstLIBRARIES distclean-compile distclean-tags \
   489 -		distclean-generic clean
   490 -	-rm -f config.status
   491 +clean: clean-am
   493 -maintainer-clean:  maintainer-clean-noinstLIBRARIES \
   494 +distclean-am:  distclean-noinstLIBRARIES distclean-compile \
   495 +		distclean-tags distclean-generic clean-am
   496 +
   497 +distclean: distclean-am
   498 +
   499 +maintainer-clean-am:  maintainer-clean-noinstLIBRARIES \
   500  		maintainer-clean-compile maintainer-clean-tags \
   501 -		maintainer-clean-generic distclean
   502 +		maintainer-clean-generic distclean-am
   503  	@echo "This command is intended for maintainers to use;"
   504  	@echo "it deletes files that may require special tools to rebuild."
   506 +maintainer-clean: maintainer-clean-am
   507 +
   508  .PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \
   509  clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
   510  mostlyclean-compile distclean-compile clean-compile \
   511  maintainer-clean-compile tags mostlyclean-tags distclean-tags \
   512 -clean-tags maintainer-clean-tags distdir info dvi installcheck \
   513 -install-info install-exec install-data install uninstall all \
   514 -installdirs mostlyclean-generic distclean-generic clean-generic \
   515 +clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \
   516 +check-am installcheck-am installcheck install-info-am install-info \
   517 +install-exec-am install-exec install-data-am install-data install-am \
   518 +install uninstall-am uninstall all-redirect all-am all installdirs \
   519 +mostlyclean-generic distclean-generic clean-generic \
   520  maintainer-clean-generic clean mostlyclean distclean maintainer-clean
   523 diff -urN newlib-1.8.2/newlib/libc/locale/Makefile.in newlib-1.8.2-dc/newlib/libc/locale/Makefile.in
   524 --- newlib-1.8.2/newlib/libc/locale/Makefile.in	1998-12-01 08:03:44.000000000 +1000
   525 +++ newlib-1.8.2-dc/newlib/libc/locale/Makefile.in	2006-07-06 18:28:31.000000000 +1000
   526 @@ -1,6 +1,6 @@
   527 -# Makefile.in generated automatically by automake 1.3b from Makefile.am
   528 +# Makefile.in generated automatically by automake 1.4 from Makefile.am
   530 -# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
   531 +# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
   532  # This Makefile.in is free software; the Free Software Foundation
   533  # gives unlimited permission to copy and/or distribute it,
   534  # with or without modifications, as long as this notice is preserved.
   535 @@ -46,7 +46,7 @@
   536  AUTOHEADER = @AUTOHEADER@
   538  INSTALL = @INSTALL@
   539 -INSTALL_PROGRAM = @INSTALL_PROGRAM@
   540 +INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
   541  INSTALL_DATA = @INSTALL_DATA@
   542  INSTALL_SCRIPT = @INSTALL_SCRIPT@
   543  transform = @program_transform_name@
   544 @@ -78,7 +78,6 @@
   545  PACKAGE = @PACKAGE@
   546  RANLIB = @RANLIB@
   547  VERSION = @VERSION@
   548 -mach_add_objs = @mach_add_objs@
   549  machine_dir = @machine_dir@
   550  newlib_basedir = @newlib_basedir@
   551  sys_dir = @sys_dir@
   552 @@ -113,22 +112,22 @@
   553  lib_a_OBJECTS =  locale.o
   554  CFLAGS = @CFLAGS@
   555  COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
   556 -LINK = $(CC) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
   557 +CCLD = $(CC)
   558 +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
   559  DIST_COMMON =  Makefile.am Makefile.in
   562  DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
   564  TAR = tar
   565 -GZIP = --best
   566 +GZIP_ENV = --best
   567  SOURCES = $(lib_a_SOURCES)
   568  OBJECTS = $(lib_a_OBJECTS)
   570 -all: Makefile $(LIBRARIES)
   571 -
   572 +all: all-redirect
   573  .SUFFIXES:
   574  .SUFFIXES: .S .c .def .o .s
   575 -$(srcdir)/Makefile.in: @MAINT@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
   576 +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
   577  	cd $(top_srcdir) && $(AUTOMAKE) --cygnus locale/Makefile
   579  Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
   580 @@ -172,8 +171,12 @@
   581  tags: TAGS
   583  ID: $(HEADERS) $(SOURCES) $(LISP)
   584 +	list='$(SOURCES) $(HEADERS)'; \
   585 +	unique=`for i in $$list; do echo $$i; done | \
   586 +	  awk '    { files[$$0] = 1; } \
   587 +	       END { for (i in files) print i; }'`; \
   588  	here=`pwd` && cd $(srcdir) \
   589 -	  && mkid -f$$here/ID $(SOURCES) $(HEADERS) $(LISP)
   590 +	  && mkid -f$$here/ID $$unique $(LISP)
   592  TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) $(LISP)
   593  	tags=; \
   594 @@ -201,28 +204,39 @@
   595  distdir: $(DISTFILES)
   596  	@for file in $(DISTFILES); do \
   597  	  if test -f $$file; then d=.; else d=$(srcdir); fi; \
   598 -	  test -f $(distdir)/$$file \
   599 -	  || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
   600 -	  || cp -p $$d/$$file $(distdir)/$$file; \
   601 +	  if test -d $$d/$$file; then \
   602 +	    cp -pr $$d/$$file $(distdir)/$$file; \
   603 +	  else \
   604 +	    test -f $(distdir)/$$file \
   605 +	    || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
   606 +	    || cp -p $$d/$$file $(distdir)/$$file || :; \
   607 +	  fi; \
   608  	done
   609 -info:
   610 -dvi:
   611 -check:
   612 -installcheck:
   613 -install-info:
   614 -install-exec: 
   615 -	@$(NORMAL_INSTALL)
   616 -
   617 -install-data: 
   618 -	@$(NORMAL_INSTALL)
   619 -
   620 -install: install-exec install-data all
   621 -	@:
   622 -
   623 -uninstall: 
   624 -
   625 +info-am:
   626 +info: info-am
   627 +dvi-am:
   628 +dvi: dvi-am
   629 +check-am:
   630 +check: check-am
   631 +installcheck-am:
   632 +installcheck: installcheck-am
   633 +install-info-am: 
   634 +install-info: install-info-am
   635 +install-exec-am:
   636 +install-exec: install-exec-am
   637 +
   638 +install-data-am:
   639 +install-data: install-data-am
   640 +
   641 +install-am: all-am
   642 +	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
   643 +install: install-am
   644 +uninstall-am:
   645 +uninstall: uninstall-am
   646 +all-am: Makefile $(LIBRARIES)
   647 +all-redirect: all-am
   648  install-strip:
   649 -	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
   650 +	$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
   651  installdirs:
   654 @@ -236,29 +250,38 @@
   655  	-rm -f config.cache config.log stamp-h stamp-h[0-9]*
   657  maintainer-clean-generic:
   658 -mostlyclean:  mostlyclean-noinstLIBRARIES mostlyclean-compile \
   659 +mostlyclean-am:  mostlyclean-noinstLIBRARIES mostlyclean-compile \
   660  		mostlyclean-tags mostlyclean-generic
   662 -clean:  clean-noinstLIBRARIES clean-compile clean-tags clean-generic \
   663 -		mostlyclean
   664 +mostlyclean: mostlyclean-am
   665 +
   666 +clean-am:  clean-noinstLIBRARIES clean-compile clean-tags clean-generic \
   667 +		mostlyclean-am
   669 -distclean:  distclean-noinstLIBRARIES distclean-compile distclean-tags \
   670 -		distclean-generic clean
   671 -	-rm -f config.status
   672 +clean: clean-am
   674 -maintainer-clean:  maintainer-clean-noinstLIBRARIES \
   675 +distclean-am:  distclean-noinstLIBRARIES distclean-compile \
   676 +		distclean-tags distclean-generic clean-am
   677 +
   678 +distclean: distclean-am
   679 +
   680 +maintainer-clean-am:  maintainer-clean-noinstLIBRARIES \
   681  		maintainer-clean-compile maintainer-clean-tags \
   682 -		maintainer-clean-generic distclean
   683 +		maintainer-clean-generic distclean-am
   684  	@echo "This command is intended for maintainers to use;"
   685  	@echo "it deletes files that may require special tools to rebuild."
   687 +maintainer-clean: maintainer-clean-am
   688 +
   689  .PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \
   690  clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
   691  mostlyclean-compile distclean-compile clean-compile \
   692  maintainer-clean-compile tags mostlyclean-tags distclean-tags \
   693 -clean-tags maintainer-clean-tags distdir info dvi installcheck \
   694 -install-info install-exec install-data install uninstall all \
   695 -installdirs mostlyclean-generic distclean-generic clean-generic \
   696 +clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \
   697 +check-am installcheck-am installcheck install-info-am install-info \
   698 +install-exec-am install-exec install-data-am install-data install-am \
   699 +install uninstall-am uninstall all-redirect all-am all installdirs \
   700 +mostlyclean-generic distclean-generic clean-generic \
   701  maintainer-clean-generic clean mostlyclean distclean maintainer-clean
   704 diff -urN newlib-1.8.2/newlib/libc/Makefile.in newlib-1.8.2-dc/newlib/libc/Makefile.in
   705 --- newlib-1.8.2/newlib/libc/Makefile.in	1999-11-21 07:55:49.000000000 +1000
   706 +++ newlib-1.8.2-dc/newlib/libc/Makefile.in	2006-07-06 18:28:31.000000000 +1000
   707 @@ -77,50 +77,30 @@
   708  NEWLIB_CFLAGS = @NEWLIB_CFLAGS@
   709  PACKAGE = @PACKAGE@
   710  RANLIB = @RANLIB@
   711 -VERSION = 1.8.2
   712 +VERSION = @VERSION@
   713  machine_dir = @machine_dir@
   714  newlib_basedir = @newlib_basedir@
   715  sys_dir = @sys_dir@
   717  AUTOMAKE_OPTIONS = cygnus
   719 -@HAVE_POSIX_DIR_TRUE@POSIX_SUBDIR = \
   720 -@HAVE_POSIX_DIR_TRUE@posix
   721 +@HAVE_POSIX_DIR_TRUE@POSIX_SUBDIR = posix
   723 -@HAVE_SIGNAL_DIR_TRUE@SIGNAL_SUBDIR = \
   724 -@HAVE_SIGNAL_DIR_TRUE@signal
   725 +@HAVE_SIGNAL_DIR_TRUE@SIGNAL_SUBDIR = signal
   727 -@HAVE_SYSCALL_DIR_TRUE@SYSCALLS_SUBDIR = \
   728 -@HAVE_SYSCALL_DIR_TRUE@syscalls
   729 +@HAVE_SYSCALL_DIR_TRUE@SYSCALLS_SUBDIR = syscalls
   731 -@HAVE_UNIX_DIR_TRUE@UNIX_SUBDIR = \
   732 -@HAVE_UNIX_DIR_TRUE@unix
   733 +@HAVE_UNIX_DIR_TRUE@UNIX_SUBDIR = unix
   735  # The order of SUBDIRS is important for the integrated documentation.
   736  # Do not change the order without considering the doc impact.
   737 -SUBDIRS = stdlib ctype stdio string $(SIGNAL_SUBDIR) time locale sys reent \
   738 -	errno misc machine $(UNIX_SUBDIR) $(POSIX_SUBDIR) $(SYSCALLS_SUBDIR) .
   739 +SUBDIRS = stdlib ctype stdio string $(SIGNAL_SUBDIR) time locale sys reent 	errno misc machine $(UNIX_SUBDIR) $(POSIX_SUBDIR) $(SYSCALLS_SUBDIR) .
   742  noinst_LIBRARIES = libc.a
   743  noinst_DATA = $(CRT0)
   745 -SUBLIBS = \
   746 -	stdlib/lib.a \
   747 -	ctype/lib.a \
   748 -	stdio/lib.a \
   749 -	string/lib.a \
   750 -	$(LIBC_SIGNAL_LIB) \
   751 -	time/lib.a \
   752 -	locale/lib.a \
   753 -	$(LIBC_SYS_LIB) \
   754 -	reent/lib.a \
   755 -	errno/lib.a \
   756 -	misc/lib.a \
   757 -	$(LIBC_MACHINE_LIB) \
   758 -	$(LIBC_UNIX_LIB) \
   759 -	$(LIBC_POSIX_LIB) \
   760 -	$(LIBC_SYSCALL_LIB)
   761 +SUBLIBS =  	stdlib/lib.a 	ctype/lib.a 	stdio/lib.a 	string/lib.a 	$(LIBC_SIGNAL_LIB) 	time/lib.a 	locale/lib.a 	$(LIBC_SYS_LIB) 	reent/lib.a 	errno/lib.a 	misc/lib.a 	$(LIBC_MACHINE_LIB) 	$(LIBC_UNIX_LIB) 	$(LIBC_POSIX_LIB) 	$(LIBC_SYSCALL_LIB)
   764  info_TEXINFOS = libc.texinfo
   765 @@ -129,20 +109,10 @@
   766  # builds .def files.  We don't list subdirectories which don't build
   767  # .def files; if the list of subdirectories changes, we must change
   768  # this as well.
   769 -SUBDEFS = \
   770 -	stdlib/stmp-def \
   771 -	ctype/stmp-def \
   772 -	stdio/stmp-def \
   773 -	string/stmp-def \
   774 -	$(LIBC_SIGNAL_DEF) \
   775 -	time/stmp-def \
   776 -	locale/stmp-def \
   777 -	reent/stmp-def \
   778 -	misc/stmp-def
   779 +SUBDEFS =  	stdlib/stmp-def 	ctype/stmp-def 	stdio/stmp-def 	string/stmp-def 	$(LIBC_SIGNAL_DEF) 	time/stmp-def 	locale/stmp-def 	reent/stmp-def 	misc/stmp-def
   782 -CLEANFILES = crt0.o \
   783 -	sigset.texi stmp-sigset tmp.texi targetdep.tex stmp-targetdep
   784 +CLEANFILES = crt0.o 	sigset.texi stmp-sigset tmp.texi targetdep.tex stmp-targetdep
   787  ACLOCAL_AMFLAGS = -I ..
   788 @@ -471,7 +441,7 @@
   789  	@for file in $(DISTFILES); do \
   790  	  if test -f $$file; then d=.; else d=$(srcdir); fi; \
   791  	  if test -d $$d/$$file; then \
   792 -	    cp -pr $$/$$file $(distdir)/$$file; \
   793 +	    cp -pr $$d/$$file $(distdir)/$$file; \
   794  	  else \
   795  	    test -f $(distdir)/$$file \
   796  	    || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
   797 diff -urN newlib-1.8.2/newlib/libc/misc/Makefile.in newlib-1.8.2-dc/newlib/libc/misc/Makefile.in
   798 --- newlib-1.8.2/newlib/libc/misc/Makefile.in	1998-12-01 08:03:46.000000000 +1000
   799 +++ newlib-1.8.2-dc/newlib/libc/misc/Makefile.in	2006-07-06 18:28:31.000000000 +1000
   800 @@ -1,6 +1,6 @@
   801 -# Makefile.in generated automatically by automake 1.3b from Makefile.am
   802 +# Makefile.in generated automatically by automake 1.4 from Makefile.am
   804 -# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
   805 +# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
   806  # This Makefile.in is free software; the Free Software Foundation
   807  # gives unlimited permission to copy and/or distribute it,
   808  # with or without modifications, as long as this notice is preserved.
   809 @@ -46,7 +46,7 @@
   810  AUTOHEADER = @AUTOHEADER@
   812  INSTALL = @INSTALL@
   813 -INSTALL_PROGRAM = @INSTALL_PROGRAM@
   814 +INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
   815  INSTALL_DATA = @INSTALL_DATA@
   816  INSTALL_SCRIPT = @INSTALL_SCRIPT@
   817  transform = @program_transform_name@
   818 @@ -78,7 +78,6 @@
   819  PACKAGE = @PACKAGE@
   820  RANLIB = @RANLIB@
   821  VERSION = @VERSION@
   822 -mach_add_objs = @mach_add_objs@
   823  machine_dir = @machine_dir@
   824  newlib_basedir = @newlib_basedir@
   825  sys_dir = @sys_dir@
   826 @@ -113,22 +112,22 @@
   827  lib_a_OBJECTS =  dprintf.o unctrl.o ffs.o
   828  CFLAGS = @CFLAGS@
   829  COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
   830 -LINK = $(CC) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
   831 +CCLD = $(CC)
   832 +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
   833  DIST_COMMON =  Makefile.am Makefile.in
   836  DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
   838  TAR = tar
   839 -GZIP = --best
   840 +GZIP_ENV = --best
   841  SOURCES = $(lib_a_SOURCES)
   842  OBJECTS = $(lib_a_OBJECTS)
   844 -all: Makefile $(LIBRARIES)
   845 -
   846 +all: all-redirect
   847  .SUFFIXES:
   848  .SUFFIXES: .S .c .def .o .s
   849 -$(srcdir)/Makefile.in: @MAINT@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
   850 +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
   851  	cd $(top_srcdir) && $(AUTOMAKE) --cygnus misc/Makefile
   853  Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
   854 @@ -172,8 +171,12 @@
   855  tags: TAGS
   857  ID: $(HEADERS) $(SOURCES) $(LISP)
   858 +	list='$(SOURCES) $(HEADERS)'; \
   859 +	unique=`for i in $$list; do echo $$i; done | \
   860 +	  awk '    { files[$$0] = 1; } \
   861 +	       END { for (i in files) print i; }'`; \
   862  	here=`pwd` && cd $(srcdir) \
   863 -	  && mkid -f$$here/ID $(SOURCES) $(HEADERS) $(LISP)
   864 +	  && mkid -f$$here/ID $$unique $(LISP)
   866  TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) $(LISP)
   867  	tags=; \
   868 @@ -201,28 +204,39 @@
   869  distdir: $(DISTFILES)
   870  	@for file in $(DISTFILES); do \
   871  	  if test -f $$file; then d=.; else d=$(srcdir); fi; \
   872 -	  test -f $(distdir)/$$file \
   873 -	  || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
   874 -	  || cp -p $$d/$$file $(distdir)/$$file; \
   875 +	  if test -d $$d/$$file; then \
   876 +	    cp -pr $$d/$$file $(distdir)/$$file; \
   877 +	  else \
   878 +	    test -f $(distdir)/$$file \
   879 +	    || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
   880 +	    || cp -p $$d/$$file $(distdir)/$$file || :; \
   881 +	  fi; \
   882  	done
   883 -info:
   884 -dvi:
   885 -check:
   886 -installcheck:
   887 -install-info:
   888 -install-exec: 
   889 -	@$(NORMAL_INSTALL)
   890 -
   891 -install-data: 
   892 -	@$(NORMAL_INSTALL)
   893 -
   894 -install: install-exec install-data all
   895 -	@:
   896 -
   897 -uninstall: 
   898 -
   899 +info-am:
   900 +info: info-am
   901 +dvi-am:
   902 +dvi: dvi-am
   903 +check-am:
   904 +check: check-am
   905 +installcheck-am:
   906 +installcheck: installcheck-am
   907 +install-info-am: 
   908 +install-info: install-info-am
   909 +install-exec-am:
   910 +install-exec: install-exec-am
   911 +
   912 +install-data-am:
   913 +install-data: install-data-am
   914 +
   915 +install-am: all-am
   916 +	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
   917 +install: install-am
   918 +uninstall-am:
   919 +uninstall: uninstall-am
   920 +all-am: Makefile $(LIBRARIES)
   921 +all-redirect: all-am
   922  install-strip:
   923 -	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
   924 +	$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
   925  installdirs:
   928 @@ -236,29 +250,38 @@
   929  	-rm -f config.cache config.log stamp-h stamp-h[0-9]*
   931  maintainer-clean-generic:
   932 -mostlyclean:  mostlyclean-noinstLIBRARIES mostlyclean-compile \
   933 +mostlyclean-am:  mostlyclean-noinstLIBRARIES mostlyclean-compile \
   934  		mostlyclean-tags mostlyclean-generic
   936 -clean:  clean-noinstLIBRARIES clean-compile clean-tags clean-generic \
   937 -		mostlyclean
   938 +mostlyclean: mostlyclean-am
   939 +
   940 +clean-am:  clean-noinstLIBRARIES clean-compile clean-tags clean-generic \
   941 +		mostlyclean-am
   943 -distclean:  distclean-noinstLIBRARIES distclean-compile distclean-tags \
   944 -		distclean-generic clean
   945 -	-rm -f config.status
   946 +clean: clean-am
   948 -maintainer-clean:  maintainer-clean-noinstLIBRARIES \
   949 +distclean-am:  distclean-noinstLIBRARIES distclean-compile \
   950 +		distclean-tags distclean-generic clean-am
   951 +
   952 +distclean: distclean-am
   953 +
   954 +maintainer-clean-am:  maintainer-clean-noinstLIBRARIES \
   955  		maintainer-clean-compile maintainer-clean-tags \
   956 -		maintainer-clean-generic distclean
   957 +		maintainer-clean-generic distclean-am
   958  	@echo "This command is intended for maintainers to use;"
   959  	@echo "it deletes files that may require special tools to rebuild."
   961 +maintainer-clean: maintainer-clean-am
   962 +
   963  .PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \
   964  clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
   965  mostlyclean-compile distclean-compile clean-compile \
   966  maintainer-clean-compile tags mostlyclean-tags distclean-tags \
   967 -clean-tags maintainer-clean-tags distdir info dvi installcheck \
   968 -install-info install-exec install-data install uninstall all \
   969 -installdirs mostlyclean-generic distclean-generic clean-generic \
   970 +clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \
   971 +check-am installcheck-am installcheck install-info-am install-info \
   972 +install-exec-am install-exec install-data-am install-data install-am \
   973 +install uninstall-am uninstall all-redirect all-am all installdirs \
   974 +mostlyclean-generic distclean-generic clean-generic \
   975  maintainer-clean-generic clean mostlyclean distclean maintainer-clean
   978 diff -urN newlib-1.8.2/newlib/libc/posix/Makefile.in newlib-1.8.2-dc/newlib/libc/posix/Makefile.in
   979 --- newlib-1.8.2/newlib/libc/posix/Makefile.in	1998-12-01 08:03:46.000000000 +1000
   980 +++ newlib-1.8.2-dc/newlib/libc/posix/Makefile.in	2006-07-06 18:28:31.000000000 +1000
   981 @@ -1,6 +1,6 @@
   982 -# Makefile.in generated automatically by automake 1.3b from Makefile.am
   983 +# Makefile.in generated automatically by automake 1.4 from Makefile.am
   985 -# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
   986 +# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
   987  # This Makefile.in is free software; the Free Software Foundation
   988  # gives unlimited permission to copy and/or distribute it,
   989  # with or without modifications, as long as this notice is preserved.
   990 @@ -46,7 +46,7 @@
   991  AUTOHEADER = @AUTOHEADER@
   993  INSTALL = @INSTALL@
   994 -INSTALL_PROGRAM = @INSTALL_PROGRAM@
   995 +INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
   996  INSTALL_DATA = @INSTALL_DATA@
   997  INSTALL_SCRIPT = @INSTALL_SCRIPT@
   998  transform = @program_transform_name@
   999 @@ -78,7 +78,6 @@
  1000  PACKAGE = @PACKAGE@
  1001  RANLIB = @RANLIB@
  1002  VERSION = @VERSION@
  1003 -mach_add_objs = @mach_add_objs@
  1004  machine_dir = @machine_dir@
  1005  newlib_basedir = @newlib_basedir@
  1006  sys_dir = @sys_dir@
  1007 @@ -89,12 +88,10 @@
  1009  noinst_LIBRARIES = lib.a
  1011 -lib_a_SOURCES = \
  1012 -	closedir.c opendir.c readdir.c rewinddir.c scandir.c seekdir.c \
  1013 -	telldir.c execl.c execle.c execlp.c execv.c execve.c execvp.c \
  1014 -	popen.c creat.c isatty.c
  1015 +lib_a_SOURCES =  	closedir.c opendir.c readdir.c rewinddir.c scandir.c seekdir.c 	telldir.c execl.c execle.c execlp.c execv.c execve.c execvp.c 	popen.c creat.c isatty.c
  1017 -CHEWOUT_FILES =
  1019 +CHEWOUT_FILES = 
  1021  SUFFIXES = .def
  1023 @@ -118,22 +115,22 @@
  1024  popen.o creat.o isatty.o
  1025  CFLAGS = @CFLAGS@
  1026  COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
  1027 -LINK = $(CC) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
  1028 +CCLD = $(CC)
  1029 +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
  1030  DIST_COMMON =  Makefile.am Makefile.in
  1033  DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
  1035  TAR = tar
  1036 -GZIP = --best
  1037 +GZIP_ENV = --best
  1038  SOURCES = $(lib_a_SOURCES)
  1039  OBJECTS = $(lib_a_OBJECTS)
  1041 -all: Makefile $(LIBRARIES)
  1043 +all: all-redirect
  1044  .SUFFIXES:
  1045  .SUFFIXES: .S .c .def .o .s
  1046 -$(srcdir)/Makefile.in: @MAINT@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
  1047 +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
  1048  	cd $(top_srcdir) && $(AUTOMAKE) --cygnus posix/Makefile
  1050  Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
  1051 @@ -177,8 +174,12 @@
  1052  tags: TAGS
  1054  ID: $(HEADERS) $(SOURCES) $(LISP)
  1055 +	list='$(SOURCES) $(HEADERS)'; \
  1056 +	unique=`for i in $$list; do echo $$i; done | \
  1057 +	  awk '    { files[$$0] = 1; } \
  1058 +	       END { for (i in files) print i; }'`; \
  1059  	here=`pwd` && cd $(srcdir) \
  1060 -	  && mkid -f$$here/ID $(SOURCES) $(HEADERS) $(LISP)
  1061 +	  && mkid -f$$here/ID $$unique $(LISP)
  1063  TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) $(LISP)
  1064  	tags=; \
  1065 @@ -206,28 +207,39 @@
  1066  distdir: $(DISTFILES)
  1067  	@for file in $(DISTFILES); do \
  1068  	  if test -f $$file; then d=.; else d=$(srcdir); fi; \
  1069 -	  test -f $(distdir)/$$file \
  1070 -	  || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
  1071 -	  || cp -p $$d/$$file $(distdir)/$$file; \
  1072 +	  if test -d $$d/$$file; then \
  1073 +	    cp -pr $$d/$$file $(distdir)/$$file; \
  1074 +	  else \
  1075 +	    test -f $(distdir)/$$file \
  1076 +	    || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
  1077 +	    || cp -p $$d/$$file $(distdir)/$$file || :; \
  1078 +	  fi; \
  1079  	done
  1080 -info:
  1081 -dvi:
  1082 -check:
  1083 -installcheck:
  1084 -install-info:
  1085 -install-exec: 
  1086 -	@$(NORMAL_INSTALL)
  1088 -install-data: 
  1089 -	@$(NORMAL_INSTALL)
  1091 -install: install-exec install-data all
  1092 -	@:
  1094 -uninstall: 
  1096 +info-am:
  1097 +info: info-am
  1098 +dvi-am:
  1099 +dvi: dvi-am
  1100 +check-am:
  1101 +check: check-am
  1102 +installcheck-am:
  1103 +installcheck: installcheck-am
  1104 +install-info-am: 
  1105 +install-info: install-info-am
  1106 +install-exec-am:
  1107 +install-exec: install-exec-am
  1109 +install-data-am:
  1110 +install-data: install-data-am
  1112 +install-am: all-am
  1113 +	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
  1114 +install: install-am
  1115 +uninstall-am:
  1116 +uninstall: uninstall-am
  1117 +all-am: Makefile $(LIBRARIES)
  1118 +all-redirect: all-am
  1119  install-strip:
  1120 -	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
  1121 +	$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
  1122  installdirs:
  1125 @@ -241,29 +253,38 @@
  1126  	-rm -f config.cache config.log stamp-h stamp-h[0-9]*
  1128  maintainer-clean-generic:
  1129 -mostlyclean:  mostlyclean-noinstLIBRARIES mostlyclean-compile \
  1130 +mostlyclean-am:  mostlyclean-noinstLIBRARIES mostlyclean-compile \
  1131  		mostlyclean-tags mostlyclean-generic
  1133 -clean:  clean-noinstLIBRARIES clean-compile clean-tags clean-generic \
  1134 -		mostlyclean
  1135 +mostlyclean: mostlyclean-am
  1137 +clean-am:  clean-noinstLIBRARIES clean-compile clean-tags clean-generic \
  1138 +		mostlyclean-am
  1140 -distclean:  distclean-noinstLIBRARIES distclean-compile distclean-tags \
  1141 -		distclean-generic clean
  1142 -	-rm -f config.status
  1143 +clean: clean-am
  1145 -maintainer-clean:  maintainer-clean-noinstLIBRARIES \
  1146 +distclean-am:  distclean-noinstLIBRARIES distclean-compile \
  1147 +		distclean-tags distclean-generic clean-am
  1149 +distclean: distclean-am
  1151 +maintainer-clean-am:  maintainer-clean-noinstLIBRARIES \
  1152  		maintainer-clean-compile maintainer-clean-tags \
  1153 -		maintainer-clean-generic distclean
  1154 +		maintainer-clean-generic distclean-am
  1155  	@echo "This command is intended for maintainers to use;"
  1156  	@echo "it deletes files that may require special tools to rebuild."
  1158 +maintainer-clean: maintainer-clean-am
  1160  .PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \
  1161  clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
  1162  mostlyclean-compile distclean-compile clean-compile \
  1163  maintainer-clean-compile tags mostlyclean-tags distclean-tags \
  1164 -clean-tags maintainer-clean-tags distdir info dvi installcheck \
  1165 -install-info install-exec install-data install uninstall all \
  1166 -installdirs mostlyclean-generic distclean-generic clean-generic \
  1167 +clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \
  1168 +check-am installcheck-am installcheck install-info-am install-info \
  1169 +install-exec-am install-exec install-data-am install-data install-am \
  1170 +install uninstall-am uninstall all-redirect all-am all installdirs \
  1171 +mostlyclean-generic distclean-generic clean-generic \
  1172  maintainer-clean-generic clean mostlyclean distclean maintainer-clean
  1175 diff -urN newlib-1.8.2/newlib/libc/reent/Makefile.in newlib-1.8.2-dc/newlib/libc/reent/Makefile.in
  1176 --- newlib-1.8.2/newlib/libc/reent/Makefile.in	1998-12-01 08:03:46.000000000 +1000
  1177 +++ newlib-1.8.2-dc/newlib/libc/reent/Makefile.in	2006-07-06 18:28:31.000000000 +1000
  1178 @@ -1,6 +1,6 @@
  1179 -# Makefile.in generated automatically by automake 1.3b from Makefile.am
  1180 +# Makefile.in generated automatically by automake 1.4 from Makefile.am
  1182 -# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
  1183 +# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
  1184  # This Makefile.in is free software; the Free Software Foundation
  1185  # gives unlimited permission to copy and/or distribute it,
  1186  # with or without modifications, as long as this notice is preserved.
  1187 @@ -46,7 +46,7 @@
  1188  AUTOHEADER = @AUTOHEADER@
  1190  INSTALL = @INSTALL@
  1191 -INSTALL_PROGRAM = @INSTALL_PROGRAM@
  1192 +INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
  1193  INSTALL_DATA = @INSTALL_DATA@
  1194  INSTALL_SCRIPT = @INSTALL_SCRIPT@
  1195  transform = @program_transform_name@
  1196 @@ -78,7 +78,6 @@
  1197  PACKAGE = @PACKAGE@
  1198  RANLIB = @RANLIB@
  1199  VERSION = @VERSION@
  1200 -mach_add_objs = @mach_add_objs@
  1201  machine_dir = @machine_dir@
  1202  newlib_basedir = @newlib_basedir@
  1203  sys_dir = @sys_dir@
  1204 @@ -89,36 +88,11 @@
  1206  noinst_LIBRARIES = lib.a
  1208 -lib_a_SOURCES = \
  1209 -	closer.c \
  1210 -	reent.c \
  1211 -	impure.c \
  1212 -	execr.c \
  1213 -	fstatr.c \
  1214 -	linkr.c \
  1215 -	lseekr.c \
  1216 -	openr.c \
  1217 -	readr.c \
  1218 -	signalr.c \
  1219 -	sbrkr.c \
  1220 -	statr.c \
  1221 -	timer.c \
  1222 -	writer.c
  1224 -CHEWOUT_FILES = \
  1225 -	closer.def \
  1226 -	reent.def \
  1227 -	execr.def \
  1228 -	fstatr.def \
  1229 -	linkr.def \
  1230 -	lseekr.def \
  1231 -	openr.def \
  1232 -	readr.def \
  1233 -	signalr.def \
  1234 -	sbrkr.def \
  1235 -	statr.def \
  1236 -	timer.def \
  1237 -	writer.def
  1238 +lib_a_SOURCES =  	closer.c 	reent.c 	impure.c 	execr.c 	fstatr.c 	linkr.c 	lseekr.c 	openr.c 	readr.c 	signalr.c 	sbrkr.c 	statr.c 	timer.c 	writer.c
  1241 +CHEWOUT_FILES =  	closer.def 	reent.def 	execr.def 	fstatr.def 	linkr.def 	lseekr.def 	openr.def 	readr.def 	signalr.def 	sbrkr.def 	statr.def 	timer.def 	writer.def
  1244  SUFFIXES = .def .h
  1246 @@ -141,22 +115,22 @@
  1247  lseekr.o openr.o readr.o signalr.o sbrkr.o statr.o timer.o writer.o
  1248  CFLAGS = @CFLAGS@
  1249  COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
  1250 -LINK = $(CC) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
  1251 +CCLD = $(CC)
  1252 +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
  1253  DIST_COMMON =  Makefile.am Makefile.in
  1256  DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
  1258  TAR = tar
  1259 -GZIP = --best
  1260 +GZIP_ENV = --best
  1261  SOURCES = $(lib_a_SOURCES)
  1262  OBJECTS = $(lib_a_OBJECTS)
  1264 -all: Makefile $(LIBRARIES)
  1266 +all: all-redirect
  1267  .SUFFIXES:
  1268  .SUFFIXES: .S .c .def .h .o .s
  1269 -$(srcdir)/Makefile.in: @MAINT@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
  1270 +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
  1271  	cd $(top_srcdir) && $(AUTOMAKE) --cygnus reent/Makefile
  1273  Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
  1274 @@ -200,8 +174,12 @@
  1275  tags: TAGS
  1277  ID: $(HEADERS) $(SOURCES) $(LISP)
  1278 +	list='$(SOURCES) $(HEADERS)'; \
  1279 +	unique=`for i in $$list; do echo $$i; done | \
  1280 +	  awk '    { files[$$0] = 1; } \
  1281 +	       END { for (i in files) print i; }'`; \
  1282  	here=`pwd` && cd $(srcdir) \
  1283 -	  && mkid -f$$here/ID $(SOURCES) $(HEADERS) $(LISP)
  1284 +	  && mkid -f$$here/ID $$unique $(LISP)
  1286  TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) $(LISP)
  1287  	tags=; \
  1288 @@ -229,28 +207,39 @@
  1289  distdir: $(DISTFILES)
  1290  	@for file in $(DISTFILES); do \
  1291  	  if test -f $$file; then d=.; else d=$(srcdir); fi; \
  1292 -	  test -f $(distdir)/$$file \
  1293 -	  || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
  1294 -	  || cp -p $$d/$$file $(distdir)/$$file; \
  1295 +	  if test -d $$d/$$file; then \
  1296 +	    cp -pr $$d/$$file $(distdir)/$$file; \
  1297 +	  else \
  1298 +	    test -f $(distdir)/$$file \
  1299 +	    || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
  1300 +	    || cp -p $$d/$$file $(distdir)/$$file || :; \
  1301 +	  fi; \
  1302  	done
  1303 -info:
  1304 -dvi:
  1305 -check:
  1306 -installcheck:
  1307 -install-info:
  1308 -install-exec: 
  1309 -	@$(NORMAL_INSTALL)
  1311 -install-data: 
  1312 -	@$(NORMAL_INSTALL)
  1314 -install: install-exec install-data all
  1315 -	@:
  1317 -uninstall: 
  1319 +info-am:
  1320 +info: info-am
  1321 +dvi-am:
  1322 +dvi: dvi-am
  1323 +check-am:
  1324 +check: check-am
  1325 +installcheck-am:
  1326 +installcheck: installcheck-am
  1327 +install-info-am: 
  1328 +install-info: install-info-am
  1329 +install-exec-am:
  1330 +install-exec: install-exec-am
  1332 +install-data-am:
  1333 +install-data: install-data-am
  1335 +install-am: all-am
  1336 +	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
  1337 +install: install-am
  1338 +uninstall-am:
  1339 +uninstall: uninstall-am
  1340 +all-am: Makefile $(LIBRARIES)
  1341 +all-redirect: all-am
  1342  install-strip:
  1343 -	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
  1344 +	$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
  1345  installdirs:
  1348 @@ -264,29 +253,38 @@
  1349  	-rm -f config.cache config.log stamp-h stamp-h[0-9]*
  1351  maintainer-clean-generic:
  1352 -mostlyclean:  mostlyclean-noinstLIBRARIES mostlyclean-compile \
  1353 +mostlyclean-am:  mostlyclean-noinstLIBRARIES mostlyclean-compile \
  1354  		mostlyclean-tags mostlyclean-generic
  1356 -clean:  clean-noinstLIBRARIES clean-compile clean-tags clean-generic \
  1357 -		mostlyclean
  1358 +mostlyclean: mostlyclean-am
  1360 -distclean:  distclean-noinstLIBRARIES distclean-compile distclean-tags \
  1361 -		distclean-generic clean
  1362 -	-rm -f config.status
  1363 +clean-am:  clean-noinstLIBRARIES clean-compile clean-tags clean-generic \
  1364 +		mostlyclean-am
  1366 -maintainer-clean:  maintainer-clean-noinstLIBRARIES \
  1367 +clean: clean-am
  1369 +distclean-am:  distclean-noinstLIBRARIES distclean-compile \
  1370 +		distclean-tags distclean-generic clean-am
  1372 +distclean: distclean-am
  1374 +maintainer-clean-am:  maintainer-clean-noinstLIBRARIES \
  1375  		maintainer-clean-compile maintainer-clean-tags \
  1376 -		maintainer-clean-generic distclean
  1377 +		maintainer-clean-generic distclean-am
  1378  	@echo "This command is intended for maintainers to use;"
  1379  	@echo "it deletes files that may require special tools to rebuild."
  1381 +maintainer-clean: maintainer-clean-am
  1383  .PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \
  1384  clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
  1385  mostlyclean-compile distclean-compile clean-compile \
  1386  maintainer-clean-compile tags mostlyclean-tags distclean-tags \
  1387 -clean-tags maintainer-clean-tags distdir info dvi installcheck \
  1388 -install-info install-exec install-data install uninstall all \
  1389 -installdirs mostlyclean-generic distclean-generic clean-generic \
  1390 +clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \
  1391 +check-am installcheck-am installcheck install-info-am install-info \
  1392 +install-exec-am install-exec install-data-am install-data install-am \
  1393 +install uninstall-am uninstall all-redirect all-am all installdirs \
  1394 +mostlyclean-generic distclean-generic clean-generic \
  1395  maintainer-clean-generic clean mostlyclean distclean maintainer-clean
  1398 diff -urN newlib-1.8.2/newlib/libc/signal/Makefile.in newlib-1.8.2-dc/newlib/libc/signal/Makefile.in
  1399 --- newlib-1.8.2/newlib/libc/signal/Makefile.in	1998-12-01 08:03:46.000000000 +1000
  1400 +++ newlib-1.8.2-dc/newlib/libc/signal/Makefile.in	2006-07-06 18:28:31.000000000 +1000
  1401 @@ -1,6 +1,6 @@
  1402 -# Makefile.in generated automatically by automake 1.3b from Makefile.am
  1403 +# Makefile.in generated automatically by automake 1.4 from Makefile.am
  1405 -# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
  1406 +# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
  1407  # This Makefile.in is free software; the Free Software Foundation
  1408  # gives unlimited permission to copy and/or distribute it,
  1409  # with or without modifications, as long as this notice is preserved.
  1410 @@ -46,7 +46,7 @@
  1411  AUTOHEADER = @AUTOHEADER@
  1413  INSTALL = @INSTALL@
  1414 -INSTALL_PROGRAM = @INSTALL_PROGRAM@
  1415 +INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
  1416  INSTALL_DATA = @INSTALL_DATA@
  1417  INSTALL_SCRIPT = @INSTALL_SCRIPT@
  1418  transform = @program_transform_name@
  1419 @@ -78,7 +78,6 @@
  1420  PACKAGE = @PACKAGE@
  1421  RANLIB = @RANLIB@
  1422  VERSION = @VERSION@
  1423 -mach_add_objs = @mach_add_objs@
  1424  machine_dir = @machine_dir@
  1425  newlib_basedir = @newlib_basedir@
  1426  sys_dir = @sys_dir@
  1427 @@ -113,22 +112,22 @@
  1428  lib_a_OBJECTS =  raise.o signal.o
  1429  CFLAGS = @CFLAGS@
  1430  COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
  1431 -LINK = $(CC) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
  1432 +CCLD = $(CC)
  1433 +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
  1434  DIST_COMMON =  Makefile.am Makefile.in
  1437  DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
  1439  TAR = tar
  1440 -GZIP = --best
  1441 +GZIP_ENV = --best
  1442  SOURCES = $(lib_a_SOURCES)
  1443  OBJECTS = $(lib_a_OBJECTS)
  1445 -all: Makefile $(LIBRARIES)
  1447 +all: all-redirect
  1448  .SUFFIXES:
  1449  .SUFFIXES: .S .c .def .o .s
  1450 -$(srcdir)/Makefile.in: @MAINT@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
  1451 +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
  1452  	cd $(top_srcdir) && $(AUTOMAKE) --cygnus signal/Makefile
  1454  Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
  1455 @@ -172,8 +171,12 @@
  1456  tags: TAGS
  1458  ID: $(HEADERS) $(SOURCES) $(LISP)
  1459 +	list='$(SOURCES) $(HEADERS)'; \
  1460 +	unique=`for i in $$list; do echo $$i; done | \
  1461 +	  awk '    { files[$$0] = 1; } \
  1462 +	       END { for (i in files) print i; }'`; \
  1463  	here=`pwd` && cd $(srcdir) \
  1464 -	  && mkid -f$$here/ID $(SOURCES) $(HEADERS) $(LISP)
  1465 +	  && mkid -f$$here/ID $$unique $(LISP)
  1467  TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) $(LISP)
  1468  	tags=; \
  1469 @@ -201,28 +204,39 @@
  1470  distdir: $(DISTFILES)
  1471  	@for file in $(DISTFILES); do \
  1472  	  if test -f $$file; then d=.; else d=$(srcdir); fi; \
  1473 -	  test -f $(distdir)/$$file \
  1474 -	  || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
  1475 -	  || cp -p $$d/$$file $(distdir)/$$file; \
  1476 +	  if test -d $$d/$$file; then \
  1477 +	    cp -pr $$d/$$file $(distdir)/$$file; \
  1478 +	  else \
  1479 +	    test -f $(distdir)/$$file \
  1480 +	    || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
  1481 +	    || cp -p $$d/$$file $(distdir)/$$file || :; \
  1482 +	  fi; \
  1483  	done
  1484 -info:
  1485 -dvi:
  1486 -check:
  1487 -installcheck:
  1488 -install-info:
  1489 -install-exec: 
  1490 -	@$(NORMAL_INSTALL)
  1492 -install-data: 
  1493 -	@$(NORMAL_INSTALL)
  1495 -install: install-exec install-data all
  1496 -	@:
  1498 -uninstall: 
  1500 +info-am:
  1501 +info: info-am
  1502 +dvi-am:
  1503 +dvi: dvi-am
  1504 +check-am:
  1505 +check: check-am
  1506 +installcheck-am:
  1507 +installcheck: installcheck-am
  1508 +install-info-am: 
  1509 +install-info: install-info-am
  1510 +install-exec-am:
  1511 +install-exec: install-exec-am
  1513 +install-data-am:
  1514 +install-data: install-data-am
  1516 +install-am: all-am
  1517 +	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
  1518 +install: install-am
  1519 +uninstall-am:
  1520 +uninstall: uninstall-am
  1521 +all-am: Makefile $(LIBRARIES)
  1522 +all-redirect: all-am
  1523  install-strip:
  1524 -	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
  1525 +	$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
  1526  installdirs:
  1529 @@ -236,29 +250,38 @@
  1530  	-rm -f config.cache config.log stamp-h stamp-h[0-9]*
  1532  maintainer-clean-generic:
  1533 -mostlyclean:  mostlyclean-noinstLIBRARIES mostlyclean-compile \
  1534 +mostlyclean-am:  mostlyclean-noinstLIBRARIES mostlyclean-compile \
  1535  		mostlyclean-tags mostlyclean-generic
  1537 -clean:  clean-noinstLIBRARIES clean-compile clean-tags clean-generic \
  1538 -		mostlyclean
  1539 +mostlyclean: mostlyclean-am
  1541 +clean-am:  clean-noinstLIBRARIES clean-compile clean-tags clean-generic \
  1542 +		mostlyclean-am
  1544 -distclean:  distclean-noinstLIBRARIES distclean-compile distclean-tags \
  1545 -		distclean-generic clean
  1546 -	-rm -f config.status
  1547 +clean: clean-am
  1549 -maintainer-clean:  maintainer-clean-noinstLIBRARIES \
  1550 +distclean-am:  distclean-noinstLIBRARIES distclean-compile \
  1551 +		distclean-tags distclean-generic clean-am
  1553 +distclean: distclean-am
  1555 +maintainer-clean-am:  maintainer-clean-noinstLIBRARIES \
  1556  		maintainer-clean-compile maintainer-clean-tags \
  1557 -		maintainer-clean-generic distclean
  1558 +		maintainer-clean-generic distclean-am
  1559  	@echo "This command is intended for maintainers to use;"
  1560  	@echo "it deletes files that may require special tools to rebuild."
  1562 +maintainer-clean: maintainer-clean-am
  1564  .PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \
  1565  clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
  1566  mostlyclean-compile distclean-compile clean-compile \
  1567  maintainer-clean-compile tags mostlyclean-tags distclean-tags \
  1568 -clean-tags maintainer-clean-tags distdir info dvi installcheck \
  1569 -install-info install-exec install-data install uninstall all \
  1570 -installdirs mostlyclean-generic distclean-generic clean-generic \
  1571 +clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \
  1572 +check-am installcheck-am installcheck install-info-am install-info \
  1573 +install-exec-am install-exec install-data-am install-data install-am \
  1574 +install uninstall-am uninstall all-redirect all-am all installdirs \
  1575 +mostlyclean-generic distclean-generic clean-generic \
  1576  maintainer-clean-generic clean mostlyclean distclean maintainer-clean
  1579 diff -urN newlib-1.8.2/newlib/libc/signal/signal.c newlib-1.8.2-dc/newlib/libc/signal/signal.c
  1580 --- newlib-1.8.2/newlib/libc/signal/signal.c	1998-03-11 06:09:23.000000000 +1000
  1581 +++ newlib-1.8.2-dc/newlib/libc/signal/signal.c	2006-07-06 18:28:31.000000000 +1000
  1582 @@ -180,13 +180,13 @@
  1584    switch ((_POINTER_INT) ptr->_sig_func[sig])
  1586 -    case SIG_DFL:
  1587 +    case (_POINTER_INT) SIG_DFL:
  1588        return _kill_r (ptr, _getpid_r (ptr), sig);
  1590 -    case SIG_IGN:
  1591 +    case (_POINTER_INT) SIG_IGN:
  1592        break;
  1594 -    case SIG_ERR:
  1595 +    case (_POINTER_INT) SIG_ERR:
  1596        ptr->_errno = EINVAL;
  1597        result = 1;
  1598        break;
  1599 @@ -218,13 +218,13 @@
  1601    switch ((_POINTER_INT) ptr->_sig_func[sig])
  1603 -    case SIG_DFL:
  1604 +    case (_POINTER_INT) SIG_DFL:
  1605        return 1;
  1607 -    case SIG_ERR:
  1608 +    case (_POINTER_INT) SIG_ERR:
  1609        return 2;
  1611 -    case SIG_IGN:
  1612 +    case (_POINTER_INT) SIG_IGN:
  1613        return 3;
  1615      default:
  1616 diff -urN newlib-1.8.2/newlib/libc/stdio/Makefile.in newlib-1.8.2-dc/newlib/libc/stdio/Makefile.in
  1617 --- newlib-1.8.2/newlib/libc/stdio/Makefile.in	1999-07-07 00:52:14.000000000 +1000
  1618 +++ newlib-1.8.2-dc/newlib/libc/stdio/Makefile.in	2006-07-06 18:28:31.000000000 +1000
  1619 @@ -88,112 +88,12 @@
  1621  noinst_LIBRARIES = lib.a
  1623 -lib_a_SOURCES = \
  1624 -	clearerr.c 			\
  1625 -	fclose.c 			\
  1626 -	fdopen.c 			\
  1627 -	feof.c 				\
  1628 -	ferror.c 			\
  1629 -	fflush.c 			\
  1630 -	fgetc.c 			\
  1631 -	fgetpos.c 			\
  1632 -	fgets.c 			\
  1633 -	fileno.c			\
  1634 -	findfp.c 			\
  1635 -	fiprintf.c 			\
  1636 -	flags.c 			\
  1637 -	fopen.c 			\
  1638 -	fprintf.c 			\
  1639 -	fputc.c 			\
  1640 -	fputs.c 			\
  1641 -	fread.c 			\
  1642 -	freopen.c 			\
  1643 -	fscanf.c 			\
  1644 -	fseek.c 			\
  1645 -	fsetpos.c 			\
  1646 -	ftell.c 			\
  1647 -	fvwrite.c 			\
  1648 -	fwalk.c 			\
  1649 -	fwrite.c 			\
  1650 -	getc.c 				\
  1651 -	getchar.c 			\
  1652 -	gets.c 				\
  1653 -	iprintf.c 			\
  1654 -	makebuf.c			\
  1655 -	mktemp.c 			\
  1656 -	perror.c 			\
  1657 -	printf.c 			\
  1658 -	putc.c 				\
  1659 -	putchar.c 			\
  1660 -	puts.c 				\
  1661 -	refill.c 			\
  1662 -	remove.c 			\
  1663 -	rename.c 			\
  1664 -	rewind.c 			\
  1665 -	rget.c 				\
  1666 -	scanf.c 			\
  1667 -	setbuf.c 			\
  1668 -	setvbuf.c 			\
  1669 -	siprintf.c 			\
  1670 -	snprintf.c			\
  1671 -	sprintf.c 			\
  1672 -	sscanf.c 			\
  1673 -	stdio.c 			\
  1674 -	tmpfile.c 			\
  1675 -	tmpnam.c 			\
  1676 -	ungetc.c 			\
  1677 -	vfprintf.c 			\
  1678 -	vfscanf.c 			\
  1679 -	vprintf.c 			\
  1680 -	vsnprintf.c			\
  1681 -	vsprintf.c 			\
  1682 -	wbuf.c 				\
  1683 -	wsetup.c 
  1684 +lib_a_SOURCES =  	clearerr.c 				fclose.c 				fdopen.c 				feof.c 					ferror.c 				fflush.c 				fgetc.c 				fgetpos.c 				fgets.c 				fileno.c				findfp.c 				fiprintf.c 				flags.c 				fopen.c 				fprintf.c 				fputc.c 				fputs.c 				fread.c 				freopen.c 				fscanf.c 				fseek.c 				fsetpos.c 				ftell.c 				fvwrite.c 				fwalk.c 				fwrite.c 				getc.c 					getchar.c 				gets.c 					iprintf.c 				makebuf.c				mktemp.c 				perror.c 				printf.c 				putc.c 					putchar.c 				puts.c 					refill.c 				remove.c 				rename.c 				rewind.c 				rget.c 					scanf.c 				setbuf.c 				setvbuf.c 				siprintf.c 				snprintf.c				sprintf.c 				sscanf.c 				stdio.c 				tmpfile.c 				tmpnam.c 				ungetc.c 				vfprintf.c 				vfscanf.c 				vprintf.c 				vsnprintf.c				vsprintf.c 				wbuf.c 					wsetup.c 
  1687  lib_a_LIBADD = vfiprintf.o
  1689 -CHEWOUT_FILES = \
  1690 -	clearerr.def		\
  1691 -	fclose.def		\
  1692 -	fdopen.def		\
  1693 -	feof.def		\
  1694 -	ferror.def		\
  1695 -	fflush.def		\
  1696 -	fgetc.def		\
  1697 -	fgetpos.def		\
  1698 -	fgets.def		\
  1699 -	fileno.def		\
  1700 -	fiprintf.def		\
  1701 -	fopen.def		\
  1702 -	fputc.def		\
  1703 -	fputs.def		\
  1704 -	fread.def		\
  1705 -	freopen.def		\
  1706 -	fseek.def		\
  1707 -	fsetpos.def		\
  1708 -	ftell.def		\
  1709 -	fwrite.def		\
  1710 -	getc.def		\
  1711 -	getchar.def		\
  1712 -	gets.def		\
  1713 -	iprintf.def		\
  1714 -	mktemp.def		\
  1715 -	perror.def		\
  1716 -	putc.def		\
  1717 -	putchar.def		\
  1718 -	puts.def		\
  1719 -	remove.def		\
  1720 -	rename.def		\
  1721 -	rewind.def		\
  1722 -	setbuf.def		\
  1723 -	setvbuf.def		\
  1724 -	siprintf.def		\
  1725 -	sprintf.def		\
  1726 -	sscanf.def		\
  1727 -	tmpfile.def		\
  1728 -	tmpnam.def		\
  1729 -	vfprintf.def
  1730 +CHEWOUT_FILES =  	clearerr.def			fclose.def			fdopen.def			feof.def			ferror.def			fflush.def			fgetc.def			fgetpos.def			fgets.def			fileno.def			fiprintf.def			fopen.def			fputc.def			fputs.def			fread.def			freopen.def			fseek.def			fsetpos.def			ftell.def			fwrite.def			getc.def			getchar.def			gets.def			iprintf.def			mktemp.def			perror.def			putc.def			putchar.def			puts.def			remove.def			rename.def			rewind.def			setbuf.def			setvbuf.def			siprintf.def			sprintf.def			sscanf.def			tmpfile.def			tmpnam.def			vfprintf.def
  1733  SUFFIXES = .def
  1734 @@ -316,7 +216,7 @@
  1735  	@for file in $(DISTFILES); do \
  1736  	  if test -f $$file; then d=.; else d=$(srcdir); fi; \
  1737  	  if test -d $$d/$$file; then \
  1738 -	    cp -pr $$/$$file $(distdir)/$$file; \
  1739 +	    cp -pr $$d/$$file $(distdir)/$$file; \
  1740  	  else \
  1741  	    test -f $(distdir)/$$file \
  1742  	    || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
  1743 diff -urN newlib-1.8.2/newlib/libc/stdlib/Makefile.in newlib-1.8.2-dc/newlib/libc/stdlib/Makefile.in
  1744 --- newlib-1.8.2/newlib/libc/stdlib/Makefile.in	1999-05-29 07:23:57.000000000 +1000
  1745 +++ newlib-1.8.2-dc/newlib/libc/stdlib/Makefile.in	2006-07-06 18:28:31.000000000 +1000
  1746 @@ -1,6 +1,6 @@
  1747 -# Makefile.in generated automatically by automake 1.3b from Makefile.am
  1748 +# Makefile.in generated automatically by automake 1.4 from Makefile.am
  1750 -# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
  1751 +# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
  1752  # This Makefile.in is free software; the Free Software Foundation
  1753  # gives unlimited permission to copy and/or distribute it,
  1754  # with or without modifications, as long as this notice is preserved.
  1755 @@ -46,7 +46,7 @@
  1756  AUTOHEADER = @AUTOHEADER@
  1758  INSTALL = @INSTALL@
  1759 -INSTALL_PROGRAM = @INSTALL_PROGRAM@
  1760 +INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
  1761  INSTALL_DATA = @INSTALL_DATA@
  1762  INSTALL_SCRIPT = @INSTALL_SCRIPT@
  1763  transform = @program_transform_name@
  1764 @@ -78,7 +78,6 @@
  1765  PACKAGE = @PACKAGE@
  1766  RANLIB = @RANLIB@
  1767  VERSION = @VERSION@
  1768 -mach_add_objs = @mach_add_objs@
  1769  machine_dir = @machine_dir@
  1770  newlib_basedir = @newlib_basedir@
  1771  sys_dir = @sys_dir@
  1772 @@ -89,102 +88,16 @@
  1774  noinst_LIBRARIES = lib.a
  1776 -lib_a_SOURCES = \
  1777 -	__adjust.c 	\
  1778 -	__exp10.c 	\
  1779 -	__ten_mu.c 	\
  1780 -	abort.c  	\
  1781 -	abs.c 		\
  1782 -	assert.c  	\
  1783 -	atexit.c	\
  1784 -	atof.c 		\
  1785 -	atoff.c		\
  1786 -	atoi.c  	\
  1787 -	atol.c		\
  1788 -	bsearch.c	\
  1789 -	calloc.c	\
  1790 -	div.c  		\
  1791 -	dtoa.c 		\
  1792 -	dtoastub.c 	\
  1793 -	ecvtbuf.c 	\
  1794 -	efgcvt.c 	\
  1795 -	environ.c	\
  1796 -	envlock.c	\
  1797 -	eprintf.c	\
  1798 -	exit.c 		\
  1799 -	getenv.c  	\
  1800 -	getenv_r.c	\
  1801 -	getopt.c	\
  1802 -	labs.c 		\
  1803 -	ldiv.c  	\
  1804 -	malign.c	\
  1805 -	malloc.c  	\
  1806 -	mblen.c		\
  1807 -	mblen_r.c	\
  1808 -	mbstowcs.c	\
  1809 -	mbstowcs_r.c	\
  1810 -	mbtowc.c	\
  1811 -	mbtowc_r.c	\
  1812 -	mlock.c		\
  1813 -	mprec.c		\
  1814 -	msize.c		\
  1815 -	mstats.c	\
  1816 -	mtrim.c		\
  1817 -	putenv.c	\
  1818 -	qsort.c		\
  1819 -	rand.c		\
  1820 -	rand_r.c	\
  1821 -	realloc.c	\
  1822 -	setenv.c	\
  1823 -	setenv_r.c	\
  1824 -	strdup.c	\
  1825 -	strtod.c	\
  1826 -	strtol.c	\
  1827 -	strtoul.c	\
  1828 -	system.c	\
  1829 -	valloc.c	\
  1830 -	wcstombs.c	\
  1831 -	wcstombs_r.c	\
  1832 -	wctomb.c	\
  1833 -	wctomb_r.c
  1834 +lib_a_SOURCES =  	__adjust.c 		__exp10.c 		__ten_mu.c 		abort.c  		abs.c 			assert.c  		atexit.c		atof.c 			atoff.c			atoi.c  		atol.c			bsearch.c		calloc.c		div.c  			dtoa.c 			dtoastub.c 		ecvtbuf.c 		efgcvt.c 		environ.c		envlock.c		eprintf.c		exit.c 			getenv.c  		getenv_r.c		getopt.c		labs.c 			ldiv.c  		malign.c		malloc.c  		mblen.c			mblen_r.c		mbstowcs.c		mbstowcs_r.c		mbtowc.c		mbtowc_r.c		mlock.c			mprec.c			msize.c			mstats.c		mtrim.c			putenv.c		qsort.c			rand.c			rand_r.c		realloc.c		setenv.c		setenv_r.c		strdup.c		strtod.c		strtol.c		strtoul.c		system.c		valloc.c		wcstombs.c		wcstombs_r.c		wctomb.c		wctomb_r.c
  1837 +lib_a_LIBADD = mallocr.o freer.o reallocr.o callocr.o cfreer.o malignr.o 	vallocr.o pvallocr.o mallinfor.o mallstatsr.o msizer.o malloptr.o
  1839 -lib_a_LIBADD = mallocr.o freer.o reallocr.o callocr.o cfreer.o malignr.o \
  1840 -	vallocr.o pvallocr.o mallinfor.o mallstatsr.o msizer.o malloptr.o
  1842  MALLOC_COMPILE = $(COMPILE) -DINTERNAL_NEWLIB
  1844 -CHEWOUT_FILES= \
  1845 -	abort.def	\
  1846 -	abs.def		\
  1847 -	assert.def	\
  1848 -	atexit.def	\
  1849 -	atof.def 	\
  1850 -	ecvtbuf.def	\
  1851 -	atoi.def 	\
  1852 -	bsearch.def	\
  1853 -	calloc.def	\
  1854 -	div.def		\
  1855 -	efgcvt.def 	\
  1856 -	envlock.def	\
  1857 -	exit.def	\
  1858 -	getenv.def	\
  1859 -	labs.def	\
  1860 -	ldiv.def	\
  1861 -	malloc.def	\
  1862 -	mallocr.def	\
  1863 -	mblen.def	\
  1864 -	mbstowcs.def	\
  1865 -	mbtowc.def	\
  1866 -	mlock.def	\
  1867 -	mstats.def	\
  1868 -	qsort.def	\
  1869 -	rand.def	\
  1870 -	strtod.def 	\
  1871 -	strtol.def 	\
  1872 -	strtoul.def 	\
  1873 -	system.def	\
  1874 -	wcstombs.def	\
  1875 -	wctomb.def	
  1876 +CHEWOUT_FILES =  	abort.def		abs.def			assert.def		atexit.def		atof.def 		ecvtbuf.def		atoi.def 		bsearch.def		calloc.def		div.def			efgcvt.def 		envlock.def		exit.def		getenv.def		labs.def		ldiv.def		malloc.def		mallocr.def		mblen.def		mbstowcs.def		mbtowc.def		mlock.def		mstats.def		qsort.def		rand.def		strtod.def 		strtol.def 		strtoul.def 		system.def		wcstombs.def		wctomb.def	
  1879  SUFFIXES = .def
  1881 @@ -207,30 +120,30 @@
  1882  malloptr.o
  1883  lib_a_OBJECTS =  __adjust.o __exp10.o __ten_mu.o abort.o abs.o assert.o \
  1884  atexit.o atof.o atoff.o atoi.o atol.o bsearch.o calloc.o div.o dtoa.o \
  1885 -dtoastub.o ecvtbuf.o efgcvt.o environ.o envlock.o eprintf.o exit.o getenv.o getenv_r.o \
  1886 -getopt.o labs.o ldiv.o malign.o malloc.o mblen.o mblen_r.o mbstowcs.o \
  1887 -mbstowcs_r.o mbtowc.o mbtowc_r.o mlock.o mprec.o msize.o mstats.o \
  1888 -mtrim.o putenv.o qsort.o rand.o rand_r.o realloc.o setenv.o setenv_r.o strdup.o \
  1889 -strtod.o strtol.o strtoul.o system.o valloc.o wcstombs.o wcstombs_r.o \
  1890 -wctomb.o wctomb_r.o
  1891 +dtoastub.o ecvtbuf.o efgcvt.o environ.o envlock.o eprintf.o exit.o \
  1892 +getenv.o getenv_r.o getopt.o labs.o ldiv.o malign.o malloc.o mblen.o \
  1893 +mblen_r.o mbstowcs.o mbstowcs_r.o mbtowc.o mbtowc_r.o mlock.o mprec.o \
  1894 +msize.o mstats.o mtrim.o putenv.o qsort.o rand.o rand_r.o realloc.o \
  1895 +setenv.o setenv_r.o strdup.o strtod.o strtol.o strtoul.o system.o \
  1896 +valloc.o wcstombs.o wcstombs_r.o wctomb.o wctomb_r.o
  1897  CFLAGS = @CFLAGS@
  1898  COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
  1899 -LINK = $(CC) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
  1900 +CCLD = $(CC)
  1901 +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
  1902  DIST_COMMON =  Makefile.am Makefile.in
  1905  DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
  1907  TAR = tar
  1908 -GZIP = --best
  1909 +GZIP_ENV = --best
  1910  SOURCES = $(lib_a_SOURCES)
  1911  OBJECTS = $(lib_a_OBJECTS)
  1913 -all: Makefile $(LIBRARIES)
  1915 +all: all-redirect
  1916  .SUFFIXES:
  1917  .SUFFIXES: .S .c .def .o .s
  1918 -$(srcdir)/Makefile.in: @MAINT@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
  1919 +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
  1920  	cd $(top_srcdir) && $(AUTOMAKE) --cygnus stdlib/Makefile
  1922  Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
  1923 @@ -274,8 +187,12 @@
  1924  tags: TAGS
  1926  ID: $(HEADERS) $(SOURCES) $(LISP)
  1927 +	list='$(SOURCES) $(HEADERS)'; \
  1928 +	unique=`for i in $$list; do echo $$i; done | \
  1929 +	  awk '    { files[$$0] = 1; } \
  1930 +	       END { for (i in files) print i; }'`; \
  1931  	here=`pwd` && cd $(srcdir) \
  1932 -	  && mkid -f$$here/ID $(SOURCES) $(HEADERS) $(LISP)
  1933 +	  && mkid -f$$here/ID $$unique $(LISP)
  1935  TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) $(LISP)
  1936  	tags=; \
  1937 @@ -303,28 +220,39 @@
  1938  distdir: $(DISTFILES)
  1939  	@for file in $(DISTFILES); do \
  1940  	  if test -f $$file; then d=.; else d=$(srcdir); fi; \
  1941 -	  test -f $(distdir)/$$file \
  1942 -	  || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
  1943 -	  || cp -p $$d/$$file $(distdir)/$$file; \
  1944 +	  if test -d $$d/$$file; then \
  1945 +	    cp -pr $$d/$$file $(distdir)/$$file; \
  1946 +	  else \
  1947 +	    test -f $(distdir)/$$file \
  1948 +	    || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
  1949 +	    || cp -p $$d/$$file $(distdir)/$$file || :; \
  1950 +	  fi; \
  1951  	done
  1952 -info:
  1953 -dvi:
  1954 -check:
  1955 -installcheck:
  1956 -install-info:
  1957 -install-exec: 
  1958 -	@$(NORMAL_INSTALL)
  1960 -install-data: 
  1961 -	@$(NORMAL_INSTALL)
  1963 -install: install-exec install-data all
  1964 -	@:
  1966 -uninstall: 
  1968 +info-am:
  1969 +info: info-am
  1970 +dvi-am:
  1971 +dvi: dvi-am
  1972 +check-am:
  1973 +check: check-am
  1974 +installcheck-am:
  1975 +installcheck: installcheck-am
  1976 +install-info-am: 
  1977 +install-info: install-info-am
  1978 +install-exec-am:
  1979 +install-exec: install-exec-am
  1981 +install-data-am:
  1982 +install-data: install-data-am
  1984 +install-am: all-am
  1985 +	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
  1986 +install: install-am
  1987 +uninstall-am:
  1988 +uninstall: uninstall-am
  1989 +all-am: Makefile $(LIBRARIES)
  1990 +all-redirect: all-am
  1991  install-strip:
  1992 -	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
  1993 +	$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
  1994  installdirs:
  1997 @@ -338,29 +266,38 @@
  1998  	-rm -f config.cache config.log stamp-h stamp-h[0-9]*
  2000  maintainer-clean-generic:
  2001 -mostlyclean:  mostlyclean-noinstLIBRARIES mostlyclean-compile \
  2002 +mostlyclean-am:  mostlyclean-noinstLIBRARIES mostlyclean-compile \
  2003  		mostlyclean-tags mostlyclean-generic
  2005 -clean:  clean-noinstLIBRARIES clean-compile clean-tags clean-generic \
  2006 -		mostlyclean
  2007 +mostlyclean: mostlyclean-am
  2009 -distclean:  distclean-noinstLIBRARIES distclean-compile distclean-tags \
  2010 -		distclean-generic clean
  2011 -	-rm -f config.status
  2012 +clean-am:  clean-noinstLIBRARIES clean-compile clean-tags clean-generic \
  2013 +		mostlyclean-am
  2015 -maintainer-clean:  maintainer-clean-noinstLIBRARIES \
  2016 +clean: clean-am
  2018 +distclean-am:  distclean-noinstLIBRARIES distclean-compile \
  2019 +		distclean-tags distclean-generic clean-am
  2021 +distclean: distclean-am
  2023 +maintainer-clean-am:  maintainer-clean-noinstLIBRARIES \
  2024  		maintainer-clean-compile maintainer-clean-tags \
  2025 -		maintainer-clean-generic distclean
  2026 +		maintainer-clean-generic distclean-am
  2027  	@echo "This command is intended for maintainers to use;"
  2028  	@echo "it deletes files that may require special tools to rebuild."
  2030 +maintainer-clean: maintainer-clean-am
  2032  .PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \
  2033  clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
  2034  mostlyclean-compile distclean-compile clean-compile \
  2035  maintainer-clean-compile tags mostlyclean-tags distclean-tags \
  2036 -clean-tags maintainer-clean-tags distdir info dvi installcheck \
  2037 -install-info install-exec install-data install uninstall all \
  2038 -installdirs mostlyclean-generic distclean-generic clean-generic \
  2039 +clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \
  2040 +check-am installcheck-am installcheck install-info-am install-info \
  2041 +install-exec-am install-exec install-data-am install-data install-am \
  2042 +install uninstall-am uninstall all-redirect all-am all installdirs \
  2043 +mostlyclean-generic distclean-generic clean-generic \
  2044  maintainer-clean-generic clean mostlyclean distclean maintainer-clean
  2047 diff -urN newlib-1.8.2/newlib/libc/string/Makefile.in newlib-1.8.2-dc/newlib/libc/string/Makefile.in
  2048 --- newlib-1.8.2/newlib/libc/string/Makefile.in	1998-12-01 08:03:47.000000000 +1000
  2049 +++ newlib-1.8.2-dc/newlib/libc/string/Makefile.in	2006-07-06 18:28:31.000000000 +1000
  2050 @@ -1,6 +1,6 @@
  2051 -# Makefile.in generated automatically by automake 1.3b from Makefile.am
  2052 +# Makefile.in generated automatically by automake 1.4 from Makefile.am
  2054 -# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
  2055 +# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
  2056  # This Makefile.in is free software; the Free Software Foundation
  2057  # gives unlimited permission to copy and/or distribute it,
  2058  # with or without modifications, as long as this notice is preserved.
  2059 @@ -46,7 +46,7 @@
  2060  AUTOHEADER = @AUTOHEADER@
  2062  INSTALL = @INSTALL@
  2063 -INSTALL_PROGRAM = @INSTALL_PROGRAM@
  2064 +INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
  2065  INSTALL_DATA = @INSTALL_DATA@
  2066  INSTALL_SCRIPT = @INSTALL_SCRIPT@
  2067  transform = @program_transform_name@
  2068 @@ -78,7 +78,6 @@
  2069  PACKAGE = @PACKAGE@
  2070  RANLIB = @RANLIB@
  2071  VERSION = @VERSION@
  2072 -mach_add_objs = @mach_add_objs@
  2073  machine_dir = @machine_dir@
  2074  newlib_basedir = @newlib_basedir@
  2075  sys_dir = @sys_dir@
  2076 @@ -89,49 +88,11 @@
  2078  noinst_LIBRARIES = lib.a
  2080 -lib_a_SOURCES = \
  2081 -	bcmp.c \
  2082 -	bcopy.c \
  2083 -	bzero.c \
  2084 -	index.c \
  2085 -	memchr.c \
  2086 -	memcmp.c \
  2087 -	memcpy.c \
  2088 -	memmove.c \
  2089 -	memset.c \
  2090 -	rindex.c \
  2091 -	strcat.c \
  2092 -	strchr.c \
  2093 -	strcmp.c \
  2094 -	strcasecmp.c \
  2095 -	strcoll.c \
  2096 -	strcpy.c \
  2097 -	strcspn.c \
  2098 -	strerror.c \
  2099 -	strlen.c  \
  2100 -	strlwr.c \
  2101 -	strncat.c \
  2102 -	strncmp.c \
  2103 -	strncasecmp.c \
  2104 -	strncpy.c \
  2105 -	strpbrk.c \
  2106 -	strrchr.c \
  2107 -	strspn.c \
  2108 -	strtok.c \
  2109 -	strtok_r.c \
  2110 -	strupr.c \
  2111 -	strxfrm.c  \
  2112 -	strstr.c \
  2113 -	u_strerr.c
  2115 -CHEWOUT_FILES=\
  2116 -bcmp.def	memcpy.def	strcmp.def	strncat.def strstr.def \
  2117 -bcopy.def	memmove.def	strcoll.def	strncmp.def strtok.def \
  2118 -bzero.def	memset.def	strcpy.def	strncpy.def strxfrm.def \
  2119 -index.def	rindex.def	strcspn.def	strpbrk.def \
  2120 -memchr.def	strcat.def	strerror.def	strrchr.def \
  2121 -memcmp.def	strchr.def	strlen.def	strspn.def \
  2122 -strcasecmp.def	strncasecmp.def strlwr.def	strupr.def
  2123 +lib_a_SOURCES =  	bcmp.c 	bcopy.c 	bzero.c 	index.c 	memchr.c 	memcmp.c 	memcpy.c 	memmove.c 	memset.c 	rindex.c 	strcat.c 	strchr.c 	strcmp.c 	strcasecmp.c 	strcoll.c 	strcpy.c 	strcspn.c 	strerror.c 	strlen.c  	strlwr.c 	strncat.c 	strncmp.c 	strncasecmp.c 	strncpy.c 	strpbrk.c 	strrchr.c 	strspn.c 	strtok.c 	strtok_r.c 	strupr.c 	strxfrm.c  	strstr.c 	u_strerr.c
  2126 +CHEWOUT_FILES =  bcmp.def	memcpy.def	strcmp.def	strncat.def strstr.def bcopy.def	memmove.def	strcoll.def	strncmp.def strtok.def bzero.def	memset.def	strcpy.def	strncpy.def strxfrm.def index.def	rindex.def	strcspn.def	strpbrk.def memchr.def	strcat.def	strerror.def	strrchr.def memcmp.def	strchr.def	strlen.def	strspn.def strcasecmp.def	strncasecmp.def strlwr.def	strupr.def
  2129  SUFFIXES = .def
  2131 @@ -157,22 +118,22 @@
  2132  strspn.o strtok.o strtok_r.o strupr.o strxfrm.o strstr.o u_strerr.o
  2133  CFLAGS = @CFLAGS@
  2134  COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
  2135 -LINK = $(CC) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
  2136 +CCLD = $(CC)
  2137 +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
  2138  DIST_COMMON =  Makefile.am Makefile.in
  2141  DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
  2143  TAR = tar
  2144 -GZIP = --best
  2145 +GZIP_ENV = --best
  2146  SOURCES = $(lib_a_SOURCES)
  2147  OBJECTS = $(lib_a_OBJECTS)
  2149 -all: Makefile $(LIBRARIES)
  2151 +all: all-redirect
  2152  .SUFFIXES:
  2153  .SUFFIXES: .S .c .def .o .s
  2154 -$(srcdir)/Makefile.in: @MAINT@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
  2155 +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
  2156  	cd $(top_srcdir) && $(AUTOMAKE) --cygnus string/Makefile
  2158  Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
  2159 @@ -216,8 +177,12 @@
  2160  tags: TAGS
  2162  ID: $(HEADERS) $(SOURCES) $(LISP)
  2163 +	list='$(SOURCES) $(HEADERS)'; \
  2164 +	unique=`for i in $$list; do echo $$i; done | \
  2165 +	  awk '    { files[$$0] = 1; } \
  2166 +	       END { for (i in files) print i; }'`; \
  2167  	here=`pwd` && cd $(srcdir) \
  2168 -	  && mkid -f$$here/ID $(SOURCES) $(HEADERS) $(LISP)
  2169 +	  && mkid -f$$here/ID $$unique $(LISP)
  2171  TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) $(LISP)
  2172  	tags=; \
  2173 @@ -245,28 +210,39 @@
  2174  distdir: $(DISTFILES)
  2175  	@for file in $(DISTFILES); do \
  2176  	  if test -f $$file; then d=.; else d=$(srcdir); fi; \
  2177 -	  test -f $(distdir)/$$file \
  2178 -	  || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
  2179 -	  || cp -p $$d/$$file $(distdir)/$$file; \
  2180 +	  if test -d $$d/$$file; then \
  2181 +	    cp -pr $$d/$$file $(distdir)/$$file; \
  2182 +	  else \
  2183 +	    test -f $(distdir)/$$file \
  2184 +	    || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
  2185 +	    || cp -p $$d/$$file $(distdir)/$$file || :; \
  2186 +	  fi; \
  2187  	done
  2188 -info:
  2189 -dvi:
  2190 -check:
  2191 -installcheck:
  2192 -install-info:
  2193 -install-exec: 
  2194 -	@$(NORMAL_INSTALL)
  2196 -install-data: 
  2197 -	@$(NORMAL_INSTALL)
  2199 -install: install-exec install-data all
  2200 -	@:
  2202 -uninstall: 
  2204 +info-am:
  2205 +info: info-am
  2206 +dvi-am:
  2207 +dvi: dvi-am
  2208 +check-am:
  2209 +check: check-am
  2210 +installcheck-am:
  2211 +installcheck: installcheck-am
  2212 +install-info-am: 
  2213 +install-info: install-info-am
  2214 +install-exec-am:
  2215 +install-exec: install-exec-am
  2217 +install-data-am:
  2218 +install-data: install-data-am
  2220 +install-am: all-am
  2221 +	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
  2222 +install: install-am
  2223 +uninstall-am:
  2224 +uninstall: uninstall-am
  2225 +all-am: Makefile $(LIBRARIES)
  2226 +all-redirect: all-am
  2227  install-strip:
  2228 -	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
  2229 +	$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
  2230  installdirs:
  2233 @@ -280,29 +256,38 @@
  2234  	-rm -f config.cache config.log stamp-h stamp-h[0-9]*
  2236  maintainer-clean-generic:
  2237 -mostlyclean:  mostlyclean-noinstLIBRARIES mostlyclean-compile \
  2238 +mostlyclean-am:  mostlyclean-noinstLIBRARIES mostlyclean-compile \
  2239  		mostlyclean-tags mostlyclean-generic
  2241 -clean:  clean-noinstLIBRARIES clean-compile clean-tags clean-generic \
  2242 -		mostlyclean
  2243 +mostlyclean: mostlyclean-am
  2245 -distclean:  distclean-noinstLIBRARIES distclean-compile distclean-tags \
  2246 -		distclean-generic clean
  2247 -	-rm -f config.status
  2248 +clean-am:  clean-noinstLIBRARIES clean-compile clean-tags clean-generic \
  2249 +		mostlyclean-am
  2251 -maintainer-clean:  maintainer-clean-noinstLIBRARIES \
  2252 +clean: clean-am
  2254 +distclean-am:  distclean-noinstLIBRARIES distclean-compile \
  2255 +		distclean-tags distclean-generic clean-am
  2257 +distclean: distclean-am
  2259 +maintainer-clean-am:  maintainer-clean-noinstLIBRARIES \
  2260  		maintainer-clean-compile maintainer-clean-tags \
  2261 -		maintainer-clean-generic distclean
  2262 +		maintainer-clean-generic distclean-am
  2263  	@echo "This command is intended for maintainers to use;"
  2264  	@echo "it deletes files that may require special tools to rebuild."
  2266 +maintainer-clean: maintainer-clean-am
  2268  .PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \
  2269  clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
  2270  mostlyclean-compile distclean-compile clean-compile \
  2271  maintainer-clean-compile tags mostlyclean-tags distclean-tags \
  2272 -clean-tags maintainer-clean-tags distdir info dvi installcheck \
  2273 -install-info install-exec install-data install uninstall all \
  2274 -installdirs mostlyclean-generic distclean-generic clean-generic \
  2275 +clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \
  2276 +check-am installcheck-am installcheck install-info-am install-info \
  2277 +install-exec-am install-exec install-data-am install-data install-am \
  2278 +install uninstall-am uninstall all-redirect all-am all installdirs \
  2279 +mostlyclean-generic distclean-generic clean-generic \
  2280  maintainer-clean-generic clean mostlyclean distclean maintainer-clean
  2283 diff -urN newlib-1.8.2/newlib/libc/sys/configure newlib-1.8.2-dc/newlib/libc/sys/configure
  2284 --- newlib-1.8.2/newlib/libc/sys/configure	1999-06-04 07:34:55.000000000 +1000
  2285 +++ newlib-1.8.2-dc/newlib/libc/sys/configure	2006-07-06 18:28:31.000000000 +1000
  2286 @@ -1342,7 +1342,7 @@
  2287    if { (eval echo configure:1343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  2288      for file in conftest.*; do
  2289        case $file in
  2290 -      *.c | *.o | *.obj | *.ilk | *.pdb) ;;
  2291 +      *.c | *.o | *.obj) ;;
  2292        *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
  2293        esac
  2294      done
  2295 diff -urN newlib-1.8.2/newlib/libc/sys/dreamcast/absolute_vfs.c newlib-1.8.2-dc/newlib/libc/sys/dreamcast/absolute_vfs.c
  2296 --- newlib-1.8.2/newlib/libc/sys/dreamcast/absolute_vfs.c	1970-01-01 10:00:00.000000000 +1000
  2297 +++ newlib-1.8.2-dc/newlib/libc/sys/dreamcast/absolute_vfs.c	2006-07-06 18:28:31.000000000 +1000
  2298 @@ -0,0 +1,11 @@
  2299 +#include "vfs.h"
  2301 +int _newlib_vfs_is_absolute (void)
  2302 +{
  2303 +  return 0;
  2304 +}
  2306 +void _newlib_vfs_absolute_load (void)
  2307 +{
  2308 +  _newlib_vfs_initialized = VFS_LOADER_ABSOLUTE;
  2309 +}
  2310 diff -urN newlib-1.8.2/newlib/libc/sys/dreamcast/aclocal.m4 newlib-1.8.2-dc/newlib/libc/sys/dreamcast/aclocal.m4
  2311 --- newlib-1.8.2/newlib/libc/sys/dreamcast/aclocal.m4	1970-01-01 10:00:00.000000000 +1000
  2312 +++ newlib-1.8.2-dc/newlib/libc/sys/dreamcast/aclocal.m4	2006-07-06 18:28:31.000000000 +1000
  2313 @@ -0,0 +1,345 @@
  2314 +dnl aclocal.m4 generated automatically by aclocal 1.3b
  2316 +dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
  2317 +dnl This file is free software; the Free Software Foundation
  2318 +dnl gives unlimited permission to copy and/or distribute it,
  2319 +dnl with or without modifications, as long as this notice is preserved.
  2321 +dnl This program is distributed in the hope that it will be useful,
  2322 +dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
  2323 +dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
  2324 +dnl PARTICULAR PURPOSE.
  2326 +dnl This provides configure definitions used by all the newlib
  2327 +dnl configure.in files.
  2329 +dnl Basic newlib configury.  This calls basic introductory stuff,
  2330 +dnl including AM_INIT_AUTOMAKE and AC_CANONICAL_HOST.  It also runs
  2331 +dnl configure.host.  The only argument is the relative path to the top
  2332 +dnl newlib directory.
  2334 +AC_DEFUN(NEWLIB_CONFIGURE,
  2335 +[
  2336 +dnl Default to --enable-multilib
  2337 +AC_ARG_ENABLE(multilib,
  2338 +[  --enable-multilib         build many library versions (default)],
  2339 +[case "${enableval}" in
  2340 +  yes) multilib=yes ;;
  2341 +  no)  multilib=no ;;
  2342 +  *)   AC_MSG_ERROR(bad value ${enableval} for multilib option) ;;
  2343 + esac], [multilib=yes])dnl
  2345 +dnl Support --enable-target-optspace
  2346 +AC_ARG_ENABLE(target-optspace,
  2347 +[  --enable-target-optspace  optimize for space],
  2348 +[case "${enableval}" in
  2349 +  yes) target_optspace=yes ;;
  2350 +  no)  target_optspace=no ;;
  2351 +  *)   AC_MSG_ERROR(bad value ${enableval} for target-optspace option) ;;
  2352 + esac], [target_optspace=])dnl
  2354 +dnl Support --enable-newlib-mb
  2355 +AC_ARG_ENABLE(newlib-mb,
  2356 +[  --enable-newlib-mb        enable multibyte support],
  2357 +[case "${enableval}" in
  2358 +  yes) newlib_mb=yes ;;
  2359 +  no)  newlib_mb=no ;;
  2360 +  *)   AC_MSG_ERROR(bad value ${enableval} for newlib-mb option) ;;
  2361 + esac], [newlib_mb=no])dnl
  2363 +dnl We may get other options which we don't document:
  2364 +dnl --with-target-subdir, --with-multisrctop, --with-multisubdir
  2366 +test -z "[$]{with_target_subdir}" && with_target_subdir=.
  2368 +if test "[$]{srcdir}" = "."; then
  2369 +  if test "[$]{with_target_subdir}" != "."; then
  2370 +    newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}../$1"
  2371 +  else
  2372 +    newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}$1"
  2373 +  fi
  2374 +else
  2375 +  newlib_basedir="[$]{srcdir}/$1"
  2376 +fi
  2377 +AC_SUBST(newlib_basedir)
  2379 +AC_CANONICAL_HOST
  2381 +AM_INIT_AUTOMAKE(newlib, 1.8.1)
  2383 +# FIXME: We temporarily define our own version of AC_PROG_CC.  This is
  2384 +# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS.  We
  2385 +# are probably using a cross compiler, which will not be able to fully
  2386 +# link an executable.  This should really be fixed in autoconf
  2387 +# itself.
  2389 +AC_DEFUN(LIB_AC_PROG_CC,
  2390 +[AC_BEFORE([$0], [AC_PROG_CPP])dnl
  2391 +AC_CHECK_PROG(CC, gcc, gcc)
  2392 +if test -z "$CC"; then
  2393 +  AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
  2394 +  test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
  2395 +fi
  2397 +AC_PROG_CC_GNU
  2399 +if test $ac_cv_prog_gcc = yes; then
  2400 +  GCC=yes
  2401 +dnl Check whether -g works, even if CFLAGS is set, in case the package
  2402 +dnl plays around with CFLAGS (such as to build both debugging and
  2403 +dnl normal versions of a library), tasteless as that idea is.
  2404 +  ac_test_CFLAGS="${CFLAGS+set}"
  2405 +  ac_save_CFLAGS="$CFLAGS"
  2406 +  CFLAGS=
  2407 +  AC_PROG_CC_G
  2408 +  if test "$ac_test_CFLAGS" = set; then
  2409 +    CFLAGS="$ac_save_CFLAGS"
  2410 +  elif test $ac_cv_prog_cc_g = yes; then
  2411 +    CFLAGS="-g -O2"
  2412 +  else
  2413 +    CFLAGS="-O2"
  2414 +  fi
  2415 +else
  2416 +  GCC=
  2417 +  test "${CFLAGS+set}" = set || CFLAGS="-g"
  2418 +fi
  2419 +])
  2421 +LIB_AC_PROG_CC
  2423 +# AC_CHECK_TOOL does AC_REQUIRE (AC_CANONICAL_BUILD).  If we don't
  2424 +# run it explicitly here, it will be run implicitly before
  2425 +# NEWLIB_CONFIGURE, which doesn't work because that means that it will
  2426 +# be run before AC_CANONICAL_HOST.
  2427 +AC_CANONICAL_BUILD
  2429 +AC_CHECK_TOOL(AS, as)
  2430 +AC_CHECK_TOOL(AR, ar)
  2431 +AC_CHECK_TOOL(RANLIB, ranlib, :)
  2433 +AM_PROG_INSTALL
  2435 +#AM_MAINTAINER_MODE
  2437 +# We need AM_EXEEXT to keep automake happy in cygnus mode.  However,
  2438 +# at least currently, we never actually build a program, so we never
  2439 +# need to use $(EXEEXT).  Moreover, the test for EXEEXT normally
  2440 +# fails, because we are probably configuring with a cross compiler
  2441 +# which can't create executables.  So we include AM_EXEEXT to keep
  2442 +# automake happy, but we don't execute it, since we don't care about
  2443 +# the result.
  2444 +if false; then
  2445 +  AM_EXEEXT
  2446 +fi
  2448 +. [$]{newlib_basedir}/configure.host
  2450 +case [$]{newlib_basedir} in
  2451 +/* | [A-Za-z]:[/\\]*) newlib_flagbasedir=[$]{newlib_basedir} ;;
  2452 +*) newlib_flagbasedir='[$](top_builddir)/'[$]{newlib_basedir} ;;
  2453 +esac
  2455 +newlib_cflags="[$]{newlib_cflags} -I"'[$](top_builddir)'"/$1/targ-include -I[$]{newlib_flagbasedir}/libc/include"
  2456 +case "${host}" in
  2457 +  *-*-cygwin32*)
  2458 +    newlib_cflags="[$]{newlib_cflags} -I[$]{newlib_flagbasedir}/../winsup/include"
  2459 +    ;;
  2460 +esac
  2462 +newlib_cflags="[$]{newlib_cflags} -fno-builtin"
  2464 +NEWLIB_CFLAGS=${newlib_cflags}
  2465 +AC_SUBST(NEWLIB_CFLAGS)
  2467 +AC_SUBST(machine_dir)
  2468 +AC_SUBST(sys_dir)
  2469 +])
  2471 +# Do all the work for Automake.  This macro actually does too much --
  2472 +# some checks are only needed if your package does certain things.
  2473 +# But this isn't really a big deal.
  2475 +# serial 1
  2477 +dnl Usage:
  2478 +dnl AM_INIT_AUTOMAKE(package,version, [no-define])
  2480 +AC_DEFUN(AM_INIT_AUTOMAKE,
  2481 +[AC_REQUIRE([AM_PROG_INSTALL])
  2482 +PACKAGE=[$1]
  2483 +AC_SUBST(PACKAGE)
  2484 +VERSION=[$2]
  2485 +AC_SUBST(VERSION)
  2486 +dnl test to see if srcdir already configured
  2487 +if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
  2488 +  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
  2489 +fi
  2490 +ifelse([$3],,
  2491 +AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
  2492 +AC_DEFINE_UNQUOTED(VERSION, "$VERSION"))
  2493 +AC_REQUIRE([AM_SANITY_CHECK])
  2494 +AC_REQUIRE([AC_ARG_PROGRAM])
  2495 +dnl FIXME This is truly gross.
  2496 +missing_dir=`cd $ac_aux_dir && pwd`
  2497 +AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
  2498 +AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
  2499 +AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
  2500 +AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
  2501 +AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
  2502 +AC_REQUIRE([AC_PROG_MAKE_SET])])
  2505 +# serial 1
  2507 +AC_DEFUN(AM_PROG_INSTALL,
  2508 +[AC_REQUIRE([AC_PROG_INSTALL])
  2509 +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
  2510 +AC_SUBST(INSTALL_SCRIPT)dnl
  2511 +])
  2513 +#
  2514 +# Check to make sure that the build environment is sane.
  2515 +#
  2517 +AC_DEFUN(AM_SANITY_CHECK,
  2518 +[AC_MSG_CHECKING([whether build environment is sane])
  2519 +# Just in case
  2520 +sleep 1
  2521 +echo timestamp > conftestfile
  2522 +# Do `set' in a subshell so we don't clobber the current shell's
  2523 +# arguments.  Must try -L first in case configure is actually a
  2524 +# symlink; some systems play weird games with the mod time of symlinks
  2525 +# (eg FreeBSD returns the mod time of the symlink's containing
  2526 +# directory).
  2527 +if (
  2528 +   set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
  2529 +   if test "[$]*" = "X"; then
  2530 +      # -L didn't work.
  2531 +      set X `ls -t $srcdir/configure conftestfile`
  2532 +   fi
  2533 +   if test "[$]*" != "X $srcdir/configure conftestfile" \
  2534 +      && test "[$]*" != "X conftestfile $srcdir/configure"; then
  2536 +      # If neither matched, then we have a broken ls.  This can happen
  2537 +      # if, for instance, CONFIG_SHELL is bash and it inherits a
  2538 +      # broken ls alias from the environment.  This has actually
  2539 +      # happened.  Such a system could not be considered "sane".
  2540 +      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
  2541 +alias in your environment])
  2542 +   fi
  2544 +   test "[$]2" = conftestfile
  2545 +   )
  2546 +then
  2547 +   # Ok.
  2548 +   :
  2549 +else
  2550 +   AC_MSG_ERROR([newly created file is older than distributed files!
  2551 +Check your system clock])
  2552 +fi
  2553 +rm -f conftest*
  2554 +AC_MSG_RESULT(yes)])
  2556 +dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
  2557 +dnl The program must properly implement --version.
  2558 +AC_DEFUN(AM_MISSING_PROG,
  2559 +[AC_MSG_CHECKING(for working $2)
  2560 +# Run test in a subshell; some versions of sh will print an error if
  2561 +# an executable is not found, even if stderr is redirected.
  2562 +# Redirect stdin to placate older versions of autoconf.  Sigh.
  2563 +if ($2 --version) < /dev/null > /dev/null 2>&1; then
  2564 +   $1=$2
  2565 +   AC_MSG_RESULT(found)
  2566 +else
  2567 +   $1="$3/missing $2"
  2568 +   AC_MSG_RESULT(missing)
  2569 +fi
  2570 +AC_SUBST($1)])
  2572 +# Add --enable-maintainer-mode option to configure.
  2573 +# From Jim Meyering
  2575 +# serial 1
  2577 +AC_DEFUN(AM_MAINTAINER_MODE,
  2578 +[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
  2579 +  dnl maintainer-mode is disabled by default
  2580 +  AC_ARG_ENABLE(maintainer-mode,
  2581 +[  --enable-maintainer-mode enable make rules and dependencies not useful
  2582 +                          (and sometimes confusing) to the casual installer],
  2583 +      USE_MAINTAINER_MODE=$enableval,
  2584 +      USE_MAINTAINER_MODE=no)
  2585 +  AC_MSG_RESULT($USE_MAINTAINER_MODE)
  2586 +  if test $USE_MAINTAINER_MODE = yes; then
  2587 +    MAINT=
  2588 +  else
  2589 +    MAINT='#M#'
  2590 +  fi
  2591 +#  AC_SUBST(MAINT)dnl
  2592 +]
  2593 +)
  2595 +# Check to see if we're running under Win32, without using
  2596 +# AC_CANONICAL_*.  If so, set output variable EXEEXT to ".exe".
  2597 +# Otherwise set it to "".
  2599 +dnl AM_EXEEXT()
  2600 +dnl This knows we add .exe if we're building in the Cygwin32
  2601 +dnl environment. But if we're not, then it compiles a test program
  2602 +dnl to see if there is a suffix for executables.
  2603 +AC_DEFUN(AM_EXEEXT,
  2604 +[AC_REQUIRE([AM_CYGWIN32])
  2605 +AC_REQUIRE([AM_MINGW32])
  2606 +AC_MSG_CHECKING([for executable suffix])
  2607 +AC_CACHE_VAL(am_cv_exeext,
  2608 +[if test "$CYGWIN32" = yes || test "$MINGW32" = yes; then
  2609 +am_cv_exeext=.exe
  2610 +else
  2611 +cat > am_c_test.c << 'EOF'
  2612 +int main() {
  2613 +/* Nothing needed here */
  2614 +}
  2615 +EOF
  2616 +${CC-cc} -o am_c_test $CFLAGS $CPPFLAGS $LDFLAGS am_c_test.c $LIBS 1>&5
  2617 +am_cv_exeext=
  2618 +for file in am_c_test.*; do
  2619 +   case $file in
  2620 +    *.c) ;;
  2621 +    *.o) ;;
  2622 +    *) am_cv_exeext=`echo $file | sed -e s/am_c_test//` ;;
  2623 +   esac
  2624 +done
  2625 +rm -f am_c_test*])
  2626 +test x"${am_cv_exeext}" = x && am_cv_exeext=no
  2627 +fi
  2628 +EXEEXT=""
  2629 +test x"${am_cv_exeext}" != xno && EXEEXT=${am_cv_exeext}
  2630 +AC_MSG_RESULT(${am_cv_exeext})
  2631 +AC_SUBST(EXEEXT)])
  2633 +# Check to see if we're running under Cygwin32, without using
  2634 +# AC_CANONICAL_*.  If so, set output variable CYGWIN32 to "yes".
  2635 +# Otherwise set it to "no".
  2637 +dnl AM_CYGWIN32()
  2638 +AC_DEFUN(AM_CYGWIN32,
  2639 +[AC_CACHE_CHECK(for Cygwin32 environment, am_cv_cygwin32,
  2640 +[AC_TRY_COMPILE(,[return __CYGWIN32__;],
  2641 +am_cv_cygwin32=yes, am_cv_cygwin32=no)
  2642 +rm -f conftest*])
  2643 +CYGWIN32=
  2644 +test "$am_cv_cygwin32" = yes && CYGWIN32=yes])
  2646 +# Check to see if we're running under Mingw, without using
  2647 +# AC_CANONICAL_*.  If so, set output variable MINGW32 to "yes".
  2648 +# Otherwise set it to "no".
  2650 +dnl AM_MINGW32()
  2651 +AC_DEFUN(AM_MINGW32,
  2652 +[AC_CACHE_CHECK(for Mingw32 environment, am_cv_mingw32,
  2653 +[AC_TRY_COMPILE(,[return __MINGW32__;],
  2654 +am_cv_mingw32=yes, am_cv_mingw32=no)
  2655 +rm -f conftest*])
  2656 +MINGW32=
  2657 +test "$am_cv_mingw32" = yes && MINGW32=yes])
  2659 diff -urN newlib-1.8.2/newlib/libc/sys/dreamcast/chdir.c newlib-1.8.2-dc/newlib/libc/sys/dreamcast/chdir.c
  2660 --- newlib-1.8.2/newlib/libc/sys/dreamcast/chdir.c	1970-01-01 10:00:00.000000000 +1000
  2661 +++ newlib-1.8.2-dc/newlib/libc/sys/dreamcast/chdir.c	2006-07-06 18:28:31.000000000 +1000
  2662 @@ -0,0 +1,14 @@
  2663 +#include "vfs.h"
  2665 +int
  2666 +chdir (const char *path)
  2667 +{
  2668 +  char *obj = _newlib_vfs_new_string (path);
  2670 +  struct media_ops *mops = _newlib_vfs_get_media_ops (path);
  2671 +  int res = mops->chdir (obj);
  2673 +  _newlib_vfs_delete_string (obj);
  2675 +  return res;
  2676 +}
  2677 diff -urN newlib-1.8.2/newlib/libc/sys/dreamcast/chmod.c newlib-1.8.2-dc/newlib/libc/sys/dreamcast/chmod.c
  2678 --- newlib-1.8.2/newlib/libc/sys/dreamcast/chmod.c	1970-01-01 10:00:00.000000000 +1000
  2679 +++ newlib-1.8.2-dc/newlib/libc/sys/dreamcast/chmod.c	2006-07-06 18:28:31.000000000 +1000
  2680 @@ -0,0 +1,16 @@
  2681 +#include <sys/types.h>
  2683 +#include "vfs.h"
  2685 +int
  2686 +chmod (const char *path, mode_t mode)
  2687 +{
  2688 +  char *obj = _newlib_vfs_new_string (path);
  2690 +  struct media_ops *mops = _newlib_vfs_get_media_ops (path);
  2691 +  int res = mops->chmod (obj, mode);
  2693 +  _newlib_vfs_delete_string (obj);
  2695 +  return res;
  2696 +}
  2697 diff -urN newlib-1.8.2/newlib/libc/sys/dreamcast/close.c newlib-1.8.2-dc/newlib/libc/sys/dreamcast/close.c
  2698 --- newlib-1.8.2/newlib/libc/sys/dreamcast/close.c	1970-01-01 10:00:00.000000000 +1000
  2699 +++ newlib-1.8.2-dc/newlib/libc/sys/dreamcast/close.c	2006-07-06 18:28:31.000000000 +1000
  2700 @@ -0,0 +1,15 @@
  2701 +#include "vfs.h"
  2703 +int
  2704 +_close (int fd)
  2705 +{
  2706 +  struct file *pf = _newlib_vfs_get_file (fd);
  2707 +  int res = pf->fops->close (pf);
  2709 +  if (res >= 0)
  2710 +  {
  2711 +    return _newlib_vfs_remove_file (pf);
  2712 +  }
  2714 +  return res;
  2715 +}
  2716 diff -urN newlib-1.8.2/newlib/libc/sys/dreamcast/configure newlib-1.8.2-dc/newlib/libc/sys/dreamcast/configure
  2717 --- newlib-1.8.2/newlib/libc/sys/dreamcast/configure	1970-01-01 10:00:00.000000000 +1000
  2718 +++ newlib-1.8.2-dc/newlib/libc/sys/dreamcast/configure	2006-07-06 18:28:31.000000000 +1000
  2719 @@ -0,0 +1,1586 @@
  2720 +#! /bin/sh
  2722 +# Guess values for system-dependent variables and create Makefiles.
  2723 +# Generated automatically using autoconf version 2.13 
  2724 +# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
  2725 +#
  2726 +# This configure script is free software; the Free Software Foundation
  2727 +# gives unlimited permission to copy, distribute and modify it.
  2729 +# Defaults:
  2730 +ac_help=
  2731 +ac_default_prefix=/usr/local
  2732 +# Any additions from configure.in:
  2733 +ac_help="$ac_help
  2734 +  --enable-multilib         build many library versions (default)"
  2735 +ac_help="$ac_help
  2736 +  --enable-target-optspace  optimize for space"
  2737 +ac_help="$ac_help
  2738 +  --enable-newlib-mb        enable multibyte support"
  2740 +# Initialize some variables set by options.
  2741 +# The variables have the same names as the options, with
  2742 +# dashes changed to underlines.
  2743 +build=NONE
  2744 +cache_file=./config.cache
  2745 +exec_prefix=NONE
  2746 +host=NONE
  2747 +no_create=
  2748 +nonopt=NONE
  2749 +no_recursion=
  2750 +prefix=NONE
  2751 +program_prefix=NONE
  2752 +program_suffix=NONE
  2753 +program_transform_name=s,x,x,
  2754 +silent=
  2755 +site=
  2756 +srcdir=
  2757 +target=NONE
  2758 +verbose=
  2759 +x_includes=NONE
  2760 +x_libraries=NONE
  2761 +bindir='${exec_prefix}/bin'
  2762 +sbindir='${exec_prefix}/sbin'
  2763 +libexecdir='${exec_prefix}/libexec'
  2764 +datadir='${prefix}/share'
  2765 +sysconfdir='${prefix}/etc'
  2766 +sharedstatedir='${prefix}/com'
  2767 +localstatedir='${prefix}/var'
  2768 +libdir='${exec_prefix}/lib'
  2769 +includedir='${prefix}/include'
  2770 +oldincludedir='/usr/include'
  2771 +infodir='${prefix}/info'
  2772 +mandir='${prefix}/man'
  2774 +# Initialize some other variables.
  2775 +subdirs=
  2776 +MFLAGS= MAKEFLAGS=
  2777 +SHELL=${CONFIG_SHELL-/bin/sh}
  2778 +# Maximum number of lines to put in a shell here document.
  2779 +ac_max_here_lines=12
  2781 +ac_prev=
  2782 +for ac_option
  2783 +do
  2785 +  # If the previous option needs an argument, assign it.
  2786 +  if test -n "$ac_prev"; then
  2787 +    eval "$ac_prev=\$ac_option"
  2788 +    ac_prev=
  2789 +    continue
  2790 +  fi
  2792 +  case "$ac_option" in
  2793 +  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  2794 +  *) ac_optarg= ;;
  2795 +  esac
  2797 +  # Accept the important Cygnus configure options, so we can diagnose typos.
  2799 +  case "$ac_option" in
  2801 +  -bindir | --bindir | --bindi | --bind | --bin | --bi)
  2802 +    ac_prev=bindir ;;
  2803 +  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
  2804 +    bindir="$ac_optarg" ;;
  2806 +  -build | --build | --buil | --bui | --bu)
  2807 +    ac_prev=build ;;
  2808 +  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
  2809 +    build="$ac_optarg" ;;
  2811 +  -cache-file | --cache-file | --cache-fil | --cache-fi \
  2812 +  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
  2813 +    ac_prev=cache_file ;;
  2814 +  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  2815 +  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
  2816 +    cache_file="$ac_optarg" ;;
  2818 +  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
  2819 +    ac_prev=datadir ;;
  2820 +  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
  2821 +  | --da=*)
  2822 +    datadir="$ac_optarg" ;;
  2824 +  -disable-* | --disable-*)
  2825 +    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
  2826 +    # Reject names that are not valid shell variable names.
  2827 +    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
  2828 +      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  2829 +    fi
  2830 +    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  2831 +    eval "enable_${ac_feature}=no" ;;
  2833 +  -enable-* | --enable-*)
  2834 +    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
  2835 +    # Reject names that are not valid shell variable names.
  2836 +    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
  2837 +      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  2838 +    fi
  2839 +    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  2840 +    case "$ac_option" in
  2841 +      *=*) ;;
  2842 +      *) ac_optarg=yes ;;
  2843 +    esac
  2844 +    eval "enable_${ac_feature}='$ac_optarg'" ;;
  2846 +  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  2847 +  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  2848 +  | --exec | --exe | --ex)
  2849 +    ac_prev=exec_prefix ;;
  2850 +  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  2851 +  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  2852 +  | --exec=* | --exe=* | --ex=*)
  2853 +    exec_prefix="$ac_optarg" ;;
  2855 +  -gas | --gas | --ga | --g)
  2856 +    # Obsolete; use --with-gas.
  2857 +    with_gas=yes ;;
  2859 +  -help | --help | --hel | --he)
  2860 +    # Omit some internal or obsolete options to make the list less imposing.
  2861 +    # This message is too long to be a string in the A/UX 3.1 sh.
  2862 +    cat << EOF
  2863 +Usage: configure [options] [host]
  2864 +Options: [defaults in brackets after descriptions]
  2865 +Configuration:
  2866 +  --cache-file=FILE       cache test results in FILE
  2867 +  --help                  print this message
  2868 +  --no-create             do not create output files
  2869 +  --quiet, --silent       do not print \`checking...' messages
  2870 +  --version               print the version of autoconf that created configure
  2871 +Directory and file names:
  2872 +  --prefix=PREFIX         install architecture-independent files in PREFIX
  2873 +                          [$ac_default_prefix]
  2874 +  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
  2875 +                          [same as prefix]
  2876 +  --bindir=DIR            user executables in DIR [EPREFIX/bin]
  2877 +  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
  2878 +  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
  2879 +  --datadir=DIR           read-only architecture-independent data in DIR
  2880 +                          [PREFIX/share]
  2881 +  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
  2882 +  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
  2883 +                          [PREFIX/com]
  2884 +  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
  2885 +  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
  2886 +  --includedir=DIR        C header files in DIR [PREFIX/include]
  2887 +  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
  2888 +  --infodir=DIR           info documentation in DIR [PREFIX/info]
  2889 +  --mandir=DIR            man documentation in DIR [PREFIX/man]
  2890 +  --srcdir=DIR            find the sources in DIR [configure dir or ..]
  2891 +  --program-prefix=PREFIX prepend PREFIX to installed program names
  2892 +  --program-suffix=SUFFIX append SUFFIX to installed program names
  2893 +  --program-transform-name=PROGRAM
  2894 +                          run sed PROGRAM on installed program names
  2895 +EOF
  2896 +    cat << EOF
  2897 +Host type:
  2898 +  --build=BUILD           configure for building on BUILD [BUILD=HOST]
  2899 +  --host=HOST             configure for HOST [guessed]
  2900 +  --target=TARGET         configure for TARGET [TARGET=HOST]
  2901 +Features and packages:
  2902 +  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  2903 +  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  2904 +  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  2905 +  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  2906 +  --x-includes=DIR        X include files are in DIR
  2907 +  --x-libraries=DIR       X library files are in DIR
  2908 +EOF
  2909 +    if test -n "$ac_help"; then
  2910 +      echo "--enable and --with options recognized:$ac_help"
  2911 +    fi
  2912 +    exit 0 ;;
  2914 +  -host | --host | --hos | --ho)
  2915 +    ac_prev=host ;;
  2916 +  -host=* | --host=* | --hos=* | --ho=*)
  2917 +    host="$ac_optarg" ;;
  2919 +  -includedir | --includedir | --includedi | --included | --include \
  2920 +  | --includ | --inclu | --incl | --inc)
  2921 +    ac_prev=includedir ;;
  2922 +  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
  2923 +  | --includ=* | --inclu=* | --incl=* | --inc=*)
  2924 +    includedir="$ac_optarg" ;;
  2926 +  -infodir | --infodir | --infodi | --infod | --info | --inf)
  2927 +    ac_prev=infodir ;;
  2928 +  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
  2929 +    infodir="$ac_optarg" ;;
  2931 +  -libdir | --libdir | --libdi | --libd)
  2932 +    ac_prev=libdir ;;
  2933 +  -libdir=* | --libdir=* | --libdi=* | --libd=*)
  2934 +    libdir="$ac_optarg" ;;
  2936 +  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
  2937 +  | --libexe | --libex | --libe)
  2938 +    ac_prev=libexecdir ;;
  2939 +  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
  2940 +  | --libexe=* | --libex=* | --libe=*)
  2941 +    libexecdir="$ac_optarg" ;;
  2943 +  -localstatedir | --localstatedir | --localstatedi | --localstated \
  2944 +  | --localstate | --localstat | --localsta | --localst \
  2945 +  | --locals | --local | --loca | --loc | --lo)
  2946 +    ac_prev=localstatedir ;;
  2947 +  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
  2948 +  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
  2949 +  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
  2950 +    localstatedir="$ac_optarg" ;;
  2952 +  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
  2953 +    ac_prev=mandir ;;
  2954 +  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
  2955 +    mandir="$ac_optarg" ;;
  2957 +  -nfp | --nfp | --nf)
  2958 +    # Obsolete; use --without-fp.
  2959 +    with_fp=no ;;
  2961 +  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  2962 +  | --no-cr | --no-c)
  2963 +    no_create=yes ;;
  2965 +  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  2966 +  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
  2967 +    no_recursion=yes ;;
  2969 +  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
  2970 +  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
  2971 +  | --oldin | --oldi | --old | --ol | --o)
  2972 +    ac_prev=oldincludedir ;;
  2973 +  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
  2974 +  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
  2975 +  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
  2976 +    oldincludedir="$ac_optarg" ;;
  2978 +  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  2979 +    ac_prev=prefix ;;
  2980 +  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  2981 +    prefix="$ac_optarg" ;;
  2983 +  -program-prefix | --program-prefix | --program-prefi | --program-pref \
  2984 +  | --program-pre | --program-pr | --program-p)
  2985 +    ac_prev=program_prefix ;;
  2986 +  -program-prefix=* | --program-prefix=* | --program-prefi=* \
  2987 +  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
  2988 +    program_prefix="$ac_optarg" ;;
  2990 +  -program-suffix | --program-suffix | --program-suffi | --program-suff \
  2991 +  | --program-suf | --program-su | --program-s)
  2992 +    ac_prev=program_suffix ;;
  2993 +  -program-suffix=* | --program-suffix=* | --program-suffi=* \
  2994 +  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
  2995 +    program_suffix="$ac_optarg" ;;
  2997 +  -program-transform-name | --program-transform-name \
  2998 +  | --program-transform-nam | --program-transform-na \
  2999 +  | --program-transform-n | --program-transform- \
  3000 +  | --program-transform | --program-transfor \
  3001 +  | --program-transfo | --program-transf \
  3002 +  | --program-trans | --program-tran \
  3003 +  | --progr-tra | --program-tr | --program-t)
  3004 +    ac_prev=program_transform_name ;;
  3005 +  -program-transform-name=* | --program-transform-name=* \
  3006 +  | --program-transform-nam=* | --program-transform-na=* \
  3007 +  | --program-transform-n=* | --program-transform-=* \
  3008 +  | --program-transform=* | --program-transfor=* \
  3009 +  | --program-transfo=* | --program-transf=* \
  3010 +  | --program-trans=* | --program-tran=* \
  3011 +  | --progr-tra=* | --program-tr=* | --program-t=*)
  3012 +    program_transform_name="$ac_optarg" ;;
  3014 +  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  3015 +  | -silent | --silent | --silen | --sile | --sil)
  3016 +    silent=yes ;;
  3018 +  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
  3019 +    ac_prev=sbindir ;;
  3020 +  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
  3021 +  | --sbi=* | --sb=*)
  3022 +    sbindir="$ac_optarg" ;;
  3024 +  -sharedstatedir | --sharedstatedir | --sharedstatedi \
  3025 +  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
  3026 +  | --sharedst | --shareds | --shared | --share | --shar \
  3027 +  | --sha | --sh)
  3028 +    ac_prev=sharedstatedir ;;
  3029 +  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
  3030 +  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
  3031 +  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
  3032 +  | --sha=* | --sh=*)
  3033 +    sharedstatedir="$ac_optarg" ;;
  3035 +  -site | --site | --sit)
  3036 +    ac_prev=site ;;
  3037 +  -site=* | --site=* | --sit=*)
  3038 +    site="$ac_optarg" ;;
  3040 +  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  3041 +    ac_prev=srcdir ;;
  3042 +  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  3043 +    srcdir="$ac_optarg" ;;
  3045 +  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
  3046 +  | --syscon | --sysco | --sysc | --sys | --sy)
  3047 +    ac_prev=sysconfdir ;;
  3048 +  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
  3049 +  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
  3050 +    sysconfdir="$ac_optarg" ;;
  3052 +  -target | --target | --targe | --targ | --tar | --ta | --t)
  3053 +    ac_prev=target ;;
  3054 +  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  3055 +    target="$ac_optarg" ;;
  3057 +  -v | -verbose | --verbose | --verbos | --verbo | --verb)
  3058 +    verbose=yes ;;
  3060 +  -version | --version | --versio | --versi | --vers)
  3061 +    echo "configure generated by autoconf version 2.13"
  3062 +    exit 0 ;;
  3064 +  -with-* | --with-*)
  3065 +    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
  3066 +    # Reject names that are not valid shell variable names.
  3067 +    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
  3068 +      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  3069 +    fi
  3070 +    ac_package=`echo $ac_package| sed 's/-/_/g'`
  3071 +    case "$ac_option" in
  3072 +      *=*) ;;
  3073 +      *) ac_optarg=yes ;;
  3074 +    esac
  3075 +    eval "with_${ac_package}='$ac_optarg'" ;;
  3077 +  -without-* | --without-*)
  3078 +    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
  3079 +    # Reject names that are not valid shell variable names.
  3080 +    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
  3081 +      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  3082 +    fi
  3083 +    ac_package=`echo $ac_package| sed 's/-/_/g'`
  3084 +    eval "with_${ac_package}=no" ;;
  3086 +  --x)
  3087 +    # Obsolete; use --with-x.
  3088 +    with_x=yes ;;
  3090 +  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  3091 +  | --x-incl | --x-inc | --x-in | --x-i)
  3092 +    ac_prev=x_includes ;;
  3093 +  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  3094 +  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
  3095 +    x_includes="$ac_optarg" ;;
  3097 +  -x-libraries | --x-libraries | --x-librarie | --x-librari \
  3098 +  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
  3099 +    ac_prev=x_libraries ;;
  3100 +  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  3101 +  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
  3102 +    x_libraries="$ac_optarg" ;;
  3104 +  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
  3105 +    ;;
  3107 +  *)
  3108 +    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
  3109 +      echo "configure: warning: $ac_option: invalid host type" 1>&2
  3110 +    fi
  3111 +    if test "x$nonopt" != xNONE; then
  3112 +      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
  3113 +    fi
  3114 +    nonopt="$ac_option"
  3115 +    ;;
  3117 +  esac
  3118 +done
  3120 +if test -n "$ac_prev"; then
  3121 +  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
  3122 +fi
  3124 +trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  3126 +# File descriptor usage:
  3127 +# 0 standard input
  3128 +# 1 file creation
  3129 +# 2 errors and warnings
  3130 +# 3 some systems may open it to /dev/tty
  3131 +# 4 used on the Kubota Titan
  3132 +# 6 checking for... messages and results
  3133 +# 5 compiler messages saved in config.log
  3134 +if test "$silent" = yes; then
  3135 +  exec 6>/dev/null
  3136 +else
  3137 +  exec 6>&1
  3138 +fi
  3139 +exec 5>./config.log
  3141 +echo "\
  3142 +This file contains any messages produced by compilers while
  3143 +running configure, to aid debugging if configure makes a mistake.
  3144 +" 1>&5
  3146 +# Strip out --no-create and --no-recursion so they do not pile up.
  3147 +# Also quote any args containing shell metacharacters.
  3148 +ac_configure_args=
  3149 +for ac_arg
  3150 +do
  3151 +  case "$ac_arg" in
  3152 +  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  3153 +  | --no-cr | --no-c) ;;
  3154 +  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  3155 +  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
  3156 +  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
  3157 +  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
  3158 +  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
  3159 +  esac
  3160 +done
  3162 +# NLS nuisances.
  3163 +# Only set these to C if already set.  These must not be set unconditionally
  3164 +# because not all systems understand e.g. LANG=C (notably SCO).
  3165 +# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
  3166 +# Non-C LC_CTYPE values break the ctype check.
  3167 +if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
  3168 +if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
  3169 +if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
  3170 +if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
  3172 +# confdefs.h avoids OS command line length limits that DEFS can exceed.
  3173 +rm -rf conftest* confdefs.h
  3174 +# AIX cpp loses on an empty file, so make sure it contains at least a newline.
  3175 +echo > confdefs.h
  3177 +# A filename unique to this package, relative to the directory that
  3178 +# configure is in, which we can look for to find out if srcdir is correct.
  3179 +ac_unique_file=sbrk.c
  3181 +# Find the source files, if location was not specified.
  3182 +if test -z "$srcdir"; then
  3183 +  ac_srcdir_defaulted=yes
  3184 +  # Try the directory containing this script, then its parent.
  3185 +  ac_prog=$0
  3186 +  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  3187 +  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  3188 +  srcdir=$ac_confdir
  3189 +  if test ! -r $srcdir/$ac_unique_file; then
  3190 +    srcdir=..
  3191 +  fi
  3192 +else
  3193 +  ac_srcdir_defaulted=no
  3194 +fi
  3195 +if test ! -r $srcdir/$ac_unique_file; then
  3196 +  if test "$ac_srcdir_defaulted" = yes; then
  3197 +    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
  3198 +  else
  3199 +    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
  3200 +  fi
  3201 +fi
  3202 +srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
  3204 +# Prefer explicitly selected file to automatically selected ones.
  3205 +if test -z "$CONFIG_SITE"; then
  3206 +  if test "x$prefix" != xNONE; then
  3207 +    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
  3208 +  else
  3209 +    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
  3210 +  fi
  3211 +fi
  3212 +for ac_site_file in $CONFIG_SITE; do
  3213 +  if test -r "$ac_site_file"; then
  3214 +    echo "loading site script $ac_site_file"
  3215 +    . "$ac_site_file"
  3216 +  fi
  3217 +done
  3219 +if test -r "$cache_file"; then
  3220 +  echo "loading cache $cache_file"
  3221 +  . $cache_file
  3222 +else
  3223 +  echo "creating cache $cache_file"
  3224 +  > $cache_file
  3225 +fi
  3227 +ac_ext=c
  3228 +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  3229 +ac_cpp='$CPP $CPPFLAGS'
  3230 +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  3231 +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  3232 +cross_compiling=$ac_cv_prog_cc_cross
  3234 +ac_exeext=
  3235 +ac_objext=o
  3236 +if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  3237 +  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
  3238 +  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
  3239 +    ac_n= ac_c='
  3240 +' ac_t='	'
  3241 +  else
  3242 +    ac_n=-n ac_c= ac_t=
  3243 +  fi
  3244 +else
  3245 +  ac_n= ac_c='\c' ac_t=
  3246 +fi
  3250 +ac_aux_dir=
  3251 +for ac_dir in ../../../.. $srcdir/../../../..; do
  3252 +  if test -f $ac_dir/install-sh; then
  3253 +    ac_aux_dir=$ac_dir
  3254 +    ac_install_sh="$ac_aux_dir/install-sh -c"
  3255 +    break
  3256 +  elif test -f $ac_dir/install.sh; then
  3257 +    ac_aux_dir=$ac_dir
  3258 +    ac_install_sh="$ac_aux_dir/install.sh -c"
  3259 +    break
  3260 +  fi
  3261 +done
  3262 +if test -z "$ac_aux_dir"; then
  3263 +  { echo "configure: error: can not find install-sh or install.sh in ../../../.. $srcdir/../../../.." 1>&2; exit 1; }
  3264 +fi
  3265 +ac_config_guess=$ac_aux_dir/config.guess
  3266 +ac_config_sub=$ac_aux_dir/config.sub
  3267 +ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
  3270 +# Find a good install program.  We prefer a C program (faster),
  3271 +# so one script is as good as another.  But avoid the broken or
  3272 +# incompatible versions:
  3273 +# SysV /etc/install, /usr/sbin/install
  3274 +# SunOS /usr/etc/install
  3275 +# IRIX /sbin/install
  3276 +# AIX /bin/install
  3277 +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
  3278 +# AFS /usr/afsws/bin/install, which mishandles nonexistent args
  3279 +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
  3280 +# ./install, which can be erroneously created by make from ./install.sh.
  3281 +echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
  3282 +echo "configure:564: checking for a BSD compatible install" >&5
  3283 +if test -z "$INSTALL"; then
  3284 +if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
  3285 +  echo $ac_n "(cached) $ac_c" 1>&6
  3286 +else
  3287 +    IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS=":"
  3288 +  for ac_dir in $PATH; do
  3289 +    # Account for people who put trailing slashes in PATH elements.
  3290 +    case "$ac_dir/" in
  3291 +    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
  3292 +    *)
  3293 +      # OSF1 and SCO ODT 3.0 have their own names for install.
  3294 +      # Don't use installbsd from OSF since it installs stuff as root
  3295 +      # by default.
  3296 +      for ac_prog in ginstall scoinst install; do
  3297 +        if test -f $ac_dir/$ac_prog; then
  3298 +	  if test $ac_prog = install &&
  3299 +            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
  3300 +	    # AIX install.  It has an incompatible calling convention.
  3301 +	    :
  3302 +	  else
  3303 +	    ac_cv_path_install="$ac_dir/$ac_prog -c"
  3304 +	    break 2
  3305 +	  fi
  3306 +	fi
  3307 +      done
  3308 +      ;;
  3309 +    esac
  3310 +  done
  3311 +  IFS="$ac_save_IFS"
  3313 +fi
  3314 +  if test "${ac_cv_path_install+set}" = set; then
  3315 +    INSTALL="$ac_cv_path_install"
  3316 +  else
  3317 +    # As a last resort, use the slow shell script.  We don't cache a
  3318 +    # path for INSTALL within a source directory, because that will
  3319 +    # break other packages using the cache if that directory is
  3320 +    # removed, or if the path is relative.
  3321 +    INSTALL="$ac_install_sh"
  3322 +  fi
  3323 +fi
  3324 +echo "$ac_t""$INSTALL" 1>&6
  3326 +# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
  3327 +# It thinks the first close brace ends the variable substitution.
  3328 +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
  3330 +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
  3332 +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
  3335 +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
  3337 +echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
  3338 +echo "configure:620: checking whether build environment is sane" >&5
  3339 +# Just in case
  3340 +sleep 1
  3341 +echo timestamp > conftestfile
  3342 +# Do `set' in a subshell so we don't clobber the current shell's
  3343 +# arguments.  Must try -L first in case configure is actually a
  3344 +# symlink; some systems play weird games with the mod time of symlinks
  3345 +# (eg FreeBSD returns the mod time of the symlink's containing
  3346 +# directory).
  3347 +if (
  3348 +   set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
  3349 +   if test "$*" = "X"; then
  3350 +      # -L didn't work.
  3351 +      set X `ls -t $srcdir/configure conftestfile`
  3352 +   fi
  3353 +   if test "$*" != "X $srcdir/configure conftestfile" \
  3354 +      && test "$*" != "X conftestfile $srcdir/configure"; then
  3356 +      # If neither matched, then we have a broken ls.  This can happen
  3357 +      # if, for instance, CONFIG_SHELL is bash and it inherits a
  3358 +      # broken ls alias from the environment.  This has actually
  3359 +      # happened.  Such a system could not be considered "sane".
  3360 +      { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
  3361 +alias in your environment" 1>&2; exit 1; }
  3362 +   fi
  3364 +   test "$2" = conftestfile
  3365 +   )
  3366 +then
  3367 +   # Ok.
  3368 +   :
  3369 +else
  3370 +   { echo "configure: error: newly created file is older than distributed files!
  3371 +Check your system clock" 1>&2; exit 1; }
  3372 +fi
  3373 +rm -f conftest*
  3374 +echo "$ac_t""yes" 1>&6
  3375 +if test "$program_transform_name" = s,x,x,; then
  3376 +  program_transform_name=
  3377 +else
  3378 +  # Double any \ or $.  echo might interpret backslashes.
  3379 +  cat <<\EOF_SED > conftestsed
  3380 +s,\\,\\\\,g; s,\$,$$,g
  3381 +EOF_SED
  3382 +  program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
  3383 +  rm -f conftestsed
  3384 +fi
  3385 +test "$program_prefix" != NONE &&
  3386 +  program_transform_name="s,^,${program_prefix},; $program_transform_name"
  3387 +# Use a double $ so make ignores it.
  3388 +test "$program_suffix" != NONE &&
  3389 +  program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
  3391 +# sed with no file args requires a program.
  3392 +test "$program_transform_name" = "" && program_transform_name="s,x,x,"
  3394 +echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
  3395 +echo "configure:677: checking whether ${MAKE-make} sets \${MAKE}" >&5
  3396 +set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
  3397 +if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
  3398 +  echo $ac_n "(cached) $ac_c" 1>&6
  3399 +else
  3400 +  cat > conftestmake <<\EOF
  3401 +all:
  3402 +	@echo 'ac_maketemp="${MAKE}"'
  3403 +EOF
  3404 +# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
  3405 +eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
  3406 +if test -n "$ac_maketemp"; then
  3407 +  eval ac_cv_prog_make_${ac_make}_set=yes
  3408 +else
  3409 +  eval ac_cv_prog_make_${ac_make}_set=no
  3410 +fi
  3411 +rm -f conftestmake
  3412 +fi
  3413 +if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
  3414 +  echo "$ac_t""yes" 1>&6
  3415 +  SET_MAKE=
  3416 +else
  3417 +  echo "$ac_t""no" 1>&6
  3418 +  SET_MAKE="MAKE=${MAKE-make}"
  3419 +fi
  3421 +if test $host != $build; then
  3422 +  ac_tool_prefix=${host_alias}-
  3423 +else
  3424 +  ac_tool_prefix=
  3425 +fi
  3427 +echo $ac_n "checking for Cygwin32 environment""... $ac_c" 1>&6
  3428 +echo "configure:710: checking for Cygwin32 environment" >&5
  3429 +if eval "test \"`echo '$''{'am_cv_cygwin32'+set}'`\" = set"; then
  3430 +  echo $ac_n "(cached) $ac_c" 1>&6
  3431 +else
  3432 +  cat > conftest.$ac_ext <<EOF
  3433 +#line 715 "configure"
  3434 +#include "confdefs.h"
  3436 +int main() {
  3437 +return __CYGWIN32__;
  3438 +; return 0; }
  3439 +EOF
  3440 +if { (eval echo configure:722: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  3441 +  rm -rf conftest*
  3442 +  am_cv_cygwin32=yes
  3443 +else
  3444 +  echo "configure: failed program was:" >&5
  3445 +  cat conftest.$ac_ext >&5
  3446 +  rm -rf conftest*
  3447 +  am_cv_cygwin32=no
  3448 +fi
  3449 +rm -f conftest*
  3450 +rm -f conftest*
  3451 +fi
  3453 +echo "$ac_t""$am_cv_cygwin32" 1>&6
  3454 +CYGWIN32=
  3455 +test "$am_cv_cygwin32" = yes && CYGWIN32=yes
  3456 +echo $ac_n "checking for Mingw32 environment""... $ac_c" 1>&6
  3457 +echo "configure:739: checking for Mingw32 environment" >&5
  3458 +if eval "test \"`echo '$''{'am_cv_mingw32'+set}'`\" = set"; then
  3459 +  echo $ac_n "(cached) $ac_c" 1>&6
  3460 +else
  3461 +  cat > conftest.$ac_ext <<EOF
  3462 +#line 744 "configure"
  3463 +#include "confdefs.h"
  3465 +int main() {
  3466 +return __MINGW32__;
  3467 +; return 0; }
  3468 +EOF
  3469 +if { (eval echo configure:751: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  3470 +  rm -rf conftest*
  3471 +  am_cv_mingw32=yes
  3472 +else
  3473 +  echo "configure: failed program was:" >&5
  3474 +  cat conftest.$ac_ext >&5
  3475 +  rm -rf conftest*
  3476 +  am_cv_mingw32=no
  3477 +fi
  3478 +rm -f conftest*
  3479 +rm -f conftest*
  3480 +fi
  3482 +echo "$ac_t""$am_cv_mingw32" 1>&6
  3483 +MINGW32=
  3484 +test "$am_cv_mingw32" = yes && MINGW32=yes
  3486 +# Check whether --enable-multilib or --disable-multilib was given.
  3487 +if test "${enable_multilib+set}" = set; then
  3488 +  enableval="$enable_multilib"
  3489 +  case "${enableval}" in
  3490 +  yes) multilib=yes ;;
  3491 +  no)  multilib=no ;;
  3492 +  *)   { echo "configure: error: bad value ${enableval} for multilib option" 1>&2; exit 1; } ;;
  3493 + esac
  3494 +else
  3495 +  multilib=yes
  3496 +fi
  3498 +# Check whether --enable-target-optspace or --disable-target-optspace was given.
  3499 +if test "${enable_target_optspace+set}" = set; then
  3500 +  enableval="$enable_target_optspace"
  3501 +  case "${enableval}" in
  3502 +  yes) target_optspace=yes ;;
  3503 +  no)  target_optspace=no ;;
  3504 +  *)   { echo "configure: error: bad value ${enableval} for target-optspace option" 1>&2; exit 1; } ;;
  3505 + esac
  3506 +else
  3507 +  target_optspace=
  3508 +fi
  3510 +# Check whether --enable-newlib-mb or --disable-newlib-mb was given.
  3511 +if test "${enable_newlib_mb+set}" = set; then
  3512 +  enableval="$enable_newlib_mb"
  3513 +  case "${enableval}" in
  3514 +  yes) newlib_mb=yes ;;
  3515 +  no)  newlib_mb=no ;;
  3516 +  *)   { echo "configure: error: bad value ${enableval} for newlib-mb option" 1>&2; exit 1; } ;;
  3517 + esac
  3518 +else
  3519 +  newlib_mb=no
  3520 +fi
  3523 +test -z "${with_target_subdir}" && with_target_subdir=.
  3525 +if test "${srcdir}" = "."; then
  3526 +  if test "${with_target_subdir}" != "."; then
  3527 +    newlib_basedir="${srcdir}/${with_multisrctop}../../../.."
  3528 +  else
  3529 +    newlib_basedir="${srcdir}/${with_multisrctop}../../.."
  3530 +  fi
  3531 +else
  3532 +  newlib_basedir="${srcdir}/../../.."
  3533 +fi
  3537 +# Make sure we can run config.sub.
  3538 +if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
  3539 +else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
  3540 +fi
  3542 +echo $ac_n "checking host system type""... $ac_c" 1>&6
  3543 +echo "configure:825: checking host system type" >&5
  3545 +host_alias=$host
  3546 +case "$host_alias" in
  3547 +NONE)
  3548 +  case $nonopt in
  3549 +  NONE)
  3550 +    if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
  3551 +    else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
  3552 +    fi ;;
  3553 +  *) host_alias=$nonopt ;;
  3554 +  esac ;;
  3555 +esac
  3557 +host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
  3558 +host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
  3559 +host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
  3560 +host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
  3561 +echo "$ac_t""$host" 1>&6
  3565 +PACKAGE=newlib
  3567 +VERSION=1.8.1
  3569 +if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
  3570 +  { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
  3571 +fi
  3572 +cat >> confdefs.h <<EOF
  3573 +#define PACKAGE "$PACKAGE"
  3574 +EOF
  3576 +cat >> confdefs.h <<EOF
  3577 +#define VERSION "$VERSION"
  3578 +EOF
  3582 +missing_dir=`cd $ac_aux_dir && pwd`
  3583 +echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
  3584 +echo "configure:866: checking for working aclocal" >&5
  3585 +# Run test in a subshell; some versions of sh will print an error if
  3586 +# an executable is not found, even if stderr is redirected.
  3587 +# Redirect stdin to placate older versions of autoconf.  Sigh.
  3588 +if (aclocal --version) < /dev/null > /dev/null 2>&1; then
  3589 +   ACLOCAL=aclocal
  3590 +   echo "$ac_t""found" 1>&6
  3591 +else
  3592 +   ACLOCAL="$missing_dir/missing aclocal"
  3593 +   echo "$ac_t""missing" 1>&6
  3594 +fi
  3596 +echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
  3597 +echo "configure:879: checking for working autoconf" >&5
  3598 +# Run test in a subshell; some versions of sh will print an error if
  3599 +# an executable is not found, even if stderr is redirected.
  3600 +# Redirect stdin to placate older versions of autoconf.  Sigh.
  3601 +if (autoconf --version) < /dev/null > /dev/null 2>&1; then
  3602 +   AUTOCONF=autoconf
  3603 +   echo "$ac_t""found" 1>&6
  3604 +else
  3605 +   AUTOCONF="$missing_dir/missing autoconf"
  3606 +   echo "$ac_t""missing" 1>&6
  3607 +fi
  3609 +echo $ac_n "checking for working automake""... $ac_c" 1>&6
  3610 +echo "configure:892: checking for working automake" >&5
  3611 +# Run test in a subshell; some versions of sh will print an error if
  3612 +# an executable is not found, even if stderr is redirected.
  3613 +# Redirect stdin to placate older versions of autoconf.  Sigh.
  3614 +if (automake --version) < /dev/null > /dev/null 2>&1; then
  3615 +   AUTOMAKE=automake
  3616 +   echo "$ac_t""found" 1>&6
  3617 +else
  3618 +   AUTOMAKE="$missing_dir/missing automake"
  3619 +   echo "$ac_t""missing" 1>&6
  3620 +fi
  3622 +echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
  3623 +echo "configure:905: checking for working autoheader" >&5
  3624 +# Run test in a subshell; some versions of sh will print an error if
  3625 +# an executable is not found, even if stderr is redirected.
  3626 +# Redirect stdin to placate older versions of autoconf.  Sigh.
  3627 +if (autoheader --version) < /dev/null > /dev/null 2>&1; then
  3628 +   AUTOHEADER=autoheader
  3629 +   echo "$ac_t""found" 1>&6
  3630 +else
  3631 +   AUTOHEADER="$missing_dir/missing autoheader"
  3632 +   echo "$ac_t""missing" 1>&6
  3633 +fi
  3635 +echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
  3636 +echo "configure:918: checking for working makeinfo" >&5
  3637 +# Run test in a subshell; some versions of sh will print an error if
  3638 +# an executable is not found, even if stderr is redirected.
  3639 +# Redirect stdin to placate older versions of autoconf.  Sigh.
  3640 +if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
  3641 +   MAKEINFO=makeinfo
  3642 +   echo "$ac_t""found" 1>&6
  3643 +else
  3644 +   MAKEINFO="$missing_dir/missing makeinfo"
  3645 +   echo "$ac_t""missing" 1>&6
  3646 +fi
  3650 +# FIXME: We temporarily define our own version of AC_PROG_CC.  This is
  3651 +# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS.  We
  3652 +# are probably using a cross compiler, which will not be able to fully
  3653 +# link an executable.  This should really be fixed in autoconf
  3654 +# itself.
  3658 +# Extract the first word of "gcc", so it can be a program name with args.
  3659 +set dummy gcc; ac_word=$2
  3660 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  3661 +echo "configure:943: checking for $ac_word" >&5
  3662 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  3663 +  echo $ac_n "(cached) $ac_c" 1>&6
  3664 +else
  3665 +  if test -n "$CC"; then
  3666 +  ac_cv_prog_CC="$CC" # Let the user override the test.
  3667 +else
  3668 +  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  3669 +  ac_dummy="$PATH"
  3670 +  for ac_dir in $ac_dummy; do
  3671 +    test -z "$ac_dir" && ac_dir=.
  3672 +    if test -f $ac_dir/$ac_word; then
  3673 +      ac_cv_prog_CC="gcc"
  3674 +      break
  3675 +    fi
  3676 +  done
  3677 +  IFS="$ac_save_ifs"
  3678 +fi
  3679 +fi
  3680 +CC="$ac_cv_prog_CC"
  3681 +if test -n "$CC"; then
  3682 +  echo "$ac_t""$CC" 1>&6
  3683 +else
  3684 +  echo "$ac_t""no" 1>&6
  3685 +fi
  3687 +if test -z "$CC"; then
  3688 +  # Extract the first word of "cc", so it can be a program name with args.
  3689 +set dummy cc; ac_word=$2
  3690 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  3691 +echo "configure:973: checking for $ac_word" >&5
  3692 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  3693 +  echo $ac_n "(cached) $ac_c" 1>&6
  3694 +else
  3695 +  if test -n "$CC"; then
  3696 +  ac_cv_prog_CC="$CC" # Let the user override the test.
  3697 +else
  3698 +  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  3699 +  ac_prog_rejected=no
  3700 +  ac_dummy="$PATH"
  3701 +  for ac_dir in $ac_dummy; do
  3702 +    test -z "$ac_dir" && ac_dir=.
  3703 +    if test -f $ac_dir/$ac_word; then
  3704 +      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
  3705 +        ac_prog_rejected=yes
  3706 +	continue
  3707 +      fi
  3708 +      ac_cv_prog_CC="cc"
  3709 +      break
  3710 +    fi
  3711 +  done
  3712 +  IFS="$ac_save_ifs"
  3713 +if test $ac_prog_rejected = yes; then
  3714 +  # We found a bogon in the path, so make sure we never use it.
  3715 +  set dummy $ac_cv_prog_CC
  3716 +  shift
  3717 +  if test $# -gt 0; then
  3718 +    # We chose a different compiler from the bogus one.
  3719 +    # However, it has the same basename, so the bogon will be chosen
  3720 +    # first if we set CC to just the basename; use the full file name.
  3721 +    shift
  3722 +    set dummy "$ac_dir/$ac_word" "$@"
  3723 +    shift
  3724 +    ac_cv_prog_CC="$@"
  3725 +  fi
  3726 +fi
  3727 +fi
  3728 +fi
  3729 +CC="$ac_cv_prog_CC"
  3730 +if test -n "$CC"; then
  3731 +  echo "$ac_t""$CC" 1>&6
  3732 +else
  3733 +  echo "$ac_t""no" 1>&6
  3734 +fi
  3736 +  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
  3737 +fi
  3739 +echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
  3740 +echo "configure:1022: checking whether we are using GNU C" >&5
  3741 +if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
  3742 +  echo $ac_n "(cached) $ac_c" 1>&6
  3743 +else
  3744 +  cat > conftest.c <<EOF
  3745 +#ifdef __GNUC__
  3746 +  yes;
  3747 +#endif
  3748 +EOF
  3749 +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
  3750 +  ac_cv_prog_gcc=yes
  3751 +else
  3752 +  ac_cv_prog_gcc=no
  3753 +fi
  3754 +fi
  3756 +echo "$ac_t""$ac_cv_prog_gcc" 1>&6
  3758 +if test $ac_cv_prog_gcc = yes; then
  3759 +  GCC=yes
  3760 +  ac_test_CFLAGS="${CFLAGS+set}"
  3761 +  ac_save_CFLAGS="$CFLAGS"
  3762 +  CFLAGS=
  3763 +  echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
  3764 +echo "configure:1046: checking whether ${CC-cc} accepts -g" >&5
  3765 +if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
  3766 +  echo $ac_n "(cached) $ac_c" 1>&6
  3767 +else
  3768 +  echo 'void f(){}' > conftest.c
  3769 +if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
  3770 +  ac_cv_prog_cc_g=yes
  3771 +else
  3772 +  ac_cv_prog_cc_g=no
  3773 +fi
  3774 +rm -f conftest*
  3776 +fi
  3778 +echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
  3779 +  if test "$ac_test_CFLAGS" = set; then
  3780 +    CFLAGS="$ac_save_CFLAGS"
  3781 +  elif test $ac_cv_prog_cc_g = yes; then
  3782 +    CFLAGS="-g -O2"
  3783 +  else
  3784 +    CFLAGS="-O2"
  3785 +  fi
  3786 +else
  3787 +  GCC=
  3788 +  test "${CFLAGS+set}" = set || CFLAGS="-g"
  3789 +fi
  3792 +# AC_CHECK_TOOL does AC_REQUIRE (AC_CANONICAL_BUILD).  If we don't
  3793 +# run it explicitly here, it will be run implicitly before
  3794 +# NEWLIB_CONFIGURE, which doesn't work because that means that it will
  3795 +# be run before AC_CANONICAL_HOST.
  3796 +echo $ac_n "checking build system type""... $ac_c" 1>&6
  3797 +echo "configure:1079: checking build system type" >&5
  3799 +build_alias=$build
  3800 +case "$build_alias" in
  3801 +NONE)
  3802 +  case $nonopt in
  3803 +  NONE) build_alias=$host_alias ;;
  3804 +  *) build_alias=$nonopt ;;
  3805 +  esac ;;
  3806 +esac
  3808 +build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
  3809 +build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
  3810 +build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
  3811 +build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
  3812 +echo "$ac_t""$build" 1>&6
  3815 +# Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
  3816 +set dummy ${ac_tool_prefix}as; ac_word=$2
  3817 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  3818 +echo "configure:1100: checking for $ac_word" >&5
  3819 +if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
  3820 +  echo $ac_n "(cached) $ac_c" 1>&6
  3821 +else
  3822 +  if test -n "$AS"; then
  3823 +  ac_cv_prog_AS="$AS" # Let the user override the test.
  3824 +else
  3825 +  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  3826 +  ac_dummy="$PATH"
  3827 +  for ac_dir in $ac_dummy; do
  3828 +    test -z "$ac_dir" && ac_dir=.
  3829 +    if test -f $ac_dir/$ac_word; then
  3830 +      ac_cv_prog_AS="${ac_tool_prefix}as"
  3831 +      break
  3832 +    fi
  3833 +  done
  3834 +  IFS="$ac_save_ifs"
  3835 +  test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="as"
  3836 +fi
  3837 +fi
  3838 +AS="$ac_cv_prog_AS"
  3839 +if test -n "$AS"; then
  3840 +  echo "$ac_t""$AS" 1>&6
  3841 +else
  3842 +  echo "$ac_t""no" 1>&6
  3843 +fi
  3847 +# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
  3848 +set dummy ${ac_tool_prefix}ar; ac_word=$2
  3849 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  3850 +echo "configure:1132: checking for $ac_word" >&5
  3851 +if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
  3852 +  echo $ac_n "(cached) $ac_c" 1>&6
  3853 +else
  3854 +  if test -n "$AR"; then
  3855 +  ac_cv_prog_AR="$AR" # Let the user override the test.
  3856 +else
  3857 +  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  3858 +  ac_dummy="$PATH"
  3859 +  for ac_dir in $ac_dummy; do
  3860 +    test -z "$ac_dir" && ac_dir=.
  3861 +    if test -f $ac_dir/$ac_word; then
  3862 +      ac_cv_prog_AR="${ac_tool_prefix}ar"
  3863 +      break
  3864 +    fi
  3865 +  done
  3866 +  IFS="$ac_save_ifs"
  3867 +  test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
  3868 +fi
  3869 +fi
  3870 +AR="$ac_cv_prog_AR"
  3871 +if test -n "$AR"; then
  3872 +  echo "$ac_t""$AR" 1>&6
  3873 +else
  3874 +  echo "$ac_t""no" 1>&6
  3875 +fi
  3879 +# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
  3880 +set dummy ${ac_tool_prefix}ranlib; ac_word=$2
  3881 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  3882 +echo "configure:1164: checking for $ac_word" >&5
  3883 +if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
  3884 +  echo $ac_n "(cached) $ac_c" 1>&6
  3885 +else
  3886 +  if test -n "$RANLIB"; then
  3887 +  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
  3888 +else
  3889 +  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  3890 +  ac_dummy="$PATH"
  3891 +  for ac_dir in $ac_dummy; do
  3892 +    test -z "$ac_dir" && ac_dir=.
  3893 +    if test -f $ac_dir/$ac_word; then
  3894 +      ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
  3895 +      break
  3896 +    fi
  3897 +  done
  3898 +  IFS="$ac_save_ifs"
  3899 +fi
  3900 +fi
  3901 +RANLIB="$ac_cv_prog_RANLIB"
  3902 +if test -n "$RANLIB"; then
  3903 +  echo "$ac_t""$RANLIB" 1>&6
  3904 +else
  3905 +  echo "$ac_t""no" 1>&6
  3906 +fi
  3909 +if test -z "$ac_cv_prog_RANLIB"; then
  3910 +if test -n "$ac_tool_prefix"; then
  3911 +  # Extract the first word of "ranlib", so it can be a program name with args.
  3912 +set dummy ranlib; ac_word=$2
  3913 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  3914 +echo "configure:1196: checking for $ac_word" >&5
  3915 +if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
  3916 +  echo $ac_n "(cached) $ac_c" 1>&6
  3917 +else
  3918 +  if test -n "$RANLIB"; then
  3919 +  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
  3920 +else
  3921 +  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  3922 +  ac_dummy="$PATH"
  3923 +  for ac_dir in $ac_dummy; do
  3924 +    test -z "$ac_dir" && ac_dir=.
  3925 +    if test -f $ac_dir/$ac_word; then
  3926 +      ac_cv_prog_RANLIB="ranlib"
  3927 +      break
  3928 +    fi
  3929 +  done
  3930 +  IFS="$ac_save_ifs"
  3931 +  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
  3932 +fi
  3933 +fi
  3934 +RANLIB="$ac_cv_prog_RANLIB"
  3935 +if test -n "$RANLIB"; then
  3936 +  echo "$ac_t""$RANLIB" 1>&6
  3937 +else
  3938 +  echo "$ac_t""no" 1>&6
  3939 +fi
  3941 +else
  3942 +  RANLIB=":"
  3943 +fi
  3944 +fi
  3948 +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
  3951 +#AM_MAINTAINER_MODE
  3953 +# We need AM_EXEEXT to keep automake happy in cygnus mode.  However,
  3954 +# at least currently, we never actually build a program, so we never
  3955 +# need to use $(EXEEXT).  Moreover, the test for EXEEXT normally
  3956 +# fails, because we are probably configuring with a cross compiler
  3957 +# which can't create executables.  So we include AM_EXEEXT to keep
  3958 +# automake happy, but we don't execute it, since we don't care about
  3959 +# the result.
  3960 +if false; then
  3963 +echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
  3964 +echo "configure:1246: checking for executable suffix" >&5
  3965 +if eval "test \"`echo '$''{'am_cv_exeext'+set}'`\" = set"; then
  3966 +  echo $ac_n "(cached) $ac_c" 1>&6
  3967 +else
  3968 +  if test "$CYGWIN32" = yes || test "$MINGW32" = yes; then
  3969 +am_cv_exeext=.exe
  3970 +else
  3971 +cat > am_c_test.c << 'EOF'
  3972 +int main() {
  3973 +/* Nothing needed here */
  3974 +}
  3975 +EOF
  3976 +${CC-cc} -o am_c_test $CFLAGS $CPPFLAGS $LDFLAGS am_c_test.c $LIBS 1>&5
  3977 +am_cv_exeext=
  3978 +for file in am_c_test.*; do
  3979 +   case $file in
  3980 +    *.c) ;;
  3981 +    *.o) ;;
  3982 +    *) am_cv_exeext=`echo $file | sed -e s/am_c_test//` ;;
  3983 +   esac
  3984 +done
  3985 +rm -f am_c_test*
  3986 +fi
  3988 +test x"${am_cv_exeext}" = x && am_cv_exeext=no
  3989 +fi
  3990 +EXEEXT=""
  3991 +test x"${am_cv_exeext}" != xno && EXEEXT=${am_cv_exeext}
  3992 +echo "$ac_t""${am_cv_exeext}" 1>&6
  3994 +fi
  3996 +. ${newlib_basedir}/configure.host
  3998 +case ${newlib_basedir} in
  3999 +/* | A-Za-z:/\\*) newlib_flagbasedir=${newlib_basedir} ;;
  4000 +*) newlib_flagbasedir='$(top_builddir)/'${newlib_basedir} ;;
  4001 +esac
  4003 +newlib_cflags="${newlib_cflags} -I"'$(top_builddir)'"/../../../targ-include -I${newlib_flagbasedir}/libc/include"
  4004 +case "${host}" in
  4005 +  *-*-cygwin32*)
  4006 +    newlib_cflags="${newlib_cflags} -I${newlib_flagbasedir}/../winsup/include"
  4007 +    ;;
  4008 +esac
  4010 +newlib_cflags="${newlib_cflags} -fno-builtin"
  4012 +NEWLIB_CFLAGS=${newlib_cflags}
  4019 +trap '' 1 2 15
  4020 +cat > confcache <<\EOF
  4021 +# This file is a shell script that caches the results of configure
  4022 +# tests run on this system so they can be shared between configure
  4023 +# scripts and configure runs.  It is not useful on other systems.
  4024 +# If it contains results you don't want to keep, you may remove or edit it.
  4025 +#
  4026 +# By default, configure uses ./config.cache as the cache file,
  4027 +# creating it if it does not exist already.  You can give configure
  4028 +# the --cache-file=FILE option to use a different cache file; that is
  4029 +# what configure does when it calls configure scripts in
  4030 +# subdirectories, so they share the cache.
  4031 +# Giving --cache-file=/dev/null disables caching, for debugging configure.
  4032 +# config.status only pays attention to the cache file if you give it the
  4033 +# --recheck option to rerun configure.
  4034 +#
  4035 +EOF
  4036 +# The following way of writing the cache mishandles newlines in values,
  4037 +# but we know of no workaround that is simple, portable, and efficient.
  4038 +# So, don't put newlines in cache variables' values.
  4039 +# Ultrix sh set writes to stderr and can't be redirected directly,
  4040 +# and sets the high bit in the cache file unless we assign to the vars.
  4041 +(set) 2>&1 |
  4042 +  case `(ac_space=' '; set | grep ac_space) 2>&1` in
  4043 +  *ac_space=\ *)
  4044 +    # `set' does not quote correctly, so add quotes (double-quote substitution
  4045 +    # turns \\\\ into \\, and sed turns \\ into \).
  4046 +    sed -n \
  4047 +      -e "s/'/'\\\\''/g" \
  4048 +      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
  4049 +    ;;
  4050 +  *)
  4051 +    # `set' quotes correctly as required by POSIX, so do not add quotes.
  4052 +    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
  4053 +    ;;
  4054 +  esac >> confcache
  4055 +if cmp -s $cache_file confcache; then
  4056 +  :
  4057 +else
  4058 +  if test -w $cache_file; then
  4059 +    echo "updating cache $cache_file"
  4060 +    cat confcache > $cache_file
  4061 +  else
  4062 +    echo "not updating unwritable cache $cache_file"
  4063 +  fi
  4064 +fi
  4065 +rm -f confcache
  4067 +trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  4069 +test "x$prefix" = xNONE && prefix=$ac_default_prefix
  4070 +# Let make expand exec_prefix.
  4071 +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
  4073 +# Any assignment to VPATH causes Sun make to only execute
  4074 +# the first set of double-colon rules, so remove it if not needed.
  4075 +# If there is a colon in the path, we need to keep it.
  4076 +if test "x$srcdir" = x.; then
  4077 +  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
  4078 +fi
  4080 +trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
  4082 +# Transform confdefs.h into DEFS.
  4083 +# Protect against shell expansion while executing Makefile rules.
  4084 +# Protect against Makefile macro expansion.
  4085 +cat > conftest.defs <<\EOF
  4086 +s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
  4087 +s%[ 	`~#$^&*(){}\\|;'"<>?]%\\&%g
  4088 +s%\[%\\&%g
  4089 +s%\]%\\&%g
  4090 +s%\$%$$%g
  4091 +EOF
  4092 +DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
  4093 +rm -f conftest.defs
  4096 +# Without the "./", some shells look in PATH for config.status.
  4097 +: ${CONFIG_STATUS=./config.status}
  4099 +echo creating $CONFIG_STATUS
  4100 +rm -f $CONFIG_STATUS
  4101 +cat > $CONFIG_STATUS <<EOF
  4102 +#! /bin/sh
  4103 +# Generated automatically by configure.
  4104 +# Run this file to recreate the current configuration.
  4105 +# This directory was configured as follows,
  4106 +# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  4107 +#
  4108 +# $0 $ac_configure_args
  4109 +#
  4110 +# Compiler output produced by configure, useful for debugging
  4111 +# configure, is in ./config.log if it exists.
  4113 +ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
  4114 +for ac_option
  4115 +do
  4116 +  case "\$ac_option" in
  4117 +  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  4118 +    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
  4119 +    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  4120 +  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  4121 +    echo "$CONFIG_STATUS generated by autoconf version 2.13"
  4122 +    exit 0 ;;
  4123 +  -help | --help | --hel | --he | --h)
  4124 +    echo "\$ac_cs_usage"; exit 0 ;;
  4125 +  *) echo "\$ac_cs_usage"; exit 1 ;;
  4126 +  esac
  4127 +done
  4129 +ac_given_srcdir=$srcdir
  4130 +ac_given_INSTALL="$INSTALL"
  4132 +trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
  4133 +EOF
  4134 +cat >> $CONFIG_STATUS <<EOF
  4136 +# Protect against being on the right side of a sed subst in config.status.
  4137 +sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
  4138 + s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
  4139 +$ac_vpsub
  4140 +$extrasub
  4141 +s%@SHELL@%$SHELL%g
  4142 +s%@CFLAGS@%$CFLAGS%g
  4143 +s%@CPPFLAGS@%$CPPFLAGS%g
  4144 +s%@CXXFLAGS@%$CXXFLAGS%g
  4145 +s%@FFLAGS@%$FFLAGS%g
  4146 +s%@DEFS@%$DEFS%g
  4147 +s%@LDFLAGS@%$LDFLAGS%g
  4148 +s%@LIBS@%$LIBS%g
  4149 +s%@exec_prefix@%$exec_prefix%g
  4150 +s%@prefix@%$prefix%g
  4151 +s%@program_transform_name@%$program_transform_name%g
  4152 +s%@bindir@%$bindir%g
  4153 +s%@sbindir@%$sbindir%g
  4154 +s%@libexecdir@%$libexecdir%g
  4155 +s%@datadir@%$datadir%g
  4156 +s%@sysconfdir@%$sysconfdir%g
  4157 +s%@sharedstatedir@%$sharedstatedir%g
  4158 +s%@localstatedir@%$localstatedir%g
  4159 +s%@libdir@%$libdir%g
  4160 +s%@includedir@%$includedir%g
  4161 +s%@oldincludedir@%$oldincludedir%g
  4162 +s%@infodir@%$infodir%g
  4163 +s%@mandir@%$mandir%g
  4164 +s%@newlib_basedir@%$newlib_basedir%g
  4165 +s%@host@%$host%g
  4166 +s%@host_alias@%$host_alias%g
  4167 +s%@host_cpu@%$host_cpu%g
  4168 +s%@host_vendor@%$host_vendor%g
  4169 +s%@host_os@%$host_os%g
  4170 +s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
  4171 +s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
  4172 +s%@INSTALL_DATA@%$INSTALL_DATA%g
  4173 +s%@PACKAGE@%$PACKAGE%g
  4174 +s%@VERSION@%$VERSION%g
  4175 +s%@ACLOCAL@%$ACLOCAL%g
  4176 +s%@AUTOCONF@%$AUTOCONF%g
  4177 +s%@AUTOMAKE@%$AUTOMAKE%g
  4178 +s%@AUTOHEADER@%$AUTOHEADER%g
  4179 +s%@MAKEINFO@%$MAKEINFO%g
  4180 +s%@SET_MAKE@%$SET_MAKE%g
  4181 +s%@CC@%$CC%g
  4182 +s%@build@%$build%g
  4183 +s%@build_alias@%$build_alias%g
  4184 +s%@build_cpu@%$build_cpu%g
  4185 +s%@build_vendor@%$build_vendor%g
  4186 +s%@build_os@%$build_os%g
  4187 +s%@AS@%$AS%g
  4188 +s%@AR@%$AR%g
  4189 +s%@RANLIB@%$RANLIB%g
  4190 +s%@EXEEXT@%$EXEEXT%g
  4191 +s%@NEWLIB_CFLAGS@%$NEWLIB_CFLAGS%g
  4192 +s%@machine_dir@%$machine_dir%g
  4193 +s%@sys_dir@%$sys_dir%g
  4195 +CEOF
  4196 +EOF
  4198 +cat >> $CONFIG_STATUS <<\EOF
  4200 +# Split the substitutions into bite-sized pieces for seds with
  4201 +# small command number limits, like on Digital OSF/1 and HP-UX.
  4202 +ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
  4203 +ac_file=1 # Number of current file.
  4204 +ac_beg=1 # First line for current file.
  4205 +ac_end=$ac_max_sed_cmds # Line after last line for current file.
  4206 +ac_more_lines=:
  4207 +ac_sed_cmds=""
  4208 +while $ac_more_lines; do
  4209 +  if test $ac_beg -gt 1; then
  4210 +    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
  4211 +  else
  4212 +    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
  4213 +  fi
  4214 +  if test ! -s conftest.s$ac_file; then
  4215 +    ac_more_lines=false
  4216 +    rm -f conftest.s$ac_file
  4217 +  else
  4218 +    if test -z "$ac_sed_cmds"; then
  4219 +      ac_sed_cmds="sed -f conftest.s$ac_file"
  4220 +    else
  4221 +      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
  4222 +    fi
  4223 +    ac_file=`expr $ac_file + 1`
  4224 +    ac_beg=$ac_end
  4225 +    ac_end=`expr $ac_end + $ac_max_sed_cmds`
  4226 +  fi
  4227 +done
  4228 +if test -z "$ac_sed_cmds"; then
  4229 +  ac_sed_cmds=cat
  4230 +fi
  4231 +EOF
  4233 +cat >> $CONFIG_STATUS <<EOF
  4235 +CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
  4236 +EOF
  4237 +cat >> $CONFIG_STATUS <<\EOF
  4238 +for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  4239 +  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  4240 +  case "$ac_file" in
  4241 +  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
  4242 +       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  4243 +  *) ac_file_in="${ac_file}.in" ;;
  4244 +  esac
  4246 +  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
  4248 +  # Remove last slash and all that follows it.  Not all systems have dirname.
  4249 +  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  4250 +  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  4251 +    # The file is in a subdirectory.
  4252 +    test ! -d "$ac_dir" && mkdir "$ac_dir"
  4253 +    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
  4254 +    # A "../" for each directory in $ac_dir_suffix.
  4255 +    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  4256 +  else
  4257 +    ac_dir_suffix= ac_dots=
  4258 +  fi
  4260 +  case "$ac_given_srcdir" in
  4261 +  .)  srcdir=.
  4262 +      if test -z "$ac_dots"; then top_srcdir=.
  4263 +      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  4264 +  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  4265 +  *) # Relative path.
  4266 +    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  4267 +    top_srcdir="$ac_dots$ac_given_srcdir" ;;
  4268 +  esac
  4270 +  case "$ac_given_INSTALL" in
  4271 +  [/$]*) INSTALL="$ac_given_INSTALL" ;;
  4272 +  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
  4273 +  esac
  4275 +  echo creating "$ac_file"
  4276 +  rm -f "$ac_file"
  4277 +  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
  4278 +  case "$ac_file" in
  4279 +  *Makefile*) ac_comsub="1i\\
  4280 +# $configure_input" ;;
  4281 +  *) ac_comsub= ;;
  4282 +  esac
  4284 +  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  4285 +  sed -e "$ac_comsub
  4286 +s%@configure_input@%$configure_input%g
  4287 +s%@srcdir@%$srcdir%g
  4288 +s%@top_srcdir@%$top_srcdir%g
  4289 +s%@INSTALL@%$INSTALL%g
  4290 +" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
  4291 +fi; done
  4292 +rm -f conftest.s*
  4294 +EOF
  4295 +cat >> $CONFIG_STATUS <<EOF
  4297 +EOF
  4298 +cat >> $CONFIG_STATUS <<\EOF
  4300 +exit 0
  4301 +EOF
  4302 +chmod +x $CONFIG_STATUS
  4303 +rm -fr confdefs* $ac_clean_files
  4304 +test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
  4306 diff -urN newlib-1.8.2/newlib/libc/sys/dreamcast/configure.in newlib-1.8.2-dc/newlib/libc/sys/dreamcast/configure.in
  4307 --- newlib-1.8.2/newlib/libc/sys/dreamcast/configure.in	1970-01-01 10:00:00.000000000 +1000
  4308 +++ newlib-1.8.2-dc/newlib/libc/sys/dreamcast/configure.in	2006-07-06 18:28:31.000000000 +1000
  4309 @@ -0,0 +1,12 @@
  4310 +dnl This is the newlib/libc/sys/sh configure.in file.
  4311 +dnl Process this file with autoconf to produce a configure script.
  4313 +AC_PREREQ(2.5)
  4314 +AC_INIT(sbrk.c)
  4316 +dnl Can't be done in NEWLIB_CONFIGURE because that confuses automake. 
  4317 +AC_CONFIG_AUX_DIR(../../../..)
  4319 +NEWLIB_CONFIGURE(../../..)
  4321 +AC_OUTPUT(Makefile)
  4322 diff -urN newlib-1.8.2/newlib/libc/sys/dreamcast/creat.c newlib-1.8.2-dc/newlib/libc/sys/dreamcast/creat.c
  4323 --- newlib-1.8.2/newlib/libc/sys/dreamcast/creat.c	1970-01-01 10:00:00.000000000 +1000
  4324 +++ newlib-1.8.2-dc/newlib/libc/sys/dreamcast/creat.c	2006-07-06 18:28:31.000000000 +1000
  4325 @@ -0,0 +1,22 @@
  4326 +#include <sys/types.h>
  4327 +#include <sys/fcntl.h>
  4329 +#include "vfs.h"
  4331 +int
  4332 +creat (const char *path, mode_t mode)
  4333 +{
  4334 +  char *obj = _newlib_vfs_new_string (path);
  4336 +  struct media_ops *mops = _newlib_vfs_get_media_ops (path);
  4337 +  struct file *pf = mops->creat (obj, mode);
  4339 +  _newlib_vfs_delete_string (obj);
  4341 +  if (pf != NULL)
  4342 +  {
  4343 +    return _newlib_vfs_insert_file (pf);
  4344 +  }
  4346 +  return -1;
  4347 +}
  4348 diff -urN newlib-1.8.2/newlib/libc/sys/dreamcast/crt0.S newlib-1.8.2-dc/newlib/libc/sys/dreamcast/crt0.S
  4349 --- newlib-1.8.2/newlib/libc/sys/dreamcast/crt0.S	1970-01-01 10:00:00.000000000 +1000
  4350 +++ newlib-1.8.2-dc/newlib/libc/sys/dreamcast/crt0.S	2006-07-06 18:28:31.000000000 +1000
  4351 @@ -0,0 +1,175 @@
  4353 +! need this here so that converting ELFs to binary doesn't break on the DC.
  4354 +! Note: this is a hack, unless I can find a better way to do this.
  4355 +	.section .init
  4356 +_fake_start:
  4357 +	mov.l  start_k, r0
  4358 +	jmp    @r0
  4359 +	nop
  4361 +	.align  4
  4362 +start_k:
  4363 +	.long _start
  4365 +	.section .text
  4366 +	.global	_start
  4367 +	.global ___exit
  4368 +	/*.global _atexit*/
  4369 +_start:
  4370 +	mov.l	setup_cache_k,r0
  4371 +	mov.l	p2_mask,r1
  4372 +	or	r1,r0
  4373 +	jmp	@r0
  4374 +	nop
  4375 +setup_cache:
  4376 +	mov.l	ccr_addr,r0
  4377 +	mov.w	ccr_data,r1
  4378 +	mov.l	r1,@r0
  4379 +	mov.l	start_2_k,r0	
  4380 +	nop
  4381 +	nop
  4382 +	nop
  4383 +	nop
  4384 +	nop
  4385 +	nop
  4386 +	nop
  4387 +	jmp	@r0	
  4388 +	nop
  4389 +start_2:		
  4390 +	mov.l	old_stack_k,r14
  4391 +	mov.l	r15,@r14
  4392 +	mov.l	old_pr_k,r14
  4393 +	sts	pr,r15
  4394 +	mov.l	r15,@r14
  4395 +	mov.l	stack_k,r15
  4397 +	! zero out bss
  4398 +	mov.l	edata_k,r0
  4399 +	mov.l	end_k,r1
  4400 +	mov	#0,r2
  4401 +start_l:
  4402 +	mov.l	r2,@r0
  4403 +	add	#4,r0
  4404 +	cmp/ge	r0,r1
  4405 +	bt	start_l
  4407 +#if defined (__SH3E__) || defined(__SH4_SINGLE__) || defined(__SH4__) || defined(__SH4_SINGLE_ONLY)
  4408 +	mov.l set_fpscr_k, r1
  4409 +	jsr @r1
  4410 +	mov #0,r4
  4411 +	lds r3,fpscr
  4412 +#endif /*  defined (__SH3E__) || defined(__SH4_SINGLE__) || defined(__SH4__) || defined(__SH4_SINGLE_ONLY__) */
  4414 +get_utime:
  4415 +	! Get the current time and save it for future calls to _times().
  4416 +	mov.l	rtc_h,r1
  4417 +	mov.l	@r1,r2
  4418 +	mov.l	rtc_l,r3
  4419 +	mov.l	@r3,r4
  4420 +	shll16	r2
  4421 +	mov.l	rtc_mask,r1
  4422 +	and	r1,r2
  4423 +	extu.w	r4,r4
  4424 +	or	r4,r2
  4425 +	mov.l	newlib_dreamcast_utime,r0
  4426 +	mov.l	r2,@r0
  4428 +	! arrange for exit to call fini
  4429 +	mov.l   atexit_k,r0
  4430 +	mov.l   fini_k,r4
  4431 +	jsr     @r0
  4432 +	nop
  4434 +	! call init
  4435 +	mov.l   init_k,r0
  4436 +	jsr     @r0
  4437 +	nop
  4439 +	! call the mainline	
  4440 +	mov.l	main_k,r0
  4441 +	jsr	@r0
  4442 +	or	r0,r0
  4444 +	! call exit
  4445 +	mov	r0,r4
  4446 +	mov.l	exit_k,r0
  4447 +	jsr	@r0
  4448 +	or	r0,r0
  4450 +___exit:
  4451 +	mov.l	old_pr_k,r14
  4452 +	mov.l	@r14,r15	
  4453 +	lds	r15,pr
  4454 +	mov.l	old_stack_k,r14
  4455 +	mov.l	@r14,r15	
  4456 +	rts
  4457 +	nop
  4458 +/*
  4459 +_atexit:
  4460 +	rts
  4461 +	nop
  4462 +*/		
  4463 +	.align 4
  4464 +#if defined (__SH3E__) || defined(__SH4_SINGLE__) || defined(__SH4__) || defined(__SH4_SINGLE_ONLY__)
  4465 +set_fpscr_k:
  4466 +	.long	___set_fpscr
  4467 +#endif /*  defined (__SH3E__) || defined(__SH4_SINGLE__) || defined(__SH4__) || defined(SH4_SINGLE_ONLY) */
  4468 +stack_k:
  4469 +	.long	_stack	
  4470 +edata_k:
  4471 +	.long	_edata
  4472 +end_k:
  4473 +	.long	_end
  4474 +main_k:
  4475 +	.long	_main
  4476 +exit_k:
  4477 +	.long	_exit
  4478 +atexit_k:
  4479 +	.long   _atexit
  4480 +init_k:
  4481 +	.long   _init
  4482 +fini_k:
  4483 +	.long   _fini
  4484 +old_stack_k:
  4485 +	.long	_old_stack
  4486 +old_pr_k:
  4487 +	.long	_old_pr
  4489 +_old_stack:
  4490 +	.long	0
  4491 +_old_pr:
  4492 +	.long	0
  4494 +setup_cache_k:
  4495 +	.long	setup_cache
  4496 +start_2_k:	
  4497 +	.long	start_2	
  4498 +p2_mask:
  4499 +	.long	0xa0000000
  4500 +ccr_addr:
  4501 +	.long	0xff00001c
  4502 +ccr_data:
  4503 +	.word	0x090b
  4505 +	.align 4
  4507 +rtc_h:
  4508 +	.long	0xa0710000
  4509 +rtc_l:
  4510 +	.long	0xa0710004
  4511 +rtc_mask:
  4512 +	.long	0xffff0000
  4513 +newlib_dreamcast_utime:
  4514 +	.long	__newlib_dreamcast_utime
  4516 +	.section .data
  4517 +	.global __newlib_dreamcast_utime
  4519 +__newlib_dreamcast_utime:
  4520 +	.long   0x00000000
  4522 +#ifdef __ELF__
  4523 +	.section .stack,"aw"
  4524 +#else
  4525 +	.section .stack
  4526 +#endif
  4527 diff -urN newlib-1.8.2/newlib/libc/sys/dreamcast/dcload.S newlib-1.8.2-dc/newlib/libc/sys/dreamcast/dcload.S
  4528 --- newlib-1.8.2/newlib/libc/sys/dreamcast/dcload.S	1970-01-01 10:00:00.000000000 +1000
  4529 +++ newlib-1.8.2-dc/newlib/libc/sys/dreamcast/dcload.S	2006-07-06 19:27:39.000000000 +1000
  4530 @@ -0,0 +1,10 @@
  4531 +.global _dcloadsyscall
  4532 +_dcloadsyscall:
  4533 +  mov.l dcloadsyscall_k,r0
  4534 +  mov.l @r0,r0
  4535 +  jmp @r0
  4536 +  nop
  4538 +.align 4
  4539 +dcloadsyscall_k:
  4540 +  .long   0x8c004008
  4541 diff -urN newlib-1.8.2/newlib/libc/sys/dreamcast/dcload_vfs.c newlib-1.8.2-dc/newlib/libc/sys/dreamcast/dcload_vfs.c
  4542 --- newlib-1.8.2/newlib/libc/sys/dreamcast/dcload_vfs.c	1970-01-01 10:00:00.000000000 +1000
  4543 +++ newlib-1.8.2-dc/newlib/libc/sys/dreamcast/dcload_vfs.c	2006-07-06 18:31:26.000000000 +1000
  4544 @@ -0,0 +1,242 @@
  4545 +/* Support routines for host access via Andrew K's dcload.  dcload offers
  4546 + full host file-system access along with a few POSIX-like functions. */
  4548 +/* FIXME: If the host is returning negative values (error codes), then
  4549 + we need to assign the proper value to errno and return -1 as per newlib's
  4550 + conventions. */
  4552 +/* FIXME: Split some of this off into a separate file, dcload.c.  This will
  4553 + contain public functions that coincide with the prototypes in
  4554 + include/dcload.h */
  4556 +#include <sys/types.h>
  4557 +#include <sys/stat.h>
  4558 +#include <errno.h>
  4559 +#include <stdlib.h>
  4561 +#include "vfs.h"
  4563 +static struct media_ops dcload_host_media_ops;
  4564 +static struct file_ops dcload_host_file_ops;
  4566 +#define DCLOAD_MAGIC      0xdeadbeef
  4567 +#define DCLOAD_ALT_MAGIC  0xfeedface
  4568 +#define DCLOAD_MAGIC_ADDR 0x8c004004
  4570 +/* True if we have console/file-system access on the host */
  4571 +static int host_enabled = 1;
  4573 +/* Determine whether we're loaded under dcload and if so, whether or not
  4574 + the console/file-server is enabled.  If the console/file-server isn't
  4575 + enabled, then we won't have anything meaningful to do in the host access
  4576 + routines, so they'll be replaced with invalid media/file ops in our init
  4577 + routine. */
  4579 +int _newlib_vfs_is_dcload (void)
  4580 +{
  4581 +  /* Check for either magic value */
  4582 +  unsigned long magic = *(unsigned long *)DCLOAD_MAGIC_ADDR;
  4584 +  if (magic == DCLOAD_MAGIC)
  4585 +  {
  4586 +    return 1;
  4587 +  }
  4588 +  else if (magic == DCLOAD_ALT_MAGIC) /* Disable host access */
  4589 +  {
  4590 +    host_enabled = 0;
  4591 +    return 1;
  4592 +  }
  4594 +  return 0;
  4595 +}
  4597 +void _newlib_vfs_dcload_init (void)
  4598 +{
  4599 +  _newlib_vfs_initialized = VFS_LOADER_DCLOAD_NOHOST;
  4601 +  if (host_enabled)
  4602 +  {
  4603 +    /* FIXME: Rework this... */
  4604 +    struct file * stdin_file  = _newlib_vfs_first_file;
  4605 +    struct file * stdout_file = stdin_file->next;
  4606 +    struct file * stderr_file = stdout_file->next;
  4608 +    _newlib_vfs_initialized = VFS_LOADER_DCLOAD_HOST;
  4609 +	  _newlib_vfs_host_media_ops = &dcload_host_media_ops;
  4611 +    /* Reroute stdin, stdout, and stderr through dcload's host console. */
  4612 +    stdin_file->fops  = &dcload_host_file_ops;
  4613 +    stdout_file->fops = &dcload_host_file_ops;
  4614 +    stderr_file->fops = &dcload_host_file_ops;
  4615 +  }
  4617 +  /* All media ops are initially set to invalid so our work is done. */
  4618 +}
  4620 +extern int dcloadsyscall (int func, ...);
  4622 +/* dcload host media operations */
  4624 +/* Perform the open/creat syscall and allocate space for a new file if
  4625 + we get a valid fd.  Otherwise return the errno and NULL on errror. */
  4626 +static struct file *do_open_media_op (int func, const char *obj, int arg, ...)
  4627 +{
  4628 +  struct file *pf;
  4629 +  int res = dcloadsyscall (func, obj, arg);
  4630 +  if (res >= 0)
  4631 +  {
  4632 +    pf = (struct file *) malloc (sizeof (struct file));
  4634 +    if (pf)
  4635 +    {
  4636 +      /* The library fd is set in _newlib_vfs_insert_file */
  4637 +      pf->next = NULL;
  4638 +			pf->fd = 0;
  4639 +      pf->media_fd = res;
  4640 +      pf->fops = &dcload_host_file_ops;
  4641 +      pf->specifics = NULL;
  4642 +      return pf;
  4643 +    }
  4644 +  }
  4646 +  return NULL;
  4647 +}
  4649 +#define OPEN_NR 2
  4650 +static struct file *dcload_open_media_op (const char *obj, int flags,
  4651 +                                          mode_t mode)
  4652 +{
  4653 +  return do_open_media_op (OPEN_NR, obj, flags, mode);
  4654 +}
  4656 +#define CREAT_NR 4
  4657 +static struct file *dcload_creat_media_op (const char *obj, mode_t mode)
  4658 +{
  4659 +  return do_open_media_op (CREAT_NR, obj, mode);
  4660 +}
  4662 +#define LINK_NR 5
  4663 +static int dcload_link_media_op (const char *old_obj, const char *new_obj)
  4664 +{
  4665 +  return dcloadsyscall (LINK_NR, old_obj, new_obj);
  4666 +}
  4668 +#define UNLINK_NR 6
  4669 +static int dcload_unlink_media_op (const char *obj)
  4670 +{
  4671 +  return dcloadsyscall (UNLINK_NR, obj);
  4672 +}
  4674 +#define STAT_NR 12
  4675 +static int dcload_stat_media_op (const char *obj, struct stat *pstat)
  4676 +{
  4677 +  return dcloadsyscall (STAT_NR, obj, pstat);
  4678 +}
  4680 +#define CHMOD_NR 8
  4681 +static int dcload_chmod_media_op (const char *obj, mode_t mode)
  4682 +{
  4683 +  return dcloadsyscall (CHMOD_NR, obj, mode);
  4684 +}
  4686 +#define CHDIR_NR 7
  4687 +static int dcload_chdir_media_op (const char *obj)
  4688 +{
  4689 +  return dcloadsyscall (CHDIR_NR, obj);
  4690 +}
  4692 +/* dcload host file operations */
  4694 +static size_t do_rw_file_op (int func, struct file *pf, void *buf, size_t cnt)
  4695 +{
  4696 +  return dcloadsyscall (func, pf->media_fd, buf, cnt);
  4697 +}
  4699 +#define READ_NR 0
  4700 +static size_t dcload_read_file_op (struct file *pf, void *buf, size_t cnt)
  4701 +{
  4702 +  return do_rw_file_op (READ_NR, pf, buf, cnt);
  4703 +}
  4705 +#define WRITE_NR 1
  4706 +static size_t dcload_write_file_op (struct file *pf, void *buf, size_t cnt)
  4707 +{
  4708 +  return do_rw_file_op (WRITE_NR, pf, buf, cnt);
  4709 +}
  4711 +#define LSEEK_NR 9
  4712 +static off_t dcload_lseek_file_op (struct file *pf, off_t pos, int whence)
  4713 +{
  4714 +  return dcloadsyscall (LSEEK_NR, pf->media_fd, pos, whence);
  4715 +}
  4717 +#define CLOSE_NR 3
  4718 +static int dcload_close_file_op (struct file *pf)
  4719 +{
  4720 +  return dcloadsyscall (CLOSE_NR, pf->media_fd);
  4721 +}
  4723 +#define FSTAT_NR 10
  4724 +static int dcload_fstat_file_op (struct file *pf, struct stat *pstat)
  4725 +{
  4726 +  return dcloadsyscall (FSTAT_NR, pf->media_fd, pstat);
  4727 +}
  4729 +#define EXIT_NR 15
  4730 +void _newlib_vfs_dcload_exit (int n)
  4731 +{
  4732 +  dcloadsyscall (EXIT_NR, n);
  4733 +}
  4735 +#define ASSIGN_WRKMEM_NR 14
  4736 +void dcload_assign_wrkmem (void *buf)
  4737 +{
  4738 +  dcloadsyscall (ASSIGN_WRKMEM_NR, buf);
  4739 +}
  4741 +/* media_ops for host file-system access */
  4743 +int dcload_mkdir_media_op( const char *c, mode_t mode )
  4744 +{
  4745 +  errno = ENOSYS;
  4746 +  return -1;
  4747 +}
  4749 +int dcload_rmdir_media_op( const char *c )
  4750 +{
  4751 +  errno = ENOSYS;
  4752 +  return -1;
  4753 +}
  4755 +int dcload_ioctl_file_op( )
  4756 +{
  4757 +  errno = ENOSYS;
  4758 +  return -1;
  4759 +}
  4761 +static struct media_ops dcload_host_media_ops =
  4762 +{
  4763 +  open:                dcload_open_media_op,
  4764 +  creat:               dcload_creat_media_op,
  4765 +  link:                dcload_link_media_op,
  4766 +  unlink:              dcload_unlink_media_op,
  4767 +  stat:                dcload_stat_media_op,
  4768 +  chmod:               dcload_chmod_media_op,
  4769 +  mkdir:               dcload_mkdir_media_op,
  4770 +  rmdir:               dcload_rmdir_media_op,
  4771 +  chdir:               dcload_chdir_media_op
  4772 +};
  4774 +/* file_ops for a host file */
  4776 +static struct file_ops dcload_host_file_ops =
  4777 +{
  4778 +  lseek:               dcload_lseek_file_op,
  4779 +  close:               dcload_close_file_op,
  4780 +  read:                dcload_read_file_op,
  4781 +  write:               dcload_write_file_op,
  4782 +  ioctl:               dcload_ioctl_file_op,
  4783 +  fstat:               dcload_fstat_file_op
  4784 +};
  4787 diff -urN newlib-1.8.2/newlib/libc/sys/dreamcast/dup.c newlib-1.8.2-dc/newlib/libc/sys/dreamcast/dup.c
  4788 --- newlib-1.8.2/newlib/libc/sys/dreamcast/dup.c	1970-01-01 10:00:00.000000000 +1000
  4789 +++ newlib-1.8.2-dc/newlib/libc/sys/dreamcast/dup.c	2006-07-06 18:28:31.000000000 +1000
  4790 @@ -0,0 +1,2 @@
  4791 +/* This hack is required for libstdc++ to work properly */
  4792 +int dup(int fd) { return fd; }
  4793 diff -urN newlib-1.8.2/newlib/libc/sys/dreamcast/exit.c newlib-1.8.2-dc/newlib/libc/sys/dreamcast/exit.c
  4794 --- newlib-1.8.2/newlib/libc/sys/dreamcast/exit.c	1970-01-01 10:00:00.000000000 +1000
  4795 +++ newlib-1.8.2-dc/newlib/libc/sys/dreamcast/exit.c	2006-07-07 08:34:25.000000000 +1000
  4796 @@ -0,0 +1,18 @@
  4797 +/* TODO: Do different things depending on the loader present, e.g. dcload
  4798 + has an exit() call, gdbstubs can tell gdb "W00", etc. */
  4800 +#include "vfs.h"
  4802 +void _exit(int n);
  4804 +void exit (int n) { _exit (n); }
  4806 +extern void _newlib_vfs_dcload_exit (int);
  4808 +void
  4809 +_exit (int n)
  4810 +{
  4811 +  if( _newlib_vfs_is_dcload() ) {
  4812 +    _newlib_vfs_dcload_exit (n);
  4813 +  }
  4814 +}
  4815 diff -urN newlib-1.8.2/newlib/libc/sys/dreamcast/fcntl.c newlib-1.8.2-dc/newlib/libc/sys/dreamcast/fcntl.c
  4816 --- newlib-1.8.2/newlib/libc/sys/dreamcast/fcntl.c	1970-01-01 10:00:00.000000000 +1000
  4817 +++ newlib-1.8.2-dc/newlib/libc/sys/dreamcast/fcntl.c	2006-07-06 18:28:31.000000000 +1000
  4818 @@ -0,0 +1,21 @@
  4819 +#include <sys/fcntl.h>
  4821 +/* Minimal fcntl support is necessary for C++ console streams cin, cout, and
  4822 +   cerr. */
  4823 +int
  4824 +_fcntl (int fd, int flag, ...)
  4825 +{
  4826 +  switch (flag) {
  4827 +     case F_GETFL:
  4828 +        switch (fd) {
  4829 +           case 0: return O_RDONLY;
  4830 +           case 1: return O_WRONLY;
  4831 +           case 2: return O_WRONLY;
  4832 +           default: return -1;
  4833 +        }
  4834 +     default:
  4835 +        return -1;
  4836 +  }
  4838 +  return -1;
  4839 +}
  4840 diff -urN newlib-1.8.2/newlib/libc/sys/dreamcast/fstat.c newlib-1.8.2-dc/newlib/libc/sys/dreamcast/fstat.c
  4841 --- newlib-1.8.2/newlib/libc/sys/dreamcast/fstat.c	1970-01-01 10:00:00.000000000 +1000
  4842 +++ newlib-1.8.2-dc/newlib/libc/sys/dreamcast/fstat.c	2006-07-06 18:28:31.000000000 +1000
  4843 @@ -0,0 +1,12 @@
  4844 +#include <sys/types.h>
  4845 +#include <sys/stat.h>
  4847 +#include "vfs.h"
  4849 +int
  4850 +_fstat (int fd, struct stat *pstat)
  4851 +{
  4852 +  struct file *pf = _newlib_vfs_get_file (fd);
  4854 +  return pf->fops->fstat (pf, pstat);
  4855 +}
  4856 diff -urN newlib-1.8.2/newlib/libc/sys/dreamcast/getpid.c newlib-1.8.2-dc/newlib/libc/sys/dreamcast/getpid.c
  4857 --- newlib-1.8.2/newlib/libc/sys/dreamcast/getpid.c	1970-01-01 10:00:00.000000000 +1000
  4858 +++ newlib-1.8.2-dc/newlib/libc/sys/dreamcast/getpid.c	2006-07-06 18:28:31.000000000 +1000
  4859 @@ -0,0 +1,5 @@
  4860 +int
  4861 +_getpid ()
  4862 +{
  4863 +  return 1;
  4864 +}
  4865 diff -urN newlib-1.8.2/newlib/libc/sys/dreamcast/gettimeofday.c newlib-1.8.2-dc/newlib/libc/sys/dreamcast/gettimeofday.c
  4866 --- newlib-1.8.2/newlib/libc/sys/dreamcast/gettimeofday.c	1970-01-01 10:00:00.000000000 +1000
  4867 +++ newlib-1.8.2-dc/newlib/libc/sys/dreamcast/gettimeofday.c	2006-07-06 18:28:31.000000000 +1000
  4868 @@ -0,0 +1,30 @@
  4869 +#include <time.h>
  4870 +#include <sys/time.h>
  4872 +/* Returns the number of seconds elapsed from the Unix epoch, January 1st,
  4873 + 1970.  Note that the Dreamcast counts time from January 1st, 1950, so we
  4874 + need to subtract 20 years (and 5 leap days) from the Dreamcast RTC to
  4875 + get valid values for libc's time functions. */
  4877 +#define TWENTY_YEARS ((20 * 365LU + 5) * 86400)
  4879 +int
  4880 +_gettimeofday (struct timeval *tp, struct timezone *tzp)
  4881 +{
  4882 +  if (tp)
  4883 +  {
  4884 +    unsigned long rtc_h = *(volatile unsigned long*)0xa0710000;
  4885 +    unsigned long rtc_l = *(volatile unsigned long*)0xa0710004;
  4886 +    unsigned long secs = ((rtc_h & 0xffff) << 16) | (rtc_l & 0xffff);
  4888 +    tp->tv_sec = secs - TWENTY_YEARS;
  4889 +    tp->tv_usec = 0;
  4890 +  }
  4891 +  if (tzp)
  4892 +  {
  4893 +    tzp->tz_minuteswest = 0;
  4894 +    tzp->tz_dsttime = 0;
  4895 +  }
  4897 +  return 0;
  4898 +}
  4899 diff -urN newlib-1.8.2/newlib/libc/sys/dreamcast/ioctl.c newlib-1.8.2-dc/newlib/libc/sys/dreamcast/ioctl.c
  4900 --- newlib-1.8.2/newlib/libc/sys/dreamcast/ioctl.c	1970-01-01 10:00:00.000000000 +1000
  4901 +++ newlib-1.8.2-dc/newlib/libc/sys/dreamcast/ioctl.c	2006-07-06 18:28:31.000000000 +1000
  4902 @@ -0,0 +1,9 @@
  4903 +#include "vfs.h"
  4905 +int
  4906 +ioctl (int fd, int func, long arg)
  4907 +{
  4908 +  struct file *pf = _newlib_vfs_get_file (fd);
  4910 +  return pf->fops->ioctl (pf, func, arg);
  4911 +}
  4912 diff -urN newlib-1.8.2/newlib/libc/sys/dreamcast/isatty.c newlib-1.8.2-dc/newlib/libc/sys/dreamcast/isatty.c
  4913 --- newlib-1.8.2/newlib/libc/sys/dreamcast/isatty.c	1970-01-01 10:00:00.000000000 +1000
  4914 +++ newlib-1.8.2-dc/newlib/libc/sys/dreamcast/isatty.c	2006-07-06 18:28:31.000000000 +1000
  4915 @@ -0,0 +1,10 @@
  4916 +/* Since file descriptors 0, 1, and 2 are always mapped to stdin, stdout,
  4917 + and stderr, we assume these are the only fds that permit interactive I/O. */
  4919 +int
  4920 +isatty (int fd)
  4921 +{
  4922 +  if (fd >= 0 && fd < 3)
  4923 +    return 1;
  4924 +  return 0;
  4925 +}
  4926 diff -urN newlib-1.8.2/newlib/libc/sys/dreamcast/kill.c newlib-1.8.2-dc/newlib/libc/sys/dreamcast/kill.c
  4927 --- newlib-1.8.2/newlib/libc/sys/dreamcast/kill.c	1970-01-01 10:00:00.000000000 +1000
  4928 +++ newlib-1.8.2-dc/newlib/libc/sys/dreamcast/kill.c	2006-07-06 18:28:31.000000000 +1000
  4929 @@ -0,0 +1,8 @@
  4930 +#include <stdlib.h>
  4932 +int
  4933 +_kill ()
  4934 +{
  4935 +  abort ();
  4936 +  return 0;
  4937 +}
  4938 diff -urN newlib-1.8.2/newlib/libc/sys/dreamcast/link.c newlib-1.8.2-dc/newlib/libc/sys/dreamcast/link.c
  4939 --- newlib-1.8.2/newlib/libc/sys/dreamcast/link.c	1970-01-01 10:00:00.000000000 +1000
  4940 +++ newlib-1.8.2-dc/newlib/libc/sys/dreamcast/link.c	2006-07-06 18:28:31.000000000 +1000
  4941 @@ -0,0 +1,16 @@
  4942 +#include "vfs.h"
  4944 +int
  4945 +_link (const char *old_path, const char *new_path)
  4946 +{
  4947 +  char *old_obj = _newlib_vfs_new_string (old_path);
  4948 +  char *new_obj = _newlib_vfs_new_string (new_path);
  4950 +  struct media_ops *mops = _newlib_vfs_get_media_ops (old_path);
  4951 +  int res = mops->link (old_obj, new_obj);
  4953 +  _newlib_vfs_delete_string (old_obj);
  4954 +  _newlib_vfs_delete_string (new_obj);
  4956 +  return res;
  4957 +}
  4958 diff -urN newlib-1.8.2/newlib/libc/sys/dreamcast/lseek.c newlib-1.8.2-dc/newlib/libc/sys/dreamcast/lseek.c
  4959 --- newlib-1.8.2/newlib/libc/sys/dreamcast/lseek.c	1970-01-01 10:00:00.000000000 +1000
  4960 +++ newlib-1.8.2-dc/newlib/libc/sys/dreamcast/lseek.c	2006-07-06 18:28:31.000000000 +1000
  4961 @@ -0,0 +1,11 @@
  4962 +#include <sys/types.h>
  4964 +#include "vfs.h"
  4966 +off_t
  4967 +_lseek (int fd, off_t pos, int whence)
  4968 +{
  4969 +  struct file *pf = _newlib_vfs_get_file (fd);
  4971 +  return pf->fops->lseek (pf, pos, whence);
  4972 +}
  4973 diff -urN newlib-1.8.2/newlib/libc/sys/dreamcast/Makefile.am newlib-1.8.2-dc/newlib/libc/sys/dreamcast/Makefile.am
  4974 --- newlib-1.8.2/newlib/libc/sys/dreamcast/Makefile.am	1970-01-01 10:00:00.000000000 +1000
  4975 +++ newlib-1.8.2-dc/newlib/libc/sys/dreamcast/Makefile.am	2006-07-06 18:31:26.000000000 +1000
  4976 @@ -0,0 +1,17 @@
  4977 +## Process this file with automake to generate Makefile.in
  4979 +AUTOMAKE_OPTIONS = cygnus
  4981 +INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
  4983 +noinst_LIBRARIES = lib.a
  4985 +lib_a_SOURCES = absolute_vfs.c chdir.c chmod.c close.c creat.c dcload_vfs.c dcload.S \
  4986 +  exit.c fcntl.c fstat.c getpid.c gettimeofday.c ioctl.c isatty.c kill.c \
  4987 +  link.c lseek.c mkdir.c open.c read.c rmdir.c sbrk.c scif.c stat.c \
  4988 +  stdio_vfs.c times.c unlink.c vfs.c write.c dup.c
  4990 +all: crt0.o
  4992 +ACLOCAL_AMFLAGS = -I ../../..
  4993 +CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
  4994 diff -urN newlib-1.8.2/newlib/libc/sys/dreamcast/Makefile.in newlib-1.8.2-dc/newlib/libc/sys/dreamcast/Makefile.in
  4995 --- newlib-1.8.2/newlib/libc/sys/dreamcast/Makefile.in	1970-01-01 10:00:00.000000000 +1000
  4996 +++ newlib-1.8.2-dc/newlib/libc/sys/dreamcast/Makefile.in	2006-07-06 18:31:26.000000000 +1000
  4997 @@ -0,0 +1,322 @@
  4998 +# Makefile.in generated automatically by automake 1.4 from Makefile.am
  5000 +# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
  5001 +# This Makefile.in is free software; the Free Software Foundation
  5002 +# gives unlimited permission to copy and/or distribute it,
  5003 +# with or without modifications, as long as this notice is preserved.
  5005 +# This program is distributed in the hope that it will be useful,
  5006 +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
  5007 +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
  5008 +# PARTICULAR PURPOSE.
  5011 +SHELL = @SHELL@
  5013 +srcdir = @srcdir@
  5014 +top_srcdir = @top_srcdir@
  5015 +VPATH = @srcdir@
  5016 +prefix = @prefix@
  5017 +exec_prefix = @exec_prefix@
  5019 +bindir = @bindir@
  5020 +sbindir = @sbindir@
  5021 +libexecdir = @libexecdir@
  5022 +datadir = @datadir@
  5023 +sysconfdir = @sysconfdir@
  5024 +sharedstatedir = @sharedstatedir@
  5025 +localstatedir = @localstatedir@
  5026 +libdir = @libdir@
  5027 +infodir = @infodir@
  5028 +mandir = @mandir@
  5029 +includedir = @includedir@
  5030 +oldincludedir = /usr/include
  5032 +DESTDIR =
  5034 +pkgdatadir = $(datadir)/@PACKAGE@
  5035 +pkglibdir = $(libdir)/@PACKAGE@
  5036 +pkgincludedir = $(includedir)/@PACKAGE@
  5038 +top_builddir = .
  5040 +ACLOCAL = @ACLOCAL@
  5041 +AUTOCONF = @AUTOCONF@
  5042 +AUTOMAKE = @AUTOMAKE@
  5043 +AUTOHEADER = @AUTOHEADER@
  5045 +INSTALL = @INSTALL@
  5046 +INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
  5047 +INSTALL_DATA = @INSTALL_DATA@
  5048 +INSTALL_SCRIPT = @INSTALL_SCRIPT@
  5049 +transform = @program_transform_name@
  5051 +NORMAL_INSTALL = :
  5052 +PRE_INSTALL = :
  5053 +POST_INSTALL = :
  5054 +NORMAL_UNINSTALL = :
  5055 +PRE_UNINSTALL = :
  5056 +POST_UNINSTALL = :
  5057 +host_alias = @host_alias@
  5058 +host_triplet = @host@
  5059 +AR = @AR@
  5060 +AS = @AS@
  5061 +CC = @CC@
  5062 +CPP = @CPP@
  5063 +EXEEXT = @EXEEXT@
  5064 +MAKEINFO = @MAKEINFO@
  5065 +NEWLIB_CFLAGS = @NEWLIB_CFLAGS@
  5066 +PACKAGE = @PACKAGE@
  5067 +RANLIB = @RANLIB@
  5068 +VERSION = @VERSION@
  5069 +machine_dir = @machine_dir@
  5070 +newlib_basedir = @newlib_basedir@
  5071 +sys_dir = @sys_dir@
  5073 +AUTOMAKE_OPTIONS = cygnus
  5075 +INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
  5077 +noinst_LIBRARIES = lib.a
  5079 +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
  5082 +ACLOCAL_AMFLAGS = -I ../../..
  5083 +CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
  5084 +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
  5085 +mkinstalldirs = $(SHELL) $(top_srcdir)/../../../../mkinstalldirs
  5086 +CONFIG_CLEAN_FILES = 
  5087 +LIBRARIES =  $(noinst_LIBRARIES)
  5090 +DEFS = @DEFS@ -I. -I$(srcdir) 
  5091 +CPPFLAGS = @CPPFLAGS@
  5092 +LDFLAGS = @LDFLAGS@
  5093 +LIBS = @LIBS@
  5094 +lib_a_LIBADD = 
  5095 +lib_a_OBJECTS =  absolute_vfs.o chdir.o chmod.o close.o creat.o \
  5096 +dcload_vfs.o dcload.o exit.o fcntl.o fstat.o getpid.o gettimeofday.o ioctl.o \
  5097 +isatty.o kill.o link.o lseek.o mkdir.o open.o read.o rmdir.o sbrk.o \
  5098 +scif.o stat.o stdio_vfs.o times.o unlink.o vfs.o write.o dup.o
  5099 +CFLAGS = @CFLAGS@
  5100 +COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
  5101 +CCLD = $(CC)
  5102 +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
  5103 +DIST_COMMON =  Makefile.am Makefile.in aclocal.m4 configure configure.in
  5106 +DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
  5108 +TAR = tar
  5109 +GZIP_ENV = --best
  5110 +SOURCES = $(lib_a_SOURCES)
  5111 +OBJECTS = $(lib_a_OBJECTS)
  5113 +all: all-redirect
  5114 +.SUFFIXES:
  5115 +.SUFFIXES: .S .c .o .s
  5116 +$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
  5117 +	cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile
  5119 +Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
  5120 +	cd $(top_builddir) \
  5121 +	  && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
  5123 +$(ACLOCAL_M4):  configure.in  ../../../acinclude.m4 ../../../aclocal.m4
  5124 +	cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
  5126 +config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
  5127 +	$(SHELL) ./config.status --recheck
  5128 +$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
  5129 +	cd $(srcdir) && $(AUTOCONF)
  5131 +mostlyclean-noinstLIBRARIES:
  5133 +clean-noinstLIBRARIES:
  5134 +	-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
  5136 +distclean-noinstLIBRARIES:
  5138 +maintainer-clean-noinstLIBRARIES:
  5140 +.c.o:
  5141 +	$(COMPILE) -c $<
  5143 +.s.o:
  5144 +	$(COMPILE) -c $<
  5146 +.S.o:
  5147 +	$(COMPILE) -c $<
  5149 +mostlyclean-compile:
  5150 +	-rm -f *.o core *.core
  5152 +clean-compile:
  5154 +distclean-compile:
  5155 +	-rm -f *.tab.c
  5157 +maintainer-clean-compile:
  5159 +lib.a: $(lib_a_OBJECTS) $(lib_a_DEPENDENCIES)
  5160 +	-rm -f lib.a
  5161 +	$(AR) cru lib.a $(lib_a_OBJECTS) $(lib_a_LIBADD)
  5162 +	$(RANLIB) lib.a
  5164 +tags: TAGS
  5166 +ID: $(HEADERS) $(SOURCES) $(LISP)
  5167 +	list='$(SOURCES) $(HEADERS)'; \
  5168 +	unique=`for i in $$list; do echo $$i; done | \
  5169 +	  awk '    { files[$$0] = 1; } \
  5170 +	       END { for (i in files) print i; }'`; \
  5171 +	here=`pwd` && cd $(srcdir) \
  5172 +	  && mkid -f$$here/ID $$unique $(LISP)
  5174 +TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) $(LISP)
  5175 +	tags=; \
  5176 +	here=`pwd`; \
  5177 +	list='$(SOURCES) $(HEADERS)'; \
  5178 +	unique=`for i in $$list; do echo $$i; done | \
  5179 +	  awk '    { files[$$0] = 1; } \
  5180 +	       END { for (i in files) print i; }'`; \
  5181 +	test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
  5182 +	  || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags  $$unique $(LISP) -o $$here/TAGS)
  5184 +mostlyclean-tags:
  5186 +clean-tags:
  5188 +distclean-tags:
  5189 +	-rm -f TAGS ID
  5191 +maintainer-clean-tags:
  5193 +distdir = $(PACKAGE)-$(VERSION)
  5194 +top_distdir = $(distdir)
  5196 +# This target untars the dist file and tries a VPATH configuration.  Then
  5197 +# it guarantees that the distribution is self-contained by making another
  5198 +# tarfile.
  5199 +distcheck: dist
  5200 +	-rm -rf $(distdir)
  5201 +	GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
  5202 +	mkdir $(distdir)/=build
  5203 +	mkdir $(distdir)/=inst
  5204 +	dc_install_base=`cd $(distdir)/=inst && pwd`; \
  5205 +	cd $(distdir)/=build \
  5206 +	  && ../configure --srcdir=.. --prefix=$$dc_install_base \
  5207 +	  && $(MAKE) $(AM_MAKEFLAGS) \
  5208 +	  && $(MAKE) $(AM_MAKEFLAGS) dvi \
  5209 +	  && $(MAKE) $(AM_MAKEFLAGS) check \
  5210 +	  && $(MAKE) $(AM_MAKEFLAGS) install \
  5211 +	  && $(MAKE) $(AM_MAKEFLAGS) installcheck \
  5212 +	  && $(MAKE) $(AM_MAKEFLAGS) dist
  5213 +	-rm -rf $(distdir)
  5214 +	@banner="$(distdir).tar.gz is ready for distribution"; \
  5215 +	dashes=`echo "$$banner" | sed s/./=/g`; \
  5216 +	echo "$$dashes"; \
  5217 +	echo "$$banner"; \
  5218 +	echo "$$dashes"
  5219 +dist: distdir
  5220 +	-chmod -R a+r $(distdir)
  5221 +	GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
  5222 +	-rm -rf $(distdir)
  5223 +dist-all: distdir
  5224 +	-chmod -R a+r $(distdir)
  5225 +	GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
  5226 +	-rm -rf $(distdir)
  5227 +distdir: $(DISTFILES)
  5228 +	-rm -rf $(distdir)
  5229 +	mkdir $(distdir)
  5230 +	-chmod 777 $(distdir)
  5231 +	@for file in $(DISTFILES); do \
  5232 +	  if test -f $$file; then d=.; else d=$(srcdir); fi; \
  5233 +	  if test -d $$d/$$file; then \
  5234 +	    cp -pr $$d/$$file $(distdir)/$$file; \
  5235 +	  else \
  5236 +	    test -f $(distdir)/$$file \
  5237 +	    || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
  5238 +	    || cp -p $$d/$$file $(distdir)/$$file || :; \
  5239 +	  fi; \
  5240 +	done
  5241 +info-am:
  5242 +info: info-am
  5243 +dvi-am:
  5244 +dvi: dvi-am
  5245 +check-am:
  5246 +check: check-am
  5247 +installcheck-am:
  5248 +installcheck: installcheck-am
  5249 +install-info-am: 
  5250 +install-info: install-info-am
  5251 +install-exec-am:
  5252 +install-exec: install-exec-am
  5254 +install-data-am:
  5255 +install-data: install-data-am
  5257 +install-am: all-am
  5258 +	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
  5259 +install: install-am
  5260 +uninstall-am:
  5261 +uninstall: uninstall-am
  5262 +all-am: Makefile $(LIBRARIES)
  5263 +all-redirect: all-am
  5264 +install-strip:
  5265 +	$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
  5266 +installdirs:
  5269 +mostlyclean-generic:
  5271 +clean-generic:
  5273 +distclean-generic:
  5274 +	-rm -f Makefile $(CONFIG_CLEAN_FILES)
  5275 +	-rm -f config.cache config.log stamp-h stamp-h[0-9]*
  5277 +maintainer-clean-generic:
  5278 +mostlyclean-am:  mostlyclean-noinstLIBRARIES mostlyclean-compile \
  5279 +		mostlyclean-tags mostlyclean-generic
  5281 +mostlyclean: mostlyclean-am
  5283 +clean-am:  clean-noinstLIBRARIES clean-compile clean-tags clean-generic \
  5284 +		mostlyclean-am
  5286 +clean: clean-am
  5288 +distclean-am:  distclean-noinstLIBRARIES distclean-compile \
  5289 +		distclean-tags distclean-generic clean-am
  5291 +distclean: distclean-am
  5292 +	-rm -f config.status
  5294 +maintainer-clean-am:  maintainer-clean-noinstLIBRARIES \
  5295 +		maintainer-clean-compile maintainer-clean-tags \
  5296 +		maintainer-clean-generic distclean-am
  5297 +	@echo "This command is intended for maintainers to use;"
  5298 +	@echo "it deletes files that may require special tools to rebuild."
  5300 +maintainer-clean: maintainer-clean-am
  5301 +	-rm -f config.status
  5303 +.PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \
  5304 +clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
  5305 +mostlyclean-compile distclean-compile clean-compile \
  5306 +maintainer-clean-compile tags mostlyclean-tags distclean-tags \
  5307 +clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \
  5308 +check-am installcheck-am installcheck install-info-am install-info \
  5309 +install-exec-am install-exec install-data-am install-data install-am \
  5310 +install uninstall-am uninstall all-redirect all-am all installdirs \
  5311 +mostlyclean-generic distclean-generic clean-generic \
  5312 +maintainer-clean-generic clean mostlyclean distclean maintainer-clean
  5315 +all: crt0.o
  5317 +# Tell versions [3.59,3.63) of GNU make to not export all variables.
  5318 +# Otherwise a system limit (for SysV at least) may be exceeded.
  5319 +.NOEXPORT:
  5320 diff -urN newlib-1.8.2/newlib/libc/sys/dreamcast/mkdir.c newlib-1.8.2-dc/newlib/libc/sys/dreamcast/mkdir.c
  5321 --- newlib-1.8.2/newlib/libc/sys/dreamcast/mkdir.c	1970-01-01 10:00:00.000000000 +1000
  5322 +++ newlib-1.8.2-dc/newlib/libc/sys/dreamcast/mkdir.c	2006-07-06 18:28:31.000000000 +1000
  5323 @@ -0,0 +1,16 @@
  5324 +#include <sys/types.h>
  5326 +#include "vfs.h"
  5328 +int
  5329 +mkdir (const char *path, mode_t mode)
  5330 +{
  5331 +  char *obj = _newlib_vfs_new_string (path);
  5333 +  struct media_ops *mops = _newlib_vfs_get_media_ops (path);
  5334 +  int res = mops->mkdir (obj, mode);
  5336 +  _newlib_vfs_delete_string (obj);
  5338 +  return res;
  5339 +}
  5340 diff -urN newlib-1.8.2/newlib/libc/sys/dreamcast/open.c newlib-1.8.2-dc/newlib/libc/sys/dreamcast/open.c
  5341 --- newlib-1.8.2/newlib/libc/sys/dreamcast/open.c	1970-01-01 10:00:00.000000000 +1000
  5342 +++ newlib-1.8.2-dc/newlib/libc/sys/dreamcast/open.c	2006-07-06 18:28:31.000000000 +1000
  5343 @@ -0,0 +1,23 @@
  5344 +#include <sys/types.h>
  5346 +#include <stdio.h>
  5348 +#include "vfs.h"
  5350 +int
  5351 +_open (const char *path, int flags, mode_t mode)
  5352 +{
  5353 +  char *obj = _newlib_vfs_new_string (path);
  5355 +  struct media_ops *mops = _newlib_vfs_get_media_ops (path);
  5356 +  struct file *pf = mops->open (obj, flags, mode);
  5358 +  _newlib_vfs_delete_string (obj);
  5360 +  if (pf != NULL)
  5361 +  {
  5362 +    return _newlib_vfs_insert_file (pf);
  5363 +  }
  5365 +  return -1;
  5366 +}
  5367 diff -urN newlib-1.8.2/newlib/libc/sys/dreamcast/read.c newlib-1.8.2-dc/newlib/libc/sys/dreamcast/read.c
  5368 --- newlib-1.8.2/newlib/libc/sys/dreamcast/read.c	1970-01-01 10:00:00.000000000 +1000
  5369 +++ newlib-1.8.2-dc/newlib/libc/sys/dreamcast/read.c	2006-07-06 18:28:31.000000000 +1000
  5370 @@ -0,0 +1,11 @@
  5371 +#include <sys/types.h>
  5373 +#include "vfs.h"
  5375 +size_t
  5376 +_read (int fd, void *buf, size_t cnt)
  5377 +{
  5378 +  struct file *pf = _newlib_vfs_get_file (fd);
  5380 +  return pf->fops->read (pf, buf, cnt);
  5381 +}
  5382 diff -urN newlib-1.8.2/newlib/libc/sys/dreamcast/rmdir.c newlib-1.8.2-dc/newlib/libc/sys/dreamcast/rmdir.c
  5383 --- newlib-1.8.2/newlib/libc/sys/dreamcast/rmdir.c	1970-01-01 10:00:00.000000000 +1000
  5384 +++ newlib-1.8.2-dc/newlib/libc/sys/dreamcast/rmdir.c	2006-07-06 18:28:31.000000000 +1000
  5385 @@ -0,0 +1,14 @@
  5386 +#include "vfs.h"
  5388 +int
  5389 +rmdir (const char *path)
  5390 +{
  5391 +  char *obj = _newlib_vfs_new_string (path);
  5393 +  struct media_ops *mops = _newlib_vfs_get_media_ops (path);
  5394 +  int res = mops->rmdir (obj);
  5396 +  _newlib_vfs_delete_string (obj);
  5398 +  return res;
  5399 +}
  5400 diff -urN newlib-1.8.2/newlib/libc/sys/dreamcast/sbrk.c newlib-1.8.2-dc/newlib/libc/sys/dreamcast/sbrk.c
  5401 --- newlib-1.8.2/newlib/libc/sys/dreamcast/sbrk.c	1970-01-01 10:00:00.000000000 +1000
  5402 +++ newlib-1.8.2-dc/newlib/libc/sys/dreamcast/sbrk.c	2006-07-06 18:28:31.000000000 +1000
  5403 @@ -0,0 +1,27 @@
  5404 +#include <_ansi.h>
  5405 +#include <errno.h>
  5406 +#include <sys/types.h>
  5408 +extern char end;		/* The end of the program (BSS section). */
  5410 +register char *stack_ptr asm ("r15");
  5412 +caddr_t
  5413 +_sbrk (int incr)
  5414 +{
  5415 +  static char *heap_end;
  5416 +  char *prev_heap_end;
  5418 +  if (!heap_end)
  5419 +    heap_end = &end;
  5421 +  prev_heap_end = heap_end;
  5422 +  if (heap_end + incr > stack_ptr)
  5423 +  {
  5424 +    errno = ENOMEM;
  5425 +	return (caddr_t)-1;
  5426 +  }
  5428 +  heap_end += incr;
  5429 +  return (caddr_t) prev_heap_end;
  5430 +}
  5431 diff -urN newlib-1.8.2/newlib/libc/sys/dreamcast/scif.c newlib-1.8.2-dc/newlib/libc/sys/dreamcast/scif.c
  5432 --- newlib-1.8.2/newlib/libc/sys/dreamcast/scif.c	1970-01-01 10:00:00.000000000 +1000
  5433 +++ newlib-1.8.2-dc/newlib/libc/sys/dreamcast/scif.c	2006-07-06 18:28:31.000000000 +1000
  5434 @@ -0,0 +1,46 @@
  5435 +/* Blatantly stolen from libdream, others...
  5436 + * Please fix this :) */
  5437 +#include <sys/types.h>
  5439 +/*#include "scif.h"*/
  5441 +#define ACK  (volatile unsigned short *)0xffe80010
  5442 +#define WR_FIFO (volatile unsigned char *)0xffe8000c
  5443 +#define RD_FIFO (volatile unsigned char *)0xffe80014
  5444 +#define STATUS  (volatile unsigned short *)0xffe8001c
  5446 +static void scif_flush ()
  5447 +{
  5448 +  *ACK &= 0xbf;
  5450 +  while (!(*ACK & 0x40)) ;
  5452 +  *ACK &= 0xbf;
  5453 +}
  5455 +size_t _newlib_vfs_scif_write (void *buf, size_t cnt)
  5456 +{
  5457 +  while (cnt-- > 0)
  5458 +  {
  5459 +    while (!(*ACK & 0x20)) ;
  5461 +    *WR_FIFO = *(unsigned char *)buf++;
  5463 +    *ACK &= 0x9f;
  5464 +  }
  5465 +  scif_flush ();
  5466 +  return cnt;
  5467 +}
  5469 +size_t _newlib_vfs_scif_read (void *buf, size_t cnt)
  5470 +{
  5471 +  while (cnt -- > 0)
  5472 +  {
  5473 +    while (*STATUS & 0x1f) ;
  5475 +    *(unsigned char *)buf++ = *RD_FIFO;
  5477 +    *ACK &= 0x6d;
  5478 +  }
  5479 +  return cnt;
  5480 +}
  5481 diff -urN newlib-1.8.2/newlib/libc/sys/dreamcast/stat.c newlib-1.8.2-dc/newlib/libc/sys/dreamcast/stat.c
  5482 --- newlib-1.8.2/newlib/libc/sys/dreamcast/stat.c	1970-01-01 10:00:00.000000000 +1000
  5483 +++ newlib-1.8.2-dc/newlib/libc/sys/dreamcast/stat.c	2006-07-06 18:28:31.000000000 +1000
  5484 @@ -0,0 +1,26 @@
  5485 +#include <sys/types.h>
  5486 +#include <sys/stat.h>
  5488 +#include "vfs.h"
  5490 +/* Clunky, but remember we're "namespace clean" and library routines also
  5491 + use _stat as a syscall... */
  5493 +int
  5494 +stat (const char *path, struct stat *pstat)
  5495 +{
  5496 +  return _stat (path, pstat);
  5497 +}
  5499 +int
  5500 +_stat (const char *path, struct stat *pstat)
  5501 +{
  5502 +  char *obj = _newlib_vfs_new_string (path);
  5504 +  struct media_ops *mops = _newlib_vfs_get_media_ops (path);
  5505 +  int res = mops->stat (obj, pstat);
  5507 +  _newlib_vfs_delete_string (obj);
  5509 +  return res;
  5510 +}
  5511 diff -urN newlib-1.8.2/newlib/libc/sys/dreamcast/stdio_vfs.c newlib-1.8.2-dc/newlib/libc/sys/dreamcast/stdio_vfs.c
  5512 --- newlib-1.8.2/newlib/libc/sys/dreamcast/stdio_vfs.c	1970-01-01 10:00:00.000000000 +1000
  5513 +++ newlib-1.8.2-dc/newlib/libc/sys/dreamcast/stdio_vfs.c	2006-07-06 18:28:31.000000000 +1000
  5514 @@ -0,0 +1,114 @@
  5515 +/* Support for Marcus Comstedt's serial slave and gdbstubs, e.g. generic
  5516 + serial console I/O. */
  5518 +#include "vfs.h"
  5520 +/* Only read and write are supported for stdio_file_ops, so these are
  5521 + used for stdin, stdout, and stderr which are already "open" when the
  5522 + program is started. */
  5524 +static size_t stdio_read_file_op (struct file *, void *, size_t);
  5525 +static size_t stdio_write_file_op (struct file *, void *, size_t);
  5527 +static struct file_ops stdio_file_ops =
  5528 +{
  5529 +  lseek:       _newlib_vfs_invalid_file_op,
  5530 +  close:       _newlib_vfs_invalid_file_op,
  5531 +  read:        stdio_read_file_op,
  5532 +  write:       stdio_write_file_op,
  5533 +  ioctl:       _newlib_vfs_invalid_file_op,
  5534 +  fstat:       _newlib_vfs_invalid_file_op
  5535 +};
  5537 +/* dcload or absolute may override these to go through their own console
  5538 + output routines. */
  5540 +static struct file stdout_file;
  5541 +static struct file stderr_file;
  5543 +static struct file stdin_file =
  5544 +{
  5545 +  &stdout_file,
  5546 +  0, 0,
  5547 +  &stdio_file_ops,
  5548 +  NULL,
  5549 +};
  5551 +static struct file stdout_file =
  5552 +{
  5553 +  &stderr_file,
  5554 +  1, 1,
  5555 +  &stdio_file_ops,
  5556 +  NULL,
  5557 +};
  5559 +static struct file stderr_file =
  5560 +{
  5561 +  NULL,
  5562 +  2, 2,
  5563 +  &stdio_file_ops,
  5564 +  NULL,
  5565 +};
  5567 +struct file * _newlib_vfs_first_file = &stdin_file;
  5568 +struct file * _newlib_vfs_last_file  = &stderr_file;
  5570 +/* If we're being debugged by gdb then we can't use read or any other
  5571 + raw serial I/O - we can only output to gdb's console. */
  5572 +static int raw_serial_io = 0;
  5574 +/* Detect the presence of Marcus Comstedt's serial slave by looking for the
  5575 + sequence "103" at 8c00e46c. */
  5577 +#define SSLAVE_VERSION_ADDR 0x8c00e46c
  5579 +int _newlib_vfs_is_sslave (void)
  5580 +{
  5581 +  /* This hackery is used to avoid depending on memcmp () - silly, eh? */
  5582 +  if ( (*(unsigned char *)(SSLAVE_VERSION_ADDR))     == '1' &&
  5583 +       (*(unsigned char *)(SSLAVE_VERSION_ADDR + 1)) == '0' &&
  5584 +       (*(unsigned char *)(SSLAVE_VERSION_ADDR + 2)) == '3' )
  5585 +  {
  5586 +    raw_serial_io = 1;
  5587 +    return 1;
  5588 +  }
  5590 +  return 0;
  5591 +}
  5593 +void _newlib_vfs_sslave_init (void)
  5594 +{
  5595 +  /* Initialize serial console to a known state.  We already assume that
  5596 +   we connected to the host, we just make sure the SCIF is setup the way
  5597 +   we need it. */
  5598 +  _newlib_vfs_initialized = VFS_LOADER_SERIAL_SLAVE;
  5599 +}
  5602 +/* Detect gdbstubs.  gdbstubs sets the border color to green to indicate that
  5603 + it's active.  While this can't reliably be used to detect it, we also look
  5604 + for gdbstubs start code at two separate addresses (gdbstub can load itself
  5605 + at either address). */
  5607 +int _newlib_vfs_is_gdbstubs (void)
  5608 +{
  5609 +  return 0;
  5610 +}
  5612 +void _newlib_vfs_gdbstubs_init (void)
  5613 +{
  5614 +  _newlib_vfs_initialized = VFS_LOADER_GDBSTUBS;
  5615 +}
  5617 +extern size_t _newlib_vfs_scif_write (void *, size_t);
  5618 +extern size_t _newlib_vfs_scif_read (void *, size_t);
  5620 +static size_t stdio_read_file_op (struct file *pf, void *buf, size_t cnt)
  5621 +{
  5622 +  return _newlib_vfs_scif_read (buf, cnt);
  5623 +}
  5625 +static size_t stdio_write_file_op (struct file *pf, void *buf, size_t cnt)
  5626 +{
  5627 +  return _newlib_vfs_scif_write (buf, cnt);
  5628 +}
  5629 diff -urN newlib-1.8.2/newlib/libc/sys/dreamcast/times.c newlib-1.8.2-dc/newlib/libc/sys/dreamcast/times.c
  5630 --- newlib-1.8.2/newlib/libc/sys/dreamcast/times.c	1970-01-01 10:00:00.000000000 +1000
  5631 +++ newlib-1.8.2-dc/newlib/libc/sys/dreamcast/times.c	2006-07-06 18:28:31.000000000 +1000
  5632 @@ -0,0 +1,35 @@
  5633 +#include <time.h>
  5634 +#include <sys/times.h>
  5636 +/* crt.S stores program startup time (Dreamcast-relative, epoch at 1/1/1950)
  5637 + in the global variable _newlib_dreamcast_utime.  We can use this variable to
  5638 + determine the total amount of time that the program has been running. */
  5640 +/* This is raw seconds of program usage, we don't need to worry about
  5641 + converting epochs or anything like that... */
  5643 +extern unsigned long _newlib_dreamcast_utime;
  5645 +clock_t
  5646 +_times (struct tms *buf)
  5647 +{
  5648 +  if (_newlib_dreamcast_utime)
  5649 +  {
  5650 +    unsigned long rtc_h = *(volatile unsigned long*)0xa0710000;
  5651 +    unsigned long rtc_l = *(volatile unsigned long*)0xa0710004;
  5652 +    unsigned long secs = ((rtc_h & 0xffff) << 16) | (rtc_l & 0xffff);
  5654 +    clock_t utime = secs - _newlib_dreamcast_utime;
  5656 +    if (buf) {
  5657 +      buf->tms_utime = utime;
  5658 +      buf->tms_stime = 0;
  5659 +      buf->tms_cutime = 0;
  5660 +      buf->tms_cstime = 0;
  5661 +     }
  5663 +     return utime;
  5664 +  }
  5666 +  return (clock_t)-1;
  5667 +}
  5668 diff -urN newlib-1.8.2/newlib/libc/sys/dreamcast/unlink.c newlib-1.8.2-dc/newlib/libc/sys/dreamcast/unlink.c
  5669 --- newlib-1.8.2/newlib/libc/sys/dreamcast/unlink.c	1970-01-01 10:00:00.000000000 +1000
  5670 +++ newlib-1.8.2-dc/newlib/libc/sys/dreamcast/unlink.c	2006-07-06 18:28:31.000000000 +1000
  5671 @@ -0,0 +1,14 @@
  5672 +#include "vfs.h"
  5674 +int
  5675 +_unlink (const char *path)
  5676 +{
  5677 +  char *obj = _newlib_vfs_new_string (path);
  5679 +  struct media_ops *mops = _newlib_vfs_get_media_ops (path);
  5680 +  int res = mops->unlink (obj);
  5682 +  _newlib_vfs_delete_string (obj);
  5684 +  return res;
  5685 +}
  5686 diff -urN newlib-1.8.2/newlib/libc/sys/dreamcast/vfs.c newlib-1.8.2-dc/newlib/libc/sys/dreamcast/vfs.c
  5687 --- newlib-1.8.2/newlib/libc/sys/dreamcast/vfs.c	1970-01-01 10:00:00.000000000 +1000
  5688 +++ newlib-1.8.2-dc/newlib/libc/sys/dreamcast/vfs.c	2006-07-06 18:28:31.000000000 +1000
  5689 @@ -0,0 +1,246 @@
  5690 +#include <sys/types.h>
  5691 +#include <errno.h>
  5692 +#include <stdlib.h>
  5693 +#include <string.h>
  5695 +#include "vfs.h"
  5697 +static struct file * invalid_open_media_op (void);
  5699 +static struct media_ops invalid_media_ops =
  5700 +{
  5701 +  open:                invalid_open_media_op,
  5702 +  creat:               invalid_open_media_op,
  5703 +  link:                _newlib_vfs_invalid_media_op,
  5704 +  unlink:              _newlib_vfs_invalid_media_op,
  5705 +  stat:                _newlib_vfs_invalid_media_op,
  5706 +  chmod:               _newlib_vfs_invalid_media_op,
  5707 +  mkdir:               _newlib_vfs_invalid_media_op,
  5708 +  rmdir:               _newlib_vfs_invalid_media_op,
  5709 +  chdir:               _newlib_vfs_invalid_media_op
  5710 +};
  5712 +struct media_ops * _newlib_vfs_host_media_ops = &invalid_media_ops;
  5713 +struct media_ops * _newlib_vfs_cd_media_ops   = &invalid_media_ops;
  5714 +struct media_ops * _newlib_vfs_vmu_media_ops  = &invalid_media_ops;
  5716 +/* This is where we detect the loader and initialize the relevant *_ops
  5717 + variables. */
  5719 +enum _newlib_vfs_loader _newlib_vfs_initialized = VFS_LOADER_NONE;
  5721 +extern int _newlib_vfs_is_sslave (void);
  5722 +extern void _newlib_vfs_sslave_init (void);
  5724 +extern int _newlib_vfs_is_gdbstubs (void);
  5725 +extern void _newlib_vfs_gdbstubs_init (void);
  5727 +extern int _newlib_vfs_is_dcload (void);
  5728 +extern void _newlib_vfs_dcload_init (void);
  5730 +extern int _newlib_vfs_is_absolute (void);
  5731 +extern void _newlib_vfs_absolute_load (void);
  5733 +static void vfs_init (void)
  5734 +{
  5735 +  _newlib_vfs_initialized = VFS_LOADER_UNKNOWN;
  5737 +  if (_newlib_vfs_is_sslave ())  /* Marcus Comstedt's serial slave */
  5738 +  {
  5739 +    _newlib_vfs_sslave_init ();
  5740 +  }
  5741 +  else if (_newlib_vfs_is_gdbstubs ())  /* Benoit Miller's port of gdbstubs */
  5742 +  {
  5743 +    _newlib_vfs_gdbstubs_init ();
  5744 +  }
  5745 +  else if (_newlib_vfs_is_dcload ())  /* Andrew K's dcload */
  5746 +  {
  5747 +    _newlib_vfs_dcload_init ();
  5748 +  }
  5749 +  else if (_newlib_vfs_is_absolute ())  /* my own absolute */
  5750 +  {
  5751 +    _newlib_vfs_absolute_load ();
  5752 +  }
  5753 +}
  5755 +#define VFS_INIT { if (!_newlib_vfs_initialized) vfs_init (); }
  5757 +/* Each prefix, "/pc/", "/cd", and "/vmu" in little-endian. */
  5758 +#define PREFIX_HOST 0x2f63702f
  5759 +#define PREFIX_CD   0x2f64632f
  5760 +#define PREFIX_VMU  0x756d762f
  5762 +char *_newlib_vfs_new_string (const char *s)
  5763 +{
  5764 +  VFS_INIT;
  5766 +  {
  5767 +    char *obj = NULL;
  5768 +    unsigned long prefix = *(unsigned long *)s;
  5769 +		int len;
  5771 +    if (prefix == PREFIX_HOST || prefix == PREFIX_CD ||
  5772 +        prefix == PREFIX_VMU)
  5773 +    {
  5774 +      /* We snatch the prefix, accounting for the null byte (since we're
  5775 +       using memcpy; this could be changed to a simple copy loop... */
  5776 +      len = strlen (s) - 3;
  5777 +      obj = malloc (len);
  5778 +			if (!obj) return obj;
  5780 +      memcpy (obj, s + 4, len);
  5781 +    }
  5782 +    else /* Just return a copy of the string if no path given */
  5783 +    {
  5784 +      len = strlen (s) + 1;
  5785 +      obj = malloc (len);
  5786 +      if (!obj) return obj;
  5788 +      memcpy (obj, s, len);
  5789 +    }
  5790 +    return obj;
  5791 +  }
  5792 +}
  5794 +void _newlib_vfs_delete_string (char *s)
  5795 +{
  5796 +  if (s) free (s);
  5797 +}
  5799 +/* When each media op calls this, it's already got a copy of the stripped
  5800 + path so we just do simple comparisons on the path prefix here. */
  5801 +struct media_ops *_newlib_vfs_get_media_ops (const char *path)
  5802 +{
  5803 +	unsigned long prefix = *(unsigned long *)path;
  5805 +  if (prefix == PREFIX_HOST)
  5806 +  {
  5807 +    return _newlib_vfs_host_media_ops;
  5808 +  }
  5809 +  else if (prefix == PREFIX_CD)
  5810 +  {
  5811 +    return _newlib_vfs_cd_media_ops;
  5812 +  }
  5813 +  else if (prefix == PREFIX_VMU)
  5814 +  {
  5815 +    return _newlib_vfs_vmu_media_ops;
  5816 +  }
  5818 +  return _newlib_vfs_host_media_ops;
  5819 +}
  5821 +static struct file_ops invalid_file_ops =
  5822 +{
  5823 +  lseek:       _newlib_vfs_invalid_file_op,
  5824 +  close:       _newlib_vfs_invalid_file_op,
  5825 +  read:        _newlib_vfs_invalid_file_op,
  5826 +  write:       _newlib_vfs_invalid_file_op,
  5827 +  ioctl:       _newlib_vfs_invalid_file_op,
  5828 +  fstat:       _newlib_vfs_invalid_file_op
  5829 +};
  5831 +static struct file invalid_file =
  5832 +{
  5833 +  NULL,
  5834 +  -1, -1,
  5835 +  &invalid_file_ops,
  5836 +  NULL
  5837 +};
  5839 +/* FIXME: A lookup for each fd could get expensive...find a better way to
  5840 + "cache" frequently used fds */
  5842 +static struct file *cached_file = NULL;
  5844 +/* Find the file matching fd and return a pointer to its contents.  If the
  5845 + file isn't found, return a pointer to invalid_file, which represents a
  5846 + non-existent file (all operations on it will fail). */
  5847 +struct file *_newlib_vfs_get_file (int fd)
  5848 +{
  5849 +  VFS_INIT;
  5851 +  {
  5852 +    struct file *next_file = _newlib_vfs_first_file;
  5854 +    if ((cached_file != NULL) && (cached_file->fd == fd))
  5855 +    {
  5856 +      return cached_file;
  5857 +    }
  5859 +    while (next_file)
  5860 +    {
  5861 +      if (next_file->fd == fd)
  5862 +      {
  5863 +        cached_file = next_file;
  5864 +        return next_file;
  5865 +      }
  5866 +      next_file = next_file->next;
  5867 +    }
  5868 +    return &invalid_file;
  5869 +  }
  5870 +}
  5872 +static int last_fd = -1;
  5874 +/* Just insert the file at the end of the list, as it's already been
  5875 + allocated by open/creat.  Increase the library's fd by using the last
  5876 + file's fd. */
  5877 +int _newlib_vfs_insert_file (struct file *pf)
  5878 +{
  5879 +  if (last_fd < 0)
  5880 +  {
  5881 +    last_fd = _newlib_vfs_last_file->fd;
  5882 +  }
  5883 +/*	++last_fd; */
  5884 +  pf->fd = ++last_fd;
  5885 +  _newlib_vfs_last_file->next = pf;
  5886 +  _newlib_vfs_last_file = pf;
  5887 +  return last_fd;
  5888 +}
  5890 +int _newlib_vfs_remove_file (struct file *pf)
  5891 +{
  5892 +  if (pf)
  5893 +  {
  5894 +    struct file *prev_file = _newlib_vfs_first_file;
  5895 +		struct file *next_file = NULL;
  5897 +    while (prev_file)
  5898 +    {
  5899 +      if (prev_file->next == pf)
  5900 +      {
  5901 +        prev_file->next = pf->next;
  5902 +				next_file = prev_file->next;
  5903 +				while (next_file)
  5904 +				{
  5905 +					prev_file = next_file;
  5906 +					next_file = next_file->next;
  5907 +				}
  5908 +				_newlib_vfs_last_file = prev_file;
  5909 +        free (pf);
  5910 +        return 0;
  5911 +      }
  5912 +			prev_file = prev_file->next;
  5913 +    }
  5914 +  }
  5915 +  errno = ENOSYS;
  5916 +	return -1;
  5917 +}
  5919 +int _newlib_vfs_invalid_file_op (void)
  5920 +{
  5921 +  errno = ENOSYS;
  5922 +  return -1;
  5923 +}
  5925 +static struct file *invalid_open_media_op (void)
  5926 +{
  5927 +  errno = ENOSYS;
  5928 +  return NULL;
  5929 +}
  5931 +int _newlib_vfs_invalid_media_op (void)
  5932 +{
  5933 +  errno = ENOSYS;
  5934 +  return -1;
  5935 +}
  5936 diff -urN newlib-1.8.2/newlib/libc/sys/dreamcast/vfs.h newlib-1.8.2-dc/newlib/libc/sys/dreamcast/vfs.h
  5937 --- newlib-1.8.2/newlib/libc/sys/dreamcast/vfs.h	1970-01-01 10:00:00.000000000 +1000
  5938 +++ newlib-1.8.2-dc/newlib/libc/sys/dreamcast/vfs.h	2006-07-06 18:28:31.000000000 +1000
  5939 @@ -0,0 +1,100 @@
  5940 +#ifndef __VFS_H__
  5941 +#define __VFS_H__
  5943 +#include <sys/types.h>
  5944 +#include <sys/stat.h>
  5946 +/* Defines all of the operations that can be performed on a particular media
  5947 + type.  These are independent of file access routines. */
  5949 +struct media_ops {
  5950 +  struct file * (*open) (const char *, int, mode_t);
  5951 +  struct file * (*creat) (const char *, mode_t);
  5952 +  int (*link) (const char *, const char *);
  5953 +  int (*unlink) (const char *);
  5954 +  int (*stat) (const char *, struct stat *);
  5955 +  int (*chmod) (const char *, mode_t);
  5956 +  int (*mkdir) (const char*, mode_t);
  5957 +  int (*rmdir) (const char *);
  5958 +  int (*chdir) (const char *);
  5959 +};
  5961 +/* These are the operations that can be done to a file.  Each media and stub
  5962 + has it's own combination of routines (e.g. Absolute + VMU, dcload + host). */
  5964 +struct file_ops {
  5965 +  off_t (*lseek) (struct file *, off_t, int);
  5966 +  int (*close) (struct file *);
  5967 +  size_t (*read) (struct file *, void *, size_t);
  5968 +  size_t (*write) (struct file *, void *, size_t);
  5969 +  /* Hmm, what to do with this one? */
  5970 +  int (*ioctl) (struct file *, int, long);
  5971 +  int (*fstat) (struct file *, struct stat *);
  5972 +};
  5974 +/* We maintain a linked list of files so that we can remove and add files
  5975 + to/from the list easier.  Each file contains an fd, the "real" fd of whatever
  5976 + media it resides upon, a pointer to the file_ops for the file, and a pointer
  5977 + to media/stub specific data. */
  5979 +struct file {
  5980 +  struct file *next;
  5981 +  int fd;
  5982 +  int media_fd;
  5983 +  struct file_ops *fops;
  5984 +  void *specifics;
  5985 +};
  5988 +/* Each load initializes the media_ops for each type based on the media it
  5989 + supports.  If a media type isn't supported, then it's ops points to
  5990 + _newlib_vfs_invalid_media_ops. */
  5991 +extern struct media_ops * _newlib_vfs_host_media_ops;
  5992 +extern struct media_ops * _newlib_vfs_cd_media_ops;
  5993 +extern struct media_ops * _newlib_vfs_vmu_media_ops;
  5995 +/* Pointers to the first and last file in the list */
  5996 +extern struct file * _newlib_vfs_first_file;
  5997 +extern struct file * _newlib_vfs_last_file;
  5999 +/* Each loader initializer gives this a distinct value so that programs
  6000 + can determine which loader they're being loaded under. */
  6001 +enum _newlib_vfs_loader
  6002 +{
  6003 +  VFS_LOADER_NONE,
  6004 +  VFS_LOADER_UNKNOWN,
  6005 +  VFS_LOADER_SERIAL_SLAVE,
  6006 +  VFS_LOADER_GDBSTUBS,
  6007 +  VFS_LOADER_DCLOAD_HOST,
  6008 +  VFS_LOADER_DCLOAD_NOHOST,
  6009 +  VFS_LOADER_ABSOLUTE
  6010 +};
  6012 +extern enum _newlib_vfs_loader _newlib_vfs_initialized;
  6014 +/* Generic media/file_ops that return ENOSYS */
  6015 +int _newlib_vfs_invalid_media_op (void);
  6016 +int _newlib_vfs_invalid_file_op (void);
  6018 +/* Using the path prefix, return the media_ops that handles it */
  6019 +struct media_ops *_newlib_vfs_get_media_ops (const char *path);
  6021 +/* Returns the file that matches the given fd */
  6022 +struct file *_newlib_vfs_get_file (int fd);
  6024 +/* Insert a new file into the list.  Returns -1 and sets errno if the file
  6025 + can't be inserted, otherewise returns 0 */
  6026 +int _newlib_vfs_insert_file (struct file *);
  6028 +/* Removes a file from the list.  Returns -1 and sets errno if there was
  6029 + a problem (e.g. invalid fd passed to close, etc.) */
  6030 +int _newlib_vfs_remove_file (struct file *);
  6032 +/* Copy the given string into a new buffer, while stripping the vfs prefix
  6033 + at the same time. */
  6034 +char *_newlib_vfs_new_string (const char *s);
  6036 +/* Free the buffer previously allocated with *_new_string */
  6037 +void _newlib_vfs_delete_string (char *s);
  6039 +#endif /* __VFS_H__ */
  6040 diff -urN newlib-1.8.2/newlib/libc/sys/dreamcast/write.c newlib-1.8.2-dc/newlib/libc/sys/dreamcast/write.c
  6041 --- newlib-1.8.2/newlib/libc/sys/dreamcast/write.c	1970-01-01 10:00:00.000000000 +1000
  6042 +++ newlib-1.8.2-dc/newlib/libc/sys/dreamcast/write.c	2006-07-06 18:28:31.000000000 +1000
  6043 @@ -0,0 +1,11 @@
  6044 +#include <sys/types.h>
  6046 +#include "vfs.h"
  6048 +int
  6049 +_write (int fd, const void *buf, size_t cnt)
  6050 +{
  6051 +  struct file *pf = _newlib_vfs_get_file (fd);
  6053 +  return pf->fops->write (pf, buf, cnt);
  6054 +}
  6055 diff -urN newlib-1.8.2/newlib/libc/sys/Makefile.in newlib-1.8.2-dc/newlib/libc/sys/Makefile.in
  6056 --- newlib-1.8.2/newlib/libc/sys/Makefile.in	1999-06-04 07:34:55.000000000 +1000
  6057 +++ newlib-1.8.2-dc/newlib/libc/sys/Makefile.in	2006-07-06 18:28:31.000000000 +1000
  6058 @@ -79,8 +79,7 @@
  6060  SUBDIRS = $(sys_dir) .
  6062 -@HAVE_SYS_DIR_TRUE@SYSLIB = \
  6063 -@HAVE_SYS_DIR_TRUE@lib.a
  6064 +@HAVE_SYS_DIR_TRUE@SYSLIB = lib.a
  6066  noinst_LIBRARIES = $(SYSLIB)
  6067  noinst_DATA = $(CRT0)
  6068 @@ -295,7 +294,7 @@
  6069  	@for file in $(DISTFILES); do \
  6070  	  if test -f $$file; then d=.; else d=$(srcdir); fi; \
  6071  	  if test -d $$d/$$file; then \
  6072 -	    cp -pr $$/$$file $(distdir)/$$file; \
  6073 +	    cp -pr $$d/$$file $(distdir)/$$file; \
  6074  	  else \
  6075  	    test -f $(distdir)/$$file \
  6076  	    || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
  6077 diff -urN newlib-1.8.2/newlib/libc/syscalls/Makefile.in newlib-1.8.2-dc/newlib/libc/syscalls/Makefile.in
  6078 --- newlib-1.8.2/newlib/libc/syscalls/Makefile.in	1998-12-01 08:03:47.000000000 +1000
  6079 +++ newlib-1.8.2-dc/newlib/libc/syscalls/Makefile.in	2006-07-06 18:28:31.000000000 +1000
  6080 @@ -1,6 +1,6 @@
  6081 -# Makefile.in generated automatically by automake 1.3b from Makefile.am
  6082 +# Makefile.in generated automatically by automake 1.4 from Makefile.am
  6084 -# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
  6085 +# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
  6086  # This Makefile.in is free software; the Free Software Foundation
  6087  # gives unlimited permission to copy and/or distribute it,
  6088  # with or without modifications, as long as this notice is preserved.
  6089 @@ -46,7 +46,7 @@
  6090  AUTOHEADER = @AUTOHEADER@
  6092  INSTALL = @INSTALL@
  6093 -INSTALL_PROGRAM = @INSTALL_PROGRAM@
  6094 +INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
  6095  INSTALL_DATA = @INSTALL_DATA@
  6096  INSTALL_SCRIPT = @INSTALL_SCRIPT@
  6097  transform = @program_transform_name@
  6098 @@ -78,7 +78,6 @@
  6099  PACKAGE = @PACKAGE@
  6100  RANLIB = @RANLIB@
  6101  VERSION = @VERSION@
  6102 -mach_add_objs = @mach_add_objs@
  6103  machine_dir = @machine_dir@
  6104  newlib_basedir = @newlib_basedir@
  6105  sys_dir = @sys_dir@
  6106 @@ -89,27 +88,10 @@
  6108  noinst_LIBRARIES = lib.a
  6110 -lib_a_SOURCES = \
  6111 -	sysclose.c	\
  6112 -	sysexecve.c	\
  6113 -	sysfcntl.c	\
  6114 -	sysfork.c	\
  6115 -	sysfstat.c	\
  6116 -	sysgetpid.c	\
  6117 -	sysgettod.c	\
  6118 -	syskill.c	\
  6119 -	syslink.c	\
  6120 -	syslseek.c	\
  6121 -	sysopen.c	\
  6122 -	sysread.c	\
  6123 -	syssbrk.c	\
  6124 -	sysstat.c	\
  6125 -	systimes.c	\
  6126 -	sysunlink.c	\
  6127 -	syswait.c	\
  6128 -	syswrite.c
  6129 +lib_a_SOURCES =  	sysclose.c		sysexecve.c		sysfcntl.c		sysfork.c		sysfstat.c		sysgetpid.c		sysgettod.c		syskill.c		syslink.c		syslseek.c		sysopen.c		sysread.c		syssbrk.c		sysstat.c		systimes.c		sysunlink.c		syswait.c		syswrite.c
  6131 -CHEWOUT_FILES =
  6133 +CHEWOUT_FILES = 
  6135  SUFFIXES = .def
  6137 @@ -134,22 +116,22 @@
  6138  syswrite.o
  6139  CFLAGS = @CFLAGS@
  6140  COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
  6141 -LINK = $(CC) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
  6142 +CCLD = $(CC)
  6143 +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
  6144  DIST_COMMON =  Makefile.am Makefile.in
  6147  DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
  6149  TAR = tar
  6150 -GZIP = --best
  6151 +GZIP_ENV = --best
  6152  SOURCES = $(lib_a_SOURCES)
  6153  OBJECTS = $(lib_a_OBJECTS)
  6155 -all: Makefile $(LIBRARIES)
  6157 +all: all-redirect
  6158  .SUFFIXES:
  6159  .SUFFIXES: .S .c .def .o .s
  6160 -$(srcdir)/Makefile.in: @MAINT@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
  6161 +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
  6162  	cd $(top_srcdir) && $(AUTOMAKE) --cygnus syscalls/Makefile
  6164  Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
  6165 @@ -193,8 +175,12 @@
  6166  tags: TAGS
  6168  ID: $(HEADERS) $(SOURCES) $(LISP)
  6169 +	list='$(SOURCES) $(HEADERS)'; \
  6170 +	unique=`for i in $$list; do echo $$i; done | \
  6171 +	  awk '    { files[$$0] = 1; } \
  6172 +	       END { for (i in files) print i; }'`; \
  6173  	here=`pwd` && cd $(srcdir) \
  6174 -	  && mkid -f$$here/ID $(SOURCES) $(HEADERS) $(LISP)
  6175 +	  && mkid -f$$here/ID $$unique $(LISP)
  6177  TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) $(LISP)
  6178  	tags=; \
  6179 @@ -222,28 +208,39 @@
  6180  distdir: $(DISTFILES)
  6181  	@for file in $(DISTFILES); do \
  6182  	  if test -f $$file; then d=.; else d=$(srcdir); fi; \
  6183 -	  test -f $(distdir)/$$file \
  6184 -	  || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
  6185 -	  || cp -p $$d/$$file $(distdir)/$$file; \
  6186 +	  if test -d $$d/$$file; then \
  6187 +	    cp -pr $$d/$$file $(distdir)/$$file; \
  6188 +	  else \
  6189 +	    test -f $(distdir)/$$file \
  6190 +	    || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
  6191 +	    || cp -p $$d/$$file $(distdir)/$$file || :; \
  6192 +	  fi; \
  6193  	done
  6194 -info:
  6195 -dvi:
  6196 -check:
  6197 -installcheck:
  6198 -install-info:
  6199 -install-exec: 
  6200 -	@$(NORMAL_INSTALL)
  6202 -install-data: 
  6203 -	@$(NORMAL_INSTALL)
  6205 -install: install-exec install-data all
  6206 -	@:
  6208 -uninstall: 
  6210 +info-am:
  6211 +info: info-am
  6212 +dvi-am:
  6213 +dvi: dvi-am
  6214 +check-am:
  6215 +check: check-am
  6216 +installcheck-am:
  6217 +installcheck: installcheck-am
  6218 +install-info-am: 
  6219 +install-info: install-info-am
  6220 +install-exec-am:
  6221 +install-exec: install-exec-am
  6223 +install-data-am:
  6224 +install-data: install-data-am
  6226 +install-am: all-am
  6227 +	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
  6228 +install: install-am
  6229 +uninstall-am:
  6230 +uninstall: uninstall-am
  6231 +all-am: Makefile $(LIBRARIES)
  6232 +all-redirect: all-am
  6233  install-strip:
  6234 -	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
  6235 +	$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
  6236  installdirs:
  6239 @@ -257,29 +254,38 @@
  6240  	-rm -f config.cache config.log stamp-h stamp-h[0-9]*
  6242  maintainer-clean-generic:
  6243 -mostlyclean:  mostlyclean-noinstLIBRARIES mostlyclean-compile \
  6244 +mostlyclean-am:  mostlyclean-noinstLIBRARIES mostlyclean-compile \
  6245  		mostlyclean-tags mostlyclean-generic
  6247 -clean:  clean-noinstLIBRARIES clean-compile clean-tags clean-generic \
  6248 -		mostlyclean
  6249 +mostlyclean: mostlyclean-am
  6251 +clean-am:  clean-noinstLIBRARIES clean-compile clean-tags clean-generic \
  6252 +		mostlyclean-am
  6254 -distclean:  distclean-noinstLIBRARIES distclean-compile distclean-tags \
  6255 -		distclean-generic clean
  6256 -	-rm -f config.status
  6257 +clean: clean-am
  6259 -maintainer-clean:  maintainer-clean-noinstLIBRARIES \
  6260 +distclean-am:  distclean-noinstLIBRARIES distclean-compile \
  6261 +		distclean-tags distclean-generic clean-am
  6263 +distclean: distclean-am
  6265 +maintainer-clean-am:  maintainer-clean-noinstLIBRARIES \
  6266  		maintainer-clean-compile maintainer-clean-tags \
  6267 -		maintainer-clean-generic distclean
  6268 +		maintainer-clean-generic distclean-am
  6269  	@echo "This command is intended for maintainers to use;"
  6270  	@echo "it deletes files that may require special tools to rebuild."
  6272 +maintainer-clean: maintainer-clean-am
  6274  .PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \
  6275  clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
  6276  mostlyclean-compile distclean-compile clean-compile \
  6277  maintainer-clean-compile tags mostlyclean-tags distclean-tags \
  6278 -clean-tags maintainer-clean-tags distdir info dvi installcheck \
  6279 -install-info install-exec install-data install uninstall all \
  6280 -installdirs mostlyclean-generic distclean-generic clean-generic \
  6281 +clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \
  6282 +check-am installcheck-am installcheck install-info-am install-info \
  6283 +install-exec-am install-exec install-data-am install-data install-am \
  6284 +install uninstall-am uninstall all-redirect all-am all installdirs \
  6285 +mostlyclean-generic distclean-generic clean-generic \
  6286  maintainer-clean-generic clean mostlyclean distclean maintainer-clean
  6289 diff -urN newlib-1.8.2/newlib/libc/time/Makefile.in newlib-1.8.2-dc/newlib/libc/time/Makefile.in
  6290 --- newlib-1.8.2/newlib/libc/time/Makefile.in	1998-12-01 08:03:48.000000000 +1000
  6291 +++ newlib-1.8.2-dc/newlib/libc/time/Makefile.in	2006-07-06 18:28:31.000000000 +1000
  6292 @@ -1,6 +1,6 @@
  6293 -# Makefile.in generated automatically by automake 1.3b from Makefile.am
  6294 +# Makefile.in generated automatically by automake 1.4 from Makefile.am
  6296 -# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
  6297 +# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
  6298  # This Makefile.in is free software; the Free Software Foundation
  6299  # gives unlimited permission to copy and/or distribute it,
  6300  # with or without modifications, as long as this notice is preserved.
  6301 @@ -46,7 +46,7 @@
  6302  AUTOHEADER = @AUTOHEADER@
  6304  INSTALL = @INSTALL@
  6305 -INSTALL_PROGRAM = @INSTALL_PROGRAM@
  6306 +INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
  6307  INSTALL_DATA = @INSTALL_DATA@
  6308  INSTALL_SCRIPT = @INSTALL_SCRIPT@
  6309  transform = @program_transform_name@
  6310 @@ -78,7 +78,6 @@
  6311  PACKAGE = @PACKAGE@
  6312  RANLIB = @RANLIB@
  6313  VERSION = @VERSION@
  6314 -mach_add_objs = @mach_add_objs@
  6315  machine_dir = @machine_dir@
  6316  newlib_basedir = @newlib_basedir@
  6317  sys_dir = @sys_dir@
  6318 @@ -89,31 +88,11 @@
  6320  noinst_LIBRARIES = lib.a
  6322 -lib_a_SOURCES = \
  6323 -	asctime.c	\
  6324 -	asctime_r.c	\
  6325 -	clock.c		\
  6326 -	ctime.c		\
  6327 -	ctime_r.c	\
  6328 -	difftime.c	\
  6329 -	gmtime.c	\
  6330 -	gmtime_r.c	\
  6331 -	lcltime.c	\
  6332 -	lcltime_r.c	\
  6333 -	mktime.c	\
  6334 -	strftime.c  	\
  6335 -	time.c
  6337 -CHEWOUT_FILES = \
  6338 -	asctime.def	\
  6339 -	clock.def 	\
  6340 -	ctime.def	\
  6341 -	difftime.def	\
  6342 -	gmtime.def	\
  6343 -	lcltime.def	\
  6344 -	mktime.def	\
  6345 -	strftime.def	\
  6346 -	time.def
  6347 +lib_a_SOURCES =  	asctime.c		asctime_r.c		clock.c			ctime.c			ctime_r.c		difftime.c		gmtime.c		gmtime_r.c		lcltime.c		lcltime_r.c		mktime.c		strftime.c  		time.c
  6350 +CHEWOUT_FILES =  	asctime.def		clock.def 		ctime.def		difftime.def		gmtime.def		lcltime.def		mktime.def		strftime.def		time.def
  6353  SUFFIXES = .def
  6355 @@ -137,22 +116,22 @@
  6356  strftime.o time.o
  6357  CFLAGS = @CFLAGS@
  6358  COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
  6359 -LINK = $(CC) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
  6360 +CCLD = $(CC)
  6361 +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
  6362  DIST_COMMON =  Makefile.am Makefile.in
  6365  DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
  6367  TAR = tar
  6368 -GZIP = --best
  6369 +GZIP_ENV = --best
  6370  SOURCES = $(lib_a_SOURCES)
  6371  OBJECTS = $(lib_a_OBJECTS)
  6373 -all: Makefile $(LIBRARIES)
  6375 +all: all-redirect
  6376  .SUFFIXES:
  6377  .SUFFIXES: .S .c .def .o .s
  6378 -$(srcdir)/Makefile.in: @MAINT@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
  6379 +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
  6380  	cd $(top_srcdir) && $(AUTOMAKE) --cygnus time/Makefile
  6382  Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
  6383 @@ -196,8 +175,12 @@
  6384  tags: TAGS
  6386  ID: $(HEADERS) $(SOURCES) $(LISP)
  6387 +	list='$(SOURCES) $(HEADERS)'; \
  6388 +	unique=`for i in $$list; do echo $$i; done | \
  6389 +	  awk '    { files[$$0] = 1; } \
  6390 +	       END { for (i in files) print i; }'`; \
  6391  	here=`pwd` && cd $(srcdir) \
  6392 -	  && mkid -f$$here/ID $(SOURCES) $(HEADERS) $(LISP)
  6393 +	  && mkid -f$$here/ID $$unique $(LISP)
  6395  TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) $(LISP)
  6396  	tags=; \
  6397 @@ -225,28 +208,39 @@
  6398  distdir: $(DISTFILES)
  6399  	@for file in $(DISTFILES); do \
  6400  	  if test -f $$file; then d=.; else d=$(srcdir); fi; \
  6401 -	  test -f $(distdir)/$$file \
  6402 -	  || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
  6403 -	  || cp -p $$d/$$file $(distdir)/$$file; \
  6404 +	  if test -d $$d/$$file; then \
  6405 +	    cp -pr $$d/$$file $(distdir)/$$file; \
  6406 +	  else \
  6407 +	    test -f $(distdir)/$$file \
  6408 +	    || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
  6409 +	    || cp -p $$d/$$file $(distdir)/$$file || :; \
  6410 +	  fi; \
  6411  	done
  6412 -info:
  6413 -dvi:
  6414 -check:
  6415 -installcheck:
  6416 -install-info:
  6417 -install-exec: 
  6418 -	@$(NORMAL_INSTALL)
  6420 -install-data: 
  6421 -	@$(NORMAL_INSTALL)
  6423 -install: install-exec install-data all
  6424 -	@:
  6426 -uninstall: 
  6428 +info-am:
  6429 +info: info-am
  6430 +dvi-am:
  6431 +dvi: dvi-am
  6432 +check-am:
  6433 +check: check-am
  6434 +installcheck-am:
  6435 +installcheck: installcheck-am
  6436 +install-info-am: 
  6437 +install-info: install-info-am
  6438 +install-exec-am:
  6439 +install-exec: install-exec-am
  6441 +install-data-am:
  6442 +install-data: install-data-am
  6444 +install-am: all-am
  6445 +	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
  6446 +install: install-am
  6447 +uninstall-am:
  6448 +uninstall: uninstall-am
  6449 +all-am: Makefile $(LIBRARIES)
  6450 +all-redirect: all-am
  6451  install-strip:
  6452 -	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
  6453 +	$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
  6454  installdirs:
  6457 @@ -260,29 +254,38 @@
  6458  	-rm -f config.cache config.log stamp-h stamp-h[0-9]*
  6460  maintainer-clean-generic:
  6461 -mostlyclean:  mostlyclean-noinstLIBRARIES mostlyclean-compile \
  6462 +mostlyclean-am:  mostlyclean-noinstLIBRARIES mostlyclean-compile \
  6463  		mostlyclean-tags mostlyclean-generic
  6465 -clean:  clean-noinstLIBRARIES clean-compile clean-tags clean-generic \
  6466 -		mostlyclean
  6467 +mostlyclean: mostlyclean-am
  6469 -distclean:  distclean-noinstLIBRARIES distclean-compile distclean-tags \
  6470 -		distclean-generic clean
  6471 -	-rm -f config.status
  6472 +clean-am:  clean-noinstLIBRARIES clean-compile clean-tags clean-generic \
  6473 +		mostlyclean-am
  6475 -maintainer-clean:  maintainer-clean-noinstLIBRARIES \
  6476 +clean: clean-am
  6478 +distclean-am:  distclean-noinstLIBRARIES distclean-compile \
  6479 +		distclean-tags distclean-generic clean-am
  6481 +distclean: distclean-am
  6483 +maintainer-clean-am:  maintainer-clean-noinstLIBRARIES \
  6484  		maintainer-clean-compile maintainer-clean-tags \
  6485 -		maintainer-clean-generic distclean
  6486 +		maintainer-clean-generic distclean-am
  6487  	@echo "This command is intended for maintainers to use;"
  6488  	@echo "it deletes files that may require special tools to rebuild."
  6490 +maintainer-clean: maintainer-clean-am
  6492  .PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \
  6493  clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
  6494  mostlyclean-compile distclean-compile clean-compile \
  6495  maintainer-clean-compile tags mostlyclean-tags distclean-tags \
  6496 -clean-tags maintainer-clean-tags distdir info dvi installcheck \
  6497 -install-info install-exec install-data install uninstall all \
  6498 -installdirs mostlyclean-generic distclean-generic clean-generic \
  6499 +clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \
  6500 +check-am installcheck-am installcheck install-info-am install-info \
  6501 +install-exec-am install-exec install-data-am install-data install-am \
  6502 +install uninstall-am uninstall all-redirect all-am all installdirs \
  6503 +mostlyclean-generic distclean-generic clean-generic \
  6504  maintainer-clean-generic clean mostlyclean distclean maintainer-clean
  6507 diff -urN newlib-1.8.2/newlib/libc/unix/Makefile.in newlib-1.8.2-dc/newlib/libc/unix/Makefile.in
  6508 --- newlib-1.8.2/newlib/libc/unix/Makefile.in	1998-12-01 08:03:48.000000000 +1000
  6509 +++ newlib-1.8.2-dc/newlib/libc/unix/Makefile.in	2006-07-06 18:28:31.000000000 +1000
  6510 @@ -1,6 +1,6 @@
  6511 -# Makefile.in generated automatically by automake 1.3b from Makefile.am
  6512 +# Makefile.in generated automatically by automake 1.4 from Makefile.am
  6514 -# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
  6515 +# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
  6516  # This Makefile.in is free software; the Free Software Foundation
  6517  # gives unlimited permission to copy and/or distribute it,
  6518  # with or without modifications, as long as this notice is preserved.
  6519 @@ -46,7 +46,7 @@
  6520  AUTOHEADER = @AUTOHEADER@
  6522  INSTALL = @INSTALL@
  6523 -INSTALL_PROGRAM = @INSTALL_PROGRAM@
  6524 +INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
  6525  INSTALL_DATA = @INSTALL_DATA@
  6526  INSTALL_SCRIPT = @INSTALL_SCRIPT@
  6527  transform = @program_transform_name@
  6528 @@ -78,7 +78,6 @@
  6529  PACKAGE = @PACKAGE@
  6530  RANLIB = @RANLIB@
  6531  VERSION = @VERSION@
  6532 -mach_add_objs = @mach_add_objs@
  6533  machine_dir = @machine_dir@
  6534  newlib_basedir = @newlib_basedir@
  6535  sys_dir = @sys_dir@
  6536 @@ -89,10 +88,10 @@
  6538  noinst_LIBRARIES = lib.a
  6540 -lib_a_SOURCES = \
  6541 -	getpass.c sigset.c getpwent.c ttyname.c getut.c getlogin.c getcwd.c
  6542 +lib_a_SOURCES =  	getpass.c sigset.c getpwent.c ttyname.c getut.c getlogin.c getcwd.c
  6544 -CHEWOUT_FILES =
  6546 +CHEWOUT_FILES = 
  6548  SUFFIXES = .def
  6550 @@ -115,22 +114,22 @@
  6551  getlogin.o getcwd.o
  6552  CFLAGS = @CFLAGS@
  6553  COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
  6554 -LINK = $(CC) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
  6555 +CCLD = $(CC)
  6556 +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
  6557  DIST_COMMON =  Makefile.am Makefile.in
  6560  DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
  6562  TAR = tar
  6563 -GZIP = --best
  6564 +GZIP_ENV = --best
  6565  SOURCES = $(lib_a_SOURCES)
  6566  OBJECTS = $(lib_a_OBJECTS)
  6568 -all: Makefile $(LIBRARIES)
  6570 +all: all-redirect
  6571  .SUFFIXES:
  6572  .SUFFIXES: .S .c .def .o .s
  6573 -$(srcdir)/Makefile.in: @MAINT@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
  6574 +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
  6575  	cd $(top_srcdir) && $(AUTOMAKE) --cygnus unix/Makefile
  6577  Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
  6578 @@ -174,8 +173,12 @@
  6579  tags: TAGS
  6581  ID: $(HEADERS) $(SOURCES) $(LISP)
  6582 +	list='$(SOURCES) $(HEADERS)'; \
  6583 +	unique=`for i in $$list; do echo $$i; done | \
  6584 +	  awk '    { files[$$0] = 1; } \
  6585 +	       END { for (i in files) print i; }'`; \
  6586  	here=`pwd` && cd $(srcdir) \
  6587 -	  && mkid -f$$here/ID $(SOURCES) $(HEADERS) $(LISP)
  6588 +	  && mkid -f$$here/ID $$unique $(LISP)
  6590  TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) $(LISP)
  6591  	tags=; \
  6592 @@ -203,28 +206,39 @@
  6593  distdir: $(DISTFILES)
  6594  	@for file in $(DISTFILES); do \
  6595  	  if test -f $$file; then d=.; else d=$(srcdir); fi; \
  6596 -	  test -f $(distdir)/$$file \
  6597 -	  || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
  6598 -	  || cp -p $$d/$$file $(distdir)/$$file; \
  6599 +	  if test -d $$d/$$file; then \
  6600 +	    cp -pr $$d/$$file $(distdir)/$$file; \
  6601 +	  else \
  6602 +	    test -f $(distdir)/$$file \
  6603 +	    || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
  6604 +	    || cp -p $$d/$$file $(distdir)/$$file || :; \
  6605 +	  fi; \
  6606  	done
  6607 -info:
  6608 -dvi:
  6609 -check:
  6610 -installcheck:
  6611 -install-info:
  6612 -install-exec: 
  6613 -	@$(NORMAL_INSTALL)
  6615 -install-data: 
  6616 -	@$(NORMAL_INSTALL)
  6618 -install: install-exec install-data all
  6619 -	@:
  6621 -uninstall: 
  6623 +info-am:
  6624 +info: info-am
  6625 +dvi-am:
  6626 +dvi: dvi-am
  6627 +check-am:
  6628 +check: check-am
  6629 +installcheck-am:
  6630 +installcheck: installcheck-am
  6631 +install-info-am: 
  6632 +install-info: install-info-am
  6633 +install-exec-am:
  6634 +install-exec: install-exec-am
  6636 +install-data-am:
  6637 +install-data: install-data-am
  6639 +install-am: all-am
  6640 +	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
  6641 +install: install-am
  6642 +uninstall-am:
  6643 +uninstall: uninstall-am
  6644 +all-am: Makefile $(LIBRARIES)
  6645 +all-redirect: all-am
  6646  install-strip:
  6647 -	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
  6648 +	$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
  6649  installdirs:
  6652 @@ -238,29 +252,38 @@
  6653  	-rm -f config.cache config.log stamp-h stamp-h[0-9]*
  6655  maintainer-clean-generic:
  6656 -mostlyclean:  mostlyclean-noinstLIBRARIES mostlyclean-compile \
  6657 +mostlyclean-am:  mostlyclean-noinstLIBRARIES mostlyclean-compile \
  6658  		mostlyclean-tags mostlyclean-generic
  6660 -clean:  clean-noinstLIBRARIES clean-compile clean-tags clean-generic \
  6661 -		mostlyclean
  6662 +mostlyclean: mostlyclean-am
  6664 +clean-am:  clean-noinstLIBRARIES clean-compile clean-tags clean-generic \
  6665 +		mostlyclean-am
  6667 -distclean:  distclean-noinstLIBRARIES distclean-compile distclean-tags \
  6668 -		distclean-generic clean
  6669 -	-rm -f config.status
  6670 +clean: clean-am
  6672 -maintainer-clean:  maintainer-clean-noinstLIBRARIES \
  6673 +distclean-am:  distclean-noinstLIBRARIES distclean-compile \
  6674 +		distclean-tags distclean-generic clean-am
  6676 +distclean: distclean-am
  6678 +maintainer-clean-am:  maintainer-clean-noinstLIBRARIES \
  6679  		maintainer-clean-compile maintainer-clean-tags \
  6680 -		maintainer-clean-generic distclean
  6681 +		maintainer-clean-generic distclean-am
  6682  	@echo "This command is intended for maintainers to use;"
  6683  	@echo "it deletes files that may require special tools to rebuild."
  6685 +maintainer-clean: maintainer-clean-am
  6687  .PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \
  6688  clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
  6689  mostlyclean-compile distclean-compile clean-compile \
  6690  maintainer-clean-compile tags mostlyclean-tags distclean-tags \
  6691 -clean-tags maintainer-clean-tags distdir info dvi installcheck \
  6692 -install-info install-exec install-data install uninstall all \
  6693 -installdirs mostlyclean-generic distclean-generic clean-generic \
  6694 +clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \
  6695 +check-am installcheck-am installcheck install-info-am install-info \
  6696 +install-exec-am install-exec install-data-am install-data install-am \
  6697 +install uninstall-am uninstall all-redirect all-am all installdirs \
  6698 +mostlyclean-generic distclean-generic clean-generic \
  6699  maintainer-clean-generic clean mostlyclean distclean maintainer-clean
.