Search
lxdream.org :: lxdream :: r185:6755a04c447f
lxdream 0.9.1
released Jun 29
Download Now
changeset185:6755a04c447f
parent184:a1f69295dda1
child186:79bfebd5e0ff
authornkeynes
dateTue Jul 11 01:35:27 2006 +0000 (17 years ago)
First commit of system test framework. 3 initial test cases (incomplete):
testide, testmath, and testta
test/Makefile
test/README
test/asic.c
test/asic.h
test/bin2c.c
test/crt0.s
test/dc.x
test/dma.h
test/dmac.c
test/ide.c
test/ide.h
test/include/_ansi.h
test/include/_syslist.h
test/include/ar.h
test/include/assert.h
test/include/ctype.h
test/include/dirent.h
test/include/errno.h
test/include/fastmath.h
test/include/fcntl.h
test/include/grp.h
test/include/ieeefp.h
test/include/locale.h
test/include/machine/fastmath.h
test/include/machine/ieeefp.h
test/include/machine/setjmp-dj.h
test/include/machine/setjmp.h
test/include/machine/time.h
test/include/machine/types.h
test/include/malloc.h
test/include/math.h
test/include/paths.h
test/include/process.h
test/include/pwd.h
test/include/reent.h
test/include/regdef.h
test/include/setjmp.h
test/include/signal.h
test/include/stdio.h
test/include/stdlib.h
test/include/string.h
test/include/sys/_types.h
test/include/sys/config.h
test/include/sys/dirent.h
test/include/sys/errno.h
test/include/sys/fcntl.h
test/include/sys/file.h
test/include/sys/param.h
test/include/sys/reent.h
test/include/sys/resource.h
test/include/sys/signal.h
test/include/sys/stat-dj.h
test/include/sys/stat.h
test/include/sys/time.h
test/include/sys/timeb.h
test/include/sys/times.h
test/include/sys/types.h
test/include/sys/unistd.h
test/include/sys/utime.h
test/include/sys/wait.h
test/include/termios.h
test/include/time.h
test/include/unctrl.h
test/include/unistd.h
test/include/utime.h
test/include/utmp.h
test/lib.c
test/lib.h
test/lib/libc.a
test/lib/libm.a
test/lib/newlib-1.8.2-dc.patch
test/lxdream.rc
test/math.s
test/pvr.c
test/pvr.h
test/testdata.c
test/testdata.h
test/testide.c
test/testmath.c
test/testta.c
test/testta.data
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/test/Makefile Tue Jul 11 01:35:27 2006 +0000
1.3 @@ -0,0 +1,89 @@
1.4 +# host compiler and flags
1.5 +HOSTCC = gcc
1.6 +HOSTCFLAGS = -O2
1.7 +SH4CC = sh-elf-gcc
1.8 +SH4INC = -Iinclude
1.9 +SH4CFLAGS = $(SH4INC) -D_arch_dreamcast -D_arch_sub_pristine \
1.10 + -O2 -fno-builtin -fno-strict-aliasing -ml -m4-single-only \
1.11 + -fno-optimize-sibling-calls
1.12 +SH4LD = sh-elf-ld
1.13 +SH4LDFLAGS = -fno-builtin -fno-strict-aliasing -ml -m4-single-only \
1.14 + -Wl,-Tdc.x -nostartfiles -nostdlib -Llib
1.15 +SH4LIBS = -Wl,--start-group -lc -lgcc -lm -Wl,--end-group
1.16 +SH4OBJCOPY = sh-elf-objcopy -O binary
1.17 +ARMCC = arm-elf-gcc
1.18 +ARMCFLAGS = -O2
1.19 +ARMLD = arm-elf-ld
1.20 +ARMOBJCOPY = arm-elf-objcopy
1.21 +
1.22 +BFDLIB = -L/usr/local/sh-elf-bfd/lib -lbfd -liberty
1.23 +BFDINCLUDE = /usr/local/sh-elf-bfd/include
1.24 +RUNTEST = ../src/lxdream -c ./lxdream.rc -h -q -p
1.25 +
1.26 +
1.27 +# cygwin
1.28 +# these must point to your sh-elf bfd, not the system one
1.29 +#BFDLIB = -L/usr/local/lib -lbfd -liberty -lintl
1.30 +#BFDINCLUDE = /usr/local/include
1.31 +
1.32 +#SHARED_OBJECTS = crt0.so dcload-syscall.so dcload-syscalls.so memcpy.so lib.so
1.33 +SHARED_OBJECTS =
1.34 +
1.35 +%.ao: %.c
1.36 + $(ARMCC) $(ARMCFLAGS) -o $@ -c $<
1.37 +
1.38 +%.ao: %.s
1.39 + $(ARMCC) $(ARMCFLAGS) -o $@ -c $<
1.40 +
1.41 +%.so: %.c
1.42 + $(SH4CC) $(SH4CFLAGS) -o $@ -c $<
1.43 +
1.44 +%.so: %.ac
1.45 + $(SH4CC) $(SH4CFLAGS) -o $@ -c $<
1.46 +
1.47 +%.so: %.s
1.48 + $(SH4CC) $(SH4CFLAGS) -o $@ -c $<
1.49 +
1.50 +%.so: %.S
1.51 + $(SH4CC) $(SH4CFLAGS) -o $@ -c $<
1.52 +
1.53 +%.o: %.c
1.54 + $(HOSTCC) $(HOSTCFLAGS) -o $@ -c $<
1.55 +
1.56 +%.arm: %.ao arm_crt0.ao
1.57 + $(ARMCC) -Wl,-Ttext,0x00000000 -nostartfiles -nostdlib -e reset -o $@ arm_crt0.ao $< -lgcc
1.58 +
1.59 +
1.60 +%.bin: %.arm
1.61 + $(ARMOBJCOPY) -O binary $< $@
1.62 +
1.63 +%.aso: %.bin bin2c
1.64 + ./bin2c $< $<.c
1.65 + $(SH4CC) $(SH4CFLAGS) -o $@ -c $<.c
1.66 +
1.67 +all: build-tests
1.68 +
1.69 +test: build-tests
1.70 + $(RUNTEST) testmath
1.71 + $(RUNTEST) testide -d ../disc/test.nrg
1.72 + $(RUNTEST) testta < testta.data
1.73 +
1.74 +build-tests: testmath testide testta
1.75 +
1.76 +testide: crt0.so testide.so ide.so
1.77 + $(SH4CC) $(SH4LDFLAGS) $^ -o $@ $(SH4LIBS)
1.78 +
1.79 +testmath: crt0.so $(SHARED_OBJECTS) testmath.so math.so
1.80 + $(SH4CC) $(SH4LDFLAGS) $^ -o $@ $(SH4LIBS)
1.81 +
1.82 +testta: crt0.so $(SHARED_OBJECTS) testta.so pvr.so dmac.so asic.so lib.so testdata.so
1.83 + $(SH4CC) $(SH4LDFLAGS) $^ -o $@ $(SH4LIBS)
1.84 + $(SH4OBJCOPY) testta testta.bin
1.85 +
1.86 +readdata: crt0.so readdata.so
1.87 + $(SH4CC) $(SH4LDFLAGS) $^ -o $@ $(SH4LIBS)
1.88 +
1.89 +.PHONY : clean
1.90 +clean:
1.91 + rm -f *.o *.so *.ao *.ac *.bin mapleid ide readmem dumpasic
1.92 +
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2.2 +++ b/test/README Tue Jul 11 01:35:27 2006 +0000
2.3 @@ -0,0 +1,15 @@
2.4 +
2.5 +The test cases in this directory require an sh4 tool chain, as well as an
2.6 +arm tool chain if you want to build the AICA tests. The default Makefile
2.7 +assumes these are sh-elf and arm-elf targets respectively. A modified copy of
2.8 +newlib 1.8.2 prebuilt for SH4 with dc-load support is included as well,
2.9 +to save having to set up that part of the environment. The necessary patch
2.10 +is in the lib directory if you wish to build from source (newlib is included
2.11 +under the terms of the GPL)
2.12 +
2.13 +crt0.s is included from the dcload distribution, and is assumed to be
2.14 +redistributable under the terms of the GPL.
2.15 +
2.16 +There is currently no configure/automake for this directory - you'll need to
2.17 +modify the Makefile directly if needed. This should probably be changed
2.18 +eventually
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
3.2 +++ b/test/asic.c Tue Jul 11 01:35:27 2006 +0000
3.3 @@ -0,0 +1,84 @@
3.4 +/**
3.5 + * $Id: asic.c,v 1.1 2006-07-11 01:35:23 nkeynes Exp $
3.6 + *
3.7 + * General ASIC support code
3.8 + *
3.9 + * Copyright (c) 2006 Nathan Keynes.
3.10 + *
3.11 + * This program is free software; you can redistribute it and/or modify
3.12 + * it under the terms of the GNU General Public License as published by
3.13 + * the Free Software Foundation; either version 2 of the License, or
3.14 + * (at your option) any later version.
3.15 + *
3.16 + * This program is distributed in the hope that it will be useful,
3.17 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
3.18 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3.19 + * GNU General Public License for more details.
3.20 + */
3.21 +
3.22 +#include "lib.h"
3.23 +
3.24 +#define ASIC_BASE 0xA05F6000
3.25 +#define ASIC_PIRQ(n) (ASIC_BASE + 0x900 + (n<<2))
3.26 +#define ASIC_IRQA(n) (ASIC_BASE + 0x910 + (n<<2))
3.27 +#define ASIC_IRQB(n) (ASIC_BASE + 0x920 + (n<<2))
3.28 +#define ASIC_IRQC(n) (ASIC_BASE + 0x930 + (n<<2))
3.29 +#define TIMEOUT 10000000
3.30 +
3.31 +/**
3.32 + * Wait for an ASIC event.
3.33 + * @return 0 if the event occurred, otherwise -1 if the wait timed out.
3.34 + */
3.35 +int asic_wait( int event )
3.36 +{
3.37 + int n = event >> 5;
3.38 + unsigned int mask = (1<< (event&0x1f));
3.39 + int i;
3.40 + for( i=0; i<TIMEOUT; i++ ) {
3.41 + if( long_read(ASIC_PIRQ(n)) & mask ) {
3.42 + return 0;
3.43 + }
3.44 + }
3.45 + return -1; /* Timeout */
3.46 +}
3.47 +
3.48 +/**
3.49 + * Clear all asic events
3.50 + */
3.51 +void asic_clear()
3.52 +{
3.53 + long_write(ASIC_PIRQ(0), 0xFFFFFFFF);
3.54 + long_write(ASIC_PIRQ(1), 0xFFFFFFFF);
3.55 + long_write(ASIC_PIRQ(2), 0xFFFFFFFF);
3.56 +}
3.57 +
3.58 +void asic_mask_all()
3.59 +{
3.60 + long_write(ASIC_IRQA(0), 0);
3.61 + long_write(ASIC_IRQA(1), 0);
3.62 + long_write(ASIC_IRQA(2), 0);
3.63 + long_write(ASIC_IRQB(0), 0);
3.64 + long_write(ASIC_IRQB(1), 0);
3.65 + long_write(ASIC_IRQB(2), 0);
3.66 + long_write(ASIC_IRQC(0), 0);
3.67 + long_write(ASIC_IRQC(1), 0);
3.68 + long_write(ASIC_IRQC(2), 0);
3.69 +}
3.70 +
3.71 +/**
3.72 + * Print the contents of the ASIC event registers to the supplied FILE
3.73 + */
3.74 +void asic_dump( FILE *f )
3.75 +{
3.76 + int i,j;
3.77 + fprintf( f, "Events: " );
3.78 + for( i=0; i<3; i++ ) {
3.79 + uint32_t val = long_read(ASIC_PIRQ(i));
3.80 + for( j=0; j<32; j++ ) {
3.81 + if( val & (1<<j) ) {
3.82 + fprintf( f, "%d ", (i<<5)+j );
3.83 + }
3.84 + }
3.85 + }
3.86 + fprintf( f, "\n" );
3.87 +}
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
4.2 +++ b/test/asic.h Tue Jul 11 01:35:27 2006 +0000
4.3 @@ -0,0 +1,42 @@
4.4 +
4.5 +#include <stdio.h>
4.6 +
4.7 +#define EVENT_PVR_RENDER_DONE 2
4.8 +#define EVENT_SCANLINE1 3
4.9 +#define EVENT_SCANLINE2 4
4.10 +#define EVENT_RETRACE 5
4.11 +#define EVENT_PVR_UNK 6
4.12 +#define EVENT_PVR_OPAQUE_DONE 7
4.13 +#define EVENT_PVR_OPAQUEMOD_DONE 8
4.14 +#define EVENT_PVR_TRANS_DONE 9
4.15 +#define EVENT_PVR_TRANSMOD_DONE 10
4.16 +#define EVENT_MAPLE_DMA 12
4.17 +#define EVENT_MAPLE_ERR 13 /* ??? */
4.18 +#define EVENT_IDE_DMA 14
4.19 +#define EVENT_SPU_DMA0 15
4.20 +#define EVENT_SPU_DMA1 16
4.21 +#define EVENT_SPU_DMA2 17
4.22 +#define EVENT_SPU_DMA3 18
4.23 +#define EVENT_PVR_DMA 19
4.24 +#define EVENT_PVR_PUNCHOUT_DONE 21
4.25 +
4.26 +#define EVENT_IDE 32
4.27 +#define EVENT_AICA 33
4.28 +
4.29 +/**
4.30 + * Wait for an ASIC event.
4.31 + * @return 0 if the event occurred, otherwise -1 if the wait timed out.
4.32 + */
4.33 +int asic_wait( int event );
4.34 +
4.35 +/**
4.36 + * Clear all asic events
4.37 + */
4.38 +void asic_clear();
4.39 +
4.40 +/**
4.41 + * Print the contents of the ASIC event registers to the supplied FILE
4.42 + */
4.43 +void asic_dump( FILE *f );
4.44 +
4.45 +void asic_mask_all();
5.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
5.2 +++ b/test/bin2c.c Tue Jul 11 01:35:27 2006 +0000
5.3 @@ -0,0 +1,63 @@
5.4 +/* Converts a binary file into a C integer array (for inclusion in
5.5 + a source file)
5.6 +
5.7 + (c)2000 Dan Potter
5.8 +
5.9 + $Id: bin2c.c,v 1.1 2006-07-11 01:35:23 nkeynes Exp $
5.10 + Note: Licensed under the new BSD license, see README.KOS -NK
5.11 +*/
5.12 +
5.13 +#include <stdio.h>
5.14 +
5.15 +void convert(char *ifn, char *ofn, char *prefix) {
5.16 + FILE *i, *o;
5.17 + unsigned char buffer[2048];
5.18 + int red, left, lc, q;
5.19 + char buf[BUFSIZ];
5.20 +
5.21 + i = fopen(ifn, "rb");
5.22 + o = fopen(ofn, "w");
5.23 + if (!i || !o) {
5.24 + printf("error: can't open input or output file\n");
5.25 + return;
5.26 + }
5.27 +
5.28 + fseek(i, 0, SEEK_END); left = ftell(i); fseek(i, 0, SEEK_SET);
5.29 + setbuf(o, buf);
5.30 +
5.31 + fprintf(o, "const int %s_size = %d;\n", prefix, left);
5.32 + fprintf(o, "const unsigned char %s_data[%d] =", prefix, left);
5.33 + fprintf(o, "{\n\t");
5.34 +
5.35 + lc = 0;
5.36 + while(left > 0) {
5.37 + red = fread(buffer, 1, 2048, i);
5.38 + left -= red;
5.39 + for (q=0; q<red; q++) {
5.40 + fprintf(o, "0x%02x, ", buffer[q]);
5.41 + if ((++lc) >= 8) {
5.42 + lc = 0;
5.43 + fprintf(o, "\n\t");
5.44 + }
5.45 + }
5.46 + }
5.47 +
5.48 + fprintf(o, "\n};\n");
5.49 + fclose(i); fclose(o);
5.50 +}
5.51 +
5.52 +int main(int argc, char **argv) {
5.53 +
5.54 + char *prefix;
5.55 +
5.56 + argc--;
5.57 + if (argc != 2 && argc != 3) {
5.58 + printf("usage: bin2c <input> <output> [prefix]\n");
5.59 + return 0;
5.60 + }
5.61 +
5.62 + prefix = (argc == 3) ? argv[3] : "file";
5.63 + convert(argv[1], argv[2], prefix);
5.64 + return 0;
5.65 +}
5.66 +
6.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
6.2 +++ b/test/crt0.s Tue Jul 11 01:35:27 2006 +0000
6.3 @@ -0,0 +1,119 @@
6.4 + .section .text
6.5 + .global start
6.6 + .global ___exit
6.7 + .global _atexit
6.8 +start:
6.9 + mov.l setup_cache_k,r0
6.10 + mov.l p2_mask,r1
6.11 + or r1,r0
6.12 + jmp @r0
6.13 + nop
6.14 +setup_cache:
6.15 + mov.l ccr_addr,r0
6.16 + mov.w ccr_data,r1
6.17 + mov.l r1,@r0
6.18 + mov.l start_2_k,r0
6.19 + nop
6.20 + nop
6.21 + nop
6.22 + nop
6.23 + nop
6.24 + nop
6.25 + nop
6.26 + jmp @r0
6.27 + nop
6.28 +start_2:
6.29 + mov.l old_stack_k,r14
6.30 + mov.l r15,@r14
6.31 + mov.l old_pr_k,r14
6.32 + sts pr,r15
6.33 + mov.l r15,@r14
6.34 + mov.l stack_k,r15
6.35 +
6.36 + ! zero out bss
6.37 + mov.l edata_k,r0
6.38 + mov.l end_k,r1
6.39 + mov #0,r2
6.40 +start_l:
6.41 + mov.l r2,@r0
6.42 + add #4,r0
6.43 + cmp/ge r0,r1
6.44 + bt start_l
6.45 +
6.46 +#if defined (__SH3E__) || defined(__SH4_SINGLE__) || defined(__SH4__) || defined(__SH4_SINGLE_ONLY)
6.47 + mov.l set_fpscr_k, r1
6.48 + jsr @r1
6.49 + mov #0,r4
6.50 + lds r3,fpscr
6.51 +#endif /* defined (__SH3E__) || defined(__SH4_SINGLE__) || defined(__SH4__) || defined(__SH4_SINGLE_ONLY__) */
6.52 +
6.53 + ! call the mainline
6.54 + mov.l main_k,r0
6.55 + jsr @r0
6.56 + or r0,r0
6.57 +
6.58 + ! call exit
6.59 + mov r0,r4
6.60 + mov.l exit_k,r0
6.61 + jsr @r0
6.62 + or r0,r0
6.63 +
6.64 +___exit:
6.65 + mov.l old_pr_k,r14
6.66 + mov.l @r14,r15
6.67 + lds r15,pr
6.68 + mov.l old_stack_k,r14
6.69 + mov.l @r14,r15
6.70 + rts
6.71 + nop
6.72 +
6.73 +_atexit:
6.74 + rts
6.75 + nop
6.76 +
6.77 + .align 4
6.78 +#if defined (__SH3E__) || defined(__SH4_SINGLE__) || defined(__SH4__) || defined(__SH4_SINGLE_ONLY__)
6.79 +set_fpscr_k:
6.80 + .long ___set_fpscr
6.81 +#endif /* defined (__SH3E__) || defined(__SH4_SINGLE__) || defined(__SH4__) || defined(SH4_SINGLE_ONLY) */
6.82 +stack_k:
6.83 + .long _stack
6.84 +edata_k:
6.85 + .long _edata
6.86 +end_k:
6.87 + .long _end
6.88 +main_k:
6.89 + .long _main
6.90 +exit_k:
6.91 + .long _exit
6.92 +
6.93 +old_stack_k:
6.94 + .long _old_stack
6.95 +old_pr_k:
6.96 + .long _old_pr
6.97 +
6.98 +_old_stack:
6.99 + .long 0
6.100 +_old_pr:
6.101 + .long 0
6.102 +
6.103 +setup_cache_k:
6.104 + .long setup_cache
6.105 +start_2_k:
6.106 + .long start_2
6.107 +p2_mask:
6.108 + .long 0xa0000000
6.109 +ccr_addr:
6.110 + .long 0xff00001c
6.111 +ccr_data:
6.112 + .word 0x090b
6.113 +
6.114 + .align 4
6.115 +
6.116 +#ifdef __ELF__
6.117 + .section .stack,"aw"
6.118 +#else
6.119 + .section .stack
6.120 +#endif
6.121 +! _stack: .long 0xdeaddead
6.122 +
7.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
7.2 +++ b/test/dc.x Tue Jul 11 01:35:27 2006 +0000
7.3 @@ -0,0 +1,228 @@
7.4 +/* Sega Dreamcast linker script */
7.5 +
7.6 +OUTPUT_FORMAT("elf32-shl", "elf32-shl",
7.7 + "elf32-shl")
7.8 +OUTPUT_ARCH(sh)
7.9 +ENTRY(start)
7.10 + SEARCH_DIR(/usr/local/dcdev/sh-elf/lib);
7.11 +/* Do we need any of these for elf?
7.12 + __DYNAMIC = 0; */
7.13 +
7.14 +MEMORY
7.15 +{
7.16 + ram (rwx) : ORIGIN = 0x8c010000, LENGTH = 0xfe0000
7.17 +}
7.18 +
7.19 +SECTIONS
7.20 +{
7.21 + /* Read-only sections, merged into text segment: */
7.22 +/* . = 0x1000;*/
7.23 + .interp : { *(.interp) }
7.24 + .hash : { *(.hash) }
7.25 + .dynsym : { *(.dynsym) }
7.26 + .dynstr : { *(.dynstr) }
7.27 + .gnu.version : { *(.gnu.version) }
7.28 + .gnu.version_d : { *(.gnu.version_d) }
7.29 + .gnu.version_r : { *(.gnu.version_r) }
7.30 + .rel.init : { *(.rel.init) }
7.31 + .rela.init : { *(.rela.init) }
7.32 + .rel.text :
7.33 + {
7.34 + *(.rel.text)
7.35 + *(.rel.text.*)
7.36 + *(.rel.gnu.linkonce.t*)
7.37 + }
7.38 + .rela.text :
7.39 + {
7.40 + *(.rela.text)
7.41 + *(.rela.text.*)
7.42 + *(.rela.gnu.linkonce.t*)
7.43 + }
7.44 + .rel.fini : { *(.rel.fini) }
7.45 + .rela.fini : { *(.rela.fini) }
7.46 + .rel.rodata :
7.47 + {
7.48 + *(.rel.rodata)
7.49 + *(.rel.rodata.*)
7.50 + *(.rel.gnu.linkonce.r*)
7.51 + }
7.52 + .rela.rodata :
7.53 + {
7.54 + *(.rela.rodata)
7.55 + *(.rela.rodata.*)
7.56 + *(.rela.gnu.linkonce.r*)
7.57 + }
7.58 + .rel.data :
7.59 + {
7.60 + *(.rel.data)
7.61 + *(.rel.data.*)
7.62 + *(.rel.gnu.linkonce.d*)
7.63 + }
7.64 + .rela.data :
7.65 + {
7.66 + *(.rela.data)
7.67 + *(.rela.data.*)
7.68 + *(.rela.gnu.linkonce.d*)
7.69 + }
7.70 + .rel.ctors : { *(.rel.ctors) }
7.71 + .rela.ctors : { *(.rela.ctors) }
7.72 + .rel.dtors : { *(.rel.dtors) }
7.73 + .rela.dtors : { *(.rela.dtors) }
7.74 + .rel.got : { *(.rel.got) }
7.75 + .rela.got : { *(.rela.got) }
7.76 + .rel.sdata :
7.77 + {
7.78 + *(.rel.sdata)
7.79 + *(.rel.sdata.*)
7.80 + *(.rel.gnu.linkonce.s*)
7.81 + }
7.82 + .rela.sdata :
7.83 + {
7.84 + *(.rela.sdata)
7.85 + *(.rela.sdata.*)
7.86 + *(.rela.gnu.linkonce.s*)
7.87 + }
7.88 + .rel.sbss : { *(.rel.sbss) }
7.89 + .rela.sbss : { *(.rela.sbss) }
7.90 + .rel.bss : { *(.rel.bss) }
7.91 + .rela.bss : { *(.rela.bss) }
7.92 + .rel.plt : { *(.rel.plt) }
7.93 + .rela.plt : { *(.rela.plt) }
7.94 + .init :
7.95 + {
7.96 + KEEP (*(.init))
7.97 + } =0
7.98 + .plt : { *(.plt) }
7.99 + .text :
7.100 + {
7.101 + *(.text)
7.102 + *(.text.*)
7.103 + *(.stub)
7.104 + /* .gnu.warning sections are handled specially by elf32.em. */
7.105 + *(.gnu.warning)
7.106 + *(.gnu.linkonce.t*)
7.107 + } =0
7.108 + _etext = .;
7.109 + PROVIDE (etext = .);
7.110 + .fini :
7.111 + {
7.112 + KEEP (*(.fini))
7.113 + } =0
7.114 + .rodata : { *(.rodata) *(.rodata.*) *(.gnu.linkonce.r*) }
7.115 + .rodata1 : { *(.rodata1) }
7.116 + /* Adjust the address for the data segment. We want to adjust up to
7.117 + the same address within the page on the next page up. */
7.118 + . = ALIGN(128) + (. & (128 - 1));
7.119 + .data :
7.120 + {
7.121 + *(.data)
7.122 + *(.data.*)
7.123 + *(.gnu.linkonce.d*)
7.124 + SORT(CONSTRUCTORS)
7.125 + }
7.126 + .data1 : { *(.data1) }
7.127 + .eh_frame : { *(.eh_frame) }
7.128 + .gcc_except_table : { *(.gcc_except_table) }
7.129 + .ctors ALIGN(4):
7.130 + {
7.131 + ___ctors = .;
7.132 + /* gcc uses crtbegin.o to find the start of
7.133 + the constructors, so we make sure it is
7.134 + first. Because this is a wildcard, it
7.135 + doesn't matter if the user does not
7.136 + actually link against crtbegin.o; the
7.137 + linker won't look for a file to match a
7.138 + wildcard. The wildcard also means that it
7.139 + doesn't matter which directory crtbegin.o
7.140 + is in. */
7.141 + KEEP (*crtbegin.o(.ctors))
7.142 + /* We don't want to include the .ctor section from
7.143 + from the crtend.o file until after the sorted ctors.
7.144 + The .ctor section from the crtend file contains the
7.145 + end of ctors marker and it must be last */
7.146 + KEEP (*(EXCLUDE_FILE (*crtend.o ) .ctors))
7.147 + KEEP (*(SORT(.ctors.*)))
7.148 + KEEP (*(.ctors))
7.149 + ___ctors_end = .;
7.150 + }
7.151 + .dtors :
7.152 + {
7.153 + ___dtors = .;
7.154 + KEEP (*crtbegin.o(.dtors))
7.155 + KEEP (*(EXCLUDE_FILE (*crtend.o ) .dtors))
7.156 + KEEP (*(SORT(.dtors.*)))
7.157 + KEEP (*(.dtors))
7.158 + ___dtors_end = .;
7.159 + }
7.160 + .got : { *(.got.plt) *(.got) }
7.161 + .dynamic : { *(.dynamic) }
7.162 + /* We want the small data sections together, so single-instruction offsets
7.163 + can access them all, and initialized data all before uninitialized, so
7.164 + we can shorten the on-disk segment size. */
7.165 + .sdata :
7.166 + {
7.167 + *(.sdata)
7.168 + *(.sdata.*)
7.169 + *(.gnu.linkonce.s.*)
7.170 + }
7.171 + _edata = .;
7.172 + PROVIDE (edata = .);
7.173 + __bss_start = .;
7.174 + .sbss :
7.175 + {
7.176 + *(.dynsbss)
7.177 + *(.sbss)
7.178 + *(.sbss.*)
7.179 + *(.scommon)
7.180 + }
7.181 + .bss :
7.182 + {
7.183 + *(.dynbss)
7.184 + *(.bss)
7.185 + *(.bss.*)
7.186 + *(COMMON)
7.187 + /* Align here to ensure that the .bss section occupies space up to
7.188 + _end. Align after .bss to ensure correct alignment even if the
7.189 + .bss section disappears because there are no input sections. */
7.190 + . = ALIGN(32 / 8);
7.191 + }
7.192 + . = ALIGN(32 / 8);
7.193 + _end = .;
7.194 + PROVIDE (end = .);
7.195 + /* Stabs debugging sections. */
7.196 + .stab 0 : { *(.stab) }
7.197 + .stabstr 0 : { *(.stabstr) }
7.198 + .stab.excl 0 : { *(.stab.excl) }
7.199 + .stab.exclstr 0 : { *(.stab.exclstr) }
7.200 + .stab.index 0 : { *(.stab.index) }
7.201 + .stab.indexstr 0 : { *(.stab.indexstr) }
7.202 + .comment 0 : { *(.comment) }
7.203 + /* DWARF debug sections.
7.204 + Symbols in the DWARF debugging sections are relative to the beginning
7.205 + of the section so we begin them at 0. */
7.206 + /* DWARF 1 */
7.207 + .debug 0 : { *(.debug) }
7.208 + .line 0 : { *(.line) }
7.209 + /* GNU DWARF 1 extensions */
7.210 + .debug_srcinfo 0 : { *(.debug_srcinfo) }
7.211 + .debug_sfnames 0 : { *(.debug_sfnames) }
7.212 + /* DWARF 1.1 and DWARF 2 */
7.213 + .debug_aranges 0 : { *(.debug_aranges) }
7.214 + .debug_pubnames 0 : { *(.debug_pubnames) }
7.215 + /* DWARF 2 */
7.216 + .debug_info 0 : { *(.debug_info) }
7.217 + .debug_abbrev 0 : { *(.debug_abbrev) }
7.218 + .debug_line 0 : { *(.debug_line) }
7.219 + .debug_frame 0 : { *(.debug_frame) }
7.220 + .debug_str 0 : { *(.debug_str) }
7.221 + .debug_loc 0 : { *(.debug_loc) }
7.222 + .debug_macinfo 0 : { *(.debug_macinfo) }
7.223 + /* SGI/MIPS DWARF 2 extensions */
7.224 + .debug_weaknames 0 : { *(.debug_weaknames) }
7.225 + .debug_funcnames 0 : { *(.debug_funcnames) }
7.226 + .debug_typenames 0 : { *(.debug_typenames) }
7.227 + .debug_varnames 0 : { *(.debug_varnames) }
7.228 +/* .stack 0x8c00f400 : { _stack = .; *(.stack) }*/
7.229 + /* These must appear regardless of . */
7.230 + _stack = 0x8d000000;
7.231 +}
8.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
8.2 +++ b/test/dma.h Tue Jul 11 01:35:27 2006 +0000
8.3 @@ -0,0 +1,47 @@
8.4 +/**
8.5 + * $Id: dma.h,v 1.1 2006-07-11 01:35:23 nkeynes Exp $
8.6 + *
8.7 + * DMA support code
8.8 + *
8.9 + * Copyright (c) 2006 Nathan Keynes.
8.10 + *
8.11 + * This program is free software; you can redistribute it and/or modify
8.12 + * it under the terms of the GNU General Public License as published by
8.13 + * the Free Software Foundation; either version 2 of the License, or
8.14 + * (at your option) any later version.
8.15 + *
8.16 + * This program is distributed in the hope that it will be useful,
8.17 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
8.18 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
8.19 + * GNU General Public License for more details.
8.20 + */
8.21 +
8.22 +#include "lib.h"
8.23 +
8.24 +/**
8.25 + * Setup the DMAC for a transfer. Assumes 32-byte block transfer.
8.26 + * Caller is responsible for making sure no-one else is using the
8.27 + * channel already.
8.28 + *
8.29 + * @param channel DMA channel to use, 0 to 3
8.30 + * @param source source address (if a memory source)
8.31 + * @param dest destination address (if a memory destination)
8.32 + * @param length number of bytes to transfer (must be a multiple of
8.33 + * 32.
8.34 + * @param direction 0 = host to device, 1 = device to host
8.35 + */
8.36 +void dmac_prepare_channel( int channel, uint32_t source, uint32_t dest,
8.37 + uint32_t length, int direction );
8.38 +
8.39 +/**
8.40 + * Transfer data to the PVR via DMA. Target address should be
8.41 + * 0x10000000 for the TA, and 0x11000000 + VRAM address for VRAM.
8.42 + *
8.43 + * @param target Target address
8.44 + * @param buf Data to write (must be 32-byte aligned)
8.45 + * @param length Size of data to write, in bytes.
8.46 + * @param region Target region for VRAM writes, 0 for 64-byte region, 1 for 32-byte region.
8.47 + *
8.48 + * @return 0 on success, non-zero on failure.
8.49 + */
8.50 +int pvr_dma_write( unsigned int target, char *buf, int length, int region );
9.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
9.2 +++ b/test/dmac.c Tue Jul 11 01:35:27 2006 +0000
9.3 @@ -0,0 +1,128 @@
9.4 +/**
9.5 + * $Id: dmac.c,v 1.1 2006-07-11 01:35:23 nkeynes Exp $
9.6 + *
9.7 + * DMA support code
9.8 + *
9.9 + * Copyright (c) 2006 Nathan Keynes.
9.10 + *
9.11 + * This program is free software; you can redistribute it and/or modify
9.12 + * it under the terms of the GNU General Public License as published by
9.13 + * the Free Software Foundation; either version 2 of the License, or
9.14 + * (at your option) any later version.
9.15 + *
9.16 + * This program is distributed in the hope that it will be useful,
9.17 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
9.18 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9.19 + * GNU General Public License for more details.
9.20 + */
9.21 +
9.22 +#include "dma.h"
9.23 +#include "asic.h"
9.24 +
9.25 +#define DMA_BASE 0xFFA00000
9.26 +
9.27 +#define DMA_SAR(c) (DMA_BASE+0x00+(c<<4))
9.28 +#define DMA_DAR(c) (DMA_BASE+0x04+(c<<4))
9.29 +#define DMA_TCR(c) (DMA_BASE+0x08+(c<<4))
9.30 +#define DMA_CHCR(c) (DMA_BASE+0x0C+(c<<4))
9.31 +#define DMA_OR (DMA_BASE+0x40)
9.32 +
9.33 +#define ASIC_BASE 0xA05F6000
9.34 +#define PVR_DMA_DEST (ASIC_BASE+0x800)
9.35 +#define PVR_DMA_COUNT (ASIC_BASE+0x804)
9.36 +#define PVR_DMA_CTL (ASIC_BASE+0x808)
9.37 +#define PVR_DMA_REGION (ASIC_BASE+0x884)
9.38 +
9.39 +void dmac_dump_channel( FILE *f, unsigned int channel )
9.40 +{
9.41 + fprintf( f, "DMAC SAR: %08X Count: %08X Ctl: %08X OR: %08X\n",
9.42 + long_read(DMA_SAR(channel)), long_read(DMA_TCR(channel)),
9.43 + long_read(DMA_CHCR(channel)), long_read(DMA_OR) );
9.44 +}
9.45 +
9.46 +
9.47 +/**
9.48 + * Setup the DMAC for a transfer. Assumes 32-byte block transfer.
9.49 + * Caller is responsible for making sure no-one else is using the
9.50 + * channel already.
9.51 + *
9.52 + * @param channel DMA channel to use, 0 to 3
9.53 + * @param source source address (if a memory source)
9.54 + * @param dest destination address (if a memory destination)
9.55 + * @param length number of bytes to transfer (must be a multiple of
9.56 + * 32.
9.57 + * @param direction 0 = host to device, 1 = device to host
9.58 + */
9.59 +void dmac_prepare_channel( int channel, uint32_t source, uint32_t dest,
9.60 + uint32_t length, int direction )
9.61 +{
9.62 + uint32_t control;
9.63 +
9.64 + if( direction == 0 ) {
9.65 + /* DMA Disabled, IRQ disabled, 32 byte transfer, burst mode,
9.66 + * Memory => Device, Source addr increment, dest addr fixed
9.67 + */
9.68 + control = 0x000012C0;
9.69 + } else {
9.70 + /* DMA Disabled, IRQ disabled, 32 byte transfer, burst mode,
9.71 + * Device => Memory, Source addr fixed, dest addr increment
9.72 + */
9.73 + control = 0x000043C0;
9.74 + }
9.75 + long_write( DMA_CHCR(channel), control );
9.76 + long_write( DMA_SAR(channel), source );
9.77 + long_write( DMA_DAR(channel), dest );
9.78 + long_write( DMA_TCR(channel), (length >> 5) );
9.79 + control |= 0x0001;
9.80 + long_write( DMA_CHCR(channel), control ); /* Enable DMA channel */
9.81 + long_write( DMA_OR, 0x8201 ); /* Ensure the DMAC config is set */
9.82 +}
9.83 +
9.84 +
9.85 +int pvr_dma_write( unsigned int target, char *buf, int len, int region )
9.86 +{
9.87 + uint32_t addr =(uint32_t)buf;
9.88 + int result;
9.89 + if( (addr & 0xFFFFFFE0) != addr ) {
9.90 + fprintf( stderr, "Address error: Attempting DMA from %08X\n", addr );
9.91 + return -1;
9.92 + } else {
9.93 + fprintf( stderr, "PVR DMA transfer from %08X\n", addr );
9.94 + }
9.95 + long_write( PVR_DMA_CTL, 0 ); /* Stop PVR dma if it's already running */
9.96 + asic_clear();
9.97 +
9.98 + dmac_prepare_channel( 2, (uint32_t)buf, 0, len, 0 ); /* Allocate channel 2 */
9.99 + long_write( PVR_DMA_DEST, target );
9.100 + long_write( PVR_DMA_COUNT, len );
9.101 + long_write( PVR_DMA_REGION, region );
9.102 +
9.103 + CHECK_IEQUALS( target, long_read(PVR_DMA_DEST) );
9.104 + CHECK_IEQUALS( len, long_read(PVR_DMA_COUNT) );
9.105 + CHECK_IEQUALS( 0, long_read(PVR_DMA_REGION) );
9.106 + CHECK_IEQUALS( (uint32_t)buf, long_read(DMA_SAR(2)) );
9.107 + CHECK_IEQUALS( len/32, long_read(DMA_TCR(2)) );
9.108 + CHECK_IEQUALS( 0x12C1, long_read(DMA_CHCR(2)) );
9.109 +
9.110 + long_write( PVR_DMA_CTL, 1 );
9.111 + result = asic_wait(EVENT_PVR_DMA);
9.112 +
9.113 + if( result != 0 ) {
9.114 + fprintf( stderr, "PVR DMA failed (timeout)\n" );
9.115 + asic_dump(stderr);
9.116 + fprintf( stderr, "Dest: %08X Count: %08X Ctl: %08X\n", long_read(PVR_DMA_DEST),
9.117 + long_read(PVR_DMA_COUNT), long_read(PVR_DMA_CTL) );
9.118 + dmac_dump_channel(stderr, 2);
9.119 + long_write( PVR_DMA_CTL, 0 );
9.120 + }
9.121 +
9.122 + CHECK_IEQUALS( 0, long_read(PVR_DMA_CTL) );
9.123 + CHECK_IEQUALS( ((uint32_t)buf)+len, long_read(DMA_SAR(2)) );
9.124 + CHECK_IEQUALS( 0, long_read(DMA_TCR(2)) );
9.125 + CHECK_IEQUALS( 0x12C3, long_read(DMA_CHCR(2)) );
9.126 + CHECK_IEQUALS( target, long_read(PVR_DMA_DEST) );
9.127 + CHECK_IEQUALS( 0, long_read(PVR_DMA_COUNT) );
9.128 + CHECK_IEQUALS( 0, long_read(PVR_DMA_REGION) );
9.129 +
9.130 + return result;
9.131 +}
10.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
10.2 +++ b/test/ide.c Tue Jul 11 01:35:27 2006 +0000
10.3 @@ -0,0 +1,418 @@
10.4 +#include <assert.h>
10.5 +#include <stdlib.h>
10.6 +#include "ide.h"
10.7 +#include "lib.h"
10.8 +
10.9 +#define IDE_BASE 0xA05F7000
10.10 +
10.11 +#define IDE_ALTSTATUS IDE_BASE+0x018
10.12 +#define IDE_UNKNOWN IDE_BASE+0x01C
10.13 +#define IDE_DATA IDE_BASE+0x080 /* 16 bits */
10.14 +#define IDE_FEATURE IDE_BASE+0x084
10.15 +#define IDE_COUNT IDE_BASE+0x088
10.16 +#define IDE_LBA0 IDE_BASE+0x08C
10.17 +#define IDE_LBA1 IDE_BASE+0x090
10.18 +#define IDE_LBA2 IDE_BASE+0x094
10.19 +#define IDE_DEVICE IDE_BASE+0x098
10.20 +#define IDE_COMMAND IDE_BASE+0x09C
10.21 +#define IDE_ACTIVATE IDE_BASE+0x4E4
10.22 +
10.23 +#define IDE_DEVCONTROL IDE_ALTSTATUS
10.24 +#define IDE_ERROR IDE_FEATURE
10.25 +#define IDE_STATUS IDE_COMMAND
10.26 +
10.27 +#define IDE_DMA_ADDR IDE_BASE+0x404
10.28 +#define IDE_DMA_SIZE IDE_BASE+0x408
10.29 +#define IDE_DMA_DIR IDE_BASE+0x40C
10.30 +#define IDE_DMA_CTL1 IDE_BASE+0x414
10.31 +#define IDE_DMA_CTL2 IDE_BASE+0x418
10.32 +#define IDE_DMA_MAGIC IDE_BASE+0x4B8
10.33 +#define IDE_DMA_STATUS IDE_BASE+0x4F8
10.34 +
10.35 +#define DMA_BASE 0xFFA00000
10.36 +#define DMA_SAR1 DMA_BASE+0x010
10.37 +#define DMA_DAR1 DMA_BASE+0x014
10.38 +#define DMA_TCR1 DMA_BASE+0x018
10.39 +#define DMA_CHCR1 DMA_BASE+0x01C
10.40 +#define DMA_SAR2 DMA_BASE+0x020
10.41 +#define DMA_DAR2 DMA_BASE+0x024
10.42 +#define DMA_TCR2 DMA_BASE+0x028
10.43 +#define DMA_CHCR2 DMA_BASE+0x02C
10.44 +#define DMA_SAR3 DMA_BASE+0x030
10.45 +#define DMA_DAR3 DMA_BASE+0x034
10.46 +#define DMA_TCR3 DMA_BASE+0x038
10.47 +#define DMA_CHCR3 DMA_BASE+0x03C
10.48 +#define DMA_DMAOR DMA_BASE+0x040
10.49 +#define QUEUECR0 0xFF000038
10.50 +#define QUEUECR1 0xFF00003C
10.51 +
10.52 +#define IDE_CMD_RESET 0x08
10.53 +#define IDE_CMD_PACKET 0xA0
10.54 +#define IDE_CMD_IDENTIFY_PACKET_DEVICE 0xA1
10.55 +#define IDE_CMD_IDENTIFY_DEVICE 0xEC
10.56 +
10.57 +#define MMC_CMD_GET_CONFIGURATION 0x46
10.58 +#define GD_CMD_IDENTIFY 0x11 /* guessing */
10.59 +
10.60 +
10.61 +#define IDE_DMA_MAGIC_VALUE 0x8843407F
10.62 +
10.63 +
10.64 +#define MAX_WAIT 10000000
10.65 +#define MAX_IRQ_WAIT 1000000000
10.66 +
10.67 +/**
10.68 + * Dump all ide registers to stdout.
10.69 + */
10.70 +void ide_dump_registers() {
10.71 + int i,j;
10.72 + printf( "IDE registers:\n");
10.73 + printf( "Stats: %02X ", byte_read(IDE_ALTSTATUS) );
10.74 + printf( "Error: %02X ", byte_read(IDE_ERROR) );
10.75 + printf( "Count: %02X ", byte_read(IDE_COUNT) );
10.76 + printf( "Dvice: %02X ", byte_read(IDE_DEVICE) );
10.77 + if( long_read(ASIC_STATUS1)&1 ) {
10.78 + printf( "INTRQ! " );
10.79 + }
10.80 + if( (long_read(ASIC_STATUS0)>>14)&1 ) {
10.81 + printf( "DMARQ! " );
10.82 + }
10.83 + printf( "\nLBA 0: %02X ", byte_read(IDE_LBA0) );
10.84 + printf( "LBA 1: %02X ", byte_read(IDE_LBA1) );
10.85 + printf( "LBA 2: %02X ", byte_read(IDE_LBA2) );
10.86 + printf( "0x01C: %02X\n", byte_read(IDE_UNKNOWN) );
10.87 + printf( "DAddr: %08X ", long_read(IDE_DMA_ADDR) );
10.88 + printf( "DSize: %08X ", long_read(IDE_DMA_SIZE) );
10.89 + printf( "DDir : %08X ", long_read(IDE_DMA_DIR) );
10.90 + printf( "DCtl1: %08X ", long_read(IDE_DMA_CTL1) );
10.91 + printf( "DCtl2: %08X\n", long_read(IDE_DMA_CTL2) );
10.92 + printf( "DStat: %08X\n", long_read(IDE_DMA_STATUS) );
10.93 + printf( "ASIC: " );
10.94 + for( i=0; i<12; i+=4 ) {
10.95 + unsigned int val = long_read(ASIC_STATUS0+i);
10.96 + for( j=0; j<32; j++ ) {
10.97 + if( val & (1<<j) ) {
10.98 + printf( "%d ", j );
10.99 + }
10.100 + }
10.101 + printf( "| " );
10.102 + }
10.103 + printf( "\n" );
10.104 +}
10.105 +
10.106 +/**
10.107 + * Wait for the IDE INTRQ line to go active (bit 0 of the second word)
10.108 + * @return 0 on success, non-zero on timeout
10.109 + */
10.110 +int ide_wait_irq() {
10.111 + unsigned int status;
10.112 + int i;
10.113 + for( i=0; i<MAX_WAIT; i++ ) {
10.114 + status = long_read( ASIC_STATUS1 );
10.115 + if( (status&1) != 0 )
10.116 + return 0;
10.117 + }
10.118 + printf( "Timeout waiting for IDE INTRQ\n" );
10.119 + ide_dump_registers();
10.120 + return 1;
10.121 +}
10.122 +
10.123 +/**
10.124 + * Wait for the IDE BSY flag to be de-asserted.
10.125 + * @return 0 on success, non-zero on timeout
10.126 + */
10.127 +int ide_wait_ready() {
10.128 + unsigned char status;
10.129 + int i;
10.130 + for( i=0; i<MAX_WAIT; i++ ) {
10.131 + status = byte_read(IDE_ALTSTATUS);
10.132 + if( (status & 0x80) != 0x80 )
10.133 + return 0;
10.134 + }
10.135 + printf( "Timeout waiting for IDE to become ready\n" );
10.136 + ide_dump_registers();
10.137 + return 1;
10.138 +}
10.139 +
10.140 +int ide_wait_dma() {
10.141 + unsigned int status;
10.142 + int i;
10.143 + for( i=0; i<MAX_WAIT; i++ ) {
10.144 + status = long_read(IDE_DMA_CTL2);
10.145 + if( (status & 1) == 0 )
10.146 + return 0;
10.147 + }
10.148 + printf( "[IDE] Timeout waiting for DMA to become ready\n" );
10.149 + return 1;
10.150 +}
10.151 +
10.152 +/**
10.153 + * Write the command packet out to the interface.
10.154 + * @param cmd 12 byte ATAPI command packet
10.155 + * @param dma 1 = dma mode, 0 = pio mode
10.156 + */
10.157 +int ide_write_command_packet( char *cmd, int dma )
10.158 +{
10.159 + int i, status;
10.160 + unsigned short *spkt = (unsigned short *)cmd;
10.161 + unsigned short length = 8;
10.162 + if( ide_wait_ready() )
10.163 + return 1;
10.164 + byte_write( IDE_FEATURE, dma );
10.165 + byte_write( IDE_COUNT, 0 );
10.166 + byte_write( IDE_LBA0, 0 );
10.167 + byte_write( IDE_LBA1, (length&0xFF) );
10.168 + byte_write( IDE_LBA2, (length>>8)&0xFF );
10.169 + byte_write( IDE_DEVICE, 0 );
10.170 + byte_write( IDE_COMMAND, IDE_CMD_PACKET );
10.171 + status = byte_read(IDE_ALTSTATUS); /* delay 1 PIO cycle as per spec */
10.172 + printf( "After writing PACKET command byte:\n" );
10.173 + ide_dump_registers();
10.174 + /* Wait until device is ready to accept command */
10.175 + if( ide_wait_ready() )
10.176 + return 1;
10.177 + printf( "Device ready to receive packet:\n" );
10.178 + ide_dump_registers();
10.179 +
10.180 + /* Write the command */
10.181 + for( i=0; i<6; i++ ) {
10.182 + word_write( IDE_DATA, spkt[i] );
10.183 + }
10.184 + printf( "After writing command packet:\n" );
10.185 + ide_dump_registers();
10.186 +}
10.187 +
10.188 +int ide_read_pio( char *buf, int buflen ) {
10.189 + int i;
10.190 + unsigned short *bufptr = (unsigned short *)buf;
10.191 + unsigned int length = 0, avail;
10.192 + int status;
10.193 +
10.194 + while(1) {
10.195 + if( ide_wait_ready() )
10.196 + return -1;
10.197 + status = byte_read( IDE_STATUS );
10.198 + if( (status & 0xE9) == 0x48 ) {
10.199 + /* Bytes available */
10.200 + avail = (byte_read( IDE_LBA1 )) | (byte_read(IDE_LBA2)<<8);
10.201 + for( i=0; i<avail; i+=2 ) {
10.202 + if( buflen > 0 ) {
10.203 + *bufptr++ = word_read(IDE_DATA);
10.204 + buflen-=2;
10.205 + }
10.206 + }
10.207 + length += avail;
10.208 + if( avail == 0 ) {
10.209 + /* Should never happen */
10.210 + printf( "[IDE] Unexpected read length 0\n" );
10.211 + return -1;
10.212 + }
10.213 + } else {
10.214 + if( status&0x01 ) {
10.215 + printf( "[IDE] ERROR! (%02X)\n", status );
10.216 + } else if( (status&0x08) == 0 ) {
10.217 + /* No more data */
10.218 + return length;
10.219 + } else {
10.220 + printf( "[IDE] Unexpected status result: %02X\n", status );
10.221 + return -1;
10.222 + }
10.223 + }
10.224 + }
10.225 +}
10.226 +
10.227 +int ide_read_dma( char *buf, int buflen )
10.228 +{
10.229 + int status;
10.230 +
10.231 + long_write( IDE_DMA_CTL1, 1 );
10.232 + long_write( IDE_DMA_CTL2, 1 );
10.233 +
10.234 + printf( "Started DMA\n" );
10.235 + ide_dump_registers();
10.236 +
10.237 + ide_wait_irq();
10.238 + printf( "After IRQ\n" );
10.239 + ide_dump_registers();
10.240 + long_write( IDE_DMA_CTL1, 0 );
10.241 + status = ide_wait_dma();
10.242 + printf( "After DMA finished\n");
10.243 + ide_dump_registers();
10.244 + if( status != 0 ) {
10.245 + return -1;
10.246 + }
10.247 + status = long_read(ASIC_STATUS0);
10.248 + if( (status & (1<<14)) == 0 ) {
10.249 + printf( "DMARQ cleared already\n");
10.250 + } else {
10.251 + /*
10.252 + status &= ~(1<<14);
10.253 + long_write(ASIC_STATUS0, status);
10.254 + status = long_read(ASIC_STATUS0);
10.255 + */
10.256 + byte_read(IDE_STATUS );
10.257 + if( (status & (1<<14)) == 0 ) {
10.258 + printf( "DMARQ cleared successfully\n" );
10.259 + } else {
10.260 + printf( "DMARQ not cleared: %08X\n", long_read(ASIC_STATUS0) );
10.261 + }
10.262 + }
10.263 + status = ide_wait_ready();
10.264 + printf( "After IDE ready\n");
10.265 + ide_dump_registers();
10.266 + if( status != 0 ) {
10.267 + return -1;
10.268 + }
10.269 + return long_read( IDE_DMA_STATUS );
10.270 +}
10.271 +
10.272 +int ide_do_packet_command_pio( char *cmd, char *buf, int length )
10.273 +{
10.274 + ide_write_command_packet( cmd, 0 );
10.275 + length = ide_read_pio( buf, length );
10.276 + return length;
10.277 +}
10.278 +
10.279 +int ide_do_packet_command_dma( char *cmd, char *buf, int length )
10.280 +{
10.281 + long_write( QUEUECR0, 0x10 );
10.282 + long_write( QUEUECR1, 0x10 );
10.283 + long_write( IDE_DMA_MAGIC, IDE_DMA_MAGIC_VALUE );
10.284 + long_write( IDE_DMA_ADDR, (unsigned int)buf );
10.285 + long_write( IDE_DMA_SIZE, length );
10.286 + long_write( IDE_DMA_DIR, 1 );
10.287 + ide_write_command_packet( cmd, 1 );
10.288 + length = ide_read_dma( buf, length );
10.289 + return length;
10.290 +}
10.291 +
10.292 +int ide_init()
10.293 +{
10.294 + if( ide_wait_ready() )
10.295 + return -1;
10.296 +
10.297 + /** Set Default PIO mode */
10.298 + byte_write( IDE_FEATURE, 0x03 );
10.299 + byte_write( IDE_COUNT, 0x0B );
10.300 + byte_write( IDE_COMMAND, 0xEF );
10.301 +
10.302 + if( ide_wait_ready() )
10.303 + return -1;
10.304 +
10.305 + /** Set Multi-word DMA mode 2 */
10.306 + long_write( 0xA05F7490, 0x222 );
10.307 + long_write( 0xA05F7494, 0x222 );
10.308 + byte_write( IDE_FEATURE, 0x03 );
10.309 + byte_write( IDE_COUNT, 0x22 );
10.310 + byte_write( IDE_COMMAND, 0xEF );
10.311 + if( ide_wait_ready() )
10.312 + return -1;
10.313 +
10.314 + word_write( 0xA05F7480, 0x400 );
10.315 + long_write( 0xA05F7488, 0x200 );
10.316 + long_write( 0xA05F748C, 0x200 );
10.317 + long_write( 0xA05F74A0, 0x2001 );
10.318 + long_write( 0xA05F74A4, 0x2001 );
10.319 + long_write( 0xA05F74B4, 0x0001 );
10.320 +}
10.321 +
10.322 +int ide_sense_error( char *buf )
10.323 +{
10.324 + char cmd[12] = { 0x13,0,0,0, 10,0,0,0, 0,0,0,0 };
10.325 + return ide_do_packet_command_pio( cmd, buf, 10 );
10.326 +}
10.327 +
10.328 +void ide_print_sense_error()
10.329 +{
10.330 + char buf[10];
10.331 + if( ide_sense_error(buf) != 10 ) {
10.332 + printf( "ERROR - Sense error failed!\n" );
10.333 + return;
10.334 + }
10.335 + int major = buf[2] & 0xFF;
10.336 + int minor = buf[8] & 0xFF;
10.337 + printf( "[IDE] Error code %02X,%02X\n", major, minor );
10.338 +}
10.339 +
10.340 +int ide_test_ready()
10.341 +{
10.342 + char cmd[12] = { 0,0,0,0, 0,0,0,0, 0,0,0,0 };
10.343 + int length = ide_do_packet_command_pio( cmd, NULL, 0 );
10.344 + return length;
10.345 +}
10.346 +
10.347 +int ide_read_toc( char *buf, int length )
10.348 +{
10.349 + char cmd[12] = { 0x14,0,0,0, 0x98,0,0,0, 0,0,0,0 };
10.350 + return ide_do_packet_command_pio( cmd, buf, length );
10.351 +}
10.352 +
10.353 +int ide_get_session( int session, struct gdrom_session *session_data )
10.354 +{
10.355 + char cmd[12] = {0x15, 0, session, 0, 6,0,0,0, 0,0,0,0 };
10.356 + char buf[6];
10.357 + int length = ide_do_packet_command_pio( cmd, buf, sizeof(buf) );
10.358 + if( length < 0 )
10.359 + return length;
10.360 + if( length != 6 )
10.361 + return -1;
10.362 + assert(length == 6);
10.363 + session_data->track = ((int)buf[2])&0xFF;
10.364 + session_data->lba = (((int)buf[3])&0xFF) << 16 |
10.365 + (((int)buf[4])&0xFF) << 8 |
10.366 + (((int)buf[5])&0xFF);
10.367 + return 0;
10.368 +}
10.369 +
10.370 +int ide_spinup( )
10.371 +{
10.372 + char cmd[12] = {0x70,0x1F,0,0, 0,0,0,0, 0,0,0,0};
10.373 + int length = ide_do_packet_command_pio( cmd, NULL, 0 );
10.374 + return length;
10.375 +}
10.376 +
10.377 +int ide_unknown71( char *buf, int length )
10.378 +{
10.379 + char cmd[12] = {0x71,0,0,0, 0,0,0,0, 0,0,0,0};
10.380 + return ide_do_packet_command_pio( cmd, buf, length );
10.381 +}
10.382 +
10.383 +int ide_read_sector_pio( uint32_t sector, uint32_t count, int mode,
10.384 + char *buf, int length )
10.385 +{
10.386 + char cmd[12] = { 0x30,0,0,0, 0,0,0,0, 0,0,0,0 };
10.387 +
10.388 + cmd[1] = mode;
10.389 + cmd[2] = (sector>>16)&0xFF;
10.390 + cmd[3] = (sector>>8)&0xFF;
10.391 + cmd[4] = sector&0xFF;
10.392 + cmd[8] = (count>>16)&0xFF;
10.393 + cmd[9] = (count>>8)&0xFF;
10.394 + cmd[10] = count&0xFF;
10.395 + return ide_do_packet_command_pio( cmd, buf, length );
10.396 +}
10.397 +
10.398 +
10.399 +int ide_read_sector_dma( uint32_t sector, uint32_t count, int mode,
10.400 + char *buf, int length )
10.401 +{
10.402 + char cmd[12] = { 0x30,0,0,0, 0,0,0,0, 0,0,0,0 };
10.403 +
10.404 + cmd[1] = mode;
10.405 + cmd[2] = (sector>>16)&0xFF;
10.406 + cmd[3] = (sector>>8)&0xFF;
10.407 + cmd[4] = sector&0xFF;
10.408 + cmd[8] = (count>>16)&0xFF;
10.409 + cmd[9] = (count>>8)&0xFF;
10.410 + cmd[10] = count&0xFF;
10.411 + return ide_do_packet_command_dma( cmd, buf, length );
10.412 +}
10.413 +
10.414 +int ide_read_something( )
10.415 +{
10.416 + char cmd[12] = { 0x12,0,0,0, 0x0a,0,0,0, 0,0,0,0 };
10.417 + char result[10];
10.418 + ide_do_packet_command_pio( cmd, result, 10 );
10.419 + debug_dump_buffer(result,10);
10.420 + return 0;
10.421 +}
10.422 \ No newline at end of file
11.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
11.2 +++ b/test/ide.h Tue Jul 11 01:35:27 2006 +0000
11.3 @@ -0,0 +1,37 @@
11.4 +
11.5 +struct gdrom_session {
11.6 + int track;
11.7 + unsigned int lba;
11.8 +};
11.9 +
11.10 +struct gdrom_track {
11.11 + int mode;
11.12 + unsigned int lba;
11.13 +};
11.14 +
11.15 +struct gdrom_toc {
11.16 + struct gdrom_track track[99];
11.17 + unsigned int first_lba;
11.18 + unsigned int last_lba;
11.19 + unsigned int leadout_lba;
11.20 +};
11.21 +
11.22 +int ide_init();
11.23 +
11.24 +int ide_test_ready();
11.25 +
11.26 +int ide_sense_error( char *buf );
11.27 +
11.28 +/**
11.29 + * Retrieve session information. If session == 0, returns the
11.30 + * end-of-disc information instead.
11.31 + */
11.32 +int ide_get_session( int session, struct gdrom_session *session_data );
11.33 +
11.34 +/**
11.35 + * Read 1 or more sectors in PIO mode
11.36 + */
11.37 +int ide_read_sector_pio( unsigned int sector, unsigned int count, int mode,
11.38 + char *buf, int length );
11.39 +int ide_read_sector_dma( unsigned int sector, unsigned int count, int mode,
11.40 + char *buf, int length );
12.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
12.2 +++ b/test/include/_ansi.h Tue Jul 11 01:35:27 2006 +0000
12.3 @@ -0,0 +1,71 @@
12.4 +/* Provide support for both ANSI and non-ANSI environments. */
12.5 +
12.6 +/* Some ANSI environments are "broken" in the sense that __STDC__ cannot be
12.7 + relied upon to have it's intended meaning. Therefore we must use our own
12.8 + concoction: _HAVE_STDC. Always use _HAVE_STDC instead of __STDC__ in newlib
12.9 + sources!
12.10 +
12.11 + To get a strict ANSI C environment, define macro __STRICT_ANSI__. This will
12.12 + "comment out" the non-ANSI parts of the ANSI header files (non-ANSI header
12.13 + files aren't affected). */
12.14 +
12.15 +#ifndef _ANSIDECL_H_
12.16 +#define _ANSIDECL_H_
12.17 +
12.18 +#include <sys/config.h>
12.19 +
12.20 +/* First try to figure out whether we really are in an ANSI C environment. */
12.21 +/* FIXME: This probably needs some work. Perhaps sys/config.h can be
12.22 + prevailed upon to give us a clue. */
12.23 +
12.24 +#ifdef __STDC__
12.25 +#define _HAVE_STDC
12.26 +#endif
12.27 +
12.28 +#ifdef _HAVE_STDC
12.29 +#define _PTR void *
12.30 +#define _AND ,
12.31 +#define _NOARGS void
12.32 +#define _CONST const
12.33 +#define _VOLATILE volatile
12.34 +#define _SIGNED signed
12.35 +#define _DOTS , ...
12.36 +#define _VOID void
12.37 +#define _EXFUN(name, proto) name proto
12.38 +#define _DEFUN(name, arglist, args) name(args)
12.39 +#define _DEFUN_VOID(name) name(_NOARGS)
12.40 +#define _CAST_VOID (void)
12.41 +#ifndef _LONG_DOUBLE
12.42 +#define _LONG_DOUBLE long double
12.43 +#endif
12.44 +#ifndef _PARAMS
12.45 +#define _PARAMS(paramlist) paramlist
12.46 +#endif
12.47 +#else
12.48 +#define _PTR char *
12.49 +#define _AND ;
12.50 +#define _NOARGS
12.51 +#define _CONST
12.52 +#define _VOLATILE
12.53 +#define _SIGNED
12.54 +#define _DOTS
12.55 +#define _VOID void
12.56 +#define _EXFUN(name, proto) name()
12.57 +#define _DEFUN(name, arglist, args) name arglist args;
12.58 +#define _DEFUN_VOID(name) name()
12.59 +#define _CAST_VOID
12.60 +#define _LONG_DOUBLE double
12.61 +#ifndef _PARAMS
12.62 +#define _PARAMS(paramlist) ()
12.63 +#endif
12.64 +#endif
12.65 +
12.66 +/* Support gcc's __attribute__ facility. */
12.67 +
12.68 +#ifdef __GNUC__
12.69 +#define _ATTRIBUTE(attrs) __attribute__ (attrs)
12.70 +#else
12.71 +#define _ATTRIBUTE(attrs)
12.72 +#endif
12.73 +
12.74 +#endif /* _ANSIDECL_H_ */
13.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
13.2 +++ b/test/include/_syslist.h Tue Jul 11 01:35:27 2006 +0000
13.3 @@ -0,0 +1,29 @@
13.4 +/* internal use only -- mapping of "system calls" for libraries that lose
13.5 + and only provide C names, so that we end up in violation of ANSI */
13.6 +#ifndef __SYSLIST_H
13.7 +#define __SYSLIST_H
13.8 +#ifdef MISSING_SYSCALL_NAMES
13.9 +#define _close close
13.10 +#define _execve execve
13.11 +#define _fcntl fcntl
13.12 +#define _fork fork
13.13 +#define _fstat fstat
13.14 +#define _getpid getpid
13.15 +#define _gettimeofday gettimeofday
13.16 +#define _kill kill
13.17 +#define _link link
13.18 +#define _lseek lseek
13.19 +#define _open open
13.20 +#define _read read
13.21 +#define _sbrk sbrk
13.22 +#define _stat stat
13.23 +#define _times times
13.24 +#define _unlink unlink
13.25 +#define _wait wait
13.26 +#define _write write
13.27 +/* functions not yet sysfaked */
13.28 +#define _opendir opendir
13.29 +#define _readdir readdir
13.30 +#define _closedir closedir
13.31 +#endif
13.32 +#endif
14.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
14.2 +++ b/test/include/ar.h Tue Jul 11 01:35:27 2006 +0000
14.3 @@ -0,0 +1,69 @@
14.4 +/* $NetBSD: ar.h,v 1.4 1994/10/26 00:55:43 cgd Exp $ */
14.5 +
14.6 +/*-
14.7 + * Copyright (c) 1991, 1993
14.8 + * The Regents of the University of California. All rights reserved.
14.9 + * (c) UNIX System Laboratories, Inc.
14.10 + * All or some portions of this file are derived from material licensed
14.11 + * to the University of California by American Telephone and Telegraph
14.12 + * Co. or Unix System Laboratories, Inc. and are reproduced herein with
14.13 + * the permission of UNIX System Laboratories, Inc.
14.14 + *
14.15 + * This code is derived from software contributed to Berkeley by
14.16 + * Hugh Smith at The University of Guelph.
14.17 + *
14.18 + * Redistribution and use in source and binary forms, with or without
14.19 + * modification, are permitted provided that the following conditions
14.20 + * are met:
14.21 + * 1. Redistributions of source code must retain the above copyright
14.22 + * notice, this list of conditions and the following disclaimer.
14.23 + * 2. Redistributions in binary form must reproduce the above copyright
14.24 + * notice, this list of conditions and the following disclaimer in the
14.25 + * documentation and/or other materials provided with the distribution.
14.26 + * 3. All advertising materials mentioning features or use of this software
14.27 + * must display the following acknowledgement:
14.28 + * This product includes software developed by the University of
14.29 + * California, Berkeley and its contributors.
14.30 + * 4. Neither the name of the University nor the names of its contributors
14.31 + * may be used to endorse or promote products derived from this software
14.32 + * without specific prior written permission.
14.33 + *
14.34 + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
14.35 + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14.36 + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
14.37 + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
14.38 + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
14.39 + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
14.40 + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
14.41 + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
14.42 + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
14.43 + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
14.44 + * SUCH DAMAGE.
14.45 + *
14.46 + * @(#)ar.h 8.2 (Berkeley) 1/21/94
14.47 + */
14.48 +
14.49 +#ifndef _AR_H_
14.50 +#define _AR_H_
14.51 +
14.52 +/* Pre-4BSD archives had these magic numbers in them. */
14.53 +#define OARMAG1 0177555
14.54 +#define OARMAG2 0177545
14.55 +
14.56 +#define ARMAG "!<arch>\n" /* ar "magic number" */
14.57 +#define SARMAG 8 /* strlen(ARMAG); */
14.58 +
14.59 +#define AR_EFMT1 "#1/" /* extended format #1 */
14.60 +
14.61 +struct ar_hdr {
14.62 + char ar_name[16]; /* name */
14.63 + char ar_date[12]; /* modification time */
14.64 + char ar_uid[6]; /* user id */
14.65 + char ar_gid[6]; /* group id */
14.66 + char ar_mode[8]; /* octal file permissions */
14.67 + char ar_size[10]; /* size in bytes */
14.68 +#define ARFMAG "`\n"
14.69 + char ar_fmag[2]; /* consistency check */
14.70 +};
14.71 +
14.72 +#endif /* !_AR_H_ */
15.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
15.2 +++ b/test/include/assert.h Tue Jul 11 01:35:27 2006 +0000
15.3 @@ -0,0 +1,29 @@
15.4 +/*
15.5 + assert.h
15.6 +*/
15.7 +
15.8 +#ifdef __cplusplus
15.9 +extern "C" {
15.10 +#endif
15.11 +
15.12 +#include "_ansi.h"
15.13 +
15.14 +#undef assert
15.15 +
15.16 +#ifdef NDEBUG /* required by ANSI standard */
15.17 +#define assert(p) ((void)0)
15.18 +#else
15.19 +
15.20 +#ifdef __STDC__
15.21 +#define assert(e) ((e) ? (void)0 : __assert(__FILE__, __LINE__, #e))
15.22 +#else /* PCC */
15.23 +#define assert(e) ((e) ? (void)0 : __assert(__FILE__, __LINE__, "e"))
15.24 +#endif
15.25 +
15.26 +#endif /* NDEBUG */
15.27 +
15.28 +void _EXFUN(__assert,(const char *, int, const char *));
15.29 +
15.30 +#ifdef __cplusplus
15.31 +}
15.32 +#endif
16.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
16.2 +++ b/test/include/ctype.h Tue Jul 11 01:35:27 2006 +0000
16.3 @@ -0,0 +1,73 @@
16.4 +#ifndef _CTYPE_H_
16.5 +#ifdef __cplusplus
16.6 +extern "C" {
16.7 +#endif
16.8 +#define _CTYPE_H_
16.9 +
16.10 +#include "_ansi.h"
16.11 +
16.12 +int _EXFUN(isalnum, (int __c));
16.13 +int _EXFUN(isalpha, (int __c));
16.14 +int _EXFUN(iscntrl, (int __c));
16.15 +int _EXFUN(isdigit, (int __c));
16.16 +int _EXFUN(isgraph, (int __c));
16.17 +int _EXFUN(islower, (int __c));
16.18 +int _EXFUN(isprint, (int __c));
16.19 +int _EXFUN(ispunct, (int __c));
16.20 +int _EXFUN(isspace, (int __c));
16.21 +int _EXFUN(isupper, (int __c));
16.22 +int _EXFUN(isxdigit,(int __c));
16.23 +int _EXFUN(tolower, (int __c));
16.24 +int _EXFUN(toupper, (int __c));
16.25 +
16.26 +#ifndef __STRICT_ANSI__
16.27 +int _EXFUN(isascii, (int __c));
16.28 +int _EXFUN(toascii, (int __c));
16.29 +int _EXFUN(_tolower, (int __c));
16.30 +int _EXFUN(_toupper, (int __c));
16.31 +#endif
16.32 +
16.33 +#define _U 01
16.34 +#define _L 02
16.35 +#define _N 04
16.36 +#define _S 010
16.37 +#define _P 020
16.38 +#define _C 040
16.39 +#define _X 0100
16.40 +#define _B 0200
16.41 +
16.42 +#if !defined(__CYGWIN32__) || defined(__INSIDE_CYGWIN__) || defined(_COMPILING_NEWLIB)
16.43 +extern _CONST char _ctype_[];
16.44 +#else
16.45 +extern _CONST char _ctype_[] __declspec(dllimport);
16.46 +#endif
16.47 +
16.48 +#define isalpha(c) ((_ctype_+1)[(unsigned)(c)]&(_U|_L))
16.49 +#define isupper(c) ((_ctype_+1)[(unsigned)(c)]&_U)
16.50 +#define islower(c) ((_ctype_+1)[(unsigned)(c)]&_L)
16.51 +#define isdigit(c) ((_ctype_+1)[(unsigned)(c)]&_N)
16.52 +#define isxdigit(c) ((_ctype_+1)[(unsigned)(c)]&(_X|_N))
16.53 +#define isspace(c) ((_ctype_+1)[(unsigned)(c)]&_S)
16.54 +#define ispunct(c) ((_ctype_+1)[(unsigned)(c)]&_P)
16.55 +#define isalnum(c) ((_ctype_+1)[(unsigned)(c)]&(_U|_L|_N))
16.56 +#define isprint(c) ((_ctype_+1)[(unsigned)(c)]&(_P|_U|_L|_N|_B))
16.57 +#define isgraph(c) ((_ctype_+1)[(unsigned)(c)]&(_P|_U|_L|_N))
16.58 +#define iscntrl(c) ((_ctype_+1)[(unsigned)(c)]&_C)
16.59 +/* Non-gcc versions will get the library versions, and will be
16.60 + slightly slower */
16.61 +#ifdef __GNUC__
16.62 +# define toupper(c) \
16.63 + ({ int __x = (c); islower(__x) ? (__x - 'a' + 'A') : __x;})
16.64 +# define tolower(c) \
16.65 + ({ int __x = (c); isupper(__x) ? (__x - 'A' + 'a') : __x;})
16.66 +#endif
16.67 +
16.68 +#ifndef __STRICT_ANSI__
16.69 +#define isascii(c) ((unsigned)(c)<=0177)
16.70 +#define toascii(c) ((c)&0177)
16.71 +#endif
16.72 +
16.73 +#ifdef __cplusplus
16.74 +}
16.75 +#endif
16.76 +#endif /* _CTYPE_H_ */
17.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
17.2 +++ b/test/include/dirent.h Tue Jul 11 01:35:27 2006 +0000
17.3 @@ -0,0 +1,7 @@
17.4 +#ifdef __cplusplus
17.5 +extern "C" {
17.6 +#endif
17.7 +#include <sys/dirent.h>
17.8 +#ifdef __cplusplus
17.9 +}
17.10 +#endif
18.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
18.2 +++ b/test/include/errno.h Tue Jul 11 01:35:27 2006 +0000
18.3 @@ -0,0 +1,1 @@
18.4 +#include <sys/errno.h>
19.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
19.2 +++ b/test/include/fastmath.h Tue Jul 11 01:35:27 2006 +0000
19.3 @@ -0,0 +1,13 @@
19.4 +#ifndef _FASTMATH_H_
19.5 +#ifdef __cplusplus
19.6 +extern "C" {
19.7 +#endif
19.8 +#define _FASTMATH_H_
19.9 +
19.10 +#include <math.h>
19.11 +#include <machine/fastmath.h>
19.12 +
19.13 +#ifdef __cplusplus
19.14 +}
19.15 +#endif
19.16 +#endif /* _FASTMATH_H_ */
20.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
20.2 +++ b/test/include/fcntl.h Tue Jul 11 01:35:27 2006 +0000
20.3 @@ -0,0 +1,1 @@
20.4 +#include <sys/fcntl.h>
21.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
21.2 +++ b/test/include/grp.h Tue Jul 11 01:35:27 2006 +0000
21.3 @@ -0,0 +1,85 @@
21.4 +/* $NetBSD: grp.h,v 1.7 1995/04/29 05:30:40 cgd Exp $ */
21.5 +
21.6 +/*-
21.7 + * Copyright (c) 1989, 1993
21.8 + * The Regents of the University of California. All rights reserved.
21.9 + * (c) UNIX System Laboratories, Inc.
21.10 + * All or some portions of this file are derived from material licensed
21.11 + * to the University of California by American Telephone and Telegraph
21.12 + * Co. or Unix System Laboratories, Inc. and are reproduced herein with
21.13 + * the permission of UNIX System Laboratories, Inc.
21.14 + *
21.15 + * Redistribution and use in source and binary forms, with or without
21.16 + * modification, are permitted provided that the following conditions
21.17 + * are met:
21.18 + * 1. Redistributions of source code must retain the above copyright
21.19 + * notice, this list of conditions and the following disclaimer.
21.20 + * 2. Redistributions in binary form must reproduce the above copyright
21.21 + * notice, this list of conditions and the following disclaimer in the
21.22 + * documentation and/or other materials provided with the distribution.
21.23 + * 3. All advertising materials mentioning features or use of this software
21.24 + * must display the following acknowledgement:
21.25 + * This product includes software developed by the University of
21.26 + * California, Berkeley and its contributors.
21.27 + * 4. Neither the name of the University nor the names of its contributors
21.28 + * may be used to endorse or promote products derived from this software
21.29 + * without specific prior written permission.
21.30 + *
21.31 + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21.32 + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21.33 + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21.34 + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
21.35 + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21.36 + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21.37 + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21.38 + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21.39 + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
21.40 + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
21.41 + * SUCH DAMAGE.
21.42 + *
21.43 + * @(#)grp.h 8.2 (Berkeley) 1/21/94
21.44 + */
21.45 +
21.46 +#ifndef _GRP_H_
21.47 +#define _GRP_H_
21.48 +
21.49 +#include <sys/types.h>
21.50 +
21.51 +#if !defined(_POSIX_SOURCE) && !defined(_XOPEN_SOURCE)
21.52 +#define _PATH_GROUP "/etc/group"
21.53 +#endif
21.54 +
21.55 +struct group {
21.56 + char *gr_name; /* group name */
21.57 + char *gr_passwd; /* group password */
21.58 + gid_t gr_gid; /* group id */
21.59 + char **gr_mem; /* group members */
21.60 +};
21.61 +
21.62 +
21.63 +#ifdef __cplusplus
21.64 +extern "C" {
21.65 +#endif
21.66 +
21.67 +struct group *getgrgid (gid_t);
21.68 +struct group *getgrnam (const char *);
21.69 +int getgrnam_r (const char *, struct group *,
21.70 + char *, size_t, struct group **);
21.71 +int getgrgid_r (gid_t, struct group *,
21.72 + char *, size_t, struct group **);
21.73 +#ifndef _POSIX_SOURCE
21.74 +struct group *getgrent (void);
21.75 +void setgrent (void);
21.76 +void endgrent (void);
21.77 +void setgrfile (const char *);
21.78 +#ifndef _XOPEN_SOURCE
21.79 +char *group_from_gid (gid_t, int);
21.80 +int setgroupent (int);
21.81 +#endif /* !_XOPEN_SOURCE */
21.82 +#endif /* !_POSIX_SOURCE */
21.83 +
21.84 +#ifdef __cplusplus
21.85 +}
21.86 +#endif
21.87 +
21.88 +#endif /* !_GRP_H_ */
22.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
22.2 +++ b/test/include/ieeefp.h Tue Jul 11 01:35:27 2006 +0000
22.3 @@ -0,0 +1,241 @@
22.4 +#ifndef _IEEE_FP_H_
22.5 +#define _IEEE_FP_H_
22.6 +
22.7 +#include "_ansi.h"
22.8 +
22.9 +#include <machine/ieeefp.h>
22.10 +
22.11 +/* FIXME FIXME FIXME:
22.12 + Neither of __ieee_{float,double}_shape_tape seem to be used anywhere
22.13 + except in libm/test. If that is the case, please delete these from here.
22.14 + If that is not the case, please insert documentation here describing why
22.15 + they're needed. */
22.16 +
22.17 +#ifdef __IEEE_BIG_ENDIAN
22.18 +
22.19 +typedef union
22.20 +{
22.21 + double value;
22.22 + struct
22.23 + {
22.24 + unsigned int sign : 1;
22.25 + unsigned int exponent: 11;
22.26 + unsigned int fraction0:4;
22.27 + unsigned int fraction1:16;
22.28 + unsigned int fraction2:16;
22.29 + unsigned int fraction3:16;
22.30 +
22.31 + } number;
22.32 + struct
22.33 + {
22.34 + unsigned int sign : 1;
22.35 + unsigned int exponent: 11;
22.36 + unsigned int quiet:1;
22.37 + unsigned int function0:3;
22.38 + unsigned int function1:16;
22.39 + unsigned int function2:16;
22.40 + unsigned int function3:16;
22.41 + } nan;
22.42 + struct
22.43 + {
22.44 + unsigned long msw;
22.45 + unsigned long lsw;
22.46 + } parts;
22.47 + long aslong[2];
22.48 +} __ieee_double_shape_type;
22.49 +
22.50 +#endif
22.51 +
22.52 +#ifdef __IEEE_LITTLE_ENDIAN
22.53 +
22.54 +typedef union
22.55 +{
22.56 + double value;
22.57 + struct
22.58 + {
22.59 +#ifdef __SMALL_BITFIELDS
22.60 + unsigned int fraction3:16;
22.61 + unsigned int fraction2:16;
22.62 + unsigned int fraction1:16;
22.63 + unsigned int fraction0: 4;
22.64 +#else
22.65 + unsigned int fraction1:32;
22.66 + unsigned int fraction0:20;
22.67 +#endif
22.68 + unsigned int exponent :11;
22.69 + unsigned int sign : 1;
22.70 + } number;
22.71 + struct
22.72 + {
22.73 +#ifdef __SMALL_BITFIELDS
22.74 + unsigned int function3:16;
22.75 + unsigned int function2:16;
22.76 + unsigned int function1:16;
22.77 + unsigned int function0:3;
22.78 +#else
22.79 + unsigned int function1:32;
22.80 + unsigned int function0:19;
22.81 +#endif
22.82 + unsigned int quiet:1;
22.83 + unsigned int exponent: 11;
22.84 + unsigned int sign : 1;
22.85 + } nan;
22.86 + struct
22.87 + {
22.88 + unsigned long lsw;
22.89 + unsigned long msw;
22.90 + } parts;
22.91 +
22.92 + long aslong[2];
22.93 +
22.94 +} __ieee_double_shape_type;
22.95 +
22.96 +#endif
22.97 +
22.98 +#ifdef __IEEE_BIG_ENDIAN
22.99 +
22.100 +typedef union
22.101 +{
22.102 + float value;
22.103 + struct
22.104 + {
22.105 + unsigned int sign : 1;
22.106 + unsigned int exponent: 8;
22.107 + unsigned int fraction0: 7;
22.108 + unsigned int fraction1: 16;
22.109 + } number;
22.110 + struct
22.111 + {
22.112 + unsigned int sign:1;
22.113 + unsigned int exponent:8;
22.114 + unsigned int quiet:1;
22.115 + unsigned int function0:6;
22.116 + unsigned int function1:16;
22.117 + } nan;
22.118 + long p1;
22.119 +
22.120 +} __ieee_float_shape_type;
22.121 +
22.122 +#endif
22.123 +
22.124 +#ifdef __IEEE_LITTLE_ENDIAN
22.125 +
22.126 +typedef union
22.127 +{
22.128 + float value;
22.129 + struct
22.130 + {
22.131 + unsigned int fraction0: 7;
22.132 + unsigned int fraction1: 16;
22.133 + unsigned int exponent: 8;
22.134 + unsigned int sign : 1;
22.135 + } number;
22.136 + struct
22.137 + {
22.138 + unsigned int function1:16;
22.139 + unsigned int function0:6;
22.140 + unsigned int quiet:1;
22.141 + unsigned int exponent:8;
22.142 + unsigned int sign:1;
22.143 + } nan;
22.144 + long p1;
22.145 +
22.146 +} __ieee_float_shape_type;
22.147 +
22.148 +#endif
22.149 +
22.150 +
22.151 +
22.152 +
22.153 +
22.154 +/* FLOATING ROUNDING */
22.155 +
22.156 +typedef int fp_rnd;
22.157 +#define FP_RN 0 /* Round to nearest */
22.158 +#define FP_RM 1 /* Round down */
22.159 +#define FP_RP 2 /* Round up */
22.160 +#define FP_RZ 3 /* Round to zero (trunate) */
22.161 +
22.162 +fp_rnd _EXFUN(fpgetround,(void));
22.163 +fp_rnd _EXFUN(fpsetround, (fp_rnd));
22.164 +
22.165 +/* EXCEPTIONS */
22.166 +
22.167 +typedef int fp_except;
22.168 +#define FP_X_INV 0x10 /* Invalid operation */
22.169 +#define FP_X_DX 0x80 /* Divide by zero */
22.170 +#define FP_X_OFL 0x04 /* Overflow exception */
22.171 +#define FP_X_UFL 0x02 /* Underflow exception */
22.172 +#define FP_X_IMP 0x01 /* imprecise exception */
22.173 +
22.174 +fp_except _EXFUN(fpgetmask,(void));
22.175 +fp_except _EXFUN(fpsetmask,(fp_except));
22.176 +fp_except _EXFUN(fpgetsticky,(void));
22.177 +fp_except _EXFUN(fpsetsticky, (fp_except));
22.178 +
22.179 +/* INTEGER ROUNDING */
22.180 +
22.181 +typedef int fp_rdi;
22.182 +#define FP_RDI_TOZ 0 /* Round to Zero */
22.183 +#define FP_RDI_RD 1 /* Follow float mode */
22.184 +
22.185 +fp_rdi _EXFUN(fpgetroundtoi,(void));
22.186 +fp_rdi _EXFUN(fpsetroundtoi,(fp_rdi));
22.187 +
22.188 +int _EXFUN(isnan, (double));
22.189 +int _EXFUN(isinf, (double));
22.190 +int _EXFUN(finite, (double));
22.191 +
22.192 +
22.193 +
22.194 +int _EXFUN(isnanf, (float));
22.195 +int _EXFUN(isinff, (float));
22.196 +int _EXFUN(finitef, (float));
22.197 +
22.198 +#define __IEEE_DBL_EXPBIAS 1023
22.199 +#define __IEEE_FLT_EXPBIAS 127
22.200 +
22.201 +#define __IEEE_DBL_EXPLEN 11
22.202 +#define __IEEE_FLT_EXPLEN 8
22.203 +
22.204 +
22.205 +#define __IEEE_DBL_FRACLEN (64 - (__IEEE_DBL_EXPLEN + 1))
22.206 +#define __IEEE_FLT_FRACLEN (32 - (__IEEE_FLT_EXPLEN + 1))
22.207 +
22.208 +#define __IEEE_DBL_MAXPOWTWO ((double)(1L << 32 - 2) * (1L << (32-11) - 32 + 1))
22.209 +#define __IEEE_FLT_MAXPOWTWO ((float)(1L << (32-8) - 1))
22.210 +
22.211 +#define __IEEE_DBL_NAN_EXP 0x7ff
22.212 +#define __IEEE_FLT_NAN_EXP 0xff
22.213 +
22.214 +
22.215 +#define isnanf(x) (((*(long *)&(x) & 0x7f800000L)==0x7f800000L) && \
22.216 + ((*(long *)&(x) & 0x007fffffL)!=0000000000L))
22.217 +
22.218 +#define isinff(x) (((*(long *)&(x) & 0x7f800000L)==0x7f800000L) && \
22.219 + ((*(long *)&(x) & 0x007fffffL)==0000000000L))
22.220 +
22.221 +#define finitef(x) (((*(long *)&(x) & 0x7f800000L)!=0x7f800000L))
22.222 +
22.223 +#ifdef _DOUBLE_IS_32BITS
22.224 +#undef __IEEE_DBL_EXPBIAS
22.225 +#define __IEEE_DBL_EXPBIAS __IEEE_FLT_EXPBIAS
22.226 +
22.227 +#undef __IEEE_DBL_EXPLEN
22.228 +#define __IEEE_DBL_EXPLEN __IEEE_FLT_EXPLEN
22.229 +
22.230 +#undef __IEEE_DBL_FRACLEN
22.231 +#define __IEEE_DBL_FRACLEN __IEEE_FLT_FRACLEN
22.232 +
22.233 +#undef __IEEE_DBL_MAXPOWTWO
22.234 +#define __IEEE_DBL_MAXPOWTWO __IEEE_FLT_MAXPOWTWO
22.235 +
22.236 +#undef __IEEE_DBL_NAN_EXP
22.237 +#define __IEEE_DBL_NAN_EXP __IEEE_FLT_NAN_EXP
22.238 +
22.239 +#undef __ieee_double_shape_type
22.240 +#define __ieee_double_shape_type __ieee_float_shape_type
22.241 +
22.242 +#endif /* _DOUBLE_IS_32BITS */
22.243 +
22.244 +#endif /* _IEEE_FP_H_ */
23.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
23.2 +++ b/test/include/locale.h Tue Jul 11 01:35:27 2006 +0000
23.3 @@ -0,0 +1,60 @@
23.4 +/*
23.5 + locale.h
23.6 + Values appropriate for the formatting of monetary and other
23.7 + numberic quantities.
23.8 +*/
23.9 +
23.10 +#ifndef _LOCALE_H_
23.11 +#ifdef __cplusplus
23.12 +extern "C" {
23.13 +#endif
23.14 +#define _LOCALE_H_
23.15 +
23.16 +#include "_ansi.h"
23.17 +
23.18 +#ifndef NULL
23.19 +#define NULL 0L
23.20 +#endif
23.21 +
23.22 +#define LC_ALL 0
23.23 +#define LC_COLLATE 1
23.24 +#define LC_CTYPE 2
23.25 +#define LC_MONETARY 3
23.26 +#define LC_NUMERIC 4
23.27 +#define LC_TIME 5
23.28 +
23.29 +struct lconv
23.30 +{
23.31 + char *decimal_point;
23.32 + char *thousands_sep;
23.33 + char *grouping;
23.34 + char *int_curr_symbol;
23.35 + char *currency_symbol;
23.36 + char *mon_decimal_point;
23.37 + char *mon_thousands_sep;
23.38 + char *mon_grouping;
23.39 + char *positive_sign;
23.40 + char *negative_sign;
23.41 + char int_frac_digits;
23.42 + char frac_digits;
23.43 + char p_cs_precedes;
23.44 + char p_sep_by_space;
23.45 + char n_cs_precedes;
23.46 + char n_sep_by_space;
23.47 + char p_sign_posn;
23.48 + char n_sign_posn;
23.49 +};
23.50 +
23.51 +#ifndef _REENT_ONLY
23.52 +char *_EXFUN(setlocale,(int category, const char *locale));
23.53 +struct lconv *_EXFUN(localeconv,(void));
23.54 +#endif
23.55 +
23.56 +struct _reent;
23.57 +char *_EXFUN(_setlocale_r,(struct _reent *, int category, const char *locale));
23.58 +struct lconv *_EXFUN(_localeconv_r,(struct _reent *));
23.59 +
23.60 +#ifdef __cplusplus
23.61 +}
23.62 +#endif
23.63 +#endif /* _LOCALE_H_ */
24.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
24.2 +++ b/test/include/machine/fastmath.h Tue Jul 11 01:35:27 2006 +0000
24.3 @@ -0,0 +1,100 @@
24.4 +#ifdef __sysvnecv70_target
24.5 +double EXFUN(fast_sin,(double));
24.6 +double EXFUN(fast_cos,(double));
24.7 +double EXFUN(fast_tan,(double));
24.8 +
24.9 +double EXFUN(fast_asin,(double));
24.10 +double EXFUN(fast_acos,(double));
24.11 +double EXFUN(fast_atan,(double));
24.12 +
24.13 +double EXFUN(fast_sinh,(double));
24.14 +double EXFUN(fast_cosh,(double));
24.15 +double EXFUN(fast_tanh,(double));
24.16 +
24.17 +double EXFUN(fast_asinh,(double));
24.18 +double EXFUN(fast_acosh,(double));
24.19 +double EXFUN(fast_atanh,(double));
24.20 +
24.21 +double EXFUN(fast_abs,(double));
24.22 +double EXFUN(fast_sqrt,(double));
24.23 +double EXFUN(fast_exp2,(double));
24.24 +double EXFUN(fast_exp10,(double));
24.25 +double EXFUN(fast_expe,(double));
24.26 +double EXFUN(fast_log10,(double));
24.27 +double EXFUN(fast_log2,(double));
24.28 +double EXFUN(fast_loge,(double));
24.29 +
24.30 +
24.31 +#define sin(x) fast_sin(x)
24.32 +#define cos(x) fast_cos(x)
24.33 +#define tan(x) fast_tan(x)
24.34 +#define asin(x) fast_asin(x)
24.35 +#define acos(x) fast_acos(x)
24.36 +#define atan(x) fast_atan(x)
24.37 +#define sinh(x) fast_sinh(x)
24.38 +#define cosh(x) fast_cosh(x)
24.39 +#define tanh(x) fast_tanh(x)
24.40 +#define asinh(x) fast_asinh(x)
24.41 +#define acosh(x) fast_acosh(x)
24.42 +#define atanh(x) fast_atanh(x)
24.43 +#define abs(x) fast_abs(x)
24.44 +#define sqrt(x) fast_sqrt(x)
24.45 +#define exp2(x) fast_exp2(x)
24.46 +#define exp10(x) fast_exp10(x)
24.47 +#define expe(x) fast_expe(x)
24.48 +#define log10(x) fast_log10(x)
24.49 +#define log2(x) fast_log2(x)
24.50 +#define loge(x) fast_loge(x)
24.51 +
24.52 +#ifdef _HAVE_STDC
24.53 +/* These functions are in assembler, they really do take floats. This
24.54 + can only be used with a real ANSI compiler */
24.55 +
24.56 +float EXFUN(fast_sinf,(float));
24.57 +float EXFUN(fast_cosf,(float));
24.58 +float EXFUN(fast_tanf,(float));
24.59 +
24.60 +float EXFUN(fast_asinf,(float));
24.61 +float EXFUN(fast_acosf,(float));
24.62 +float EXFUN(fast_atanf,(float));
24.63 +
24.64 +float EXFUN(fast_sinhf,(float));
24.65 +float EXFUN(fast_coshf,(float));
24.66 +float EXFUN(fast_tanhf,(float));
24.67 +
24.68 +float EXFUN(fast_asinhf,(float));
24.69 +float EXFUN(fast_acoshf,(float));
24.70 +float EXFUN(fast_atanhf,(float));
24.71 +
24.72 +float EXFUN(fast_absf,(float));
24.73 +float EXFUN(fast_sqrtf,(float));
24.74 +float EXFUN(fast_exp2f,(float));
24.75 +float EXFUN(fast_exp10f,(float));
24.76 +float EXFUN(fast_expef,(float));
24.77 +float EXFUN(fast_log10f,(float));
24.78 +float EXFUN(fast_log2f,(float));
24.79 +float EXFUN(fast_logef,(float));
24.80 +#define sinf(x) fast_sinf(x)
24.81 +#define cosf(x) fast_cosf(x)
24.82 +#define tanf(x) fast_tanf(x)
24.83 +#define asinf(x) fast_asinf(x)
24.84 +#define acosf(x) fast_acosf(x)
24.85 +#define atanf(x) fast_atanf(x)
24.86 +#define sinhf(x) fast_sinhf(x)
24.87 +#define coshf(x) fast_coshf(x)
24.88 +#define tanhf(x) fast_tanhf(x)
24.89 +#define asinhf(x) fast_asinhf(x)
24.90 +#define acoshf(x) fast_acoshf(x)
24.91 +#define atanhf(x) fast_atanhf(x)
24.92 +#define absf(x) fast_absf(x)
24.93 +#define sqrtf(x) fast_sqrtf(x)
24.94 +#define exp2f(x) fast_exp2f(x)
24.95 +#define exp10f(x) fast_exp10f(x)
24.96 +#define expef(x) fast_expef(x)
24.97 +#define log10f(x) fast_log10f(x)
24.98 +#define log2f(x) fast_log2f(x)
24.99 +#define logef(x) fast_logef(x)
24.100 +#endif
24.101 +/* Override the functions defined in math.h */
24.102 +#endif /* __sysvnecv70_target */
24.103 +
25.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
25.2 +++ b/test/include/machine/ieeefp.h Tue Jul 11 01:35:27 2006 +0000
25.3 @@ -0,0 +1,157 @@
25.4 +#ifndef __IEEE_BIG_ENDIAN
25.5 +#ifndef __IEEE_LITTLE_ENDIAN
25.6 +
25.7 +#if defined(__arm__) || defined(__thumb__)
25.8 +/* ARM always has big-endian words. Within those words the byte ordering
25.9 + appears to be big or little endian. Newlib doesn't seem to care about
25.10 + the byte ordering within words. */
25.11 +#define __IEEE_BIG_ENDIAN
25.12 +#endif
25.13 +
25.14 +#ifdef __hppa__
25.15 +#define __IEEE_BIG_ENDIAN
25.16 +#endif
25.17 +
25.18 +#ifdef __sparc__
25.19 +#ifdef __LITTLE_ENDIAN_DATA__
25.20 +#define __IEEE_LITTLE_ENDIAN
25.21 +#else
25.22 +#define __IEEE_BIG_ENDIAN
25.23 +#endif
25.24 +#endif
25.25 +
25.26 +#if defined(__m68k__) || defined(__mc68000__)
25.27 +#define __IEEE_BIG_ENDIAN
25.28 +#endif
25.29 +
25.30 +#if defined (__H8300__) || defined (__H8300H__) || defined (__H8300S__)
25.31 +#define __IEEE_BIG_ENDIAN
25.32 +#define __SMALL_BITFIELDS
25.33 +#define _DOUBLE_IS_32BITS
25.34 +#endif
25.35 +
25.36 +#ifdef __H8500__
25.37 +#define __IEEE_BIG_ENDIAN
25.38 +#define __SMALL_BITFIELDS
25.39 +#define _DOUBLE_IS_32BITS
25.40 +#endif
25.41 +
25.42 +#ifdef __sh__
25.43 +#ifdef __LITTLE_ENDIAN__
25.44 +#define __IEEE_LITTLE_ENDIAN
25.45 +#else
25.46 +#define __IEEE_BIG_ENDIAN
25.47 +#endif
25.48 +#if defined(__SH3E__) || defined(__SH4_SINGLE_ONLY__)
25.49 +#define _DOUBLE_IS_32BITS
25.50 +#endif
25.51 +#endif
25.52 +
25.53 +#ifdef _AM29K
25.54 +#define __IEEE_BIG_ENDIAN
25.55 +#endif
25.56 +
25.57 +#ifdef _WIN32
25.58 +#define __IEEE_LITTLE_ENDIAN
25.59 +#endif
25.60 +
25.61 +#ifdef __i386__
25.62 +#define __IEEE_LITTLE_ENDIAN
25.63 +#endif
25.64 +
25.65 +#ifdef __i960__
25.66 +#define __IEEE_LITTLE_ENDIAN
25.67 +#endif
25.68 +
25.69 +#ifdef __M32R__
25.70 +#define __IEEE_BIG_ENDIAN
25.71 +#endif
25.72 +
25.73 +#ifdef __TIC80__
25.74 +#define __IEEE_LITTLE_ENDIAN
25.75 +#endif
25.76 +
25.77 +#ifdef __MIPSEL__
25.78 +#define __IEEE_LITTLE_ENDIAN
25.79 +#endif
25.80 +#ifdef __MIPSEB__
25.81 +#define __IEEE_BIG_ENDIAN
25.82 +#endif
25.83 +
25.84 +/* necv70 was __IEEE_LITTLE_ENDIAN. */
25.85 +
25.86 +#ifdef __W65__
25.87 +#define __IEEE_LITTLE_ENDIAN
25.88 +#define __SMALL_BITFIELDS
25.89 +#define _DOUBLE_IS_32BITS
25.90 +#endif
25.91 +
25.92 +#if defined(__Z8001__) || defined(__Z8002__)
25.93 +#define __IEEE_BIG_ENDIAN
25.94 +#endif
25.95 +
25.96 +#ifdef __m88k__
25.97 +#define __IEEE_BIG_ENDIAN
25.98 +#endif
25.99 +
25.100 +#ifdef __mn10300__
25.101 +#define __IEEE_LITTLE_ENDIAN
25.102 +#endif
25.103 +
25.104 +#ifdef __mn10200__
25.105 +#define __IEEE_LITTLE_ENDIAN
25.106 +#define __SMALL_BITFIELDS
25.107 +#define _DOUBLE_IS_32BITS
25.108 +#endif
25.109 +
25.110 +#ifdef __v800
25.111 +#define __IEEE_LITTLE_ENDIAN
25.112 +#endif
25.113 +
25.114 +#ifdef __v850
25.115 +#define __IEEE_LITTLE_ENDIAN
25.116 +#endif
25.117 +
25.118 +#ifdef __D10V__
25.119 +#define __IEEE_BIG_ENDIAN
25.120 +#define _DOUBLE_IS_32BITS
25.121 +#define __SMALL_BITFIELDS
25.122 +#endif
25.123 +
25.124 +#ifdef __PPC__
25.125 +#if (defined(_BIG_ENDIAN) && _BIG_ENDIAN) || (defined(_AIX) && _AIX)
25.126 +#define __IEEE_BIG_ENDIAN
25.127 +#else
25.128 +#if (defined(_LITTLE_ENDIAN) && _LITTLE_ENDIAN) || (defined(__sun__) && __sun__) || (defined(_WIN32) && _WIN32)
25.129 +#define __IEEE_LITTLE_ENDIAN
25.130 +#endif
25.131 +#endif
25.132 +#endif
25.133 +
25.134 +#ifdef __arc__
25.135 +#ifdef __big_endian__
25.136 +#define __IEEE_BIG_ENDIAN
25.137 +#else
25.138 +#define __IEEE_LITTLE_ENDIAN
25.139 +#endif
25.140 +#endif
25.141 +
25.142 +#ifdef __fr30__
25.143 +#define __IEEE_BIG_ENDIAN
25.144 +#endif
25.145 +
25.146 +#ifdef __mcore__
25.147 +#define __IEEE_BIG_ENDIAN
25.148 +#endif
25.149 +
25.150 +
25.151 +
25.152 +#ifndef __IEEE_BIG_ENDIAN
25.153 +#ifndef __IEEE_LITTLE_ENDIAN
25.154 +#error Endianess not declared!!
25.155 +#endif /* not __IEEE_LITTLE_ENDIAN */
25.156 +#endif /* not __IEEE_BIG_ENDIAN */
25.157 +
25.158 +#endif /* not __IEEE_LITTLE_ENDIAN */
25.159 +#endif /* not __IEEE_BIG_ENDIAN */
25.160 +
26.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
26.2 +++ b/test/include/machine/setjmp-dj.h Tue Jul 11 01:35:27 2006 +0000
26.3 @@ -0,0 +1,44 @@
26.4 +/*
26.5 +** Copyright (C) 1991 DJ Delorie, 24 Kirsten Ave, Rochester NH 03867-2954
26.6 +**
26.7 +** This file is distributed under the terms listed in the document
26.8 +** "copying.dj", available from DJ Delorie at the address above.
26.9 +** A copy of "copying.dj" should accompany this file; if not, a copy
26.10 +** should be available from where this file was obtained. This file
26.11 +** may not be distributed without a verbatim copy of "copying.dj".
26.12 +**
26.13 +** This file is distributed WITHOUT ANY WARRANTY; without even the implied
26.14 +** warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
26.15 +*/
26.16 +
26.17 +/* Modified to use SETJMP_DJ_H rather than SETJMP_H to avoid
26.18 + conflicting with setjmp.h. Ian Taylor, Cygnus support, April,
26.19 + 1993. */
26.20 +
26.21 +#ifndef _SETJMP_DJ_H_
26.22 +#define _SETJMP_DJ_H_
26.23 +
26.24 +#ifdef __cplusplus
26.25 +extern "C" {
26.26 +#endif
26.27 +
26.28 +typedef struct {
26.29 + unsigned long eax;
26.30 + unsigned long ebx;
26.31 + unsigned long ecx;
26.32 + unsigned long edx;
26.33 + unsigned long esi;
26.34 + unsigned long edi;
26.35 + unsigned long ebp;
26.36 + unsigned long esp;
26.37 + unsigned long eip;
26.38 +} jmp_buf[1];
26.39 +
26.40 +extern int setjmp(jmp_buf);
26.41 +extern void longjmp(jmp_buf, int);
26.42 +
26.43 +#ifdef __cplusplus
26.44 +}
26.45 +#endif
26.46 +
26.47 +#endif
27.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
27.2 +++ b/test/include/machine/setjmp.h Tue Jul 11 01:35:27 2006 +0000
27.3 @@ -0,0 +1,168 @@
27.4 +#if defined(__arm__) || defined(__thumb__)
27.5 +/*
27.6 + * All callee preserved registers:
27.7 + * v1 - v7, fp, ip, sp, lr, f4, f5, f6, f7
27.8 + */
27.9 +#define _JBLEN 23
27.10 +#endif
27.11 +
27.12 +#ifdef __sparc__
27.13 +/*
27.14 + * onsstack,sigmask,sp,pc,npc,psr,g1,o0,wbcnt (sigcontext).
27.15 + * All else recovered by under/over(flow) handling.
27.16 + */
27.17 +#define _JBLEN 13
27.18 +#endif
27.19 +
27.20 +/* necv70 was 9 as well. */
27.21 +
27.22 +#ifdef __mc68000__
27.23 +/*
27.24 + * onsstack,sigmask,sp,pc,psl,d2-d7,a2-a6,
27.25 + * fp2-fp7 for 68881.
27.26 + * All else recovered by under/over(flow) handling.
27.27 + */
27.28 +#define _JBLEN 34
27.29 +#endif
27.30 +
27.31 +#if defined(__Z8001__) || defined(__Z8002__)
27.32 +/* 16 regs + pc */
27.33 +#define _JBLEN 20
27.34 +#endif
27.35 +
27.36 +#ifdef _AM29K
27.37 +/*
27.38 + * onsstack,sigmask,sp,pc,npc,psr,g1,o0,wbcnt (sigcontext).
27.39 + * All else recovered by under/over(flow) handling.
27.40 + */
27.41 +#define _JBLEN 9
27.42 +#endif
27.43 +
27.44 +#if defined(__CYGWIN__) && !defined (_JBLEN)
27.45 +#define _JBLEN (13 * 4)
27.46 +#elif defined (__i386__)
27.47 +#ifdef __unix__
27.48 +# define _JBLEN 36
27.49 +#else
27.50 +#include "setjmp-dj.h"
27.51 +#endif
27.52 +#endif
27.53 +
27.54 +#ifdef __i960__
27.55 +#define _JBLEN 35
27.56 +#endif
27.57 +
27.58 +#ifdef __M32R__
27.59 +/* Only 8 words are currently needed. 10 gives us some slop if we need
27.60 + to expand. */
27.61 +#define _JBLEN 10
27.62 +#endif
27.63 +
27.64 +#ifdef __mips__
27.65 +#define _JBLEN 11
27.66 +#endif
27.67 +
27.68 +#ifdef __m88000__
27.69 +#define _JBLEN 21
27.70 +#endif
27.71 +
27.72 +#ifdef __H8300__
27.73 +#define _JBLEN 5
27.74 +typedef int jmp_buf[_JBLEN];
27.75 +#endif
27.76 +
27.77 +#ifdef __H8300H__
27.78 +/* same as H8/300 but registers are twice as big */
27.79 +#define _JBLEN 5
27.80 +#define _JBTYPE long
27.81 +#endif
27.82 +
27.83 +#ifdef __H8300S__
27.84 +/* same as H8/300 but registers are twice as big */
27.85 +#define _JBLEN 5
27.86 +#define _JBTYPE long
27.87 +#endif
27.88 +
27.89 +#ifdef __H8500__
27.90 +#define _JBLEN 4
27.91 +#endif
27.92 +
27.93 +#ifdef __sh__
27.94 +#define _JBLEN 20
27.95 +#endif
27.96 +
27.97 +#ifdef __v800
27.98 +#define _JBLEN 28
27.99 +#endif
27.100 +
27.101 +#ifdef __PPC__
27.102 +#define _JBLEN 32
27.103 +#define _JBTYPE double
27.104 +#endif
27.105 +
27.106 +#ifdef __hppa__
27.107 +/* %r30, %r2-%r18, %r27, pad, %fr12-%fr15.
27.108 + Note space exists for the FP registers, but they are not
27.109 + saved. */
27.110 +#define _JBLEN 28
27.111 +#endif
27.112 +
27.113 +#if defined(__mn10300__) || defined(__mn10200__)
27.114 +/* A guess */
27.115 +#define _JBLEN 10
27.116 +#endif
27.117 +
27.118 +#ifdef __v850
27.119 +/* I think our setjmp is saving 15 regs at the moment. Gives us one word
27.120 + slop if we need to expand. */
27.121 +#define _JBLEN 16
27.122 +#endif
27.123 +
27.124 +#ifdef __TIC80__
27.125 +#define _JBLEN 13
27.126 +#endif
27.127 +
27.128 +#ifdef __D10V__
27.129 +#define _JBLEN 8
27.130 +#endif
27.131 +
27.132 +#ifdef __D30V__
27.133 +#define _JBLEN ((64 /* GPR */ + (2*2) /* ACs */ + 18 /* CRs */) / 2)
27.134 +#define _JBTYPE double
27.135 +#endif
27.136 +
27.137 +
27.138 +#ifdef __fr30__
27.139 +#define _JBLEN 10
27.140 +#endif
27.141 +
27.142 +#ifdef __mcore__
27.143 +#define _JBLEN 16
27.144 +#endif
27.145 +
27.146 +#ifdef _JBLEN
27.147 +#ifdef _JBTYPE
27.148 +typedef _JBTYPE jmp_buf[_JBLEN];
27.149 +#else
27.150 +typedef int jmp_buf[_JBLEN];
27.151 +#endif
27.152 +
27.153 +#if defined(__CYGWIN32__) || defined(__rtems__)
27.154 +#include <signal.h>
27.155 +
27.156 +/* POSIX sigsetjmp/siglongjmp macros */
27.157 +typedef int sigjmp_buf[_JBLEN+2];
27.158 +
27.159 +#define _SAVEMASK _JBLEN
27.160 +#define _SIGMASK (_JBLEN+1)
27.161 +
27.162 +#define sigsetjmp(env, savemask) (env[_SAVEMASK] = savemask,\
27.163 + sigprocmask (SIG_SETMASK, 0, (sigset_t *) &env[_SIGMASK]),\
27.164 + setjmp (env))
27.165 +
27.166 +#define siglongjmp(env, val) (((env[_SAVEMASK])?\
27.167 + sigprocmask (SIG_SETMASK, (sigset_t *) &env[_SIGMASK], 0):0),\
27.168 + longjmp (env, val))
27.169 +
27.170 +#endif /* __CYGWIN32__ or __rtems__ */
27.171 +#endif
28.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
28.2 +++ b/test/include/machine/time.h Tue Jul 11 01:35:27 2006 +0000
28.3 @@ -0,0 +1,10 @@
28.4 +#ifndef _MACHTIME_H_
28.5 +#define _MACHTIME_H_
28.6 +
28.7 +#if defined(__arm__) || defined(__thumb__)
28.8 +#define _CLOCKS_PER_SEC_ 100
28.9 +#endif
28.10 +
28.11 +#endif /* _MACHTIME_H_ */
28.12 +
28.13 +
29.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
29.2 +++ b/test/include/machine/types.h Tue Jul 11 01:35:27 2006 +0000
29.3 @@ -0,0 +1,9 @@
29.4 +#ifndef _MACHTYPES_H_
29.5 +#define _MACHTYPES_H_
29.6 +
29.7 +#define _CLOCK_T_ unsigned long /* clock() */
29.8 +#define _TIME_T_ long /* time() */
29.9 +
29.10 +#endif /* _MACHTYPES_H_ */
29.11 +
29.12 +
30.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
30.2 +++ b/test/include/malloc.h Tue Jul 11 01:35:27 2006 +0000
30.3 @@ -0,0 +1,97 @@
30.4 +/* malloc.h -- header file for memory routines. */
30.5 +
30.6 +#ifndef _INCLUDE_MALLOC_H_
30.7 +#define _INCLUDE_MALLOC_H_
30.8 +
30.9 +#include <_ansi.h>
30.10 +#include <sys/reent.h>
30.11 +
30.12 +#define __need_size_t
30.13 +#include <stddef.h>
30.14 +
30.15 +#ifdef __cplusplus
30.16 +extern "C" {
30.17 +#endif
30.18 +
30.19 +/* This version of struct mallinfo must match the one in
30.20 + libc/stdlib/mallocr.c. */
30.21 +
30.22 +struct mallinfo {
30.23 + int arena; /* total space allocated from system */
30.24 + int ordblks; /* number of non-inuse chunks */
30.25 + int smblks; /* unused -- always zero */
30.26 + int hblks; /* number of mmapped regions */
30.27 + int hblkhd; /* total space in mmapped regions */
30.28 + int usmblks; /* unused -- always zero */
30.29 + int fsmblks; /* unused -- always zero */
30.30 + int uordblks; /* total allocated space */
30.31 + int fordblks; /* total non-inuse space */
30.32 + int keepcost; /* top-most, releasable (via malloc_trim) space */
30.33 +};
30.34 +
30.35 +/* The routines. */
30.36 +
30.37 +extern _PTR malloc _PARAMS ((size_t));
30.38 +extern _PTR _malloc_r _PARAMS ((struct _reent *, size_t));
30.39 +
30.40 +extern _VOID free _PARAMS ((_PTR));
30.41 +extern _VOID _free_r _PARAMS ((struct _reent *, _PTR));
30.42 +
30.43 +extern _PTR realloc _PARAMS ((_PTR, size_t));
30.44 +extern _PTR _realloc_r _PARAMS ((struct _reent *, _PTR, size_t));
30.45 +
30.46 +extern _PTR calloc _PARAMS ((size_t, size_t));
30.47 +extern _PTR _calloc_r _PARAMS ((struct _reent *, size_t, size_t));
30.48 +
30.49 +extern _PTR memalign _PARAMS ((size_t, size_t));
30.50 +extern _PTR _memalign_r _PARAMS ((struct _reent *, size_t, size_t));
30.51 +
30.52 +extern struct mallinfo mallinfo _PARAMS ((void));
30.53 +extern struct mallinfo _mallinfo_r _PARAMS ((struct _reent *));
30.54 +
30.55 +extern void malloc_stats _PARAMS ((void));
30.56 +extern void _malloc_stats_r _PARAMS ((struct _reent *));
30.57 +
30.58 +extern int mallopt _PARAMS ((int, int));
30.59 +extern int _mallopt_r _PARAMS ((struct _reent *, int, int));
30.60 +
30.61 +extern size_t malloc_usable_size _PARAMS ((_PTR));
30.62 +extern size_t _malloc_usable_size_r _PARAMS ((struct _reent *, _PTR));
30.63 +
30.64 +/* These aren't too useful on an embedded system, but we define them
30.65 + anyhow. */
30.66 +
30.67 +extern _PTR valloc _PARAMS ((size_t));
30.68 +extern _PTR _valloc_r _PARAMS ((struct _reent *, size_t));
30.69 +
30.70 +extern _PTR pvalloc _PARAMS ((size_t));
30.71 +extern _PTR _pvalloc_r _PARAMS ((struct _reent *, size_t));
30.72 +
30.73 +extern int malloc_trim _PARAMS ((size_t));
30.74 +extern int _malloc_trim_r _PARAMS ((struct _reent *, size_t));
30.75 +
30.76 +/* Some systems provide this, so do too for compatibility. */
30.77 +
30.78 +extern void cfree _PARAMS ((_PTR));
30.79 +
30.80 +/* A compatibility routine for an earlier version of the allocator. */
30.81 +
30.82 +extern _VOID mstats _PARAMS ((char *));
30.83 +extern _VOID _mstats_r _PARAMS ((struct _reent *, char *));
30.84 +
30.85 +#ifdef __CYGWIN32__
30.86 +
30.87 +/* Cygwin32 needs to be able to copy all the malloc information from
30.88 + the parent to the child. However, cygwin32 does not normally copy
30.89 + any data in the DLL data section. This routine handles copying
30.90 + that information. */
30.91 +
30.92 +extern int __malloc_copy _PARAMS ((int (*) (void *, void *, void *, int),
30.93 + void *, int));
30.94 +#endif /* __CYGWIN32 */
30.95 +
30.96 +#ifdef __cplusplus
30.97 +}
30.98 +#endif
30.99 +
30.100 +#endif /* _INCLUDE_MALLOC_H_ */
31.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
31.2 +++ b/test/include/math.h Tue Jul 11 01:35:27 2006 +0000
31.3 @@ -0,0 +1,273 @@
31.4 +/* math.h -- Definitions for the math floating point package. */
31.5 +
31.6 +#ifndef _MATH_H_
31.7 +#ifdef __cplusplus
31.8 +extern "C" {
31.9 +#endif
31.10 +#define _MATH_H_
31.11 +
31.12 +#include <sys/reent.h>
31.13 +#include <machine/ieeefp.h>
31.14 +#include "_ansi.h"
31.15 +
31.16 +#ifndef HUGE_VAL
31.17 +
31.18 +/* Define HUGE_VAL as infinity, unless HUGE_VAL is already defined
31.19 + (which might have been done by something like math-68881.h). */
31.20 +
31.21 +union __dmath
31.22 +{
31.23 + __uint32_t i[2];
31.24 + double d;
31.25 +};
31.26 +
31.27 +extern const union __dmath __infinity;
31.28 +
31.29 +#define HUGE_VAL (__infinity.d)
31.30 +
31.31 +#endif /* ! defined (HUGE_VAL) */
31.32 +
31.33 +/* Reentrant ANSI C functions. */
31.34 +
31.35 +#ifndef __math_68881
31.36 +extern double atan _PARAMS((double));
31.37 +extern double cos _PARAMS((double));
31.38 +extern double sin _PARAMS((double));
31.39 +extern double tan _PARAMS((double));
31.40 +extern double tanh _PARAMS((double));
31.41 +extern double frexp _PARAMS((double, int *));
31.42 +extern double modf _PARAMS((double, double *));
31.43 +extern double ceil _PARAMS((double));
31.44 +extern double fabs _PARAMS((double));
31.45 +extern double floor _PARAMS((double));
31.46 +#endif /* ! defined (__math_68881) */
31.47 +
31.48 +/* Non reentrant ANSI C functions. */
31.49 +
31.50 +#ifndef _REENT_ONLY
31.51 +#ifndef __math_6881
31.52 +extern double acos _PARAMS((double));
31.53 +extern double asin _PARAMS((double));
31.54 +extern double atan2 _PARAMS((double, double));
31.55 +extern double cosh _PARAMS((double));
31.56 +extern double sinh _PARAMS((double));
31.57 +extern double exp _PARAMS((double));
31.58 +extern double ldexp _PARAMS((double, int));
31.59 +extern double log _PARAMS((double));
31.60 +extern double log10 _PARAMS((double));
31.61 +extern double pow _PARAMS((double, double));
31.62 +extern double sqrt _PARAMS((double));
31.63 +extern double fmod _PARAMS((double, double));
31.64 +#endif /* ! defined (__math_68881) */
31.65 +#endif /* ! defined (_REENT_ONLY) */
31.66 +
31.67 +#ifndef __STRICT_ANSI__
31.68 +
31.69 +/* Non ANSI double precision functions. */
31.70 +
31.71 +extern double infinity _PARAMS((void));
31.72 +extern double nan _PARAMS((void));
31.73 +extern int isnan _PARAMS((double));
31.74 +extern int isinf _PARAMS((double));
31.75 +extern int finite _PARAMS((double));
31.76 +extern double copysign _PARAMS((double, double));
31.77 +extern int ilogb _PARAMS((double));
31.78 +
31.79 +extern double asinh _PARAMS((double));
31.80 +extern double cbrt _PARAMS((double));
31.81 +extern double nextafter _PARAMS((double, double));
31.82 +extern double rint _PARAMS((double));
31.83 +extern double scalbn _PARAMS((double, int));
31.84 +
31.85 +#ifndef __math_68881
31.86 +extern double log1p _PARAMS((double));
31.87 +extern double expm1 _PARAMS((double));
31.88 +#endif /* ! defined (__math_68881) */
31.89 +
31.90 +#ifndef _REENT_ONLY
31.91 +extern double acosh _PARAMS((double));
31.92 +extern double atanh _PARAMS((double));
31.93 +extern double remainder _PARAMS((double, double));
31.94 +extern double gamma _PARAMS((double));
31.95 +extern double gamma_r _PARAMS((double, int *));
31.96 +extern double lgamma _PARAMS((double));
31.97 +extern double lgamma_r _PARAMS((double, int *));
31.98 +extern double erf _PARAMS((double));
31.99 +extern double erfc _PARAMS((double));
31.100 +extern double y0 _PARAMS((double));
31.101 +extern double y1 _PARAMS((double));
31.102 +extern double yn _PARAMS((int, double));
31.103 +extern double j0 _PARAMS((double));
31.104 +extern double j1 _PARAMS((double));
31.105 +extern double jn _PARAMS((int, double));
31.106 +#define log2(x) (log (x) / M_LOG2_E)
31.107 +
31.108 +#ifndef __math_68881
31.109 +extern double hypot _PARAMS((double, double));
31.110 +#endif
31.111 +
31.112 +extern double cabs();
31.113 +extern double drem _PARAMS((double, double));
31.114 +
31.115 +#endif /* ! defined (_REENT_ONLY) */
31.116 +
31.117 +/* Single precision versions of ANSI functions. */
31.118 +
31.119 +extern float atanf _PARAMS((float));
31.120 +extern float cosf _PARAMS((float));
31.121 +extern float sinf _PARAMS((float));
31.122 +extern float tanf _PARAMS((float));
31.123 +extern float tanhf _PARAMS((float));
31.124 +extern float frexpf _PARAMS((float, int *));
31.125 +extern float modff _PARAMS((float, float *));
31.126 +extern float ceilf _PARAMS((float));
31.127 +extern float fabsf _PARAMS((float));
31.128 +extern float floorf _PARAMS((float));
31.129 +
31.130 +#ifndef _REENT_ONLY
31.131 +extern float acosf _PARAMS((float));
31.132 +extern float asinf _PARAMS((float));
31.133 +extern float atan2f _PARAMS((float, float));
31.134 +extern float coshf _PARAMS((float));
31.135 +extern float sinhf _PARAMS((float));
31.136 +extern float expf _PARAMS((float));
31.137 +extern float ldexpf _PARAMS((float, int));
31.138 +extern float logf _PARAMS((float));
31.139 +extern float log10f _PARAMS((float));
31.140 +extern float powf _PARAMS((float, float));
31.141 +extern float sqrtf _PARAMS((float));
31.142 +extern float fmodf _PARAMS((float, float));
31.143 +#endif /* ! defined (_REENT_ONLY) */
31.144 +
31.145 +/* Other single precision functions. */
31.146 +
31.147 +extern float infinityf _PARAMS((void));
31.148 +extern float nanf _PARAMS((void));
31.149 +extern int isnanf _PARAMS((float));
31.150 +extern int isinff _PARAMS((float));
31.151 +extern int finitef _PARAMS((float));
31.152 +extern float copysignf _PARAMS((float, float));
31.153 +extern int ilogbf _PARAMS((float));
31.154 +
31.155 +extern float asinhf _PARAMS((float));
31.156 +extern float cbrtf _PARAMS((float));
31.157 +extern float nextafterf _PARAMS((float, float));
31.158 +extern float rintf _PARAMS((float));
31.159 +extern float scalbnf _PARAMS((float, int));
31.160 +extern float log1pf _PARAMS((float));
31.161 +extern float expm1f _PARAMS((float));
31.162 +
31.163 +#ifndef _REENT_ONLY
31.164 +extern float acoshf _PARAMS((float));
31.165 +extern float atanhf _PARAMS((float));
31.166 +extern float remainderf _PARAMS((float, float));
31.167 +extern float gammaf _PARAMS((float));
31.168 +extern float gammaf_r _PARAMS((float, int *));
31.169 +extern float lgammaf _PARAMS((float));
31.170 +extern float lgammaf_r _PARAMS((float, int *));
31.171 +extern float erff _PARAMS((float));
31.172 +extern float erfcf _PARAMS((float));
31.173 +extern float y0f _PARAMS((float));
31.174 +extern float y1f _PARAMS((float));
31.175 +extern float ynf _PARAMS((int, float));
31.176 +extern float j0f _PARAMS((float));
31.177 +extern float j1f _PARAMS((float));
31.178 +extern float jnf _PARAMS((int, float));
31.179 +#define log2f(x) (logf (x) / (float) M_LOG2_E)
31.180 +extern float hypotf _PARAMS((float, float));
31.181 +
31.182 +extern float cabsf();
31.183 +extern float dremf _PARAMS((float, float));
31.184 +
31.185 +#endif /* ! defined (_REENT_ONLY) */
31.186 +
31.187 +/* The gamma functions use a global variable, signgam. */
31.188 +
31.189 +extern int signgam;
31.190 +
31.191 +/* The exception structure passed to the matherr routine. */
31.192 +
31.193 +#ifdef __cplusplus
31.194 +struct __exception
31.195 +#else
31.196 +struct exception
31.197 +#endif
31.198 +{
31.199 + int type;
31.200 + char *name;
31.201 + double arg1;
31.202 + double arg2;
31.203 + double retval;
31.204 + int err;
31.205 +};
31.206 +
31.207 +#ifdef __cplusplus
31.208 +extern int matherr _PARAMS((struct __exception *e));
31.209 +#else
31.210 +extern int matherr _PARAMS((struct exception *e));
31.211 +#endif
31.212 +
31.213 +/* Values for the type field of struct exception. */
31.214 +
31.215 +#define DOMAIN 1
31.216 +#define SING 2
31.217 +#define OVERFLOW 3
31.218 +#define UNDERFLOW 4
31.219 +#define TLOSS 5
31.220 +#define PLOSS 6
31.221 +
31.222 +/* Useful constants. */
31.223 +
31.224 +#define M_E 2.7182818284590452354
31.225 +#define M_LOG2E 1.4426950408889634074
31.226 +#define M_LOG10E 0.43429448190325182765
31.227 +#define M_LN2 0.69314718055994530942
31.228 +#define M_LN10 2.30258509299404568402
31.229 +#define M_PI 3.14159265358979323846
31.230 +#define M_TWOPI (M_PI * 2.0)
31.231 +#define M_PI_2 1.57079632679489661923
31.232 +#define M_PI_4 0.78539816339744830962
31.233 +#define M_3PI_4 2.3561944901923448370E0
31.234 +#define M_SQRTPI 1.77245385090551602792981
31.235 +#define M_1_PI 0.31830988618379067154
31.236 +#define M_2_PI 0.63661977236758134308
31.237 +#define M_2_SQRTPI 1.12837916709551257390
31.238 +#define M_SQRT2 1.41421356237309504880
31.239 +#define M_SQRT1_2 0.70710678118654752440
31.240 +#define M_LN2LO 1.9082149292705877000E-10
31.241 +#define M_LN2HI 6.9314718036912381649E-1
31.242 +#define M_SQRT3 1.73205080756887719000
31.243 +#define M_IVLN10 0.43429448190325182765 /* 1 / log(10) */
31.244 +#define M_LOG2_E 0.693147180559945309417
31.245 +#define M_INVLN2 1.4426950408889633870E0 /* 1 / log(2) */
31.246 +
31.247 +/* Global control over fdlibm error handling. */
31.248 +
31.249 +enum __fdlibm_version
31.250 +{
31.251 + __fdlibm_ieee = -1,
31.252 + __fdlibm_svid,
31.253 + __fdlibm_xopen,
31.254 + __fdlibm_posix
31.255 +};
31.256 +
31.257 +#define _LIB_VERSION_TYPE enum __fdlibm_version
31.258 +#define _LIB_VERSION __fdlib_version
31.259 +
31.260 +extern _CONST _LIB_VERSION_TYPE _LIB_VERSION;
31.261 +
31.262 +#define _IEEE_ __fdlibm_ieee
31.263 +#define _SVID_ __fdlibm_svid
31.264 +#define _XOPEN_ __fdlibm_xopen
31.265 +#define _POSIX_ __fdlibm_posix
31.266 +
31.267 +#endif /* ! defined (__STRICT_ANSI__) */
31.268 +
31.269 +#ifdef __FAST_MATH__
31.270 +#include <machine/fastmath.h>
31.271 +#endif
31.272 +
31.273 +#ifdef __cplusplus
31.274 +}
31.275 +#endif
31.276 +#endif /* _MATH_H_ */
32.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
32.2 +++ b/test/include/paths.h Tue Jul 11 01:35:27 2006 +0000
32.3 @@ -0,0 +1,7 @@
32.4 +#ifndef _PATHS_H_
32.5 +#define _PATHS_H_
32.6 +
32.7 +#define _PATH_DEV "/dev/"
32.8 +#define _PATH_BSHELL "/bin/sh"
32.9 +
32.10 +#endif /* _PATHS_H_ */
33.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
33.2 +++ b/test/include/process.h Tue Jul 11 01:35:27 2006 +0000
33.3 @@ -0,0 +1,60 @@
33.4 +/* process.h. This file comes with MSDOS and WIN32 systems. */
33.5 +
33.6 +#ifndef __PROCESS_H_
33.7 +#define __PROCESS_H_
33.8 +
33.9 +#ifdef __cplusplus
33.10 +extern "C" {
33.11 +#endif
33.12 +
33.13 +int execl(const char *path, const char *argv0, ...);
33.14 +int execle(const char *path, const char *argv0, ... /*, char * const *envp */);
33.15 +int execlp(const char *path, const char *argv0, ...);
33.16 +int execlpe(const char *path, const char *argv0, ... /*, char * const *envp */);
33.17 +
33.18 +int execv(const char *path, char * const *argv);
33.19 +int execve(const char *path, char * const *argv, char * const *envp);
33.20 +int execvp(const char *path, char * const *argv);
33.21 +int execvpe(const char *path, char * const *argv, char * const *envp);
33.22 +
33.23 +int spawnl(int mode, const char *path, const char *argv0, ...);
33.24 +int spawnle(int mode, const char *path, const char *argv0, ... /*, char * const *envp */);
33.25 +int spawnlp(int mode, const char *path, const char *argv0, ...);
33.26 +int spawnlpe(int mode, const char *path, const char *argv0, ... /*, char * const *envp */);
33.27 +
33.28 +int spawnv(int mode, const char *path, const char * const *argv);
33.29 +int spawnve(int mode, const char *path, char * const *argv, const char * const *envp);
33.30 +int spawnvp(int mode, const char *path, const char * const *argv);
33.31 +int spawnvpe(int mode, const char *path, const char * const *argv, const char * const *envp);
33.32 +
33.33 +#ifdef __CYGWIN32__
33.34 +/* Secure exec() functions family */
33.35 +/* The first arg should really be a HANDLE which is a void *. But we
33.36 + can't include windows.h here so... */
33.37 +#include <sys/types.h>
33.38 +pid_t sexecl(void *, const char *path, const char *argv0, ...);
33.39 +pid_t sexecle(void *, const char *path, const char *argv0, ... /*, char * const *envp */);
33.40 +pid_t sexeclp(void *, const char *path, const char *argv0, ...);
33.41 +pid_t sexeclpe(void *, const char *path, const char *argv0, ... /*, char * const *envp */);
33.42 +
33.43 +pid_t sexecv(void *, const char *path, const char * const *argv);
33.44 +pid_t sexecve(void *, const char *path, const char * const *argv, const char * const *envp);
33.45 +pid_t sexecvp(void *, const char *path, const char * const *argv);
33.46 +pid_t sexecvpe(void *, const char *path, const char * const *argv, const char * const *envp);
33.47 +#endif
33.48 +
33.49 +int cwait(int *, int, int);
33.50 +
33.51 +#define _P_WAIT 1
33.52 +#define _P_NOWAIT 2 /* always generates error */
33.53 +#define _P_OVERLAY 3
33.54 +#define _P_NOWAITO 4
33.55 +#define _P_DETACH 5
33.56 +
33.57 +#define WAIT_CHILD 1
33.58 +
33.59 +#ifdef __cplusplus
33.60 +}
33.61 +#endif
33.62 +
33.63 +#endif
34.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
34.2 +++ b/test/include/pwd.h Tue Jul 11 01:35:27 2006 +0000
34.3 @@ -0,0 +1,76 @@
34.4 +/*-
34.5 + * Copyright (c) 1989 The Regents of the University of California.
34.6 + * All rights reserved.
34.7 + *
34.8 + * Redistribution and use in source and binary forms, with or without
34.9 + * modification, are permitted provided that the following conditions
34.10 + * are met:
34.11 + * 1. Redistributions of source code must retain the above copyright
34.12 + * notice, this list of conditions and the following disclaimer.
34.13 + * 2. Redistributions in binary form must reproduce the above copyright
34.14 + * notice, this list of conditions and the following disclaimer in the
34.15 + * documentation and/or other materials provided with the distribution.
34.16 + * 3. All advertising materials mentioning features or use of this software
34.17 + * must display the following acknowledgement:
34.18 + * This product includes software developed by the University of
34.19 + * California, Berkeley and its contributors.
34.20 + * 4. Neither the name of the University nor the names of its contributors
34.21 + * may be used to endorse or promote products derived from this software
34.22 + * without specific prior written permission.
34.23 + *
34.24 + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
34.25 + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
34.26 + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
34.27 + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
34.28 + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
34.29 + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
34.30 + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
34.31 + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34.32 + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
34.33 + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34.34 + * SUCH DAMAGE.
34.35 + *
34.36 + * @(#)pwd.h 5.13 (Berkeley) 5/28/91
34.37 + */
34.38 +
34.39 +#ifndef _PWD_H_
34.40 +#ifdef __cplusplus
34.41 +extern "C" {
34.42 +#endif
34.43 +#define _PWD_H_
34.44 +
34.45 +#include <sys/types.h>
34.46 +
34.47 +#ifndef _POSIX_SOURCE
34.48 +#define _PATH_PASSWD "/etc/passwd"
34.49 +
34.50 +#define _PASSWORD_LEN 128 /* max length, not counting NULL */
34.51 +#endif
34.52 +
34.53 +struct passwd {
34.54 + char *pw_name; /* user name */
34.55 + char *pw_passwd; /* encrypted password */
34.56 + int pw_uid; /* user uid */
34.57 + int pw_gid; /* user gid */
34.58 + char *pw_comment; /* comment */
34.59 + char *pw_gecos; /* Honeywell login info */
34.60 + char *pw_dir; /* home directory */
34.61 + char *pw_shell; /* default shell */
34.62 +};
34.63 +
34.64 +struct passwd *getpwuid (uid_t);
34.65 +struct passwd *getpwnam (const char *);
34.66 +int getpwnam_r (const char *, struct passwd *,
34.67 + char *, size_t , struct passwd **);
34.68 +int getpwuid_r (uid_t, struct passwd *, char *,
34.69 + size_t, struct passwd **);
34.70 +#ifndef _POSIX_SOURCE
34.71 +struct passwd *getpwent (void);
34.72 +void setpwent (void);
34.73 +void endpwent (void);
34.74 +#endif
34.75 +
34.76 +#ifdef __cplusplus
34.77 +}
34.78 +#endif
34.79 +#endif /* _PWD_H_ */
35.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
35.2 +++ b/test/include/reent.h Tue Jul 11 01:35:27 2006 +0000
35.3 @@ -0,0 +1,87 @@
35.4 +/* This header file provides the reentrancy. */
35.5 +
35.6 +/* The reentrant system calls here serve two purposes:
35.7 +
35.8 + 1) Provide reentrant versions of the system calls the ANSI C library
35.9 + requires.
35.10 + 2) Provide these system calls in a namespace clean way.
35.11 +
35.12 + It is intended that *all* system calls that the ANSI C library needs
35.13 + be declared here. It documents them all in one place. All library access
35.14 + to the system is via some form of these functions.
35.15 +
35.16 + There are three ways a target may provide the needed syscalls.
35.17 +
35.18 + 1) Define the reentrant versions of the syscalls directly.
35.19 + (eg: _open_r, _close_r, etc.). Please keep the namespace clean.
35.20 + When you do this, set "syscall_dir" to "syscalls" in configure.in,
35.21 + and add -DREENTRANT_SYSCALLS_PROVIDED to target_cflags in configure.in.
35.22 +
35.23 + 2) Define namespace clean versions of the system calls by prefixing
35.24 + them with '_' (eg: _open, _close, etc.). Technically, there won't be
35.25 + true reentrancy at the syscall level, but the library will be namespace
35.26 + clean.
35.27 + When you do this, set "syscall_dir" to "syscalls" in configure.in.
35.28 +
35.29 + 3) Define or otherwise provide the regular versions of the syscalls
35.30 + (eg: open, close, etc.). The library won't be reentrant nor namespace
35.31 + clean, but at least it will work.
35.32 + When you do this, add -DMISSING_SYSCALL_NAMES to target_cflags in
35.33 + configure.in.
35.34 +
35.35 + Stubs of the reentrant versions of the syscalls exist in the libc/reent
35.36 + source directory and are used if REENTRANT_SYSCALLS_PROVIDED isn't defined.
35.37 + They use the native system calls: _open, _close, etc. if they're available
35.38 + (MISSING_SYSCALL_NAMES is *not* defined), otherwise open, close, etc.
35.39 + (MISSING_SYSCALL_NAMES *is* defined). */
35.40 +
35.41 +/* WARNING: All identifiers here must begin with an underscore. This file is
35.42 + included by stdio.h and others and we therefore must only use identifiers
35.43 + in the namespace allotted to us. */
35.44 +
35.45 +#ifndef _REENT_H_
35.46 +#ifdef __cplusplus
35.47 +extern "C" {
35.48 +#endif
35.49 +#define _REENT_H_
35.50 +
35.51 +#include <sys/reent.h>
35.52 +#include <sys/_types.h>
35.53 +#include <machine/types.h>
35.54 +
35.55 +#define __need_size_t
35.56 +#include <stddef.h>
35.57 +
35.58 +/* FIXME: not namespace clean */
35.59 +struct stat;
35.60 +struct tms;
35.61 +struct timeval;
35.62 +struct timezone;
35.63 +
35.64 +/* Reentrant versions of system calls. */
35.65 +
35.66 +extern int _close_r _PARAMS ((struct _reent *, int));
35.67 +extern int _execve_r _PARAMS ((struct _reent *, char *, char **, char **));
35.68 +extern int _fcntl_r _PARAMS ((struct _reent *, int, int, int));
35.69 +extern int _fork_r _PARAMS ((struct _reent *));
35.70 +extern int _fstat_r _PARAMS ((struct _reent *, int, struct stat *));
35.71 +extern int _getpid_r _PARAMS ((struct _reent *));
35.72 +extern int _kill_r _PARAMS ((struct _reent *, int, int));
35.73 +extern int _link_r _PARAMS ((struct _reent *, const char *, const char *));
35.74 +extern _off_t _lseek_r _PARAMS ((struct _reent *, int, _off_t, int));
35.75 +extern int _open_r _PARAMS ((struct _reent *, const char *, int, int));
35.76 +extern _ssize_t _read_r _PARAMS ((struct _reent *, int, void *, size_t));
35.77 +extern void *_sbrk_r _PARAMS ((struct _reent *, size_t));
35.78 +extern int _stat_r _PARAMS ((struct _reent *, const char *, struct stat *));
35.79 +extern _CLOCK_T_ _times_r _PARAMS ((struct _reent *, struct tms *));
35.80 +extern int _unlink_r _PARAMS ((struct _reent *, const char *));
35.81 +extern int _wait_r _PARAMS ((struct _reent *, int *));
35.82 +extern _ssize_t _write_r _PARAMS ((struct _reent *, int, const void *, size_t));
35.83 +
35.84 +/* This one is not guaranteed to be available on all targets. */
35.85 +extern int _gettimeofday_r _PARAMS ((struct _reent *, struct timeval *tp, struct timezone *tzp));
35.86 +
35.87 +#ifdef __cplusplus
35.88 +}
35.89 +#endif
35.90 +#endif /* _REENT_H_ */
36.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
36.2 +++ b/test/include/regdef.h Tue Jul 11 01:35:27 2006 +0000
36.3 @@ -0,0 +1,7 @@
36.4 +/* regdef.h -- define register names. */
36.5 +
36.6 +/* This is a standard include file for MIPS targets. Other target
36.7 + probably don't define it, and attempts to include this file will
36.8 + fail. */
36.9 +
36.10 +#include <machine/regdef.h>
37.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
37.2 +++ b/test/include/setjmp.h Tue Jul 11 01:35:27 2006 +0000
37.3 @@ -0,0 +1,22 @@
37.4 +/*
37.5 + setjmp.h
37.6 + stubs for future use.
37.7 +*/
37.8 +
37.9 +#ifndef _SETJMP_H_
37.10 +#ifdef __cplusplus
37.11 +extern "C" {
37.12 +#endif
37.13 +#define _SETJMP_H_
37.14 +
37.15 +#include "_ansi.h"
37.16 +#include <machine/setjmp.h>
37.17 +
37.18 +void _EXFUN(longjmp,(jmp_buf __jmpb, int __retval));
37.19 +int _EXFUN(setjmp,(jmp_buf __jmpb));
37.20 +
37.21 +#ifdef __cplusplus
37.22 +}
37.23 +#endif
37.24 +#endif /* _SETJMP_H_ */
37.25 +
38.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
38.2 +++ b/test/include/signal.h Tue Jul 11 01:35:27 2006 +0000
38.3 @@ -0,0 +1,37 @@
38.4 +#ifndef _SIGNAL_H_
38.5 +#ifdef __cplusplus
38.6 +extern "C" {
38.7 +#endif
38.8 +#define _SIGNAL_H_
38.9 +
38.10 +#include "_ansi.h"
38.11 +#include <sys/signal.h>
38.12 +
38.13 +typedef int sig_atomic_t; /* Atomic entity type (ANSI) */
38.14 +
38.15 +#if defined(__STDC__) || defined(__cplusplus)
38.16 +#define SIG_DFL ((void (*)(int))0) /* Default action */
38.17 +#define SIG_IGN ((void (*)(int))1) /* Ignore action */
38.18 +#define SIG_ERR ((void (*)(int))-1) /* Error return */
38.19 +#else
38.20 +#define SIG_DFL ((void (*)())0) /* Default action */
38.21 +#define SIG_IGN ((void (*)())1) /* Ignore action */
38.22 +#define SIG_ERR ((void (*)())-1) /* Error return */
38.23 +#endif
38.24 +
38.25 +typedef void (*_sig_func_ptr) (int);
38.26 +
38.27 +struct _reent;
38.28 +
38.29 +_sig_func_ptr _EXFUN(_signal_r, (struct _reent *, int, _sig_func_ptr));
38.30 +int _EXFUN(_raise_r, (struct _reent *, int));
38.31 +
38.32 +#ifndef _REENT_ONLY
38.33 +_sig_func_ptr _EXFUN(signal, (int, _sig_func_ptr));
38.34 +int _EXFUN(raise, (int));
38.35 +#endif
38.36 +
38.37 +#ifdef __cplusplus
38.38 +}
38.39 +#endif
38.40 +#endif /* _SIGNAL_H_ */
39.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
39.2 +++ b/test/include/stdio.h Tue Jul 11 01:35:27 2006 +0000
39.3 @@ -0,0 +1,313 @@
39.4 +/*
39.5 + * Copyright (c) 1990 The Regents of the University of California.
39.6 + * All rights reserved.
39.7 + *
39.8 + * Redistribution and use in source and binary forms are permitted
39.9 + * provided that the above copyright notice and this paragraph are
39.10 + * duplicated in all such forms and that any documentation,
39.11 + * advertising materials, and other materials related to such
39.12 + * distribution and use acknowledge that the software was developed
39.13 + * by the University of California, Berkeley. The name of the
39.14 + * University may not be used to endorse or promote products derived
39.15 + * from this software without specific prior written permission.
39.16 + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
39.17 + * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
39.18 + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
39.19 + *
39.20 + * @(#)stdio.h 5.3 (Berkeley) 3/15/86
39.21 + */
39.22 +
39.23 +/*
39.24 + * NB: to fit things in six character monocase externals, the
39.25 + * stdio code uses the prefix `__s' for stdio objects, typically
39.26 + * followed by a three-character attempt at a mnemonic.
39.27 + */
39.28 +
39.29 +#ifndef _STDIO_H_
39.30 +#ifdef __cplusplus
39.31 +extern "C" {
39.32 +#endif
39.33 +#define _STDIO_H_
39.34 +
39.35 +#include "_ansi.h"
39.36 +
39.37 +#define _FSTDIO /* ``function stdio'' */
39.38 +
39.39 +#define __need_size_t
39.40 +#include <stddef.h>
39.41 +
39.42 +#define __need___va_list
39.43 +#include <stdarg.h>
39.44 +
39.45 +/*
39.46 + * <sys/reent.h> defines __sFILE, _fpos_t.
39.47 + * They must be defined there because struct _reent needs them (and we don't
39.48 + * want reent.h to include this file.
39.49 + */
39.50 +
39.51 +#include <sys/reent.h>
39.52 +
39.53 +typedef _fpos_t fpos_t;
39.54 +
39.55 +typedef struct __sFILE FILE;
39.56 +
39.57 +#define __SLBF 0x0001 /* line buffered */
39.58 +#define __SNBF 0x0002 /* unbuffered */
39.59 +#define __SRD 0x0004 /* OK to read */
39.60 +#define __SWR 0x0008 /* OK to write */
39.61 + /* RD and WR are never simultaneously asserted */
39.62 +#define __SRW 0x0010 /* open for reading & writing */
39.63 +#define __SEOF 0x0020 /* found EOF */
39.64 +#define __SERR 0x0040 /* found error */
39.65 +#define __SMBF 0x0080 /* _buf is from malloc */
39.66 +#define __SAPP 0x0100 /* fdopen()ed in append mode - so must write to end */
39.67 +#define __SSTR 0x0200 /* this is an sprintf/snprintf string */
39.68 +#define __SOPT 0x0400 /* do fseek() optimisation */
39.69 +#define __SNPT 0x0800 /* do not do fseek() optimisation */
39.70 +#define __SOFF 0x1000 /* set iff _offset is in fact correct */
39.71 +#define __SMOD 0x2000 /* true => fgetline modified _p text */
39.72 +
39.73 +/*
39.74 + * The following three definitions are for ANSI C, which took them
39.75 + * from System V, which stupidly took internal interface macros and
39.76 + * made them official arguments to setvbuf(), without renaming them.
39.77 + * Hence, these ugly _IOxxx names are *supposed* to appear in user code.
39.78 + *
39.79 + * Although these happen to match their counterparts above, the
39.80 + * implementation does not rely on that (so these could be renumbered).
39.81 + */
39.82 +#define _IOFBF 0 /* setvbuf should set fully buffered */
39.83 +#define _IOLBF 1 /* setvbuf should set line buffered */
39.84 +#define _IONBF 2 /* setvbuf should set unbuffered */
39.85 +
39.86 +#ifndef NULL
39.87 +#define NULL 0
39.88 +#endif
39.89 +
39.90 +#define BUFSIZ 1024
39.91 +#define EOF (-1)
39.92 +
39.93 +#define FOPEN_MAX 20 /* must be <= OPEN_MAX <sys/syslimits.h> */
39.94 +#define FILENAME_MAX 1024 /* must be <= PATH_MAX <sys/syslimits.h> */
39.95 +#define L_tmpnam 1024 /* XXX must be == PATH_MAX */
39.96 +#ifndef __STRICT_ANSI__
39.97 +#define P_tmpdir "/tmp"
39.98 +#endif
39.99 +
39.100 +#ifndef SEEK_SET
39.101 +#define SEEK_SET 0 /* set file offset to offset */
39.102 +#endif
39.103 +#ifndef SEEK_CUR
39.104 +#define SEEK_CUR 1 /* set file offset to current plus offset */
39.105 +#endif
39.106 +#ifndef SEEK_END
39.107 +#define SEEK_END 2 /* set file offset to EOF plus offset */
39.108 +#endif
39.109 +
39.110 +#define TMP_MAX 26
39.111 +
39.112 +#define stdin (_impure_ptr->_stdin)
39.113 +#define stdout (_impure_ptr->_stdout)
39.114 +#define stderr (_impure_ptr->_stderr)
39.115 +
39.116 +#define _stdin_r(x) ((x)->_stdin)
39.117 +#define _stdout_r(x) ((x)->_stdout)
39.118 +#define _stderr_r(x) ((x)->_stderr)
39.119 +
39.120 +/*
39.121 + * Functions defined in ANSI C standard.
39.122 + */
39.123 +
39.124 +#ifdef __GNUC__
39.125 +#define __VALIST __gnuc_va_list
39.126 +#else
39.127 +#define __VALIST char*
39.128 +#endif
39.129 +
39.130 +#ifndef _REENT_ONLY
39.131 +int _EXFUN(remove, (const char *));
39.132 +int _EXFUN(rename, (const char *, const char *));
39.133 +#endif
39.134 +char * _EXFUN(tempnam, (const char *, const char *));
39.135 +FILE * _EXFUN(tmpfile, (void));
39.136 +char * _EXFUN(tmpnam, (char *));
39.137 +int _EXFUN(fclose, (FILE *));
39.138 +int _EXFUN(fflush, (FILE *));
39.139 +FILE * _EXFUN(freopen, (const char *, const char *, FILE *));
39.140 +void _EXFUN(setbuf, (FILE *, char *));
39.141 +int _EXFUN(setvbuf, (FILE *, char *, int, size_t));
39.142 +int _EXFUN(fprintf, (FILE *, const char *, ...));
39.143 +int _EXFUN(fscanf, (FILE *, const char *, ...));
39.144 +int _EXFUN(printf, (const char *, ...));
39.145 +int _EXFUN(scanf, (const char *, ...));
39.146 +int _EXFUN(sscanf, (const char *, const char *, ...));
39.147 +int _EXFUN(vfprintf, (FILE *, const char *, __VALIST));
39.148 +int _EXFUN(vprintf, (const char *, __VALIST));
39.149 +int _EXFUN(vsprintf, (char *, const char *, __VALIST));
39.150 +int _EXFUN(vsnprintf, (char *, size_t, const char *, __VALIST));
39.151 +int _EXFUN(fgetc, (FILE *));
39.152 +char * _EXFUN(fgets, (char *, int, FILE *));
39.153 +int _EXFUN(fputc, (int, FILE *));
39.154 +int _EXFUN(fputs, (const char *, FILE *));
39.155 +int _EXFUN(getc, (FILE *));
39.156 +int _EXFUN(getchar, (void));
39.157 +char * _EXFUN(gets, (char *));
39.158 +int _EXFUN(putc, (int, FILE *));
39.159 +int _EXFUN(putchar, (int));
39.160 +int _EXFUN(puts, (const char *));
39.161 +int _EXFUN(ungetc, (int, FILE *));
39.162 +size_t _EXFUN(fread, (_PTR, size_t _size, size_t _n, FILE *));
39.163 +size_t _EXFUN(fwrite, (const _PTR , size_t _size, size_t _n, FILE *));
39.164 +int _EXFUN(fgetpos, (FILE *, fpos_t *));
39.165 +int _EXFUN(fseek, (FILE *, long, int));
39.166 +int _EXFUN(fsetpos, (FILE *, const fpos_t *));
39.167 +long _EXFUN(ftell, ( FILE *));
39.168 +void _EXFUN(rewind, (FILE *));
39.169 +void _EXFUN(clearerr, (FILE *));
39.170 +int _EXFUN(feof, (FILE *));
39.171 +int _EXFUN(ferror, (FILE *));
39.172 +void _EXFUN(perror, (const char *));
39.173 +#ifndef _REENT_ONLY
39.174 +FILE * _EXFUN(fopen, (const char *_name, const char *_type));
39.175 +int _EXFUN(sprintf, (char *, const char *, ...));
39.176 +int _EXFUN(snprintf, (char *, size_t, const char *, ...));
39.177 +#endif
39.178 +#ifndef __STRICT_ANSI__
39.179 +int _EXFUN(vfiprintf, (FILE *, const char *, __VALIST));
39.180 +int _EXFUN(iprintf, (const char *, ...));
39.181 +int _EXFUN(fiprintf, (FILE *, const char *, ...));
39.182 +int _EXFUN(siprintf, (char *, const char *, ...));
39.183 +#endif
39.184 +
39.185 +/*
39.186 + * Routines in POSIX 1003.1.
39.187 + */
39.188 +
39.189 +#ifndef __STRICT_ANSI__
39.190 +#ifndef _REENT_ONLY
39.191 +FILE * _EXFUN(fdopen, (int, const char *));
39.192 +#endif
39.193 +int _EXFUN(fileno, (FILE *));
39.194 +int _EXFUN(getw, (FILE *));
39.195 +int _EXFUN(pclose, (FILE *));
39.196 +FILE * _EXFUN(popen, (const char *, const char *));
39.197 +int _EXFUN(putw, (int, FILE *));
39.198 +void _EXFUN(setbuffer, (FILE *, char *, int));
39.199 +int _EXFUN(setlinebuf, (FILE *));
39.200 +#endif
39.201 +
39.202 +/*
39.203 + * Recursive versions of the above.
39.204 + */
39.205 +
39.206 +FILE * _EXFUN(_fdopen_r, (struct _reent *, int, const char *));
39.207 +FILE * _EXFUN(_fopen_r, (struct _reent *, const char *, const char *));
39.208 +int _EXFUN(_getchar_r, (struct _reent *));
39.209 +char * _EXFUN(_gets_r, (struct _reent *, char *));
39.210 +int _EXFUN(_iprintf_r, (struct _reent *, const char *, ...));
39.211 +int _EXFUN(_mkstemp_r, (struct _reent *, char *));
39.212 +char * _EXFUN(_mktemp_r, (struct _reent *, char *));
39.213 +void _EXFUN(_perror_r, (struct _reent *, const char *));
39.214 +int _EXFUN(_printf_r, (struct _reent *, const char *, ...));
39.215 +int _EXFUN(_putchar_r, (struct _reent *, int));
39.216 +int _EXFUN(_puts_r, (struct _reent *, const char *));
39.217 +int _EXFUN(_remove_r, (struct _reent *, const char *));
39.218 +int _EXFUN(_rename_r, (struct _reent *,
39.219 + const char *_old, const char *_new));
39.220 +int _EXFUN(_scanf_r, (struct _reent *, const char *, ...));
39.221 +int _EXFUN(_sprintf_r, (struct _reent *, char *, const char *, ...));
39.222 +int _EXFUN(_snprintf_r, (struct _reent *, char *, size_t, const char *, ...));
39.223 +char * _EXFUN(_tempnam_r, (struct _reent *, const char *, const char *));
39.224 +FILE * _EXFUN(_tmpfile_r, (struct _reent *));
39.225 +char * _EXFUN(_tmpnam_r, (struct _reent *, char *));
39.226 +int _EXFUN(_vfprintf_r, (struct _reent *, FILE *, const char *, __VALIST));
39.227 +int _EXFUN(_vprintf_r, (struct _reent *, const char *, __VALIST));
39.228 +int _EXFUN(_vsprintf_r, (struct _reent *, char *, const char *, __VALIST));
39.229 +int _EXFUN(_vsnprintf_r, (struct _reent *, char *, size_t, const char *, __VALIST));
39.230 +
39.231 +/*
39.232 + * Routines internal to the implementation.
39.233 + */
39.234 +
39.235 +int _EXFUN(__srget, (FILE *));
39.236 +int _EXFUN(__swbuf, (int, FILE *));
39.237 +
39.238 +/*
39.239 + * Stdio function-access interface.
39.240 + */
39.241 +
39.242 +#ifndef __STRICT_ANSI__
39.243 +FILE *_EXFUN(funopen,(const _PTR _cookie,
39.244 + int (*readfn)(_PTR _cookie, char *_buf, int _n),
39.245 + int (*writefn)(_PTR _cookie, const char *_buf, int _n),
39.246 + fpos_t (*seekfn)(_PTR _cookie, fpos_t _off, int _whence),
39.247 + int (*closefn)(_PTR _cookie)));
39.248 +
39.249 +#define fropen(cookie, fn) funopen(cookie, fn, (int (*)())0, (fpos_t (*)())0, (int (*)())0)
39.250 +#define fwopen(cookie, fn) funopen(cookie, (int (*)())0, fn, (fpos_t (*)())0, (int (*)())0)
39.251 +#endif
39.252 +
39.253 +/*
39.254 + * The __sfoo macros are here so that we can
39.255 + * define function versions in the C library.
39.256 + */
39.257 +#define __sgetc(p) (--(p)->_r < 0 ? __srget(p) : (int)(*(p)->_p++))
39.258 +#ifdef _never /* __GNUC__ */
39.259 +/* If this inline is actually used, then systems using coff debugging
39.260 + info get hopelessly confused. 21sept93 rich@cygnus.com. */
39.261 +static __inline int __sputc(int _c, FILE *_p) {
39.262 + if (--_p->_w >= 0 || (_p->_w >= _p->_lbfsize && (char)_c != '\n'))
39.263 + return (*_p->_p++ = _c);
39.264 + else
39.265 + return (__swbuf(_c, _p));
39.266 +}
39.267 +#else
39.268 +/*
39.269 + * This has been tuned to generate reasonable code on the vax using pcc
39.270 + */
39.271 +#define __sputc(c, p) \
39.272 + (--(p)->_w < 0 ? \
39.273 + (p)->_w >= (p)->_lbfsize ? \
39.274 + (*(p)->_p = (c)), *(p)->_p != '\n' ? \
39.275 + (int)*(p)->_p++ : \
39.276 + __swbuf('\n', p) : \
39.277 + __swbuf((int)(c), p) : \
39.278 + (*(p)->_p = (c), (int)*(p)->_p++))
39.279 +#endif
39.280 +
39.281 +#define __sfeof(p) (((p)->_flags & __SEOF) != 0)
39.282 +#define __sferror(p) (((p)->_flags & __SERR) != 0)
39.283 +#define __sclearerr(p) ((void)((p)->_flags &= ~(__SERR|__SEOF)))
39.284 +#define __sfileno(p) ((p)->_file)
39.285 +
39.286 +#define feof(p) __sfeof(p)
39.287 +#define ferror(p) __sferror(p)
39.288 +#define clearerr(p) __sclearerr(p)
39.289 +
39.290 +#if 0 /*ndef __STRICT_ANSI__ - FIXME: must initialize stdio first, use fn */
39.291 +#define fileno(p) __sfileno(p)
39.292 +#endif
39.293 +
39.294 +#ifndef lint
39.295 +#define getc(fp) __sgetc(fp)
39.296 +#define putc(x, fp) __sputc(x, fp)
39.297 +#endif /* lint */
39.298 +
39.299 +#define getchar() getc(stdin)
39.300 +#define putchar(x) putc(x, stdout)
39.301 +
39.302 +#ifndef __STRICT_ANSI__
39.303 +/* fast always-buffered version, true iff error */
39.304 +#define fast_putc(x,p) (--(p)->_w < 0 ? \
39.305 + __swbuf((int)(x), p) == EOF : (*(p)->_p = (x), (p)->_p++, 0))
39.306 +
39.307 +#define L_cuserid 9 /* posix says it goes in stdio.h :( */
39.308 +#ifdef __CYGWIN32__
39.309 +#define L_ctermid 16
39.310 +#endif
39.311 +#endif
39.312 +
39.313 +#ifdef __cplusplus
39.314 +}
39.315 +#endif
39.316 +#endif /* _STDIO_H_ */
40.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
40.2 +++ b/test/include/stdlib.h Tue Jul 11 01:35:27 2006 +0000
40.3 @@ -0,0 +1,140 @@
40.4 +/*
40.5 + * stdlib.h
40.6 + *
40.7 + * Definitions for common types, variables, and functions.
40.8 + */
40.9 +
40.10 +#ifndef _STDLIB_H_
40.11 +#ifdef __cplusplus
40.12 +extern "C" {
40.13 +#endif
40.14 +#define _STDLIB_H_
40.15 +
40.16 +#include "_ansi.h"
40.17 +
40.18 +#define __need_size_t
40.19 +#define __need_wchar_t
40.20 +#include <stddef.h>
40.21 +
40.22 +#include <sys/reent.h>
40.23 +
40.24 +typedef struct
40.25 +{
40.26 + int quot; /* quotient */
40.27 + int rem; /* remainder */
40.28 +} div_t;
40.29 +
40.30 +typedef struct
40.31 +{
40.32 + long quot; /* quotient */
40.33 + long rem; /* remainder */
40.34 +} ldiv_t;
40.35 +
40.36 +#ifndef NULL
40.37 +#define NULL 0
40.38 +#endif
40.39 +
40.40 +#define EXIT_FAILURE 1
40.41 +#define EXIT_SUCCESS 0
40.42 +
40.43 +#define RAND_MAX 0x7fffffff
40.44 +
40.45 +#if (defined(__CYGWIN__) || defined(__CYGWIN32__)) && ! defined(_COMPILING_NEWLIB)
40.46 +extern __declspec(dllimport) int __mb_cur_max;
40.47 +#else
40.48 +extern int __mb_cur_max;
40.49 +#endif
40.50 +
40.51 +#define MB_CUR_MAX __mb_cur_max
40.52 +
40.53 +_VOID _EXFUN(abort,(_VOID) _ATTRIBUTE ((noreturn)));
40.54 +int _EXFUN(abs,(int));
40.55 +int _EXFUN(atexit,(_VOID (*__func)(_VOID)));
40.56 +double _EXFUN(atof,(const char *__nptr));
40.57 +#ifndef __STRICT_ANSI__
40.58 +float _EXFUN(atoff,(const char *__nptr));
40.59 +#endif
40.60 +int _EXFUN(atoi,(const char *__nptr));
40.61 +long _EXFUN(atol,(const char *__nptr));
40.62 +_PTR _EXFUN(bsearch,(const _PTR __key,
40.63 + const _PTR __base,
40.64 + size_t __nmemb,
40.65 + size_t __size,
40.66 + int _EXFUN((*_compar),(const _PTR, const _PTR))));
40.67 +_PTR _EXFUN(calloc,(size_t __nmemb, size_t __size));
40.68 +div_t _EXFUN(div,(int __numer, int __denom));
40.69 +_VOID _EXFUN(exit,(int __status) _ATTRIBUTE ((noreturn)));
40.70 +_VOID _EXFUN(free,(_PTR));
40.71 +char * _EXFUN(getenv,(const char *__string));
40.72 +char * _EXFUN(_getenv_r,(struct _reent *, const char *__string));
40.73 +char * _EXFUN(_findenv,(_CONST char *, int *));
40.74 +char * _EXFUN(_findenv_r,(struct _reent *, _CONST char *, int *));
40.75 +long _EXFUN(labs,(long));
40.76 +ldiv_t _EXFUN(ldiv,(long __numer, long __denom));
40.77 +_PTR _EXFUN(malloc,(size_t __size));
40.78 +int _EXFUN(mblen,(const char *, size_t));
40.79 +int _EXFUN(_mblen_r,(struct _reent *, const char *, size_t, int *));
40.80 +int _EXFUN(mbtowc,(wchar_t *, const char *, size_t));
40.81 +int _EXFUN(_mbtowc_r,(struct _reent *, wchar_t *, const char *, size_t, int *));
40.82 +int _EXFUN(wctomb,(char *, wchar_t));
40.83 +int _EXFUN(_wctomb_r,(struct _reent *, char *, wchar_t, int *));
40.84 +size_t _EXFUN(mbstowcs,(wchar_t *, const char *, size_t));
40.85 +size_t _EXFUN(_mbstowcs_r,(struct _reent *, wchar_t *, const char *, size_t, int *));
40.86 +size_t _EXFUN(wcstombs,(char *, const wchar_t *, size_t));
40.87 +size_t _EXFUN(_wcstombs_r,(struct _reent *, char *, const wchar_t *, size_t, int *));
40.88 +_VOID _EXFUN(qsort,(_PTR __base, size_t __nmemb, size_t __size, int(*_compar)(const _PTR, const _PTR)));
40.89 +int _EXFUN(rand,(_VOID));
40.90 +_PTR _EXFUN(realloc,(_PTR __r, size_t __size));
40.91 +_VOID _EXFUN(srand,(unsigned __seed));
40.92 +double _EXFUN(strtod,(const char *__n, char **_end_PTR));
40.93 +#ifndef __STRICT_ANSI__
40.94 +float _EXFUN(strtodf,(const char *__n, char **_end_PTR));
40.95 +#endif
40.96 +long _EXFUN(strtol,(const char *__n, char **_end_PTR, int __base));
40.97 +unsigned long _EXFUN(strtoul,(const char *_n_PTR, char **_end_PTR, int __base));
40.98 +unsigned long _EXFUN(_strtoul_r,(struct _reent *,const char *_n_PTR, char **_end_PTR, int __base));
40.99 +int _EXFUN(system,(const char *__string));
40.100 +
40.101 +#ifndef __STRICT_ANSI__
40.102 +_VOID _EXFUN(cfree,(_PTR));
40.103 +int _EXFUN(putenv,(const char *__string));
40.104 +int _EXFUN(setenv,(const char *__string, const char *__value, int __overwrite));
40.105 +int _EXFUN(_setenv_r,(struct _reent *, const char *__string, const char *__value, int __overwrite));
40.106 +
40.107 +char * _EXFUN(gcvt,(double,int,char *));
40.108 +char * _EXFUN(gcvtf,(float,int,char *));
40.109 +char * _EXFUN(fcvt,(double,int,int *,int *));
40.110 +char * _EXFUN(fcvtf,(float,int,int *,int *));
40.111 +char * _EXFUN(ecvt,(double,int,int *,int *));
40.112 +char * _EXFUN(ecvtbuf,(double, int, int*, int*, char *));
40.113 +char * _EXFUN(fcvtbuf,(double, int, int*, int*, char *));
40.114 +char * _EXFUN(ecvtf,(float,int,int *,int *));
40.115 +char * _EXFUN(dtoa,(double, int, int, int *, int*, char**));
40.116 +int _EXFUN(rand_r,(unsigned *__seed));
40.117 +
40.118 +#ifdef __CYGWIN32__
40.119 +char * _EXFUN(realpath,(const char *, char *));
40.120 +void _EXFUN(unsetenv,(const char *__string));
40.121 +int _EXFUN(random,(_VOID));
40.122 +long _EXFUN(srandom,(unsigned __seed));
40.123 +char * _EXFUN(ptsname, (int));
40.124 +int _EXFUN(grantpt, (int));
40.125 +int _EXFUN(unlockpt,(int));
40.126 +#endif
40.127 +
40.128 +#endif /* ! __STRICT_ANSI__ */
40.129 +
40.130 +char * _EXFUN(_dtoa_r,(struct _reent *, double, int, int, int *, int*, char**));
40.131 +_PTR _EXFUN(_malloc_r,(struct _reent *, size_t));
40.132 +_PTR _EXFUN(_calloc_r,(struct _reent *, size_t, size_t));
40.133 +_VOID _EXFUN(_free_r,(struct _reent *, _PTR));
40.134 +_PTR _EXFUN(_realloc_r,(struct _reent *, _PTR, size_t));
40.135 +_VOID _EXFUN(_mstats_r,(struct _reent *, char *));
40.136 +int _EXFUN(_system_r,(struct _reent *, const char *));
40.137 +
40.138 +_VOID _EXFUN(__eprintf,(const char *, const char *, unsigned int, const char *));
40.139 +
40.140 +#ifdef __cplusplus
40.141 +}
40.142 +#endif
40.143 +#endif /* _STDLIB_H_ */
41.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
41.2 +++ b/test/include/string.h Tue Jul 11 01:35:27 2006 +0000
41.3 @@ -0,0 +1,90 @@
41.4 +/*
41.5 + * string.h
41.6 + *
41.7 + * Definitions for memory and string functions.
41.8 + */
41.9 +
41.10 +#ifndef _STRING_H_
41.11 +#define _STRING_H_
41.12 +
41.13 +#ifdef __cplusplus
41.14 +extern "C" {
41.15 +#endif
41.16 +
41.17 +#include "_ansi.h"
41.18 +
41.19 +#define __need_size_t
41.20 +#include <stddef.h>
41.21 +
41.22 +#ifndef NULL
41.23 +#define NULL 0
41.24 +#endif
41.25 +
41.26 +_PTR _EXFUN(memchr,(const _PTR, int, size_t));
41.27 +int _EXFUN(memcmp,(const _PTR, const _PTR, size_t));
41.28 +_PTR _EXFUN(memcpy,(_PTR, const _PTR, size_t));
41.29 +_PTR _EXFUN(memmove,(_PTR, const _PTR, size_t));
41.30 +_PTR _EXFUN(memset,(_PTR, int, size_t));
41.31 +char *_EXFUN(strcat,(char *, const char *));
41.32 +char *_EXFUN(strchr,(const char *, int));
41.33 +int _EXFUN(strcmp,(const char *, const char *));
41.34 +int _EXFUN(strcoll,(const char *, const char *));
41.35 +char *_EXFUN(strcpy,(char *, const char *));
41.36 +size_t _EXFUN(strcspn,(const char *, const char *));
41.37 +char *_EXFUN(strerror,(int));
41.38 +size_t _EXFUN(strlen,(const char *));
41.39 +char *_EXFUN(strncat,(char *, const char *, size_t));
41.40 +int _EXFUN(strncmp,(const char *, const char *, size_t));
41.41 +char *_EXFUN(strncpy,(char *, const char *, size_t));
41.42 +char *_EXFUN(strpbrk,(const char *, const char *));
41.43 +char *_EXFUN(strrchr,(const char *, int));
41.44 +size_t _EXFUN(strspn,(const char *, const char *));
41.45 +char *_EXFUN(strstr,(const char *, const char *));
41.46 +
41.47 +#ifndef _REENT_ONLY
41.48 +char *_EXFUN(strtok,(char *, const char *));
41.49 +#endif
41.50 +
41.51 +size_t _EXFUN(strxfrm,(char *, const char *, size_t));
41.52 +
41.53 +#ifndef __STRICT_ANSI__
41.54 +char *_EXFUN(strtok_r,(char *, const char *, char **));
41.55 +
41.56 +int _EXFUN(bcmp,(const char *, const char *, size_t));
41.57 +void _EXFUN(bcopy,(const char *, char *, size_t));
41.58 +void _EXFUN(bzero,(char *, size_t));
41.59 +int _EXFUN(ffs,(int));
41.60 +char *_EXFUN(index,(const char *, int));
41.61 +_PTR _EXFUN(memccpy,(_PTR, const _PTR, int, size_t));
41.62 +char *_EXFUN(rindex,(const char *, int));
41.63 +int _EXFUN(strcasecmp,(const char *, const char *));
41.64 +char *_EXFUN(strdup,(const char *));
41.65 +int _EXFUN(strncasecmp,(const char *, const char *, size_t));
41.66 +char *_EXFUN(strsep,(char **, const char *));
41.67 +char *_EXFUN(strlwr,(char *));
41.68 +char *_EXFUN(strupr,(char *));
41.69 +#ifdef __CYGWIN32__
41.70 +char *_EXFUN(strsignal, (int __signo));
41.71 +int _EXFUN(strtosigno, (const char *__name));
41.72 +#endif
41.73 +
41.74 +/* These function names are used on Windows and perhaps other systems. */
41.75 +#ifndef strcmpi
41.76 +#define strcmpi strcasecmp
41.77 +#endif
41.78 +#ifndef stricmp
41.79 +#define stricmp strcasecmp
41.80 +#endif
41.81 +#ifndef strncmpi
41.82 +#define strncmpi strncasecmp
41.83 +#endif
41.84 +#ifndef strnicmp
41.85 +#define strnicmp strncasecmp
41.86 +#endif
41.87 +
41.88 +#endif /* ! __STRICT_ANSI__ */
41.89 +
41.90 +#ifdef __cplusplus
41.91 +}
41.92 +#endif
41.93 +#endif /* _STRING_H_ */
42.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
42.2 +++ b/test/include/sys/_types.h Tue Jul 11 01:35:27 2006 +0000
42.3 @@ -0,0 +1,15 @@
42.4 +/* ANSI C namespace clean utility typedefs */
42.5 +
42.6 +/* This file defines various typedefs needed by the system calls that support
42.7 + the C library. Basically, they're just the POSIX versions with an '_'
42.8 + prepended. This file lives in the `sys' directory so targets can provide
42.9 + their own if desired (or they can put target dependant conditionals here).
42.10 +*/
42.11 +
42.12 +#ifndef _SYS__TYPES_H
42.13 +#define _SYS__TYPES_H
42.14 +
42.15 +typedef long _off_t;
42.16 +typedef long _ssize_t;
42.17 +
42.18 +#endif /* _SYS__TYPES_H */
43.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
43.2 +++ b/test/include/sys/config.h Tue Jul 11 01:35:27 2006 +0000
43.3 @@ -0,0 +1,115 @@
43.4 +#ifndef __SYS_CONFIG_H__
43.5 +#define __SYS_CONFIG_H__
43.6 +
43.7 +/* exceptions first */
43.8 +/* ??? Why is much of this stuff duplicated with machine/ieeefp.h? */
43.9 +#if defined(__H8300__) || defined(__H8500__) || defined (__H8300H__) || defined(__W65__) || defined (__H8300S__)
43.10 +#define _FLOAT_ARG float
43.11 +#define __SMALL_BITFIELDS
43.12 +#define _DOUBLE_IS_32BITS
43.13 +#define __IEEE_BIG_ENDIAN
43.14 +/* ??? This conditional is true for the h8500 and the w65, defining H8300
43.15 + in those cases probably isn't the right thing to do. */
43.16 +#define H8300 1
43.17 +#endif
43.18 +
43.19 +#ifdef __W65__
43.20 +#define _DOUBLE_IS_32BITS
43.21 +#define __SMALL_BITFIELDS
43.22 +#define __IEEE_BIG_ENDIAN
43.23 +#undef INT_MAX
43.24 +#undef UINT_MAX
43.25 +#define INT_MAX 32767
43.26 +#define UINT_MAX 65535
43.27 +
43.28 +#endif
43.29 +
43.30 +/* 16 bit integer machines */
43.31 +#if defined(__Z8001__) || defined(__Z8002__) || defined(__H8300__) || defined(__H8500__) || defined(__W65__) || defined (__H8300H__) || defined (__H8300S__) || defined (__mn10200__)
43.32 +
43.33 +#undef INT_MAX
43.34 +#undef UINT_MAX
43.35 +#define INT_MAX 32767
43.36 +#define UINT_MAX 65535
43.37 +#endif
43.38 +
43.39 +#if defined(__D10V__)
43.40 +#undef INT_MAX
43.41 +#undef UINT_MAX
43.42 +#define INT_MAX __INT_MAX__
43.43 +#define UINT_MAX (__INT_MAX__ * 2U + 1)
43.44 +#define _DOUBLE_IS_32BITS
43.45 +#define _POINTER_INT short
43.46 +#define __IEEE_BIG_ENDIAN
43.47 +#endif
43.48 +
43.49 +#ifdef ___AM29K__
43.50 +#define _FLOAT_RET double
43.51 +#endif
43.52 +
43.53 +#ifdef __i386__
43.54 +#ifndef __unix__
43.55 +/* in other words, go32 */
43.56 +#define _FLOAT_RET double
43.57 +#endif
43.58 +#endif
43.59 +
43.60 +#ifdef __M32R__
43.61 +#define __IEEE_BIG_ENDIAN
43.62 +#endif
43.63 +
43.64 +#ifdef __m68k__
43.65 +/* This is defined in machine/ieeefp.h; need to check is it redundant here? */
43.66 +#define __IEEE_BIG_ENDIAN
43.67 +#endif
43.68 +
43.69 +#ifdef __mn10300__
43.70 +#define __IEEE_LITTLE_ENDIAN
43.71 +#endif
43.72 +
43.73 +#ifdef __mn10200__
43.74 +#define _DOUBLE_IS_32BITS
43.75 +#define __SMALL_BITFIELDS
43.76 +#define __IEEE_LITTLE_ENDIAN
43.77 +#endif
43.78 +
43.79 +#ifdef __TIC80__
43.80 +#define __IEEE_LITTLE_ENDIAN
43.81 +#endif
43.82 +
43.83 +#ifdef __v850
43.84 +#define __IEEE_LITTLE_ENDIAN
43.85 +#define __ATTRIBUTE_IMPURE_PTR__ __attribute__((__sda__))
43.86 +#endif
43.87 +
43.88 +#ifdef __D30V__
43.89 +#define __IEEE_BIG_ENDIAN
43.90 +#endif
43.91 +
43.92 +/* For the PowerPC eabi, force the _impure_ptr to be in .sdata */
43.93 +#if defined(__PPC__) && defined(_CALL_SYSV)
43.94 +#define __ATTRIBUTE_IMPURE_PTR__ __attribute__((__section__(".sdata")))
43.95 +#endif
43.96 +
43.97 +#ifdef __sparc__
43.98 +#ifdef __LITTLE_ENDIAN_DATA__
43.99 +#define __IEEE_LITTLE_ENDIAN
43.100 +#else
43.101 +#define __IEEE_BIG_ENDIAN
43.102 +#endif
43.103 +#endif
43.104 +
43.105 +#if INT_MAX == 32767
43.106 +typedef long int __int32_t;
43.107 +typedef unsigned long int __uint32_t;
43.108 +#else
43.109 +typedef int __int32_t;
43.110 +typedef unsigned int __uint32_t;
43.111 +#endif
43.112 +
43.113 +#ifndef _POINTER_INT
43.114 +#define _POINTER_INT long
43.115 +#endif
43.116 +
43.117 +
43.118 +#endif /* __SYS_CONFIG_H__ */
44.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
44.2 +++ b/test/include/sys/dirent.h Tue Jul 11 01:35:27 2006 +0000
44.3 @@ -0,0 +1,15 @@
44.4 +/* <dirent.h> includes <sys/dirent.h>, which is this file. On a
44.5 + system which supports <dirent.h>, this file is overridden by
44.6 + dirent.h in the libc/sys/.../sys directory. On a system which does
44.7 + not support <dirent.h>, we will get this file which tries to find
44.8 + any other <dirent.h> which may be lurking around. If there isn't
44.9 + one, the user will get an error indicating that there is no
44.10 + <dirent.h>. */
44.11 +
44.12 +#ifdef __cplusplus
44.13 +extern "C" {
44.14 +#endif
44.15 +#include_next <dirent.h>
44.16 +#ifdef __cplusplus
44.17 +}
44.18 +#endif
45.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
45.2 +++ b/test/include/sys/errno.h Tue Jul 11 01:35:27 2006 +0000
45.3 @@ -0,0 +1,154 @@
45.4 +/* errno is not a global variable, because that would make using it
45.5 + non-reentrant. Instead, its address is returned by the function
45.6 + __errno. */
45.7 +
45.8 +#ifndef _SYS_ERRNO_H_
45.9 +#ifdef __cplusplus
45.10 +extern "C" {
45.11 +#endif
45.12 +#define _SYS_ERRNO_H_
45.13 +
45.14 +#include <sys/reent.h>
45.15 +
45.16 +#ifndef _REENT_ONLY
45.17 +#define errno (*__errno())
45.18 +extern int *__errno _PARAMS ((void));
45.19 +#endif
45.20 +
45.21 +#if !defined(__CYGWIN32__) || defined(__INSIDE_CYGWIN__)
45.22 +extern _CONST char * _CONST _sys_errlist[];
45.23 +extern int _sys_nerr;
45.24 +#else
45.25 +extern _CONST char * _CONST _sys_errlist[] __declspec(dllimport);
45.26 +extern int _sys_nerr __declspec(dllimport);
45.27 +#endif
45.28 +
45.29 +#define __errno_r(ptr) ((ptr)->_errno)
45.30 +
45.31 +#define EPERM 1 /* Not super-user */
45.32 +#define ENOENT 2 /* No such file or directory */
45.33 +#define ESRCH 3 /* No such process */
45.34 +#define EINTR 4 /* Interrupted system call */
45.35 +#define EIO 5 /* I/O error */
45.36 +#define ENXIO 6 /* No such device or address */
45.37 +#define E2BIG 7 /* Arg list too long */
45.38 +#define ENOEXEC 8 /* Exec format error */
45.39 +#define EBADF 9 /* Bad file number */
45.40 +#define ECHILD 10 /* No children */
45.41 +#define EAGAIN 11 /* No more processes */
45.42 +#define ENOMEM 12 /* Not enough core */
45.43 +#define EACCES 13 /* Permission denied */
45.44 +#define EFAULT 14 /* Bad address */
45.45 +#define ENOTBLK 15 /* Block device required */
45.46 +#define EBUSY 16 /* Mount device busy */
45.47 +#define EEXIST 17 /* File exists */
45.48 +#define EXDEV 18 /* Cross-device link */
45.49 +#define ENODEV 19 /* No such device */
45.50 +#define ENOTDIR 20 /* Not a directory */
45.51 +#define EISDIR 21 /* Is a directory */
45.52 +#define EINVAL 22 /* Invalid argument */
45.53 +#define ENFILE 23 /* Too many open files in system */
45.54 +#define EMFILE 24 /* Too many open files */
45.55 +#define ENOTTY 25 /* Not a typewriter */
45.56 +#define ETXTBSY 26 /* Text file busy */
45.57 +#define EFBIG 27 /* File too large */
45.58 +#define ENOSPC 28 /* No space left on device */
45.59 +#define ESPIPE 29 /* Illegal seek */
45.60 +#define EROFS 30 /* Read only file system */
45.61 +#define EMLINK 31 /* Too many links */
45.62 +#define EPIPE 32 /* Broken pipe */
45.63 +#define EDOM 33 /* Math arg out of domain of func */
45.64 +#define ERANGE 34 /* Math result not representable */
45.65 +#define ENOMSG 35 /* No message of desired type */
45.66 +#define EIDRM 36 /* Identifier removed */
45.67 +#define ECHRNG 37 /* Channel number out of range */
45.68 +#define EL2NSYNC 38 /* Level 2 not synchronized */
45.69 +#define EL3HLT 39 /* Level 3 halted */
45.70 +#define EL3RST 40 /* Level 3 reset */
45.71 +#define ELNRNG 41 /* Link number out of range */
45.72 +#define EUNATCH 42 /* Protocol driver not attached */
45.73 +#define ENOCSI 43 /* No CSI structure available */
45.74 +#define EL2HLT 44 /* Level 2 halted */
45.75 +#define EDEADLK 45 /* Deadlock condition */
45.76 +#define ENOLCK 46 /* No record locks available */
45.77 +#define EBADE 50 /* Invalid exchange */
45.78 +#define EBADR 51 /* Invalid request descriptor */
45.79 +#define EXFULL 52 /* Exchange full */
45.80 +#define ENOANO 53 /* No anode */
45.81 +#define EBADRQC 54 /* Invalid request code */
45.82 +#define EBADSLT 55 /* Invalid slot */
45.83 +#define EDEADLOCK 56 /* File locking deadlock error */
45.84 +#define EBFONT 57 /* Bad font file fmt */
45.85 +#define ENOSTR 60 /* Device not a stream */
45.86 +#define ENODATA 61 /* No data (for no delay io) */
45.87 +#define ETIME 62 /* Timer expired */
45.88 +#define ENOSR 63 /* Out of streams resources */
45.89 +#define ENONET 64 /* Machine is not on the network */
45.90 +#define ENOPKG 65 /* Package not installed */
45.91 +#define EREMOTE 66 /* The object is remote */
45.92 +#define ENOLINK 67 /* The link has been severed */
45.93 +#define EADV 68 /* Advertise error */
45.94 +#define ESRMNT 69 /* Srmount error */
45.95 +#define ECOMM 70 /* Communication error on send */
45.96 +#define EPROTO 71 /* Protocol error */
45.97 +#define EMULTIHOP 74 /* Multihop attempted */
45.98 +#define ELBIN 75 /* Inode is remote (not really error) */
45.99 +#define EDOTDOT 76 /* Cross mount point (not really error) */
45.100 +#define EBADMSG 77 /* Trying to read unreadable message */
45.101 +#define ENOTUNIQ 80 /* Given log. name not unique */
45.102 +#define EBADFD 81 /* f.d. invalid for this operation */
45.103 +#define EREMCHG 82 /* Remote address changed */
45.104 +#define ELIBACC 83 /* Can't access a needed shared lib */
45.105 +#define ELIBBAD 84 /* Accessing a corrupted shared lib */
45.106 +#define ELIBSCN 85 /* .lib section in a.out corrupted */
45.107 +#define ELIBMAX 86 /* Attempting to link in too many libs */
45.108 +#define ELIBEXEC 87 /* Attempting to exec a shared library */
45.109 +#define ENOSYS 88 /* Function not implemented */
45.110 +#define ENMFILE 89 /* No more files */
45.111 +#define ENOTEMPTY 90 /* Directory not empty */
45.112 +#define ENAMETOOLONG 91 /* File or path name too long */
45.113 +#define ELOOP 92 /* Too many symbolic links */
45.114 +#define EOPNOTSUPP 95 /* Operation not supported on transport endpoint */
45.115 +#define EPFNOSUPPORT 96 /* Protocol family not supported */
45.116 +#define ECONNRESET 104 /* Connection reset by peer */
45.117 +#define ENOBUFS 105 /* No buffer space available */
45.118 +#define EAFNOSUPPORT 106
45.119 +#define EPROTOTYPE 107
45.120 +#define ENOTSOCK 108
45.121 +#define ENOPROTOOPT 109
45.122 +#define ESHUTDOWN 110
45.123 +#define ECONNREFUSED 111 /* Connection refused */
45.124 +#define EADDRINUSE 112 /* Address already in use */
45.125 +#define ECONNABORTED 113 /* Connection aborted */
45.126 +#define ENETUNREACH 114
45.127 +#define ENETDOWN 115
45.128 +#define ETIMEDOUT 116
45.129 +#define EHOSTDOWN 117
45.130 +#define EHOSTUNREACH 118
45.131 +#define EINPROGRESS 119
45.132 +#define EALREADY 120
45.133 +#define EDESTADDRREQ 121
45.134 +#define EMSGSIZE 122
45.135 +#define EPROTONOSUPPORT 123
45.136 +#define ESOCKTNOSUPPORT 124
45.137 +#define EADDRNOTAVAIL 125
45.138 +#define ENETRESET 126
45.139 +#define EISCONN 127
45.140 +#define ENOTCONN 128
45.141 +#define ETOOMANYREFS 129
45.142 +#define EPROCLIM 130
45.143 +#define EUSERS 131
45.144 +#define EDQUOT 132
45.145 +#define ESTALE 133
45.146 +#define ENOTSUP 134
45.147 +#define ENOMEDIUM 135
45.148 +
45.149 +/* From cygwin32. */
45.150 +#define EWOULDBLOCK EAGAIN /* Operation would block */
45.151 +
45.152 +#define __ELASTERROR 2000 /* Users can add values starting here */
45.153 +
45.154 +#ifdef __cplusplus
45.155 +}
45.156 +#endif
45.157 +#endif /* _SYS_ERRNO_H */
46.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
46.2 +++ b/test/include/sys/fcntl.h Tue Jul 11 01:35:27 2006 +0000
46.3 @@ -0,0 +1,178 @@
46.4 +
46.5 +#ifndef _FCNTL_
46.6 +#ifdef __cplusplus
46.7 +extern "C" {
46.8 +#endif
46.9 +#define _FCNTL_
46.10 +#include <_ansi.h>
46.11 +#define _FOPEN (-1) /* from sys/file.h, kernel use only */
46.12 +#define _FREAD 0x0001 /* read enabled */
46.13 +#define _FWRITE 0x0002 /* write enabled */
46.14 +#define _FNDELAY 0x0004 /* non blocking I/O (4.2 style) */
46.15 +#define _FAPPEND 0x0008 /* append (writes guaranteed at the end) */
46.16 +#define _FMARK 0x0010 /* internal; mark during gc() */
46.17 +#define _FDEFER 0x0020 /* internal; defer for next gc pass */
46.18 +#define _FASYNC 0x0040 /* signal pgrp when data ready */
46.19 +#define _FSHLOCK 0x0080 /* BSD flock() shared lock present */
46.20 +#define _FEXLOCK 0x0100 /* BSD flock() exclusive lock present */
46.21 +#define _FCREAT 0x0200 /* open with file create */
46.22 +#define _FTRUNC 0x0400 /* open with truncation */
46.23 +#define _FEXCL 0x0800 /* error on open if file exists */
46.24 +#define _FNBIO 0x1000 /* non blocking I/O (sys5 style) */
46.25 +#define _FSYNC 0x2000 /* do all writes synchronously */
46.26 +#define _FNONBLOCK 0x4000 /* non blocking I/O (POSIX style) */
46.27 +#define _FNOCTTY 0x8000 /* don't assign a ctty on this open */
46.28 +
46.29 +#define O_ACCMODE (O_RDONLY|O_WRONLY|O_RDWR)
46.30 +
46.31 +/*
46.32 + * Flag values for open(2) and fcntl(2)
46.33 + * The kernel adds 1 to the open modes to turn it into some
46.34 + * combination of FREAD and FWRITE.
46.35 + */
46.36 +#define O_RDONLY 0 /* +1 == FREAD */
46.37 +#define O_WRONLY 1 /* +1 == FWRITE */
46.38 +#define O_RDWR 2 /* +1 == FREAD|FWRITE */
46.39 +#define O_APPEND _FAPPEND
46.40 +#define O_CREAT _FCREAT
46.41 +#define O_TRUNC _FTRUNC
46.42 +#define O_EXCL _FEXCL
46.43 +/* O_SYNC _FSYNC not posix, defined below */
46.44 +/* O_NDELAY _FNDELAY set in include/fcntl.h */
46.45 +/* O_NDELAY _FNBIO set in 5include/fcntl.h */
46.46 +#define O_NONBLOCK _FNONBLOCK
46.47 +#define O_NOCTTY _FNOCTTY
46.48 +/* For machines which care - */
46.49 +#if defined (_WIN32) || defined (__CYGWIN__)
46.50 +#define _FBINARY 0x10000
46.51 +#define _FTEXT 0x20000
46.52 +#define _FNOINHERIT 0x40000
46.53 +
46.54 +#define O_BINARY _FBINARY
46.55 +#define O_TEXT _FTEXT
46.56 +#define O_NOINHERIT _FNOINHERIT
46.57 +
46.58 +/* The windows header files define versions with a leading underscore. */
46.59 +#define _O_RDONLY O_RDONLY
46.60 +#define _O_WRONLY O_WRONLY
46.61 +#define _O_RDWR O_RDWR
46.62 +#define _O_APPEND O_APPEND
46.63 +#define _O_CREAT O_CREAT
46.64 +#define _O_TRUNC O_TRUNC
46.65 +#define _O_EXCL O_EXCL
46.66 +#define _O_TEXT O_TEXT
46.67 +#define _O_BINARY O_BINARY
46.68 +#define _O_RAW O_BINARY
46.69 +#define _O_NOINHERIT O_NOINHERIT
46.70 +#endif
46.71 +
46.72 +#ifndef _POSIX_SOURCE
46.73 +
46.74 +#define O_SYNC _FSYNC
46.75 +
46.76 +/*
46.77 + * Flags that work for fcntl(fd, F_SETFL, FXXXX)
46.78 + */
46.79 +#define FAPPEND _FAPPEND
46.80 +#define FSYNC _FSYNC
46.81 +#define FASYNC _FASYNC
46.82 +#define FNBIO _FNBIO
46.83 +#define FNONBIO _FNONBLOCK /* XXX fix to be NONBLOCK everywhere */
46.84 +#define FNDELAY _FNDELAY
46.85 +
46.86 +/*
46.87 + * Flags that are disallowed for fcntl's (FCNTLCANT);
46.88 + * used for opens, internal state, or locking.
46.89 + */
46.90 +#define FREAD _FREAD
46.91 +#define FWRITE _FWRITE
46.92 +#define FMARK _FMARK
46.93 +#define FDEFER _FDEFER
46.94 +#define FSHLOCK _FSHLOCK
46.95 +#define FEXLOCK _FEXLOCK
46.96 +
46.97 +/*
46.98 + * The rest of the flags, used only for opens
46.99 + */
46.100 +#define FOPEN _FOPEN
46.101 +#define FCREAT _FCREAT
46.102 +#define FTRUNC _FTRUNC
46.103 +#define FEXCL _FEXCL
46.104 +#define FNOCTTY _FNOCTTY
46.105 +
46.106 +#endif /* !_POSIX_SOURCE */
46.107 +
46.108 +/* XXX close on exec request; must match UF_EXCLOSE in user.h */
46.109 +#define FD_CLOEXEC 1 /* posix */
46.110 +
46.111 +/* fcntl(2) requests */
46.112 +#define F_DUPFD 0 /* Duplicate fildes */
46.113 +#define F_GETFD 1 /* Get fildes flags (close on exec) */
46.114 +#define F_SETFD 2 /* Set fildes flags (close on exec) */
46.115 +#define F_GETFL 3 /* Get file flags */
46.116 +#define F_SETFL 4 /* Set file flags */
46.117 +#ifndef _POSIX_SOURCE
46.118 +#define F_GETOWN 5 /* Get owner - for ASYNC */
46.119 +#define F_SETOWN 6 /* Set owner - for ASYNC */
46.120 +#endif /* !_POSIX_SOURCE */
46.121 +#define F_GETLK 7 /* Get record-locking information */
46.122 +#define F_SETLK 8 /* Set or Clear a record-lock (Non-Blocking) */
46.123 +#define F_SETLKW 9 /* Set or Clear a record-lock (Blocking) */
46.124 +#ifndef _POSIX_SOURCE
46.125 +#define F_RGETLK 10 /* Test a remote lock to see if it is blocked */
46.126 +#define F_RSETLK 11 /* Set or unlock a remote lock */
46.127 +#define F_CNVT 12 /* Convert a fhandle to an open fd */
46.128 +#define F_RSETLKW 13 /* Set or Clear remote record-lock(Blocking) */
46.129 +#endif /* !_POSIX_SOURCE */
46.130 +
46.131 +/* fcntl(2) flags (l_type field of flock structure) */
46.132 +#define F_RDLCK 1 /* read lock */
46.133 +#define F_WRLCK 2 /* write lock */
46.134 +#define F_UNLCK 3 /* remove lock(s) */
46.135 +#ifndef _POSIX_SOURCE
46.136 +#define F_UNLKSYS 4 /* remove remote locks for a given system */
46.137 +#endif /* !_POSIX_SOURCE */
46.138 +
46.139 +/*#include <sys/stdtypes.h>*/
46.140 +
46.141 +/* file segment locking set data type - information passed to system by user */
46.142 +struct flock {
46.143 + short l_type; /* F_RDLCK, F_WRLCK, or F_UNLCK */
46.144 + short l_whence; /* flag to choose starting offset */
46.145 + long l_start; /* relative offset, in bytes */
46.146 + long l_len; /* length, in bytes; 0 means lock to EOF */
46.147 + short l_pid; /* returned with F_GETLK */
46.148 + short l_xxx; /* reserved for future use */
46.149 +};
46.150 +
46.151 +#ifndef _POSIX_SOURCE
46.152 +/* extended file segment locking set data type */
46.153 +struct eflock {
46.154 + short l_type; /* F_RDLCK, F_WRLCK, or F_UNLCK */
46.155 + short l_whence; /* flag to choose starting offset */
46.156 + long l_start; /* relative offset, in bytes */
46.157 + long l_len; /* length, in bytes; 0 means lock to EOF */
46.158 + short l_pid; /* returned with F_GETLK */
46.159 + short l_xxx; /* reserved for future use */
46.160 + long l_rpid; /* Remote process id wanting this lock */
46.161 + long l_rsys; /* Remote system id wanting this lock */
46.162 +};
46.163 +#endif /* !_POSIX_SOURCE */
46.164 +
46.165 +
46.166 +#include <sys/types.h>
46.167 +#include <sys/stat.h> /* sigh. for the mode bits for open/creat */
46.168 +
46.169 +extern int open _PARAMS ((const char *, int, ...));
46.170 +extern int creat _PARAMS ((const char *, mode_t));
46.171 +extern int fcntl _PARAMS ((int, int, ...));
46.172 +
46.173 +/* Provide _<systemcall> prototypes for functions provided by some versions
46.174 + of newlib. */
46.175 +extern int _open _PARAMS ((const char *, int, ...));
46.176 +extern int _fcntl _PARAMS ((int, int, ...));
46.177 +
46.178 +#ifdef __cplusplus
46.179 +}
46.180 +#endif
46.181 +#endif /* !_FCNTL_ */
47.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
47.2 +++ b/test/include/sys/file.h Tue Jul 11 01:35:27 2006 +0000
47.3 @@ -0,0 +1,2 @@
47.4 +
47.5 +#include <sys/fcntl.h>
48.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
48.2 +++ b/test/include/sys/param.h Tue Jul 11 01:35:27 2006 +0000
48.3 @@ -0,0 +1,18 @@
48.4 +/* This is a dummy <sys/param.h> file, not customized for any
48.5 + particular system. If there is a param.h in libc/sys/SYSDIR/sys,
48.6 + it will override this one. */
48.7 +
48.8 +#ifndef _SYS_PARAM_H
48.9 +# define _SYS_PARAM_H
48.10 +
48.11 +# define HZ (60)
48.12 +# define NOFILE (60)
48.13 +# define PATHSIZE (1024)
48.14 +
48.15 +#ifdef __i386__
48.16 +#define BIG_ENDIAN 4321
48.17 +#define LITTLE_ENDIAN 1234
48.18 +#define BYTE_ORDER LITTLE_ENDIAN
48.19 +#endif
48.20 +
48.21 +#endif
49.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
49.2 +++ b/test/include/sys/reent.h Tue Jul 11 01:35:27 2006 +0000
49.3 @@ -0,0 +1,238 @@
49.4 +/* This header file provides the reentrancy. */
49.5 +
49.6 +/* WARNING: All identifiers here must begin with an underscore. This file is
49.7 + included by stdio.h and others and we therefore must only use identifiers
49.8 + in the namespace allotted to us. */
49.9 +
49.10 +#ifndef _SYS_REENT_H_
49.11 +#ifdef __cplusplus
49.12 +extern "C" {
49.13 +#endif
49.14 +#define _SYS_REENT_H_
49.15 +
49.16 +#include <_ansi.h>
49.17 +#include <time.h>
49.18 +
49.19 +#ifndef __Long
49.20 +#if __LONG_MAX__ == 2147483647L
49.21 +#define __Long long
49.22 +typedef unsigned __Long __ULong;
49.23 +#elif __INT_MAX__ == 2147483647
49.24 +#define __Long int
49.25 +typedef unsigned __Long __ULong;
49.26 +#endif
49.27 +#endif
49.28 +
49.29 +#ifndef __Long
49.30 +#define __Long __int32_t
49.31 +typedef __uint32_t __ULong;
49.32 +#endif
49.33 +
49.34 +struct _glue
49.35 +{
49.36 + struct _glue *_next;
49.37 + int _niobs;
49.38 + struct __sFILE *_iobs;
49.39 +};
49.40 +
49.41 +struct _Bigint
49.42 +{
49.43 + struct _Bigint *_next;
49.44 + int _k, _maxwds, _sign, _wds;
49.45 + __ULong _x[1];
49.46 +};
49.47 +
49.48 +/*
49.49 + * atexit() support
49.50 + */
49.51 +
49.52 +#define _ATEXIT_SIZE 32 /* must be at least 32 to guarantee ANSI conformance */
49.53 +
49.54 +struct _atexit {
49.55 + struct _atexit *_next; /* next in list */
49.56 + int _ind; /* next index in this table */
49.57 + void (*_fns[_ATEXIT_SIZE])(void); /* the table itself */
49.58 +};
49.59 +
49.60 +/*
49.61 + * Stdio buffers.
49.62 + *
49.63 + * This and __sFILE are defined here because we need them for struct _reent,
49.64 + * but we don't want stdio.h included when stdlib.h is.
49.65 + */
49.66 +
49.67 +struct __sbuf {
49.68 + unsigned char *_base;
49.69 + int _size;
49.70 +};
49.71 +
49.72 +/*
49.73 + * We need fpos_t for the following, but it doesn't have a leading "_",
49.74 + * so we use _fpos_t instead.
49.75 + */
49.76 +
49.77 +typedef long _fpos_t; /* XXX must match off_t in <sys/types.h> */
49.78 + /* (and must be `long' for now) */
49.79 +
49.80 +/*
49.81 + * Stdio state variables.
49.82 + *
49.83 + * The following always hold:
49.84 + *
49.85 + * if (_flags&(__SLBF|__SWR)) == (__SLBF|__SWR),
49.86 + * _lbfsize is -_bf._size, else _lbfsize is 0
49.87 + * if _flags&__SRD, _w is 0
49.88 + * if _flags&__SWR, _r is 0
49.89 + *
49.90 + * This ensures that the getc and putc macros (or inline functions) never
49.91 + * try to write or read from a file that is in `read' or `write' mode.
49.92 + * (Moreover, they can, and do, automatically switch from read mode to
49.93 + * write mode, and back, on "r+" and "w+" files.)
49.94 + *
49.95 + * _lbfsize is used only to make the inline line-buffered output stream
49.96 + * code as compact as possible.
49.97 + *
49.98 + * _ub, _up, and _ur are used when ungetc() pushes back more characters
49.99 + * than fit in the current _bf, or when ungetc() pushes back a character
49.100 + * that does not match the previous one in _bf. When this happens,
49.101 + * _ub._base becomes non-nil (i.e., a stream has ungetc() data iff
49.102 + * _ub._base!=NULL) and _up and _ur save the current values of _p and _r.
49.103 + */
49.104 +
49.105 +struct __sFILE {
49.106 + unsigned char *_p; /* current position in (some) buffer */
49.107 + int _r; /* read space left for getc() */
49.108 + int _w; /* write space left for putc() */
49.109 + short _flags; /* flags, below; this FILE is free if 0 */
49.110 + short _file; /* fileno, if Unix descriptor, else -1 */
49.111 + struct __sbuf _bf; /* the buffer (at least 1 byte, if !NULL) */
49.112 + int _lbfsize; /* 0 or -_bf._size, for inline putc */
49.113 +
49.114 + /* operations */
49.115 + _PTR _cookie; /* cookie passed to io functions */
49.116 +
49.117 + int _EXFUN((*_read),(_PTR _cookie, char *_buf, int _n));
49.118 + int _EXFUN((*_write),(_PTR _cookie, const char *_buf, int _n));
49.119 + _fpos_t _EXFUN((*_seek),(_PTR _cookie, _fpos_t _offset, int _whence));
49.120 + int _EXFUN((*_close),(_PTR _cookie));
49.121 +
49.122 + /* separate buffer for long sequences of ungetc() */
49.123 + struct __sbuf _ub; /* ungetc buffer */
49.124 + unsigned char *_up; /* saved _p when _p is doing ungetc data */
49.125 + int _ur; /* saved _r when _r is counting ungetc data */
49.126 +
49.127 + /* tricks to meet minimum requirements even when malloc() fails */
49.128 + unsigned char _ubuf[3]; /* guarantee an ungetc() buffer */
49.129 + unsigned char _nbuf[1]; /* guarantee a getc() buffer */
49.130 +
49.131 + /* separate buffer for fgetline() when line crosses buffer boundary */
49.132 + struct __sbuf _lb; /* buffer for fgetline() */
49.133 +
49.134 + /* Unix stdio files get aligned to block boundaries on fseek() */
49.135 + int _blksize; /* stat.st_blksize (may be != _bf._size) */
49.136 + int _offset; /* current lseek offset */
49.137 +
49.138 + struct _reent *_data;
49.139 +};
49.140 +
49.141 +/*
49.142 + * struct _reent
49.143 + *
49.144 + * This structure contains *all* globals needed by the library.
49.145 + * It's raison d'etre is to facilitate threads by making all library routines
49.146 + * reentrant. IE: All state information is contained here.
49.147 + */
49.148 +
49.149 +struct _reent
49.150 +{
49.151 + /* local copy of errno */
49.152 + int _errno;
49.153 +
49.154 + /* FILE is a big struct and may change over time. To try to achieve binary
49.155 + compatibility with future versions, put stdin,stdout,stderr here.
49.156 + These are pointers into member __sf defined below. */
49.157 + struct __sFILE *_stdin, *_stdout, *_stderr;
49.158 +
49.159 + int _inc; /* used by tmpnam */
49.160 + char _emergency[25];
49.161 +
49.162 + int _current_category; /* used by setlocale */
49.163 + _CONST char *_current_locale;
49.164 +
49.165 + int __sdidinit; /* 1 means stdio has been init'd */
49.166 +
49.167 + void _EXFUN((*__cleanup),(struct _reent *));
49.168 +
49.169 + /* used by mprec routines */
49.170 + struct _Bigint *_result;
49.171 + int _result_k;
49.172 + struct _Bigint *_p5s;
49.173 + struct _Bigint **_freelist;
49.174 +
49.175 + /* used by some fp conversion routines */
49.176 + int _cvtlen; /* should be size_t */
49.177 + char *_cvtbuf;
49.178 +
49.179 + union
49.180 + {
49.181 + struct
49.182 + {
49.183 + unsigned int _rand_next;
49.184 + char * _strtok_last;
49.185 + char _asctime_buf[26];
49.186 + struct tm _localtime_buf;
49.187 + int _gamma_signgam;
49.188 + } _reent;
49.189 + /* Two next two fields were once used by malloc. They are no longer
49.190 + used. They are used to preserve the space used before so as to
49.191 + allow addition of new reent fields and keep binary compatibility. */
49.192 + struct
49.193 + {
49.194 +#define _N_LISTS 30
49.195 + unsigned char * _nextf[_N_LISTS];
49.196 + unsigned int _nmalloc[_N_LISTS];
49.197 + } _unused;
49.198 + } _new;
49.199 +
49.200 + /* atexit stuff */
49.201 + struct _atexit *_atexit; /* points to head of LIFO stack */
49.202 + struct _atexit _atexit0; /* one guaranteed table, required by ANSI */
49.203 +
49.204 + /* signal info */
49.205 + void (**(_sig_func))(int);
49.206 +
49.207 + /* These are here last so that __sFILE can grow without changing the offsets
49.208 + of the above members (on the off chance that future binary compatibility
49.209 + would be broken otherwise). */
49.210 + struct _glue __sglue; /* root of glue chain */
49.211 + struct __sFILE __sf[3]; /* first three file descriptors */
49.212 +};
49.213 +
49.214 +#define _REENT_INIT(var) \
49.215 + { 0, &var.__sf[0], &var.__sf[1], &var.__sf[2], 0, "", 0, "C", \
49.216 + 0, NULL, NULL, 0, NULL, NULL, 0, NULL, { {1, NULL, "", \
49.217 + { 0,0,0,0,0,0,0,0}, 0 } } }
49.218 +
49.219 +/*
49.220 + * All references to struct _reent are via this pointer.
49.221 + * Internally, newlib routines that need to reference it should use _REENT.
49.222 + */
49.223 +
49.224 +#ifndef __ATTRIBUTE_IMPURE_PTR__
49.225 +#define __ATTRIBUTE_IMPURE_PTR__
49.226 +#endif
49.227 +
49.228 +extern struct _reent *_impure_ptr __ATTRIBUTE_IMPURE_PTR__;
49.229 +
49.230 +void _reclaim_reent _PARAMS ((struct _reent *));
49.231 +
49.232 +/* #define _REENT_ONLY define this to get only reentrant routines */
49.233 +
49.234 +#ifndef _REENT_ONLY
49.235 +#define _REENT _impure_ptr
49.236 +#endif
49.237 +
49.238 +#ifdef __cplusplus
49.239 +}
49.240 +#endif
49.241 +#endif /* _SYS_REENT_H_ */
50.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
50.2 +++ b/test/include/sys/resource.h Tue Jul 11 01:35:27 2006 +0000
50.3 @@ -0,0 +1,15 @@
50.4 +#ifndef _SYS_RESOURCE_H_
50.5 +#define _SYS_RESOURCE_H_
50.6 +
50.7 +#include <sys/time.h>
50.8 +
50.9 +#define RUSAGE_SELF 0 /* calling process */
50.10 +#define RUSAGE_CHILDREN -1 /* terminated child processes */
50.11 +
50.12 +struct rusage {
50.13 + struct timeval ru_utime; /* user time used */
50.14 + struct timeval ru_stime; /* system time used */
50.15 +};
50.16 +
50.17 +#endif
50.18 +
51.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
51.2 +++ b/test/include/sys/signal.h Tue Jul 11 01:35:27 2006 +0000
51.3 @@ -0,0 +1,182 @@
51.4 +/* sys/signal.h */
51.5 +
51.6 +#ifndef _SYS_SIGNAL_H
51.7 +#define _SYS_SIGNAL_H
51.8 +
51.9 +#ifdef __cplusplus
51.10 +extern "C" {
51.11 +#endif
51.12 +
51.13 +#include "_ansi.h"
51.14 +
51.15 +#ifndef __STRICT_ANSI__
51.16 +typedef unsigned long sigset_t;
51.17 +struct sigaction
51.18 +{
51.19 + void (*sa_handler)(int);
51.20 + sigset_t sa_mask;
51.21 + int sa_flags;
51.22 +};
51.23 +#define SA_NOCLDSTOP 1 /* only value supported now for sa_flags */
51.24 +#define SIG_SETMASK 0 /* set mask with sigprocmask() */
51.25 +#define SIG_BLOCK 1 /* set of signals to block */
51.26 +#define SIG_UNBLOCK 2 /* set of signals to, well, unblock */
51.27 +
51.28 +/* These depend upon the type of sigset_t, which right now
51.29 + is always a long.. They're in the POSIX namespace, but
51.30 + are not ANSI. */
51.31 +#define sigaddset(what,sig) (*(what) |= (1<<(sig)))
51.32 +#define sigemptyset(what) (*(what) = 0)
51.33 +
51.34 +int sigprocmask (int __how, const sigset_t *__a, sigset_t *__b);
51.35 +
51.36 +/* protos for functions found in winsup sources */
51.37 +#if defined(__CYGWIN32__)
51.38 +#undef sigaddset
51.39 +#undef sigemptyset
51.40 +/* The first argument to kill should be pid_t. Right now
51.41 + <sys/types.h> always defines pid_t to be int. If that ever
51.42 + changes, then we will need to do something else, perhaps along the
51.43 + lines of <machine/types.h>. */
51.44 +int _EXFUN(kill, (int, int));
51.45 +int _EXFUN(sigaction, (int, const struct sigaction *, struct sigaction *));
51.46 +int _EXFUN(sigaddset, (sigset_t *, const int));
51.47 +int _EXFUN(sigdelset, (sigset_t *, const int));
51.48 +int _EXFUN(sigismember, (const sigset_t *, int));
51.49 +int _EXFUN(sigfillset, (sigset_t *));
51.50 +int _EXFUN(sigemptyset, (sigset_t *));
51.51 +int _EXFUN(sigpending, (sigset_t *));
51.52 +int _EXFUN(sigsuspend, (const sigset_t *));
51.53 +int _EXFUN(sigpause, (int));
51.54 +#endif
51.55 +
51.56 +#endif /* __STRICT_ANSI__ */
51.57 +
51.58 +#if defined(___AM29K__)
51.59 +/* These all need to be defined for ANSI C, but I don't think they are
51.60 + meaningful. */
51.61 +#define SIGABRT 1
51.62 +#define SIGFPE 1
51.63 +#define SIGILL 1
51.64 +#define SIGINT 1
51.65 +#define SIGSEGV 1
51.66 +#define SIGTERM 1
51.67 +/* These need to be defined for POSIX, and some others do too. */
51.68 +#define SIGHUP 1
51.69 +#define SIGQUIT 1
51.70 +#define NSIG 2
51.71 +#elif defined(__GO32__)
51.72 +#define SIGINT 1
51.73 +#define SIGKILL 2
51.74 +#define SIGPIPE 3
51.75 +#define SIGFPE 4
51.76 +#define SIGHUP 5
51.77 +#define SIGTERM 6
51.78 +#define SIGSEGV 7
51.79 +#define SIGTSTP 8
51.80 +#define SIGQUIT 9
51.81 +#define SIGTRAP 10
51.82 +#define SIGILL 11
51.83 +#define SIGEMT 12
51.84 +#define SIGALRM 13
51.85 +#define SIGBUS 14
51.86 +#define SIGLOST 15
51.87 +#define SIGSTOP 16
51.88 +#define SIGABRT 17
51.89 +#define SIGUSR1 18
51.90 +#define SIGUSR2 19
51.91 +#define NSIG 20
51.92 +#elif defined(__CYGWIN32__) /* BSD signals symantics */
51.93 +#define SIGHUP 1 /* hangup */
51.94 +#define SIGINT 2 /* interrupt */
51.95 +#define SIGQUIT 3 /* quit */
51.96 +#define SIGILL 4 /* illegal instruction (not reset when caught) */
51.97 +#define SIGTRAP 5 /* trace trap (not reset when caught) */
51.98 +#define SIGABRT 6 /* used by abort */
51.99 +#define SIGEMT 7 /* EMT instruction */
51.100 +#define SIGFPE 8 /* floating point exception */
51.101 +#define SIGKILL 9 /* kill (cannot be caught or ignored) */
51.102 +#define SIGBUS 10 /* bus error */
51.103 +#define SIGSEGV 11 /* segmentation violation */
51.104 +#define SIGSYS 12 /* bad argument to system call */
51.105 +#define SIGPIPE 13 /* write on a pipe with no one to read it */
51.106 +#define SIGALRM 14 /* alarm clock */
51.107 +#define SIGTERM 15 /* software termination signal from kill */
51.108 +#define SIGURG 16 /* urgent condition on IO channel */
51.109 +#define SIGSTOP 17 /* sendable stop signal not from tty */
51.110 +#define SIGTSTP 18 /* stop signal from tty */
51.111 +#define SIGCONT 19 /* continue a stopped process */
51.112 +#define SIGCHLD 20 /* to parent on child stop or exit */
51.113 +#define SIGCLD 20 /* System V name for SIGCHLD */
51.114 +#define SIGTTIN 21 /* to readers pgrp upon background tty read */
51.115 +#define SIGTTOU 22 /* like TTIN for output if (tp->t_local&LTOSTOP) */
51.116 +#define SIGIO 23 /* input/output possible signal */
51.117 +#define SIGPOLL SIGIO /* System V name for SIGIO */
51.118 +#define SIGXCPU 24 /* exceeded CPU time limit */
51.119 +#define SIGXFSZ 25 /* exceeded file size limit */
51.120 +#define SIGVTALRM 26 /* virtual time alarm */
51.121 +#define SIGPROF 27 /* profiling time alarm */
51.122 +#define SIGWINCH 28 /* window changed */
51.123 +#define SIGLOST 29 /* resource lost (eg, record-lock lost) */
51.124 +#define SIGUSR1 30 /* user defined signal 1 */
51.125 +#define SIGUSR2 31 /* user defined signal 2 */
51.126 +#define NSIG 32 /* signal 0 implied */
51.127 +#else
51.128 +#define SIGHUP 1 /* hangup */
51.129 +#define SIGINT 2 /* interrupt */
51.130 +#define SIGQUIT 3 /* quit */
51.131 +#define SIGILL 4 /* illegal instruction (not reset when caught) */
51.132 +#define SIGTRAP 5 /* trace trap (not reset when caught) */
51.133 +#define SIGIOT 6 /* IOT instruction */
51.134 +#define SIGABRT 6 /* used by abort, replace SIGIOT in the future */
51.135 +#define SIGEMT 7 /* EMT instruction */
51.136 +#define SIGFPE 8 /* floating point exception */
51.137 +#define SIGKILL 9 /* kill (cannot be caught or ignored) */
51.138 +#define SIGBUS 10 /* bus error */
51.139 +#define SIGSEGV 11 /* segmentation violation */
51.140 +#define SIGSYS 12 /* bad argument to system call */
51.141 +#define SIGPIPE 13 /* write on a pipe with no one to read it */
51.142 +#define SIGALRM 14 /* alarm clock */
51.143 +#define SIGTERM 15 /* software termination signal from kill */
51.144 +
51.145 +#if defined(__svr4__)
51.146 +/* svr4 specifics. different signals above 15, and sigaction. */
51.147 +#define SIGUSR1 16
51.148 +#define SIGUSR2 17
51.149 +#define SIGCLD 18
51.150 +#define SIGPWR 19
51.151 +#define SIGWINCH 20
51.152 +#define SIGPOLL 22 /* 20 for x.out binaries!!!! */
51.153 +#define SIGSTOP 23 /* sendable stop signal not from tty */
51.154 +#define SIGTSTP 24 /* stop signal from tty */
51.155 +#define SIGCONT 25 /* continue a stopped process */
51.156 +#define SIGTTIN 26 /* to readers pgrp upon background tty read */
51.157 +#define SIGTTOU 27 /* like TTIN for output if (tp->t_local&LTOSTOP) */
51.158 +#define NSIG 28
51.159 +#else
51.160 +#define SIGURG 16 /* urgent condition on IO channel */
51.161 +#define SIGSTOP 17 /* sendable stop signal not from tty */
51.162 +#define SIGTSTP 18 /* stop signal from tty */
51.163 +#define SIGCONT 19 /* continue a stopped process */
51.164 +#define SIGCHLD 20 /* to parent on child stop or exit */
51.165 +#define SIGCLD 20 /* System V name for SIGCHLD */
51.166 +#define SIGTTIN 21 /* to readers pgrp upon background tty read */
51.167 +#define SIGTTOU 22 /* like TTIN for output if (tp->t_local&LTOSTOP) */
51.168 +#define SIGIO 23 /* input/output possible signal */
51.169 +#define SIGPOLL SIGIO /* System V name for SIGIO */
51.170 +#define SIGXCPU 24 /* exceeded CPU time limit */
51.171 +#define SIGXFSZ 25 /* exceeded file size limit */
51.172 +#define SIGVTALRM 26 /* virtual time alarm */
51.173 +#define SIGPROF 27 /* profiling time alarm */
51.174 +#define SIGWINCH 28 /* window changed */
51.175 +#define SIGLOST 29 /* resource lost (eg, record-lock lost) */
51.176 +#define SIGUSR1 30 /* user defined signal 1 */
51.177 +#define SIGUSR2 31 /* user defined signal 2 */
51.178 +#define NSIG 32 /* signal 0 implied */
51.179 +#endif
51.180 +#endif
51.181 +
51.182 +#ifdef __cplusplus
51.183 +}
51.184 +#endif
51.185 +#endif /* _SYS_SIGNAL_H */
52.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
52.2 +++ b/test/include/sys/stat-dj.h Tue Jul 11 01:35:27 2006 +0000
52.3 @@ -0,0 +1,59 @@
52.4 +/* This is file STAT.H */
52.5 +/*
52.6 +** Copyright (C) 1991 DJ Delorie, 24 Kirsten Ave, Rochester NH 03867-2954
52.7 +**
52.8 +** This file is distributed under the terms listed in the document
52.9 +** "copying.dj", available from DJ Delorie at the address above.
52.10 +** A copy of "copying.dj" should accompany this file; if not, a copy
52.11 +** should be available from where this file was obtained. This file
52.12 +** may not be distributed without a verbatim copy of "copying.dj".
52.13 +**
52.14 +** This file is distributed WITHOUT ANY WARRANTY; without even the implied
52.15 +** warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
52.16 +*/
52.17 +
52.18 +#ifndef _STAT_H_
52.19 +#define _STAT_H_
52.20 +
52.21 +struct stat {
52.22 + short st_dev;
52.23 + short st_ino;
52.24 + unsigned short st_mode;
52.25 + short st_nlink;
52.26 + short st_uid;
52.27 + short st_gid;
52.28 + short st_rdev;
52.29 + short st_align_for_word32;
52.30 + long st_size;
52.31 + long st_atime;
52.32 + long st_mtime;
52.33 + long st_ctime;
52.34 + long st_blksize;
52.35 +};
52.36 +
52.37 +#define S_IFMT 0xF000 /* file type mask */
52.38 +#define S_IFDIR 0x4000 /* directory */
52.39 +#define S_IFIFO 0x1000 /* FIFO special */
52.40 +#define S_IFCHR 0x2000 /* character special */
52.41 +#define S_IFBLK 0x3000 /* block special */
52.42 +#define S_IFREG 0x8000 /* or just 0x0000, regular */
52.43 +#define S_IREAD 0x0100 /* owner may read */
52.44 +#define S_IWRITE 0x0080 /* owner may write */
52.45 +#define S_IEXEC 0x0040 /* owner may execute <directory search> */
52.46 +
52.47 +#define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)
52.48 +#define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
52.49 +#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
52.50 +#define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
52.51 +#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
52.52 +
52.53 +#ifdef __cplusplus
52.54 +extern "C" {
52.55 +#endif
52.56 +int stat(const char *, struct stat *);
52.57 +int fstat(int, struct stat *);
52.58 +#ifdef __cplusplus
52.59 +}
52.60 +#endif
52.61 +
52.62 +#endif
53.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
53.2 +++ b/test/include/sys/stat.h Tue Jul 11 01:35:27 2006 +0000
53.3 @@ -0,0 +1,149 @@
53.4 +#ifndef _SYS_STAT_H
53.5 +#define _SYS_STAT_H
53.6 +
53.7 +#ifdef __cplusplus
53.8 +extern "C" {
53.9 +#endif
53.10 +
53.11 +#include <_ansi.h>
53.12 +#include <time.h>
53.13 +#include <sys/types.h>
53.14 +
53.15 +#ifdef __i386__
53.16 +#ifdef __MSDOS__
53.17 +#include "stat-dj.h"
53.18 +#endif
53.19 +#endif
53.20 +
53.21 +/* dj's stat defines _STAT_H_ */
53.22 +#ifndef _STAT_H_
53.23 +
53.24 +/* It is intended that the layout of this structure not change when the
53.25 + sizes of any of the basic types change (short, int, long) [via a compile
53.26 + time option]. */
53.27 +
53.28 +struct stat
53.29 +{
53.30 + dev_t st_dev;
53.31 + ino_t st_ino;
53.32 + mode_t st_mode;
53.33 + nlink_t st_nlink;
53.34 + uid_t st_uid;
53.35 + gid_t st_gid;
53.36 + dev_t st_rdev;
53.37 + off_t st_size;
53.38 + /* SysV/sco doesn't have the rest... But Solaris, eabi does. */
53.39 +#if defined(__svr4__) && !defined(__PPC__) && !defined(__sun__)
53.40 + time_t st_atime;
53.41 + time_t st_mtime;
53.42 + time_t st_ctime;
53.43 +#else
53.44 + time_t st_atime;
53.45 + long st_spare1;
53.46 + time_t st_mtime;
53.47 + long st_spare2;
53.48 + time_t st_ctime;
53.49 + long st_spare3;
53.50 + long st_blksize;
53.51 + long st_blocks;
53.52 + long st_spare4[2];
53.53 +#endif
53.54 +};
53.55 +
53.56 +#define _IFMT 0170000 /* type of file */
53.57 +#define _IFDIR 0040000 /* directory */
53.58 +#define _IFCHR 0020000 /* character special */
53.59 +#define _IFBLK 0060000 /* block special */
53.60 +#define _IFREG 0100000 /* regular */
53.61 +#define _IFLNK 0120000 /* symbolic link */
53.62 +#define _IFSOCK 0140000 /* socket */
53.63 +#define _IFIFO 0010000 /* fifo */
53.64 +
53.65 +#define S_BLKSIZE 1024 /* size of a block */
53.66 +
53.67 +#define S_ISUID 0004000 /* set user id on execution */
53.68 +#define S_ISGID 0002000 /* set group id on execution */
53.69 +#ifndef _POSIX_SOURCE
53.70 +#define S_ISVTX 0001000 /* save swapped text even after use */
53.71 +#define S_IREAD 0000400 /* read permission, owner */
53.72 +#define S_IWRITE 0000200 /* write permission, owner */
53.73 +#define S_IEXEC 0000100 /* execute/search permission, owner */
53.74 +
53.75 +#define S_ENFMT 0002000 /* enforcement-mode locking */
53.76 +
53.77 +#define S_IFMT _IFMT
53.78 +#define S_IFDIR _IFDIR
53.79 +#define S_IFCHR _IFCHR
53.80 +#define S_IFBLK _IFBLK
53.81 +#define S_IFREG _IFREG
53.82 +#define S_IFLNK _IFLNK
53.83 +#define S_IFSOCK _IFSOCK
53.84 +#define S_IFIFO _IFIFO
53.85 +#endif /* !_POSIX_SOURCE */
53.86 +
53.87 +#ifdef _WIN32
53.88 +/* The Windows header files define _S_ forms of these, so we do too
53.89 + for easier portability. */
53.90 +#define _S_IFMT _IFMT
53.91 +#define _S_IFDIR _IFDIR
53.92 +#define _S_IFCHR _IFCHR
53.93 +#define _S_IFIFO _IFIFO
53.94 +#define _S_IFREG _IFREG
53.95 +#define _S_IREAD 0000400
53.96 +#define _S_IWRITE 0000200
53.97 +#define _S_IEXEC 0000100
53.98 +#endif
53.99 +
53.100 +#define S_IRWXU 0000700 /* rwx, owner */
53.101 +#define S_IRUSR 0000400 /* read permission, owner */
53.102 +#define S_IWUSR 0000200 /* write permission, owner */
53.103 +#define S_IXUSR 0000100 /* execute/search permission, owner */
53.104 +#define S_IRWXG 0000070 /* rwx, group */
53.105 +#define S_IRGRP 0000040 /* read permission, group */
53.106 +#define S_IWGRP 0000020 /* write permission, grougroup */
53.107 +#define S_IXGRP 0000010 /* execute/search permission, group */
53.108 +#define S_IRWXO 0000007 /* rwx, other */
53.109 +#define S_IROTH 0000004 /* read permission, other */
53.110 +#define S_IWOTH 0000002 /* write permission, other */
53.111 +#define S_IXOTH 0000001 /* execute/search permission, other */
53.112 +
53.113 +#define S_ISBLK(m) (((m)&_IFMT) == _IFBLK)
53.114 +#define S_ISCHR(m) (((m)&_IFMT) == _IFCHR)
53.115 +#define S_ISDIR(m) (((m)&_IFMT) == _IFDIR)
53.116 +#define S_ISFIFO(m) (((m)&_IFMT) == _IFIFO)
53.117 +#define S_ISREG(m) (((m)&_IFMT) == _IFREG)
53.118 +#define S_ISLNK(m) (((m)&_IFMT) == _IFLNK)
53.119 +#define S_ISSOCK(m) (((m)&_IFMT) == _IFSOCK)
53.120 +
53.121 +
53.122 +int _EXFUN(chmod,( const char *__path, mode_t __mode ));
53.123 +int _EXFUN(fchmod,(int __fd, mode_t __mode));
53.124 +int _EXFUN(fstat,( int __fd, struct stat *__sbuf ));
53.125 +int _EXFUN(mkdir,( const char *_path, mode_t __mode ));
53.126 +int _EXFUN(mkfifo,( const char *__path, mode_t __mode ));
53.127 +int _EXFUN(stat,( const char *__path, struct stat *__sbuf ));
53.128 +mode_t _EXFUN(umask,( mode_t __mask ));
53.129 +
53.130 +#if defined(__rtems__)
53.131 +int _EXFUN(mknod,( const char *_path, mode_t _mode, dev_t dev ));
53.132 +#endif
53.133 +
53.134 +/* Provide prototypes for most of the _<systemcall> names that are
53.135 + provided in newlib for some compilers. */
53.136 +int _EXFUN(_fstat,( int __fd, struct stat *__sbuf ));
53.137 +int _EXFUN(_stat,( const char *__path, struct stat *__sbuf ));
53.138 +
53.139 +#ifdef __CYGWIN32__
53.140 +int _EXFUN(lstat,( const char *__path, struct stat *__buf ));
53.141 +#endif
53.142 +
53.143 +#if defined(__rtems__)
53.144 +int _EXFUN(mknod,( const char *_path, mode_t _mode, dev_t dev ));
53.145 +int _EXFUN(lstat,( const char *_path, struct stat *_sbuf ));
53.146 +#endif
53.147 +
53.148 +#endif /* !_STAT_H_ */
53.149 +#ifdef __cplusplus
53.150 +}
53.151 +#endif
53.152 +#endif /* _SYS_STAT_H */
54.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
54.2 +++ b/test/include/sys/time.h Tue Jul 11 01:35:27 2006 +0000
54.3 @@ -0,0 +1,51 @@
54.4 +/* time.h -- An implementation of the standard Unix <sys/time.h> file.
54.5 + Written by Geoffrey Noer <noer@cygnus.com>
54.6 + Public domain; no rights reserved. */
54.7 +
54.8 +#ifndef _SYS_TIME_H_
54.9 +#define _SYS_TIME_H_
54.10 +
54.11 +#include <_ansi.h>
54.12 +#include <sys/types.h>
54.13 +
54.14 +#ifdef __cplusplus
54.15 +extern "C" {
54.16 +#endif
54.17 +
54.18 +#ifndef _WINSOCK_H
54.19 +struct timeval {
54.20 + long tv_sec;
54.21 + long tv_usec;
54.22 +};
54.23 +
54.24 +struct timezone {
54.25 + int tz_minuteswest;
54.26 + int tz_dsttime;
54.27 +};
54.28 +
54.29 +#ifdef __CYGWIN32__
54.30 +#include <sys/select.h>
54.31 +#endif /* __CYGWIN32__ */
54.32 +
54.33 +#endif /* _WINSOCK_H */
54.34 +
54.35 +#define ITIMER_REAL 0
54.36 +#define ITIMER_VIRTUAL 1
54.37 +#define ITIMER_PROF 2
54.38 +
54.39 +struct itimerval {
54.40 + struct timeval it_interval;
54.41 + struct timeval it_value;
54.42 +};
54.43 +
54.44 +int _EXFUN(gettimeofday, (struct timeval *__p, struct timezone *__z));
54.45 +int _EXFUN(settimeofday, (const struct timeval *, const struct timezone *));
54.46 +int _EXFUN(utimes, (const char *__path, struct timeval *__tvp));
54.47 +int _EXFUN(getitimer, (int __which, struct itimerval *__value));
54.48 +int _EXFUN(setitimer, (int __which, const struct itimerval *__value,
54.49 + struct itimerval *__ovalue));
54.50 +
54.51 +#ifdef __cplusplus
54.52 +}
54.53 +#endif
54.54 +#endif /* _SYS_TIME_H_ */
55.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
55.2 +++ b/test/include/sys/timeb.h Tue Jul 11 01:35:27 2006 +0000
55.3 @@ -0,0 +1,39 @@
55.4 +/* timeb.h -- An implementation of the standard Unix <sys/timeb.h> file.
55.5 + Written by Ian Lance Taylor <ian@cygnus.com>
55.6 + Public domain; no rights reserved.
55.7 +
55.8 + <sys/timeb.h> declares the structure used by the ftime function, as
55.9 + well as the ftime function itself. Newlib does not provide an
55.10 + implementation of ftime. */
55.11 +
55.12 +#ifndef _SYS_TIMEB_H
55.13 +
55.14 +#ifdef __cplusplus
55.15 +extern "C" {
55.16 +#endif
55.17 +
55.18 +#define _SYS_TIMEB_H
55.19 +
55.20 +#include <_ansi.h>
55.21 +#include <machine/types.h>
55.22 +
55.23 +#ifndef __time_t_defined
55.24 +typedef _TIME_T_ time_t;
55.25 +#define __time_t_defined
55.26 +#endif
55.27 +
55.28 +struct timeb
55.29 +{
55.30 + time_t time;
55.31 + unsigned short millitm;
55.32 + short timezone;
55.33 + short dstflag;
55.34 +};
55.35 +
55.36 +extern int ftime _PARAMS ((struct timeb *));
55.37 +
55.38 +#ifdef __cplusplus
55.39 +}
55.40 +#endif
55.41 +
55.42 +#endif /* ! defined (_SYS_TIMEB_H) */
56.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
56.2 +++ b/test/include/sys/times.h Tue Jul 11 01:35:27 2006 +0000
56.3 @@ -0,0 +1,27 @@
56.4 +#ifndef _SYS_TIMES_H
56.5 +#ifdef __cplusplus
56.6 +extern "C" {
56.7 +#endif
56.8 +#define _SYS_TIMES_H
56.9 +
56.10 +#include <_ansi.h>
56.11 +#include <machine/types.h>
56.12 +
56.13 +#ifndef __clock_t_defined
56.14 +typedef _CLOCK_T_ clock_t;
56.15 +#define __clock_t_defined
56.16 +#endif
56.17 +
56.18 +struct tms {
56.19 + clock_t tms_utime; /* user time */
56.20 + clock_t tms_stime; /* system time */
56.21 + clock_t tms_cutime; /* user time, children */
56.22 + clock_t tms_cstime; /* system time, children */
56.23 +};
56.24 +
56.25 +clock_t _EXFUN(times,(struct tms *));
56.26 +
56.27 +#ifdef __cplusplus
56.28 +}
56.29 +#endif
56.30 +#endif /* !_SYS_TIMES_H */
57.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
57.2 +++ b/test/include/sys/types.h Tue Jul 11 01:35:27 2006 +0000
57.3 @@ -0,0 +1,174 @@
57.4 +/* unified sys/types.h:
57.5 + start with sef's sysvi386 version.
57.6 + merge go32 version -- a few ifdefs.
57.7 + h8300hms, h8300xray, and sysvnecv70 disagree on the following types:
57.8 +
57.9 + typedef int gid_t;
57.10 + typedef int uid_t;
57.11 + typedef int dev_t;
57.12 + typedef int ino_t;
57.13 + typedef int mode_t;
57.14 + typedef int caddr_t;
57.15 +
57.16 + however, these aren't "reasonable" values, the sysvi386 ones make far
57.17 + more sense, and should work sufficiently well (in particular, h8300
57.18 + doesn't have a stat, and the necv70 doesn't matter.) -- eichin
57.19 + */
57.20 +
57.21 +#ifndef _SYS_TYPES_H
57.22 +#define _SYS_TYPES_H
57.23 +
57.24 +#if defined (_WIN32) || defined (__CYGWIN__)
57.25 +#define __MS_types__
57.26 +#endif
57.27 +
57.28 +#ifdef __i386__
57.29 +#if defined (GO32) || defined (__MSDOS__)
57.30 +#define __MS_types__
57.31 +#endif
57.32 +#endif
57.33 +
57.34 +# include <stddef.h>
57.35 +# include <machine/types.h>
57.36 +
57.37 +/* To ensure the stat struct's layout doesn't change when sizeof(int), etc.
57.38 + changes, we assume sizeof short and long never change and have all types
57.39 + used to define struct stat use them and not int where possible.
57.40 + Where not possible, _ST_INTxx are used. It would be preferable to not have
57.41 + such assumptions, but until the extra fluff is necessary, it's avoided.
57.42 + No 64 bit targets use stat yet. What to do about them is postponed
57.43 + until necessary. */
57.44 +#ifdef __GNUC__
57.45 +#define _ST_INT32 __attribute__ ((__mode__ (__SI__)))
57.46 +#else
57.47 +#define _ST_INT32
57.48 +#endif
57.49 +
57.50 +# ifndef _POSIX_SOURCE
57.51 +
57.52 +# define physadr physadr_t
57.53 +# define quad quad_t
57.54 +
57.55 +#ifndef _WINSOCK_H
57.56 +typedef unsigned char u_char;
57.57 +typedef unsigned short u_short;
57.58 +typedef unsigned int u_int;
57.59 +typedef unsigned long u_long;
57.60 +#endif
57.61 +
57.62 +typedef unsigned short ushort; /* System V compatibility */
57.63 +typedef unsigned int uint; /* System V compatibility */
57.64 +# endif /*!_POSIX_SOURCE */
57.65 +
57.66 +#ifndef __time_t_defined
57.67 +typedef _TIME_T_ time_t;
57.68 +#define __time_t_defined
57.69 +#endif
57.70 +
57.71 +typedef long daddr_t;
57.72 +typedef char * caddr_t;
57.73 +
57.74 +#ifdef __MS_types__
57.75 +typedef unsigned long ino_t;
57.76 +#else
57.77 +#ifdef __sparc__
57.78 +typedef unsigned long ino_t;
57.79 +#else
57.80 +typedef unsigned short ino_t;
57.81 +#endif
57.82 +#endif
57.83 +
57.84 +#ifdef __MS_types__
57.85 +typedef unsigned long vm_offset_t;
57.86 +typedef unsigned long vm_size_t;
57.87 +
57.88 +#define __BIT_TYPES_DEFINED__
57.89 +
57.90 +typedef char int8_t;
57.91 +typedef unsigned char u_int8_t;
57.92 +typedef short int16_t;
57.93 +typedef unsigned short u_int16_t;
57.94 +typedef int int32_t;
57.95 +typedef unsigned int u_int32_t;
57.96 +typedef long long int64_t;
57.97 +typedef unsigned long long u_int64_t;
57.98 +typedef int32_t register_t;
57.99 +#endif /* __MS_types__ */
57.100 +
57.101 +/*
57.102 + * All these should be machine specific - right now they are all broken.
57.103 + * However, for all of Cygnus' embedded targets, we want them to all be
57.104 + * the same. Otherwise things like sizeof (struct stat) might depend on
57.105 + * how the file was compiled (e.g. -mint16 vs -mint32, etc.).
57.106 + */
57.107 +
57.108 +typedef short dev_t;
57.109 +
57.110 +typedef long off_t;
57.111 +
57.112 +typedef unsigned short uid_t;
57.113 +typedef unsigned short gid_t;
57.114 +typedef int pid_t;
57.115 +typedef long key_t;
57.116 +typedef long ssize_t;
57.117 +
57.118 +#ifdef __MS_types__
57.119 +typedef char * addr_t;
57.120 +typedef int mode_t;
57.121 +#else
57.122 +#if defined (__sparc__) && !defined (__sparc_v9__)
57.123 +#ifdef __svr4__
57.124 +typedef unsigned long mode_t;
57.125 +#else
57.126 +typedef unsigned short mode_t;
57.127 +#endif
57.128 +#else
57.129 +typedef unsigned int mode_t _ST_INT32;
57.130 +#endif
57.131 +#endif /* ! __MS_types__ */
57.132 +
57.133 +typedef unsigned short nlink_t;
57.134 +
57.135 +/* We don't define fd_set and friends if we are compiling POSIX
57.136 + source, or if we have included the Windows Sockets.h header (which
57.137 + defines Windows versions of them). Note that a program which
57.138 + includes the Windows sockets.h header must know what it is doing;
57.139 + it must not call the cygwin32 select function. */
57.140 +# if ! defined (_POSIX_SOURCE) && ! defined (_WINSOCK_H)
57.141 +
57.142 +# define NBBY 8 /* number of bits in a byte */
57.143 +/*
57.144 + * Select uses bit masks of file descriptors in longs.
57.145 + * These macros manipulate such bit fields (the filesystem macros use chars).
57.146 + * FD_SETSIZE may be defined by the user, but the default here
57.147 + * should be >= NOFILE (param.h).
57.148 + */
57.149 +# ifndef FD_SETSIZE
57.150 +# define FD_SETSIZE 64
57.151 +# endif
57.152 +
57.153 +typedef long fd_mask;
57.154 +# define NFDBITS (sizeof (fd_mask) * NBBY) /* bits per mask */
57.155 +# ifndef howmany
57.156 +# define howmany(x,y) (((x)+((y)-1))/(y))
57.157 +# endif
57.158 +
57.159 +/* We use a macro for fd_set so that including Sockets.h afterwards
57.160 + can work. */
57.161 +typedef struct _types_fd_set {
57.162 + fd_mask fds_bits[howmany(FD_SETSIZE, NFDBITS)];
57.163 +} _types_fd_set;
57.164 +
57.165 +#define fd_set _types_fd_set
57.166 +
57.167 +# define FD_SET(n, p) ((p)->fds_bits[(n)/NFDBITS] |= (1L << ((n) % NFDBITS)))
57.168 +# define FD_CLR(n, p) ((p)->fds_bits[(n)/NFDBITS] &= ~(1L << ((n) % NFDBITS)))
57.169 +# define FD_ISSET(n, p) ((p)->fds_bits[(n)/NFDBITS] & (1L << ((n) % NFDBITS)))
57.170 +# define FD_ZERO(p) bzero((caddr_t)(p), sizeof (*(p)))
57.171 +
57.172 +# endif /* ! defined (_POSIX_SOURCE) && ! defined (_WINSOCK_H) */
57.173 +
57.174 +#undef __MS_types__
57.175 +#undef _ST_INT32
57.176 +
57.177 +#endif /* _SYS_TYPES_H */
58.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
58.2 +++ b/test/include/sys/unistd.h Tue Jul 11 01:35:27 2006 +0000
58.3 @@ -0,0 +1,175 @@
58.4 +#ifndef _SYS_UNISTD_H
58.5 +#define _SYS_UNISTD_H
58.6 +
58.7 +#ifdef __cplusplus
58.8 +extern "C" {
58.9 +#endif
58.10 +
58.11 +#include <_ansi.h>
58.12 +#include <sys/types.h>
58.13 +#define __need_size_t
58.14 +#include <stddef.h>
58.15 +
58.16 +extern char **environ;
58.17 +
58.18 +void _EXFUN(_exit, (int __status ) _ATTRIBUTE ((noreturn)));
58.19 +
58.20 +int _EXFUN(access,(const char *__path, int __amode ));
58.21 +unsigned _EXFUN(alarm, (unsigned __secs ));
58.22 +int _EXFUN(chdir, (const char *__path ));
58.23 +int _EXFUN(chmod, (const char *__path, mode_t __mode ));
58.24 +int _EXFUN(chown, (const char *__path, uid_t __owner, gid_t __group ));
58.25 +int _EXFUN(close, (int __fildes ));
58.26 +char _EXFUN(*ctermid, (char *__s ));
58.27 +char _EXFUN(*cuserid, (char *__s ));
58.28 +int _EXFUN(dup, (int __fildes ));
58.29 +int _EXFUN(dup2, (int __fildes, int __fildes2 ));
58.30 +int _EXFUN(execl, (const char *__path, const char *, ... ));
58.31 +int _EXFUN(execle, (const char *__path, const char *, ... ));
58.32 +int _EXFUN(execlp, (const char *__file, const char *, ... ));
58.33 +int _EXFUN(execv, (const char *__path, char * const __argv[] ));
58.34 +int _EXFUN(execve, (const char *__path, char * const __argv[], char * const __envp[] ));
58.35 +int _EXFUN(execvp, (const char *__file, char * const __argv[] ));
58.36 +pid_t _EXFUN(fork, (void ));
58.37 +long _EXFUN(fpathconf, (int __fd, int __name ));
58.38 +int _EXFUN(fsync, (int __fd));
58.39 +char _EXFUN(*getcwd, (char *__buf, size_t __size ));
58.40 +gid_t _EXFUN(getegid, (void ));
58.41 +uid_t _EXFUN(geteuid, (void ));
58.42 +gid_t _EXFUN(getgid, (void ));
58.43 +int _EXFUN(getgroups, (int __gidsetsize, gid_t __grouplist[] ));
58.44 +char _EXFUN(*getlogin, (void ));
58.45 +char _EXFUN(*getpass, (__const char *__prompt));
58.46 +size_t _EXFUN(getpagesize, (void));
58.47 +pid_t _EXFUN(getpgrp, (void ));
58.48 +pid_t _EXFUN(getpid, (void ));
58.49 +pid_t _EXFUN(getppid, (void ));
58.50 +uid_t _EXFUN(getuid, (void ));
58.51 +int _EXFUN(isatty, (int __fildes ));
58.52 +int _EXFUN(link, (const char *__path1, const char *__path2 ));
58.53 +int _EXFUN(nice, (int __nice_value ));
58.54 +off_t _EXFUN(lseek, (int __fildes, off_t __offset, int __whence ));
58.55 +long _EXFUN(pathconf, (const char *__path, int __name ));
58.56 +int _EXFUN(pause, (void ));
58.57 +int _EXFUN(pipe, (int __fildes[2] ));
58.58 +int _EXFUN(read, (int __fildes, void *__buf, size_t __nbyte ));
58.59 +int _EXFUN(rmdir, (const char *__path ));
58.60 +void * _EXFUN(sbrk, (size_t __incr));
58.61 +int _EXFUN(setgid, (gid_t __gid ));
58.62 +int _EXFUN(setpgid, (pid_t __pid, pid_t __pgid ));
58.63 +pid_t _EXFUN(setsid, (void ));
58.64 +int _EXFUN(setuid, (uid_t __uid ));
58.65 +unsigned _EXFUN(sleep, (unsigned int __seconds ));
58.66 +void _EXFUN(swab, (const void *, void *, ssize_t));
58.67 +long _EXFUN(sysconf, (int __name ));
58.68 +pid_t _EXFUN(tcgetpgrp, (int __fildes ));
58.69 +int _EXFUN(tcsetpgrp, (int __fildes, pid_t __pgrp_id ));
58.70 +char _EXFUN(*ttyname, (int __fildes ));
58.71 +int _EXFUN(unlink, (const char *__path ));
58.72 +int _EXFUN(write, (int __fildes, const void *__buf, size_t __nbyte ));
58.73 +
58.74 +/* Provide prototypes for most of the _<systemcall> names that are
58.75 + provided in newlib for some compilers. */
58.76 +int _EXFUN(_close, (int __fildes ));
58.77 +pid_t _EXFUN(_fork, (void ));
58.78 +pid_t _EXFUN(_getpid, (void ));
58.79 +int _EXFUN(_link, (const char *__path1, const char *__path2 ));
58.80 +off_t _EXFUN(_lseek, (int __fildes, off_t __offset, int __whence ));
58.81 +int _EXFUN(_read, (int __fildes, void *__buf, size_t __nbyte ));
58.82 +void * _EXFUN(_sbrk, (size_t __incr));
58.83 +int _EXFUN(_unlink, (const char *__path ));
58.84 +int _EXFUN(_write, (int __fildes, const void *__buf, size_t __nbyte ));
58.85 +
58.86 +#if defined(__CYGWIN32__) || defined(__rtems__)
58.87 +unsigned _EXFUN(usleep, (unsigned int __useconds));
58.88 +int _EXFUN(ftruncate, (int __fd, off_t __length));
58.89 +int _EXFUN(truncate, (const char *, off_t __length));
58.90 +int _EXFUN(gethostname, (char *__name, size_t __len));
58.91 +char * _EXFUN(mktemp, (char *));
58.92 +int _EXFUN(sync, (void));
58.93 +int _EXFUN(readlink, (const char *__path, char *__buf, int __buflen));
58.94 +int _EXFUN(symlink, (const char *__name1, const char *__name2));
58.95 +#endif
58.96 +
58.97 +# define F_OK 0
58.98 +# define R_OK 4
58.99 +# define W_OK 2
58.100 +# define X_OK 1
58.101 +
58.102 +# define SEEK_SET 0
58.103 +# define SEEK_CUR 1
58.104 +# define SEEK_END 2
58.105 +
58.106 +/*
58.107 + * RTEMS adheres to a later version of POSIX -- 1003.1b.
58.108 + *
58.109 + * XXX this version string should change.
58.110 + */
58.111 +
58.112 +#ifdef __rtems__
58.113 +#ifndef _POSIX_JOB_CONTROL
58.114 +# define _POSIX_JOB_CONTROL 1
58.115 +#endif
58.116 +#ifndef _POSIX_SAVED_IDS
58.117 +# define _POSIX_SAVED_IDS 1
58.118 +#endif
58.119 +# define _POSIX_VERSION 199009L
58.120 +#else
58.121 +#ifdef __svr4__
58.122 +# define _POSIX_JOB_CONTROL 1
58.123 +# define _POSIX_SAVED_IDS 1
58.124 +# define _POSIX_VERSION 199009L
58.125 +#endif
58.126 +#endif
58.127 +
58.128 +#ifdef __CYGWIN32__
58.129 +# define _POSIX_JOB_CONTROL 1
58.130 +# define _POSIX_SAVED_IDS 0
58.131 +# define _POSIX_VERSION 199009L
58.132 +#endif
58.133 +
58.134 +#define STDIN_FILENO 0 /* standard input file descriptor */
58.135 +#define STDOUT_FILENO 1 /* standard output file descriptor */
58.136 +#define STDERR_FILENO 2 /* standard error file descriptor */
58.137 +
58.138 +long _EXFUN(sysconf, (int __name));
58.139 +
58.140 +# define _SC_ARG_MAX 0
58.141 +# define _SC_CHILD_MAX 1
58.142 +# define _SC_CLK_TCK 2
58.143 +# define _SC_NGROUPS_MAX 3
58.144 +# define _SC_OPEN_MAX 4
58.145 +/* no _SC_STREAM_MAX */
58.146 +# define _SC_JOB_CONTROL 5
58.147 +# define _SC_SAVED_IDS 6
58.148 +# define _SC_VERSION 7
58.149 +# define _SC_PAGESIZE 8
58.150 +
58.151 +# define _PC_LINK_MAX 0
58.152 +# define _PC_MAX_CANON 1
58.153 +# define _PC_MAX_INPUT 2
58.154 +# define _PC_NAME_MAX 3
58.155 +# define _PC_PATH_MAX 4
58.156 +# define _PC_PIPE_BUF 5
58.157 +# define _PC_CHOWN_RESTRICTED 6
58.158 +# define _PC_NO_TRUNC 7
58.159 +# define _PC_VDISABLE 8
58.160 +# define _PC_ASYNC_IO 9
58.161 +# define _PC_PRIO_IO 10
58.162 +# define _PC_SYNC_IO 11
58.163 +
58.164 +# ifndef _POSIX_SOURCE
58.165 +# define MAXNAMLEN 1024
58.166 +# endif /* _POSIX_SOURCE */
58.167 +
58.168 +/* FIXME: This is temporary until winsup gets sorted out. */
58.169 +#ifdef __CYGWIN32__
58.170 +#define MAXPATHLEN (260 - 1 /* NUL */)
58.171 +#else
58.172 +# define MAXPATHLEN 1024
58.173 +#endif
58.174 +
58.175 +#ifdef __cplusplus
58.176 +}
58.177 +#endif
58.178 +#endif /* _SYS_UNISTD_H */
59.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
59.2 +++ b/test/include/sys/utime.h Tue Jul 11 01:35:27 2006 +0000
59.3 @@ -0,0 +1,22 @@
59.4 +#ifndef _SYS_UTIME_H
59.5 +#define _SYS_UTIME_H
59.6 +
59.7 +/* This is a dummy <sys/utime.h> file, not customized for any
59.8 + particular system. If there is a utime.h in libc/sys/SYSDIR/sys,
59.9 + it will override this one. */
59.10 +
59.11 +#ifdef __cplusplus
59.12 +extern "C" {
59.13 +#endif
59.14 +
59.15 +struct utimbuf
59.16 +{
59.17 + time_t actime;
59.18 + time_t modtime;
59.19 +};
59.20 +
59.21 +#ifdef __cplusplus
59.22 +};
59.23 +#endif
59.24 +
59.25 +#endif /* _SYS_UTIME_H */
60.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
60.2 +++ b/test/include/sys/wait.h Tue Jul 11 01:35:27 2006 +0000
60.3 @@ -0,0 +1,40 @@
60.4 +#ifndef _SYS_WAIT_H
60.5 +#define _SYS_WAIT_H
60.6 +
60.7 +#ifdef __cplusplus
60.8 +extern "C" {
60.9 +#endif
60.10 +
60.11 +#include <sys/types.h>
60.12 +
60.13 +#define WNOHANG 1
60.14 +#define WUNTRACED 2
60.15 +
60.16 +/* A status looks like:
60.17 + <2 bytes info> <2 bytes code>
60.18 +
60.19 + <code> == 0, child has exited, info is the exit value
60.20 + <code> == 1..7e, child has exited, info is the signal number.
60.21 + <code> == 7f, child has stopped, info was the signal number.
60.22 + <code> == 80, there was a core dump.
60.23 +*/
60.24 +
60.25 +#define WIFEXITED(w) (((w) & 0xff) == 0)
60.26 +#define WIFSIGNALED(w) (((w) & 0x7f) > 0 && (((w) & 0x7f) < 0x7f))
60.27 +#define WIFSTOPPED(w) (((w) & 0xff) == 0x7f)
60.28 +#define WEXITSTATUS(w) (((w) >> 8) & 0xff)
60.29 +#define WTERMSIG(w) ((w) & 0x7f)
60.30 +#define WSTOPSIG WEXITSTATUS
60.31 +
60.32 +pid_t wait (int *);
60.33 +pid_t waitpid (pid_t, int *, int);
60.34 +
60.35 +/* Provide prototypes for most of the _<systemcall> names that are
60.36 + provided in newlib for some compilers. */
60.37 +pid_t _wait (int *);
60.38 +
60.39 +#ifdef __cplusplus
60.40 +};
60.41 +#endif
60.42 +
60.43 +#endif
61.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
61.2 +++ b/test/include/termios.h Tue Jul 11 01:35:27 2006 +0000
61.3 @@ -0,0 +1,7 @@
61.4 +#ifdef __cplusplus
61.5 +extern "C" {
61.6 +#endif
61.7 +#include <sys/termios.h>
61.8 +#ifdef __cplusplus
61.9 +}
61.10 +#endif
62.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
62.2 +++ b/test/include/time.h Tue Jul 11 01:35:27 2006 +0000
62.3 @@ -0,0 +1,90 @@
62.4 +/*
62.5 + * time.h
62.6 + *
62.7 + * Struct and function declarations for dealing with time.
62.8 + */
62.9 +
62.10 +#ifndef _TIME_H_
62.11 +#define _TIME_H_
62.12 +
62.13 +#include "_ansi.h"
62.14 +
62.15 +#ifdef __cplusplus
62.16 +extern "C" {
62.17 +#endif
62.18 +
62.19 +#ifndef NULL
62.20 +#define NULL 0
62.21 +#endif
62.22 +
62.23 +/* Get _CLOCKS_PER_SEC_ */
62.24 +#include <machine/time.h>
62.25 +
62.26 +#ifndef _CLOCKS_PER_SEC_
62.27 +#define _CLOCKS_PER_SEC_ 1000
62.28 +#endif
62.29 +
62.30 +#define CLOCKS_PER_SEC _CLOCKS_PER_SEC_
62.31 +#define CLK_TCK CLOCKS_PER_SEC
62.32 +#define __need_size_t
62.33 +#include <stddef.h>
62.34 +
62.35 +/* Get _CLOCK_T_ and _TIME_T_. */
62.36 +#include <machine/types.h>
62.37 +
62.38 +#ifndef __clock_t_defined
62.39 +typedef _CLOCK_T_ clock_t;
62.40 +#define __clock_t_defined
62.41 +#endif
62.42 +
62.43 +#ifndef __time_t_defined
62.44 +typedef _TIME_T_ time_t;
62.45 +#define __time_t_defined
62.46 +#endif
62.47 +
62.48 +struct tm
62.49 +{
62.50 + int tm_sec;
62.51 + int tm_min;
62.52 + int tm_hour;
62.53 + int tm_mday;
62.54 + int tm_mon;
62.55 + int tm_year;
62.56 + int tm_wday;
62.57 + int tm_yday;
62.58 + int tm_isdst;
62.59 +};
62.60 +
62.61 +clock_t _EXFUN(clock, (void));
62.62 +double _EXFUN(difftime, (time_t _time2, time_t _time1));
62.63 +time_t _EXFUN(mktime, (struct tm *_timeptr));
62.64 +time_t _EXFUN(time, (time_t *_timer));
62.65 +#ifndef _REENT_ONLY
62.66 +char *_EXFUN(asctime, (const struct tm *_tblock));
62.67 +char *_EXFUN(ctime, (const time_t *_time));
62.68 +struct tm *_EXFUN(gmtime, (const time_t *_timer));
62.69 +struct tm *_EXFUN(localtime,(const time_t *_timer));
62.70 +#endif
62.71 +size_t _EXFUN(strftime, (char *_s, size_t _maxsize, const char *_fmt, const struct tm *_t));
62.72 +
62.73 +char *_EXFUN(asctime_r, (const struct tm *, char *));
62.74 +char *_EXFUN(ctime_r, (const time_t *, char *));
62.75 +struct tm *_EXFUN(gmtime_r, (const time_t *, struct tm *));
62.76 +struct tm *_EXFUN(localtime_r, (const time_t *, struct tm *));
62.77 +
62.78 +#ifdef __CYGWIN32__
62.79 +#ifndef __STRICT_ANSI__
62.80 +extern time_t _timezone __declspec(dllimport);
62.81 +extern int _daylight __declspec(dllimport);
62.82 +extern char *_tzname[2] __declspec(dllimport);
62.83 +
62.84 +char *_EXFUN(timezone, (void));
62.85 +void _EXFUN(tzset, (void));
62.86 +#endif
62.87 +#endif /* __CYGWIN32__ */
62.88 +
62.89 +#ifdef __cplusplus
62.90 +}
62.91 +#endif
62.92 +#endif /* _TIME_H_ */
62.93 +
63.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
63.2 +++ b/test/include/unctrl.h Tue Jul 11 01:35:27 2006 +0000
63.3 @@ -0,0 +1,46 @@
63.4 +/* From curses.h. */
63.5 +/*
63.6 + * Copyright (c) 1981, 1993
63.7 + * The Regents of the University of California. All rights reserved.
63.8 + *
63.9 + * Redistribution and use in source and binary forms, with or without
63.10 + * modification, are permitted provided that the following conditions
63.11 + * are met:
63.12 + * 1. Redistributions of source code must retain the above copyright
63.13 + * notice, this list of conditions and the following disclaimer.
63.14 + * 2. Redistributions in binary form must reproduce the above copyright
63.15 + * notice, this list of conditions and the following disclaimer in the
63.16 + * documentation and/or other materials provided with the distribution.
63.17 + * 3. All advertising materials mentioning features or use of this software
63.18 + * must display the following acknowledgement:
63.19 + * This product includes software developed by the University of
63.20 + * California, Berkeley and its contributors.
63.21 + * 4. Neither the name of the University nor the names of its contributors
63.22 + * may be used to endorse or promote products derived from this software
63.23 + * without specific prior written permission.
63.24 + *
63.25 + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
63.26 + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
63.27 + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
63.28 + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
63.29 + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
63.30 + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
63.31 + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
63.32 + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
63.33 + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
63.34 + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
63.35 + * SUCH DAMAGE.
63.36 + */
63.37 +
63.38 +#ifndef _UNCTRL_H_
63.39 +#define _UNCTRL_H_
63.40 +
63.41 +#include <_ansi.h>
63.42 +
63.43 +#define unctrl(c) __unctrl[(c) & 0xff]
63.44 +#define unctrllen(ch) __unctrllen[(ch) & 0xff]
63.45 +
63.46 +extern _CONST char * _CONST __unctrl[256]; /* Control strings. */
63.47 +extern _CONST char __unctrllen[256]; /* Control strings length. */
63.48 +
63.49 +#endif /* _UNCTRL_H_ */
64.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
64.2 +++ b/test/include/unistd.h Tue Jul 11 01:35:27 2006 +0000
64.3 @@ -0,0 +1,6 @@
64.4 +#ifndef _UNISTD_H_
64.5 +#define _UNISTD_H_
64.6 +
64.7 +# include <sys/unistd.h>
64.8 +
64.9 +#endif /* _UNISTD_H_ */
65.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
65.2 +++ b/test/include/utime.h Tue Jul 11 01:35:27 2006 +0000
65.3 @@ -0,0 +1,10 @@
65.4 +#ifdef __cplusplus
65.5 +extern "C" {
65.6 +#endif
65.7 +
65.8 +/* The utime function is defined in libc/sys/<arch>/sys if it exists. */
65.9 +#include <sys/utime.h>
65.10 +
65.11 +#ifdef __cplusplus
65.12 +}
65.13 +#endif
66.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
66.2 +++ b/test/include/utmp.h Tue Jul 11 01:35:27 2006 +0000
66.3 @@ -0,0 +1,8 @@
66.4 +#ifdef __cplusplus
66.5 +extern "C" {
66.6 +#endif
66.7 +#include <sys/utmp.h>
66.8 +#ifdef __cplusplus
66.9 +}
66.10 +#endif
66.11 +
67.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
67.2 +++ b/test/lib.c Tue Jul 11 01:35:27 2006 +0000
67.3 @@ -0,0 +1,20 @@
67.4 +#include "lib.h"
67.5 +
67.6 +void fwrite_dump( FILE *f, char *buf, int length)
67.7 +{
67.8 + int i,j;
67.9 + for( i=0; i<length; i+=16 ) {
67.10 + fprintf( f, "%08X: ", i );
67.11 + for( j=0; j<16 && i+j < length; j+=4 ) {
67.12 + unsigned int val = *((volatile unsigned int *)(buf+i+j));
67.13 + fprintf( f, "%02X %02X %02X %02X ", val&0xFF, (val>>8)&0xFF, (val>>16)&0xFF, (val>>24)&0xFF );
67.14 + }
67.15 + for( ;j<16; j+= 4 ) {
67.16 + fprintf( f, " " );
67.17 + }
67.18 + for( j=0; j<16 && i+j < length; j++ ) {
67.19 + fprintf( f, "%c", isprint(buf[i+j]) ? buf[i+j] : '.' );
67.20 + }
67.21 + fprintf( f, "\n");
67.22 + }
67.23 +}
68.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
68.2 +++ b/test/lib.h Tue Jul 11 01:35:27 2006 +0000
68.3 @@ -0,0 +1,59 @@
68.4 +#ifndef dc_lib_H
68.5 +#define dc_lib_H
68.6 +
68.7 +#include <stdio.h>
68.8 +
68.9 +typedef unsigned char uint8_t;
68.10 +typedef unsigned short uint16_t;
68.11 +typedef unsigned int uint32_t;
68.12 +typedef volatile unsigned int vuint32_t;
68.13 +typedef volatile unsigned short vuint16_t;
68.14 +
68.15 +#define ASIC_STATUS0 0xA05F6900
68.16 +#define ASIC_STATUS1 0xA05F6904
68.17 +#define ASIC_STATUS2 0xA05F6908
68.18 +#define ASIC_IRQB0 0xA05F6920
68.19 +#define ASIC_IRQC2 0xA05f6938
68.20 +#define IRQB0_MASK 0x0007B000
68.21 +
68.22 +#define long_read(A) (*((volatile unsigned long*)(A)))
68.23 +#define long_write(A, V) ( (*((volatile unsigned long*)(A))) = (V) )
68.24 +#define word_read(A) (*((volatile unsigned short*)(A)))
68.25 +#define word_write(A, V) ( (*((volatile unsigned short*)(A))) = (V) )
68.26 +#define byte_read(A) (unsigned int)(*((volatile unsigned char*)(A)))
68.27 +#define byte_write(A, V) ( (*((volatile unsigned char*)(A))) = (V) )
68.28 +
68.29 +int asic_wait(int event);
68.30 +void asic_clear(void);
68.31 +void asic_dump(FILE *f);
68.32 +
68.33 +void fwrite_dump(FILE *f, char *buf, int length);
68.34 +
68.35 +void *align32(char *buf );
68.36 +void write_asic_status(void);
68.37 +void reset_asic_status(void);
68.38 +void g2_fifo_wait( void );
68.39 +
68.40 +void spu_memload( uint32_t dst, const void *src, int length );
68.41 +void spu_memread( void *dst, uint32_t src, int length );
68.42 +void dump_spu_memory( unsigned int from, int length );
68.43 +
68.44 +struct spudma_struct {
68.45 + uint32_t g2_addr;
68.46 + uint32_t sh4_addr;
68.47 + uint32_t count;
68.48 + uint32_t direction;
68.49 + uint32_t mode;
68.50 + uint32_t enable;
68.51 + uint32_t status;
68.52 + uint32_t blah;
68.53 +};
68.54 +extern struct spudma_struct *spudma;
68.55 +
68.56 +#define get_asic_status() (long_read(ASIC_STATUS0)&EVENT_MAPLE_MASK)
68.57 +
68.58 +int is_start_pressed();
68.59 +
68.60 +#define CHECK_IEQUALS( a, b ) if( a != b ) { fprintf(stderr, "Assertion failed at %s:%d: expected %08X, but was %08X\n", __FILE__, __LINE__, a, b ); return -1; }
68.61 +
68.62 +#endif
69.1 Binary file test/lib/libc.a has changed
70.1 Binary file test/lib/libm.a has changed
71.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
71.2 +++ b/test/lib/newlib-1.8.2-dc.patch Tue Jul 11 01:35:27 2006 +0000
71.3 @@ -0,0 +1,6701 @@
71.4 +diff -urN newlib-1.8.2/config.sub newlib-1.8.2-dc/config.sub
71.5 +--- newlib-1.8.2/config.sub 1999-11-21 07:42:37.000000000 +1000
71.6 ++++ newlib-1.8.2-dc/config.sub 2006-07-06 18:28:31.000000000 +1000
71.7 +@@ -231,7 +231,8 @@
71.8 + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphapca5[67]-* \
71.9 + | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \
71.10 + | clipper-* | orion-* \
71.11 +- | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
71.12 ++ | sparclite-* | pdp11-* | sh-* | sh[1234]-* | sh[1234]eb-* \
71.13 ++ | powerpc-* | powerpcle-* \
71.14 + | sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \
71.15 + | mips64el-* | mips64orion-* | mips64orionel-* \
71.16 + | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \
71.17 +@@ -348,6 +349,10 @@
71.18 + da30 | da30-*)
71.19 + basic_machine=m68k-da30
71.20 + ;;
71.21 ++ dc | dreamcast)
71.22 ++ basic_machine=sh-sega
71.23 ++ os=-dreamcast
71.24 ++ ;;
71.25 + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
71.26 + basic_machine=mips-dec
71.27 + ;;
71.28 +@@ -950,7 +955,8 @@
71.29 + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
71.30 + | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
71.31 + | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
71.32 +- | -interix* | -uwin* | -rhapsody* | -openstep* | -oskit*)
71.33 ++ | -interix* | -uwin* | -rhapsody* | -openstep* | -oskit* \
71.34 ++ | -dreamcast* )
71.35 + # Remember, each alternative MUST END IN *, to match a version number.
71.36 + ;;
71.37 + -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
71.38 +@@ -1097,6 +1103,9 @@
71.39 + sparc-* | *-sun)
71.40 + os=-sunos4.1.1
71.41 + ;;
71.42 ++ sh-sega)
71.43 ++ os=-dreamcast
71.44 ++ ;;
71.45 + *-be)
71.46 + os=-beos
71.47 + ;;
71.48 +diff -urN newlib-1.8.2/configure.in newlib-1.8.2-dc/configure.in
71.49 +--- newlib-1.8.2/configure.in 1999-11-21 07:57:50.000000000 +1000
71.50 ++++ newlib-1.8.2-dc/configure.in 2006-07-06 18:28:31.000000000 +1000
71.51 +@@ -831,6 +831,15 @@
71.52 + romp-*-*)
71.53 + noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss"
71.54 + ;;
71.55 ++ sh*-*-dreamcast*)
71.56 ++ case "${host}" in
71.57 ++ i[3456]86-*-vsta) ;; # don't add gprof back in
71.58 ++ i[3456]86-*-go32*) ;; # don't add gprof back in
71.59 ++ i[3456]86-*-msdosdjgpp*) ;; # don't add gprof back in
71.60 ++ *) skipdirs=`echo " ${skipdirs} " | sed -e 's/ gprof / /'` ;;
71.61 ++ esac
71.62 ++ noconfigdirs="$noconfigdirs target-libgloss"
71.63 ++ ;;
71.64 + sh-*-*)
71.65 + case "${host}" in
71.66 + i[3456]86-*-vsta) ;; # don't add gprof back in
71.67 +diff -urN newlib-1.8.2/newlib/configure.host newlib-1.8.2-dc/newlib/configure.host
71.68 +--- newlib-1.8.2/newlib/configure.host 1999-11-21 07:47:53.000000000 +1000
71.69 ++++ newlib-1.8.2-dc/newlib/configure.host 2006-07-06 18:31:57.000000000 +1000
71.70 +@@ -129,7 +129,7 @@
71.71 + powerpc*)
71.72 + machine_dir=powerpc
71.73 + ;;
71.74 +- sh)
71.75 ++ sh*)
71.76 + machine_dir=sh
71.77 + ;;
71.78 + sparc*)
71.79 +@@ -191,6 +191,9 @@
71.80 + sys_dir=cygwin
71.81 + posix_dir=posix
71.82 + ;;
71.83 ++ *-*-dc* | *-*-dreamcast*)
71.84 ++ sys_dir=dreamcast
71.85 ++ ;;
71.86 + *-*-netware*)
71.87 + signal_dir=
71.88 + sys_dir=netware
71.89 +@@ -245,7 +248,7 @@
71.90 + posix_dir=posix
71.91 + ;;
71.92 + sh*-*)
71.93 +- sys_dir=sh
71.94 ++ sys_dir=dreamcast
71.95 + ;;
71.96 + sparc-sun-sunos*)
71.97 + sys_dir=sun4
71.98 +@@ -296,6 +299,10 @@
71.99 + newlib_cflags="${newlib_cflags} -DHAVE_OPENDIR -DHAVE_RENAME -DSIGNAL_PROVIDED -DWANT_PRINTF_LONG_LONG -D_COMPILING_NEWLIB"
71.100 + syscall_dir=syscalls
71.101 + ;;
71.102 ++ *-*-dc* | *-*-dreamcast*)
71.103 ++ newlib_cflags="${newlib_cflags} -DNO_EXEC -DHAVE_GETTIMEOFDAY"
71.104 ++ syscall_dir=syscalls
71.105 ++ ;;
71.106 + # RTEMS supplies its own versions of some routines:
71.107 + # malloc() (reentrant version)
71.108 + # exit() RTEMS has a "global" reent to flush
71.109 +diff -urN newlib-1.8.2/newlib/libc/ctype/Makefile.in newlib-1.8.2-dc/newlib/libc/ctype/Makefile.in
71.110 +--- newlib-1.8.2/newlib/libc/ctype/Makefile.in 1998-12-01 08:03:43.000000000 +1000
71.111 ++++ newlib-1.8.2-dc/newlib/libc/ctype/Makefile.in 2006-07-06 18:28:31.000000000 +1000
71.112 +@@ -1,6 +1,6 @@
71.113 +-# Makefile.in generated automatically by automake 1.3b from Makefile.am
71.114 ++# Makefile.in generated automatically by automake 1.4 from Makefile.am
71.115 +
71.116 +-# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
71.117 ++# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
71.118 + # This Makefile.in is free software; the Free Software Foundation
71.119 + # gives unlimited permission to copy and/or distribute it,
71.120 + # with or without modifications, as long as this notice is preserved.
71.121 +@@ -46,7 +46,7 @@
71.122 + AUTOHEADER = @AUTOHEADER@
71.123 +
71.124 + INSTALL = @INSTALL@
71.125 +-INSTALL_PROGRAM = @INSTALL_PROGRAM@
71.126 ++INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
71.127 + INSTALL_DATA = @INSTALL_DATA@
71.128 + INSTALL_SCRIPT = @INSTALL_SCRIPT@
71.129 + transform = @program_transform_name@
71.130 +@@ -78,7 +78,6 @@
71.131 + PACKAGE = @PACKAGE@
71.132 + RANLIB = @RANLIB@
71.133 + VERSION = @VERSION@
71.134 +-mach_add_objs = @mach_add_objs@
71.135 + machine_dir = @machine_dir@
71.136 + newlib_basedir = @newlib_basedir@
71.137 + sys_dir = @sys_dir@
71.138 +@@ -89,40 +88,11 @@
71.139 +
71.140 + noinst_LIBRARIES = lib.a
71.141 +
71.142 +-lib_a_SOURCES = \
71.143 +- ctype_.c \
71.144 +- isalnum.c \
71.145 +- isalpha.c \
71.146 +- isascii.c \
71.147 +- iscntrl.c \
71.148 +- isdigit.c \
71.149 +- islower.c \
71.150 +- isupper.c \
71.151 +- isprint.c \
71.152 +- ispunct.c \
71.153 +- isspace.c \
71.154 +- isxdigit.c \
71.155 +- toascii.c \
71.156 +- tolower.c \
71.157 +- toupper.c \
71.158 +- _tolower.c \
71.159 +- _toupper.c
71.160 +-
71.161 +-CHEWOUT_FILES= \
71.162 +- isalnum.def \
71.163 +- isalpha.def \
71.164 +- isascii.def \
71.165 +- iscntrl.def \
71.166 +- isdigit.def \
71.167 +- islower.def \
71.168 +- isprint.def \
71.169 +- ispunct.def \
71.170 +- isspace.def \
71.171 +- isupper.def \
71.172 +- isxdigit.def \
71.173 +- toascii.def \
71.174 +- tolower.def \
71.175 +- toupper.def
71.176 ++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
71.177 ++
71.178 ++
71.179 ++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
71.180 ++
71.181 +
71.182 + SUFFIXES = .def
71.183 +
71.184 +@@ -146,22 +116,22 @@
71.185 + toascii.o tolower.o toupper.o _tolower.o _toupper.o
71.186 + CFLAGS = @CFLAGS@
71.187 + COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
71.188 +-LINK = $(CC) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
71.189 ++CCLD = $(CC)
71.190 ++LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
71.191 + DIST_COMMON = Makefile.am Makefile.in
71.192 +
71.193 +
71.194 + DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
71.195 +
71.196 + TAR = tar
71.197 +-GZIP = --best
71.198 ++GZIP_ENV = --best
71.199 + SOURCES = $(lib_a_SOURCES)
71.200 + OBJECTS = $(lib_a_OBJECTS)
71.201 +
71.202 +-all: Makefile $(LIBRARIES)
71.203 +-
71.204 ++all: all-redirect
71.205 + .SUFFIXES:
71.206 + .SUFFIXES: .S .c .def .o .s
71.207 +-$(srcdir)/Makefile.in: @MAINT@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
71.208 ++$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
71.209 + cd $(top_srcdir) && $(AUTOMAKE) --cygnus ctype/Makefile
71.210 +
71.211 + Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
71.212 +@@ -205,8 +175,12 @@
71.213 + tags: TAGS
71.214 +
71.215 + ID: $(HEADERS) $(SOURCES) $(LISP)
71.216 ++ list='$(SOURCES) $(HEADERS)'; \
71.217 ++ unique=`for i in $$list; do echo $$i; done | \
71.218 ++ awk ' { files[$$0] = 1; } \
71.219 ++ END { for (i in files) print i; }'`; \
71.220 + here=`pwd` && cd $(srcdir) \
71.221 +- && mkid -f$$here/ID $(SOURCES) $(HEADERS) $(LISP)
71.222 ++ && mkid -f$$here/ID $$unique $(LISP)
71.223 +
71.224 + TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
71.225 + tags=; \
71.226 +@@ -234,28 +208,39 @@
71.227 + distdir: $(DISTFILES)
71.228 + @for file in $(DISTFILES); do \
71.229 + if test -f $$file; then d=.; else d=$(srcdir); fi; \
71.230 +- test -f $(distdir)/$$file \
71.231 +- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
71.232 +- || cp -p $$d/$$file $(distdir)/$$file; \
71.233 ++ if test -d $$d/$$file; then \
71.234 ++ cp -pr $$d/$$file $(distdir)/$$file; \
71.235 ++ else \
71.236 ++ test -f $(distdir)/$$file \
71.237 ++ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
71.238 ++ || cp -p $$d/$$file $(distdir)/$$file || :; \
71.239 ++ fi; \
71.240 + done
71.241 +-info:
71.242 +-dvi:
71.243 +-check:
71.244 +-installcheck:
71.245 +-install-info:
71.246 +-install-exec:
71.247 +- @$(NORMAL_INSTALL)
71.248 +-
71.249 +-install-data:
71.250 +- @$(NORMAL_INSTALL)
71.251 +-
71.252 +-install: install-exec install-data all
71.253 +- @:
71.254 +-
71.255 +-uninstall:
71.256 +-
71.257 ++info-am:
71.258 ++info: info-am
71.259 ++dvi-am:
71.260 ++dvi: dvi-am
71.261 ++check-am:
71.262 ++check: check-am
71.263 ++installcheck-am:
71.264 ++installcheck: installcheck-am
71.265 ++install-info-am:
71.266 ++install-info: install-info-am
71.267 ++install-exec-am:
71.268 ++install-exec: install-exec-am
71.269 ++
71.270 ++install-data-am:
71.271 ++install-data: install-data-am
71.272 ++
71.273 ++install-am: all-am
71.274 ++ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
71.275 ++install: install-am
71.276 ++uninstall-am:
71.277 ++uninstall: uninstall-am
71.278 ++all-am: Makefile $(LIBRARIES)
71.279 ++all-redirect: all-am
71.280 + install-strip:
71.281 +- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
71.282 ++ $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
71.283 + installdirs:
71.284 +
71.285 +
71.286 +@@ -269,29 +254,38 @@
71.287 + -rm -f config.cache config.log stamp-h stamp-h[0-9]*
71.288 +
71.289 + maintainer-clean-generic:
71.290 +-mostlyclean: mostlyclean-noinstLIBRARIES mostlyclean-compile \
71.291 ++mostlyclean-am: mostlyclean-noinstLIBRARIES mostlyclean-compile \
71.292 + mostlyclean-tags mostlyclean-generic
71.293 +
71.294 +-clean: clean-noinstLIBRARIES clean-compile clean-tags clean-generic \
71.295 +- mostlyclean
71.296 ++mostlyclean: mostlyclean-am
71.297 +
71.298 +-distclean: distclean-noinstLIBRARIES distclean-compile distclean-tags \
71.299 +- distclean-generic clean
71.300 +- -rm -f config.status
71.301 ++clean-am: clean-noinstLIBRARIES clean-compile clean-tags clean-generic \
71.302 ++ mostlyclean-am
71.303 +
71.304 +-maintainer-clean: maintainer-clean-noinstLIBRARIES \
71.305 ++clean: clean-am
71.306 ++
71.307 ++distclean-am: distclean-noinstLIBRARIES distclean-compile \
71.308 ++ distclean-tags distclean-generic clean-am
71.309 ++
71.310 ++distclean: distclean-am
71.311 ++
71.312 ++maintainer-clean-am: maintainer-clean-noinstLIBRARIES \
71.313 + maintainer-clean-compile maintainer-clean-tags \
71.314 +- maintainer-clean-generic distclean
71.315 ++ maintainer-clean-generic distclean-am
71.316 + @echo "This command is intended for maintainers to use;"
71.317 + @echo "it deletes files that may require special tools to rebuild."
71.318 +
71.319 ++maintainer-clean: maintainer-clean-am
71.320 ++
71.321 + .PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \
71.322 + clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
71.323 + mostlyclean-compile distclean-compile clean-compile \
71.324 + maintainer-clean-compile tags mostlyclean-tags distclean-tags \
71.325 +-clean-tags maintainer-clean-tags distdir info dvi installcheck \
71.326 +-install-info install-exec install-data install uninstall all \
71.327 +-installdirs mostlyclean-generic distclean-generic clean-generic \
71.328 ++clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \
71.329 ++check-am installcheck-am installcheck install-info-am install-info \
71.330 ++install-exec-am install-exec install-data-am install-data install-am \
71.331 ++install uninstall-am uninstall all-redirect all-am all installdirs \
71.332 ++mostlyclean-generic distclean-generic clean-generic \
71.333 + maintainer-clean-generic clean mostlyclean distclean maintainer-clean
71.334 +
71.335 +
71.336 +diff -urN newlib-1.8.2/newlib/libc/errno/Makefile.in newlib-1.8.2-dc/newlib/libc/errno/Makefile.in
71.337 +--- newlib-1.8.2/newlib/libc/errno/Makefile.in 1998-12-01 08:03:43.000000000 +1000
71.338 ++++ newlib-1.8.2-dc/newlib/libc/errno/Makefile.in 2006-07-06 18:28:31.000000000 +1000
71.339 +@@ -1,6 +1,6 @@
71.340 +-# Makefile.in generated automatically by automake 1.3b from Makefile.am
71.341 ++# Makefile.in generated automatically by automake 1.4 from Makefile.am
71.342 +
71.343 +-# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
71.344 ++# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
71.345 + # This Makefile.in is free software; the Free Software Foundation
71.346 + # gives unlimited permission to copy and/or distribute it,
71.347 + # with or without modifications, as long as this notice is preserved.
71.348 +@@ -46,7 +46,7 @@
71.349 + AUTOHEADER = @AUTOHEADER@
71.350 +
71.351 + INSTALL = @INSTALL@
71.352 +-INSTALL_PROGRAM = @INSTALL_PROGRAM@
71.353 ++INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
71.354 + INSTALL_DATA = @INSTALL_DATA@
71.355 + INSTALL_SCRIPT = @INSTALL_SCRIPT@
71.356 + transform = @program_transform_name@
71.357 +@@ -78,7 +78,6 @@
71.358 + PACKAGE = @PACKAGE@
71.359 + RANLIB = @RANLIB@
71.360 + VERSION = @VERSION@
71.361 +-mach_add_objs = @mach_add_objs@
71.362 + machine_dir = @machine_dir@
71.363 + newlib_basedir = @newlib_basedir@
71.364 + sys_dir = @sys_dir@
71.365 +@@ -91,7 +90,7 @@
71.366 +
71.367 + lib_a_SOURCES = errno.c
71.368 +
71.369 +-CHEWOUT_FILES =
71.370 ++CHEWOUT_FILES =
71.371 +
71.372 + SUFFIXES = .def
71.373 +
71.374 +@@ -113,22 +112,22 @@
71.375 + lib_a_OBJECTS = errno.o
71.376 + CFLAGS = @CFLAGS@
71.377 + COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
71.378 +-LINK = $(CC) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
71.379 ++CCLD = $(CC)
71.380 ++LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
71.381 + DIST_COMMON = Makefile.am Makefile.in
71.382 +
71.383 +
71.384 + DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
71.385 +
71.386 + TAR = tar
71.387 +-GZIP = --best
71.388 ++GZIP_ENV = --best
71.389 + SOURCES = $(lib_a_SOURCES)
71.390 + OBJECTS = $(lib_a_OBJECTS)
71.391 +
71.392 +-all: Makefile $(LIBRARIES)
71.393 +-
71.394 ++all: all-redirect
71.395 + .SUFFIXES:
71.396 + .SUFFIXES: .S .c .def .o .s
71.397 +-$(srcdir)/Makefile.in: @MAINT@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
71.398 ++$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
71.399 + cd $(top_srcdir) && $(AUTOMAKE) --cygnus errno/Makefile
71.400 +
71.401 + Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
71.402 +@@ -172,8 +171,12 @@
71.403 + tags: TAGS
71.404 +
71.405 + ID: $(HEADERS) $(SOURCES) $(LISP)
71.406 ++ list='$(SOURCES) $(HEADERS)'; \
71.407 ++ unique=`for i in $$list; do echo $$i; done | \
71.408 ++ awk ' { files[$$0] = 1; } \
71.409 ++ END { for (i in files) print i; }'`; \
71.410 + here=`pwd` && cd $(srcdir) \
71.411 +- && mkid -f$$here/ID $(SOURCES) $(HEADERS) $(LISP)
71.412 ++ && mkid -f$$here/ID $$unique $(LISP)
71.413 +
71.414 + TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
71.415 + tags=; \
71.416 +@@ -201,28 +204,39 @@
71.417 + distdir: $(DISTFILES)
71.418 + @for file in $(DISTFILES); do \
71.419 + if test -f $$file; then d=.; else d=$(srcdir); fi; \
71.420 +- test -f $(distdir)/$$file \
71.421 +- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
71.422 +- || cp -p $$d/$$file $(distdir)/$$file; \
71.423 ++ if test -d $$d/$$file; then \
71.424 ++ cp -pr $$d/$$file $(distdir)/$$file; \
71.425 ++ else \
71.426 ++ test -f $(distdir)/$$file \
71.427 ++ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
71.428 ++ || cp -p $$d/$$file $(distdir)/$$file || :; \
71.429 ++ fi; \
71.430 + done
71.431 +-info:
71.432 +-dvi:
71.433 +-check:
71.434 +-installcheck:
71.435 +-install-info:
71.436 +-install-exec:
71.437 +- @$(NORMAL_INSTALL)
71.438 +-
71.439 +-install-data:
71.440 +- @$(NORMAL_INSTALL)
71.441 +-
71.442 +-install: install-exec install-data all
71.443 +- @:
71.444 +-
71.445 +-uninstall:
71.446 +-
71.447 ++info-am:
71.448 ++info: info-am
71.449 ++dvi-am:
71.450 ++dvi: dvi-am
71.451 ++check-am:
71.452 ++check: check-am
71.453 ++installcheck-am:
71.454 ++installcheck: installcheck-am
71.455 ++install-info-am:
71.456 ++install-info: install-info-am
71.457 ++install-exec-am:
71.458 ++install-exec: install-exec-am
71.459 ++
71.460 ++install-data-am:
71.461 ++install-data: install-data-am
71.462 ++
71.463 ++install-am: all-am
71.464 ++ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
71.465 ++install: install-am
71.466 ++uninstall-am:
71.467 ++uninstall: uninstall-am
71.468 ++all-am: Makefile $(LIBRARIES)
71.469 ++all-redirect: all-am
71.470 + install-strip:
71.471 +- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
71.472 ++ $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
71.473 + installdirs:
71.474 +
71.475 +
71.476 +@@ -236,29 +250,38 @@
71.477 + -rm -f config.cache config.log stamp-h stamp-h[0-9]*
71.478 +
71.479 + maintainer-clean-generic:
71.480 +-mostlyclean: mostlyclean-noinstLIBRARIES mostlyclean-compile \
71.481 ++mostlyclean-am: mostlyclean-noinstLIBRARIES mostlyclean-compile \
71.482 + mostlyclean-tags mostlyclean-generic
71.483 +
71.484 +-clean: clean-noinstLIBRARIES clean-compile clean-tags clean-generic \
71.485 +- mostlyclean
71.486 ++mostlyclean: mostlyclean-am
71.487 ++
71.488 ++clean-am: clean-noinstLIBRARIES clean-compile clean-tags clean-generic \
71.489 ++ mostlyclean-am
71.490 +
71.491 +-distclean: distclean-noinstLIBRARIES distclean-compile distclean-tags \
71.492 +- distclean-generic clean
71.493 +- -rm -f config.status
71.494 ++clean: clean-am
71.495 +
71.496 +-maintainer-clean: maintainer-clean-noinstLIBRARIES \
71.497 ++distclean-am: distclean-noinstLIBRARIES distclean-compile \
71.498 ++ distclean-tags distclean-generic clean-am
71.499 ++
71.500 ++distclean: distclean-am
71.501 ++
71.502 ++maintainer-clean-am: maintainer-clean-noinstLIBRARIES \
71.503 + maintainer-clean-compile maintainer-clean-tags \
71.504 +- maintainer-clean-generic distclean
71.505 ++ maintainer-clean-generic distclean-am
71.506 + @echo "This command is intended for maintainers to use;"
71.507 + @echo "it deletes files that may require special tools to rebuild."
71.508 +
71.509 ++maintainer-clean: maintainer-clean-am
71.510 ++
71.511 + .PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \
71.512 + clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
71.513 + mostlyclean-compile distclean-compile clean-compile \
71.514 + maintainer-clean-compile tags mostlyclean-tags distclean-tags \
71.515 +-clean-tags maintainer-clean-tags distdir info dvi installcheck \
71.516 +-install-info install-exec install-data install uninstall all \
71.517 +-installdirs mostlyclean-generic distclean-generic clean-generic \
71.518 ++clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \
71.519 ++check-am installcheck-am installcheck install-info-am install-info \
71.520 ++install-exec-am install-exec install-data-am install-data install-am \
71.521 ++install uninstall-am uninstall all-redirect all-am all installdirs \
71.522 ++mostlyclean-generic distclean-generic clean-generic \
71.523 + maintainer-clean-generic clean mostlyclean distclean maintainer-clean
71.524 +
71.525 +
71.526 +diff -urN newlib-1.8.2/newlib/libc/locale/Makefile.in newlib-1.8.2-dc/newlib/libc/locale/Makefile.in
71.527 +--- newlib-1.8.2/newlib/libc/locale/Makefile.in 1998-12-01 08:03:44.000000000 +1000
71.528 ++++ newlib-1.8.2-dc/newlib/libc/locale/Makefile.in 2006-07-06 18:28:31.000000000 +1000
71.529 +@@ -1,6 +1,6 @@
71.530 +-# Makefile.in generated automatically by automake 1.3b from Makefile.am
71.531 ++# Makefile.in generated automatically by automake 1.4 from Makefile.am
71.532 +
71.533 +-# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
71.534 ++# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
71.535 + # This Makefile.in is free software; the Free Software Foundation
71.536 + # gives unlimited permission to copy and/or distribute it,
71.537 + # with or without modifications, as long as this notice is preserved.
71.538 +@@ -46,7 +46,7 @@
71.539 + AUTOHEADER = @AUTOHEADER@
71.540 +
71.541 + INSTALL = @INSTALL@
71.542 +-INSTALL_PROGRAM = @INSTALL_PROGRAM@
71.543 ++INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
71.544 + INSTALL_DATA = @INSTALL_DATA@
71.545 + INSTALL_SCRIPT = @INSTALL_SCRIPT@
71.546 + transform = @program_transform_name@
71.547 +@@ -78,7 +78,6 @@
71.548 + PACKAGE = @PACKAGE@
71.549 + RANLIB = @RANLIB@
71.550 + VERSION = @VERSION@
71.551 +-mach_add_objs = @mach_add_objs@
71.552 + machine_dir = @machine_dir@
71.553 + newlib_basedir = @newlib_basedir@
71.554 + sys_dir = @sys_dir@
71.555 +@@ -113,22 +112,22 @@
71.556 + lib_a_OBJECTS = locale.o
71.557 + CFLAGS = @CFLAGS@
71.558 + COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
71.559 +-LINK = $(CC) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
71.560 ++CCLD = $(CC)
71.561 ++LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
71.562 + DIST_COMMON = Makefile.am Makefile.in
71.563 +
71.564 +
71.565 + DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
71.566 +
71.567 + TAR = tar
71.568 +-GZIP = --best
71.569 ++GZIP_ENV = --best
71.570 + SOURCES = $(lib_a_SOURCES)
71.571 + OBJECTS = $(lib_a_OBJECTS)
71.572 +
71.573 +-all: Makefile $(LIBRARIES)
71.574 +-
71.575 ++all: all-redirect
71.576 + .SUFFIXES:
71.577 + .SUFFIXES: .S .c .def .o .s
71.578 +-$(srcdir)/Makefile.in: @MAINT@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
71.579 ++$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
71.580 + cd $(top_srcdir) && $(AUTOMAKE) --cygnus locale/Makefile
71.581 +
71.582 + Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
71.583 +@@ -172,8 +171,12 @@
71.584 + tags: TAGS
71.585 +
71.586 + ID: $(HEADERS) $(SOURCES) $(LISP)
71.587 ++ list='$(SOURCES) $(HEADERS)'; \
71.588 ++ unique=`for i in $$list; do echo $$i; done | \
71.589 ++ awk ' { files[$$0] = 1; } \
71.590 ++ END { for (i in files) print i; }'`; \
71.591 + here=`pwd` && cd $(srcdir) \
71.592 +- && mkid -f$$here/ID $(SOURCES) $(HEADERS) $(LISP)
71.593 ++ && mkid -f$$here/ID $$unique $(LISP)
71.594 +
71.595 + TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
71.596 + tags=; \
71.597 +@@ -201,28 +204,39 @@
71.598 + distdir: $(DISTFILES)
71.599 + @for file in $(DISTFILES); do \
71.600 + if test -f $$file; then d=.; else d=$(srcdir); fi; \
71.601 +- test -f $(distdir)/$$file \
71.602 +- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
71.603 +- || cp -p $$d/$$file $(distdir)/$$file; \
71.604 ++ if test -d $$d/$$file; then \
71.605 ++ cp -pr $$d/$$file $(distdir)/$$file; \
71.606 ++ else \
71.607 ++ test -f $(distdir)/$$file \
71.608 ++ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
71.609 ++ || cp -p $$d/$$file $(distdir)/$$file || :; \
71.610 ++ fi; \
71.611 + done
71.612 +-info:
71.613 +-dvi:
71.614 +-check:
71.615 +-installcheck:
71.616 +-install-info:
71.617 +-install-exec:
71.618 +- @$(NORMAL_INSTALL)
71.619 +-
71.620 +-install-data:
71.621 +- @$(NORMAL_INSTALL)
71.622 +-
71.623 +-install: install-exec install-data all
71.624 +- @:
71.625 +-
71.626 +-uninstall:
71.627 +-
71.628 ++info-am:
71.629 ++info: info-am
71.630 ++dvi-am:
71.631 ++dvi: dvi-am
71.632 ++check-am:
71.633 ++check: check-am
71.634 ++installcheck-am:
71.635 ++installcheck: installcheck-am
71.636 ++install-info-am:
71.637 ++install-info: install-info-am
71.638 ++install-exec-am:
71.639 ++install-exec: install-exec-am
71.640 ++
71.641 ++install-data-am:
71.642 ++install-data: install-data-am
71.643 ++
71.644 ++install-am: all-am
71.645 ++ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
71.646 ++install: install-am
71.647 ++uninstall-am:
71.648 ++uninstall: uninstall-am
71.649 ++all-am: Makefile $(LIBRARIES)
71.650 ++all-redirect: all-am
71.651 + install-strip:
71.652 +- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
71.653 ++ $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
71.654 + installdirs:
71.655 +
71.656 +
71.657 +@@ -236,29 +250,38 @@
71.658 + -rm -f config.cache config.log stamp-h stamp-h[0-9]*
71.659 +
71.660 + maintainer-clean-generic:
71.661 +-mostlyclean: mostlyclean-noinstLIBRARIES mostlyclean-compile \
71.662 ++mostlyclean-am: mostlyclean-noinstLIBRARIES mostlyclean-compile \
71.663 + mostlyclean-tags mostlyclean-generic
71.664 +
71.665 +-clean: clean-noinstLIBRARIES clean-compile clean-tags clean-generic \
71.666 +- mostlyclean
71.667 ++mostlyclean: mostlyclean-am
71.668 ++
71.669 ++clean-am: clean-noinstLIBRARIES clean-compile clean-tags clean-generic \
71.670 ++ mostlyclean-am
71.671 +
71.672 +-distclean: distclean-noinstLIBRARIES distclean-compile distclean-tags \
71.673 +- distclean-generic clean
71.674 +- -rm -f config.status
71.675 ++clean: clean-am
71.676 +
71.677 +-maintainer-clean: maintainer-clean-noinstLIBRARIES \
71.678 ++distclean-am: distclean-noinstLIBRARIES distclean-compile \
71.679 ++ distclean-tags distclean-generic clean-am
71.680 ++
71.681 ++distclean: distclean-am
71.682 ++
71.683 ++maintainer-clean-am: maintainer-clean-noinstLIBRARIES \
71.684 + maintainer-clean-compile maintainer-clean-tags \
71.685 +- maintainer-clean-generic distclean
71.686 ++ maintainer-clean-generic distclean-am
71.687 + @echo "This command is intended for maintainers to use;"
71.688 + @echo "it deletes files that may require special tools to rebuild."
71.689 +
71.690 ++maintainer-clean: maintainer-clean-am
71.691 ++
71.692 + .PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \
71.693 + clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
71.694 + mostlyclean-compile distclean-compile clean-compile \
71.695 + maintainer-clean-compile tags mostlyclean-tags distclean-tags \
71.696 +-clean-tags maintainer-clean-tags distdir info dvi installcheck \
71.697 +-install-info install-exec install-data install uninstall all \
71.698 +-installdirs mostlyclean-generic distclean-generic clean-generic \
71.699 ++clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \
71.700 ++check-am installcheck-am installcheck install-info-am install-info \
71.701 ++install-exec-am install-exec install-data-am install-data install-am \
71.702 ++install uninstall-am uninstall all-redirect all-am all installdirs \
71.703 ++mostlyclean-generic distclean-generic clean-generic \
71.704 + maintainer-clean-generic clean mostlyclean distclean maintainer-clean
71.705 +
71.706 +
71.707 +diff -urN newlib-1.8.2/newlib/libc/Makefile.in newlib-1.8.2-dc/newlib/libc/Makefile.in
71.708 +--- newlib-1.8.2/newlib/libc/Makefile.in 1999-11-21 07:55:49.000000000 +1000
71.709 ++++ newlib-1.8.2-dc/newlib/libc/Makefile.in 2006-07-06 18:28:31.000000000 +1000
71.710 +@@ -77,50 +77,30 @@
71.711 + NEWLIB_CFLAGS = @NEWLIB_CFLAGS@
71.712 + PACKAGE = @PACKAGE@
71.713 + RANLIB = @RANLIB@
71.714 +-VERSION = 1.8.2
71.715 ++VERSION = @VERSION@
71.716 + machine_dir = @machine_dir@
71.717 + newlib_basedir = @newlib_basedir@
71.718 + sys_dir = @sys_dir@
71.719 +
71.720 + AUTOMAKE_OPTIONS = cygnus
71.721 +
71.722 +-@HAVE_POSIX_DIR_TRUE@POSIX_SUBDIR = \
71.723 +-@HAVE_POSIX_DIR_TRUE@posix
71.724 ++@HAVE_POSIX_DIR_TRUE@POSIX_SUBDIR = posix
71.725 +
71.726 +-@HAVE_SIGNAL_DIR_TRUE@SIGNAL_SUBDIR = \
71.727 +-@HAVE_SIGNAL_DIR_TRUE@signal
71.728 ++@HAVE_SIGNAL_DIR_TRUE@SIGNAL_SUBDIR = signal
71.729 +
71.730 +-@HAVE_SYSCALL_DIR_TRUE@SYSCALLS_SUBDIR = \
71.731 +-@HAVE_SYSCALL_DIR_TRUE@syscalls
71.732 ++@HAVE_SYSCALL_DIR_TRUE@SYSCALLS_SUBDIR = syscalls
71.733 +
71.734 +-@HAVE_UNIX_DIR_TRUE@UNIX_SUBDIR = \
71.735 +-@HAVE_UNIX_DIR_TRUE@unix
71.736 ++@HAVE_UNIX_DIR_TRUE@UNIX_SUBDIR = unix
71.737 +
71.738 + # The order of SUBDIRS is important for the integrated documentation.
71.739 + # Do not change the order without considering the doc impact.
71.740 +-SUBDIRS = stdlib ctype stdio string $(SIGNAL_SUBDIR) time locale sys reent \
71.741 +- errno misc machine $(UNIX_SUBDIR) $(POSIX_SUBDIR) $(SYSCALLS_SUBDIR) .
71.742 ++SUBDIRS = stdlib ctype stdio string $(SIGNAL_SUBDIR) time locale sys reent errno misc machine $(UNIX_SUBDIR) $(POSIX_SUBDIR) $(SYSCALLS_SUBDIR) .
71.743 +
71.744 +
71.745 + noinst_LIBRARIES = libc.a
71.746 + noinst_DATA = $(CRT0)
71.747 +
71.748 +-SUBLIBS = \
71.749 +- stdlib/lib.a \
71.750 +- ctype/lib.a \
71.751 +- stdio/lib.a \
71.752 +- string/lib.a \
71.753 +- $(LIBC_SIGNAL_LIB) \
71.754 +- time/lib.a \
71.755 +- locale/lib.a \
71.756 +- $(LIBC_SYS_LIB) \
71.757 +- reent/lib.a \
71.758 +- errno/lib.a \
71.759 +- misc/lib.a \
71.760 +- $(LIBC_MACHINE_LIB) \
71.761 +- $(LIBC_UNIX_LIB) \
71.762 +- $(LIBC_POSIX_LIB) \
71.763 +- $(LIBC_SYSCALL_LIB)
71.764 ++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)
71.765 +
71.766 +
71.767 + info_TEXINFOS = libc.texinfo
71.768 +@@ -129,20 +109,10 @@
71.769 + # builds .def files. We don't list subdirectories which don't build
71.770 + # .def files; if the list of subdirectories changes, we must change
71.771 + # this as well.
71.772 +-SUBDEFS = \
71.773 +- stdlib/stmp-def \
71.774 +- ctype/stmp-def \
71.775 +- stdio/stmp-def \
71.776 +- string/stmp-def \
71.777 +- $(LIBC_SIGNAL_DEF) \
71.778 +- time/stmp-def \
71.779 +- locale/stmp-def \
71.780 +- reent/stmp-def \
71.781 +- misc/stmp-def
71.782 ++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
71.783 +
71.784 +
71.785 +-CLEANFILES = crt0.o \
71.786 +- sigset.texi stmp-sigset tmp.texi targetdep.tex stmp-targetdep
71.787 ++CLEANFILES = crt0.o sigset.texi stmp-sigset tmp.texi targetdep.tex stmp-targetdep
71.788 +
71.789 +
71.790 + ACLOCAL_AMFLAGS = -I ..
71.791 +@@ -471,7 +441,7 @@
71.792 + @for file in $(DISTFILES); do \
71.793 + if test -f $$file; then d=.; else d=$(srcdir); fi; \
71.794 + if test -d $$d/$$file; then \
71.795 +- cp -pr $$/$$file $(distdir)/$$file; \
71.796 ++ cp -pr $$d/$$file $(distdir)/$$file; \
71.797 + else \
71.798 + test -f $(distdir)/$$file \
71.799 + || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
71.800 +diff -urN newlib-1.8.2/newlib/libc/misc/Makefile.in newlib-1.8.2-dc/newlib/libc/misc/Makefile.in
71.801 +--- newlib-1.8.2/newlib/libc/misc/Makefile.in 1998-12-01 08:03:46.000000000 +1000
71.802 ++++ newlib-1.8.2-dc/newlib/libc/misc/Makefile.in 2006-07-06 18:28:31.000000000 +1000
71.803 +@@ -1,6 +1,6 @@
71.804 +-# Makefile.in generated automatically by automake 1.3b from Makefile.am
71.805 ++# Makefile.in generated automatically by automake 1.4 from Makefile.am
71.806 +
71.807 +-# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
71.808 ++# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
71.809 + # This Makefile.in is free software; the Free Software Foundation
71.810 + # gives unlimited permission to copy and/or distribute it,
71.811 + # with or without modifications, as long as this notice is preserved.
71.812 +@@ -46,7 +46,7 @@
71.813 + AUTOHEADER = @AUTOHEADER@
71.814 +
71.815 + INSTALL = @INSTALL@
71.816 +-INSTALL_PROGRAM = @INSTALL_PROGRAM@
71.817 ++INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
71.818 + INSTALL_DATA = @INSTALL_DATA@
71.819 + INSTALL_SCRIPT = @INSTALL_SCRIPT@
71.820 + transform = @program_transform_name@
71.821 +@@ -78,7 +78,6 @@
71.822 + PACKAGE = @PACKAGE@
71.823 + RANLIB = @RANLIB@
71.824 + VERSION = @VERSION@
71.825 +-mach_add_objs = @mach_add_objs@
71.826 + machine_dir = @machine_dir@
71.827 + newlib_basedir = @newlib_basedir@
71.828 + sys_dir = @sys_dir@
71.829 +@@ -113,22 +112,22 @@
71.830 + lib_a_OBJECTS = dprintf.o unctrl.o ffs.o
71.831 + CFLAGS = @CFLAGS@
71.832 + COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
71.833 +-LINK = $(CC) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
71.834 ++CCLD = $(CC)
71.835 ++LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
71.836 + DIST_COMMON = Makefile.am Makefile.in
71.837 +
71.838 +
71.839 + DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
71.840 +
71.841 + TAR = tar
71.842 +-GZIP = --best
71.843 ++GZIP_ENV = --best
71.844 + SOURCES = $(lib_a_SOURCES)
71.845 + OBJECTS = $(lib_a_OBJECTS)
71.846 +
71.847 +-all: Makefile $(LIBRARIES)
71.848 +-
71.849 ++all: all-redirect
71.850 + .SUFFIXES:
71.851 + .SUFFIXES: .S .c .def .o .s
71.852 +-$(srcdir)/Makefile.in: @MAINT@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
71.853 ++$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
71.854 + cd $(top_srcdir) && $(AUTOMAKE) --cygnus misc/Makefile
71.855 +
71.856 + Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
71.857 +@@ -172,8 +171,12 @@
71.858 + tags: TAGS
71.859 +
71.860 + ID: $(HEADERS) $(SOURCES) $(LISP)
71.861 ++ list='$(SOURCES) $(HEADERS)'; \
71.862 ++ unique=`for i in $$list; do echo $$i; done | \
71.863 ++ awk ' { files[$$0] = 1; } \
71.864 ++ END { for (i in files) print i; }'`; \
71.865 + here=`pwd` && cd $(srcdir) \
71.866 +- && mkid -f$$here/ID $(SOURCES) $(HEADERS) $(LISP)
71.867 ++ && mkid -f$$here/ID $$unique $(LISP)
71.868 +
71.869 + TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
71.870 + tags=; \
71.871 +@@ -201,28 +204,39 @@
71.872 + distdir: $(DISTFILES)
71.873 + @for file in $(DISTFILES); do \
71.874 + if test -f $$file; then d=.; else d=$(srcdir); fi; \
71.875 +- test -f $(distdir)/$$file \
71.876 +- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
71.877 +- || cp -p $$d/$$file $(distdir)/$$file; \
71.878 ++ if test -d $$d/$$file; then \
71.879 ++ cp -pr $$d/$$file $(distdir)/$$file; \
71.880 ++ else \
71.881 ++ test -f $(distdir)/$$file \
71.882 ++ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
71.883 ++ || cp -p $$d/$$file $(distdir)/$$file || :; \
71.884 ++ fi; \
71.885 + done
71.886 +-info:
71.887 +-dvi:
71.888 +-check:
71.889 +-installcheck:
71.890 +-install-info:
71.891 +-install-exec:
71.892 +- @$(NORMAL_INSTALL)
71.893 +-
71.894 +-install-data:
71.895 +- @$(NORMAL_INSTALL)
71.896 +-
71.897 +-install: install-exec install-data all
71.898 +- @:
71.899 +-
71.900 +-uninstall:
71.901 +-
71.902 ++info-am:
71.903 ++info: info-am
71.904 ++dvi-am:
71.905 ++dvi: dvi-am
71.906 ++check-am:
71.907 ++check: check-am
71.908 ++installcheck-am:
71.909 ++installcheck: installcheck-am
71.910 ++install-info-am:
71.911 ++install-info: install-info-am
71.912 ++install-exec-am:
71.913 ++install-exec: install-exec-am
71.914 ++
71.915 ++install-data-am:
71.916 ++install-data: install-data-am
71.917 ++
71.918 ++install-am: all-am
71.919 ++ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
71.920 ++install: install-am
71.921 ++uninstall-am:
71.922 ++uninstall: uninstall-am
71.923 ++all-am: Makefile $(LIBRARIES)
71.924 ++all-redirect: all-am
71.925 + install-strip:
71.926 +- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
71.927 ++ $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
71.928 + installdirs:
71.929 +
71.930 +
71.931 +@@ -236,29 +250,38 @@
71.932 + -rm -f config.cache config.log stamp-h stamp-h[0-9]*
71.933 +
71.934 + maintainer-clean-generic:
71.935 +-mostlyclean: mostlyclean-noinstLIBRARIES mostlyclean-compile \
71.936 ++mostlyclean-am: mostlyclean-noinstLIBRARIES mostlyclean-compile \
71.937 + mostlyclean-tags mostlyclean-generic
71.938 +
71.939 +-clean: clean-noinstLIBRARIES clean-compile clean-tags clean-generic \
71.940 +- mostlyclean
71.941 ++mostlyclean: mostlyclean-am
71.942 ++
71.943 ++clean-am: clean-noinstLIBRARIES clean-compile clean-tags clean-generic \
71.944 ++ mostlyclean-am
71.945 +
71.946 +-distclean: distclean-noinstLIBRARIES distclean-compile distclean-tags \
71.947 +- distclean-generic clean
71.948 +- -rm -f config.status
71.949 ++clean: clean-am
71.950 +
71.951 +-maintainer-clean: maintainer-clean-noinstLIBRARIES \
71.952 ++distclean-am: distclean-noinstLIBRARIES distclean-compile \
71.953 ++ distclean-tags distclean-generic clean-am
71.954 ++
71.955 ++distclean: distclean-am
71.956 ++
71.957 ++maintainer-clean-am: maintainer-clean-noinstLIBRARIES \
71.958 + maintainer-clean-compile maintainer-clean-tags \
71.959 +- maintainer-clean-generic distclean
71.960 ++ maintainer-clean-generic distclean-am
71.961 + @echo "This command is intended for maintainers to use;"
71.962 + @echo "it deletes files that may require special tools to rebuild."
71.963 +
71.964 ++maintainer-clean: maintainer-clean-am
71.965 ++
71.966 + .PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \
71.967 + clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
71.968 + mostlyclean-compile distclean-compile clean-compile \
71.969 + maintainer-clean-compile tags mostlyclean-tags distclean-tags \
71.970 +-clean-tags maintainer-clean-tags distdir info dvi installcheck \
71.971 +-install-info install-exec install-data install uninstall all \
71.972 +-installdirs mostlyclean-generic distclean-generic clean-generic \
71.973 ++clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \
71.974 ++check-am installcheck-am installcheck install-info-am install-info \
71.975 ++install-exec-am install-exec install-data-am install-data install-am \
71.976 ++install uninstall-am uninstall all-redirect all-am all installdirs \
71.977 ++mostlyclean-generic distclean-generic clean-generic \
71.978 + maintainer-clean-generic clean mostlyclean distclean maintainer-clean
71.979 +
71.980 +
71.981 +diff -urN newlib-1.8.2/newlib/libc/posix/Makefile.in newlib-1.8.2-dc/newlib/libc/posix/Makefile.in
71.982 +--- newlib-1.8.2/newlib/libc/posix/Makefile.in 1998-12-01 08:03:46.000000000 +1000
71.983 ++++ newlib-1.8.2-dc/newlib/libc/posix/Makefile.in 2006-07-06 18:28:31.000000000 +1000
71.984 +@@ -1,6 +1,6 @@
71.985 +-# Makefile.in generated automatically by automake 1.3b from Makefile.am
71.986 ++# Makefile.in generated automatically by automake 1.4 from Makefile.am
71.987 +
71.988 +-# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
71.989 ++# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
71.990 + # This Makefile.in is free software; the Free Software Foundation
71.991 + # gives unlimited permission to copy and/or distribute it,
71.992 + # with or without modifications, as long as this notice is preserved.
71.993 +@@ -46,7 +46,7 @@
71.994 + AUTOHEADER = @AUTOHEADER@
71.995 +
71.996 + INSTALL = @INSTALL@
71.997 +-INSTALL_PROGRAM = @INSTALL_PROGRAM@
71.998 ++INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
71.999 + INSTALL_DATA = @INSTALL_DATA@
71.1000 + INSTALL_SCRIPT = @INSTALL_SCRIPT@
71.1001 + transform = @program_transform_name@
71.1002 +@@ -78,7 +78,6 @@
71.1003 + PACKAGE = @PACKAGE@
71.1004 + RANLIB = @RANLIB@
71.1005 + VERSION = @VERSION@
71.1006 +-mach_add_objs = @mach_add_objs@
71.1007 + machine_dir = @machine_dir@
71.1008 + newlib_basedir = @newlib_basedir@
71.1009 + sys_dir = @sys_dir@
71.1010 +@@ -89,12 +88,10 @@
71.1011 +
71.1012 + noinst_LIBRARIES = lib.a
71.1013 +
71.1014 +-lib_a_SOURCES = \
71.1015 +- closedir.c opendir.c readdir.c rewinddir.c scandir.c seekdir.c \
71.1016 +- telldir.c execl.c execle.c execlp.c execv.c execve.c execvp.c \
71.1017 +- popen.c creat.c isatty.c
71.1018 ++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
71.1019 +
71.1020 +-CHEWOUT_FILES =
71.1021 ++
71.1022 ++CHEWOUT_FILES =
71.1023 +
71.1024 + SUFFIXES = .def
71.1025 +
71.1026 +@@ -118,22 +115,22 @@
71.1027 + popen.o creat.o isatty.o
71.1028 + CFLAGS = @CFLAGS@
71.1029 + COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
71.1030 +-LINK = $(CC) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
71.1031 ++CCLD = $(CC)
71.1032 ++LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
71.1033 + DIST_COMMON = Makefile.am Makefile.in
71.1034 +
71.1035 +
71.1036 + DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
71.1037 +
71.1038 + TAR = tar
71.1039 +-GZIP = --best
71.1040 ++GZIP_ENV = --best
71.1041 + SOURCES = $(lib_a_SOURCES)
71.1042 + OBJECTS = $(lib_a_OBJECTS)
71.1043 +
71.1044 +-all: Makefile $(LIBRARIES)
71.1045 +-
71.1046 ++all: all-redirect
71.1047 + .SUFFIXES:
71.1048 + .SUFFIXES: .S .c .def .o .s
71.1049 +-$(srcdir)/Makefile.in: @MAINT@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
71.1050 ++$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
71.1051 + cd $(top_srcdir) && $(AUTOMAKE) --cygnus posix/Makefile
71.1052 +
71.1053 + Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
71.1054 +@@ -177,8 +174,12 @@
71.1055 + tags: TAGS
71.1056 +
71.1057 + ID: $(HEADERS) $(SOURCES) $(LISP)
71.1058 ++ list='$(SOURCES) $(HEADERS)'; \
71.1059 ++ unique=`for i in $$list; do echo $$i; done | \
71.1060 ++ awk ' { files[$$0] = 1; } \
71.1061 ++ END { for (i in files) print i; }'`; \
71.1062 + here=`pwd` && cd $(srcdir) \
71.1063 +- && mkid -f$$here/ID $(SOURCES) $(HEADERS) $(LISP)
71.1064 ++ && mkid -f$$here/ID $$unique $(LISP)
71.1065 +
71.1066 + TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
71.1067 + tags=; \
71.1068 +@@ -206,28 +207,39 @@
71.1069 + distdir: $(DISTFILES)
71.1070 + @for file in $(DISTFILES); do \
71.1071 + if test -f $$file; then d=.; else d=$(srcdir); fi; \
71.1072 +- test -f $(distdir)/$$file \
71.1073 +- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
71.1074 +- || cp -p $$d/$$file $(distdir)/$$file; \
71.1075 ++ if test -d $$d/$$file; then \
71.1076 ++ cp -pr $$d/$$file $(distdir)/$$file; \
71.1077 ++ else \
71.1078 ++ test -f $(distdir)/$$file \
71.1079 ++ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
71.1080 ++ || cp -p $$d/$$file $(distdir)/$$file || :; \
71.1081 ++ fi; \
71.1082 + done
71.1083 +-info:
71.1084 +-dvi:
71.1085 +-check:
71.1086 +-installcheck:
71.1087 +-install-info:
71.1088 +-install-exec:
71.1089 +- @$(NORMAL_INSTALL)
71.1090 +-
71.1091 +-install-data:
71.1092 +- @$(NORMAL_INSTALL)
71.1093 +-
71.1094 +-install: install-exec install-data all
71.1095 +- @:
71.1096 +-
71.1097 +-uninstall:
71.1098 +-
71.1099 ++info-am:
71.1100 ++info: info-am
71.1101 ++dvi-am:
71.1102 ++dvi: dvi-am
71.1103 ++check-am:
71.1104 ++check: check-am
71.1105 ++installcheck-am:
71.1106 ++installcheck: installcheck-am
71.1107 ++install-info-am:
71.1108 ++install-info: install-info-am
71.1109 ++install-exec-am:
71.1110 ++install-exec: install-exec-am
71.1111 ++
71.1112 ++install-data-am:
71.1113 ++install-data: install-data-am
71.1114 ++
71.1115 ++install-am: all-am
71.1116 ++ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
71.1117 ++install: install-am
71.1118 ++uninstall-am:
71.1119 ++uninstall: uninstall-am
71.1120 ++all-am: Makefile $(LIBRARIES)
71.1121 ++all-redirect: all-am
71.1122 + install-strip:
71.1123 +- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
71.1124 ++ $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
71.1125 + installdirs:
71.1126 +
71.1127 +
71.1128 +@@ -241,29 +253,38 @@
71.1129 + -rm -f config.cache config.log stamp-h stamp-h[0-9]*
71.1130 +
71.1131 + maintainer-clean-generic:
71.1132 +-mostlyclean: mostlyclean-noinstLIBRARIES mostlyclean-compile \
71.1133 ++mostlyclean-am: mostlyclean-noinstLIBRARIES mostlyclean-compile \
71.1134 + mostlyclean-tags mostlyclean-generic
71.1135 +
71.1136 +-clean: clean-noinstLIBRARIES clean-compile clean-tags clean-generic \
71.1137 +- mostlyclean
71.1138 ++mostlyclean: mostlyclean-am
71.1139 ++
71.1140 ++clean-am: clean-noinstLIBRARIES clean-compile clean-tags clean-generic \
71.1141 ++ mostlyclean-am
71.1142 +
71.1143 +-distclean: distclean-noinstLIBRARIES distclean-compile distclean-tags \
71.1144 +- distclean-generic clean
71.1145 +- -rm -f config.status
71.1146 ++clean: clean-am
71.1147 +
71.1148 +-maintainer-clean: maintainer-clean-noinstLIBRARIES \
71.1149 ++distclean-am: distclean-noinstLIBRARIES distclean-compile \
71.1150 ++ distclean-tags distclean-generic clean-am
71.1151 ++
71.1152 ++distclean: distclean-am
71.1153 ++
71.1154 ++maintainer-clean-am: maintainer-clean-noinstLIBRARIES \
71.1155 + maintainer-clean-compile maintainer-clean-tags \
71.1156 +- maintainer-clean-generic distclean
71.1157 ++ maintainer-clean-generic distclean-am
71.1158 + @echo "This command is intended for maintainers to use;"
71.1159 + @echo "it deletes files that may require special tools to rebuild."
71.1160 +
71.1161 ++maintainer-clean: maintainer-clean-am
71.1162 ++
71.1163 + .PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \
71.1164 + clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
71.1165 + mostlyclean-compile distclean-compile clean-compile \
71.1166 + maintainer-clean-compile tags mostlyclean-tags distclean-tags \
71.1167 +-clean-tags maintainer-clean-tags distdir info dvi installcheck \
71.1168 +-install-info install-exec install-data install uninstall all \
71.1169 +-installdirs mostlyclean-generic distclean-generic clean-generic \
71.1170 ++clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \
71.1171 ++check-am installcheck-am installcheck install-info-am install-info \
71.1172 ++install-exec-am install-exec install-data-am install-data install-am \
71.1173 ++install uninstall-am uninstall all-redirect all-am all installdirs \
71.1174 ++mostlyclean-generic distclean-generic clean-generic \
71.1175 + maintainer-clean-generic clean mostlyclean distclean maintainer-clean
71.1176 +
71.1177 +
71.1178 +diff -urN newlib-1.8.2/newlib/libc/reent/Makefile.in newlib-1.8.2-dc/newlib/libc/reent/Makefile.in
71.1179 +--- newlib-1.8.2/newlib/libc/reent/Makefile.in 1998-12-01 08:03:46.000000000 +1000
71.1180 ++++ newlib-1.8.2-dc/newlib/libc/reent/Makefile.in 2006-07-06 18:28:31.000000000 +1000
71.1181 +@@ -1,6 +1,6 @@
71.1182 +-# Makefile.in generated automatically by automake 1.3b from Makefile.am
71.1183 ++# Makefile.in generated automatically by automake 1.4 from Makefile.am
71.1184 +
71.1185 +-# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
71.1186 ++# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
71.1187 + # This Makefile.in is free software; the Free Software Foundation
71.1188 + # gives unlimited permission to copy and/or distribute it,
71.1189 + # with or without modifications, as long as this notice is preserved.
71.1190 +@@ -46,7 +46,7 @@
71.1191 + AUTOHEADER = @AUTOHEADER@
71.1192 +
71.1193 + INSTALL = @INSTALL@
71.1194 +-INSTALL_PROGRAM = @INSTALL_PROGRAM@
71.1195 ++INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
71.1196 + INSTALL_DATA = @INSTALL_DATA@
71.1197 + INSTALL_SCRIPT = @INSTALL_SCRIPT@
71.1198 + transform = @program_transform_name@
71.1199 +@@ -78,7 +78,6 @@
71.1200 + PACKAGE = @PACKAGE@
71.1201 + RANLIB = @RANLIB@
71.1202 + VERSION = @VERSION@
71.1203 +-mach_add_objs = @mach_add_objs@
71.1204 + machine_dir = @machine_dir@
71.1205 + newlib_basedir = @newlib_basedir@
71.1206 + sys_dir = @sys_dir@
71.1207 +@@ -89,36 +88,11 @@
71.1208 +
71.1209 + noinst_LIBRARIES = lib.a
71.1210 +
71.1211 +-lib_a_SOURCES = \
71.1212 +- closer.c \
71.1213 +- reent.c \
71.1214 +- impure.c \
71.1215 +- execr.c \
71.1216 +- fstatr.c \
71.1217 +- linkr.c \
71.1218 +- lseekr.c \
71.1219 +- openr.c \
71.1220 +- readr.c \
71.1221 +- signalr.c \
71.1222 +- sbrkr.c \
71.1223 +- statr.c \
71.1224 +- timer.c \
71.1225 +- writer.c
71.1226 +-
71.1227 +-CHEWOUT_FILES = \
71.1228 +- closer.def \
71.1229 +- reent.def \
71.1230 +- execr.def \
71.1231 +- fstatr.def \
71.1232 +- linkr.def \
71.1233 +- lseekr.def \
71.1234 +- openr.def \
71.1235 +- readr.def \
71.1236 +- signalr.def \
71.1237 +- sbrkr.def \
71.1238 +- statr.def \
71.1239 +- timer.def \
71.1240 +- writer.def
71.1241 ++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
71.1242 ++
71.1243 ++
71.1244 ++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
71.1245 ++
71.1246 +
71.1247 + SUFFIXES = .def .h
71.1248 +
71.1249 +@@ -141,22 +115,22 @@
71.1250 + lseekr.o openr.o readr.o signalr.o sbrkr.o statr.o timer.o writer.o
71.1251 + CFLAGS = @CFLAGS@
71.1252 + COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
71.1253 +-LINK = $(CC) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
71.1254 ++CCLD = $(CC)
71.1255 ++LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
71.1256 + DIST_COMMON = Makefile.am Makefile.in
71.1257 +
71.1258 +
71.1259 + DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
71.1260 +
71.1261 + TAR = tar
71.1262 +-GZIP = --best
71.1263 ++GZIP_ENV = --best
71.1264 + SOURCES = $(lib_a_SOURCES)
71.1265 + OBJECTS = $(lib_a_OBJECTS)
71.1266 +
71.1267 +-all: Makefile $(LIBRARIES)
71.1268 +-
71.1269 ++all: all-redirect
71.1270 + .SUFFIXES:
71.1271 + .SUFFIXES: .S .c .def .h .o .s
71.1272 +-$(srcdir)/Makefile.in: @MAINT@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
71.1273 ++$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
71.1274 + cd $(top_srcdir) && $(AUTOMAKE) --cygnus reent/Makefile
71.1275 +
71.1276 + Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
71.1277 +@@ -200,8 +174,12 @@
71.1278 + tags: TAGS
71.1279 +
71.1280 + ID: $(HEADERS) $(SOURCES) $(LISP)
71.1281 ++ list='$(SOURCES) $(HEADERS)'; \
71.1282 ++ unique=`for i in $$list; do echo $$i; done | \
71.1283 ++ awk ' { files[$$0] = 1; } \
71.1284 ++ END { for (i in files) print i; }'`; \
71.1285 + here=`pwd` && cd $(srcdir) \
71.1286 +- && mkid -f$$here/ID $(SOURCES) $(HEADERS) $(LISP)
71.1287 ++ && mkid -f$$here/ID $$unique $(LISP)
71.1288 +
71.1289 + TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
71.1290 + tags=; \
71.1291 +@@ -229,28 +207,39 @@
71.1292 + distdir: $(DISTFILES)
71.1293 + @for file in $(DISTFILES); do \
71.1294 + if test -f $$file; then d=.; else d=$(srcdir); fi; \
71.1295 +- test -f $(distdir)/$$file \
71.1296 +- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
71.1297 +- || cp -p $$d/$$file $(distdir)/$$file; \
71.1298 ++ if test -d $$d/$$file; then \
71.1299 ++ cp -pr $$d/$$file $(distdir)/$$file; \
71.1300 ++ else \
71.1301 ++ test -f $(distdir)/$$file \
71.1302 ++ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
71.1303 ++ || cp -p $$d/$$file $(distdir)/$$file || :; \
71.1304 ++ fi; \
71.1305 + done
71.1306 +-info:
71.1307 +-dvi:
71.1308 +-check:
71.1309 +-installcheck:
71.1310 +-install-info:
71.1311 +-install-exec:
71.1312 +- @$(NORMAL_INSTALL)
71.1313 +-
71.1314 +-install-data:
71.1315 +- @$(NORMAL_INSTALL)
71.1316 +-
71.1317 +-install: install-exec install-data all
71.1318 +- @:
71.1319 +-
71.1320 +-uninstall:
71.1321 +-
71.1322 ++info-am:
71.1323 ++info: info-am
71.1324 ++dvi-am:
71.1325 ++dvi: dvi-am
71.1326 ++check-am:
71.1327 ++check: check-am
71.1328 ++installcheck-am:
71.1329 ++installcheck: installcheck-am
71.1330 ++install-info-am:
71.1331 ++install-info: install-info-am
71.1332 ++install-exec-am:
71.1333 ++install-exec: install-exec-am
71.1334 ++
71.1335 ++install-data-am:
71.1336 ++install-data: install-data-am
71.1337 ++
71.1338 ++install-am: all-am
71.1339 ++ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
71.1340 ++install: install-am
71.1341 ++uninstall-am:
71.1342 ++uninstall: uninstall-am
71.1343 ++all-am: Makefile $(LIBRARIES)
71.1344 ++all-redirect: all-am
71.1345 + install-strip:
71.1346 +- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
71.1347 ++ $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
71.1348 + installdirs:
71.1349 +
71.1350 +
71.1351 +@@ -264,29 +253,38 @@
71.1352 + -rm -f config.cache config.log stamp-h stamp-h[0-9]*
71.1353 +
71.1354 + maintainer-clean-generic:
71.1355 +-mostlyclean: mostlyclean-noinstLIBRARIES mostlyclean-compile \
71.1356 ++mostlyclean-am: mostlyclean-noinstLIBRARIES mostlyclean-compile \
71.1357 + mostlyclean-tags mostlyclean-generic
71.1358 +
71.1359 +-clean: clean-noinstLIBRARIES clean-compile clean-tags clean-generic \
71.1360 +- mostlyclean
71.1361 ++mostlyclean: mostlyclean-am
71.1362 +
71.1363 +-distclean: distclean-noinstLIBRARIES distclean-compile distclean-tags \
71.1364 +- distclean-generic clean
71.1365 +- -rm -f config.status
71.1366 ++clean-am: clean-noinstLIBRARIES clean-compile clean-tags clean-generic \
71.1367 ++ mostlyclean-am
71.1368 +
71.1369 +-maintainer-clean: maintainer-clean-noinstLIBRARIES \
71.1370 ++clean: clean-am
71.1371 ++
71.1372 ++distclean-am: distclean-noinstLIBRARIES distclean-compile \
71.1373 ++ distclean-tags distclean-generic clean-am
71.1374 ++
71.1375 ++distclean: distclean-am
71.1376 ++
71.1377 ++maintainer-clean-am: maintainer-clean-noinstLIBRARIES \
71.1378 + maintainer-clean-compile maintainer-clean-tags \
71.1379 +- maintainer-clean-generic distclean
71.1380 ++ maintainer-clean-generic distclean-am
71.1381 + @echo "This command is intended for maintainers to use;"
71.1382 + @echo "it deletes files that may require special tools to rebuild."
71.1383 +
71.1384 ++maintainer-clean: maintainer-clean-am
71.1385 ++
71.1386 + .PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \
71.1387 + clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
71.1388 + mostlyclean-compile distclean-compile clean-compile \
71.1389 + maintainer-clean-compile tags mostlyclean-tags distclean-tags \
71.1390 +-clean-tags maintainer-clean-tags distdir info dvi installcheck \
71.1391 +-install-info install-exec install-data install uninstall all \
71.1392 +-installdirs mostlyclean-generic distclean-generic clean-generic \
71.1393 ++clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \
71.1394 ++check-am installcheck-am installcheck install-info-am install-info \
71.1395 ++install-exec-am install-exec install-data-am install-data install-am \
71.1396 ++install uninstall-am uninstall all-redirect all-am all installdirs \
71.1397 ++mostlyclean-generic distclean-generic clean-generic \
71.1398 + maintainer-clean-generic clean mostlyclean distclean maintainer-clean
71.1399 +
71.1400 +
71.1401 +diff -urN newlib-1.8.2/newlib/libc/signal/Makefile.in newlib-1.8.2-dc/newlib/libc/signal/Makefile.in
71.1402 +--- newlib-1.8.2/newlib/libc/signal/Makefile.in 1998-12-01 08:03:46.000000000 +1000
71.1403 ++++ newlib-1.8.2-dc/newlib/libc/signal/Makefile.in 2006-07-06 18:28:31.000000000 +1000
71.1404 +@@ -1,6 +1,6 @@
71.1405 +-# Makefile.in generated automatically by automake 1.3b from Makefile.am
71.1406 ++# Makefile.in generated automatically by automake 1.4 from Makefile.am
71.1407 +
71.1408 +-# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
71.1409 ++# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
71.1410 + # This Makefile.in is free software; the Free Software Foundation
71.1411 + # gives unlimited permission to copy and/or distribute it,
71.1412 + # with or without modifications, as long as this notice is preserved.
71.1413 +@@ -46,7 +46,7 @@
71.1414 + AUTOHEADER = @AUTOHEADER@
71.1415 +
71.1416 + INSTALL = @INSTALL@
71.1417 +-INSTALL_PROGRAM = @INSTALL_PROGRAM@
71.1418 ++INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
71.1419 + INSTALL_DATA = @INSTALL_DATA@
71.1420 + INSTALL_SCRIPT = @INSTALL_SCRIPT@
71.1421 + transform = @program_transform_name@
71.1422 +@@ -78,7 +78,6 @@
71.1423 + PACKAGE = @PACKAGE@
71.1424 + RANLIB = @RANLIB@
71.1425 + VERSION = @VERSION@
71.1426 +-mach_add_objs = @mach_add_objs@
71.1427 + machine_dir = @machine_dir@
71.1428 + newlib_basedir = @newlib_basedir@
71.1429 + sys_dir = @sys_dir@
71.1430 +@@ -113,22 +112,22 @@
71.1431 + lib_a_OBJECTS = raise.o signal.o
71.1432 + CFLAGS = @CFLAGS@
71.1433 + COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
71.1434 +-LINK = $(CC) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
71.1435 ++CCLD = $(CC)
71.1436 ++LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
71.1437 + DIST_COMMON = Makefile.am Makefile.in
71.1438 +
71.1439 +
71.1440 + DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
71.1441 +
71.1442 + TAR = tar
71.1443 +-GZIP = --best
71.1444 ++GZIP_ENV = --best
71.1445 + SOURCES = $(lib_a_SOURCES)
71.1446 + OBJECTS = $(lib_a_OBJECTS)
71.1447 +
71.1448 +-all: Makefile $(LIBRARIES)
71.1449 +-
71.1450 ++all: all-redirect
71.1451 + .SUFFIXES:
71.1452 + .SUFFIXES: .S .c .def .o .s
71.1453 +-$(srcdir)/Makefile.in: @MAINT@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
71.1454 ++$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
71.1455 + cd $(top_srcdir) && $(AUTOMAKE) --cygnus signal/Makefile
71.1456 +
71.1457 + Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
71.1458 +@@ -172,8 +171,12 @@
71.1459 + tags: TAGS
71.1460 +
71.1461 + ID: $(HEADERS) $(SOURCES) $(LISP)
71.1462 ++ list='$(SOURCES) $(HEADERS)'; \
71.1463 ++ unique=`for i in $$list; do echo $$i; done | \
71.1464 ++ awk ' { files[$$0] = 1; } \
71.1465 ++ END { for (i in files) print i; }'`; \
71.1466 + here=`pwd` && cd $(srcdir) \
71.1467 +- && mkid -f$$here/ID $(SOURCES) $(HEADERS) $(LISP)
71.1468 ++ && mkid -f$$here/ID $$unique $(LISP)
71.1469 +
71.1470 + TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
71.1471 + tags=; \
71.1472 +@@ -201,28 +204,39 @@
71.1473 + distdir: $(DISTFILES)
71.1474 + @for file in $(DISTFILES); do \
71.1475 + if test -f $$file; then d=.; else d=$(srcdir); fi; \
71.1476 +- test -f $(distdir)/$$file \
71.1477 +- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
71.1478 +- || cp -p $$d/$$file $(distdir)/$$file; \
71.1479 ++ if test -d $$d/$$file; then \
71.1480 ++ cp -pr $$d/$$file $(distdir)/$$file; \
71.1481 ++ else \
71.1482 ++ test -f $(distdir)/$$file \
71.1483 ++ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
71.1484 ++ || cp -p $$d/$$file $(distdir)/$$file || :; \
71.1485 ++ fi; \
71.1486 + done
71.1487 +-info:
71.1488 +-dvi:
71.1489 +-check:
71.1490 +-installcheck:
71.1491 +-install-info:
71.1492 +-install-exec:
71.1493 +- @$(NORMAL_INSTALL)
71.1494 +-
71.1495 +-install-data:
71.1496 +- @$(NORMAL_INSTALL)
71.1497 +-
71.1498 +-install: install-exec install-data all
71.1499 +- @:
71.1500 +-
71.1501 +-uninstall:
71.1502 +-
71.1503 ++info-am:
71.1504 ++info: info-am
71.1505 ++dvi-am:
71.1506 ++dvi: dvi-am
71.1507 ++check-am:
71.1508 ++check: check-am
71.1509 ++installcheck-am:
71.1510 ++installcheck: installcheck-am
71.1511 ++install-info-am:
71.1512 ++install-info: install-info-am
71.1513 ++install-exec-am:
71.1514 ++install-exec: install-exec-am
71.1515 ++
71.1516 ++install-data-am:
71.1517 ++install-data: install-data-am
71.1518 ++
71.1519 ++install-am: all-am
71.1520 ++ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
71.1521 ++install: install-am
71.1522 ++uninstall-am:
71.1523 ++uninstall: uninstall-am
71.1524 ++all-am: Makefile $(LIBRARIES)
71.1525 ++all-redirect: all-am
71.1526 + install-strip:
71.1527 +- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
71.1528 ++ $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
71.1529 + installdirs:
71.1530 +
71.1531 +
71.1532 +@@ -236,29 +250,38 @@
71.1533 + -rm -f config.cache config.log stamp-h stamp-h[0-9]*
71.1534 +
71.1535 + maintainer-clean-generic:
71.1536 +-mostlyclean: mostlyclean-noinstLIBRARIES mostlyclean-compile \
71.1537 ++mostlyclean-am: mostlyclean-noinstLIBRARIES mostlyclean-compile \
71.1538 + mostlyclean-tags mostlyclean-generic
71.1539 +
71.1540 +-clean: clean-noinstLIBRARIES clean-compile clean-tags clean-generic \
71.1541 +- mostlyclean
71.1542 ++mostlyclean: mostlyclean-am
71.1543 ++
71.1544 ++clean-am: clean-noinstLIBRARIES clean-compile clean-tags clean-generic \
71.1545 ++ mostlyclean-am
71.1546 +
71.1547 +-distclean: distclean-noinstLIBRARIES distclean-compile distclean-tags \
71.1548 +- distclean-generic clean
71.1549 +- -rm -f config.status
71.1550 ++clean: clean-am
71.1551 +
71.1552 +-maintainer-clean: maintainer-clean-noinstLIBRARIES \
71.1553 ++distclean-am: distclean-noinstLIBRARIES distclean-compile \
71.1554 ++ distclean-tags distclean-generic clean-am
71.1555 ++
71.1556 ++distclean: distclean-am
71.1557 ++
71.1558 ++maintainer-clean-am: maintainer-clean-noinstLIBRARIES \
71.1559 + maintainer-clean-compile maintainer-clean-tags \
71.1560 +- maintainer-clean-generic distclean
71.1561 ++ maintainer-clean-generic distclean-am
71.1562 + @echo "This command is intended for maintainers to use;"
71.1563 + @echo "it deletes files that may require special tools to rebuild."
71.1564 +
71.1565 ++maintainer-clean: maintainer-clean-am
71.1566 ++
71.1567 + .PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \
71.1568 + clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
71.1569 + mostlyclean-compile distclean-compile clean-compile \
71.1570 + maintainer-clean-compile tags mostlyclean-tags distclean-tags \
71.1571 +-clean-tags maintainer-clean-tags distdir info dvi installcheck \
71.1572 +-install-info install-exec install-data install uninstall all \
71.1573 +-installdirs mostlyclean-generic distclean-generic clean-generic \
71.1574 ++clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \
71.1575 ++check-am installcheck-am installcheck install-info-am install-info \
71.1576 ++install-exec-am install-exec install-data-am install-data install-am \
71.1577 ++install uninstall-am uninstall all-redirect all-am all installdirs \
71.1578 ++mostlyclean-generic distclean-generic clean-generic \
71.1579 + maintainer-clean-generic clean mostlyclean distclean maintainer-clean
71.1580 +
71.1581 +
71.1582 +diff -urN newlib-1.8.2/newlib/libc/signal/signal.c newlib-1.8.2-dc/newlib/libc/signal/signal.c
71.1583 +--- newlib-1.8.2/newlib/libc/signal/signal.c 1998-03-11 06:09:23.000000000 +1000
71.1584 ++++ newlib-1.8.2-dc/newlib/libc/signal/signal.c 2006-07-06 18:28:31.000000000 +1000
71.1585 +@@ -180,13 +180,13 @@
71.1586 +
71.1587 + switch ((_POINTER_INT) ptr->_sig_func[sig])
71.1588 + {
71.1589 +- case SIG_DFL:
71.1590 ++ case (_POINTER_INT) SIG_DFL:
71.1591 + return _kill_r (ptr, _getpid_r (ptr), sig);
71.1592 +
71.1593 +- case SIG_IGN:
71.1594 ++ case (_POINTER_INT) SIG_IGN:
71.1595 + break;
71.1596 +
71.1597 +- case SIG_ERR:
71.1598 ++ case (_POINTER_INT) SIG_ERR:
71.1599 + ptr->_errno = EINVAL;
71.1600 + result = 1;
71.1601 + break;
71.1602 +@@ -218,13 +218,13 @@
71.1603 +
71.1604 + switch ((_POINTER_INT) ptr->_sig_func[sig])
71.1605 + {
71.1606 +- case SIG_DFL:
71.1607 ++ case (_POINTER_INT) SIG_DFL:
71.1608 + return 1;
71.1609 +
71.1610 +- case SIG_ERR:
71.1611 ++ case (_POINTER_INT) SIG_ERR:
71.1612 + return 2;
71.1613 +
71.1614 +- case SIG_IGN:
71.1615 ++ case (_POINTER_INT) SIG_IGN:
71.1616 + return 3;
71.1617 +
71.1618 + default:
71.1619 +diff -urN newlib-1.8.2/newlib/libc/stdio/Makefile.in newlib-1.8.2-dc/newlib/libc/stdio/Makefile.in
71.1620 +--- newlib-1.8.2/newlib/libc/stdio/Makefile.in 1999-07-07 00:52:14.000000000 +1000
71.1621 ++++ newlib-1.8.2-dc/newlib/libc/stdio/Makefile.in 2006-07-06 18:28:31.000000000 +1000
71.1622 +@@ -88,112 +88,12 @@
71.1623 +
71.1624 + noinst_LIBRARIES = lib.a
71.1625 +
71.1626 +-lib_a_SOURCES = \
71.1627 +- clearerr.c \
71.1628 +- fclose.c \
71.1629 +- fdopen.c \
71.1630 +- feof.c \
71.1631 +- ferror.c \
71.1632 +- fflush.c \
71.1633 +- fgetc.c \
71.1634 +- fgetpos.c \
71.1635 +- fgets.c \
71.1636 +- fileno.c \
71.1637 +- findfp.c \
71.1638 +- fiprintf.c \
71.1639 +- flags.c \
71.1640 +- fopen.c \
71.1641 +- fprintf.c \
71.1642 +- fputc.c \
71.1643 +- fputs.c \
71.1644 +- fread.c \
71.1645 +- freopen.c \
71.1646 +- fscanf.c \
71.1647 +- fseek.c \
71.1648 +- fsetpos.c \
71.1649 +- ftell.c \
71.1650 +- fvwrite.c \
71.1651 +- fwalk.c \
71.1652 +- fwrite.c \
71.1653 +- getc.c \
71.1654 +- getchar.c \
71.1655 +- gets.c \
71.1656 +- iprintf.c \
71.1657 +- makebuf.c \
71.1658 +- mktemp.c \
71.1659 +- perror.c \
71.1660 +- printf.c \
71.1661 +- putc.c \
71.1662 +- putchar.c \
71.1663 +- puts.c \
71.1664 +- refill.c \
71.1665 +- remove.c \
71.1666 +- rename.c \
71.1667 +- rewind.c \
71.1668 +- rget.c \
71.1669 +- scanf.c \
71.1670 +- setbuf.c \
71.1671 +- setvbuf.c \
71.1672 +- siprintf.c \
71.1673 +- snprintf.c \
71.1674 +- sprintf.c \
71.1675 +- sscanf.c \
71.1676 +- stdio.c \
71.1677 +- tmpfile.c \
71.1678 +- tmpnam.c \
71.1679 +- ungetc.c \
71.1680 +- vfprintf.c \
71.1681 +- vfscanf.c \
71.1682 +- vprintf.c \
71.1683 +- vsnprintf.c \
71.1684 +- vsprintf.c \
71.1685 +- wbuf.c \
71.1686 +- wsetup.c
71.1687 ++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
71.1688 +
71.1689 +
71.1690 + lib_a_LIBADD = vfiprintf.o
71.1691 +
71.1692 +-CHEWOUT_FILES = \
71.1693 +- clearerr.def \
71.1694 +- fclose.def \
71.1695 +- fdopen.def \
71.1696 +- feof.def \
71.1697 +- ferror.def \
71.1698 +- fflush.def \
71.1699 +- fgetc.def \
71.1700 +- fgetpos.def \
71.1701 +- fgets.def \
71.1702 +- fileno.def \
71.1703 +- fiprintf.def \
71.1704 +- fopen.def \
71.1705 +- fputc.def \
71.1706 +- fputs.def \
71.1707 +- fread.def \
71.1708 +- freopen.def \
71.1709 +- fseek.def \
71.1710 +- fsetpos.def \
71.1711 +- ftell.def \
71.1712 +- fwrite.def \
71.1713 +- getc.def \
71.1714 +- getchar.def \
71.1715 +- gets.def \
71.1716 +- iprintf.def \
71.1717 +- mktemp.def \
71.1718 +- perror.def \
71.1719 +- putc.def \
71.1720 +- putchar.def \
71.1721 +- puts.def \
71.1722 +- remove.def \
71.1723 +- rename.def \
71.1724 +- rewind.def \
71.1725 +- setbuf.def \
71.1726 +- setvbuf.def \
71.1727 +- siprintf.def \
71.1728 +- sprintf.def \
71.1729 +- sscanf.def \
71.1730 +- tmpfile.def \
71.1731 +- tmpnam.def \
71.1732 +- vfprintf.def
71.1733 ++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
71.1734 +
71.1735 +
71.1736 + SUFFIXES = .def
71.1737 +@@ -316,7 +216,7 @@
71.1738 + @for file in $(DISTFILES); do \
71.1739 + if test -f $$file; then d=.; else d=$(srcdir); fi; \
71.1740 + if test -d $$d/$$file; then \
71.1741 +- cp -pr $$/$$file $(distdir)/$$file; \
71.1742 ++ cp -pr $$d/$$file $(distdir)/$$file; \
71.1743 + else \
71.1744 + test -f $(distdir)/$$file \
71.1745 + || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
71.1746 +diff -urN newlib-1.8.2/newlib/libc/stdlib/Makefile.in newlib-1.8.2-dc/newlib/libc/stdlib/Makefile.in
71.1747 +--- newlib-1.8.2/newlib/libc/stdlib/Makefile.in 1999-05-29 07:23:57.000000000 +1000
71.1748 ++++ newlib-1.8.2-dc/newlib/libc/stdlib/Makefile.in 2006-07-06 18:28:31.000000000 +1000
71.1749 +@@ -1,6 +1,6 @@
71.1750 +-# Makefile.in generated automatically by automake 1.3b from Makefile.am
71.1751 ++# Makefile.in generated automatically by automake 1.4 from Makefile.am
71.1752 +
71.1753 +-# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
71.1754 ++# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
71.1755 + # This Makefile.in is free software; the Free Software Foundation
71.1756 + # gives unlimited permission to copy and/or distribute it,
71.1757 + # with or without modifications, as long as this notice is preserved.
71.1758 +@@ -46,7 +46,7 @@
71.1759 + AUTOHEADER = @AUTOHEADER@
71.1760 +
71.1761 + INSTALL = @INSTALL@
71.1762 +-INSTALL_PROGRAM = @INSTALL_PROGRAM@
71.1763 ++INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
71.1764 + INSTALL_DATA = @INSTALL_DATA@
71.1765 + INSTALL_SCRIPT = @INSTALL_SCRIPT@
71.1766 + transform = @program_transform_name@
71.1767 +@@ -78,7 +78,6 @@
71.1768 + PACKAGE = @PACKAGE@
71.1769 + RANLIB = @RANLIB@
71.1770 + VERSION = @VERSION@
71.1771 +-mach_add_objs = @mach_add_objs@
71.1772 + machine_dir = @machine_dir@
71.1773 + newlib_basedir = @newlib_basedir@
71.1774 + sys_dir = @sys_dir@
71.1775 +@@ -89,102 +88,16 @@
71.1776 +
71.1777 + noinst_LIBRARIES = lib.a
71.1778 +
71.1779 +-lib_a_SOURCES = \
71.1780 +- __adjust.c \
71.1781 +- __exp10.c \
71.1782 +- __ten_mu.c \
71.1783 +- abort.c \
71.1784 +- abs.c \
71.1785 +- assert.c \
71.1786 +- atexit.c \
71.1787 +- atof.c \
71.1788 +- atoff.c \
71.1789 +- atoi.c \
71.1790 +- atol.c \
71.1791 +- bsearch.c \
71.1792 +- calloc.c \
71.1793 +- div.c \
71.1794 +- dtoa.c \
71.1795 +- dtoastub.c \
71.1796 +- ecvtbuf.c \
71.1797 +- efgcvt.c \
71.1798 +- environ.c \
71.1799 +- envlock.c \
71.1800 +- eprintf.c \
71.1801 +- exit.c \
71.1802 +- getenv.c \
71.1803 +- getenv_r.c \
71.1804 +- getopt.c \
71.1805 +- labs.c \
71.1806 +- ldiv.c \
71.1807 +- malign.c \
71.1808 +- malloc.c \
71.1809 +- mblen.c \
71.1810 +- mblen_r.c \
71.1811 +- mbstowcs.c \
71.1812 +- mbstowcs_r.c \
71.1813 +- mbtowc.c \
71.1814 +- mbtowc_r.c \
71.1815 +- mlock.c \
71.1816 +- mprec.c \
71.1817 +- msize.c \
71.1818 +- mstats.c \
71.1819 +- mtrim.c \
71.1820 +- putenv.c \
71.1821 +- qsort.c \
71.1822 +- rand.c \
71.1823 +- rand_r.c \
71.1824 +- realloc.c \
71.1825 +- setenv.c \
71.1826 +- setenv_r.c \
71.1827 +- strdup.c \
71.1828 +- strtod.c \
71.1829 +- strtol.c \
71.1830 +- strtoul.c \
71.1831 +- system.c \
71.1832 +- valloc.c \
71.1833 +- wcstombs.c \
71.1834 +- wcstombs_r.c \
71.1835 +- wctomb.c \
71.1836 +- wctomb_r.c
71.1837 ++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
71.1838 ++
71.1839 ++
71.1840 ++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
71.1841 +
71.1842 +-lib_a_LIBADD = mallocr.o freer.o reallocr.o callocr.o cfreer.o malignr.o \
71.1843 +- vallocr.o pvallocr.o mallinfor.o mallstatsr.o msizer.o malloptr.o
71.1844 +
71.1845 + MALLOC_COMPILE = $(COMPILE) -DINTERNAL_NEWLIB
71.1846 +
71.1847 +-CHEWOUT_FILES= \
71.1848 +- abort.def \
71.1849 +- abs.def \
71.1850 +- assert.def \
71.1851 +- atexit.def \
71.1852 +- atof.def \
71.1853 +- ecvtbuf.def \
71.1854 +- atoi.def \
71.1855 +- bsearch.def \
71.1856 +- calloc.def \
71.1857 +- div.def \
71.1858 +- efgcvt.def \
71.1859 +- envlock.def \
71.1860 +- exit.def \
71.1861 +- getenv.def \
71.1862 +- labs.def \
71.1863 +- ldiv.def \
71.1864 +- malloc.def \
71.1865 +- mallocr.def \
71.1866 +- mblen.def \
71.1867 +- mbstowcs.def \
71.1868 +- mbtowc.def \
71.1869 +- mlock.def \
71.1870 +- mstats.def \
71.1871 +- qsort.def \
71.1872 +- rand.def \
71.1873 +- strtod.def \
71.1874 +- strtol.def \
71.1875 +- strtoul.def \
71.1876 +- system.def \
71.1877 +- wcstombs.def \
71.1878 +- wctomb.def
71.1879 ++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
71.1880 ++
71.1881 +
71.1882 + SUFFIXES = .def
71.1883 +
71.1884 +@@ -207,30 +120,30 @@
71.1885 + malloptr.o
71.1886 + lib_a_OBJECTS = __adjust.o __exp10.o __ten_mu.o abort.o abs.o assert.o \
71.1887 + atexit.o atof.o atoff.o atoi.o atol.o bsearch.o calloc.o div.o dtoa.o \
71.1888 +-dtoastub.o ecvtbuf.o efgcvt.o environ.o envlock.o eprintf.o exit.o getenv.o getenv_r.o \
71.1889 +-getopt.o labs.o ldiv.o malign.o malloc.o mblen.o mblen_r.o mbstowcs.o \
71.1890 +-mbstowcs_r.o mbtowc.o mbtowc_r.o mlock.o mprec.o msize.o mstats.o \
71.1891 +-mtrim.o putenv.o qsort.o rand.o rand_r.o realloc.o setenv.o setenv_r.o strdup.o \
71.1892 +-strtod.o strtol.o strtoul.o system.o valloc.o wcstombs.o wcstombs_r.o \
71.1893 +-wctomb.o wctomb_r.o
71.1894 ++dtoastub.o ecvtbuf.o efgcvt.o environ.o envlock.o eprintf.o exit.o \
71.1895 ++getenv.o getenv_r.o getopt.o labs.o ldiv.o malign.o malloc.o mblen.o \
71.1896 ++mblen_r.o mbstowcs.o mbstowcs_r.o mbtowc.o mbtowc_r.o mlock.o mprec.o \
71.1897 ++msize.o mstats.o mtrim.o putenv.o qsort.o rand.o rand_r.o realloc.o \
71.1898 ++setenv.o setenv_r.o strdup.o strtod.o strtol.o strtoul.o system.o \
71.1899 ++valloc.o wcstombs.o wcstombs_r.o wctomb.o wctomb_r.o
71.1900 + CFLAGS = @CFLAGS@
71.1901 + COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
71.1902 +-LINK = $(CC) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
71.1903 ++CCLD = $(CC)
71.1904 ++LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
71.1905 + DIST_COMMON = Makefile.am Makefile.in
71.1906 +
71.1907 +
71.1908 + DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
71.1909 +
71.1910 + TAR = tar
71.1911 +-GZIP = --best
71.1912 ++GZIP_ENV = --best
71.1913 + SOURCES = $(lib_a_SOURCES)
71.1914 + OBJECTS = $(lib_a_OBJECTS)
71.1915 +
71.1916 +-all: Makefile $(LIBRARIES)
71.1917 +-
71.1918 ++all: all-redirect
71.1919 + .SUFFIXES:
71.1920 + .SUFFIXES: .S .c .def .o .s
71.1921 +-$(srcdir)/Makefile.in: @MAINT@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
71.1922 ++$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
71.1923 + cd $(top_srcdir) && $(AUTOMAKE) --cygnus stdlib/Makefile
71.1924 +
71.1925 + Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
71.1926 +@@ -274,8 +187,12 @@
71.1927 + tags: TAGS
71.1928 +
71.1929 + ID: $(HEADERS) $(SOURCES) $(LISP)
71.1930 ++ list='$(SOURCES) $(HEADERS)'; \
71.1931 ++ unique=`for i in $$list; do echo $$i; done | \
71.1932 ++ awk ' { files[$$0] = 1; } \
71.1933 ++ END { for (i in files) print i; }'`; \
71.1934 + here=`pwd` && cd $(srcdir) \
71.1935 +- && mkid -f$$here/ID $(SOURCES) $(HEADERS) $(LISP)
71.1936 ++ && mkid -f$$here/ID $$unique $(LISP)
71.1937 +
71.1938 + TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
71.1939 + tags=; \
71.1940 +@@ -303,28 +220,39 @@
71.1941 + distdir: $(DISTFILES)
71.1942 + @for file in $(DISTFILES); do \
71.1943 + if test -f $$file; then d=.; else d=$(srcdir); fi; \
71.1944 +- test -f $(distdir)/$$file \
71.1945 +- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
71.1946 +- || cp -p $$d/$$file $(distdir)/$$file; \
71.1947 ++ if test -d $$d/$$file; then \
71.1948 ++ cp -pr $$d/$$file $(distdir)/$$file; \
71.1949 ++ else \
71.1950 ++ test -f $(distdir)/$$file \
71.1951 ++ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
71.1952 ++ || cp -p $$d/$$file $(distdir)/$$file || :; \
71.1953 ++ fi; \
71.1954 + done
71.1955 +-info:
71.1956 +-dvi:
71.1957 +-check:
71.1958 +-installcheck:
71.1959 +-install-info:
71.1960 +-install-exec:
71.1961 +- @$(NORMAL_INSTALL)
71.1962 +-
71.1963 +-install-data:
71.1964 +- @$(NORMAL_INSTALL)
71.1965 +-
71.1966 +-install: install-exec install-data all
71.1967 +- @:
71.1968 +-
71.1969 +-uninstall:
71.1970 +-
71.1971 ++info-am:
71.1972 ++info: info-am
71.1973 ++dvi-am:
71.1974 ++dvi: dvi-am
71.1975 ++check-am:
71.1976 ++check: check-am
71.1977 ++installcheck-am:
71.1978 ++installcheck: installcheck-am
71.1979 ++install-info-am:
71.1980 ++install-info: install-info-am
71.1981 ++install-exec-am:
71.1982 ++install-exec: install-exec-am
71.1983 ++
71.1984 ++install-data-am:
71.1985 ++install-data: install-data-am
71.1986 ++
71.1987 ++install-am: all-am
71.1988 ++ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
71.1989 ++install: install-am
71.1990 ++uninstall-am:
71.1991 ++uninstall: uninstall-am
71.1992 ++all-am: Makefile $(LIBRARIES)
71.1993 ++all-redirect: all-am
71.1994 + install-strip:
71.1995 +- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
71.1996 ++ $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
71.1997 + installdirs:
71.1998 +
71.1999 +
71.2000 +@@ -338,29 +266,38 @@
71.2001 + -rm -f config.cache config.log stamp-h stamp-h[0-9]*
71.2002 +
71.2003 + maintainer-clean-generic:
71.2004 +-mostlyclean: mostlyclean-noinstLIBRARIES mostlyclean-compile \
71.2005 ++mostlyclean-am: mostlyclean-noinstLIBRARIES mostlyclean-compile \
71.2006 + mostlyclean-tags mostlyclean-generic
71.2007 +
71.2008 +-clean: clean-noinstLIBRARIES clean-compile clean-tags clean-generic \
71.2009 +- mostlyclean
71.2010 ++mostlyclean: mostlyclean-am
71.2011 +
71.2012 +-distclean: distclean-noinstLIBRARIES distclean-compile distclean-tags \
71.2013 +- distclean-generic clean
71.2014 +- -rm -f config.status
71.2015 ++clean-am: clean-noinstLIBRARIES clean-compile clean-tags clean-generic \
71.2016 ++ mostlyclean-am
71.2017 +
71.2018 +-maintainer-clean: maintainer-clean-noinstLIBRARIES \
71.2019 ++clean: clean-am
71.2020 ++
71.2021 ++distclean-am: distclean-noinstLIBRARIES distclean-compile \
71.2022 ++ distclean-tags distclean-generic clean-am
71.2023 ++
71.2024 ++distclean: distclean-am
71.2025 ++
71.2026 ++maintainer-clean-am: maintainer-clean-noinstLIBRARIES \
71.2027 + maintainer-clean-compile maintainer-clean-tags \
71.2028 +- maintainer-clean-generic distclean
71.2029 ++ maintainer-clean-generic distclean-am
71.2030 + @echo "This command is intended for maintainers to use;"
71.2031 + @echo "it deletes files that may require special tools to rebuild."
71.2032 +
71.2033 ++maintainer-clean: maintainer-clean-am
71.2034 ++
71.2035 + .PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \
71.2036 + clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
71.2037 + mostlyclean-compile distclean-compile clean-compile \
71.2038 + maintainer-clean-compile tags mostlyclean-tags distclean-tags \
71.2039 +-clean-tags maintainer-clean-tags distdir info dvi installcheck \
71.2040 +-install-info install-exec install-data install uninstall all \
71.2041 +-installdirs mostlyclean-generic distclean-generic clean-generic \
71.2042 ++clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \
71.2043 ++check-am installcheck-am installcheck install-info-am install-info \
71.2044 ++install-exec-am install-exec install-data-am install-data install-am \
71.2045 ++install uninstall-am uninstall all-redirect all-am all installdirs \
71.2046 ++mostlyclean-generic distclean-generic clean-generic \
71.2047 + maintainer-clean-generic clean mostlyclean distclean maintainer-clean
71.2048 +
71.2049 +
71.2050 +diff -urN newlib-1.8.2/newlib/libc/string/Makefile.in newlib-1.8.2-dc/newlib/libc/string/Makefile.in
71.2051 +--- newlib-1.8.2/newlib/libc/string/Makefile.in 1998-12-01 08:03:47.000000000 +1000
71.2052 ++++ newlib-1.8.2-dc/newlib/libc/string/Makefile.in 2006-07-06 18:28:31.000000000 +1000
71.2053 +@@ -1,6 +1,6 @@
71.2054 +-# Makefile.in generated automatically by automake 1.3b from Makefile.am
71.2055 ++# Makefile.in generated automatically by automake 1.4 from Makefile.am
71.2056 +
71.2057 +-# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
71.2058 ++# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
71.2059 + # This Makefile.in is free software; the Free Software Foundation
71.2060 + # gives unlimited permission to copy and/or distribute it,
71.2061 + # with or without modifications, as long as this notice is preserved.
71.2062 +@@ -46,7 +46,7 @@
71.2063 + AUTOHEADER = @AUTOHEADER@
71.2064 +
71.2065 + INSTALL = @INSTALL@
71.2066 +-INSTALL_PROGRAM = @INSTALL_PROGRAM@
71.2067 ++INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
71.2068 + INSTALL_DATA = @INSTALL_DATA@
71.2069 + INSTALL_SCRIPT = @INSTALL_SCRIPT@
71.2070 + transform = @program_transform_name@
71.2071 +@@ -78,7 +78,6 @@
71.2072 + PACKAGE = @PACKAGE@
71.2073 + RANLIB = @RANLIB@
71.2074 + VERSION = @VERSION@
71.2075 +-mach_add_objs = @mach_add_objs@
71.2076 + machine_dir = @machine_dir@
71.2077 + newlib_basedir = @newlib_basedir@
71.2078 + sys_dir = @sys_dir@
71.2079 +@@ -89,49 +88,11 @@
71.2080 +
71.2081 + noinst_LIBRARIES = lib.a
71.2082 +
71.2083 +-lib_a_SOURCES = \
71.2084 +- bcmp.c \
71.2085 +- bcopy.c \
71.2086 +- bzero.c \
71.2087 +- index.c \
71.2088 +- memchr.c \
71.2089 +- memcmp.c \
71.2090 +- memcpy.c \
71.2091 +- memmove.c \
71.2092 +- memset.c \
71.2093 +- rindex.c \
71.2094 +- strcat.c \
71.2095 +- strchr.c \
71.2096 +- strcmp.c \
71.2097 +- strcasecmp.c \
71.2098 +- strcoll.c \
71.2099 +- strcpy.c \
71.2100 +- strcspn.c \
71.2101 +- strerror.c \
71.2102 +- strlen.c \
71.2103 +- strlwr.c \
71.2104 +- strncat.c \
71.2105 +- strncmp.c \
71.2106 +- strncasecmp.c \
71.2107 +- strncpy.c \
71.2108 +- strpbrk.c \
71.2109 +- strrchr.c \
71.2110 +- strspn.c \
71.2111 +- strtok.c \
71.2112 +- strtok_r.c \
71.2113 +- strupr.c \
71.2114 +- strxfrm.c \
71.2115 +- strstr.c \
71.2116 +- u_strerr.c
71.2117 +-
71.2118 +-CHEWOUT_FILES=\
71.2119 +-bcmp.def memcpy.def strcmp.def strncat.def strstr.def \
71.2120 +-bcopy.def memmove.def strcoll.def strncmp.def strtok.def \
71.2121 +-bzero.def memset.def strcpy.def strncpy.def strxfrm.def \
71.2122 +-index.def rindex.def strcspn.def strpbrk.def \
71.2123 +-memchr.def strcat.def strerror.def strrchr.def \
71.2124 +-memcmp.def strchr.def strlen.def strspn.def \
71.2125 +-strcasecmp.def strncasecmp.def strlwr.def strupr.def
71.2126 ++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
71.2127 ++
71.2128 ++
71.2129 ++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
71.2130 ++
71.2131 +
71.2132 + SUFFIXES = .def
71.2133 +
71.2134 +@@ -157,22 +118,22 @@
71.2135 + strspn.o strtok.o strtok_r.o strupr.o strxfrm.o strstr.o u_strerr.o
71.2136 + CFLAGS = @CFLAGS@
71.2137 + COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
71.2138 +-LINK = $(CC) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
71.2139 ++CCLD = $(CC)
71.2140 ++LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
71.2141 + DIST_COMMON = Makefile.am Makefile.in
71.2142 +
71.2143 +
71.2144 + DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
71.2145 +
71.2146 + TAR = tar
71.2147 +-GZIP = --best
71.2148 ++GZIP_ENV = --best
71.2149 + SOURCES = $(lib_a_SOURCES)
71.2150 + OBJECTS = $(lib_a_OBJECTS)
71.2151 +
71.2152 +-all: Makefile $(LIBRARIES)
71.2153 +-
71.2154 ++all: all-redirect
71.2155 + .SUFFIXES:
71.2156 + .SUFFIXES: .S .c .def .o .s
71.2157 +-$(srcdir)/Makefile.in: @MAINT@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
71.2158 ++$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
71.2159 + cd $(top_srcdir) && $(AUTOMAKE) --cygnus string/Makefile
71.2160 +
71.2161 + Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
71.2162 +@@ -216,8 +177,12 @@
71.2163 + tags: TAGS
71.2164 +
71.2165 + ID: $(HEADERS) $(SOURCES) $(LISP)
71.2166 ++ list='$(SOURCES) $(HEADERS)'; \
71.2167 ++ unique=`for i in $$list; do echo $$i; done | \
71.2168 ++ awk ' { files[$$0] = 1; } \
71.2169 ++ END { for (i in files) print i; }'`; \
71.2170 + here=`pwd` && cd $(srcdir) \
71.2171 +- && mkid -f$$here/ID $(SOURCES) $(HEADERS) $(LISP)
71.2172 ++ && mkid -f$$here/ID $$unique $(LISP)
71.2173 +
71.2174 + TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
71.2175 + tags=; \
71.2176 +@@ -245,28 +210,39 @@
71.2177 + distdir: $(DISTFILES)
71.2178 + @for file in $(DISTFILES); do \
71.2179 + if test -f $$file; then d=.; else d=$(srcdir); fi; \
71.2180 +- test -f $(distdir)/$$file \
71.2181 +- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
71.2182 +- || cp -p $$d/$$file $(distdir)/$$file; \
71.2183 ++ if test -d $$d/$$file; then \
71.2184 ++ cp -pr $$d/$$file $(distdir)/$$file; \
71.2185 ++ else \
71.2186 ++ test -f $(distdir)/$$file \
71.2187 ++ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
71.2188 ++ || cp -p $$d/$$file $(distdir)/$$file || :; \
71.2189 ++ fi; \
71.2190 + done
71.2191 +-info:
71.2192 +-dvi:
71.2193 +-check:
71.2194 +-installcheck:
71.2195 +-install-info:
71.2196 +-install-exec:
71.2197 +- @$(NORMAL_INSTALL)
71.2198 +-
71.2199 +-install-data:
71.2200 +- @$(NORMAL_INSTALL)
71.2201 +-
71.2202 +-install: install-exec install-data all
71.2203 +- @:
71.2204 +-
71.2205 +-uninstall:
71.2206 +-
71.2207 ++info-am:
71.2208 ++info: info-am
71.2209 ++dvi-am:
71.2210 ++dvi: dvi-am
71.2211 ++check-am:
71.2212 ++check: check-am
71.2213 ++installcheck-am:
71.2214 ++installcheck: installcheck-am
71.2215 ++install-info-am:
71.2216 ++install-info: install-info-am
71.2217 ++install-exec-am:
71.2218 ++install-exec: install-exec-am
71.2219 ++
71.2220 ++install-data-am:
71.2221 ++install-data: install-data-am
71.2222 ++
71.2223 ++install-am: all-am
71.2224 ++ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
71.2225 ++install: install-am
71.2226 ++uninstall-am:
71.2227 ++uninstall: uninstall-am
71.2228 ++all-am: Makefile $(LIBRARIES)
71.2229 ++all-redirect: all-am
71.2230 + install-strip:
71.2231 +- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
71.2232 ++ $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
71.2233 + installdirs:
71.2234 +
71.2235 +
71.2236 +@@ -280,29 +256,38 @@
71.2237 + -rm -f config.cache config.log stamp-h stamp-h[0-9]*
71.2238 +
71.2239 + maintainer-clean-generic:
71.2240 +-mostlyclean: mostlyclean-noinstLIBRARIES mostlyclean-compile \
71.2241 ++mostlyclean-am: mostlyclean-noinstLIBRARIES mostlyclean-compile \
71.2242 + mostlyclean-tags mostlyclean-generic
71.2243 +
71.2244 +-clean: clean-noinstLIBRARIES clean-compile clean-tags clean-generic \
71.2245 +- mostlyclean
71.2246 ++mostlyclean: mostlyclean-am
71.2247 +
71.2248 +-distclean: distclean-noinstLIBRARIES distclean-compile distclean-tags \
71.2249 +- distclean-generic clean
71.2250 +- -rm -f config.status
71.2251 ++clean-am: clean-noinstLIBRARIES clean-compile clean-tags clean-generic \
71.2252 ++ mostlyclean-am
71.2253 +
71.2254 +-maintainer-clean: maintainer-clean-noinstLIBRARIES \
71.2255 ++clean: clean-am
71.2256 ++
71.2257 ++distclean-am: distclean-noinstLIBRARIES distclean-compile \
71.2258 ++ distclean-tags distclean-generic clean-am
71.2259 ++
71.2260 ++distclean: distclean-am
71.2261 ++
71.2262 ++maintainer-clean-am: maintainer-clean-noinstLIBRARIES \
71.2263 + maintainer-clean-compile maintainer-clean-tags \
71.2264 +- maintainer-clean-generic distclean
71.2265 ++ maintainer-clean-generic distclean-am
71.2266 + @echo "This command is intended for maintainers to use;"
71.2267 + @echo "it deletes files that may require special tools to rebuild."
71.2268 +
71.2269 ++maintainer-clean: maintainer-clean-am
71.2270 ++
71.2271 + .PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \
71.2272 + clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
71.2273 + mostlyclean-compile distclean-compile clean-compile \
71.2274 + maintainer-clean-compile tags mostlyclean-tags distclean-tags \
71.2275 +-clean-tags maintainer-clean-tags distdir info dvi installcheck \
71.2276 +-install-info install-exec install-data install uninstall all \
71.2277 +-installdirs mostlyclean-generic distclean-generic clean-generic \
71.2278 ++clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \
71.2279 ++check-am installcheck-am installcheck install-info-am install-info \
71.2280 ++install-exec-am install-exec install-data-am install-data install-am \
71.2281 ++install uninstall-am uninstall all-redirect all-am all installdirs \
71.2282 ++mostlyclean-generic distclean-generic clean-generic \
71.2283 + maintainer-clean-generic clean mostlyclean distclean maintainer-clean
71.2284 +
71.2285 +
71.2286 +diff -urN newlib-1.8.2/newlib/libc/sys/configure newlib-1.8.2-dc/newlib/libc/sys/configure
71.2287 +--- newlib-1.8.2/newlib/libc/sys/configure 1999-06-04 07:34:55.000000000 +1000
71.2288 ++++ newlib-1.8.2-dc/newlib/libc/sys/configure 2006-07-06 18:28:31.000000000 +1000
71.2289 +@@ -1342,7 +1342,7 @@
71.2290 + if { (eval echo configure:1343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
71.2291 + for file in conftest.*; do
71.2292 + case $file in
71.2293 +- *.c | *.o | *.obj | *.ilk | *.pdb) ;;
71.2294 ++ *.c | *.o | *.obj) ;;
71.2295 + *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
71.2296 + esac
71.2297 + done
71.2298 +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
71.2299 +--- newlib-1.8.2/newlib/libc/sys/dreamcast/absolute_vfs.c 1970-01-01 10:00:00.000000000 +1000
71.2300 ++++ newlib-1.8.2-dc/newlib/libc/sys/dreamcast/absolute_vfs.c 2006-07-06 18:28:31.000000000 +1000
71.2301 +@@ -0,0 +1,11 @@
71.2302 ++#include "vfs.h"
71.2303 ++
71.2304 ++int _newlib_vfs_is_absolute (void)
71.2305 ++{
71.2306 ++ return 0;
71.2307 ++}
71.2308 ++
71.2309 ++void _newlib_vfs_absolute_load (void)
71.2310 ++{
71.2311 ++ _newlib_vfs_initialized = VFS_LOADER_ABSOLUTE;
71.2312 ++}
71.2313 +diff -urN newlib-1.8.2/newlib/libc/sys/dreamcast/aclocal.m4 newlib-1.8.2-dc/newlib/libc/sys/dreamcast/aclocal.m4
71.2314 +--- newlib-1.8.2/newlib/libc/sys/dreamcast/aclocal.m4 1970-01-01 10:00:00.000000000 +1000
71.2315 ++++ newlib-1.8.2-dc/newlib/libc/sys/dreamcast/aclocal.m4 2006-07-06 18:28:31.000000000 +1000
71.2316 +@@ -0,0 +1,345 @@
71.2317 ++dnl aclocal.m4 generated automatically by aclocal 1.3b
71.2318 ++
71.2319 ++dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
71.2320 ++dnl This file is free software; the Free Software Foundation
71.2321 ++dnl gives unlimited permission to copy and/or distribute it,
71.2322 ++dnl with or without modifications, as long as this notice is preserved.
71.2323 ++
71.2324 ++dnl This program is distributed in the hope that it will be useful,
71.2325 ++dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
71.2326 ++dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
71.2327 ++dnl PARTICULAR PURPOSE.
71.2328 ++
71.2329 ++dnl This provides configure definitions used by all the newlib
71.2330 ++dnl configure.in files.
71.2331 ++
71.2332 ++dnl Basic newlib configury. This calls basic introductory stuff,
71.2333 ++dnl including AM_INIT_AUTOMAKE and AC_CANONICAL_HOST. It also runs
71.2334 ++dnl configure.host. The only argument is the relative path to the top
71.2335 ++dnl newlib directory.
71.2336 ++
71.2337 ++AC_DEFUN(NEWLIB_CONFIGURE,
71.2338 ++[
71.2339 ++dnl Default to --enable-multilib
71.2340 ++AC_ARG_ENABLE(multilib,
71.2341 ++[ --enable-multilib build many library versions (default)],
71.2342 ++[case "${enableval}" in
71.2343 ++ yes) multilib=yes ;;
71.2344 ++ no) multilib=no ;;
71.2345 ++ *) AC_MSG_ERROR(bad value ${enableval} for multilib option) ;;
71.2346 ++ esac], [multilib=yes])dnl
71.2347 ++
71.2348 ++dnl Support --enable-target-optspace
71.2349 ++AC_ARG_ENABLE(target-optspace,
71.2350 ++[ --enable-target-optspace optimize for space],
71.2351 ++[case "${enableval}" in
71.2352 ++ yes) target_optspace=yes ;;
71.2353 ++ no) target_optspace=no ;;
71.2354 ++ *) AC_MSG_ERROR(bad value ${enableval} for target-optspace option) ;;
71.2355 ++ esac], [target_optspace=])dnl
71.2356 ++
71.2357 ++dnl Support --enable-newlib-mb
71.2358 ++AC_ARG_ENABLE(newlib-mb,
71.2359 ++[ --enable-newlib-mb enable multibyte support],
71.2360 ++[case "${enableval}" in
71.2361 ++ yes) newlib_mb=yes ;;
71.2362 ++ no) newlib_mb=no ;;
71.2363 ++ *) AC_MSG_ERROR(bad value ${enableval} for newlib-mb option) ;;
71.2364 ++ esac], [newlib_mb=no])dnl
71.2365 ++
71.2366 ++dnl We may get other options which we don't document:
71.2367 ++dnl --with-target-subdir, --with-multisrctop, --with-multisubdir
71.2368 ++
71.2369 ++test -z "[$]{with_target_subdir}" && with_target_subdir=.
71.2370 ++
71.2371 ++if test "[$]{srcdir}" = "."; then
71.2372 ++ if test "[$]{with_target_subdir}" != "."; then
71.2373 ++ newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}../$1"
71.2374 ++ else
71.2375 ++ newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}$1"
71.2376 ++ fi
71.2377 ++else
71.2378 ++ newlib_basedir="[$]{srcdir}/$1"
71.2379 ++fi
71.2380 ++AC_SUBST(newlib_basedir)
71.2381 ++
71.2382 ++AC_CANONICAL_HOST
71.2383 ++
71.2384 ++AM_INIT_AUTOMAKE(newlib, 1.8.1)
71.2385 ++
71.2386 ++# FIXME: We temporarily define our own version of AC_PROG_CC. This is
71.2387 ++# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
71.2388 ++# are probably using a cross compiler, which will not be able to fully
71.2389 ++# link an executable. This should really be fixed in autoconf
71.2390 ++# itself.
71.2391 ++
71.2392 ++AC_DEFUN(LIB_AC_PROG_CC,
71.2393 ++[AC_BEFORE([$0], [AC_PROG_CPP])dnl
71.2394 ++AC_CHECK_PROG(CC, gcc, gcc)
71.2395 ++if test -z "$CC"; then
71.2396 ++ AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
71.2397 ++ test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
71.2398 ++fi
71.2399 ++
71.2400 ++AC_PROG_CC_GNU
71.2401 ++
71.2402 ++if test $ac_cv_prog_gcc = yes; then
71.2403 ++ GCC=yes
71.2404 ++dnl Check whether -g works, even if CFLAGS is set, in case the package
71.2405 ++dnl plays around with CFLAGS (such as to build both debugging and
71.2406 ++dnl normal versions of a library), tasteless as that idea is.
71.2407 ++ ac_test_CFLAGS="${CFLAGS+set}"
71.2408 ++ ac_save_CFLAGS="$CFLAGS"
71.2409 ++ CFLAGS=
71.2410 ++ AC_PROG_CC_G
71.2411 ++ if test "$ac_test_CFLAGS" = set; then
71.2412 ++ CFLAGS="$ac_save_CFLAGS"
71.2413 ++ elif test $ac_cv_prog_cc_g = yes; then
71.2414 ++ CFLAGS="-g -O2"
71.2415 ++ else
71.2416 ++ CFLAGS="-O2"
71.2417 ++ fi
71.2418 ++else
71.2419 ++ GCC=
71.2420 ++ test "${CFLAGS+set}" = set || CFLAGS="-g"
71.2421 ++fi
71.2422 ++])
71.2423 ++
71.2424 ++LIB_AC_PROG_CC
71.2425 ++
71.2426 ++# AC_CHECK_TOOL does AC_REQUIRE (AC_CANONICAL_BUILD). If we don't
71.2427 ++# run it explicitly here, it will be run implicitly before
71.2428 ++# NEWLIB_CONFIGURE, which doesn't work because that means that it will
71.2429 ++# be run before AC_CANONICAL_HOST.
71.2430 ++AC_CANONICAL_BUILD
71.2431 ++
71.2432 ++AC_CHECK_TOOL(AS, as)
71.2433 ++AC_CHECK_TOOL(AR, ar)
71.2434 ++AC_CHECK_TOOL(RANLIB, ranlib, :)
71.2435 ++
71.2436 ++AM_PROG_INSTALL
71.2437 ++
71.2438 ++#AM_MAINTAINER_MODE
71.2439 ++
71.2440 ++# We need AM_EXEEXT to keep automake happy in cygnus mode. However,
71.2441 ++# at least currently, we never actually build a program, so we never
71.2442 ++# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
71.2443 ++# fails, because we are probably configuring with a cross compiler
71.2444 ++# which can't create executables. So we include AM_EXEEXT to keep
71.2445 ++# automake happy, but we don't execute it, since we don't care about
71.2446 ++# the result.
71.2447 ++if false; then
71.2448 ++ AM_EXEEXT
71.2449 ++fi
71.2450 ++
71.2451 ++. [$]{newlib_basedir}/configure.host
71.2452 ++
71.2453 ++case [$]{newlib_basedir} in
71.2454 ++/* | [A-Za-z]:[/\\]*) newlib_flagbasedir=[$]{newlib_basedir} ;;
71.2455 ++*) newlib_flagbasedir='[$](top_builddir)/'[$]{newlib_basedir} ;;
71.2456 ++esac
71.2457 ++
71.2458 ++newlib_cflags="[$]{newlib_cflags} -I"'[$](top_builddir)'"/$1/targ-include -I[$]{newlib_flagbasedir}/libc/include"
71.2459 ++case "${host}" in
71.2460 ++ *-*-cygwin32*)
71.2461 ++ newlib_cflags="[$]{newlib_cflags} -I[$]{newlib_flagbasedir}/../winsup/include"
71.2462 ++ ;;
71.2463 ++esac
71.2464 ++
71.2465 ++newlib_cflags="[$]{newlib_cflags} -fno-builtin"
71.2466 ++
71.2467 ++NEWLIB_CFLAGS=${newlib_cflags}
71.2468 ++AC_SUBST(NEWLIB_CFLAGS)
71.2469 ++
71.2470 ++AC_SUBST(machine_dir)
71.2471 ++AC_SUBST(sys_dir)
71.2472 ++])
71.2473 ++
71.2474 ++# Do all the work for Automake. This macro actually does too much --
71.2475 ++# some checks are only needed if your package does certain things.
71.2476 ++# But this isn't really a big deal.
71.2477 ++
71.2478 ++# serial 1
71.2479 ++
71.2480 ++dnl Usage:
71.2481 ++dnl AM_INIT_AUTOMAKE(package,version, [no-define])
71.2482 ++
71.2483 ++AC_DEFUN(AM_INIT_AUTOMAKE,
71.2484 ++[AC_REQUIRE([AM_PROG_INSTALL])
71.2485 ++PACKAGE=[$1]
71.2486 ++AC_SUBST(PACKAGE)
71.2487 ++VERSION=[$2]
71.2488 ++AC_SUBST(VERSION)
71.2489 ++dnl test to see if srcdir already configured
71.2490 ++if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
71.2491 ++ AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
71.2492 ++fi
71.2493 ++ifelse([$3],,
71.2494 ++AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
71.2495 ++AC_DEFINE_UNQUOTED(VERSION, "$VERSION"))
71.2496 ++AC_REQUIRE([AM_SANITY_CHECK])
71.2497 ++AC_REQUIRE([AC_ARG_PROGRAM])
71.2498 ++dnl FIXME This is truly gross.
71.2499 ++missing_dir=`cd $ac_aux_dir && pwd`
71.2500 ++AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
71.2501 ++AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
71.2502 ++AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
71.2503 ++AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
71.2504 ++AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
71.2505 ++AC_REQUIRE([AC_PROG_MAKE_SET])])
71.2506 ++
71.2507 ++
71.2508 ++# serial 1
71.2509 ++
71.2510 ++AC_DEFUN(AM_PROG_INSTALL,
71.2511 ++[AC_REQUIRE([AC_PROG_INSTALL])
71.2512 ++test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
71.2513 ++AC_SUBST(INSTALL_SCRIPT)dnl
71.2514 ++])
71.2515 ++
71.2516 ++#
71.2517 ++# Check to make sure that the build environment is sane.
71.2518 ++#
71.2519 ++
71.2520 ++AC_DEFUN(AM_SANITY_CHECK,
71.2521 ++[AC_MSG_CHECKING([whether build environment is sane])
71.2522 ++# Just in case
71.2523 ++sleep 1
71.2524 ++echo timestamp > conftestfile
71.2525 ++# Do `set' in a subshell so we don't clobber the current shell's
71.2526 ++# arguments. Must try -L first in case configure is actually a
71.2527 ++# symlink; some systems play weird games with the mod time of symlinks
71.2528 ++# (eg FreeBSD returns the mod time of the symlink's containing
71.2529 ++# directory).
71.2530 ++if (
71.2531 ++ set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
71.2532 ++ if test "[$]*" = "X"; then
71.2533 ++ # -L didn't work.
71.2534 ++ set X `ls -t $srcdir/configure conftestfile`
71.2535 ++ fi
71.2536 ++ if test "[$]*" != "X $srcdir/configure conftestfile" \
71.2537 ++ && test "[$]*" != "X conftestfile $srcdir/configure"; then
71.2538 ++
71.2539 ++ # If neither matched, then we have a broken ls. This can happen
71.2540 ++ # if, for instance, CONFIG_SHELL is bash and it inherits a
71.2541 ++ # broken ls alias from the environment. This has actually
71.2542 ++ # happened. Such a system could not be considered "sane".
71.2543 ++ AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
71.2544 ++alias in your environment])
71.2545 ++ fi
71.2546 ++
71.2547 ++ test "[$]2" = conftestfile
71.2548 ++ )
71.2549 ++then
71.2550 ++ # Ok.
71.2551 ++ :
71.2552 ++else
71.2553 ++ AC_MSG_ERROR([newly created file is older than distributed files!
71.2554 ++Check your system clock])
71.2555 ++fi
71.2556 ++rm -f conftest*
71.2557 ++AC_MSG_RESULT(yes)])
71.2558 ++
71.2559 ++dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
71.2560 ++dnl The program must properly implement --version.
71.2561 ++AC_DEFUN(AM_MISSING_PROG,
71.2562 ++[AC_MSG_CHECKING(for working $2)
71.2563 ++# Run test in a subshell; some versions of sh will print an error if
71.2564 ++# an executable is not found, even if stderr is redirected.
71.2565 ++# Redirect stdin to placate older versions of autoconf. Sigh.
71.2566 ++if ($2 --version) < /dev/null > /dev/null 2>&1; then
71.2567 ++ $1=$2
71.2568 ++ AC_MSG_RESULT(found)
71.2569 ++else
71.2570 ++ $1="$3/missing $2"
71.2571 ++ AC_MSG_RESULT(missing)
71.2572 ++fi
71.2573 ++AC_SUBST($1)])
71.2574 ++
71.2575 ++# Add --enable-maintainer-mode option to configure.
71.2576 ++# From Jim Meyering
71.2577 ++
71.2578 ++# serial 1
71.2579 ++
71.2580 ++AC_DEFUN(AM_MAINTAINER_MODE,
71.2581 ++[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
71.2582 ++ dnl maintainer-mode is disabled by default
71.2583 ++ AC_ARG_ENABLE(maintainer-mode,
71.2584 ++[ --enable-maintainer-mode enable make rules and dependencies not useful
71.2585 ++ (and sometimes confusing) to the casual installer],
71.2586 ++ USE_MAINTAINER_MODE=$enableval,
71.2587 ++ USE_MAINTAINER_MODE=no)
71.2588 ++ AC_MSG_RESULT($USE_MAINTAINER_MODE)
71.2589 ++ if test $USE_MAINTAINER_MODE = yes; then
71.2590 ++ MAINT=
71.2591 ++ else
71.2592 ++ MAINT='#M#'
71.2593 ++ fi
71.2594 ++# AC_SUBST(MAINT)dnl
71.2595 ++]
71.2596 ++)
71.2597 ++
71.2598 ++# Check to see if we're running under Win32, without using
71.2599 ++# AC_CANONICAL_*. If so, set output variable EXEEXT to ".exe".
71.2600 ++# Otherwise set it to "".
71.2601 ++
71.2602 ++dnl AM_EXEEXT()
71.2603 ++dnl This knows we add .exe if we're building in the Cygwin32
71.2604 ++dnl environment. But if we're not, then it compiles a test program
71.2605 ++dnl to see if there is a suffix for executables.
71.2606 ++AC_DEFUN(AM_EXEEXT,
71.2607 ++[AC_REQUIRE([AM_CYGWIN32])
71.2608 ++AC_REQUIRE([AM_MINGW32])
71.2609 ++AC_MSG_CHECKING([for executable suffix])
71.2610 ++AC_CACHE_VAL(am_cv_exeext,
71.2611 ++[if test "$CYGWIN32" = yes || test "$MINGW32" = yes; then
71.2612 ++am_cv_exeext=.exe
71.2613 ++else
71.2614 ++cat > am_c_test.c << 'EOF'
71.2615 ++int main() {
71.2616 ++/* Nothing needed here */
71.2617 ++}
71.2618 ++EOF
71.2619 ++${CC-cc} -o am_c_test $CFLAGS $CPPFLAGS $LDFLAGS am_c_test.c $LIBS 1>&5
71.2620 ++am_cv_exeext=
71.2621 ++for file in am_c_test.*; do
71.2622 ++ case $file in
71.2623 ++ *.c) ;;
71.2624 ++ *.o) ;;
71.2625 ++ *) am_cv_exeext=`echo $file | sed -e s/am_c_test//` ;;
71.2626 ++ esac
71.2627 ++done
71.2628 ++rm -f am_c_test*])
71.2629 ++test x"${am_cv_exeext}" = x && am_cv_exeext=no
71.2630 ++fi
71.2631 ++EXEEXT=""
71.2632 ++test x"${am_cv_exeext}" != xno && EXEEXT=${am_cv_exeext}
71.2633 ++AC_MSG_RESULT(${am_cv_exeext})
71.2634 ++AC_SUBST(EXEEXT)])
71.2635 ++
71.2636 ++# Check to see if we're running under Cygwin32, without using
71.2637 ++# AC_CANONICAL_*. If so, set output variable CYGWIN32 to "yes".
71.2638 ++# Otherwise set it to "no".
71.2639 ++
71.2640 ++dnl AM_CYGWIN32()
71.2641 ++AC_DEFUN(AM_CYGWIN32,
71.2642 ++[AC_CACHE_CHECK(for Cygwin32 environment, am_cv_cygwin32,
71.2643 ++[AC_TRY_COMPILE(,[return __CYGWIN32__;],
71.2644 ++am_cv_cygwin32=yes, am_cv_cygwin32=no)
71.2645 ++rm -f conftest*])
71.2646 ++CYGWIN32=
71.2647 ++test "$am_cv_cygwin32" = yes && CYGWIN32=yes])
71.2648 ++
71.2649 ++# Check to see if we're running under Mingw, without using
71.2650 ++# AC_CANONICAL_*. If so, set output variable MINGW32 to "yes".
71.2651 ++# Otherwise set it to "no".
71.2652 ++
71.2653 ++dnl AM_MINGW32()
71.2654 ++AC_DEFUN(AM_MINGW32,
71.2655 ++[AC_CACHE_CHECK(for Mingw32 environment, am_cv_mingw32,
71.2656 ++[AC_TRY_COMPILE(,[return __MINGW32__;],
71.2657 ++am_cv_mingw32=yes, am_cv_mingw32=no)
71.2658 ++rm -f conftest*])
71.2659 ++MINGW32=
71.2660 ++test "$am_cv_mingw32" = yes && MINGW32=yes])
71.2661 ++
71.2662 +diff -urN newlib-1.8.2/newlib/libc/sys/dreamcast/chdir.c newlib-1.8.2-dc/newlib/libc/sys/dreamcast/chdir.c
71.2663 +--- newlib-1.8.2/newlib/libc/sys/dreamcast/chdir.c 1970-01-01 10:00:00.000000000 +1000
71.2664 ++++ newlib-1.8.2-dc/newlib/libc/sys/dreamcast/chdir.c 2006-07-06 18:28:31.000000000 +1000
71.2665 +@@ -0,0 +1,14 @@
71.2666 ++#include "vfs.h"
71.2667 ++
71.2668 ++int
71.2669 ++chdir (const char *path)
71.2670 ++{
71.2671 ++ char *obj = _newlib_vfs_new_string (path);
71.2672 ++
71.2673 ++ struct media_ops *mops = _newlib_vfs_get_media_ops (path);
71.2674 ++ int res = mops->chdir (obj);
71.2675 ++
71.2676 ++ _newlib_vfs_delete_string (obj);
71.2677 ++
71.2678 ++ return res;
71.2679 ++}
71.2680 +diff -urN newlib-1.8.2/newlib/libc/sys/dreamcast/chmod.c newlib-1.8.2-dc/newlib/libc/sys/dreamcast/chmod.c
71.2681 +--- newlib-1.8.2/newlib/libc/sys/dreamcast/chmod.c 1970-01-01 10:00:00.000000000 +1000
71.2682 ++++ newlib-1.8.2-dc/newlib/libc/sys/dreamcast/chmod.c 2006-07-06 18:28:31.000000000 +1000
71.2683 +@@ -0,0 +1,16 @@
71.2684 ++#include <sys/types.h>
71.2685 ++
71.2686 ++#include "vfs.h"
71.2687 ++
71.2688 ++int
71.2689 ++chmod (const char *path, mode_t mode)
71.2690 ++{
71.2691 ++ char *obj = _newlib_vfs_new_string (path);
71.2692 ++
71.2693 ++ struct media_ops *mops = _newlib_vfs_get_media_ops (path);
71.2694 ++ int res = mops->chmod (obj, mode);
71.2695 ++
71.2696 ++ _newlib_vfs_delete_string (obj);
71.2697 ++
71.2698 ++ return res;
71.2699 ++}
71.2700 +diff -urN newlib-1.8.2/newlib/libc/sys/dreamcast/close.c newlib-1.8.2-dc/newlib/libc/sys/dreamcast/close.c
71.2701 +--- newlib-1.8.2/newlib/libc/sys/dreamcast/close.c 1970-01-01 10:00:00.000000000 +1000
71.2702 ++++ newlib-1.8.2-dc/newlib/libc/sys/dreamcast/close.c 2006-07-06 18:28:31.000000000 +1000
71.2703 +@@ -0,0 +1,15 @@
71.2704 ++#include "vfs.h"
71.2705 ++
71.2706 ++int
71.2707 ++_close (int fd)
71.2708 ++{
71.2709 ++ struct file *pf = _newlib_vfs_get_file (fd);
71.2710 ++ int res = pf->fops->close (pf);
71.2711 ++
71.2712 ++ if (res >= 0)
71.2713 ++ {
71.2714 ++ return _newlib_vfs_remove_file (pf);
71.2715 ++ }
71.2716 ++
71.2717 ++ return res;
71.2718 ++}
71.2719 +diff -urN newlib-1.8.2/newlib/libc/sys/dreamcast/configure newlib-1.8.2-dc/newlib/libc/sys/dreamcast/configure
71.2720 +--- newlib-1.8.2/newlib/libc/sys/dreamcast/configure 1970-01-01 10:00:00.000000000 +1000
71.2721 ++++ newlib-1.8.2-dc/newlib/libc/sys/dreamcast/configure 2006-07-06 18:28:31.000000000 +1000
71.2722 +@@ -0,0 +1,1586 @@
71.2723 ++#! /bin/sh
71.2724 ++
71.2725 ++# Guess values for system-dependent variables and create Makefiles.
71.2726 ++# Generated automatically using autoconf version 2.13
71.2727 ++# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
71.2728 ++#
71.2729 ++# This configure script is free software; the Free Software Foundation
71.2730 ++# gives unlimited permission to copy, distribute and modify it.
71.2731 ++
71.2732 ++# Defaults:
71.2733 ++ac_help=
71.2734 ++ac_default_prefix=/usr/local
71.2735 ++# Any additions from configure.in:
71.2736 ++ac_help="$ac_help
71.2737 ++ --enable-multilib build many library versions (default)"
71.2738 ++ac_help="$ac_help
71.2739 ++ --enable-target-optspace optimize for space"
71.2740 ++ac_help="$ac_help
71.2741 ++ --enable-newlib-mb enable multibyte support"
71.2742 ++
71.2743 ++# Initialize some variables set by options.
71.2744 ++# The variables have the same names as the options, with
71.2745 ++# dashes changed to underlines.
71.2746 ++build=NONE
71.2747 ++cache_file=./config.cache
71.2748 ++exec_prefix=NONE
71.2749 ++host=NONE
71.2750 ++no_create=
71.2751 ++nonopt=NONE
71.2752 ++no_recursion=
71.2753 ++prefix=NONE
71.2754 ++program_prefix=NONE
71.2755 ++program_suffix=NONE
71.2756 ++program_transform_name=s,x,x,
71.2757 ++silent=
71.2758 ++site=
71.2759 ++srcdir=
71.2760 ++target=NONE
71.2761 ++verbose=
71.2762 ++x_includes=NONE
71.2763 ++x_libraries=NONE
71.2764 ++bindir='${exec_prefix}/bin'
71.2765 ++sbindir='${exec_prefix}/sbin'
71.2766 ++libexecdir='${exec_prefix}/libexec'
71.2767 ++datadir='${prefix}/share'
71.2768 ++sysconfdir='${prefix}/etc'
71.2769 ++sharedstatedir='${prefix}/com'
71.2770 ++localstatedir='${prefix}/var'
71.2771 ++libdir='${exec_prefix}/lib'
71.2772 ++includedir='${prefix}/include'
71.2773 ++oldincludedir='/usr/include'
71.2774 ++infodir='${prefix}/info'
71.2775 ++mandir='${prefix}/man'
71.2776 ++
71.2777 ++# Initialize some other variables.
71.2778 ++subdirs=
71.2779 ++MFLAGS= MAKEFLAGS=
71.2780 ++SHELL=${CONFIG_SHELL-/bin/sh}
71.2781 ++# Maximum number of lines to put in a shell here document.
71.2782 ++ac_max_here_lines=12
71.2783 ++
71.2784 ++ac_prev=
71.2785 ++for ac_option
71.2786 ++do
71.2787 ++
71.2788 ++ # If the previous option needs an argument, assign it.
71.2789 ++ if test -n "$ac_prev"; then
71.2790 ++ eval "$ac_prev=\$ac_option"
71.2791 ++ ac_prev=
71.2792 ++ continue
71.2793 ++ fi
71.2794 ++
71.2795 ++ case "$ac_option" in
71.2796 ++ -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
71.2797 ++ *) ac_optarg= ;;
71.2798 ++ esac
71.2799 ++
71.2800 ++ # Accept the important Cygnus configure options, so we can diagnose typos.
71.2801 ++
71.2802 ++ case "$ac_option" in
71.2803 ++
71.2804 ++ -bindir | --bindir | --bindi | --bind | --bin | --bi)
71.2805 ++ ac_prev=bindir ;;
71.2806 ++ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
71.2807 ++ bindir="$ac_optarg" ;;
71.2808 ++
71.2809 ++ -build | --build | --buil | --bui | --bu)
71.2810 ++ ac_prev=build ;;
71.2811 ++ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
71.2812 ++ build="$ac_optarg" ;;
71.2813 ++
71.2814 ++ -cache-file | --cache-file | --cache-fil | --cache-fi \
71.2815 ++ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
71.2816 ++ ac_prev=cache_file ;;
71.2817 ++ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
71.2818 ++ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
71.2819 ++ cache_file="$ac_optarg" ;;
71.2820 ++
71.2821 ++ -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
71.2822 ++ ac_prev=datadir ;;
71.2823 ++ -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
71.2824 ++ | --da=*)
71.2825 ++ datadir="$ac_optarg" ;;
71.2826 ++
71.2827 ++ -disable-* | --disable-*)
71.2828 ++ ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
71.2829 ++ # Reject names that are not valid shell variable names.
71.2830 ++ if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
71.2831 ++ { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
71.2832 ++ fi
71.2833 ++ ac_feature=`echo $ac_feature| sed 's/-/_/g'`
71.2834 ++ eval "enable_${ac_feature}=no" ;;
71.2835 ++
71.2836 ++ -enable-* | --enable-*)
71.2837 ++ ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
71.2838 ++ # Reject names that are not valid shell variable names.
71.2839 ++ if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
71.2840 ++ { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
71.2841 ++ fi
71.2842 ++ ac_feature=`echo $ac_feature| sed 's/-/_/g'`
71.2843 ++ case "$ac_option" in
71.2844 ++ *=*) ;;
71.2845 ++ *) ac_optarg=yes ;;
71.2846 ++ esac
71.2847 ++ eval "enable_${ac_feature}='$ac_optarg'" ;;
71.2848 ++
71.2849 ++ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
71.2850 ++ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
71.2851 ++ | --exec | --exe | --ex)
71.2852 ++ ac_prev=exec_prefix ;;
71.2853 ++ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
71.2854 ++ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
71.2855 ++ | --exec=* | --exe=* | --ex=*)
71.2856 ++ exec_prefix="$ac_optarg" ;;
71.2857 ++
71.2858 ++ -gas | --gas | --ga | --g)
71.2859 ++ # Obsolete; use --with-gas.
71.2860 ++ with_gas=yes ;;
71.2861 ++
71.2862 ++ -help | --help | --hel | --he)
71.2863 ++ # Omit some internal or obsolete options to make the list less imposing.
71.2864 ++ # This message is too long to be a string in the A/UX 3.1 sh.
71.2865 ++ cat << EOF
71.2866 ++Usage: configure [options] [host]
71.2867 ++Options: [defaults in brackets after descriptions]
71.2868 ++Configuration:
71.2869 ++ --cache-file=FILE cache test results in FILE
71.2870 ++ --help print this message
71.2871 ++ --no-create do not create output files
71.2872 ++ --quiet, --silent do not print \`checking...' messages
71.2873 ++ --version print the version of autoconf that created configure
71.2874 ++Directory and file names:
71.2875 ++ --prefix=PREFIX install architecture-independent files in PREFIX
71.2876 ++ [$ac_default_prefix]
71.2877 ++ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
71.2878 ++ [same as prefix]
71.2879 ++ --bindir=DIR user executables in DIR [EPREFIX/bin]
71.2880 ++ --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
71.2881 ++ --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
71.2882 ++ --datadir=DIR read-only architecture-independent data in DIR
71.2883 ++ [PREFIX/share]
71.2884 ++ --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
71.2885 ++ --sharedstatedir=DIR modifiable architecture-independent data in DIR
71.2886 ++ [PREFIX/com]
71.2887 ++ --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
71.2888 ++ --libdir=DIR object code libraries in DIR [EPREFIX/lib]
71.2889 ++ --includedir=DIR C header files in DIR [PREFIX/include]
71.2890 ++ --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
71.2891 ++ --infodir=DIR info documentation in DIR [PREFIX/info]
71.2892 ++ --mandir=DIR man documentation in DIR [PREFIX/man]
71.2893 ++ --srcdir=DIR find the sources in DIR [configure dir or ..]
71.2894 ++ --program-prefix=PREFIX prepend PREFIX to installed program names
71.2895 ++ --program-suffix=SUFFIX append SUFFIX to installed program names
71.2896 ++ --program-transform-name=PROGRAM
71.2897 ++ run sed PROGRAM on installed program names
71.2898 ++EOF
71.2899 ++ cat << EOF
71.2900 ++Host type:
71.2901 ++ --build=BUILD configure for building on BUILD [BUILD=HOST]
71.2902 ++ --host=HOST configure for HOST [guessed]
71.2903 ++ --target=TARGET configure for TARGET [TARGET=HOST]
71.2904 ++Features and packages:
71.2905 ++ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
71.2906 ++ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
71.2907 ++ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
71.2908 ++ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
71.2909 ++ --x-includes=DIR X include files are in DIR
71.2910 ++ --x-libraries=DIR X library files are in DIR
71.2911 ++EOF
71.2912 ++ if test -n "$ac_help"; then
71.2913 ++ echo "--enable and --with options recognized:$ac_help"
71.2914 ++ fi
71.2915 ++ exit 0 ;;
71.2916 ++
71.2917 ++ -host | --host | --hos | --ho)
71.2918 ++ ac_prev=host ;;
71.2919 ++ -host=* | --host=* | --hos=* | --ho=*)
71.2920 ++ host="$ac_optarg" ;;
71.2921 ++
71.2922 ++ -includedir | --includedir | --includedi | --included | --include \
71.2923 ++ | --includ | --inclu | --incl | --inc)
71.2924 ++ ac_prev=includedir ;;
71.2925 ++ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
71.2926 ++ | --includ=* | --inclu=* | --incl=* | --inc=*)
71.2927 ++ includedir="$ac_optarg" ;;
71.2928 ++
71.2929 ++ -infodir | --infodir | --infodi | --infod | --info | --inf)
71.2930 ++ ac_prev=infodir ;;
71.2931 ++ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
71.2932 ++ infodir="$ac_optarg" ;;
71.2933 ++
71.2934 ++ -libdir | --libdir | --libdi | --libd)
71.2935 ++ ac_prev=libdir ;;
71.2936 ++ -libdir=* | --libdir=* | --libdi=* | --libd=*)
71.2937 ++ libdir="$ac_optarg" ;;
71.2938 ++
71.2939 ++ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
71.2940 ++ | --libexe | --libex | --libe)
71.2941 ++ ac_prev=libexecdir ;;
71.2942 ++ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
71.2943 ++ | --libexe=* | --libex=* | --libe=*)
71.2944 ++ libexecdir="$ac_optarg" ;;
71.2945 ++
71.2946 ++ -localstatedir | --localstatedir | --localstatedi | --localstated \
71.2947 ++ | --localstate | --localstat | --localsta | --localst \
71.2948 ++ | --locals | --local | --loca | --loc | --lo)
71.2949 ++ ac_prev=localstatedir ;;
71.2950 ++ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
71.2951 ++ | --localstate=* | --localstat=* | --localsta=* | --localst=* \
71.2952 ++ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
71.2953 ++ localstatedir="$ac_optarg" ;;
71.2954 ++
71.2955 ++ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
71.2956 ++ ac_prev=mandir ;;
71.2957 ++ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
71.2958 ++ mandir="$ac_optarg" ;;
71.2959 ++
71.2960 ++ -nfp | --nfp | --nf)
71.2961 ++ # Obsolete; use --without-fp.
71.2962 ++ with_fp=no ;;
71.2963 ++
71.2964 ++ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
71.2965 ++ | --no-cr | --no-c)
71.2966 ++ no_create=yes ;;
71.2967 ++
71.2968 ++ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
71.2969 ++ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
71.2970 ++ no_recursion=yes ;;
71.2971 ++
71.2972 ++ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
71.2973 ++ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
71.2974 ++ | --oldin | --oldi | --old | --ol | --o)
71.2975 ++ ac_prev=oldincludedir ;;
71.2976 ++ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
71.2977 ++ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
71.2978 ++ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
71.2979 ++ oldincludedir="$ac_optarg" ;;
71.2980 ++
71.2981 ++ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
71.2982 ++ ac_prev=prefix ;;
71.2983 ++ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
71.2984 ++ prefix="$ac_optarg" ;;
71.2985 ++
71.2986 ++ -program-prefix | --program-prefix | --program-prefi | --program-pref \
71.2987 ++ | --program-pre | --program-pr | --program-p)
71.2988 ++ ac_prev=program_prefix ;;
71.2989 ++ -program-prefix=* | --program-prefix=* | --program-prefi=* \
71.2990 ++ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
71.2991 ++ program_prefix="$ac_optarg" ;;
71.2992 ++
71.2993 ++ -program-suffix | --program-suffix | --program-suffi | --program-suff \
71.2994 ++ | --program-suf | --program-su | --program-s)
71.2995 ++ ac_prev=program_suffix ;;
71.2996 ++ -program-suffix=* | --program-suffix=* | --program-suffi=* \
71.2997 ++ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
71.2998 ++ program_suffix="$ac_optarg" ;;
71.2999 ++
71.3000 ++ -program-transform-name | --program-transform-name \
71.3001 ++ | --program-transform-nam | --program-transform-na \
71.3002 ++ | --program-transform-n | --program-transform- \
71.3003 ++ | --program-transform | --program-transfor \
71.3004 ++ | --program-transfo | --program-transf \
71.3005 ++ | --program-trans | --program-tran \
71.3006 ++ | --progr-tra | --program-tr | --program-t)
71.3007 ++ ac_prev=program_transform_name ;;
71.3008 ++ -program-transform-name=* | --program-transform-name=* \
71.3009 ++ | --program-transform-nam=* | --program-transform-na=* \
71.3010 ++ | --program-transform-n=* | --program-transform-=* \
71.3011 ++ | --program-transform=* | --program-transfor=* \
71.3012 ++ | --program-transfo=* | --program-transf=* \
71.3013 ++ | --program-trans=* | --program-tran=* \
71.3014 ++ | --progr-tra=* | --program-tr=* | --program-t=*)
71.3015 ++ program_transform_name="$ac_optarg" ;;
71.3016 ++
71.3017 ++ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
71.3018 ++ | -silent | --silent | --silen | --sile | --sil)
71.3019 ++ silent=yes ;;
71.3020 ++
71.3021 ++ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
71.3022 ++ ac_prev=sbindir ;;
71.3023 ++ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
71.3024 ++ | --sbi=* | --sb=*)
71.3025 ++ sbindir="$ac_optarg" ;;
71.3026 ++
71.3027 ++ -sharedstatedir | --sharedstatedir | --sharedstatedi \
71.3028 ++ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
71.3029 ++ | --sharedst | --shareds | --shared | --share | --shar \
71.3030 ++ | --sha | --sh)
71.3031 ++ ac_prev=sharedstatedir ;;
71.3032 ++ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
71.3033 ++ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
71.3034 ++ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
71.3035 ++ | --sha=* | --sh=*)
71.3036 ++ sharedstatedir="$ac_optarg" ;;
71.3037 ++
71.3038 ++ -site | --site | --sit)
71.3039 ++ ac_prev=site ;;
71.3040 ++ -site=* | --site=* | --sit=*)
71.3041 ++ site="$ac_optarg" ;;
71.3042 ++
71.3043 ++ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
71.3044 ++ ac_prev=srcdir ;;
71.3045 ++ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
71.3046 ++ srcdir="$ac_optarg" ;;
71.3047 ++
71.3048 ++ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
71.3049 ++ | --syscon | --sysco | --sysc | --sys | --sy)
71.3050 ++ ac_prev=sysconfdir ;;
71.3051 ++ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
71.3052 ++ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
71.3053 ++ sysconfdir="$ac_optarg" ;;
71.3054 ++
71.3055 ++ -target | --target | --targe | --targ | --tar | --ta | --t)
71.3056 ++ ac_prev=target ;;
71.3057 ++ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
71.3058 ++ target="$ac_optarg" ;;
71.3059 ++
71.3060 ++ -v | -verbose | --verbose | --verbos | --verbo | --verb)
71.3061 ++ verbose=yes ;;
71.3062 ++
71.3063 ++ -version | --version | --versio | --versi | --vers)
71.3064 ++ echo "configure generated by autoconf version 2.13"
71.3065 ++ exit 0 ;;
71.3066 ++
71.3067 ++ -with-* | --with-*)
71.3068 ++ ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
71.3069 ++ # Reject names that are not valid shell variable names.
71.3070 ++ if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
71.3071 ++ { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
71.3072 ++ fi
71.3073 ++ ac_package=`echo $ac_package| sed 's/-/_/g'`
71.3074 ++ case "$ac_option" in
71.3075 ++ *=*) ;;
71.3076 ++ *) ac_optarg=yes ;;
71.3077 ++ esac
71.3078 ++ eval "with_${ac_package}='$ac_optarg'" ;;
71.3079 ++
71.3080 ++ -without-* | --without-*)
71.3081 ++ ac_package=`echo $ac_option|sed -e 's/-*without-//'`
71.3082 ++ # Reject names that are not valid shell variable names.
71.3083 ++ if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
71.3084 ++ { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
71.3085 ++ fi
71.3086 ++ ac_package=`echo $ac_package| sed 's/-/_/g'`
71.3087 ++ eval "with_${ac_package}=no" ;;
71.3088 ++
71.3089 ++ --x)
71.3090 ++ # Obsolete; use --with-x.
71.3091 ++ with_x=yes ;;
71.3092 ++
71.3093 ++ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
71.3094 ++ | --x-incl | --x-inc | --x-in | --x-i)
71.3095 ++ ac_prev=x_includes ;;
71.3096 ++ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
71.3097 ++ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
71.3098 ++ x_includes="$ac_optarg" ;;
71.3099 ++
71.3100 ++ -x-libraries | --x-libraries | --x-librarie | --x-librari \
71.3101 ++ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
71.3102 ++ ac_prev=x_libraries ;;
71.3103 ++ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
71.3104 ++ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
71.3105 ++ x_libraries="$ac_optarg" ;;
71.3106 ++
71.3107 ++ -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
71.3108 ++ ;;
71.3109 ++
71.3110 ++ *)
71.3111 ++ if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
71.3112 ++ echo "configure: warning: $ac_option: invalid host type" 1>&2
71.3113 ++ fi
71.3114 ++ if test "x$nonopt" != xNONE; then
71.3115 ++ { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
71.3116 ++ fi
71.3117 ++ nonopt="$ac_option"
71.3118 ++ ;;
71.3119 ++
71.3120 ++ esac
71.3121 ++done
71.3122 ++
71.3123 ++if test -n "$ac_prev"; then
71.3124 ++ { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
71.3125 ++fi
71.3126 ++
71.3127 ++trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
71.3128 ++
71.3129 ++# File descriptor usage:
71.3130 ++# 0 standard input
71.3131 ++# 1 file creation
71.3132 ++# 2 errors and warnings
71.3133 ++# 3 some systems may open it to /dev/tty
71.3134 ++# 4 used on the Kubota Titan
71.3135 ++# 6 checking for... messages and results
71.3136 ++# 5 compiler messages saved in config.log
71.3137 ++if test "$silent" = yes; then
71.3138 ++ exec 6>/dev/null
71.3139 ++else
71.3140 ++ exec 6>&1
71.3141 ++fi
71.3142 ++exec 5>./config.log
71.3143 ++
71.3144 ++echo "\
71.3145 ++This file contains any messages produced by compilers while
71.3146 ++running configure, to aid debugging if configure makes a mistake.
71.3147 ++" 1>&5
71.3148 ++
71.3149 ++# Strip out --no-create and --no-recursion so they do not pile up.
71.3150 ++# Also quote any args containing shell metacharacters.
71.3151 ++ac_configure_args=
71.3152 ++for ac_arg
71.3153 ++do
71.3154 ++ case "$ac_arg" in
71.3155 ++ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
71.3156 ++ | --no-cr | --no-c) ;;
71.3157 ++ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
71.3158 ++ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
71.3159 ++ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
71.3160 ++ ac_configure_args="$ac_configure_args '$ac_arg'" ;;
71.3161 ++ *) ac_configure_args="$ac_configure_args $ac_arg" ;;
71.3162 ++ esac
71.3163 ++done
71.3164 ++
71.3165 ++# NLS nuisances.
71.3166 ++# Only set these to C if already set. These must not be set unconditionally
71.3167 ++# because not all systems understand e.g. LANG=C (notably SCO).
71.3168 ++# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
71.3169 ++# Non-C LC_CTYPE values break the ctype check.
71.3170 ++if test "${LANG+set}" = set; then LANG=C; export LANG; fi
71.3171 ++if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
71.3172 ++if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
71.3173 ++if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
71.3174 ++
71.3175 ++# confdefs.h avoids OS command line length limits that DEFS can exceed.
71.3176 ++rm -rf conftest* confdefs.h
71.3177 ++# AIX cpp loses on an empty file, so make sure it contains at least a newline.
71.3178 ++echo > confdefs.h
71.3179 ++
71.3180 ++# A filename unique to this package, relative to the directory that
71.3181 ++# configure is in, which we can look for to find out if srcdir is correct.
71.3182 ++ac_unique_file=sbrk.c
71.3183 ++
71.3184 ++# Find the source files, if location was not specified.
71.3185 ++if test -z "$srcdir"; then
71.3186 ++ ac_srcdir_defaulted=yes
71.3187 ++ # Try the directory containing this script, then its parent.
71.3188 ++ ac_prog=$0
71.3189 ++ ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
71.3190 ++ test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
71.3191 ++ srcdir=$ac_confdir
71.3192 ++ if test ! -r $srcdir/$ac_unique_file; then
71.3193 ++ srcdir=..
71.3194 ++ fi
71.3195 ++else
71.3196 ++ ac_srcdir_defaulted=no
71.3197 ++fi
71.3198 ++if test ! -r $srcdir/$ac_unique_file; then
71.3199 ++ if test "$ac_srcdir_defaulted" = yes; then
71.3200 ++ { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
71.3201 ++ else
71.3202 ++ { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
71.3203 ++ fi
71.3204 ++fi
71.3205 ++srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
71.3206 ++
71.3207 ++# Prefer explicitly selected file to automatically selected ones.
71.3208 ++if test -z "$CONFIG_SITE"; then
71.3209 ++ if test "x$prefix" != xNONE; then
71.3210 ++ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
71.3211 ++ else
71.3212 ++ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
71.3213 ++ fi
71.3214 ++fi
71.3215 ++for ac_site_file in $CONFIG_SITE; do
71.3216 ++ if test -r "$ac_site_file"; then
71.3217 ++ echo "loading site script $ac_site_file"
71.3218 ++ . "$ac_site_file"
71.3219 ++ fi
71.3220 ++done
71.3221 ++
71.3222 ++if test -r "$cache_file"; then
71.3223 ++ echo "loading cache $cache_file"
71.3224 ++ . $cache_file
71.3225 ++else
71.3226 ++ echo "creating cache $cache_file"
71.3227 ++ > $cache_file
71.3228 ++fi
71.3229 ++
71.3230 ++ac_ext=c
71.3231 ++# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
71.3232 ++ac_cpp='$CPP $CPPFLAGS'
71.3233 ++ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
71.3234 ++ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
71.3235 ++cross_compiling=$ac_cv_prog_cc_cross
71.3236 ++
71.3237 ++ac_exeext=
71.3238 ++ac_objext=o
71.3239 ++if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
71.3240 ++ # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
71.3241 ++ if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
71.3242 ++ ac_n= ac_c='
71.3243 ++' ac_t=' '
71.3244 ++ else
71.3245 ++ ac_n=-n ac_c= ac_t=
71.3246 ++ fi
71.3247 ++else
71.3248 ++ ac_n= ac_c='\c' ac_t=
71.3249 ++fi
71.3250 ++
71.3251 ++
71.3252 ++
71.3253 ++ac_aux_dir=
71.3254 ++for ac_dir in ../../../.. $srcdir/../../../..; do
71.3255 ++ if test -f $ac_dir/install-sh; then
71.3256 ++ ac_aux_dir=$ac_dir
71.3257 ++ ac_install_sh="$ac_aux_dir/install-sh -c"
71.3258 ++ break
71.3259 ++ elif test -f $ac_dir/install.sh; then
71.3260 ++ ac_aux_dir=$ac_dir
71.3261 ++ ac_install_sh="$ac_aux_dir/install.sh -c"
71.3262 ++ break
71.3263 ++ fi
71.3264 ++done
71.3265 ++if test -z "$ac_aux_dir"; then
71.3266 ++ { echo "configure: error: can not find install-sh or install.sh in ../../../.. $srcdir/../../../.." 1>&2; exit 1; }
71.3267 ++fi
71.3268 ++ac_config_guess=$ac_aux_dir/config.guess
71.3269 ++ac_config_sub=$ac_aux_dir/config.sub
71.3270 ++ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
71.3271 ++
71.3272 ++
71.3273 ++# Find a good install program. We prefer a C program (faster),
71.3274 ++# so one script is as good as another. But avoid the broken or
71.3275 ++# incompatible versions:
71.3276 ++# SysV /etc/install, /usr/sbin/install
71.3277 ++# SunOS /usr/etc/install
71.3278 ++# IRIX /sbin/install
71.3279 ++# AIX /bin/install
71.3280 ++# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
71.3281 ++# AFS /usr/afsws/bin/install, which mishandles nonexistent args
71.3282 ++# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
71.3283 ++# ./install, which can be erroneously created by make from ./install.sh.
71.3284 ++echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
71.3285 ++echo "configure:564: checking for a BSD compatible install" >&5
71.3286 ++if test -z "$INSTALL"; then
71.3287 ++if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
71.3288 ++ echo $ac_n "(cached) $ac_c" 1>&6
71.3289 ++else
71.3290 ++ IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
71.3291 ++ for ac_dir in $PATH; do
71.3292 ++ # Account for people who put trailing slashes in PATH elements.
71.3293 ++ case "$ac_dir/" in
71.3294 ++ /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
71.3295 ++ *)
71.3296 ++ # OSF1 and SCO ODT 3.0 have their own names for install.
71.3297 ++ # Don't use installbsd from OSF since it installs stuff as root
71.3298 ++ # by default.
71.3299 ++ for ac_prog in ginstall scoinst install; do
71.3300 ++ if test -f $ac_dir/$ac_prog; then
71.3301 ++ if test $ac_prog = install &&
71.3302 ++ grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
71.3303 ++ # AIX install. It has an incompatible calling convention.
71.3304 ++ :
71.3305 ++ else
71.3306 ++ ac_cv_path_install="$ac_dir/$ac_prog -c"
71.3307 ++ break 2
71.3308 ++ fi
71.3309 ++ fi
71.3310 ++ done
71.3311 ++ ;;
71.3312 ++ esac
71.3313 ++ done
71.3314 ++ IFS="$ac_save_IFS"
71.3315 ++
71.3316 ++fi
71.3317 ++ if test "${ac_cv_path_install+set}" = set; then
71.3318 ++ INSTALL="$ac_cv_path_install"
71.3319 ++ else
71.3320 ++ # As a last resort, use the slow shell script. We don't cache a
71.3321 ++ # path for INSTALL within a source directory, because that will
71.3322 ++ # break other packages using the cache if that directory is
71.3323 ++ # removed, or if the path is relative.
71.3324 ++ INSTALL="$ac_install_sh"
71.3325 ++ fi
71.3326 ++fi
71.3327 ++echo "$ac_t""$INSTALL" 1>&6
71.3328 ++
71.3329 ++# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
71.3330 ++# It thinks the first close brace ends the variable substitution.
71.3331 ++test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
71.3332 ++
71.3333 ++test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
71.3334 ++
71.3335 ++test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
71.3336 ++
71.3337 ++
71.3338 ++test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
71.3339 ++
71.3340 ++echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
71.3341 ++echo "configure:620: checking whether build environment is sane" >&5
71.3342 ++# Just in case
71.3343 ++sleep 1
71.3344 ++echo timestamp > conftestfile
71.3345 ++# Do `set' in a subshell so we don't clobber the current shell's
71.3346 ++# arguments. Must try -L first in case configure is actually a
71.3347 ++# symlink; some systems play weird games with the mod time of symlinks
71.3348 ++# (eg FreeBSD returns the mod time of the symlink's containing
71.3349 ++# directory).
71.3350 ++if (
71.3351 ++ set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
71.3352 ++ if test "$*" = "X"; then
71.3353 ++ # -L didn't work.
71.3354 ++ set X `ls -t $srcdir/configure conftestfile`
71.3355 ++ fi
71.3356 ++ if test "$*" != "X $srcdir/configure conftestfile" \
71.3357 ++ && test "$*" != "X conftestfile $srcdir/configure"; then
71.3358 ++
71.3359 ++ # If neither matched, then we have a broken ls. This can happen
71.3360 ++ # if, for instance, CONFIG_SHELL is bash and it inherits a
71.3361 ++ # broken ls alias from the environment. This has actually
71.3362 ++ # happened. Such a system could not be considered "sane".
71.3363 ++ { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
71.3364 ++alias in your environment" 1>&2; exit 1; }
71.3365 ++ fi
71.3366 ++
71.3367 ++ test "$2" = conftestfile
71.3368 ++ )
71.3369 ++then
71.3370 ++ # Ok.
71.3371 ++ :
71.3372 ++else
71.3373 ++ { echo "configure: error: newly created file is older than distributed files!
71.3374 ++Check your system clock" 1>&2; exit 1; }
71.3375 ++fi
71.3376 ++rm -f conftest*
71.3377 ++echo "$ac_t""yes" 1>&6
71.3378 ++if test "$program_transform_name" = s,x,x,; then
71.3379 ++ program_transform_name=
71.3380 ++else
71.3381 ++ # Double any \ or $. echo might interpret backslashes.
71.3382 ++ cat <<\EOF_SED > conftestsed
71.3383 ++s,\\,\\\\,g; s,\$,$$,g
71.3384 ++EOF_SED
71.3385 ++ program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
71.3386 ++ rm -f conftestsed
71.3387 ++fi
71.3388 ++test "$program_prefix" != NONE &&
71.3389 ++ program_transform_name="s,^,${program_prefix},; $program_transform_name"
71.3390 ++# Use a double $ so make ignores it.
71.3391 ++test "$program_suffix" != NONE &&
71.3392 ++ program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
71.3393 ++
71.3394 ++# sed with no file args requires a program.
71.3395 ++test "$program_transform_name" = "" && program_transform_name="s,x,x,"
71.3396 ++
71.3397 ++echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
71.3398 ++echo "configure:677: checking whether ${MAKE-make} sets \${MAKE}" >&5
71.3399 ++set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
71.3400 ++if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
71.3401 ++ echo $ac_n "(cached) $ac_c" 1>&6
71.3402 ++else
71.3403 ++ cat > conftestmake <<\EOF
71.3404 ++all:
71.3405 ++ @echo 'ac_maketemp="${MAKE}"'
71.3406 ++EOF
71.3407 ++# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
71.3408 ++eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
71.3409 ++if test -n "$ac_maketemp"; then
71.3410 ++ eval ac_cv_prog_make_${ac_make}_set=yes
71.3411 ++else
71.3412 ++ eval ac_cv_prog_make_${ac_make}_set=no
71.3413 ++fi
71.3414 ++rm -f conftestmake
71.3415 ++fi
71.3416 ++if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
71.3417 ++ echo "$ac_t""yes" 1>&6
71.3418 ++ SET_MAKE=
71.3419 ++else
71.3420 ++ echo "$ac_t""no" 1>&6
71.3421 ++ SET_MAKE="MAKE=${MAKE-make}"
71.3422 ++fi
71.3423 ++
71.3424 ++if test $host != $build; then
71.3425 ++ ac_tool_prefix=${host_alias}-
71.3426 ++else
71.3427 ++ ac_tool_prefix=
71.3428 ++fi
71.3429 ++
71.3430 ++echo $ac_n "checking for Cygwin32 environment""... $ac_c" 1>&6
71.3431 ++echo "configure:710: checking for Cygwin32 environment" >&5
71.3432 ++if eval "test \"`echo '$''{'am_cv_cygwin32'+set}'`\" = set"; then
71.3433 ++ echo $ac_n "(cached) $ac_c" 1>&6
71.3434 ++else
71.3435 ++ cat > conftest.$ac_ext <<EOF
71.3436 ++#line 715 "configure"
71.3437 ++#include "confdefs.h"
71.3438 ++
71.3439 ++int main() {
71.3440 ++return __CYGWIN32__;
71.3441 ++; return 0; }
71.3442 ++EOF
71.3443 ++if { (eval echo configure:722: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
71.3444 ++ rm -rf conftest*
71.3445 ++ am_cv_cygwin32=yes
71.3446 ++else
71.3447 ++ echo "configure: failed program was:" >&5
71.3448 ++ cat conftest.$ac_ext >&5
71.3449 ++ rm -rf conftest*
71.3450 ++ am_cv_cygwin32=no
71.3451 ++fi
71.3452 ++rm -f conftest*
71.3453 ++rm -f conftest*
71.3454 ++fi
71.3455 ++
71.3456 ++echo "$ac_t""$am_cv_cygwin32" 1>&6
71.3457 ++CYGWIN32=
71.3458 ++test "$am_cv_cygwin32" = yes && CYGWIN32=yes
71.3459 ++echo $ac_n "checking for Mingw32 environment""... $ac_c" 1>&6
71.3460 ++echo "configure:739: checking for Mingw32 environment" >&5
71.3461 ++if eval "test \"`echo '$''{'am_cv_mingw32'+set}'`\" = set"; then
71.3462 ++ echo $ac_n "(cached) $ac_c" 1>&6
71.3463 ++else
71.3464 ++ cat > conftest.$ac_ext <<EOF
71.3465 ++#line 744 "configure"
71.3466 ++#include "confdefs.h"
71.3467 ++
71.3468 ++int main() {
71.3469 ++return __MINGW32__;
71.3470 ++; return 0; }
71.3471 ++EOF
71.3472 ++if { (eval echo configure:751: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
71.3473 ++ rm -rf conftest*
71.3474 ++ am_cv_mingw32=yes
71.3475 ++else
71.3476 ++ echo "configure: failed program was:" >&5
71.3477 ++ cat conftest.$ac_ext >&5
71.3478 ++ rm -rf conftest*
71.3479 ++ am_cv_mingw32=no
71.3480 ++fi
71.3481 ++rm -f conftest*
71.3482 ++rm -f conftest*
71.3483 ++fi
71.3484 ++
71.3485 ++echo "$ac_t""$am_cv_mingw32" 1>&6
71.3486 ++MINGW32=
71.3487 ++test "$am_cv_mingw32" = yes && MINGW32=yes
71.3488 ++
71.3489 ++# Check whether --enable-multilib or --disable-multilib was given.
71.3490 ++if test "${enable_multilib+set}" = set; then
71.3491 ++ enableval="$enable_multilib"
71.3492 ++ case "${enableval}" in
71.3493 ++ yes) multilib=yes ;;
71.3494 ++ no) multilib=no ;;
71.3495 ++ *) { echo "configure: error: bad value ${enableval} for multilib option" 1>&2; exit 1; } ;;
71.3496 ++ esac
71.3497 ++else
71.3498 ++ multilib=yes
71.3499 ++fi
71.3500 ++
71.3501 ++# Check whether --enable-target-optspace or --disable-target-optspace was given.
71.3502 ++if test "${enable_target_optspace+set}" = set; then
71.3503 ++ enableval="$enable_target_optspace"
71.3504 ++ case "${enableval}" in
71.3505 ++ yes) target_optspace=yes ;;
71.3506 ++ no) target_optspace=no ;;
71.3507 ++ *) { echo "configure: error: bad value ${enableval} for target-optspace option" 1>&2; exit 1; } ;;
71.3508 ++ esac
71.3509 ++else
71.3510 ++ target_optspace=
71.3511 ++fi
71.3512 ++
71.3513 ++# Check whether --enable-newlib-mb or --disable-newlib-mb was given.
71.3514 ++if test "${enable_newlib_mb+set}" = set; then
71.3515 ++ enableval="$enable_newlib_mb"
71.3516 ++ case "${enableval}" in
71.3517 ++ yes) newlib_mb=yes ;;
71.3518 ++ no) newlib_mb=no ;;
71.3519 ++ *) { echo "configure: error: bad value ${enableval} for newlib-mb option" 1>&2; exit 1; } ;;
71.3520 ++ esac
71.3521 ++else
71.3522 ++ newlib_mb=no
71.3523 ++fi
71.3524 ++
71.3525 ++
71.3526 ++test -z "${with_target_subdir}" && with_target_subdir=.
71.3527 ++
71.3528 ++if test "${srcdir}" = "."; then
71.3529 ++ if test "${with_target_subdir}" != "."; then
71.3530 ++ newlib_basedir="${srcdir}/${with_multisrctop}../../../.."
71.3531 ++ else
71.3532 ++ newlib_basedir="${srcdir}/${with_multisrctop}../../.."
71.3533 ++ fi
71.3534 ++else
71.3535 ++ newlib_basedir="${srcdir}/../../.."
71.3536 ++fi
71.3537 ++
71.3538 ++
71.3539 ++
71.3540 ++# Make sure we can run config.sub.
71.3541 ++if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
71.3542 ++else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
71.3543 ++fi
71.3544 ++
71.3545 ++echo $ac_n "checking host system type""... $ac_c" 1>&6
71.3546 ++echo "configure:825: checking host system type" >&5
71.3547 ++
71.3548 ++host_alias=$host
71.3549 ++case "$host_alias" in
71.3550 ++NONE)
71.3551 ++ case $nonopt in
71.3552 ++ NONE)
71.3553 ++ if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
71.3554 ++ else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
71.3555 ++ fi ;;
71.3556 ++ *) host_alias=$nonopt ;;
71.3557 ++ esac ;;
71.3558 ++esac
71.3559 ++
71.3560 ++host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
71.3561 ++host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
71.3562 ++host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
71.3563 ++host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
71.3564 ++echo "$ac_t""$host" 1>&6
71.3565 ++
71.3566 ++
71.3567 ++
71.3568 ++PACKAGE=newlib
71.3569 ++
71.3570 ++VERSION=1.8.1
71.3571 ++
71.3572 ++if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
71.3573 ++ { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
71.3574 ++fi
71.3575 ++cat >> confdefs.h <<EOF
71.3576 ++#define PACKAGE "$PACKAGE"
71.3577 ++EOF
71.3578 ++
71.3579 ++cat >> confdefs.h <<EOF
71.3580 ++#define VERSION "$VERSION"
71.3581 ++EOF
71.3582 ++
71.3583 ++
71.3584 ++
71.3585 ++missing_dir=`cd $ac_aux_dir && pwd`
71.3586 ++echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
71.3587 ++echo "configure:866: checking for working aclocal" >&5
71.3588 ++# Run test in a subshell; some versions of sh will print an error if
71.3589 ++# an executable is not found, even if stderr is redirected.
71.3590 ++# Redirect stdin to placate older versions of autoconf. Sigh.
71.3591 ++if (aclocal --version) < /dev/null > /dev/null 2>&1; then
71.3592 ++ ACLOCAL=aclocal
71.3593 ++ echo "$ac_t""found" 1>&6
71.3594 ++else
71.3595 ++ ACLOCAL="$missing_dir/missing aclocal"
71.3596 ++ echo "$ac_t""missing" 1>&6
71.3597 ++fi
71.3598 ++
71.3599 ++echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
71.3600 ++echo "configure:879: checking for working autoconf" >&5
71.3601 ++# Run test in a subshell; some versions of sh will print an error if
71.3602 ++# an executable is not found, even if stderr is redirected.
71.3603 ++# Redirect stdin to placate older versions of autoconf. Sigh.
71.3604 ++if (autoconf --version) < /dev/null > /dev/null 2>&1; then
71.3605 ++ AUTOCONF=autoconf
71.3606 ++ echo "$ac_t""found" 1>&6
71.3607 ++else
71.3608 ++ AUTOCONF="$missing_dir/missing autoconf"
71.3609 ++ echo "$ac_t""missing" 1>&6
71.3610 ++fi
71.3611 ++
71.3612 ++echo $ac_n "checking for working automake""... $ac_c" 1>&6
71.3613 ++echo "configure:892: checking for working automake" >&5
71.3614 ++# Run test in a subshell; some versions of sh will print an error if
71.3615 ++# an executable is not found, even if stderr is redirected.
71.3616 ++# Redirect stdin to placate older versions of autoconf. Sigh.
71.3617 ++if (automake --version) < /dev/null > /dev/null 2>&1; then
71.3618 ++ AUTOMAKE=automake
71.3619 ++ echo "$ac_t""found" 1>&6
71.3620 ++else
71.3621 ++ AUTOMAKE="$missing_dir/missing automake"
71.3622 ++ echo "$ac_t""missing" 1>&6
71.3623 ++fi
71.3624 ++
71.3625 ++echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
71.3626 ++echo "configure:905: checking for working autoheader" >&5
71.3627 ++# Run test in a subshell; some versions of sh will print an error if
71.3628 ++# an executable is not found, even if stderr is redirected.
71.3629 ++# Redirect stdin to placate older versions of autoconf. Sigh.
71.3630 ++if (autoheader --version) < /dev/null > /dev/null 2>&1; then
71.3631 ++ AUTOHEADER=autoheader
71.3632 ++ echo "$ac_t""found" 1>&6
71.3633 ++else
71.3634 ++ AUTOHEADER="$missing_dir/missing autoheader"
71.3635 ++ echo "$ac_t""missing" 1>&6
71.3636 ++fi
71.3637 ++
71.3638 ++echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
71.3639 ++echo "configure:918: checking for working makeinfo" >&5
71.3640 ++# Run test in a subshell; some versions of sh will print an error if
71.3641 ++# an executable is not found, even if stderr is redirected.
71.3642 ++# Redirect stdin to placate older versions of autoconf. Sigh.
71.3643 ++if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
71.3644 ++ MAKEINFO=makeinfo
71.3645 ++ echo "$ac_t""found" 1>&6
71.3646 ++else
71.3647 ++ MAKEINFO="$missing_dir/missing makeinfo"
71.3648 ++ echo "$ac_t""missing" 1>&6
71.3649 ++fi
71.3650 ++
71.3651 ++
71.3652 ++
71.3653 ++# FIXME: We temporarily define our own version of AC_PROG_CC. This is
71.3654 ++# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
71.3655 ++# are probably using a cross compiler, which will not be able to fully
71.3656 ++# link an executable. This should really be fixed in autoconf
71.3657 ++# itself.
71.3658 ++
71.3659 ++
71.3660 ++
71.3661 ++# Extract the first word of "gcc", so it can be a program name with args.
71.3662 ++set dummy gcc; ac_word=$2
71.3663 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
71.3664 ++echo "configure:943: checking for $ac_word" >&5
71.3665 ++if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
71.3666 ++ echo $ac_n "(cached) $ac_c" 1>&6
71.3667 ++else
71.3668 ++ if test -n "$CC"; then
71.3669 ++ ac_cv_prog_CC="$CC" # Let the user override the test.
71.3670 ++else
71.3671 ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
71.3672 ++ ac_dummy="$PATH"
71.3673 ++ for ac_dir in $ac_dummy; do
71.3674 ++ test -z "$ac_dir" && ac_dir=.
71.3675 ++ if test -f $ac_dir/$ac_word; then
71.3676 ++ ac_cv_prog_CC="gcc"
71.3677 ++ break
71.3678 ++ fi
71.3679 ++ done
71.3680 ++ IFS="$ac_save_ifs"
71.3681 ++fi
71.3682 ++fi
71.3683 ++CC="$ac_cv_prog_CC"
71.3684 ++if test -n "$CC"; then
71.3685 ++ echo "$ac_t""$CC" 1>&6
71.3686 ++else
71.3687 ++ echo "$ac_t""no" 1>&6
71.3688 ++fi
71.3689 ++
71.3690 ++if test -z "$CC"; then
71.3691 ++ # Extract the first word of "cc", so it can be a program name with args.
71.3692 ++set dummy cc; ac_word=$2
71.3693 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
71.3694 ++echo "configure:973: checking for $ac_word" >&5
71.3695 ++if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
71.3696 ++ echo $ac_n "(cached) $ac_c" 1>&6
71.3697 ++else
71.3698 ++ if test -n "$CC"; then
71.3699 ++ ac_cv_prog_CC="$CC" # Let the user override the test.
71.3700 ++else
71.3701 ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
71.3702 ++ ac_prog_rejected=no
71.3703 ++ ac_dummy="$PATH"
71.3704 ++ for ac_dir in $ac_dummy; do
71.3705 ++ test -z "$ac_dir" && ac_dir=.
71.3706 ++ if test -f $ac_dir/$ac_word; then
71.3707 ++ if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
71.3708 ++ ac_prog_rejected=yes
71.3709 ++ continue
71.3710 ++ fi
71.3711 ++ ac_cv_prog_CC="cc"
71.3712 ++ break
71.3713 ++ fi
71.3714 ++ done
71.3715 ++ IFS="$ac_save_ifs"
71.3716 ++if test $ac_prog_rejected = yes; then
71.3717 ++ # We found a bogon in the path, so make sure we never use it.
71.3718 ++ set dummy $ac_cv_prog_CC
71.3719 ++ shift
71.3720 ++ if test $# -gt 0; then
71.3721 ++ # We chose a different compiler from the bogus one.
71.3722 ++ # However, it has the same basename, so the bogon will be chosen
71.3723 ++ # first if we set CC to just the basename; use the full file name.
71.3724 ++ shift
71.3725 ++ set dummy "$ac_dir/$ac_word" "$@"
71.3726 ++ shift
71.3727 ++ ac_cv_prog_CC="$@"
71.3728 ++ fi
71.3729 ++fi
71.3730 ++fi
71.3731 ++fi
71.3732 ++CC="$ac_cv_prog_CC"
71.3733 ++if test -n "$CC"; then
71.3734 ++ echo "$ac_t""$CC" 1>&6
71.3735 ++else
71.3736 ++ echo "$ac_t""no" 1>&6
71.3737 ++fi
71.3738 ++
71.3739 ++ test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
71.3740 ++fi
71.3741 ++
71.3742 ++echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
71.3743 ++echo "configure:1022: checking whether we are using GNU C" >&5
71.3744 ++if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
71.3745 ++ echo $ac_n "(cached) $ac_c" 1>&6
71.3746 ++else
71.3747 ++ cat > conftest.c <<EOF
71.3748 ++#ifdef __GNUC__
71.3749 ++ yes;
71.3750 ++#endif
71.3751 ++EOF
71.3752 ++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
71.3753 ++ ac_cv_prog_gcc=yes
71.3754 ++else
71.3755 ++ ac_cv_prog_gcc=no
71.3756 ++fi
71.3757 ++fi
71.3758 ++
71.3759 ++echo "$ac_t""$ac_cv_prog_gcc" 1>&6
71.3760 ++
71.3761 ++if test $ac_cv_prog_gcc = yes; then
71.3762 ++ GCC=yes
71.3763 ++ ac_test_CFLAGS="${CFLAGS+set}"
71.3764 ++ ac_save_CFLAGS="$CFLAGS"
71.3765 ++ CFLAGS=
71.3766 ++ echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
71.3767 ++echo "configure:1046: checking whether ${CC-cc} accepts -g" >&5
71.3768 ++if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
71.3769 ++ echo $ac_n "(cached) $ac_c" 1>&6
71.3770 ++else
71.3771 ++ echo 'void f(){}' > conftest.c
71.3772 ++if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
71.3773 ++ ac_cv_prog_cc_g=yes
71.3774 ++else
71.3775 ++ ac_cv_prog_cc_g=no
71.3776 ++fi
71.3777 ++rm -f conftest*
71.3778 ++
71.3779 ++fi
71.3780 ++
71.3781 ++echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
71.3782 ++ if test "$ac_test_CFLAGS" = set; then
71.3783 ++ CFLAGS="$ac_save_CFLAGS"
71.3784 ++ elif test $ac_cv_prog_cc_g = yes; then
71.3785 ++ CFLAGS="-g -O2"
71.3786 ++ else
71.3787 ++ CFLAGS="-O2"
71.3788 ++ fi
71.3789 ++else
71.3790 ++ GCC=
71.3791 ++ test "${CFLAGS+set}" = set || CFLAGS="-g"
71.3792 ++fi
71.3793 ++
71.3794 ++
71.3795 ++# AC_CHECK_TOOL does AC_REQUIRE (AC_CANONICAL_BUILD). If we don't
71.3796 ++# run it explicitly here, it will be run implicitly before
71.3797 ++# NEWLIB_CONFIGURE, which doesn't work because that means that it will
71.3798 ++# be run before AC_CANONICAL_HOST.
71.3799 ++echo $ac_n "checking build system type""... $ac_c" 1>&6
71.3800 ++echo "configure:1079: checking build system type" >&5
71.3801 ++
71.3802 ++build_alias=$build
71.3803 ++case "$build_alias" in
71.3804 ++NONE)
71.3805 ++ case $nonopt in
71.3806 ++ NONE) build_alias=$host_alias ;;
71.3807 ++ *) build_alias=$nonopt ;;
71.3808 ++ esac ;;
71.3809 ++esac
71.3810 ++
71.3811 ++build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
71.3812 ++build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
71.3813 ++build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
71.3814 ++build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
71.3815 ++echo "$ac_t""$build" 1>&6
71.3816 ++
71.3817 ++
71.3818 ++# Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
71.3819 ++set dummy ${ac_tool_prefix}as; ac_word=$2
71.3820 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
71.3821 ++echo "configure:1100: checking for $ac_word" >&5
71.3822 ++if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
71.3823 ++ echo $ac_n "(cached) $ac_c" 1>&6
71.3824 ++else
71.3825 ++ if test -n "$AS"; then
71.3826 ++ ac_cv_prog_AS="$AS" # Let the user override the test.
71.3827 ++else
71.3828 ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
71.3829 ++ ac_dummy="$PATH"
71.3830 ++ for ac_dir in $ac_dummy; do
71.3831 ++ test -z "$ac_dir" && ac_dir=.
71.3832 ++ if test -f $ac_dir/$ac_word; then
71.3833 ++ ac_cv_prog_AS="${ac_tool_prefix}as"
71.3834 ++ break
71.3835 ++ fi
71.3836 ++ done
71.3837 ++ IFS="$ac_save_ifs"
71.3838 ++ test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="as"
71.3839 ++fi
71.3840 ++fi
71.3841 ++AS="$ac_cv_prog_AS"
71.3842 ++if test -n "$AS"; then
71.3843 ++ echo "$ac_t""$AS" 1>&6
71.3844 ++else
71.3845 ++ echo "$ac_t""no" 1>&6
71.3846 ++fi
71.3847 ++
71.3848 ++
71.3849 ++
71.3850 ++# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
71.3851 ++set dummy ${ac_tool_prefix}ar; ac_word=$2
71.3852 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
71.3853 ++echo "configure:1132: checking for $ac_word" >&5
71.3854 ++if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
71.3855 ++ echo $ac_n "(cached) $ac_c" 1>&6
71.3856 ++else
71.3857 ++ if test -n "$AR"; then
71.3858 ++ ac_cv_prog_AR="$AR" # Let the user override the test.
71.3859 ++else
71.3860 ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
71.3861 ++ ac_dummy="$PATH"
71.3862 ++ for ac_dir in $ac_dummy; do
71.3863 ++ test -z "$ac_dir" && ac_dir=.
71.3864 ++ if test -f $ac_dir/$ac_word; then
71.3865 ++ ac_cv_prog_AR="${ac_tool_prefix}ar"
71.3866 ++ break
71.3867 ++ fi
71.3868 ++ done
71.3869 ++ IFS="$ac_save_ifs"
71.3870 ++ test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
71.3871 ++fi
71.3872 ++fi
71.3873 ++AR="$ac_cv_prog_AR"
71.3874 ++if test -n "$AR"; then
71.3875 ++ echo "$ac_t""$AR" 1>&6
71.3876 ++else
71.3877 ++ echo "$ac_t""no" 1>&6
71.3878 ++fi
71.3879 ++
71.3880 ++
71.3881 ++
71.3882 ++# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
71.3883 ++set dummy ${ac_tool_prefix}ranlib; ac_word=$2
71.3884 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
71.3885 ++echo "configure:1164: checking for $ac_word" >&5
71.3886 ++if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
71.3887 ++ echo $ac_n "(cached) $ac_c" 1>&6
71.3888 ++else
71.3889 ++ if test -n "$RANLIB"; then
71.3890 ++ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
71.3891 ++else
71.3892 ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
71.3893 ++ ac_dummy="$PATH"
71.3894 ++ for ac_dir in $ac_dummy; do
71.3895 ++ test -z "$ac_dir" && ac_dir=.
71.3896 ++ if test -f $ac_dir/$ac_word; then
71.3897 ++ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
71.3898 ++ break
71.3899 ++ fi
71.3900 ++ done
71.3901 ++ IFS="$ac_save_ifs"
71.3902 ++fi
71.3903 ++fi
71.3904 ++RANLIB="$ac_cv_prog_RANLIB"
71.3905 ++if test -n "$RANLIB"; then
71.3906 ++ echo "$ac_t""$RANLIB" 1>&6
71.3907 ++else
71.3908 ++ echo "$ac_t""no" 1>&6
71.3909 ++fi
71.3910 ++
71.3911 ++
71.3912 ++if test -z "$ac_cv_prog_RANLIB"; then
71.3913 ++if test -n "$ac_tool_prefix"; then
71.3914 ++ # Extract the first word of "ranlib", so it can be a program name with args.
71.3915 ++set dummy ranlib; ac_word=$2
71.3916 ++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
71.3917 ++echo "configure:1196: checking for $ac_word" >&5
71.3918 ++if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
71.3919 ++ echo $ac_n "(cached) $ac_c" 1>&6
71.3920 ++else
71.3921 ++ if test -n "$RANLIB"; then
71.3922 ++ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
71.3923 ++else
71.3924 ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
71.3925 ++ ac_dummy="$PATH"
71.3926 ++ for ac_dir in $ac_dummy; do
71.3927 ++ test -z "$ac_dir" && ac_dir=.
71.3928 ++ if test -f $ac_dir/$ac_word; then
71.3929 ++ ac_cv_prog_RANLIB="ranlib"
71.3930 ++ break
71.3931 ++ fi
71.3932 ++ done
71.3933 ++ IFS="$ac_save_ifs"
71.3934 ++ test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
71.3935 ++fi
71.3936 ++fi
71.3937 ++RANLIB="$ac_cv_prog_RANLIB"
71.3938 ++if test -n "$RANLIB"; then
71.3939 ++ echo "$ac_t""$RANLIB" 1>&6
71.3940 ++else
71.3941 ++ echo "$ac_t""no" 1>&6
71.3942 ++fi
71.3943 ++
71.3944 ++else
71.3945 ++ RANLIB=":"
71.3946 ++fi
71.3947 ++fi
71.3948 ++
71.3949 ++
71.3950 ++
71.3951 ++test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
71.3952 ++
71.3953 ++
71.3954 ++#AM_MAINTAINER_MODE
71.3955 ++
71.3956 ++# We need AM_EXEEXT to keep automake happy in cygnus mode. However,
71.3957 ++# at least currently, we never actually build a program, so we never
71.3958 ++# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
71.3959 ++# fails, because we are probably configuring with a cross compiler
71.3960 ++# which can't create executables. So we include AM_EXEEXT to keep
71.3961 ++# automake happy, but we don't execute it, since we don't care about
71.3962 ++# the result.
71.3963 ++if false; then
71.3964 ++
71.3965 ++
71.3966 ++echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
71.3967 ++echo "configure:1246: checking for executable suffix" >&5
71.3968 ++if eval "test \"`echo '$''{'am_cv_exeext'+set}'`\" = set"; then
71.3969 ++ echo $ac_n "(cached) $ac_c" 1>&6
71.3970 ++else
71.3971 ++ if test "$CYGWIN32" = yes || test "$MINGW32" = yes; then
71.3972 ++am_cv_exeext=.exe
71.3973 ++else
71.3974 ++cat > am_c_test.c << 'EOF'
71.3975 ++int main() {
71.3976 ++/* Nothing needed here */
71.3977 ++}
71.3978 ++EOF
71.3979 ++${CC-cc} -o am_c_test $CFLAGS $CPPFLAGS $LDFLAGS am_c_test.c $LIBS 1>&5
71.3980 ++am_cv_exeext=
71.3981 ++for file in am_c_test.*; do
71.3982 ++ case $file in
71.3983 ++ *.c) ;;
71.3984 ++ *.o) ;;
71.3985 ++ *) am_cv_exeext=`echo $file | sed -e s/am_c_test//` ;;
71.3986 ++ esac
71.3987 ++done
71.3988 ++rm -f am_c_test*
71.3989 ++fi
71.3990 ++
71.3991 ++test x"${am_cv_exeext}" = x && am_cv_exeext=no
71.3992 ++fi
71.3993 ++EXEEXT=""
71.3994 ++test x"${am_cv_exeext}" != xno && EXEEXT=${am_cv_exeext}
71.3995 ++echo "$ac_t""${am_cv_exeext}" 1>&6
71.3996 ++
71.3997 ++fi
71.3998 ++
71.3999 ++. ${newlib_basedir}/configure.host
71.4000 ++
71.4001 ++case ${newlib_basedir} in
71.4002 ++/* | A-Za-z:/\\*) newlib_flagbasedir=${newlib_basedir} ;;
71.4003 ++*) newlib_flagbasedir='$(top_builddir)/'${newlib_basedir} ;;
71.4004 ++esac
71.4005 ++
71.4006 ++newlib_cflags="${newlib_cflags} -I"'$(top_builddir)'"/../../../targ-include -I${newlib_flagbasedir}/libc/include"
71.4007 ++case "${host}" in
71.4008 ++ *-*-cygwin32*)
71.4009 ++ newlib_cflags="${newlib_cflags} -I${newlib_flagbasedir}/../winsup/include"
71.4010 ++ ;;
71.4011 ++esac
71.4012 ++
71.4013 ++newlib_cflags="${newlib_cflags} -fno-builtin"
71.4014 ++
71.4015 ++NEWLIB_CFLAGS=${newlib_cflags}
71.4016 ++
71.4017 ++
71.4018 ++
71.4019 ++
71.4020 ++
71.4021 ++
71.4022 ++trap '' 1 2 15
71.4023 ++cat > confcache <<\EOF
71.4024 ++# This file is a shell script that caches the results of configure
71.4025 ++# tests run on this system so they can be shared between configure
71.4026 ++# scripts and configure runs. It is not useful on other systems.
71.4027 ++# If it contains results you don't want to keep, you may remove or edit it.
71.4028 ++#
71.4029 ++# By default, configure uses ./config.cache as the cache file,
71.4030 ++# creating it if it does not exist already. You can give configure
71.4031 ++# the --cache-file=FILE option to use a different cache file; that is
71.4032 ++# what configure does when it calls configure scripts in
71.4033 ++# subdirectories, so they share the cache.
71.4034 ++# Giving --cache-file=/dev/null disables caching, for debugging configure.
71.4035 ++# config.status only pays attention to the cache file if you give it the
71.4036 ++# --recheck option to rerun configure.
71.4037 ++#
71.4038 ++EOF
71.4039 ++# The following way of writing the cache mishandles newlines in values,
71.4040 ++# but we know of no workaround that is simple, portable, and efficient.
71.4041 ++# So, don't put newlines in cache variables' values.
71.4042 ++# Ultrix sh set writes to stderr and can't be redirected directly,
71.4043 ++# and sets the high bit in the cache file unless we assign to the vars.
71.4044 ++(set) 2>&1 |
71.4045 ++ case `(ac_space=' '; set | grep ac_space) 2>&1` in
71.4046 ++ *ac_space=\ *)
71.4047 ++ # `set' does not quote correctly, so add quotes (double-quote substitution
71.4048 ++ # turns \\\\ into \\, and sed turns \\ into \).
71.4049 ++ sed -n \
71.4050 ++ -e "s/'/'\\\\''/g" \
71.4051 ++ -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
71.4052 ++ ;;
71.4053 ++ *)
71.4054 ++ # `set' quotes correctly as required by POSIX, so do not add quotes.
71.4055 ++ sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
71.4056 ++ ;;
71.4057 ++ esac >> confcache
71.4058 ++if cmp -s $cache_file confcache; then
71.4059 ++ :
71.4060 ++else
71.4061 ++ if test -w $cache_file; then
71.4062 ++ echo "updating cache $cache_file"
71.4063 ++ cat confcache > $cache_file
71.4064 ++ else
71.4065 ++ echo "not updating unwritable cache $cache_file"
71.4066 ++ fi
71.4067 ++fi
71.4068 ++rm -f confcache
71.4069 ++
71.4070 ++trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
71.4071 ++
71.4072 ++test "x$prefix" = xNONE && prefix=$ac_default_prefix
71.4073 ++# Let make expand exec_prefix.
71.4074 ++test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
71.4075 ++
71.4076 ++# Any assignment to VPATH causes Sun make to only execute
71.4077 ++# the first set of double-colon rules, so remove it if not needed.
71.4078 ++# If there is a colon in the path, we need to keep it.
71.4079 ++if test "x$srcdir" = x.; then
71.4080 ++ ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
71.4081 ++fi
71.4082 ++
71.4083 ++trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
71.4084 ++
71.4085 ++# Transform confdefs.h into DEFS.
71.4086 ++# Protect against shell expansion while executing Makefile rules.
71.4087 ++# Protect against Makefile macro expansion.
71.4088 ++cat > conftest.defs <<\EOF
71.4089 ++s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
71.4090 ++s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
71.4091 ++s%\[%\\&%g
71.4092 ++s%\]%\\&%g
71.4093 ++s%\$%$$%g
71.4094 ++EOF
71.4095 ++DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
71.4096 ++rm -f conftest.defs
71.4097 ++
71.4098 ++
71.4099 ++# Without the "./", some shells look in PATH for config.status.
71.4100 ++: ${CONFIG_STATUS=./config.status}
71.4101 ++
71.4102 ++echo creating $CONFIG_STATUS
71.4103 ++rm -f $CONFIG_STATUS
71.4104 ++cat > $CONFIG_STATUS <<EOF
71.4105 ++#! /bin/sh
71.4106 ++# Generated automatically by configure.
71.4107 ++# Run this file to recreate the current configuration.
71.4108 ++# This directory was configured as follows,
71.4109 ++# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
71.4110 ++#
71.4111 ++# $0 $ac_configure_args
71.4112 ++#
71.4113 ++# Compiler output produced by configure, useful for debugging
71.4114 ++# configure, is in ./config.log if it exists.
71.4115 ++
71.4116 ++ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
71.4117 ++for ac_option
71.4118 ++do
71.4119 ++ case "\$ac_option" in
71.4120 ++ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
71.4121 ++ echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
71.4122 ++ exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
71.4123 ++ -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
71.4124 ++ echo "$CONFIG_STATUS generated by autoconf version 2.13"
71.4125 ++ exit 0 ;;
71.4126 ++ -help | --help | --hel | --he | --h)
71.4127 ++ echo "\$ac_cs_usage"; exit 0 ;;
71.4128 ++ *) echo "\$ac_cs_usage"; exit 1 ;;
71.4129 ++ esac
71.4130 ++done
71.4131 ++
71.4132 ++ac_given_srcdir=$srcdir
71.4133 ++ac_given_INSTALL="$INSTALL"
71.4134 ++
71.4135 ++trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
71.4136 ++EOF
71.4137 ++cat >> $CONFIG_STATUS <<EOF
71.4138 ++
71.4139 ++# Protect against being on the right side of a sed subst in config.status.
71.4140 ++sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
71.4141 ++ s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
71.4142 ++$ac_vpsub
71.4143 ++$extrasub
71.4144 ++s%@SHELL@%$SHELL%g
71.4145 ++s%@CFLAGS@%$CFLAGS%g
71.4146 ++s%@CPPFLAGS@%$CPPFLAGS%g
71.4147 ++s%@CXXFLAGS@%$CXXFLAGS%g
71.4148 ++s%@FFLAGS@%$FFLAGS%g
71.4149 ++s%@DEFS@%$DEFS%g
71.4150 ++s%@LDFLAGS@%$LDFLAGS%g
71.4151 ++s%@LIBS@%$LIBS%g
71.4152 ++s%@exec_prefix@%$exec_prefix%g
71.4153 ++s%@prefix@%$prefix%g
71.4154 ++s%@program_transform_name@%$program_transform_name%g
71.4155 ++s%@bindir@%$bindir%g
71.4156 ++s%@sbindir@%$sbindir%g
71.4157 ++s%@libexecdir@%$libexecdir%g
71.4158 ++s%@datadir@%$datadir%g
71.4159 ++s%@sysconfdir@%$sysconfdir%g
71.4160 ++s%@sharedstatedir@%$sharedstatedir%g
71.4161 ++s%@localstatedir@%$localstatedir%g
71.4162 ++s%@libdir@%$libdir%g
71.4163 ++s%@includedir@%$includedir%g
71.4164 ++s%@oldincludedir@%$oldincludedir%g
71.4165 ++s%@infodir@%$infodir%g
71.4166 ++s%@mandir@%$mandir%g
71.4167 ++s%@newlib_basedir@%$newlib_basedir%g
71.4168 ++s%@host@%$host%g
71.4169 ++s%@host_alias@%$host_alias%g
71.4170 ++s%@host_cpu@%$host_cpu%g
71.4171 ++s%@host_vendor@%$host_vendor%g
71.4172 ++s%@host_os@%$host_os%g
71.4173 ++s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
71.4174 ++s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
71.4175 ++s%@INSTALL_DATA@%$INSTALL_DATA%g
71.4176 ++s%@PACKAGE@%$PACKAGE%g
71.4177 ++s%@VERSION@%$VERSION%g
71.4178 ++s%@ACLOCAL@%$ACLOCAL%g
71.4179 ++s%@AUTOCONF@%$AUTOCONF%g
71.4180 ++s%@AUTOMAKE@%$AUTOMAKE%g
71.4181 ++s%@AUTOHEADER@%$AUTOHEADER%g
71.4182 ++s%@MAKEINFO@%$MAKEINFO%g
71.4183 ++s%@SET_MAKE@%$SET_MAKE%g
71.4184 ++s%@CC@%$CC%g
71.4185 ++s%@build@%$build%g
71.4186 ++s%@build_alias@%$build_alias%g
71.4187 ++s%@build_cpu@%$build_cpu%g
71.4188 ++s%@build_vendor@%$build_vendor%g
71.4189 ++s%@build_os@%$build_os%g
71.4190 ++s%@AS@%$AS%g
71.4191 ++s%@AR@%$AR%g
71.4192 ++s%@RANLIB@%$RANLIB%g
71.4193 ++s%@EXEEXT@%$EXEEXT%g
71.4194 ++s%@NEWLIB_CFLAGS@%$NEWLIB_CFLAGS%g
71.4195 ++s%@machine_dir@%$machine_dir%g
71.4196 ++s%@sys_dir@%$sys_dir%g
71.4197 ++
71.4198 ++CEOF
71.4199 ++EOF
71.4200 ++
71.4201 ++cat >> $CONFIG_STATUS <<\EOF
71.4202 ++
71.4203 ++# Split the substitutions into bite-sized pieces for seds with
71.4204 ++# small command number limits, like on Digital OSF/1 and HP-UX.
71.4205 ++ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
71.4206 ++ac_file=1 # Number of current file.
71.4207 ++ac_beg=1 # First line for current file.
71.4208 ++ac_end=$ac_max_sed_cmds # Line after last line for current file.
71.4209 ++ac_more_lines=:
71.4210 ++ac_sed_cmds=""
71.4211 ++while $ac_more_lines; do
71.4212 ++ if test $ac_beg -gt 1; then
71.4213 ++ sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
71.4214 ++ else
71.4215 ++ sed "${ac_end}q" conftest.subs > conftest.s$ac_file
71.4216 ++ fi
71.4217 ++ if test ! -s conftest.s$ac_file; then
71.4218 ++ ac_more_lines=false
71.4219 ++ rm -f conftest.s$ac_file
71.4220 ++ else
71.4221 ++ if test -z "$ac_sed_cmds"; then
71.4222 ++ ac_sed_cmds="sed -f conftest.s$ac_file"
71.4223 ++ else
71.4224 ++ ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
71.4225 ++ fi
71.4226 ++ ac_file=`expr $ac_file + 1`
71.4227 ++ ac_beg=$ac_end
71.4228 ++ ac_end=`expr $ac_end + $ac_max_sed_cmds`
71.4229 ++ fi
71.4230 ++done
71.4231 ++if test -z "$ac_sed_cmds"; then
71.4232 ++ ac_sed_cmds=cat
71.4233 ++fi
71.4234 ++EOF
71.4235 ++
71.4236 ++cat >> $CONFIG_STATUS <<EOF
71.4237 ++
71.4238 ++CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
71.4239 ++EOF
71.4240 ++cat >> $CONFIG_STATUS <<\EOF
71.4241 ++for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
71.4242 ++ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
71.4243 ++ case "$ac_file" in
71.4244 ++ *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
71.4245 ++ ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
71.4246 ++ *) ac_file_in="${ac_file}.in" ;;
71.4247 ++ esac
71.4248 ++
71.4249 ++ # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
71.4250 ++
71.4251 ++ # Remove last slash and all that follows it. Not all systems have dirname.
71.4252 ++ ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
71.4253 ++ if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
71.4254 ++ # The file is in a subdirectory.
71.4255 ++ test ! -d "$ac_dir" && mkdir "$ac_dir"
71.4256 ++ ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
71.4257 ++ # A "../" for each directory in $ac_dir_suffix.
71.4258 ++ ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
71.4259 ++ else
71.4260 ++ ac_dir_suffix= ac_dots=
71.4261 ++ fi
71.4262 ++
71.4263 ++ case "$ac_given_srcdir" in
71.4264 ++ .) srcdir=.
71.4265 ++ if test -z "$ac_dots"; then top_srcdir=.
71.4266 ++ else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
71.4267 ++ /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
71.4268 ++ *) # Relative path.
71.4269 ++ srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
71.4270 ++ top_srcdir="$ac_dots$ac_given_srcdir" ;;
71.4271 ++ esac
71.4272 ++
71.4273 ++ case "$ac_given_INSTALL" in
71.4274 ++ [/$]*) INSTALL="$ac_given_INSTALL" ;;
71.4275 ++ *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
71.4276 ++ esac
71.4277 ++
71.4278 ++ echo creating "$ac_file"
71.4279 ++ rm -f "$ac_file"
71.4280 ++ configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
71.4281 ++ case "$ac_file" in
71.4282 ++ *Makefile*) ac_comsub="1i\\
71.4283 ++# $configure_input" ;;
71.4284 ++ *) ac_comsub= ;;
71.4285 ++ esac
71.4286 ++
71.4287 ++ ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
71.4288 ++ sed -e "$ac_comsub
71.4289 ++s%@configure_input@%$configure_input%g
71.4290 ++s%@srcdir@%$srcdir%g
71.4291 ++s%@top_srcdir@%$top_srcdir%g
71.4292 ++s%@INSTALL@%$INSTALL%g
71.4293 ++" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
71.4294 ++fi; done
71.4295 ++rm -f conftest.s*
71.4296 ++
71.4297 ++EOF
71.4298 ++cat >> $CONFIG_STATUS <<EOF
71.4299 ++
71.4300 ++EOF
71.4301 ++cat >> $CONFIG_STATUS <<\EOF
71.4302 ++
71.4303 ++exit 0
71.4304 ++EOF
71.4305 ++chmod +x $CONFIG_STATUS
71.4306 ++rm -fr confdefs* $ac_clean_files
71.4307 ++test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
71.4308 ++
71.4309 +diff -urN newlib-1.8.2/newlib/libc/sys/dreamcast/configure.in newlib-1.8.2-dc/newlib/libc/sys/dreamcast/configure.in
71.4310 +--- newlib-1.8.2/newlib/libc/sys/dreamcast/configure.in 1970-01-01 10:00:00.000000000 +1000
71.4311 ++++ newlib-1.8.2-dc/newlib/libc/sys/dreamcast/configure.in 2006-07-06 18:28:31.000000000 +1000
71.4312 +@@ -0,0 +1,12 @@
71.4313 ++dnl This is the newlib/libc/sys/sh configure.in file.
71.4314 ++dnl Process this file with autoconf to produce a configure script.
71.4315 ++
71.4316 ++AC_PREREQ(2.5)
71.4317 ++AC_INIT(sbrk.c)
71.4318 ++
71.4319 ++dnl Can't be done in NEWLIB_CONFIGURE because that confuses automake.
71.4320 ++AC_CONFIG_AUX_DIR(../../../..)
71.4321 ++
71.4322 ++NEWLIB_CONFIGURE(../../..)
71.4323 ++
71.4324 ++AC_OUTPUT(Makefile)
71.4325 +diff -urN newlib-1.8.2/newlib/libc/sys/dreamcast/creat.c newlib-1.8.2-dc/newlib/libc/sys/dreamcast/creat.c
71.4326 +--- newlib-1.8.2/newlib/libc/sys/dreamcast/creat.c 1970-01-01 10:00:00.000000000 +1000
71.4327 ++++ newlib-1.8.2-dc/newlib/libc/sys/dreamcast/creat.c 2006-07-06 18:28:31.000000000 +1000
71.4328 +@@ -0,0 +1,22 @@
71.4329 ++#include <sys/types.h>
71.4330 ++#include <sys/fcntl.h>
71.4331 ++
71.4332 ++#include "vfs.h"
71.4333 ++
71.4334 ++int
71.4335 ++creat (const char *path, mode_t mode)
71.4336 ++{
71.4337 ++ char *obj = _newlib_vfs_new_string (path);
71.4338 ++
71.4339 ++ struct media_ops *mops = _newlib_vfs_get_media_ops (path);
71.4340 ++ struct file *pf = mops->creat (obj, mode);
71.4341 ++
71.4342 ++ _newlib_vfs_delete_string (obj);
71.4343 ++
71.4344 ++ if (pf != NULL)
71.4345 ++ {
71.4346 ++ return _newlib_vfs_insert_file (pf);
71.4347 ++ }
71.4348 ++
71.4349 ++ return -1;
71.4350 ++}
71.4351 +diff -urN newlib-1.8.2/newlib/libc/sys/dreamcast/crt0.S newlib-1.8.2-dc/newlib/libc/sys/dreamcast/crt0.S
71.4352 +--- newlib-1.8.2/newlib/libc/sys/dreamcast/crt0.S 1970-01-01 10:00:00.000000000 +1000
71.4353 ++++ newlib-1.8.2-dc/newlib/libc/sys/dreamcast/crt0.S 2006-07-06 18:28:31.000000000 +1000
71.4354 +@@ -0,0 +1,175 @@
71.4355 ++
71.4356 ++! need this here so that converting ELFs to binary doesn't break on the DC.
71.4357 ++! Note: this is a hack, unless I can find a better way to do this.
71.4358 ++ .section .init
71.4359 ++_fake_start:
71.4360 ++ mov.l start_k, r0
71.4361 ++ jmp @r0
71.4362 ++ nop
71.4363 ++
71.4364 ++ .align 4
71.4365 ++start_k:
71.4366 ++ .long _start
71.4367 ++
71.4368 ++ .section .text
71.4369 ++ .global _start
71.4370 ++ .global ___exit
71.4371 ++ /*.global _atexit*/
71.4372 ++_start:
71.4373 ++ mov.l setup_cache_k,r0
71.4374 ++ mov.l p2_mask,r1
71.4375 ++ or r1,r0
71.4376 ++ jmp @r0
71.4377 ++ nop
71.4378 ++setup_cache:
71.4379 ++ mov.l ccr_addr,r0
71.4380 ++ mov.w ccr_data,r1
71.4381 ++ mov.l r1,@r0
71.4382 ++ mov.l start_2_k,r0
71.4383 ++ nop
71.4384 ++ nop
71.4385 ++ nop
71.4386 ++ nop
71.4387 ++ nop
71.4388 ++ nop
71.4389 ++ nop
71.4390 ++ jmp @r0
71.4391 ++ nop
71.4392 ++start_2:
71.4393 ++ mov.l old_stack_k,r14
71.4394 ++ mov.l r15,@r14
71.4395 ++ mov.l old_pr_k,r14
71.4396 ++ sts pr,r15
71.4397 ++ mov.l r15,@r14
71.4398 ++ mov.l stack_k,r15
71.4399 ++
71.4400 ++ ! zero out bss
71.4401 ++ mov.l edata_k,r0
71.4402 ++ mov.l end_k,r1
71.4403 ++ mov #0,r2
71.4404 ++start_l:
71.4405 ++ mov.l r2,@r0
71.4406 ++ add #4,r0
71.4407 ++ cmp/ge r0,r1
71.4408 ++ bt start_l
71.4409 ++
71.4410 ++#if defined (__SH3E__) || defined(__SH4_SINGLE__) || defined(__SH4__) || defined(__SH4_SINGLE_ONLY)
71.4411 ++ mov.l set_fpscr_k, r1
71.4412 ++ jsr @r1
71.4413 ++ mov #0,r4
71.4414 ++ lds r3,fpscr
71.4415 ++#endif /* defined (__SH3E__) || defined(__SH4_SINGLE__) || defined(__SH4__) || defined(__SH4_SINGLE_ONLY__) */
71.4416 ++
71.4417 ++get_utime:
71.4418 ++ ! Get the current time and save it for future calls to _times().
71.4419 ++ mov.l rtc_h,r1
71.4420 ++ mov.l @r1,r2
71.4421 ++ mov.l rtc_l,r3
71.4422 ++ mov.l @r3,r4
71.4423 ++ shll16 r2
71.4424 ++ mov.l rtc_mask,r1
71.4425 ++ and r1,r2
71.4426 ++ extu.w r4,r4
71.4427 ++ or r4,r2
71.4428 ++ mov.l newlib_dreamcast_utime,r0
71.4429 ++ mov.l r2,@r0
71.4430 ++
71.4431 ++ ! arrange for exit to call fini
71.4432 ++ mov.l atexit_k,r0
71.4433 ++ mov.l fini_k,r4
71.4434 ++ jsr @r0
71.4435 ++ nop
71.4436 ++
71.4437 ++ ! call init
71.4438 ++ mov.l init_k,r0
71.4439 ++ jsr @r0
71.4440 ++ nop
71.4441 ++
71.4442 ++ ! call the mainline
71.4443 ++ mov.l main_k,r0
71.4444 ++ jsr @r0
71.4445 ++ or r0,r0
71.4446 ++
71.4447 ++ ! call exit
71.4448 ++ mov r0,r4
71.4449 ++ mov.l exit_k,r0
71.4450 ++ jsr @r0
71.4451 ++ or r0,r0
71.4452 ++
71.4453 ++___exit:
71.4454 ++ mov.l old_pr_k,r14
71.4455 ++ mov.l @r14,r15
71.4456 ++ lds r15,pr
71.4457 ++ mov.l old_stack_k,r14
71.4458 ++ mov.l @r14,r15
71.4459 ++ rts
71.4460 ++ nop
71.4461 ++/*
71.4462 ++_atexit:
71.4463 ++ rts
71.4464 ++ nop
71.4465 ++*/
71.4466 ++ .align 4
71.4467 ++#if defined (__SH3E__) || defined(__SH4_SINGLE__) || defined(__SH4__) || defined(__SH4_SINGLE_ONLY__)
71.4468 ++set_fpscr_k:
71.4469 ++ .long ___set_fpscr
71.4470 ++#endif /* defined (__SH3E__) || defined(__SH4_SINGLE__) || defined(__SH4__) || defined(SH4_SINGLE_ONLY) */
71.4471 ++stack_k:
71.4472 ++ .long _stack
71.4473 ++edata_k:
71.4474 ++ .long _edata
71.4475 ++end_k:
71.4476 ++ .long _end
71.4477 ++main_k:
71.4478 ++ .long _main
71.4479 ++exit_k:
71.4480 ++ .long _exit
71.4481 ++atexit_k:
71.4482 ++ .long _atexit
71.4483 ++init_k:
71.4484 ++ .long _init
71.4485 ++fini_k:
71.4486 ++ .long _fini
71.4487 ++old_stack_k:
71.4488 ++ .long _old_stack
71.4489 ++old_pr_k:
71.4490 ++ .long _old_pr
71.4491 ++
71.4492 ++_old_stack:
71.4493 ++ .long 0
71.4494 ++_old_pr:
71.4495 ++ .long 0
71.4496 ++
71.4497 ++setup_cache_k:
71.4498 ++ .long setup_cache
71.4499 ++start_2_k:
71.4500 ++ .long start_2
71.4501 ++p2_mask:
71.4502 ++ .long 0xa0000000
71.4503 ++ccr_addr:
71.4504 ++ .long 0xff00001c
71.4505 ++ccr_data:
71.4506 ++ .word 0x090b
71.4507 ++
71.4508 ++ .align 4
71.4509 ++
71.4510 ++rtc_h:
71.4511 ++ .long 0xa0710000
71.4512 ++rtc_l:
71.4513 ++ .long 0xa0710004
71.4514 ++rtc_mask:
71.4515 ++ .long 0xffff0000
71.4516 ++newlib_dreamcast_utime:
71.4517 ++ .long __newlib_dreamcast_utime
71.4518 ++
71.4519 ++ .section .data
71.4520 ++ .global __newlib_dreamcast_utime
71.4521 ++
71.4522 ++__newlib_dreamcast_utime:
71.4523 ++ .long 0x00000000
71.4524 ++
71.4525 ++#ifdef __ELF__
71.4526 ++ .section .stack,"aw"
71.4527 ++#else
71.4528 ++ .section .stack
71.4529 ++#endif
71.4530 +diff -urN newlib-1.8.2/newlib/libc/sys/dreamcast/dcload.S newlib-1.8.2-dc/newlib/libc/sys/dreamcast/dcload.S
71.4531 +--- newlib-1.8.2/newlib/libc/sys/dreamcast/dcload.S 1970-01-01 10:00:00.000000000 +1000
71.4532 ++++ newlib-1.8.2-dc/newlib/libc/sys/dreamcast/dcload.S 2006-07-06 19:27:39.000000000 +1000
71.4533 +@@ -0,0 +1,10 @@
71.4534 ++.global _dcloadsyscall
71.4535 ++_dcloadsyscall:
71.4536 ++ mov.l dcloadsyscall_k,r0
71.4537 ++ mov.l @r0,r0
71.4538 ++ jmp @r0
71.4539 ++ nop
71.4540 ++
71.4541 ++.align 4
71.4542 ++dcloadsyscall_k:
71.4543 ++ .long 0x8c004008
71.4544 +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
71.4545 +--- newlib-1.8.2/newlib/libc/sys/dreamcast/dcload_vfs.c 1970-01-01 10:00:00.000000000 +1000
71.4546 ++++ newlib-1.8.2-dc/newlib/libc/sys/dreamcast/dcload_vfs.c 2006-07-06 18:31:26.000000000 +1000
71.4547 +@@ -0,0 +1,242 @@
71.4548 ++/* Support routines for host access via Andrew K's dcload. dcload offers
71.4549 ++ full host file-system access along with a few POSIX-like functions. */
71.4550 ++
71.4551 ++/* FIXME: If the host is returning negative values (error codes), then
71.4552 ++ we need to assign the proper value to errno and return -1 as per newlib's
71.4553 ++ conventions. */
71.4554 ++
71.4555 ++/* FIXME: Split some of this off into a separate file, dcload.c. This will
71.4556 ++ contain public functions that coincide with the prototypes in
71.4557 ++ include/dcload.h */
71.4558 ++
71.4559 ++#include <sys/types.h>
71.4560 ++#include <sys/stat.h>
71.4561 ++#include <errno.h>
71.4562 ++#include <stdlib.h>
71.4563 ++
71.4564 ++#include "vfs.h"
71.4565 ++
71.4566 ++static struct media_ops dcload_host_media_ops;
71.4567 ++static struct file_ops dcload_host_file_ops;
71.4568 ++
71.4569 ++#define DCLOAD_MAGIC 0xdeadbeef
71.4570 ++#define DCLOAD_ALT_MAGIC 0xfeedface
71.4571 ++#define DCLOAD_MAGIC_ADDR 0x8c004004
71.4572 ++
71.4573 ++/* True if we have console/file-system access on the host */
71.4574 ++static int host_enabled = 1;
71.4575 ++
71.4576 ++/* Determine whether we're loaded under dcload and if so, whether or not
71.4577 ++ the console/file-server is enabled. If the console/file-server isn't
71.4578 ++ enabled, then we won't have anything meaningful to do in the host access
71.4579 ++ routines, so they'll be replaced with invalid media/file ops in our init
71.4580 ++ routine. */
71.4581 ++
71.4582 ++int _newlib_vfs_is_dcload (void)
71.4583 ++{
71.4584 ++ /* Check for either magic value */
71.4585 ++ unsigned long magic = *(unsigned long *)DCLOAD_MAGIC_ADDR;
71.4586 ++
71.4587 ++ if (magic == DCLOAD_MAGIC)
71.4588 ++ {
71.4589 ++ return 1;
71.4590 ++ }
71.4591 ++ else if (magic == DCLOAD_ALT_MAGIC) /* Disable host access */
71.4592 ++ {
71.4593 ++ host_enabled = 0;
71.4594 ++ return 1;
71.4595 ++ }
71.4596 ++
71.4597 ++ return 0;
71.4598 ++}
71.4599 ++
71.4600 ++void _newlib_vfs_dcload_init (void)
71.4601 ++{
71.4602 ++ _newlib_vfs_initialized = VFS_LOADER_DCLOAD_NOHOST;
71.4603 ++
71.4604 ++ if (host_enabled)
71.4605 ++ {
71.4606 ++ /* FIXME: Rework this... */
71.4607 ++ struct file * stdin_file = _newlib_vfs_first_file;
71.4608 ++ struct file * stdout_file = stdin_file->next;
71.4609 ++ struct file * stderr_file = stdout_file->next;
71.4610 ++
71.4611 ++ _newlib_vfs_initialized = VFS_LOADER_DCLOAD_HOST;
71.4612 ++ _newlib_vfs_host_media_ops = &dcload_host_media_ops;
71.4613 ++
71.4614 ++ /* Reroute stdin, stdout, and stderr through dcload's host console. */
71.4615 ++ stdin_file->fops = &dcload_host_file_ops;
71.4616 ++ stdout_file->fops = &dcload_host_file_ops;
71.4617 ++ stderr_file->fops = &dcload_host_file_ops;
71.4618 ++ }
71.4619 ++
71.4620 ++ /* All media ops are initially set to invalid so our work is done. */
71.4621 ++}
71.4622 ++
71.4623 ++extern int dcloadsyscall (int func, ...);
71.4624 ++
71.4625 ++/* dcload host media operations */
71.4626 ++
71.4627 ++/* Perform the open/creat syscall and allocate space for a new file if
71.4628 ++ we get a valid fd. Otherwise return the errno and NULL on errror. */
71.4629 ++static struct file *do_open_media_op (int func, const char *obj, int arg, ...)
71.4630 ++{
71.4631 ++ struct file *pf;
71.4632 ++ int res = dcloadsyscall (func, obj, arg);
71.4633 ++ if (res >= 0)
71.4634 ++ {
71.4635 ++ pf = (struct file *) malloc (sizeof (struct file));
71.4636 ++
71.4637 ++ if (pf)
71.4638 ++ {
71.4639 ++ /* The library fd is set in _newlib_vfs_insert_file */
71.4640 ++ pf->next = NULL;
71.4641 ++ pf->fd = 0;
71.4642 ++ pf->media_fd = res;
71.4643 ++ pf->fops = &dcload_host_file_ops;
71.4644 ++ pf->specifics = NULL;
71.4645 ++ return pf;
71.4646 ++ }
71.4647 ++ }
71.4648 ++
71.4649 ++ return NULL;
71.4650 ++}
71.4651 ++
71.4652 ++#define OPEN_NR 2
71.4653 ++static struct file *dcload_open_media_op (const char *obj, int flags,
71.4654 ++ mode_t mode)
71.4655 ++{
71.4656 ++ return do_open_media_op (OPEN_NR, obj, flags, mode);
71.4657 ++}
71.4658 ++
71.4659 ++#define CREAT_NR 4
71.4660 ++static struct file *dcload_creat_media_op (const char *obj, mode_t mode)
71.4661 ++{
71.4662 ++ return do_open_media_op (CREAT_NR, obj, mode);
71.4663 ++}
71.4664 ++
71.4665 ++#define LINK_NR 5
71.4666 ++static int dcload_link_media_op (const char *old_obj, const char *new_obj)
71.4667 ++{
71.4668 ++ return dcloadsyscall (LINK_NR, old_obj, new_obj);
71.4669 ++}
71.4670 ++
71.4671 ++#define UNLINK_NR 6
71.4672 ++static int dcload_unlink_media_op (const char *obj)
71.4673 ++{
71.4674 ++ return dcloadsyscall (UNLINK_NR, obj);
71.4675 ++}
71.4676 ++
71.4677 ++#define STAT_NR 12
71.4678 ++static int dcload_stat_media_op (const char *obj, struct stat *pstat)
71.4679 ++{
71.4680 ++ return dcloadsyscall (STAT_NR, obj, pstat);
71.4681 ++}
71.4682 ++
71.4683 ++#define CHMOD_NR 8
71.4684 ++static int dcload_chmod_media_op (const char *obj, mode_t mode)
71.4685 ++{
71.4686 ++ return dcloadsyscall (CHMOD_NR, obj, mode);
71.4687 ++}
71.4688 ++
71.4689 ++#define CHDIR_NR 7
71.4690 ++static int dcload_chdir_media_op (const char *obj)
71.4691 ++{
71.4692 ++ return dcloadsyscall (CHDIR_NR, obj);
71.4693 ++}
71.4694 ++
71.4695 ++/* dcload host file operations */
71.4696 ++
71.4697 ++static size_t do_rw_file_op (int func, struct file *pf, void *buf, size_t cnt)
71.4698 ++{
71.4699 ++ return dcloadsyscall (func, pf->media_fd, buf, cnt);
71.4700 ++}
71.4701 ++
71.4702 ++#define READ_NR 0
71.4703 ++static size_t dcload_read_file_op (struct file *pf, void *buf, size_t cnt)
71.4704 ++{
71.4705 ++ return do_rw_file_op (READ_NR, pf, buf, cnt);
71.4706 ++}
71.4707 ++
71.4708 ++#define WRITE_NR 1
71.4709 ++static size_t dcload_write_file_op (struct file *pf, void *buf, size_t cnt)
71.4710 ++{
71.4711 ++ return do_rw_file_op (WRITE_NR, pf, buf, cnt);
71.4712 ++}
71.4713 ++
71.4714 ++#define LSEEK_NR 9
71.4715 ++static off_t dcload_lseek_file_op (struct file *pf, off_t pos, int whence)
71.4716 ++{
71.4717 ++ return dcloadsyscall (LSEEK_NR, pf->media_fd, pos, whence);
71.4718 ++}
71.4719 ++
71.4720 ++#define CLOSE_NR 3
71.4721 ++static int dcload_close_file_op (struct file *pf)
71.4722 ++{
71.4723 ++ return dcloadsyscall (CLOSE_NR, pf->media_fd);
71.4724 ++}
71.4725 ++
71.4726 ++#define FSTAT_NR 10
71.4727 ++static int dcload_fstat_file_op (struct file *pf, struct stat *pstat)
71.4728 ++{
71.4729 ++ return dcloadsyscall (FSTAT_NR, pf->media_fd, pstat);
71.4730 ++}
71.4731 ++
71.4732 ++#define EXIT_NR 15
71.4733 ++void _newlib_vfs_dcload_exit (int n)
71.4734 ++{
71.4735 ++ dcloadsyscall (EXIT_NR, n);
71.4736 ++}
71.4737 ++
71.4738 ++#define ASSIGN_WRKMEM_NR 14
71.4739 ++void dcload_assign_wrkmem (void *buf)
71.4740 ++{
71.4741 ++ dcloadsyscall (ASSIGN_WRKMEM_NR, buf);
71.4742 ++}
71.4743 ++
71.4744 ++/* media_ops for host file-system access */
71.4745 ++
71.4746 ++int dcload_mkdir_media_op( const char *c, mode_t mode )
71.4747 ++{
71.4748 ++ errno = ENOSYS;
71.4749 ++ return -1;
71.4750 ++}
71.4751 ++
71.4752 ++int dcload_rmdir_media_op( const char *c )
71.4753 ++{
71.4754 ++ errno = ENOSYS;
71.4755 ++ return -1;
71.4756 ++}
71.4757 ++
71.4758 ++int dcload_ioctl_file_op( )
71.4759 ++{
71.4760 ++ errno = ENOSYS;
71.4761 ++ return -1;
71.4762 ++}
71.4763 ++
71.4764 ++static struct media_ops dcload_host_media_ops =
71.4765 ++{
71.4766 ++ open: dcload_open_media_op,
71.4767 ++ creat: dcload_creat_media_op,
71.4768 ++ link: dcload_link_media_op,
71.4769 ++ unlink: dcload_unlink_media_op,
71.4770 ++ stat: dcload_stat_media_op,
71.4771 ++ chmod: dcload_chmod_media_op,
71.4772 ++ mkdir: dcload_mkdir_media_op,
71.4773 ++ rmdir: dcload_rmdir_media_op,
71.4774 ++ chdir: dcload_chdir_media_op
71.4775 ++};
71.4776 ++
71.4777 ++/* file_ops for a host file */
71.4778 ++
71.4779 ++static struct file_ops dcload_host_file_ops =
71.4780 ++{
71.4781 ++ lseek: dcload_lseek_file_op,
71.4782 ++ close: dcload_close_file_op,
71.4783 ++ read: dcload_read_file_op,
71.4784 ++ write: dcload_write_file_op,
71.4785 ++ ioctl: dcload_ioctl_file_op,
71.4786 ++ fstat: dcload_fstat_file_op
71.4787 ++};
71.4788 ++
71.4789 ++
71.4790 +diff -urN newlib-1.8.2/newlib/libc/sys/dreamcast/dup.c newlib-1.8.2-dc/newlib/libc/sys/dreamcast/dup.c
71.4791 +--- newlib-1.8.2/newlib/libc/sys/dreamcast/dup.c 1970-01-01 10:00:00.000000000 +1000
71.4792 ++++ newlib-1.8.2-dc/newlib/libc/sys/dreamcast/dup.c 2006-07-06 18:28:31.000000000 +1000
71.4793 +@@ -0,0 +1,2 @@
71.4794 ++/* This hack is required for libstdc++ to work properly */
71.4795 ++int dup(int fd) { return fd; }
71.4796 +diff -urN newlib-1.8.2/newlib/libc/sys/dreamcast/exit.c newlib-1.8.2-dc/newlib/libc/sys/dreamcast/exit.c
71.4797 +--- newlib-1.8.2/newlib/libc/sys/dreamcast/exit.c 1970-01-01 10:00:00.000000000 +1000
71.4798 ++++ newlib-1.8.2-dc/newlib/libc/sys/dreamcast/exit.c 2006-07-07 08:34:25.000000000 +1000
71.4799 +@@ -0,0 +1,18 @@
71.4800 ++/* TODO: Do different things depending on the loader present, e.g. dcload
71.4801 ++ has an exit() call, gdbstubs can tell gdb "W00", etc. */
71.4802 ++
71.4803 ++#include "vfs.h"
71.4804 ++
71.4805 ++void _exit(int n);
71.4806 ++
71.4807 ++void exit (int n) { _exit (n); }
71.4808 ++
71.4809 ++extern void _newlib_vfs_dcload_exit (int);
71.4810 ++
71.4811 ++void
71.4812 ++_exit (int n)
71.4813 ++{
71.4814 ++ if( _newlib_vfs_is_dcload() ) {
71.4815 ++ _newlib_vfs_dcload_exit (n);
71.4816 ++ }
71.4817 ++}
71.4818 +diff -urN newlib-1.8.2/newlib/libc/sys/dreamcast/fcntl.c newlib-1.8.2-dc/newlib/libc/sys/dreamcast/fcntl.c
71.4819 +--- newlib-1.8.2/newlib/libc/sys/dreamcast/fcntl.c 1970-01-01 10:00:00.000000000 +1000
71.4820 ++++ newlib-1.8.2-dc/newlib/libc/sys/dreamcast/fcntl.c 2006-07-06 18:28:31.000000000 +1000
71.4821 +@@ -0,0 +1,21 @@
71.4822 ++#include <sys/fcntl.h>
71.4823 ++
71.4824 ++/* Minimal fcntl support is necessary for C++ console streams cin, cout, and
71.4825 ++ cerr. */
71.4826 ++int
71.4827 ++_fcntl (int fd, int flag, ...)
71.4828 ++{
71.4829 ++ switch (flag) {
71.4830 ++ case F_GETFL:
71.4831 ++ switch (fd) {
71.4832 ++ case 0: return O_RDONLY;
71.4833 ++ case 1: return O_WRONLY;
71.4834 ++ case 2: return O_WRONLY;
71.4835 ++ default: return -1;
71.4836 ++ }
71.4837 ++ default:
71.4838 ++ return -1;
71.4839 ++ }
71.4840 ++
71.4841 ++ return -1;
71.4842 ++}
71.4843 +diff -urN newlib-1.8.2/newlib/libc/sys/dreamcast/fstat.c newlib-1.8.2-dc/newlib/libc/sys/dreamcast/fstat.c
71.4844 +--- newlib-1.8.2/newlib/libc/sys/dreamcast/fstat.c 1970-01-01 10:00:00.000000000 +1000
71.4845 ++++ newlib-1.8.2-dc/newlib/libc/sys/dreamcast/fstat.c 2006-07-06 18:28:31.000000000 +1000
71.4846 +@@ -0,0 +1,12 @@
71.4847 ++#include <sys/types.h>
71.4848 ++#include <sys/stat.h>
71.4849 ++
71.4850 ++#include "vfs.h"
71.4851 ++
71.4852 ++int
71.4853 ++_fstat (int fd, struct stat *pstat)
71.4854 ++{
71.4855 ++ struct file *pf = _newlib_vfs_get_file (fd);
71.4856 ++
71.4857 ++ return pf->fops->fstat (pf, pstat);
71.4858 ++}
71.4859 +diff -urN newlib-1.8.2/newlib/libc/sys/dreamcast/getpid.c newlib-1.8.2-dc/newlib/libc/sys/dreamcast/getpid.c
71.4860 +--- newlib-1.8.2/newlib/libc/sys/dreamcast/getpid.c 1970-01-01 10:00:00.000000000 +1000
71.4861 ++++ newlib-1.8.2-dc/newlib/libc/sys/dreamcast/getpid.c 2006-07-06 18:28:31.000000000 +1000
71.4862 +@@ -0,0 +1,5 @@
71.4863 ++int
71.4864 ++_getpid ()
71.4865 ++{
71.4866 ++ return 1;
71.4867 ++}
71.4868 +diff -urN newlib-1.8.2/newlib/libc/sys/dreamcast/gettimeofday.c newlib-1.8.2-dc/newlib/libc/sys/dreamcast/gettimeofday.c
71.4869 +--- newlib-1.8.2/newlib/libc/sys/dreamcast/gettimeofday.c 1970-01-01 10:00:00.000000000 +1000
71.4870 ++++ newlib-1.8.2-dc/newlib/libc/sys/dreamcast/gettimeofday.c 2006-07-06 18:28:31.000000000 +1000
71.4871 +@@ -0,0 +1,30 @@
71.4872 ++#include <time.h>
71.4873 ++#include <sys/time.h>
71.4874 ++
71.4875 ++/* Returns the number of seconds elapsed from the Unix epoch, January 1st,
71.4876 ++ 1970. Note that the Dreamcast counts time from January 1st, 1950, so we
71.4877 ++ need to subtract 20 years (and 5 leap days) from the Dreamcast RTC to
71.4878 ++ get valid values for libc's time functions. */
71.4879 ++
71.4880 ++#define TWENTY_YEARS ((20 * 365LU + 5) * 86400)
71.4881 ++
71.4882 ++int
71.4883 ++_gettimeofday (struct timeval *tp, struct timezone *tzp)
71.4884 ++{
71.4885 ++ if (tp)
71.4886 ++ {
71.4887 ++ unsigned long rtc_h = *(volatile unsigned long*)0xa0710000;
71.4888 ++ unsigned long rtc_l = *(volatile unsigned long*)0xa0710004;
71.4889 ++ unsigned long secs = ((rtc_h & 0xffff) << 16) | (rtc_l & 0xffff);
71.4890 ++
71.4891 ++ tp->tv_sec = secs - TWENTY_YEARS;
71.4892 ++ tp->tv_usec = 0;
71.4893 ++ }
71.4894 ++ if (tzp)
71.4895 ++ {
71.4896 ++ tzp->tz_minuteswest = 0;
71.4897 ++ tzp->tz_dsttime = 0;
71.4898 ++ }
71.4899 ++
71.4900 ++ return 0;
71.4901 ++}
71.4902 +diff -urN newlib-1.8.2/newlib/libc/sys/dreamcast/ioctl.c newlib-1.8.2-dc/newlib/libc/sys/dreamcast/ioctl.c
71.4903 +--- newlib-1.8.2/newlib/libc/sys/dreamcast/ioctl.c 1970-01-01 10:00:00.000000000 +1000
71.4904 ++++ newlib-1.8.2-dc/newlib/libc/sys/dreamcast/ioctl.c 2006-07-06 18:28:31.000000000 +1000
71.4905 +@@ -0,0 +1,9 @@
71.4906 ++#include "vfs.h"
71.4907 ++
71.4908 ++int
71.4909 ++ioctl (int fd, int func, long arg)
71.4910 ++{
71.4911 ++ struct file *pf = _newlib_vfs_get_file (fd);
71.4912 ++
71.4913 ++ return pf->fops->ioctl (pf, func, arg);
71.4914 ++}
71.4915 +diff -urN newlib-1.8.2/newlib/libc/sys/dreamcast/isatty.c newlib-1.8.2-dc/newlib/libc/sys/dreamcast/isatty.c
71.4916 +--- newlib-1.8.2/newlib/libc/sys/dreamcast/isatty.c 1970-01-01 10:00:00.000000000 +1000
71.4917 ++++ newlib-1.8.2-dc/newlib/libc/sys/dreamcast/isatty.c 2006-07-06 18:28:31.000000000 +1000
71.4918 +@@ -0,0 +1,10 @@
71.4919 ++/* Since file descriptors 0, 1, and 2 are always mapped to stdin, stdout,
71.4920 ++ and stderr, we assume these are the only fds that permit interactive I/O. */
71.4921 ++
71.4922 ++int
71.4923 ++isatty (int fd)
71.4924 ++{
71.4925 ++ if (fd >= 0 && fd < 3)
71.4926 ++ return 1;
71.4927 ++ return 0;
71.4928 ++}
71.4929 +diff -urN newlib-1.8.2/newlib/libc/sys/dreamcast/kill.c newlib-1.8.2-dc/newlib/libc/sys/dreamcast/kill.c
71.4930 +--- newlib-1.8.2/newlib/libc/sys/dreamcast/kill.c 1970-01-01 10:00:00.000000000 +1000
71.4931 ++++ newlib-1.8.2-dc/newlib/libc/sys/dreamcast/kill.c 2006-07-06 18:28:31.000000000 +1000
71.4932 +@@ -0,0 +1,8 @@
71.4933 ++#include <stdlib.h>
71.4934 ++
71.4935 ++int
71.4936 ++_kill ()
71.4937 ++{
71.4938 ++ abort ();
71.4939 ++ return 0;
71.4940 ++}
71.4941 +diff -urN newlib-1.8.2/newlib/libc/sys/dreamcast/link.c newlib-1.8.2-dc/newlib/libc/sys/dreamcast/link.c
71.4942 +--- newlib-1.8.2/newlib/libc/sys/dreamcast/link.c 1970-01-01 10:00:00.000000000 +1000
71.4943 ++++ newlib-1.8.2-dc/newlib/libc/sys/dreamcast/link.c 2006-07-06 18:28:31.000000000 +1000
71.4944 +@@ -0,0 +1,16 @@
71.4945 ++#include "vfs.h"
71.4946 ++
71.4947 ++int
71.4948 ++_link (const char *old_path, const char *new_path)
71.4949 ++{
71.4950 ++ char *old_obj = _newlib_vfs_new_string (old_path);
71.4951 ++ char *new_obj = _newlib_vfs_new_string (new_path);
71.4952 ++
71.4953 ++ struct media_ops *mops = _newlib_vfs_get_media_ops (old_path);
71.4954 ++ int res = mops->link (old_obj, new_obj);
71.4955 ++
71.4956 ++ _newlib_vfs_delete_string (old_obj);
71.4957 ++ _newlib_vfs_delete_string (new_obj);
71.4958 ++
71.4959 ++ return res;
71.4960 ++}
71.4961 +diff -urN newlib-1.8.2/newlib/libc/sys/dreamcast/lseek.c newlib-1.8.2-dc/newlib/libc/sys/dreamcast/lseek.c
71.4962 +--- newlib-1.8.2/newlib/libc/sys/dreamcast/lseek.c 1970-01-01 10:00:00.000000000 +1000
71.4963 ++++ newlib-1.8.2-dc/newlib/libc/sys/dreamcast/lseek.c 2006-07-06 18:28:31.000000000 +1000
71.4964 +@@ -0,0 +1,11 @@
71.4965 ++#include <sys/types.h>
71.4966 ++
71.4967 ++#include "vfs.h"
71.4968 ++
71.4969 ++off_t
71.4970 ++_lseek (int fd, off_t pos, int whence)
71.4971 ++{
71.4972 ++ struct file *pf = _newlib_vfs_get_file (fd);
71.4973 ++
71.4974 ++ return pf->fops->lseek (pf, pos, whence);
71.4975 ++}
71.4976 +diff -urN newlib-1.8.2/newlib/libc/sys/dreamcast/Makefile.am newlib-1.8.2-dc/newlib/libc/sys/dreamcast/Makefile.am
71.4977 +--- newlib-1.8.2/newlib/libc/sys/dreamcast/Makefile.am 1970-01-01 10:00:00.000000000 +1000
71.4978 ++++ newlib-1.8.2-dc/newlib/libc/sys/dreamcast/Makefile.am 2006-07-06 18:31:26.000000000 +1000
71.4979 +@@ -0,0 +1,17 @@
71.4980 ++## Process this file with automake to generate Makefile.in
71.4981 ++
71.4982 ++AUTOMAKE_OPTIONS = cygnus
71.4983 ++
71.4984 ++INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
71.4985 ++
71.4986 ++noinst_LIBRARIES = lib.a
71.4987 ++
71.4988 ++lib_a_SOURCES = absolute_vfs.c chdir.c chmod.c close.c creat.c dcload_vfs.c dcload.S \
71.4989 ++ exit.c fcntl.c fstat.c getpid.c gettimeofday.c ioctl.c isatty.c kill.c \
71.4990 ++ link.c lseek.c mkdir.c open.c read.c rmdir.c sbrk.c scif.c stat.c \
71.4991 ++ stdio_vfs.c times.c unlink.c vfs.c write.c dup.c
71.4992 ++
71.4993 ++all: crt0.o
71.4994 ++
71.4995 ++ACLOCAL_AMFLAGS = -I ../../..
71.4996 ++CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
71.4997 +diff -urN newlib-1.8.2/newlib/libc/sys/dreamcast/Makefile.in newlib-1.8.2-dc/newlib/libc/sys/dreamcast/Makefile.in
71.4998 +--- newlib-1.8.2/newlib/libc/sys/dreamcast/Makefile.in 1970-01-01 10:00:00.000000000 +1000
71.4999 ++++ newlib-1.8.2-dc/newlib/libc/sys/dreamcast/Makefile.in 2006-07-06 18:31:26.000000000 +1000
71.5000 +@@ -0,0 +1,322 @@
71.5001 ++# Makefile.in generated automatically by automake 1.4 from Makefile.am
71.5002 ++
71.5003 ++# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
71.5004 ++# This Makefile.in is free software; the Free Software Foundation
71.5005 ++# gives unlimited permission to copy and/or distribute it,
71.5006 ++# with or without modifications, as long as this notice is preserved.
71.5007 ++
71.5008 ++# This program is distributed in the hope that it will be useful,
71.5009 ++# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
71.5010 ++# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
71.5011 ++# PARTICULAR PURPOSE.
71.5012 ++
71.5013 ++
71.5014 ++SHELL = @SHELL@
71.5015 ++
71.5016 ++srcdir = @srcdir@
71.5017 ++top_srcdir = @top_srcdir@
71.5018 ++VPATH = @srcdir@
71.5019 ++prefix = @prefix@
71.5020 ++exec_prefix = @exec_prefix@
71.5021 ++
71.5022 ++bindir = @bindir@
71.5023 ++sbindir = @sbindir@
71.5024 ++libexecdir = @libexecdir@
71.5025 ++datadir = @datadir@
71.5026 ++sysconfdir = @sysconfdir@
71.5027 ++sharedstatedir = @sharedstatedir@
71.5028 ++localstatedir = @localstatedir@
71.5029 ++libdir = @libdir@
71.5030 ++infodir = @infodir@
71.5031 ++mandir = @mandir@
71.5032 ++includedir = @includedir@
71.5033 ++oldincludedir = /usr/include
71.5034 ++
71.5035 ++DESTDIR =
71.5036 ++
71.5037 ++pkgdatadir = $(datadir)/@PACKAGE@
71.5038 ++pkglibdir = $(libdir)/@PACKAGE@
71.5039 ++pkgincludedir = $(includedir)/@PACKAGE@
71.5040 ++
71.5041 ++top_builddir = .
71.5042 ++
71.5043 ++ACLOCAL = @ACLOCAL@
71.5044 ++AUTOCONF = @AUTOCONF@
71.5045 ++AUTOMAKE = @AUTOMAKE@
71.5046 ++AUTOHEADER = @AUTOHEADER@
71.5047 ++
71.5048 ++INSTALL = @INSTALL@
71.5049 ++INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
71.5050 ++INSTALL_DATA = @INSTALL_DATA@
71.5051 ++INSTALL_SCRIPT = @INSTALL_SCRIPT@
71.5052 ++transform = @program_transform_name@
71.5053 ++
71.5054 ++NORMAL_INSTALL = :
71.5055 ++PRE_INSTALL = :
71.5056 ++POST_INSTALL = :
71.5057 ++NORMAL_UNINSTALL = :
71.5058 ++PRE_UNINSTALL = :
71.5059 ++POST_UNINSTALL = :
71.5060 ++host_alias = @host_alias@
71.5061 ++host_triplet = @host@
71.5062 ++AR = @AR@
71.5063 ++AS = @AS@
71.5064 ++CC = @CC@
71.5065 ++CPP = @CPP@
71.5066 ++EXEEXT = @EXEEXT@
71.5067 ++MAKEINFO = @MAKEINFO@
71.5068 ++NEWLIB_CFLAGS = @NEWLIB_CFLAGS@
71.5069 ++PACKAGE = @PACKAGE@
71.5070 ++RANLIB = @RANLIB@
71.5071 ++VERSION = @VERSION@
71.5072 ++machine_dir = @machine_dir@
71.5073 ++newlib_basedir = @newlib_basedir@
71.5074 ++sys_dir = @sys_dir@
71.5075 ++
71.5076 ++AUTOMAKE_OPTIONS = cygnus
71.5077 ++
71.5078 ++INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
71.5079 ++
71.5080 ++noinst_LIBRARIES = lib.a
71.5081 ++
71.5082 ++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
71.5083 ++
71.5084 ++
71.5085 ++ACLOCAL_AMFLAGS = -I ../../..
71.5086 ++CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
71.5087 ++ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
71.5088 ++mkinstalldirs = $(SHELL) $(top_srcdir)/../../../../mkinstalldirs
71.5089 ++CONFIG_CLEAN_FILES =
71.5090 ++LIBRARIES = $(noinst_LIBRARIES)
71.5091 ++
71.5092 ++
71.5093 ++DEFS = @DEFS@ -I. -I$(srcdir)
71.5094 ++CPPFLAGS = @CPPFLAGS@
71.5095 ++LDFLAGS = @LDFLAGS@
71.5096 ++LIBS = @LIBS@
71.5097 ++lib_a_LIBADD =
71.5098 ++lib_a_OBJECTS = absolute_vfs.o chdir.o chmod.o close.o creat.o \
71.5099 ++dcload_vfs.o dcload.o exit.o fcntl.o fstat.o getpid.o gettimeofday.o ioctl.o \
71.5100 ++isatty.o kill.o link.o lseek.o mkdir.o open.o read.o rmdir.o sbrk.o \
71.5101 ++scif.o stat.o stdio_vfs.o times.o unlink.o vfs.o write.o dup.o
71.5102 ++CFLAGS = @CFLAGS@
71.5103 ++COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
71.5104 ++CCLD = $(CC)
71.5105 ++LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
71.5106 ++DIST_COMMON = Makefile.am Makefile.in aclocal.m4 configure configure.in
71.5107 ++
71.5108 ++
71.5109 ++DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
71.5110 ++
71.5111 ++TAR = tar
71.5112 ++GZIP_ENV = --best
71.5113 ++SOURCES = $(lib_a_SOURCES)
71.5114 ++OBJECTS = $(lib_a_OBJECTS)
71.5115 ++
71.5116 ++all: all-redirect
71.5117 ++.SUFFIXES:
71.5118 ++.SUFFIXES: .S .c .o .s
71.5119 ++$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
71.5120 ++ cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile
71.5121 ++
71.5122 ++Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
71.5123 ++ cd $(top_builddir) \
71.5124 ++ && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
71.5125 ++
71.5126 ++$(ACLOCAL_M4): configure.in ../../../acinclude.m4 ../../../aclocal.m4
71.5127 ++ cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
71.5128 ++
71.5129 ++config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
71.5130 ++ $(SHELL) ./config.status --recheck
71.5131 ++$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
71.5132 ++ cd $(srcdir) && $(AUTOCONF)
71.5133 ++
71.5134 ++mostlyclean-noinstLIBRARIES:
71.5135 ++
71.5136 ++clean-noinstLIBRARIES:
71.5137 ++ -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
71.5138 ++
71.5139 ++distclean-noinstLIBRARIES:
71.5140 ++
71.5141 ++maintainer-clean-noinstLIBRARIES:
71.5142 ++
71.5143 ++.c.o:
71.5144 ++ $(COMPILE) -c $<
71.5145 ++
71.5146 ++.s.o:
71.5147 ++ $(COMPILE) -c $<
71.5148 ++
71.5149 ++.S.o:
71.5150 ++ $(COMPILE) -c $<
71.5151 ++
71.5152 ++mostlyclean-compile:
71.5153 ++ -rm -f *.o core *.core
71.5154 ++
71.5155 ++clean-compile:
71.5156 ++
71.5157 ++distclean-compile:
71.5158 ++ -rm -f *.tab.c
71.5159 ++
71.5160 ++maintainer-clean-compile:
71.5161 ++
71.5162 ++lib.a: $(lib_a_OBJECTS) $(lib_a_DEPENDENCIES)
71.5163 ++ -rm -f lib.a
71.5164 ++ $(AR) cru lib.a $(lib_a_OBJECTS) $(lib_a_LIBADD)
71.5165 ++ $(RANLIB) lib.a
71.5166 ++
71.5167 ++tags: TAGS
71.5168 ++
71.5169 ++ID: $(HEADERS) $(SOURCES) $(LISP)
71.5170 ++ list='$(SOURCES) $(HEADERS)'; \
71.5171 ++ unique=`for i in $$list; do echo $$i; done | \
71.5172 ++ awk ' { files[$$0] = 1; } \
71.5173 ++ END { for (i in files) print i; }'`; \
71.5174 ++ here=`pwd` && cd $(srcdir) \
71.5175 ++ && mkid -f$$here/ID $$unique $(LISP)
71.5176 ++
71.5177 ++TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
71.5178 ++ tags=; \
71.5179 ++ here=`pwd`; \
71.5180 ++ list='$(SOURCES) $(HEADERS)'; \
71.5181 ++ unique=`for i in $$list; do echo $$i; done | \
71.5182 ++ awk ' { files[$$0] = 1; } \
71.5183 ++ END { for (i in files) print i; }'`; \
71.5184 ++ test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
71.5185 ++ || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
71.5186 ++
71.5187 ++mostlyclean-tags:
71.5188 ++
71.5189 ++clean-tags:
71.5190 ++
71.5191 ++distclean-tags:
71.5192 ++ -rm -f TAGS ID
71.5193 ++
71.5194 ++maintainer-clean-tags:
71.5195 ++
71.5196 ++distdir = $(PACKAGE)-$(VERSION)
71.5197 ++top_distdir = $(distdir)
71.5198 ++
71.5199 ++# This target untars the dist file and tries a VPATH configuration. Then
71.5200 ++# it guarantees that the distribution is self-contained by making another
71.5201 ++# tarfile.
71.5202 ++distcheck: dist
71.5203 ++ -rm -rf $(distdir)
71.5204 ++ GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
71.5205 ++ mkdir $(distdir)/=build
71.5206 ++ mkdir $(distdir)/=inst
71.5207 ++ dc_install_base=`cd $(distdir)/=inst && pwd`; \
71.5208 ++ cd $(distdir)/=build \
71.5209 ++ && ../configure --srcdir=.. --prefix=$$dc_install_base \
71.5210 ++ && $(MAKE) $(AM_MAKEFLAGS) \
71.5211 ++ && $(MAKE) $(AM_MAKEFLAGS) dvi \
71.5212 ++ && $(MAKE) $(AM_MAKEFLAGS) check \
71.5213 ++ && $(MAKE) $(AM_MAKEFLAGS) install \
71.5214 ++ && $(MAKE) $(AM_MAKEFLAGS) installcheck \
71.5215 ++ && $(MAKE) $(AM_MAKEFLAGS) dist
71.5216 ++ -rm -rf $(distdir)
71.5217 ++ @banner="$(distdir).tar.gz is ready for distribution"; \
71.5218 ++ dashes=`echo "$$banner" | sed s/./=/g`; \
71.5219 ++ echo "$$dashes"; \
71.5220 ++ echo "$$banner"; \
71.5221 ++ echo "$$dashes"
71.5222 ++dist: distdir
71.5223 ++ -chmod -R a+r $(distdir)
71.5224 ++ GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
71.5225 ++ -rm -rf $(distdir)
71.5226 ++dist-all: distdir
71.5227 ++ -chmod -R a+r $(distdir)
71.5228 ++ GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
71.5229 ++ -rm -rf $(distdir)
71.5230 ++distdir: $(DISTFILES)
71.5231 ++ -rm -rf $(distdir)
71.5232 ++ mkdir $(distdir)
71.5233 ++ -chmod 777 $(distdir)
71.5234 ++ @for file in $(DISTFILES); do \
71.5235 ++ if test -f $$file; then d=.; else d=$(srcdir); fi; \
71.5236 ++ if test -d $$d/$$file; then \
71.5237 ++ cp -pr $$d/$$file $(distdir)/$$file; \
71.5238 ++ else \
71.5239 ++ test -f $(distdir)/$$file \
71.5240 ++ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
71.5241 ++ || cp -p $$d/$$file $(distdir)/$$file || :; \
71.5242 ++ fi; \
71.5243 ++ done
71.5244 ++info-am:
71.5245 ++info: info-am
71.5246 ++dvi-am:
71.5247 ++dvi: dvi-am
71.5248 ++check-am:
71.5249 ++check: check-am
71.5250 ++installcheck-am:
71.5251 ++installcheck: installcheck-am
71.5252 ++install-info-am:
71.5253 ++install-info: install-info-am
71.5254 ++install-exec-am:
71.5255 ++install-exec: install-exec-am
71.5256 ++
71.5257 ++install-data-am:
71.5258 ++install-data: install-data-am
71.5259 ++
71.5260 ++install-am: all-am
71.5261 ++ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
71.5262 ++install: install-am
71.5263 ++uninstall-am:
71.5264 ++uninstall: uninstall-am
71.5265 ++all-am: Makefile $(LIBRARIES)
71.5266 ++all-redirect: all-am
71.5267 ++install-strip:
71.5268 ++ $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
71.5269 ++installdirs:
71.5270 ++
71.5271 ++
71.5272 ++mostlyclean-generic:
71.5273 ++
71.5274 ++clean-generic:
71.5275 ++
71.5276 ++distclean-generic:
71.5277 ++ -rm -f Makefile $(CONFIG_CLEAN_FILES)
71.5278 ++ -rm -f config.cache config.log stamp-h stamp-h[0-9]*
71.5279 ++
71.5280 ++maintainer-clean-generic:
71.5281 ++mostlyclean-am: mostlyclean-noinstLIBRARIES mostlyclean-compile \
71.5282 ++ mostlyclean-tags mostlyclean-generic
71.5283 ++
71.5284 ++mostlyclean: mostlyclean-am
71.5285 ++
71.5286 ++clean-am: clean-noinstLIBRARIES clean-compile clean-tags clean-generic \
71.5287 ++ mostlyclean-am
71.5288 ++
71.5289 ++clean: clean-am
71.5290 ++
71.5291 ++distclean-am: distclean-noinstLIBRARIES distclean-compile \
71.5292 ++ distclean-tags distclean-generic clean-am
71.5293 ++
71.5294 ++distclean: distclean-am
71.5295 ++ -rm -f config.status
71.5296 ++
71.5297 ++maintainer-clean-am: maintainer-clean-noinstLIBRARIES \
71.5298 ++ maintainer-clean-compile maintainer-clean-tags \
71.5299 ++ maintainer-clean-generic distclean-am
71.5300 ++ @echo "This command is intended for maintainers to use;"
71.5301 ++ @echo "it deletes files that may require special tools to rebuild."
71.5302 ++
71.5303 ++maintainer-clean: maintainer-clean-am
71.5304 ++ -rm -f config.status
71.5305 ++
71.5306 ++.PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \
71.5307 ++clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
71.5308 ++mostlyclean-compile distclean-compile clean-compile \
71.5309 ++maintainer-clean-compile tags mostlyclean-tags distclean-tags \
71.5310 ++clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \
71.5311 ++check-am installcheck-am installcheck install-info-am install-info \
71.5312 ++install-exec-am install-exec install-data-am install-data install-am \
71.5313 ++install uninstall-am uninstall all-redirect all-am all installdirs \
71.5314 ++mostlyclean-generic distclean-generic clean-generic \
71.5315 ++maintainer-clean-generic clean mostlyclean distclean maintainer-clean
71.5316 ++
71.5317 ++
71.5318 ++all: crt0.o
71.5319 ++
71.5320 ++# Tell versions [3.59,3.63) of GNU make to not export all variables.
71.5321 ++# Otherwise a system limit (for SysV at least) may be exceeded.
71.5322 ++.NOEXPORT:
71.5323 +diff -urN newlib-1.8.2/newlib/libc/sys/dreamcast/mkdir.c newlib-1.8.2-dc/newlib/libc/sys/dreamcast/mkdir.c
71.5324 +--- newlib-1.8.2/newlib/libc/sys/dreamcast/mkdir.c 1970-01-01 10:00:00.000000000 +1000
71.5325 ++++ newlib-1.8.2-dc/newlib/libc/sys/dreamcast/mkdir.c 2006-07-06 18:28:31.000000000 +1000
71.5326 +@@ -0,0 +1,16 @@
71.5327 ++#include <sys/types.h>
71.5328 ++
71.5329 ++#include "vfs.h"
71.5330 ++
71.5331 ++int
71.5332 ++mkdir (const char *path, mode_t mode)
71.5333 ++{
71.5334 ++ char *obj = _newlib_vfs_new_string (path);
71.5335 ++
71.5336 ++ struct media_ops *mops = _newlib_vfs_get_media_ops (path);
71.5337 ++ int res = mops->mkdir (obj, mode);
71.5338 ++
71.5339 ++ _newlib_vfs_delete_string (obj);
71.5340 ++
71.5341 ++ return res;
71.5342 ++}
71.5343 +diff -urN newlib-1.8.2/newlib/libc/sys/dreamcast/open.c newlib-1.8.2-dc/newlib/libc/sys/dreamcast/open.c
71.5344 +--- newlib-1.8.2/newlib/libc/sys/dreamcast/open.c 1970-01-01 10:00:00.000000000 +1000
71.5345 ++++ newlib-1.8.2-dc/newlib/libc/sys/dreamcast/open.c 2006-07-06 18:28:31.000000000 +1000
71.5346 +@@ -0,0 +1,23 @@
71.5347 ++#include <sys/types.h>
71.5348 ++
71.5349 ++#include <stdio.h>
71.5350 ++
71.5351 ++#include "vfs.h"
71.5352 ++
71.5353 ++int
71.5354 ++_open (const char *path, int flags, mode_t mode)
71.5355 ++{
71.5356 ++ char *obj = _newlib_vfs_new_string (path);
71.5357 ++
71.5358 ++ struct media_ops *mops = _newlib_vfs_get_media_ops (path);
71.5359 ++ struct file *pf = mops->open (obj, flags, mode);
71.5360 ++
71.5361 ++ _newlib_vfs_delete_string (obj);
71.5362 ++
71.5363 ++ if (pf != NULL)
71.5364 ++ {
71.5365 ++ return _newlib_vfs_insert_file (pf);
71.5366 ++ }
71.5367 ++
71.5368 ++ return -1;
71.5369 ++}
71.5370 +diff -urN newlib-1.8.2/newlib/libc/sys/dreamcast/read.c newlib-1.8.2-dc/newlib/libc/sys/dreamcast/read.c
71.5371 +--- newlib-1.8.2/newlib/libc/sys/dreamcast/read.c 1970-01-01 10:00:00.000000000 +1000
71.5372 ++++ newlib-1.8.2-dc/newlib/libc/sys/dreamcast/read.c 2006-07-06 18:28:31.000000000 +1000
71.5373 +@@ -0,0 +1,11 @@
71.5374 ++#include <sys/types.h>
71.5375 ++
71.5376 ++#include "vfs.h"
71.5377 ++
71.5378 ++size_t
71.5379 ++_read (int fd, void *buf, size_t cnt)
71.5380 ++{
71.5381 ++ struct file *pf = _newlib_vfs_get_file (fd);
71.5382 ++
71.5383 ++ return pf->fops->read (pf, buf, cnt);
71.5384 ++}
71.5385 +diff -urN newlib-1.8.2/newlib/libc/sys/dreamcast/rmdir.c newlib-1.8.2-dc/newlib/libc/sys/dreamcast/rmdir.c
71.5386 +--- newlib-1.8.2/newlib/libc/sys/dreamcast/rmdir.c 1970-01-01 10:00:00.000000000 +1000
71.5387 ++++ newlib-1.8.2-dc/newlib/libc/sys/dreamcast/rmdir.c 2006-07-06 18:28:31.000000000 +1000
71.5388 +@@ -0,0 +1,14 @@
71.5389 ++#include "vfs.h"
71.5390 ++
71.5391 ++int
71.5392 ++rmdir (const char *path)
71.5393 ++{
71.5394 ++ char *obj = _newlib_vfs_new_string (path);
71.5395 ++
71.5396 ++ struct media_ops *mops = _newlib_vfs_get_media_ops (path);
71.5397 ++ int res = mops->rmdir (obj);
71.5398 ++
71.5399 ++ _newlib_vfs_delete_string (obj);
71.5400 ++
71.5401 ++ return res;
71.5402 ++}
71.5403 +diff -urN newlib-1.8.2/newlib/libc/sys/dreamcast/sbrk.c newlib-1.8.2-dc/newlib/libc/sys/dreamcast/sbrk.c
71.5404 +--- newlib-1.8.2/newlib/libc/sys/dreamcast/sbrk.c 1970-01-01 10:00:00.000000000 +1000
71.5405 ++++ newlib-1.8.2-dc/newlib/libc/sys/dreamcast/sbrk.c 2006-07-06 18:28:31.000000000 +1000
71.5406 +@@ -0,0 +1,27 @@
71.5407 ++#include <_ansi.h>
71.5408 ++#include <errno.h>
71.5409 ++#include <sys/types.h>
71.5410 ++
71.5411 ++extern char end; /* The end of the program (BSS section). */
71.5412 ++
71.5413 ++register char *stack_ptr asm ("r15");
71.5414 ++
71.5415 ++caddr_t
71.5416 ++_sbrk (int incr)
71.5417 ++{
71.5418 ++ static char *heap_end;
71.5419 ++ char *prev_heap_end;
71.5420 ++
71.5421 ++ if (!heap_end)
71.5422 ++ heap_end = &end;
71.5423 ++
71.5424 ++ prev_heap_end = heap_end;
71.5425 ++ if (heap_end + incr > stack_ptr)
71.5426 ++ {
71.5427 ++ errno = ENOMEM;
71.5428 ++ return (caddr_t)-1;
71.5429 ++ }
71.5430 ++
71.5431 ++ heap_end += incr;
71.5432 ++ return (caddr_t) prev_heap_end;
71.5433 ++}
71.5434 +diff -urN newlib-1.8.2/newlib/libc/sys/dreamcast/scif.c newlib-1.8.2-dc/newlib/libc/sys/dreamcast/scif.c
71.5435 +--- newlib-1.8.2/newlib/libc/sys/dreamcast/scif.c 1970-01-01 10:00:00.000000000 +1000
71.5436 ++++ newlib-1.8.2-dc/newlib/libc/sys/dreamcast/scif.c 2006-07-06 18:28:31.000000000 +1000
71.5437 +@@ -0,0 +1,46 @@
71.5438 ++/* Blatantly stolen from libdream, others...
71.5439 ++ * Please fix this :) */
71.5440 ++#include <sys/types.h>
71.5441 ++
71.5442 ++/*#include "scif.h"*/
71.5443 ++
71.5444 ++#define ACK (volatile unsigned short *)0xffe80010
71.5445 ++#define WR_FIFO (volatile unsigned char *)0xffe8000c
71.5446 ++#define RD_FIFO (volatile unsigned char *)0xffe80014
71.5447 ++#define STATUS (volatile unsigned short *)0xffe8001c
71.5448 ++
71.5449 ++static void scif_flush ()
71.5450 ++{
71.5451 ++ *ACK &= 0xbf;
71.5452 ++
71.5453 ++ while (!(*ACK & 0x40)) ;
71.5454 ++
71.5455 ++ *ACK &= 0xbf;
71.5456 ++}
71.5457 ++
71.5458 ++size_t _newlib_vfs_scif_write (void *buf, size_t cnt)
71.5459 ++{
71.5460 ++ while (cnt-- > 0)
71.5461 ++ {
71.5462 ++ while (!(*ACK & 0x20)) ;
71.5463 ++
71.5464 ++ *WR_FIFO = *(unsigned char *)buf++;
71.5465 ++
71.5466 ++ *ACK &= 0x9f;
71.5467 ++ }
71.5468 ++ scif_flush ();
71.5469 ++ return cnt;
71.5470 ++}
71.5471 ++
71.5472 ++size_t _newlib_vfs_scif_read (void *buf, size_t cnt)
71.5473 ++{
71.5474 ++ while (cnt -- > 0)
71.5475 ++ {
71.5476 ++ while (*STATUS & 0x1f) ;
71.5477 ++
71.5478 ++ *(unsigned char *)buf++ = *RD_FIFO;
71.5479 ++
71.5480 ++ *ACK &= 0x6d;
71.5481 ++ }
71.5482 ++ return cnt;
71.5483 ++}
71.5484 +diff -urN newlib-1.8.2/newlib/libc/sys/dreamcast/stat.c newlib-1.8.2-dc/newlib/libc/sys/dreamcast/stat.c
71.5485 +--- newlib-1.8.2/newlib/libc/sys/dreamcast/stat.c 1970-01-01 10:00:00.000000000 +1000
71.5486 ++++ newlib-1.8.2-dc/newlib/libc/sys/dreamcast/stat.c 2006-07-06 18:28:31.000000000 +1000
71.5487 +@@ -0,0 +1,26 @@
71.5488 ++#include <sys/types.h>
71.5489 ++#include <sys/stat.h>
71.5490 ++
71.5491 ++#include "vfs.h"
71.5492 ++
71.5493 ++/* Clunky, but remember we're "namespace clean" and library routines also
71.5494 ++ use _stat as a syscall... */
71.5495 ++
71.5496 ++int
71.5497 ++stat (const char *path, struct stat *pstat)
71.5498 ++{
71.5499 ++ return _stat (path, pstat);
71.5500 ++}
71.5501 ++
71.5502 ++int
71.5503 ++_stat (const char *path, struct stat *pstat)
71.5504 ++{
71.5505 ++ char *obj = _newlib_vfs_new_string (path);
71.5506 ++
71.5507 ++ struct media_ops *mops = _newlib_vfs_get_media_ops (path);
71.5508 ++ int res = mops->stat (obj, pstat);
71.5509 ++
71.5510 ++ _newlib_vfs_delete_string (obj);
71.5511 ++
71.5512 ++ return res;
71.5513 ++}
71.5514 +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
71.5515 +--- newlib-1.8.2/newlib/libc/sys/dreamcast/stdio_vfs.c 1970-01-01 10:00:00.000000000 +1000
71.5516 ++++ newlib-1.8.2-dc/newlib/libc/sys/dreamcast/stdio_vfs.c 2006-07-06 18:28:31.000000000 +1000
71.5517 +@@ -0,0 +1,114 @@
71.5518 ++/* Support for Marcus Comstedt's serial slave and gdbstubs, e.g. generic
71.5519 ++ serial console I/O. */
71.5520 ++
71.5521 ++#include "vfs.h"
71.5522 ++
71.5523 ++/* Only read and write are supported for stdio_file_ops, so these are
71.5524 ++ used for stdin, stdout, and stderr which are already "open" when the
71.5525 ++ program is started. */
71.5526 ++
71.5527 ++static size_t stdio_read_file_op (struct file *, void *, size_t);
71.5528 ++static size_t stdio_write_file_op (struct file *, void *, size_t);
71.5529 ++
71.5530 ++static struct file_ops stdio_file_ops =
71.5531 ++{
71.5532 ++ lseek: _newlib_vfs_invalid_file_op,
71.5533 ++ close: _newlib_vfs_invalid_file_op,
71.5534 ++ read: stdio_read_file_op,
71.5535 ++ write: stdio_write_file_op,
71.5536 ++ ioctl: _newlib_vfs_invalid_file_op,
71.5537 ++ fstat: _newlib_vfs_invalid_file_op
71.5538 ++};
71.5539 ++
71.5540 ++/* dcload or absolute may override these to go through their own console
71.5541 ++ output routines. */
71.5542 ++
71.5543 ++static struct file stdout_file;
71.5544 ++static struct file stderr_file;
71.5545 ++
71.5546 ++static struct file stdin_file =
71.5547 ++{
71.5548 ++ &stdout_file,
71.5549 ++ 0, 0,
71.5550 ++ &stdio_file_ops,
71.5551 ++ NULL,
71.5552 ++};
71.5553 ++
71.5554 ++static struct file stdout_file =
71.5555 ++{
71.5556 ++ &stderr_file,
71.5557 ++ 1, 1,
71.5558 ++ &stdio_file_ops,
71.5559 ++ NULL,
71.5560 ++};
71.5561 ++
71.5562 ++static struct file stderr_file =
71.5563 ++{
71.5564 ++ NULL,
71.5565 ++ 2, 2,
71.5566 ++ &stdio_file_ops,
71.5567 ++ NULL,
71.5568 ++};
71.5569 ++
71.5570 ++struct file * _newlib_vfs_first_file = &stdin_file;
71.5571 ++struct file * _newlib_vfs_last_file = &stderr_file;
71.5572 ++
71.5573 ++/* If we're being debugged by gdb then we can't use read or any other
71.5574 ++ raw serial I/O - we can only output to gdb's console. */
71.5575 ++static int raw_serial_io = 0;
71.5576 ++
71.5577 ++/* Detect the presence of Marcus Comstedt's serial slave by looking for the
71.5578 ++ sequence "103" at 8c00e46c. */
71.5579 ++
71.5580 ++#define SSLAVE_VERSION_ADDR 0x8c00e46c
71.5581 ++
71.5582 ++int _newlib_vfs_is_sslave (void)
71.5583 ++{
71.5584 ++ /* This hackery is used to avoid depending on memcmp () - silly, eh? */
71.5585 ++ if ( (*(unsigned char *)(SSLAVE_VERSION_ADDR)) == '1' &&
71.5586 ++ (*(unsigned char *)(SSLAVE_VERSION_ADDR + 1)) == '0' &&
71.5587 ++ (*(unsigned char *)(SSLAVE_VERSION_ADDR + 2)) == '3' )
71.5588 ++ {
71.5589 ++ raw_serial_io = 1;
71.5590 ++ return 1;
71.5591 ++ }
71.5592 ++
71.5593 ++ return 0;
71.5594 ++}
71.5595 ++
71.5596 ++void _newlib_vfs_sslave_init (void)
71.5597 ++{
71.5598 ++ /* Initialize serial console to a known state. We already assume that
71.5599 ++ we connected to the host, we just make sure the SCIF is setup the way
71.5600 ++ we need it. */
71.5601 ++ _newlib_vfs_initialized = VFS_LOADER_SERIAL_SLAVE;
71.5602 ++}
71.5603 ++
71.5604 ++
71.5605 ++/* Detect gdbstubs. gdbstubs sets the border color to green to indicate that
71.5606 ++ it's active. While this can't reliably be used to detect it, we also look
71.5607 ++ for gdbstubs start code at two separate addresses (gdbstub can load itself
71.5608 ++ at either address). */
71.5609 ++
71.5610 ++int _newlib_vfs_is_gdbstubs (void)
71.5611 ++{
71.5612 ++ return 0;
71.5613 ++}
71.5614 ++
71.5615 ++void _newlib_vfs_gdbstubs_init (void)
71.5616 ++{
71.5617 ++ _newlib_vfs_initialized = VFS_LOADER_GDBSTUBS;
71.5618 ++}
71.5619 ++
71.5620 ++extern size_t _newlib_vfs_scif_write (void *, size_t);
71.5621 ++extern size_t _newlib_vfs_scif_read (void *, size_t);
71.5622 ++
71.5623 ++static size_t stdio_read_file_op (struct file *pf, void *buf, size_t cnt)
71.5624 ++{
71.5625 ++ return _newlib_vfs_scif_read (buf, cnt);
71.5626 ++}
71.5627 ++
71.5628 ++static size_t stdio_write_file_op (struct file *pf, void *buf, size_t cnt)
71.5629 ++{
71.5630 ++ return _newlib_vfs_scif_write (buf, cnt);
71.5631 ++}
71.5632 +diff -urN newlib-1.8.2/newlib/libc/sys/dreamcast/times.c newlib-1.8.2-dc/newlib/libc/sys/dreamcast/times.c
71.5633 +--- newlib-1.8.2/newlib/libc/sys/dreamcast/times.c 1970-01-01 10:00:00.000000000 +1000
71.5634 ++++ newlib-1.8.2-dc/newlib/libc/sys/dreamcast/times.c 2006-07-06 18:28:31.000000000 +1000
71.5635 +@@ -0,0 +1,35 @@
71.5636 ++#include <time.h>
71.5637 ++#include <sys/times.h>
71.5638 ++
71.5639 ++/* crt.S stores program startup time (Dreamcast-relative, epoch at 1/1/1950)
71.5640 ++ in the global variable _newlib_dreamcast_utime. We can use this variable to
71.5641 ++ determine the total amount of time that the program has been running. */
71.5642 ++
71.5643 ++/* This is raw seconds of program usage, we don't need to worry about
71.5644 ++ converting epochs or anything like that... */
71.5645 ++
71.5646 ++extern unsigned long _newlib_dreamcast_utime;
71.5647 ++
71.5648 ++clock_t
71.5649 ++_times (struct tms *buf)
71.5650 ++{
71.5651 ++ if (_newlib_dreamcast_utime)
71.5652 ++ {
71.5653 ++ unsigned long rtc_h = *(volatile unsigned long*)0xa0710000;
71.5654 ++ unsigned long rtc_l = *(volatile unsigned long*)0xa0710004;
71.5655 ++ unsigned long secs = ((rtc_h & 0xffff) << 16) | (rtc_l & 0xffff);
71.5656 ++
71.5657 ++ clock_t utime = secs - _newlib_dreamcast_utime;
71.5658 ++
71.5659 ++ if (buf) {
71.5660 ++ buf->tms_utime = utime;
71.5661 ++ buf->tms_stime = 0;
71.5662 ++ buf->tms_cutime = 0;
71.5663 ++ buf->tms_cstime = 0;
71.5664 ++ }
71.5665 ++
71.5666 ++ return utime;
71.5667 ++ }
71.5668 ++
71.5669 ++ return (clock_t)-1;
71.5670 ++}
71.5671 +diff -urN newlib-1.8.2/newlib/libc/sys/dreamcast/unlink.c newlib-1.8.2-dc/newlib/libc/sys/dreamcast/unlink.c
71.5672 +--- newlib-1.8.2/newlib/libc/sys/dreamcast/unlink.c 1970-01-01 10:00:00.000000000 +1000
71.5673 ++++ newlib-1.8.2-dc/newlib/libc/sys/dreamcast/unlink.c 2006-07-06 18:28:31.000000000 +1000
71.5674 +@@ -0,0 +1,14 @@
71.5675 ++#include "vfs.h"
71.5676 ++
71.5677 ++int
71.5678 ++_unlink (const char *path)
71.5679 ++{
71.5680 ++ char *obj = _newlib_vfs_new_string (path);
71.5681 ++
71.5682 ++ struct media_ops *mops = _newlib_vfs_get_media_ops (path);
71.5683 ++ int res = mops->unlink (obj);
71.5684 ++
71.5685 ++ _newlib_vfs_delete_string (obj);
71.5686 ++
71.5687 ++ return res;
71.5688 ++}
71.5689 +diff -urN newlib-1.8.2/newlib/libc/sys/dreamcast/vfs.c newlib-1.8.2-dc/newlib/libc/sys/dreamcast/vfs.c
71.5690 +--- newlib-1.8.2/newlib/libc/sys/dreamcast/vfs.c 1970-01-01 10:00:00.000000000 +1000
71.5691 ++++ newlib-1.8.2-dc/newlib/libc/sys/dreamcast/vfs.c 2006-07-06 18:28:31.000000000 +1000
71.5692 +@@ -0,0 +1,246 @@
71.5693 ++#include <sys/types.h>
71.5694 ++#include <errno.h>
71.5695 ++#include <stdlib.h>
71.5696 ++#include <string.h>
71.5697 ++
71.5698 ++#include "vfs.h"
71.5699 ++
71.5700 ++static struct file * invalid_open_media_op (void);
71.5701 ++
71.5702 ++static struct media_ops invalid_media_ops =
71.5703 ++{
71.5704 ++ open: invalid_open_media_op,
71.5705 ++ creat: invalid_open_media_op,
71.5706 ++ link: _newlib_vfs_invalid_media_op,
71.5707 ++ unlink: _newlib_vfs_invalid_media_op,
71.5708 ++ stat: _newlib_vfs_invalid_media_op,
71.5709 ++ chmod: _newlib_vfs_invalid_media_op,
71.5710 ++ mkdir: _newlib_vfs_invalid_media_op,
71.5711 ++ rmdir: _newlib_vfs_invalid_media_op,
71.5712 ++ chdir: _newlib_vfs_invalid_media_op
71.5713 ++};
71.5714 ++
71.5715 ++struct media_ops * _newlib_vfs_host_media_ops = &invalid_media_ops;
71.5716 ++struct media_ops * _newlib_vfs_cd_media_ops = &invalid_media_ops;
71.5717 ++struct media_ops * _newlib_vfs_vmu_media_ops = &invalid_media_ops;
71.5718 ++
71.5719 ++/* This is where we detect the loader and initialize the relevant *_ops
71.5720 ++ variables. */
71.5721 ++
71.5722 ++enum _newlib_vfs_loader _newlib_vfs_initialized = VFS_LOADER_NONE;
71.5723 ++
71.5724 ++extern int _newlib_vfs_is_sslave (void);
71.5725 ++extern void _newlib_vfs_sslave_init (void);
71.5726 ++
71.5727 ++extern int _newlib_vfs_is_gdbstubs (void);
71.5728 ++extern void _newlib_vfs_gdbstubs_init (void);
71.5729 ++
71.5730 ++extern int _newlib_vfs_is_dcload (void);
71.5731 ++extern void _newlib_vfs_dcload_init (void);
71.5732 ++
71.5733 ++extern int _newlib_vfs_is_absolute (void);
71.5734 ++extern void _newlib_vfs_absolute_load (void);
71.5735 ++
71.5736 ++static void vfs_init (void)
71.5737 ++{
71.5738 ++ _newlib_vfs_initialized = VFS_LOADER_UNKNOWN;
71.5739 ++
71.5740 ++ if (_newlib_vfs_is_sslave ()) /* Marcus Comstedt's serial slave */
71.5741 ++ {
71.5742 ++ _newlib_vfs_sslave_init ();
71.5743 ++ }
71.5744 ++ else if (_newlib_vfs_is_gdbstubs ()) /* Benoit Miller's port of gdbstubs */
71.5745 ++ {
71.5746 ++ _newlib_vfs_gdbstubs_init ();
71.5747 ++ }
71.5748 ++ else if (_newlib_vfs_is_dcload ()) /* Andrew K's dcload */
71.5749 ++ {
71.5750 ++ _newlib_vfs_dcload_init ();
71.5751 ++ }
71.5752 ++ else if (_newlib_vfs_is_absolute ()) /* my own absolute */
71.5753 ++ {
71.5754 ++ _newlib_vfs_absolute_load ();
71.5755 ++ }
71.5756 ++}
71.5757 ++
71.5758 ++#define VFS_INIT { if (!_newlib_vfs_initialized) vfs_init (); }
71.5759 ++
71.5760 ++/* Each prefix, "/pc/", "/cd", and "/vmu" in little-endian. */
71.5761 ++#define PREFIX_HOST 0x2f63702f
71.5762 ++#define PREFIX_CD 0x2f64632f
71.5763 ++#define PREFIX_VMU 0x756d762f
71.5764 ++
71.5765 ++char *_newlib_vfs_new_string (const char *s)
71.5766 ++{
71.5767 ++ VFS_INIT;
71.5768 ++
71.5769 ++ {
71.5770 ++ char *obj = NULL;
71.5771 ++ unsigned long prefix = *(unsigned long *)s;
71.5772 ++ int len;
71.5773 ++
71.5774 ++ if (prefix == PREFIX_HOST || prefix == PREFIX_CD ||
71.5775 ++ prefix == PREFIX_VMU)
71.5776 ++ {
71.5777 ++ /* We snatch the prefix, accounting for the null byte (since we're
71.5778 ++ using memcpy; this could be changed to a simple copy loop... */
71.5779 ++ len = strlen (s) - 3;
71.5780 ++ obj = malloc (len);
71.5781 ++ if (!obj) return obj;
71.5782 ++
71.5783 ++ memcpy (obj, s + 4, len);
71.5784 ++ }
71.5785 ++ else /* Just return a copy of the string if no path given */
71.5786 ++ {
71.5787 ++ len = strlen (s) + 1;
71.5788 ++ obj = malloc (len);
71.5789 ++ if (!obj) return obj;
71.5790 ++
71.5791 ++ memcpy (obj, s, len);
71.5792 ++ }
71.5793 ++ return obj;
71.5794 ++ }
71.5795 ++}
71.5796 ++
71.5797 ++void _newlib_vfs_delete_string (char *s)
71.5798 ++{
71.5799 ++ if (s) free (s);
71.5800 ++}
71.5801 ++
71.5802 ++/* When each media op calls this, it's already got a copy of the stripped
71.5803 ++ path so we just do simple comparisons on the path prefix here. */
71.5804 ++struct media_ops *_newlib_vfs_get_media_ops (const char *path)
71.5805 ++{
71.5806 ++ unsigned long prefix = *(unsigned long *)path;
71.5807 ++
71.5808 ++ if (prefix == PREFIX_HOST)
71.5809 ++ {
71.5810 ++ return _newlib_vfs_host_media_ops;
71.5811 ++ }
71.5812 ++ else if (prefix == PREFIX_CD)
71.5813 ++ {
71.5814 ++ return _newlib_vfs_cd_media_ops;
71.5815 ++ }
71.5816 ++ else if (prefix == PREFIX_VMU)
71.5817 ++ {
71.5818 ++ return _newlib_vfs_vmu_media_ops;
71.5819 ++ }
71.5820 ++
71.5821 ++ return _newlib_vfs_host_media_ops;
71.5822 ++}
71.5823 ++
71.5824 ++static struct file_ops invalid_file_ops =
71.5825 ++{
71.5826 ++ lseek: _newlib_vfs_invalid_file_op,
71.5827 ++ close: _newlib_vfs_invalid_file_op,
71.5828 ++ read: _newlib_vfs_invalid_file_op,
71.5829 ++ write: _newlib_vfs_invalid_file_op,
71.5830 ++ ioctl: _newlib_vfs_invalid_file_op,
71.5831 ++ fstat: _newlib_vfs_invalid_file_op
71.5832 ++};
71.5833 ++
71.5834 ++static struct file invalid_file =
71.5835 ++{
71.5836 ++ NULL,
71.5837 ++ -1, -1,
71.5838 ++ &invalid_file_ops,
71.5839 ++ NULL
71.5840 ++};
71.5841 ++
71.5842 ++/* FIXME: A lookup for each fd could get expensive...find a better way to
71.5843 ++ "cache" frequently used fds */
71.5844 ++
71.5845 ++static struct file *cached_file = NULL;
71.5846 ++
71.5847 ++/* Find the file matching fd and return a pointer to its contents. If the
71.5848 ++ file isn't found, return a pointer to invalid_file, which represents a
71.5849 ++ non-existent file (all operations on it will fail). */
71.5850 ++struct file *_newlib_vfs_get_file (int fd)
71.5851 ++{
71.5852 ++ VFS_INIT;
71.5853 ++
71.5854 ++ {
71.5855 ++ struct file *next_file = _newlib_vfs_first_file;
71.5856 ++
71.5857 ++ if ((cached_file != NULL) && (cached_file->fd == fd))
71.5858 ++ {
71.5859 ++ return cached_file;
71.5860 ++ }
71.5861 ++
71.5862 ++ while (next_file)
71.5863 ++ {
71.5864 ++ if (next_file->fd == fd)
71.5865 ++ {
71.5866 ++ cached_file = next_file;
71.5867 ++ return next_file;
71.5868 ++ }
71.5869 ++ next_file = next_file->next;
71.5870 ++ }
71.5871 ++ return &invalid_file;
71.5872 ++ }
71.5873 ++}
71.5874 ++
71.5875 ++static int last_fd = -1;
71.5876 ++
71.5877 ++/* Just insert the file at the end of the list, as it's already been
71.5878 ++ allocated by open/creat. Increase the library's fd by using the last
71.5879 ++ file's fd. */
71.5880 ++int _newlib_vfs_insert_file (struct file *pf)
71.5881 ++{
71.5882 ++ if (last_fd < 0)
71.5883 ++ {
71.5884 ++ last_fd = _newlib_vfs_last_file->fd;
71.5885 ++ }
71.5886 ++/* ++last_fd; */
71.5887 ++ pf->fd = ++last_fd;
71.5888 ++ _newlib_vfs_last_file->next = pf;
71.5889 ++ _newlib_vfs_last_file = pf;
71.5890 ++ return last_fd;
71.5891 ++}
71.5892 ++
71.5893 ++int _newlib_vfs_remove_file (struct file *pf)
71.5894 ++{
71.5895 ++ if (pf)
71.5896 ++ {
71.5897 ++ struct file *prev_file = _newlib_vfs_first_file;
71.5898 ++ struct file *next_file = NULL;
71.5899 ++
71.5900 ++ while (prev_file)
71.5901 ++ {
71.5902 ++ if (prev_file->next == pf)
71.5903 ++ {
71.5904 ++ prev_file->next = pf->next;
71.5905 ++ next_file = prev_file->next;
71.5906 ++ while (next_file)
71.5907 ++ {
71.5908 ++ prev_file = next_file;
71.5909 ++ next_file = next_file->next;
71.5910 ++ }
71.5911 ++ _newlib_vfs_last_file = prev_file;
71.5912 ++ free (pf);
71.5913 ++ return 0;
71.5914 ++ }
71.5915 ++ prev_file = prev_file->next;
71.5916 ++ }
71.5917 ++ }
71.5918 ++ errno = ENOSYS;
71.5919 ++ return -1;
71.5920 ++}
71.5921 ++
71.5922 ++int _newlib_vfs_invalid_file_op (void)
71.5923 ++{
71.5924 ++ errno = ENOSYS;
71.5925 ++ return -1;
71.5926 ++}
71.5927 ++
71.5928 ++static struct file *invalid_open_media_op (void)
71.5929 ++{
71.5930 ++ errno = ENOSYS;
71.5931 ++ return NULL;
71.5932 ++}
71.5933 ++
71.5934 ++int _newlib_vfs_invalid_media_op (void)
71.5935 ++{
71.5936 ++ errno = ENOSYS;
71.5937 ++ return -1;
71.5938 ++}
71.5939 +diff -urN newlib-1.8.2/newlib/libc/sys/dreamcast/vfs.h newlib-1.8.2-dc/newlib/libc/sys/dreamcast/vfs.h
71.5940 +--- newlib-1.8.2/newlib/libc/sys/dreamcast/vfs.h 1970-01-01 10:00:00.000000000 +1000
71.5941 ++++ newlib-1.8.2-dc/newlib/libc/sys/dreamcast/vfs.h 2006-07-06 18:28:31.000000000 +1000
71.5942 +@@ -0,0 +1,100 @@
71.5943 ++#ifndef __VFS_H__
71.5944 ++#define __VFS_H__
71.5945 ++
71.5946 ++#include <sys/types.h>
71.5947 ++#include <sys/stat.h>
71.5948 ++
71.5949 ++/* Defines all of the operations that can be performed on a particular media
71.5950 ++ type. These are independent of file access routines. */
71.5951 ++
71.5952 ++struct media_ops {
71.5953 ++ struct file * (*open) (const char *, int, mode_t);
71.5954 ++ struct file * (*creat) (const char *, mode_t);
71.5955 ++ int (*link) (const char *, const char *);
71.5956 ++ int (*unlink) (const char *);
71.5957 ++ int (*stat) (const char *, struct stat *);
71.5958 ++ int (*chmod) (const char *, mode_t);
71.5959 ++ int (*mkdir) (const char*, mode_t);
71.5960 ++ int (*rmdir) (const char *);
71.5961 ++ int (*chdir) (const char *);
71.5962 ++};
71.5963 ++
71.5964 ++/* These are the operations that can be done to a file. Each media and stub
71.5965 ++ has it's own combination of routines (e.g. Absolute + VMU, dcload + host). */
71.5966 ++
71.5967 ++struct file_ops {
71.5968 ++ off_t (*lseek) (struct file *, off_t, int);
71.5969 ++ int (*close) (struct file *);
71.5970 ++ size_t (*read) (struct file *, void *, size_t);
71.5971 ++ size_t (*write) (struct file *, void *, size_t);
71.5972 ++ /* Hmm, what to do with this one? */
71.5973 ++ int (*ioctl) (struct file *, int, long);
71.5974 ++ int (*fstat) (struct file *, struct stat *);
71.5975 ++};
71.5976 ++
71.5977 ++/* We maintain a linked list of files so that we can remove and add files
71.5978 ++ to/from the list easier. Each file contains an fd, the "real" fd of whatever
71.5979 ++ media it resides upon, a pointer to the file_ops for the file, and a pointer
71.5980 ++ to media/stub specific data. */
71.5981 ++
71.5982 ++struct file {
71.5983 ++ struct file *next;
71.5984 ++ int fd;
71.5985 ++ int media_fd;
71.5986 ++ struct file_ops *fops;
71.5987 ++ void *specifics;
71.5988 ++};
71.5989 ++
71.5990 ++
71.5991 ++/* Each load initializes the media_ops for each type based on the media it
71.5992 ++ supports. If a media type isn't supported, then it's ops points to
71.5993 ++ _newlib_vfs_invalid_media_ops. */
71.5994 ++extern struct media_ops * _newlib_vfs_host_media_ops;
71.5995 ++extern struct media_ops * _newlib_vfs_cd_media_ops;
71.5996 ++extern struct media_ops * _newlib_vfs_vmu_media_ops;
71.5997 ++
71.5998 ++/* Pointers to the first and last file in the list */
71.5999 ++extern struct file * _newlib_vfs_first_file;
71.6000 ++extern struct file * _newlib_vfs_last_file;
71.6001 ++
71.6002 ++/* Each loader initializer gives this a distinct value so that programs
71.6003 ++ can determine which loader they're being loaded under. */
71.6004 ++enum _newlib_vfs_loader
71.6005 ++{
71.6006 ++ VFS_LOADER_NONE,
71.6007 ++ VFS_LOADER_UNKNOWN,
71.6008 ++ VFS_LOADER_SERIAL_SLAVE,
71.6009 ++ VFS_LOADER_GDBSTUBS,
71.6010 ++ VFS_LOADER_DCLOAD_HOST,
71.6011 ++ VFS_LOADER_DCLOAD_NOHOST,
71.6012 ++ VFS_LOADER_ABSOLUTE
71.6013 ++};
71.6014 ++
71.6015 ++extern enum _newlib_vfs_loader _newlib_vfs_initialized;
71.6016 ++
71.6017 ++/* Generic media/file_ops that return ENOSYS */
71.6018 ++int _newlib_vfs_invalid_media_op (void);
71.6019 ++int _newlib_vfs_invalid_file_op (void);
71.6020 ++
71.6021 ++/* Using the path prefix, return the media_ops that handles it */
71.6022 ++struct media_ops *_newlib_vfs_get_media_ops (const char *path);
71.6023 ++
71.6024 ++/* Returns the file that matches the given fd */
71.6025 ++struct file *_newlib_vfs_get_file (int fd);
71.6026 ++
71.6027 ++/* Insert a new file into the list. Returns -1 and sets errno if the file
71.6028 ++ can't be inserted, otherewise returns 0 */
71.6029 ++int _newlib_vfs_insert_file (struct file *);
71.6030 ++
71.6031 ++/* Removes a file from the list. Returns -1 and sets errno if there was
71.6032 ++ a problem (e.g. invalid fd passed to close, etc.) */
71.6033 ++int _newlib_vfs_remove_file (struct file *);
71.6034 ++
71.6035 ++/* Copy the given string into a new buffer, while stripping the vfs prefix
71.6036 ++ at the same time. */
71.6037 ++char *_newlib_vfs_new_string (const char *s);
71.6038 ++
71.6039 ++/* Free the buffer previously allocated with *_new_string */
71.6040 ++void _newlib_vfs_delete_string (char *s);
71.6041 ++
71.6042 ++#endif /* __VFS_H__ */
71.6043 +diff -urN newlib-1.8.2/newlib/libc/sys/dreamcast/write.c newlib-1.8.2-dc/newlib/libc/sys/dreamcast/write.c
71.6044 +--- newlib-1.8.2/newlib/libc/sys/dreamcast/write.c 1970-01-01 10:00:00.000000000 +1000
71.6045 ++++ newlib-1.8.2-dc/newlib/libc/sys/dreamcast/write.c 2006-07-06 18:28:31.000000000 +1000
71.6046 +@@ -0,0 +1,11 @@
71.6047 ++#include <sys/types.h>
71.6048 ++
71.6049 ++#include "vfs.h"
71.6050 ++
71.6051 ++int
71.6052 ++_write (int fd, const void *buf, size_t cnt)
71.6053 ++{
71.6054 ++ struct file *pf = _newlib_vfs_get_file (fd);
71.6055 ++
71.6056 ++ return pf->fops->write (pf, buf, cnt);
71.6057 ++}
71.6058 +diff -urN newlib-1.8.2/newlib/libc/sys/Makefile.in newlib-1.8.2-dc/newlib/libc/sys/Makefile.in
71.6059 +--- newlib-1.8.2/newlib/libc/sys/Makefile.in 1999-06-04 07:34:55.000000000 +1000
71.6060 ++++ newlib-1.8.2-dc/newlib/libc/sys/Makefile.in 2006-07-06 18:28:31.000000000 +1000
71.6061 +@@ -79,8 +79,7 @@
71.6062 +
71.6063 + SUBDIRS = $(sys_dir) .
71.6064 +
71.6065 +-@HAVE_SYS_DIR_TRUE@SYSLIB = \
71.6066 +-@HAVE_SYS_DIR_TRUE@lib.a
71.6067 ++@HAVE_SYS_DIR_TRUE@SYSLIB = lib.a
71.6068 +
71.6069 + noinst_LIBRARIES = $(SYSLIB)
71.6070 + noinst_DATA = $(CRT0)
71.6071 +@@ -295,7 +294,7 @@
71.6072 + @for file in $(DISTFILES); do \
71.6073 + if test -f $$file; then d=.; else d=$(srcdir); fi; \
71.6074 + if test -d $$d/$$file; then \
71.6075 +- cp -pr $$/$$file $(distdir)/$$file; \
71.6076 ++ cp -pr $$d/$$file $(distdir)/$$file; \
71.6077 + else \
71.6078 + test -f $(distdir)/$$file \
71.6079 + || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
71.6080 +diff -urN newlib-1.8.2/newlib/libc/syscalls/Makefile.in newlib-1.8.2-dc/newlib/libc/syscalls/Makefile.in
71.6081 +--- newlib-1.8.2/newlib/libc/syscalls/Makefile.in 1998-12-01 08:03:47.000000000 +1000
71.6082 ++++ newlib-1.8.2-dc/newlib/libc/syscalls/Makefile.in 2006-07-06 18:28:31.000000000 +1000
71.6083 +@@ -1,6 +1,6 @@
71.6084 +-# Makefile.in generated automatically by automake 1.3b from Makefile.am
71.6085 ++# Makefile.in generated automatically by automake 1.4 from Makefile.am
71.6086 +
71.6087 +-# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
71.6088 ++# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
71.6089 + # This Makefile.in is free software; the Free Software Foundation
71.6090 + # gives unlimited permission to copy and/or distribute it,
71.6091 + # with or without modifications, as long as this notice is preserved.
71.6092 +@@ -46,7 +46,7 @@
71.6093 + AUTOHEADER = @AUTOHEADER@
71.6094 +
71.6095 + INSTALL = @INSTALL@
71.6096 +-INSTALL_PROGRAM = @INSTALL_PROGRAM@
71.6097 ++INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
71.6098 + INSTALL_DATA = @INSTALL_DATA@
71.6099 + INSTALL_SCRIPT = @INSTALL_SCRIPT@
71.6100 + transform = @program_transform_name@
71.6101 +@@ -78,7 +78,6 @@
71.6102 + PACKAGE = @PACKAGE@
71.6103 + RANLIB = @RANLIB@
71.6104 + VERSION = @VERSION@
71.6105 +-mach_add_objs = @mach_add_objs@
71.6106 + machine_dir = @machine_dir@
71.6107 + newlib_basedir = @newlib_basedir@
71.6108 + sys_dir = @sys_dir@
71.6109 +@@ -89,27 +88,10 @@
71.6110 +
71.6111 + noinst_LIBRARIES = lib.a
71.6112 +
71.6113 +-lib_a_SOURCES = \
71.6114 +- sysclose.c \
71.6115 +- sysexecve.c \
71.6116 +- sysfcntl.c \
71.6117 +- sysfork.c \
71.6118 +- sysfstat.c \
71.6119 +- sysgetpid.c \
71.6120 +- sysgettod.c \
71.6121 +- syskill.c \
71.6122 +- syslink.c \
71.6123 +- syslseek.c \
71.6124 +- sysopen.c \
71.6125 +- sysread.c \
71.6126 +- syssbrk.c \
71.6127 +- sysstat.c \
71.6128 +- systimes.c \
71.6129 +- sysunlink.c \
71.6130 +- syswait.c \
71.6131 +- syswrite.c
71.6132 ++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
71.6133 +
71.6134 +-CHEWOUT_FILES =
71.6135 ++
71.6136 ++CHEWOUT_FILES =
71.6137 +
71.6138 + SUFFIXES = .def
71.6139 +
71.6140 +@@ -134,22 +116,22 @@
71.6141 + syswrite.o
71.6142 + CFLAGS = @CFLAGS@
71.6143 + COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
71.6144 +-LINK = $(CC) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
71.6145 ++CCLD = $(CC)
71.6146 ++LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
71.6147 + DIST_COMMON = Makefile.am Makefile.in
71.6148 +
71.6149 +
71.6150 + DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
71.6151 +
71.6152 + TAR = tar
71.6153 +-GZIP = --best
71.6154 ++GZIP_ENV = --best
71.6155 + SOURCES = $(lib_a_SOURCES)
71.6156 + OBJECTS = $(lib_a_OBJECTS)
71.6157 +
71.6158 +-all: Makefile $(LIBRARIES)
71.6159 +-
71.6160 ++all: all-redirect
71.6161 + .SUFFIXES:
71.6162 + .SUFFIXES: .S .c .def .o .s
71.6163 +-$(srcdir)/Makefile.in: @MAINT@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
71.6164 ++$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
71.6165 + cd $(top_srcdir) && $(AUTOMAKE) --cygnus syscalls/Makefile
71.6166 +
71.6167 + Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
71.6168 +@@ -193,8 +175,12 @@
71.6169 + tags: TAGS
71.6170 +
71.6171 + ID: $(HEADERS) $(SOURCES) $(LISP)
71.6172 ++ list='$(SOURCES) $(HEADERS)'; \
71.6173 ++ unique=`for i in $$list; do echo $$i; done | \
71.6174 ++ awk ' { files[$$0] = 1; } \
71.6175 ++ END { for (i in files) print i; }'`; \
71.6176 + here=`pwd` && cd $(srcdir) \
71.6177 +- && mkid -f$$here/ID $(SOURCES) $(HEADERS) $(LISP)
71.6178 ++ && mkid -f$$here/ID $$unique $(LISP)
71.6179 +
71.6180 + TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
71.6181 + tags=; \
71.6182 +@@ -222,28 +208,39 @@
71.6183 + distdir: $(DISTFILES)
71.6184 + @for file in $(DISTFILES); do \
71.6185 + if test -f $$file; then d=.; else d=$(srcdir); fi; \
71.6186 +- test -f $(distdir)/$$file \
71.6187 +- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
71.6188 +- || cp -p $$d/$$file $(distdir)/$$file; \
71.6189 ++ if test -d $$d/$$file; then \
71.6190 ++ cp -pr $$d/$$file $(distdir)/$$file; \
71.6191 ++ else \
71.6192 ++ test -f $(distdir)/$$file \
71.6193 ++ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
71.6194 ++ || cp -p $$d/$$file $(distdir)/$$file || :; \
71.6195 ++ fi; \
71.6196 + done
71.6197 +-info:
71.6198 +-dvi:
71.6199 +-check:
71.6200 +-installcheck:
71.6201 +-install-info:
71.6202 +-install-exec:
71.6203 +- @$(NORMAL_INSTALL)
71.6204 +-
71.6205 +-install-data:
71.6206 +- @$(NORMAL_INSTALL)
71.6207 +-
71.6208 +-install: install-exec install-data all
71.6209 +- @:
71.6210 +-
71.6211 +-uninstall:
71.6212 +-
71.6213 ++info-am:
71.6214 ++info: info-am
71.6215 ++dvi-am:
71.6216 ++dvi: dvi-am
71.6217 ++check-am:
71.6218 ++check: check-am
71.6219 ++installcheck-am:
71.6220 ++installcheck: installcheck-am
71.6221 ++install-info-am:
71.6222 ++install-info: install-info-am
71.6223 ++install-exec-am:
71.6224 ++install-exec: install-exec-am
71.6225 ++
71.6226 ++install-data-am:
71.6227 ++install-data: install-data-am
71.6228 ++
71.6229 ++install-am: all-am
71.6230 ++ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
71.6231 ++install: install-am
71.6232 ++uninstall-am:
71.6233 ++uninstall: uninstall-am
71.6234 ++all-am: Makefile $(LIBRARIES)
71.6235 ++all-redirect: all-am
71.6236 + install-strip:
71.6237 +- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
71.6238 ++ $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
71.6239 + installdirs:
71.6240 +
71.6241 +
71.6242 +@@ -257,29 +254,38 @@
71.6243 + -rm -f config.cache config.log stamp-h stamp-h[0-9]*
71.6244 +
71.6245 + maintainer-clean-generic:
71.6246 +-mostlyclean: mostlyclean-noinstLIBRARIES mostlyclean-compile \
71.6247 ++mostlyclean-am: mostlyclean-noinstLIBRARIES mostlyclean-compile \
71.6248 + mostlyclean-tags mostlyclean-generic
71.6249 +
71.6250 +-clean: clean-noinstLIBRARIES clean-compile clean-tags clean-generic \
71.6251 +- mostlyclean
71.6252 ++mostlyclean: mostlyclean-am
71.6253 ++
71.6254 ++clean-am: clean-noinstLIBRARIES clean-compile clean-tags clean-generic \
71.6255 ++ mostlyclean-am
71.6256 +
71.6257 +-distclean: distclean-noinstLIBRARIES distclean-compile distclean-tags \
71.6258 +- distclean-generic clean
71.6259 +- -rm -f config.status
71.6260 ++clean: clean-am
71.6261 +
71.6262 +-maintainer-clean: maintainer-clean-noinstLIBRARIES \
71.6263 ++distclean-am: distclean-noinstLIBRARIES distclean-compile \
71.6264 ++ distclean-tags distclean-generic clean-am
71.6265 ++
71.6266 ++distclean: distclean-am
71.6267 ++
71.6268 ++maintainer-clean-am: maintainer-clean-noinstLIBRARIES \
71.6269 + maintainer-clean-compile maintainer-clean-tags \
71.6270 +- maintainer-clean-generic distclean
71.6271 ++ maintainer-clean-generic distclean-am
71.6272 + @echo "This command is intended for maintainers to use;"
71.6273 + @echo "it deletes files that may require special tools to rebuild."
71.6274 +
71.6275 ++maintainer-clean: maintainer-clean-am
71.6276 ++
71.6277 + .PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \
71.6278 + clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
71.6279 + mostlyclean-compile distclean-compile clean-compile \
71.6280 + maintainer-clean-compile tags mostlyclean-tags distclean-tags \
71.6281 +-clean-tags maintainer-clean-tags distdir info dvi installcheck \
71.6282 +-install-info install-exec install-data install uninstall all \
71.6283 +-installdirs mostlyclean-generic distclean-generic clean-generic \
71.6284 ++clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \
71.6285 ++check-am installcheck-am installcheck install-info-am install-info \
71.6286 ++install-exec-am install-exec install-data-am install-data install-am \
71.6287 ++install uninstall-am uninstall all-redirect all-am all installdirs \
71.6288 ++mostlyclean-generic distclean-generic clean-generic \
71.6289 + maintainer-clean-generic clean mostlyclean distclean maintainer-clean
71.6290 +
71.6291 +
71.6292 +diff -urN newlib-1.8.2/newlib/libc/time/Makefile.in newlib-1.8.2-dc/newlib/libc/time/Makefile.in
71.6293 +--- newlib-1.8.2/newlib/libc/time/Makefile.in 1998-12-01 08:03:48.000000000 +1000
71.6294 ++++ newlib-1.8.2-dc/newlib/libc/time/Makefile.in 2006-07-06 18:28:31.000000000 +1000
71.6295 +@@ -1,6 +1,6 @@
71.6296 +-# Makefile.in generated automatically by automake 1.3b from Makefile.am
71.6297 ++# Makefile.in generated automatically by automake 1.4 from Makefile.am
71.6298 +
71.6299 +-# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
71.6300 ++# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
71.6301 + # This Makefile.in is free software; the Free Software Foundation
71.6302 + # gives unlimited permission to copy and/or distribute it,
71.6303 + # with or without modifications, as long as this notice is preserved.
71.6304 +@@ -46,7 +46,7 @@
71.6305 + AUTOHEADER = @AUTOHEADER@
71.6306 +
71.6307 + INSTALL = @INSTALL@
71.6308 +-INSTALL_PROGRAM = @INSTALL_PROGRAM@
71.6309 ++INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
71.6310 + INSTALL_DATA = @INSTALL_DATA@
71.6311 + INSTALL_SCRIPT = @INSTALL_SCRIPT@
71.6312 + transform = @program_transform_name@
71.6313 +@@ -78,7 +78,6 @@
71.6314 + PACKAGE = @PACKAGE@
71.6315 + RANLIB = @RANLIB@
71.6316 + VERSION = @VERSION@
71.6317 +-mach_add_objs = @mach_add_objs@
71.6318 + machine_dir = @machine_dir@
71.6319 + newlib_basedir = @newlib_basedir@
71.6320 + sys_dir = @sys_dir@
71.6321 +@@ -89,31 +88,11 @@
71.6322 +
71.6323 + noinst_LIBRARIES = lib.a
71.6324 +
71.6325 +-lib_a_SOURCES = \
71.6326 +- asctime.c \
71.6327 +- asctime_r.c \
71.6328 +- clock.c \
71.6329 +- ctime.c \
71.6330 +- ctime_r.c \
71.6331 +- difftime.c \
71.6332 +- gmtime.c \
71.6333 +- gmtime_r.c \
71.6334 +- lcltime.c \
71.6335 +- lcltime_r.c \
71.6336 +- mktime.c \
71.6337 +- strftime.c \
71.6338 +- time.c
71.6339 +-
71.6340 +-CHEWOUT_FILES = \
71.6341 +- asctime.def \
71.6342 +- clock.def \
71.6343 +- ctime.def \
71.6344 +- difftime.def \
71.6345 +- gmtime.def \
71.6346 +- lcltime.def \
71.6347 +- mktime.def \
71.6348 +- strftime.def \
71.6349 +- time.def
71.6350 ++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
71.6351 ++
71.6352 ++
71.6353 ++CHEWOUT_FILES = asctime.def clock.def ctime.def difftime.def gmtime.def lcltime.def mktime.def strftime.def time.def
71.6354 ++
71.6355 +
71.6356 + SUFFIXES = .def
71.6357 +
71.6358 +@@ -137,22 +116,22 @@
71.6359 + strftime.o time.o
71.6360 + CFLAGS = @CFLAGS@
71.6361 + COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
71.6362 +-LINK = $(CC) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
71.6363 ++CCLD = $(CC)
71.6364 ++LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
71.6365 + DIST_COMMON = Makefile.am Makefile.in
71.6366 +
71.6367 +
71.6368 + DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
71.6369 +
71.6370 + TAR = tar
71.6371 +-GZIP = --best
71.6372 ++GZIP_ENV = --best
71.6373 + SOURCES = $(lib_a_SOURCES)
71.6374 + OBJECTS = $(lib_a_OBJECTS)
71.6375 +
71.6376 +-all: Makefile $(LIBRARIES)
71.6377 +-
71.6378 ++all: all-redirect
71.6379 + .SUFFIXES:
71.6380 + .SUFFIXES: .S .c .def .o .s
71.6381 +-$(srcdir)/Makefile.in: @MAINT@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
71.6382 ++$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
71.6383 + cd $(top_srcdir) && $(AUTOMAKE) --cygnus time/Makefile
71.6384 +
71.6385 + Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
71.6386 +@@ -196,8 +175,12 @@
71.6387 + tags: TAGS
71.6388 +
71.6389 + ID: $(HEADERS) $(SOURCES) $(LISP)
71.6390 ++ list='$(SOURCES) $(HEADERS)'; \
71.6391 ++ unique=`for i in $$list; do echo $$i; done | \
71.6392 ++ awk ' { files[$$0] = 1; } \
71.6393 ++ END { for (i in files) print i; }'`; \
71.6394 + here=`pwd` && cd $(srcdir) \
71.6395 +- && mkid -f$$here/ID $(SOURCES) $(HEADERS) $(LISP)
71.6396 ++ && mkid -f$$here/ID $$unique $(LISP)
71.6397 +
71.6398 + TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
71.6399 + tags=; \
71.6400 +@@ -225,28 +208,39 @@
71.6401 + distdir: $(DISTFILES)
71.6402 + @for file in $(DISTFILES); do \
71.6403 + if test -f $$file; then d=.; else d=$(srcdir); fi; \
71.6404 +- test -f $(distdir)/$$file \
71.6405 +- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
71.6406 +- || cp -p $$d/$$file $(distdir)/$$file; \
71.6407 ++ if test -d $$d/$$file; then \
71.6408 ++ cp -pr $$d/$$file $(distdir)/$$file; \
71.6409 ++ else \
71.6410 ++ test -f $(distdir)/$$file \
71.6411 ++ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
71.6412 ++ || cp -p $$d/$$file $(distdir)/$$file || :; \
71.6413 ++ fi; \
71.6414 + done
71.6415 +-info:
71.6416 +-dvi:
71.6417 +-check:
71.6418 +-installcheck:
71.6419 +-install-info:
71.6420 +-install-exec:
71.6421 +- @$(NORMAL_INSTALL)
71.6422 +-
71.6423 +-install-data:
71.6424 +- @$(NORMAL_INSTALL)
71.6425 +-
71.6426 +-install: install-exec install-data all
71.6427 +- @:
71.6428 +-
71.6429 +-uninstall:
71.6430 +-
71.6431 ++info-am:
71.6432 ++info: info-am
71.6433 ++dvi-am:
71.6434 ++dvi: dvi-am
71.6435 ++check-am:
71.6436 ++check: check-am
71.6437 ++installcheck-am:
71.6438 ++installcheck: installcheck-am
71.6439 ++install-info-am:
71.6440 ++install-info: install-info-am
71.6441 ++install-exec-am:
71.6442 ++install-exec: install-exec-am
71.6443 ++
71.6444 ++install-data-am:
71.6445 ++install-data: install-data-am
71.6446 ++
71.6447 ++install-am: all-am
71.6448 ++ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
71.6449 ++install: install-am
71.6450 ++uninstall-am:
71.6451 ++uninstall: uninstall-am
71.6452 ++all-am: Makefile $(LIBRARIES)
71.6453 ++all-redirect: all-am
71.6454 + install-strip:
71.6455 +- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
71.6456 ++ $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
71.6457 + installdirs:
71.6458 +
71.6459 +
71.6460 +@@ -260,29 +254,38 @@
71.6461 + -rm -f config.cache config.log stamp-h stamp-h[0-9]*
71.6462 +
71.6463 + maintainer-clean-generic:
71.6464 +-mostlyclean: mostlyclean-noinstLIBRARIES mostlyclean-compile \
71.6465 ++mostlyclean-am: mostlyclean-noinstLIBRARIES mostlyclean-compile \
71.6466 + mostlyclean-tags mostlyclean-generic
71.6467 +
71.6468 +-clean: clean-noinstLIBRARIES clean-compile clean-tags clean-generic \
71.6469 +- mostlyclean
71.6470 ++mostlyclean: mostlyclean-am
71.6471 +
71.6472 +-distclean: distclean-noinstLIBRARIES distclean-compile distclean-tags \
71.6473 +- distclean-generic clean
71.6474 +- -rm -f config.status
71.6475 ++clean-am: clean-noinstLIBRARIES clean-compile clean-tags clean-generic \
71.6476 ++ mostlyclean-am
71.6477 +
71.6478 +-maintainer-clean: maintainer-clean-noinstLIBRARIES \
71.6479 ++clean: clean-am
71.6480 ++
71.6481 ++distclean-am: distclean-noinstLIBRARIES distclean-compile \
71.6482 ++ distclean-tags distclean-generic clean-am
71.6483 ++
71.6484 ++distclean: distclean-am
71.6485 ++
71.6486 ++maintainer-clean-am: maintainer-clean-noinstLIBRARIES \
71.6487 + maintainer-clean-compile maintainer-clean-tags \
71.6488 +- maintainer-clean-generic distclean
71.6489 ++ maintainer-clean-generic distclean-am
71.6490 + @echo "This command is intended for maintainers to use;"
71.6491 + @echo "it deletes files that may require special tools to rebuild."
71.6492 +
71.6493 ++maintainer-clean: maintainer-clean-am
71.6494 ++
71.6495 + .PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \
71.6496 + clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
71.6497 + mostlyclean-compile distclean-compile clean-compile \
71.6498 + maintainer-clean-compile tags mostlyclean-tags distclean-tags \
71.6499 +-clean-tags maintainer-clean-tags distdir info dvi installcheck \
71.6500 +-install-info install-exec install-data install uninstall all \
71.6501 +-installdirs mostlyclean-generic distclean-generic clean-generic \
71.6502 ++clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \
71.6503 ++check-am installcheck-am installcheck install-info-am install-info \
71.6504 ++install-exec-am install-exec install-data-am install-data install-am \
71.6505 ++install uninstall-am uninstall all-redirect all-am all installdirs \
71.6506 ++mostlyclean-generic distclean-generic clean-generic \
71.6507 + maintainer-clean-generic clean mostlyclean distclean maintainer-clean
71.6508 +
71.6509 +
71.6510 +diff -urN newlib-1.8.2/newlib/libc/unix/Makefile.in newlib-1.8.2-dc/newlib/libc/unix/Makefile.in
71.6511 +--- newlib-1.8.2/newlib/libc/unix/Makefile.in 1998-12-01 08:03:48.000000000 +1000
71.6512 ++++ newlib-1.8.2-dc/newlib/libc/unix/Makefile.in 2006-07-06 18:28:31.000000000 +1000
71.6513 +@@ -1,6 +1,6 @@
71.6514 +-# Makefile.in generated automatically by automake 1.3b from Makefile.am
71.6515 ++# Makefile.in generated automatically by automake 1.4 from Makefile.am
71.6516 +
71.6517 +-# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
71.6518 ++# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
71.6519 + # This Makefile.in is free software; the Free Software Foundation
71.6520 + # gives unlimited permission to copy and/or distribute it,
71.6521 + # with or without modifications, as long as this notice is preserved.
71.6522 +@@ -46,7 +46,7 @@
71.6523 + AUTOHEADER = @AUTOHEADER@
71.6524 +
71.6525 + INSTALL = @INSTALL@
71.6526 +-INSTALL_PROGRAM = @INSTALL_PROGRAM@
71.6527 ++INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
71.6528 + INSTALL_DATA = @INSTALL_DATA@
71.6529 + INSTALL_SCRIPT = @INSTALL_SCRIPT@
71.6530 + transform = @program_transform_name@
71.6531 +@@ -78,7 +78,6 @@
71.6532 + PACKAGE = @PACKAGE@
71.6533 + RANLIB = @RANLIB@
71.6534 + VERSION = @VERSION@
71.6535 +-mach_add_objs = @mach_add_objs@
71.6536 + machine_dir = @machine_dir@
71.6537 + newlib_basedir = @newlib_basedir@
71.6538 + sys_dir = @sys_dir@
71.6539 +@@ -89,10 +88,10 @@
71.6540 +
71.6541 + noinst_LIBRARIES = lib.a
71.6542 +
71.6543 +-lib_a_SOURCES = \
71.6544 +- getpass.c sigset.c getpwent.c ttyname.c getut.c getlogin.c getcwd.c
71.6545 ++lib_a_SOURCES = getpass.c sigset.c getpwent.c ttyname.c getut.c getlogin.c getcwd.c
71.6546 +
71.6547 +-CHEWOUT_FILES =
71.6548 ++
71.6549 ++CHEWOUT_FILES =
71.6550 +
71.6551 + SUFFIXES = .def
71.6552 +
71.6553 +@@ -115,22 +114,22 @@
71.6554 + getlogin.o getcwd.o
71.6555 + CFLAGS = @CFLAGS@
71.6556 + COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
71.6557 +-LINK = $(CC) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
71.6558 ++CCLD = $(CC)
71.6559 ++LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
71.6560 + DIST_COMMON = Makefile.am Makefile.in
71.6561 +
71.6562 +
71.6563 + DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
71.6564 +
71.6565 + TAR = tar
71.6566 +-GZIP = --best
71.6567 ++GZIP_ENV = --best
71.6568 + SOURCES = $(lib_a_SOURCES)
71.6569 + OBJECTS = $(lib_a_OBJECTS)
71.6570 +
71.6571 +-all: Makefile $(LIBRARIES)
71.6572 +-
71.6573 ++all: all-redirect
71.6574 + .SUFFIXES:
71.6575 + .SUFFIXES: .S .c .def .o .s
71.6576 +-$(srcdir)/Makefile.in: @MAINT@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
71.6577 ++$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
71.6578 + cd $(top_srcdir) && $(AUTOMAKE) --cygnus unix/Makefile
71.6579 +
71.6580 + Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
71.6581 +@@ -174,8 +173,12 @@
71.6582 + tags: TAGS
71.6583 +
71.6584 + ID: $(HEADERS) $(SOURCES) $(LISP)
71.6585 ++ list='$(SOURCES) $(HEADERS)'; \
71.6586 ++ unique=`for i in $$list; do echo $$i; done | \
71.6587 ++ awk ' { files[$$0] = 1; } \
71.6588 ++ END { for (i in files) print i; }'`; \
71.6589 + here=`pwd` && cd $(srcdir) \
71.6590 +- && mkid -f$$here/ID $(SOURCES) $(HEADERS) $(LISP)
71.6591 ++ && mkid -f$$here/ID $$unique $(LISP)
71.6592 +
71.6593 + TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
71.6594 + tags=; \
71.6595 +@@ -203,28 +206,39 @@
71.6596 + distdir: $(DISTFILES)
71.6597 + @for file in $(DISTFILES); do \
71.6598 + if test -f $$file; then d=.; else d=$(srcdir); fi; \
71.6599 +- test -f $(distdir)/$$file \
71.6600 +- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
71.6601 +- || cp -p $$d/$$file $(distdir)/$$file; \
71.6602 ++ if test -d $$d/$$file; then \
71.6603 ++ cp -pr $$d/$$file $(distdir)/$$file; \
71.6604 ++ else \
71.6605 ++ test -f $(distdir)/$$file \
71.6606 ++ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
71.6607 ++ || cp -p $$d/$$file $(distdir)/$$file || :; \
71.6608 ++ fi; \
71.6609 + done
71.6610 +-info:
71.6611 +-dvi:
71.6612 +-check:
71.6613 +-installcheck:
71.6614 +-install-info:
71.6615 +-install-exec:
71.6616 +- @$(NORMAL_INSTALL)
71.6617 +-
71.6618 +-install-data:
71.6619 +- @$(NORMAL_INSTALL)
71.6620 +-
71.6621 +-install: install-exec install-data all
71.6622 +- @:
71.6623 +-
71.6624 +-uninstall:
71.6625 +-
71.6626 ++info-am:
71.6627 ++info: info-am
71.6628 ++dvi-am:
71.6629 ++dvi: dvi-am
71.6630 ++check-am:
71.6631 ++check: check-am
71.6632 ++installcheck-am:
71.6633 ++installcheck: installcheck-am
71.6634 ++install-info-am:
71.6635 ++install-info: install-info-am
71.6636 ++install-exec-am:
71.6637 ++install-exec: install-exec-am
71.6638 ++
71.6639 ++install-data-am:
71.6640 ++install-data: install-data-am
71.6641 ++
71.6642 ++install-am: all-am
71.6643 ++ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
71.6644 ++install: install-am
71.6645 ++uninstall-am:
71.6646 ++uninstall: uninstall-am
71.6647 ++all-am: Makefile $(LIBRARIES)
71.6648 ++all-redirect: all-am
71.6649 + install-strip:
71.6650 +- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
71.6651 ++ $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
71.6652 + installdirs:
71.6653 +
71.6654 +
71.6655 +@@ -238,29 +252,38 @@
71.6656 + -rm -f config.cache config.log stamp-h stamp-h[0-9]*
71.6657 +
71.6658 + maintainer-clean-generic:
71.6659 +-mostlyclean: mostlyclean-noinstLIBRARIES mostlyclean-compile \
71.6660 ++mostlyclean-am: mostlyclean-noinstLIBRARIES mostlyclean-compile \
71.6661 + mostlyclean-tags mostlyclean-generic
71.6662 +
71.6663 +-clean: clean-noinstLIBRARIES clean-compile clean-tags clean-generic \
71.6664 +- mostlyclean
71.6665 ++mostlyclean: mostlyclean-am
71.6666 ++
71.6667 ++clean-am: clean-noinstLIBRARIES clean-compile clean-tags clean-generic \
71.6668 ++ mostlyclean-am
71.6669 +
71.6670 +-distclean: distclean-noinstLIBRARIES distclean-compile distclean-tags \
71.6671 +- distclean-generic clean
71.6672 +- -rm -f config.status
71.6673 ++clean: clean-am
71.6674 +
71.6675 +-maintainer-clean: maintainer-clean-noinstLIBRARIES \
71.6676 ++distclean-am: distclean-noinstLIBRARIES distclean-compile \
71.6677 ++ distclean-tags distclean-generic clean-am
71.6678 ++
71.6679 ++distclean: distclean-am
71.6680 ++
71.6681 ++maintainer-clean-am: maintainer-clean-noinstLIBRARIES \
71.6682 + maintainer-clean-compile maintainer-clean-tags \
71.6683 +- maintainer-clean-generic distclean
71.6684 ++ maintainer-clean-generic distclean-am
71.6685 + @echo "This command is intended for maintainers to use;"
71.6686 + @echo "it deletes files that may require special tools to rebuild."
71.6687 +
71.6688 ++maintainer-clean: maintainer-clean-am
71.6689 ++
71.6690 + .PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \
71.6691 + clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
71.6692 + mostlyclean-compile distclean-compile clean-compile \
71.6693 + maintainer-clean-compile tags mostlyclean-tags distclean-tags \
71.6694 +-clean-tags maintainer-clean-tags distdir info dvi installcheck \
71.6695 +-install-info install-exec install-data install uninstall all \
71.6696 +-installdirs mostlyclean-generic distclean-generic clean-generic \
71.6697 ++clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \
71.6698 ++check-am installcheck-am installcheck install-info-am install-info \
71.6699 ++install-exec-am install-exec install-data-am install-data install-am \
71.6700 ++install uninstall-am uninstall all-redirect all-am all installdirs \
71.6701 ++mostlyclean-generic distclean-generic clean-generic \
71.6702 + maintainer-clean-generic clean mostlyclean distclean maintainer-clean
71.6703 +
71.6704 +
72.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
72.2 +++ b/test/lxdream.rc Tue Jul 11 01:35:27 2006 +0000
72.3 @@ -0,0 +1,25 @@
72.4 +[Global]
72.5 +bios = ../bios/dcboot.rom
72.6 +flash = ../bios/dcflash.rom
72.7 +default path = ../disc
72.8 +save path = ../save
72.9 +bootstrap =
72.10 +
72.11 +[Controllers]
72.12 +Device 0 = Sega Controller
72.13 + dpad left = Left
72.14 + dpad right = Right
72.15 + dpad up = Up
72.16 + dpad down = Down
72.17 + Start = KP_Enter
72.18 + analog left = KP_Left
72.19 + analog right = KP_Right
72.20 + analog up = KP_Up
72.21 + analog down = KP_Down
72.22 + button X = A
72.23 + button Y = S
72.24 + button A = Z
72.25 + button B = X
72.26 + trigger left = D
72.27 + trigger right = C
72.28 +
73.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
73.2 +++ b/test/math.s Tue Jul 11 01:35:27 2006 +0000
73.3 @@ -0,0 +1,142 @@
73.4 +#
73.5 +# Assembler functions to invoke the non-standard FP operations
73.6 +#
73.7 +.global _clear_fpscr
73.8 +_clear_fpscr:
73.9 + xor r0, r0
73.10 + lds r0, fpscr
73.11 + rts
73.12 + nop
73.13 +
73.14 +.global _get_fpscr
73.15 +_get_fpscr:
73.16 + rts
73.17 + sts fpscr, r0
73.18 +
73.19 +.global _set_fpscr
73.20 +_set_fpscr:
73.21 + rts
73.22 + lds r4, fpscr
73.23 +
73.24 +.global _do_fsca
73.25 +_do_fsca:
73.26 + sts fpscr, r0
73.27 + mov #0x08, r1
73.28 + shll16 r1
73.29 + not r1, r1
73.30 + and r0, r1
73.31 + lds r1, fpscr
73.32 + lds r4, fpul
73.33 + .word 0xF0FD
73.34 + fmov fr0, @r5
73.35 + fmov fr1, @r6
73.36 + xor r0,r0
73.37 + rts
73.38 + lds r1, fpscr
73.39 +
73.40 +.global _do_fsrra
73.41 +_do_fsrra:
73.42 + sts fpscr, r0
73.43 + mov #0x08, r1
73.44 + shll16 r1
73.45 + not r1, r1
73.46 + and r0, r1
73.47 + lds r1, fpscr
73.48 + fmov fr4, fr0
73.49 + .word 0xF07D
73.50 + rts
73.51 + lds r0, fpscr
73.52 +
73.53 +.global _do_fipr
73.54 +_do_fipr:
73.55 + sts fpscr, r0
73.56 + mov #0x08, r1
73.57 + shll16 r1
73.58 + not r1, r1
73.59 + and r0, r1
73.60 + lds r1, fpscr
73.61 + fmov.s @r4+, fr0
73.62 + fmov.s @r4+, fr1
73.63 + fmov.s @r4+, fr2
73.64 + fmov.s @r4+, fr3
73.65 + fmov.s @r5+, fr4
73.66 + fmov.s @r5+, fr5
73.67 + fmov.s @r5+, fr6
73.68 + fmov.s @r5+, fr7
73.69 + fipr fv0, fv4
73.70 + lds r0, fpscr
73.71 + rts
73.72 + fmov fr7, fr0
73.73 +
73.74 +.global _do_fipr2
73.75 +_do_fipr2:
73.76 + sts fpscr, r0
73.77 + mov #0x08, r1
73.78 + shll16 r1
73.79 + not r1, r1
73.80 + and r0, r1
73.81 + lds r1, fpscr
73.82 + fschg
73.83 + fmov @r4+, dr0
73.84 + fmov @r4+, dr2
73.85 + fmov @r5+, dr4
73.86 + fmov @r5+, dr6
73.87 + fschg
73.88 + fipr fv0, fv4
73.89 + lds r0, fpscr
73.90 + rts
73.91 + fmov fr7, fr0
73.92 +
73.93 +.global _do_ftrv
73.94 +_do_ftrv:
73.95 + sts fpscr, r0
73.96 + mov #0x08, r1
73.97 + shll16 r1
73.98 + not r1, r1
73.99 + and r0, r1
73.100 + lds r1, fpscr
73.101 + fschg
73.102 + fmov @r4+, xd0
73.103 + fmov @r4+, xd2
73.104 + fmov @r4+, xd4
73.105 + fmov @r4+, xd6
73.106 + fmov @r4+, xd8
73.107 + fmov @r4+, xd10
73.108 + fmov @r4+, xd12
73.109 + fmov @r4, xd14
73.110 + fmov @r5+, dr0
73.111 + fmov @r5, dr2
73.112 + ftrv xmtrx, fv0
73.113 + fmov dr2, @r5
73.114 + fmov dr0, @-r5
73.115 + fschg
73.116 + rts
73.117 + lds r0, fpscr
73.118 +
73.119 +.global _do_ftrv2
73.120 +_do_ftrv2:
73.121 + sts fpscr, r0
73.122 + mov #0x08, r1
73.123 + shll16 r1
73.124 + not r1, r1
73.125 + and r0, r1
73.126 + lds r1, fpscr
73.127 + fschg
73.128 + frchg
73.129 + fmov @r4+, dr0
73.130 + fmov @r4+, dr2
73.131 + fmov @r4+, dr4
73.132 + fmov @r4+, dr6
73.133 + fmov @r4+, dr8
73.134 + fmov @r4+, dr10
73.135 + fmov @r4+, dr12
73.136 + fmov @r4+, dr14
73.137 + frchg
73.138 + fmov @r5+, dr0
73.139 + fmov @r5, dr2
73.140 + ftrv xmtrx, fv0
73.141 + fmov dr2, @-r5
73.142 + fmov dr0, @-r5
73.143 + fschg
73.144 + rts
73.145 + lds r0, fpscr
74.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
74.2 +++ b/test/pvr.c Tue Jul 11 01:35:27 2006 +0000
74.3 @@ -0,0 +1,319 @@
74.4 +/**
74.5 + * $Id: pvr.c,v 1.1 2006-07-11 01:35:23 nkeynes Exp $
74.6 + *
74.7 + * PVR support code
74.8 + *
74.9 + * Copyright (c) 2006 Nathan Keynes.
74.10 + *
74.11 + * This program is free software; you can redistribute it and/or modify
74.12 + * it under the terms of the GNU General Public License as published by
74.13 + * the Free Software Foundation; either version 2 of the License, or
74.14 + * (at your option) any later version.
74.15 + *
74.16 + * This program is distributed in the hope that it will be useful,
74.17 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
74.18 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
74.19 + * GNU General Public License for more details.
74.20 + */
74.21 +
74.22 +#include "lib.h"
74.23 +#include "pvr.h"
74.24 +
74.25 +#define PVR_BASE 0xA05F8000
74.26 +#define PVR_RESET (PVR_BASE+0x008)
74.27 +#define TA_INIT (PVR_BASE+0x144)
74.28 +#define TA_TILESTART (PVR_BASE+0x124)
74.29 +#define TA_OBJSTART (PVR_BASE+0x128)
74.30 +#define TA_TILEEND (PVR_BASE+0x12C)
74.31 +#define TA_OBJEND (PVR_BASE+0x130)
74.32 +#define TA_TILEPOSN (PVR_BASE+0x134)
74.33 +#define TA_OBJPOSN (PVR_BASE+0x138)
74.34 +#define TA_SIZE (PVR_BASE+0x13C)
74.35 +#define TA_TILECFG (PVR_BASE+0x140)
74.36 +#define TA_PLISTSTART (PVR_BASE+0x164)
74.37 +
74.38 +
74.39 +
74.40 +void ta_init( unsigned int hres, unsigned int vres,
74.41 + unsigned int polybuf, unsigned int polybuflen,
74.42 + unsigned int tilebuf, unsigned int tilebuflen )
74.43 +{
74.44 + unsigned int hsegs = ((hres+31) / 32)-1;
74.45 + unsigned int vsegs = ((vres+31) / 32)-1;
74.46 + unsigned int size = (vsegs<<16)|hsegs;
74.47 +
74.48 + fprintf(stderr, "Setting tilemap: %08X\n", size);
74.49 +
74.50 + long_write( PVR_RESET, 1 );
74.51 + long_write( PVR_RESET, 0 );
74.52 +
74.53 + long_write( TA_SIZE, size );
74.54 + long_write( TA_OBJSTART, polybuf & 0x00FFFFFF );
74.55 + long_write( TA_OBJEND, (polybuf + polybuflen) & 0x00FFFFFF );
74.56 + long_write( TA_TILESTART, (tilebuf + tilebuflen) & 0x00FFFFFF );
74.57 + long_write( TA_TILEEND, tilebuf & 0x00FFFFFF );
74.58 + long_write( TA_PLISTSTART, (tilebuf + tilebuflen) & 0x00FFFFFF );
74.59 + long_write( TA_TILECFG, 0x00100002 );
74.60 + long_write( TA_INIT, 0x80000000 );
74.61 +}
74.62 +
74.63 +void ta_dump_regs( FILE *f )
74.64 +{
74.65 + fprintf( stderr, "TA Object start[128]: %08X posn[138]: %08X end[130]: %08X\n",
74.66 + long_read(TA_OBJSTART), long_read(TA_OBJPOSN), long_read(TA_OBJEND) );
74.67 + fprintf( stderr, "TA OPB start[124]: %08X posn[134]: %08X end[12c]: %08X init: %08X\n",
74.68 + long_read(TA_TILESTART), long_read(TA_TILEPOSN), long_read(TA_TILEEND),
74.69 + long_read(TA_PLISTSTART) );
74.70 + fprintf( stderr, "TA Tilesize: %08X config: %08X\n", long_read(TA_SIZE), long_read(TA_TILECFG) );
74.71 +}
74.72 +
74.73 +int pvr_get_objbuf_size( )
74.74 +{
74.75 + return long_read( TA_OBJPOSN ) - long_read( TA_OBJSTART );
74.76 +}
74.77 +
74.78 +void pvr_dump_objbuf( FILE *f )
74.79 +{
74.80 + unsigned int start = long_read( TA_OBJSTART );
74.81 + unsigned int posn = long_read( TA_OBJPOSN );
74.82 + unsigned int end = long_read( TA_OBJEND );
74.83 + char *buf;
74.84 + unsigned int length;
74.85 + if( start < posn ) {
74.86 + buf = (char *)(0xA5000000+start);
74.87 + length = posn-start;
74.88 + } else {
74.89 + buf = (char *)(0xA5000000+end);
74.90 + length = start-posn;
74.91 + }
74.92 +
74.93 + fprintf( f, "Obj buffer: %08X - %08X - %08X\n", start, posn, end );
74.94 + fwrite_dump( f, buf, length );
74.95 +}
74.96 +
74.97 +void pvr_dump_tilebuf( FILE *f )
74.98 +{
74.99 + unsigned int start = long_read( TA_TILESTART );
74.100 + unsigned int posn = long_read( TA_TILEPOSN );
74.101 + unsigned int end = long_read( TA_TILEEND );
74.102 + char *buf;
74.103 + unsigned int length;
74.104 + if( start < posn ) {
74.105 + buf = (char *)(0xA5000000+start);
74.106 + length = posn-start;
74.107 + } else {
74.108 + buf = (char *)(0xA5000000+end);
74.109 + length = start-posn;
74.110 + }
74.111 +
74.112 + fprintf( f, "Tile buffer: %08X - %08X - %08X\n", start, posn, end );
74.113 + fwrite_dump( f, buf, length );
74.114 +}
74.115 +
74.116 +/************** Stolen from TATEST *************/
74.117 +
74.118 +static unsigned int three_d_params[] = {
74.119 + 0x80a8, 0x15d1c951, /* M (Unknown magic value) */
74.120 + 0x80a0, 0x00000020, /* M */
74.121 + 0x8008, 0x00000000, /* TA out of reset */
74.122 + 0x8048, 0x00000009, /* alpha config */
74.123 + 0x8068, 0x02800000, /* pixel clipping x */
74.124 + 0x806c, 0x01e00000, /* pixel clipping y */
74.125 + 0x8110, 0x00093f39, /* M */
74.126 + 0x8098, 0x00800408, /* M */
74.127 + 0x804c, 0x000000a0, /* display align (640*2)/8 */
74.128 + 0x8078, 0x3f800000, /* polygon culling (1.0f) */
74.129 + 0x8084, 0x00000000, /* M */
74.130 + 0x8030, 0x00000101, /* M */
74.131 + 0x80b0, 0x007f7f7f, /* Fog table color */
74.132 + 0x80b4, 0x007f7f7f, /* Fog vertex color */
74.133 + 0x80c0, 0x00000000, /* color clamp min */
74.134 + 0x80bc, 0xffffffff, /* color clamp max */
74.135 + 0x8080, 0x00000007, /* M */
74.136 + 0x8074, 0x00000001, /* cheap shadow */
74.137 + 0x807c, 0x0027df77, /* M */
74.138 + 0x8008, 0x00000001, /* TA reset */
74.139 + 0x8008, 0x00000000, /* TA out of reset */
74.140 + 0x80e4, 0x00000000, /* stride width */
74.141 + 0x6884, 0x00000000, /* Disable all interrupt events */
74.142 + 0x6930, 0x00000000,
74.143 + 0x6938, 0x00000000,
74.144 + 0x6900, 0xffffffff, /* Clear all pending int events */
74.145 + 0x6908, 0xffffffff,
74.146 + 0x6930, 0x002807ec, /* Re-enable some events */
74.147 + 0x6938, 0x0000000e,
74.148 + 0x80b8, 0x0000ff07, /* fog density */
74.149 + 0x80b4, 0x007f7f7f, /* fog vertex color */
74.150 + 0x80b0, 0x007f7f7f, /* fog table color */
74.151 + 0x8108, 0x00000003 /* 32bit palette */
74.152 +};
74.153 +
74.154 +static unsigned int scrn_params[] = {
74.155 + 0x80e8, 0x00160000, /* screen control */
74.156 + 0x8044, 0x00800000, /* pixel mode (vb+0x11) */
74.157 + 0x805c, 0x00000000, /* Size modulo and display lines (vb+0x17) */
74.158 + 0x80d0, 0x00000100, /* interlace flags */
74.159 + 0x80d8, 0x020c0359, /* M */
74.160 + 0x80cc, 0x001501fe, /* M */
74.161 + 0x80d4, 0x007e0345, /* horizontal border */
74.162 + 0x80dc, 0x00240204, /* vertical position */
74.163 + 0x80e0, 0x07d6c63f, /* sync control */
74.164 + 0x80ec, 0x000000a4, /* horizontal position */
74.165 + 0x80f0, 0x00120012, /* vertical border */
74.166 + 0x80c8, 0x03450000, /* set to same as border H in 80d4 */
74.167 + 0x8068, 0x027f0000, /* (X resolution - 1) << 16 */
74.168 + 0x806c, 0x01df0000, /* (Y resolution - 1) << 16 */
74.169 + 0x804c, 0x000000a0, /* display align */
74.170 + 0x8118, 0x00008040, /* M */
74.171 + 0x80f4, 0x00000401, /* anti-aliasing */
74.172 + 0x8048, 0x00000009, /* alpha config */
74.173 + 0x7814, 0x00000000, /* More interrupt control stuff (so it seems)*/
74.174 + 0x7834, 0x00000000,
74.175 + 0x7854, 0x00000000,
74.176 + 0x7874, 0x00000000,
74.177 + 0x78bc, 0x4659404f,
74.178 + 0x8040, 0x00000000 /* border color */
74.179 +};
74.180 +
74.181 +static void set_regs(unsigned int *values, int cnt)
74.182 +{
74.183 + volatile unsigned char *regs = (volatile unsigned char *)(void *)0xa05f0000;
74.184 + unsigned int r, v;
74.185 +
74.186 + while(cnt--) {
74.187 + r = *values++;
74.188 + v = *values++;
74.189 + *(volatile unsigned int *)(regs+r) = v;
74.190 + }
74.191 +}
74.192 +
74.193 +int pvr_check_cable()
74.194 +{
74.195 + volatile unsigned int *porta = (unsigned int *)0xff80002c;
74.196 +
74.197 + /* PORT8 and PORT9 is input */
74.198 + *porta = (*porta & ~0xf0000) | 0xa0000;
74.199 +
74.200 + /* Return PORT8 and PORT9 */
74.201 + return ((*(volatile unsigned short *)(porta+1))>>8)&3;
74.202 +}
74.203 +void pvr_init_video(int cabletype, int mode, int res)
74.204 +{
74.205 + volatile unsigned int *videobase=(volatile unsigned int *)(void*)0xa05f8000;
74.206 + static int bppshifttab[]= { 1,1,0,2 };
74.207 + int shift, lines, modulo, words_per_line, vpos;
74.208 + int laceoffset=0, voffset=0;
74.209 + unsigned int videoflags, attribs;
74.210 + unsigned int hvcounter = (res<2? 0x01060359 : 0x020c0359);
74.211 +
74.212 + mode &= 3;
74.213 + shift = bppshifttab[mode];
74.214 +
74.215 + videobase[8/4]=0;
74.216 + videobase[0x40/4]=0;
74.217 +
74.218 + /* Select pixel clock and colour mode */
74.219 + mode = (mode<<2)|1;
74.220 + lines = 240;
74.221 + if(!(cabletype&2)) {
74.222 +
74.223 + /* VGA mode */
74.224 +
74.225 + if(res < 2)
74.226 + mode |= 2; /* doublescan */
74.227 +
74.228 + hvcounter = 0x020c0359;
74.229 +
74.230 + lines <<= 1;
74.231 + mode |= 0x800000; /* fast pixel clock */
74.232 + }
74.233 + videobase[0x44/4]=mode;
74.234 +
74.235 + /* Set video base address. Short fields will be offset by
74.236 + 640 pixels, regardless of horizontal resolution. */
74.237 + videobase[0x50/4]=0;
74.238 + videobase[0x54/4]=640<<shift;
74.239 +
74.240 + /* Set screen size, modulo, and interlace flag */
74.241 + videoflags = 1<<8;
74.242 + if(res==0)
74.243 + words_per_line=(320/4)<<shift;
74.244 + else
74.245 + words_per_line=(640/4)<<shift;
74.246 + modulo = 1;
74.247 +
74.248 + if(!(cabletype&2))
74.249 + {
74.250 + if(res==0)
74.251 + /* VGA lores -> skip 320 pixels to keep modulo at 640 pixels */
74.252 + modulo += words_per_line;
74.253 + } else {
74.254 + if(res!=1)
74.255 + /* NTSC lores -> skip 320 pixels to keep modulo at 640 pixels */
74.256 + /* _or_ NTSC hires -> skip every other line due to interlace */
74.257 + modulo += words_per_line;
74.258 +
74.259 + if(res==2)
74.260 + /* interlace mode */
74.261 + videoflags |= 1<<4;
74.262 +
74.263 + /* enable NTSC */
74.264 + videoflags |= 1<<6;
74.265 + }
74.266 +
74.267 + /* Write screen size and modulo */
74.268 + videobase[0x5c/4]=(((modulo<<10)+lines-1)<<10)+words_per_line-1;
74.269 +
74.270 + /* Enable video (lace, NTSC) */
74.271 + videobase[0xd0/4]=videoflags;
74.272 +
74.273 + /* Screen and border position */
74.274 +
74.275 + if(!(cabletype&2))
74.276 + /* VGA */
74.277 + voffset += 36;
74.278 + else
74.279 + voffset += 18;
74.280 +
74.281 + vpos=(voffset<<16)|(voffset+laceoffset);
74.282 +
74.283 + videobase[0xf0/4]=vpos; /* V start */
74.284 + videobase[0xdc/4]=vpos+lines; /* start and end border */
74.285 + videobase[0xec/4]=0xa4; /* Horizontal pos */
74.286 + videobase[0xd8/4]=hvcounter; /* HV counter */
74.287 + videobase[0xd4/4]=0x007e0345; /* Horizontal border */
74.288 +
74.289 + /* Select horizontal pixel doubling for lowres */
74.290 + if(res==0)
74.291 + attribs=((22<<8)+1)<<8;
74.292 + else
74.293 + attribs=22<<16;
74.294 + videobase[0xe8/4]=attribs;
74.295 +
74.296 + /* Set up vertical blank event */
74.297 + vpos = 260;
74.298 + if(!(cabletype&2))
74.299 + vpos = 510;
74.300 + videobase[0xcc/4]=(0x21<<16)|vpos;
74.301 +
74.302 + /* Select RGB/CVBS */
74.303 + if(cabletype&1)
74.304 + mode = 3;
74.305 + else
74.306 + mode = 0;
74.307 + *(volatile unsigned int *)(void*)0xa0702c00 = mode << 8;
74.308 +
74.309 + return;
74.310 +}
74.311 +
74.312 +void pvr_init()
74.313 +{
74.314 + volatile unsigned int *vbl = (volatile unsigned int *)(void *)0xa05f810c;
74.315 +
74.316 + set_regs(three_d_params, sizeof(three_d_params)/sizeof(three_d_params[0])/2);
74.317 + while (!(*vbl & 0x01ff));
74.318 + while (*vbl & 0x01ff);
74.319 + set_regs(scrn_params, sizeof(scrn_params)/sizeof(scrn_params[0])/2);
74.320 + pvr_init_video(pvr_check_cable(), 1, 2);
74.321 +}
74.322 +
75.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
75.2 +++ b/test/pvr.h Tue Jul 11 01:35:27 2006 +0000
75.3 @@ -0,0 +1,143 @@
75.4 +/**
75.5 + * $Id: pvr.h,v 1.1 2006-07-11 01:35:23 nkeynes Exp $
75.6 + *
75.7 + * PVR support code
75.8 + *
75.9 + * Copyright (c) 2006 Nathan Keynes.
75.10 + *
75.11 + * This program is free software; you can redistribute it and/or modify
75.12 + * it under the terms of the GNU General Public License as published by
75.13 + * the Free Software Foundation; either version 2 of the License, or
75.14 + * (at your option) any later version.
75.15 + *
75.16 + * This program is distributed in the hope that it will be useful,
75.17 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
75.18 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
75.19 + * GNU General Public License for more details.
75.20 + */
75.21 +
75.22 +#define PVR_VRAM_BASE 0xA5000000
75.23 +#define PVR_VRAM64_BASE 0xA4000000
75.24 +
75.25 +
75.26 +#define TA_PIXFMT_RGB555 0
75.27 +#define TA_PIXFMT_RGB565 1
75.28 +#define TA_PIXFMT_ARGB4444 2
75.29 +#define TA_PIXFMT_ARGB1555 3
75.30 +#define TA_PIXFMT_RGB888 5
75.31 +#define TA_PIXFMT_ARGB8888 6
75.32 +#define TA_PIXFMT_DITHER 8
75.33 +
75.34 +#define TA_CMD_POLYGON 0x80000000
75.35 +#define TA_CMD_MODIFIER 0x80000000
75.36 +#define TA_CMD_POLYGON_TYPE_OPAQUE (0<<24)
75.37 +#define TA_CMD_MODIFIER_TYPE_OPAQUE (1<<24)
75.38 +#define TA_CMD_POLYGON_TYPE_TRANSPARENT (2<<24)
75.39 +#define TA_CMD_MODIFIER_TYPE_TRANSPARENT (3<<24)
75.40 +#define TA_CMD_POLYGON_TYPE_PUNCHTHRU (4<<24)
75.41 +#define TA_CMD_POLYGON_SUBLIST 0x00800000
75.42 +#define TA_CMD_POLYGON_STRIPLENGTH_1 (0<<18)
75.43 +#define TA_CMD_POLYGON_STRIPLENGTH_2 (1<<18)
75.44 +#define TA_CMD_POLYGON_STRIPLENGTH_4 (2<<18)
75.45 +#define TA_CMD_POLYGON_STRIPLENGTH_6 (3<<18)
75.46 +#define TA_CMD_POLYGON_USER_CLIP_INSIDE 0x00020000
75.47 +#define TA_CMD_POLYGON_USER_CLIP_OUTSIDE 0x00030000
75.48 +#define TA_CMD_POLYGON_AFFECTED_BY_MODIFIER 0x00000080
75.49 +#define TA_CMD_POLYGON_CHEAP_SHADOW_MODIFIER 0x00000000
75.50 +#define TA_CMD_POLYGON_NORMAL_MODIFIER 0x00000040
75.51 +#define TA_CMD_POLYGON_PACKED_COLOUR (0<<4)
75.52 +#define TA_CMD_POLYGON_FLOAT_COLOUR (1<<4)
75.53 +#define TA_CMD_POLYGON_INTENSITY (2<<4)
75.54 +#define TA_CMD_POLYGON_PREVFACE_INTENSITY (3<<4)
75.55 +#define TA_CMD_POLYGON_TEXTURED 0x00000008
75.56 +#define TA_CMD_POLYGON_SPECULAR_HIGHLIGHT 0x00000004
75.57 +#define TA_CMD_POLYGON_GOURAUD_SHADING 0x00000002
75.58 +#define TA_CMD_POLYGON_16BIT_UV 0x00000001
75.59 +
75.60 +#define TA_POLYMODE1_Z_NEVER (0<<29)
75.61 +#define TA_POLYMODE1_Z_LESS (1<<29)
75.62 +#define TA_POLYMODE1_Z_EQUAL (2<<29)
75.63 +#define TA_POLYMODE1_Z_LESSEQUAL (3<<29)
75.64 +#define TA_POLYMODE1_Z_GREATER (4<<29)
75.65 +#define TA_POLYMODE1_Z_NOTEQUAL (5<<29)
75.66 +#define TA_POLYMODE1_Z_GREATEREQUAL (6<<29)
75.67 +#define TA_POLYMODE1_Z_ALWAYS (7<<29)
75.68 +#define TA_POLYMODE1_CULL_SMALL (1<<27)
75.69 +#define TA_POLYMODE1_CULL_CCW (2<<27)
75.70 +#define TA_POLYMODE1_CULL_CW (3<<27)
75.71 +#define TA_POLYMODE1_NO_Z_UPDATE 0x04000000
75.72 +
75.73 +#define TA_POLYMODE2_BLEND_DEFAULT (0x20<<24)
75.74 +#define TA_POLYMODE2_FOG_TABLE (0<<22)
75.75 +#define TA_POLYMODE2_FOG_VERTEX (1<<22)
75.76 +#define TA_POLYMODE2_FOG_DISABLED (2<<22)
75.77 +#define TA_POLYMODE2_FOG_TABLE2 (3<<22)
75.78 +#define TA_POLYMODE2_CLAMP_COLOURS 0x00200000
75.79 +#define TA_POLYMODE2_ENABLE_ALPHA 0x00100000
75.80 +#define TA_POLYMODE2_DISABLE_TEXTURE_TRANSPARENCY 0x00080000
75.81 +#define TA_POLYMODE2_TEXTURE_FLIP_U 0x00080000
75.82 +#define TA_POLYMODE2_TEXTURE_FLIP_V 0x00040000
75.83 +#define TA_POLYMODE2_TEXTURE_CLAMP_U 0x00020000
75.84 +#define TA_POLYMODE2_TEXTURE_CLAMP_V 0x00010000
75.85 +#define TA_POLYMODE2_TRILINEAR_FILTER 0x00004000
75.86 +#define TA_POLYMODE2_BILINEAR_FILTER 0x00002000
75.87 +
75.88 +#define TA_POLYMODE2_MIPMAP_D_0_25 (1<<8)
75.89 +#define TA_POLYMODE2_MIPMAP_D_0_50 (2<<8)
75.90 +#define TA_POLYMODE2_MIPMAP_D_0_75 (3<<8)
75.91 +#define TA_POLYMODE2_MIPMAP_D_1_00 (4<<8)
75.92 +#define TA_POLYMODE2_MIPMAP_D_1_25 (5<<8)
75.93 +#define TA_POLYMODE2_MIPMAP_D_1_50 (6<<8)
75.94 +#define TA_POLYMODE2_MIPMAP_D_1_75 (7<<8)
75.95 +#define TA_POLYMODE2_MIPMAP_D_2_00 (8<<8)
75.96 +#define TA_POLYMODE2_MIPMAP_D_2_25 (9<<8)
75.97 +#define TA_POLYMODE2_MIPMAP_D_2_50 (10<<8)
75.98 +#define TA_POLYMODE2_MIPMAP_D_2_75 (11<<8)
75.99 +#define TA_POLYMODE2_MIPMAP_D_3_00 (12<<8)
75.100 +#define TA_POLYMODE2_MIPMAP_D_3_25 (13<<8)
75.101 +#define TA_POLYMODE2_MIPMAP_D_3_50 (14<<8)
75.102 +#define TA_POLYMODE2_MIPMAP_D_3_75 (15<<8)
75.103 +#define TA_POLYMODE2_TEXTURE_REPLACE (0<<6)
75.104 +#define TA_POLYMODE2_TEXTURE_MODULATE (1<<6)
75.105 +#define TA_POLYMODE2_TEXTURE_DECAL (2<<6)
75.106 +#define TA_POLYMODE2_U_SIZE_8 (0<<3)
75.107 +#define TA_POLYMODE2_U_SIZE_16 (1<<3)
75.108 +#define TA_POLYMODE2_U_SIZE_32 (2<<3)
75.109 +#define TA_POLYMODE2_U_SIZE_64 (3<<3)
75.110 +#define TA_POLYMODE2_U_SIZE_128 (4<<3)
75.111 +#define TA_POLYMODE2_U_SIZE_256 (5<<3)
75.112 +#define TA_POLYMODE2_U_SIZE_512 (6<<3)
75.113 +#define TA_POLYMODE2_U_SIZE_1024 (7<<3)
75.114 +#define TA_POLYMODE2_V_SIZE_8 (0<<0)
75.115 +#define TA_POLYMODE2_V_SIZE_16 (1<<0)
75.116 +#define TA_POLYMODE2_V_SIZE_32 (2<<0)
75.117 +#define TA_POLYMODE2_V_SIZE_64 (3<<0)
75.118 +#define TA_POLYMODE2_V_SIZE_128 (4<<0)
75.119 +#define TA_POLYMODE2_V_SIZE_256 (5<<0)
75.120 +#define TA_POLYMODE2_V_SIZE_512 (6<<0)
75.121 +#define TA_POLYMODE2_V_SIZE_1024 (7<<0)
75.122 +#define TA_TEXTUREMODE_MIPMAP 0x80000000
75.123 +#define TA_TEXTUREMODE_VQ_COMPRESSION 0x40000000
75.124 +#define TA_TEXTUREMODE_ARGB1555 (0<<27)
75.125 +#define TA_TEXTUREMODE_RGB565 (1<<27)
75.126 +#define TA_TEXTUREMODE_ARGB4444 (2<<27)
75.127 +#define TA_TEXTUREMODE_YUV422 (3<<27)
75.128 +#define TA_TEXTUREMODE_BUMPMAP (4<<27)
75.129 +#define TA_TEXTUREMODE_CLUT4 (5<<27)
75.130 +#define TA_TEXTUREMODE_CLUT8 (6<<27)
75.131 +#define TA_TEXTUREMODE_CLUTBANK8(n) ((n)<<25) /* 0-3 */
75.132 +#define TA_TEXTUREMODE_CLUTBANK4(n) ((n)<<21) /* 0-63 */
75.133 +#define TA_TEXTUREMODE_TWIDDLED 0x00000000
75.134 +#define TA_TEXTUREMODE_NON_TWIDDLED 0x04000000
75.135 +#define TA_TEXTUREMODE_ADDRESS(a) ((((unsigned long)(void*)(a))&0x7fffff)>>3)
75.136 +#define TA_CMD_VERTEX 0xe0000000
75.137 +#define TA_CMD_VERTEX_LAST 0xF0000000 /* end of strip */
75.138 +
75.139 +
75.140 +void ta_init( unsigned int hres, unsigned int vres,
75.141 + unsigned int polybuf, unsigned int polybuflen,
75.142 + unsigned int tilebuf, unsigned int tilebuflen );
75.143 +
75.144 +void pvr_dump_objbuf( FILE *f );
75.145 +void pvr_dump_tilebuf( FILE *f );
75.146 +int pvr_get_objbuf_size();
76.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
76.2 +++ b/test/testdata.c Tue Jul 11 01:35:27 2006 +0000
76.3 @@ -0,0 +1,189 @@
76.4 +/**
76.5 + * $Id: testdata.c,v 1.1 2006-07-11 01:35:23 nkeynes Exp $
76.6 + *
76.7 + * Test data loader.
76.8 + *
76.9 + * Copyright (c) 2006 Nathan Keynes.
76.10 + *
76.11 + * This program is free software; you can redistribute it and/or modify
76.12 + * it under the terms of the GNU General Public License as published by
76.13 + * the Free Software Foundation; either version 2 of the License, or
76.14 + * (at your option) any later version.
76.15 + *
76.16 + * This program is distributed in the hope that it will be useful,
76.17 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
76.18 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
76.19 + * GNU General Public License for more details.
76.20 + */
76.21 +
76.22 +#include <stdlib.h>
76.23 +#include <string.h>
76.24 +#include <ctype.h>
76.25 +#include <math.h>
76.26 +#include "testdata.h"
76.27 +
76.28 +#define DEFAULT_SIZE 1024
76.29 +
76.30 +/* get the next 32-byte aligned address that is no less than x */
76.31 +#define ALIGN_32(x) ((char *)((((unsigned int)(x))+0x1F)&0xFFFFFFE0))
76.32 +
76.33 +void free_test_dataset( test_data_t tests )
76.34 +{
76.35 + test_data_t next;
76.36 +
76.37 + do {
76.38 + next = tests->next;
76.39 + free(tests);
76.40 + tests = next;
76.41 + } while( next != NULL );
76.42 +}
76.43 +
76.44 +test_data_block_t get_test_data( test_data_t data, char *name )
76.45 +{
76.46 + int i;
76.47 + for( i=0; i<MAX_DATA_BLOCKS; i++ ) {
76.48 + if( data->item[i].name != NULL &&
76.49 + strcmp(name, data->item[i].name) == 0 ) {
76.50 + return &data->item[i];
76.51 + }
76.52 + }
76.53 + return NULL;
76.54 +}
76.55 +
76.56 +void dump_test_dataset( FILE *f, test_data_t dataset )
76.57 +{
76.58 + test_data_t test = dataset;
76.59 + int i;
76.60 + while( test != NULL ) {
76.61 + fprintf( f, "Test: %s\n", test->test_name );
76.62 + for( i=0; i<MAX_DATA_BLOCKS; i++ ) {
76.63 + if( test->item[i].name != NULL ) {
76.64 + fprintf( f, "Block: %s, %d bytes\n", test->item[i].name, test->item[i].length );
76.65 + fwrite_dump( f, test->item[i].data, test->item[i].length );
76.66 + }
76.67 + }
76.68 + test = test->next;
76.69 + }
76.70 +}
76.71 +
76.72 +int test_block_compare( test_data_block_t block, char *result, int result_length )
76.73 +{
76.74 + if( block->length != result_length )
76.75 + return -1;
76.76 + return memcmp( block->data, result, block->length );
76.77 +}
76.78 +
76.79 +
76.80 +/**
76.81 + * Load a batch of test data from the given IO stream.
76.82 + */
76.83 +test_data_t load_test_dataset( FILE *f )
76.84 +{
76.85 + test_data_t head = NULL;
76.86 + test_data_t current = NULL;
76.87 + test_data_t last = NULL;
76.88 + int current_size = 0;
76.89 + int current_block = -1;
76.90 + char *current_end = NULL;
76.91 + char *dataptr = NULL;
76.92 +
76.93 + char buf[512];
76.94 + char *line;
76.95 + while( fgets(buf, sizeof(buf), f ) != NULL ) {
76.96 + line = buf;
76.97 + while( isspace(*line) ) /* Trim leading whitespace */
76.98 + line++;
76.99 + if( line[0] == '[' ) { /* New test */
76.100 + char *test_name = line+1;
76.101 + char *end = strchr(test_name, ']');
76.102 + if( end != NULL )
76.103 + *end = '\0';
76.104 + current_size = DEFAULT_SIZE;
76.105 + test_data_t test = calloc(current_size, 1);
76.106 +
76.107 + dataptr = (char *)(test+1);
76.108 + test->next = NULL;
76.109 + if( head == NULL )
76.110 + head = test;
76.111 + if( current != NULL )
76.112 + current->next = test;
76.113 + last = current;
76.114 + current = test;
76.115 + current_end = ((char *)test) + current_size;
76.116 + current_block = -1;
76.117 + strcpy( dataptr, test_name );
76.118 + test->test_name = dataptr;
76.119 + dataptr = ALIGN_32(dataptr + strlen(test_name)+1);
76.120 + } else if( *line == '#' ) { /* Comment */
76.121 + } else {
76.122 + char *equals = strrchr( line, '=' );
76.123 + if( equals != NULL ) {
76.124 + char *block_name = line;
76.125 + int len;
76.126 + *equals-- = '\0';
76.127 + while( isspace(*equals) )
76.128 + *equals-- = '\0';
76.129 + len = strlen(line)+1;
76.130 + if( dataptr + len > current_end ) {
76.131 + current_end += current_size;
76.132 + current_size *= 2;
76.133 + current = realloc(current, current_size );
76.134 + if( last != NULL )
76.135 + last->next = current;
76.136 + }
76.137 + current_block++;
76.138 + strcpy( dataptr, block_name );
76.139 + current->item[current_block].name = dataptr;
76.140 + dataptr = ALIGN_32(dataptr+len);
76.141 + current->item[current_block].data = dataptr;
76.142 + current->item[current_block].length = 0;
76.143 + } else {
76.144 + /* Data */
76.145 + if( current == NULL || current_block == -1 )
76.146 + continue;
76.147 + char *p = strtok(line, "\t\r\n ");
76.148 + while( p != NULL ) {
76.149 + if( dataptr + 8 > current_end ) {
76.150 + current_end += current_size;
76.151 + current_size *= 2;
76.152 + current = realloc(current, current_size );
76.153 + if( last != NULL )
76.154 + last->next = current;
76.155 + }
76.156 + int len = strlen(p);
76.157 + int datalen = 0;
76.158 + char *dot = strchr(p, '.');
76.159 + if( dot != NULL ) { /* FP */
76.160 + if( p[len-1] == 'L' ) { /* Ending in L */
76.161 + p[len-1] = '\0';
76.162 + double d = strtod(p, NULL);
76.163 + *((double *)dataptr) = d;
76.164 + datalen = 8;
76.165 + } else {
76.166 + float f = (float)strtod(p,NULL);
76.167 + *((float *)dataptr) = f;
76.168 + datalen = 4;
76.169 + }
76.170 + } else {
76.171 + unsigned long value = strtoul(p, NULL, 16);
76.172 + if( len == 8 ) {
76.173 + *((unsigned int *)dataptr) = value;
76.174 + datalen = 4;
76.175 + } else if( len == 4 ) {
76.176 + *((unsigned short *)dataptr) = value;
76.177 + datalen = 2;
76.178 + } else if( len == 2 ) {
76.179 + *((unsigned char *)dataptr) = value;
76.180 + datalen = 1;
76.181 + }
76.182 + }
76.183 + dataptr += datalen;
76.184 + current->item[current_block].length += datalen;
76.185 + p = strtok(NULL, "\t\r\n ");
76.186 + }
76.187 + }
76.188 + }
76.189 + }
76.190 + fclose(f);
76.191 + return head;
76.192 +}
77.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
77.2 +++ b/test/testdata.h Tue Jul 11 01:35:27 2006 +0000
77.3 @@ -0,0 +1,40 @@
77.4 +/*
77.5 + * $Id: testdata.h,v 1.1 2006-07-11 01:35:23 nkeynes Exp $
77.6 + *
77.7 + * Test data loader
77.8 + *
77.9 + * Copyright (c) 2006 Nathan Keynes.
77.10 + *
77.11 + * This program is free software; you can redistribute it and/or modify
77.12 + * it under the terms of the GNU General Public License as published by
77.13 + * the Free Software Foundation; either version 2 of the License, or
77.14 + * (at your option) any later version.
77.15 + *
77.16 + * This program is distributed in the hope that it will be useful,
77.17 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
77.18 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
77.19 + * GNU General Public License for more details.
77.20 + */
77.21 +
77.22 +#include <stdio.h>
77.23 +
77.24 +#define MAX_DATA_BLOCKS 4
77.25 +
77.26 +typedef struct test_data_block {
77.27 + const char *name;
77.28 + unsigned int length;
77.29 + char *data;
77.30 +} *test_data_block_t;
77.31 +
77.32 +typedef struct test_data {
77.33 + const char *test_name;
77.34 + struct test_data *next;
77.35 + struct test_data_block item[MAX_DATA_BLOCKS];
77.36 +} *test_data_t;
77.37 +
77.38 +test_data_t load_test_dataset( FILE *f );
77.39 +void free_test_dataset( test_data_t dataset );
77.40 +void dump_test_dataset( FILE *f, test_data_t dataset );
77.41 +int test_block_compare( test_data_block_t expect, char *actual, int actual_length );
77.42 +test_data_block_t get_test_data( test_data_t dataset, char *item_name );
77.43 +
78.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
78.2 +++ b/test/testide.c Tue Jul 11 01:35:27 2006 +0000
78.3 @@ -0,0 +1,90 @@
78.4 +#include <assert.h>
78.5 +#include <ctype.h>
78.6 +#include "ide.h"
78.7 +void debug_dump_buffer(char *buf, int length)
78.8 +{
78.9 + int i,j;
78.10 + for( i=0; i<length; i+=16 ) {
78.11 + printf( "%08X: ", i );
78.12 + for( j=0; j<16 && i+j < length; j+=4 ) {
78.13 + unsigned int val = *((volatile unsigned int *)(buf+i+j));
78.14 + printf( "%02X %02X %02X %02X ", val&0xFF, (val>>8)&0xFF, (val>>16)&0xFF, (val>>24)&0xFF );
78.15 + }
78.16 + for( j=0; j<16 && i+j < length; j++ ) {
78.17 + printf( "%c", isprint(buf[i+j]) ? buf[i+j] : '.' );
78.18 + }
78.19 + printf("\n");
78.20 + }
78.21 +}
78.22 +
78.23 +void debug_dump_int_buffer(volatile char *buf, int length)
78.24 +{
78.25 + int i,j;
78.26 + for( i=0; i<length; i+=16 ) {
78.27 + printf( "%08X:", i );
78.28 + for( j=0; j<16 && i+j < length; j+=4 ) {
78.29 + printf( " %08X", *((volatile unsigned int *)(buf+i+j)) );
78.30 + }
78.31 + printf( "\n" );
78.32 + }
78.33 +}
78.34 +
78.35 +
78.36 +char buf[2048*7 + 32];
78.37 +
78.38 +int test_ide_read_bootstrap()
78.39 +{
78.40 + struct gdrom_session session;
78.41 + int length;
78.42 + char *p;
78.43 +
78.44 + ide_init();
78.45 +
78.46 + if( ide_test_ready() != 0 ) {
78.47 + printf( "ERROR - Test ready failed\n" );
78.48 + return -1;
78.49 + }
78.50 +
78.51 + if( ide_spinup() != 0 ) {
78.52 + printf( "ERROR - Spinup failed\n" );
78.53 + return -1;
78.54 + }
78.55 +
78.56 + /*
78.57 + length = ide_unknown71( buf, sizeof(buf) );
78.58 + if( length == -1 ) {
78.59 + printf( "ERROR - 0x71 failed\n" );
78.60 + ide_print_sense_error();
78.61 + return -1;
78.62 + }
78.63 + debug_dump_buffer(buf,length);
78.64 + */
78.65 + if( ide_get_session( 0, &session ) == -1 ) {
78.66 + printf( "ERROR - Get session(0) failed\n" );
78.67 + return -1;
78.68 + }
78.69 + if( ide_get_session( session.track, &session ) == -1 ) {
78.70 + printf( "ERROR - Get session(%d) failed\n", session.track );
78.71 + return -1;
78.72 + }
78.73 +
78.74 + p = (char *)((((unsigned int)buf) & 0xFFFFFFE0) + 0x20);
78.75 + printf( "--- DMA buffer: %08X\n", p );
78.76 + length = ide_read_sector_dma( session.lba, 2, 0x28, p, 2048*2 );
78.77 + if( length != 2048*2 ) {
78.78 + printf( "ERROR - Got incorrect read length, expected %d but was %d\n", 2048, length );
78.79 + return -1;
78.80 + }
78.81 + debug_dump_buffer( p, 2048*2 );
78.82 +
78.83 + return 0;
78.84 +}
78.85 +
78.86 +
78.87 +int main( int argc, char *argv[] )
78.88 +{
78.89 + ide_dump_registers();
78.90 + ide_spinup();
78.91 + ide_read_something();
78.92 +// test_ide_read_bootstrap();
78.93 +}
79.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
79.2 +++ b/test/testmath.c Tue Jul 11 01:35:27 2006 +0000
79.3 @@ -0,0 +1,159 @@
79.4 +#include <stdio.h>
79.5 +#include <assert.h>
79.6 +#include <math.h>
79.7 +
79.8 +#define write_string(x) printf(x)
79.9 +#define write_int(x) printf( "%08X", x )
79.10 +
79.11 +int do_fsca(int angle, float *a, float *b);
79.12 +float do_fsrra( float param );
79.13 +float do_fipr( float *vectora, float *vectorb );
79.14 +float do_fipr2( float *vectora, float *vectorb );
79.15 +void do_ftrv( float *matrix, float *vector );
79.16 +void do_ftrv2( float *matrix, float *vector );
79.17 +
79.18 +unsigned int get_fpscr();
79.19 +void set_fpscr( unsigned int fpscr );
79.20 +
79.21 +#define MAX_FLOAT_DIFF 0.00001
79.22 +
79.23 +
79.24 +int compare_float( float a, float b )
79.25 +{
79.26 + if( a == b )
79.27 + return 1;
79.28 + float diff = (a>b?(a-b):(b-a));
79.29 + return diff < MAX_FLOAT_DIFF;
79.30 +}
79.31 +
79.32 +#define TEST_FEQUALS( a, b ) if( !compare_float(a,b) ) { printf( "Assertion failed at %s.%d: expected %.8f but was %.8f\n", __FILE__, __LINE__, a, b ); return 1; }
79.33 +
79.34 +int test_fsca( int angle, float expect_a, float expect_b )
79.35 +{
79.36 + float a = 10.0;
79.37 + float b = 10.0;
79.38 + do_fsca(angle, &a, &b );
79.39 +
79.40 + TEST_FEQUALS(expect_a, a);
79.41 + TEST_FEQUALS(expect_b, b);
79.42 +}
79.43 +
79.44 +int test_fsrra( float f, float expect )
79.45 +{
79.46 + float f2 = do_fsrra( f );
79.47 + TEST_FEQUALS( expect, f2 );
79.48 +}
79.49 +
79.50 +void test_coercion( float f )
79.51 +{
79.52 + double d = (double)f;
79.53 + float q = (float)d;
79.54 + unsigned int i = (unsigned int)d;
79.55 + signed int j = (signed int)q;
79.56 +
79.57 + printf( "Coerce: %08X %08X%08X %08X %08X %08X\n", *((unsigned int *)&f),
79.58 + *((unsigned int *)&d), *(((unsigned int *)&d)+1),
79.59 + *((unsigned int *)&q), i, j );
79.60 +}
79.61 +
79.62 +void test_doublearr( int len )
79.63 +{
79.64 + double arr[len];
79.65 + unsigned int *iarr = (unsigned int *)&arr;
79.66 + int i;
79.67 + arr[0] = 2.5;
79.68 + for( i=1; i<len; i++ ) {
79.69 + arr[i] = (arr[i-1] * arr[i-1] + arr[0]) / 1.25 - 0.19;
79.70 + }
79.71 +
79.72 + printf( "arr: " );
79.73 + for( i=0; i<len; i++ ) {
79.74 + printf( "%08X", *iarr++ );
79.75 + printf( "%08X ", *iarr++ );
79.76 + }
79.77 + printf( "\n" );
79.78 +}
79.79 +
79.80 +void test_floatarr( int len )
79.81 +{
79.82 + float arr[len];
79.83 + unsigned int *iarr = (unsigned int *)&arr;
79.84 + int i;
79.85 + arr[0] = 2.5;
79.86 + for( i=1; i<len; i++ ) {
79.87 + arr[i] = (arr[i-1] * arr[i-1] + arr[0]) / 1.25 - 0.19;
79.88 + }
79.89 +
79.90 + write_string( "arr: " );
79.91 + for( i=0; i<len; i++ ) {
79.92 + write_int( *iarr++ );
79.93 + write_string( " " );
79.94 + }
79.95 + write_string( "\n" );
79.96 +}
79.97 +
79.98 +float __attribute__((aligned(8))) matrix[16] = { 1.26, 2.34, 5.67, 3.497, -1.23, 43.43, -45.68, 9.12,
79.99 + 12.1, 34.301, -297.354, 0.05, 0.123, 23.34, 9.99, 33.321 };
79.100 +float __attribute__((aligned(8))) vec1[4] = { 5.65, 9.98, -34.12, 0.043 };
79.101 +float __attribute__((aligned(8))) vec2[4] = { 3.45, -123, 4.54, 98.0909 };
79.102 +float __attribute__((aligned(8))) vec3[4] = { 1.25, 2.25, 3.75, 5.12 };
79.103 +float __attribute__((aligned(8))) vec4[4] = {-0.25, 8.9, -2.3, 9.19 };
79.104 +
79.105 +void test_fipr( )
79.106 +{
79.107 + float r = do_fipr( vec3, vec4 );
79.108 + write_string( "fipr: " );
79.109 + write_int( *(unsigned int *)&r );
79.110 + write_string( "\n" );
79.111 +
79.112 + r = do_fipr2( vec4, vec3 );
79.113 + write_string( "fipr: " );
79.114 + write_int( *(unsigned int *)&r );
79.115 + write_string( "\n" );
79.116 +
79.117 +}
79.118 +
79.119 +void test_ftrv( )
79.120 +{
79.121 +
79.122 + do_ftrv( matrix, vec1 );
79.123 + write_string( "ftrv: " );
79.124 + write_int( *(unsigned int *)&vec1[0] );
79.125 + write_int( *(unsigned int *)&vec1[1] );
79.126 + write_int( *(unsigned int *)&vec1[2] );
79.127 + write_int( *(unsigned int *)&vec1[3] );
79.128 + write_string( "\n" );
79.129 +
79.130 + do_ftrv2( matrix, vec2 );
79.131 +
79.132 + write_string( "ftrv: " );
79.133 + write_int( *(unsigned int *)&vec2[0] );
79.134 + write_int( *(unsigned int *)&vec2[1] );
79.135 + write_int( *(unsigned int *)&vec2[2] );
79.136 + write_int( *(unsigned int *)&vec2[3] );
79.137 + write_string( "\n" );
79.138 +
79.139 +}
79.140 +
79.141 +
79.142 +int main()
79.143 +{
79.144 + write_int( get_fpscr() );
79.145 + write_string( "\n" );
79.146 + test_fsca( 0x00000000, 0, 1 );
79.147 + test_fsca( 0x00011234, 0.43205646, 0.90184659 );
79.148 + test_fsca( 0xFEDCBA98, -0.99121743, -0.13224234 );
79.149 + test_fsrra( 25.0, 0.2 );
79.150 + test_fsrra( 0.05, 4.4721361 );
79.151 + test_fsrra( -12.345, nanf() );
79.152 + test_coercion( -3.1415926 );
79.153 + test_coercion( 123456789012346567.890 );
79.154 + test_coercion( -2147483648.0 );
79.155 + test_coercion( 5234.1234 );
79.156 + test_doublearr( 5 );
79.157 + test_floatarr( 5 );
79.158 + test_fipr();
79.159 + test_ftrv();
79.160 + return 1;
79.161 +}
79.162 +
80.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
80.2 +++ b/test/testta.c Tue Jul 11 01:35:27 2006 +0000
80.3 @@ -0,0 +1,101 @@
80.4 +/**
80.5 + * $Id: testta.c,v 1.1 2006-07-11 01:35:23 nkeynes Exp $
80.6 + *
80.7 + * Tile Accelerator test cases
80.8 + *
80.9 + * Copyright (c) 2006 Nathan Keynes.
80.10 + *
80.11 + * This program is free software; you can redistribute it and/or modify
80.12 + * it under the terms of the GNU General Public License as published by
80.13 + * the Free Software Foundation; either version 2 of the License, or
80.14 + * (at your option) any later version.
80.15 + *
80.16 + * This program is distributed in the hope that it will be useful,
80.17 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
80.18 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
80.19 + * GNU General Public License for more details.
80.20 + */
80.21 +
80.22 +#include <stdio.h>
80.23 +#include "testdata.h"
80.24 +#include "pvr.h"
80.25 +#include "lib.h"
80.26 +#include "asic.h"
80.27 +
80.28 +#define DMA_ALIGN(x) ((void *)((((unsigned int)(x))+0x1F)&0xFFFFFFE0))
80.29 +
80.30 +#define OBJ_START 0x00010000
80.31 +#define TILE_START 0x00060000
80.32 +
80.33 +#define FLOAT(p) *((float *)(p))
80.34 +
80.35 +int test_ta( test_data_t test_case )
80.36 +{
80.37 + char buf[1024];
80.38 + unsigned int *p = DMA_ALIGN(buf);
80.39 + unsigned int *data = p;
80.40 +
80.41 + asic_clear();
80.42 +
80.43 + memset( PVR_VRAM_BASE, 0, 0x00080000 );
80.44 + ta_init(640,480, OBJ_START, 0x10000, TILE_START, 0x10000 );
80.45 +
80.46 + test_data_block_t input = get_test_data(test_case, "input");
80.47 + test_data_block_t output = get_test_data(test_case, "output");
80.48 + if( input == NULL || output == NULL ) {
80.49 + fprintf( stderr, "Skipping test case '%s': data incomplete\n", test_case->test_name );
80.50 + return -1;
80.51 + }
80.52 +
80.53 + fprintf( stderr, "Before test start: %s\n", test_case->test_name );
80.54 + if( pvr_dma_write( 0x10000000, input->data, input->length, 0 ) == -1 ) {
80.55 + return -1;
80.56 + }
80.57 + if( asic_wait( EVENT_PVR_OPAQUE_DONE ) == -1 ) {
80.58 + fprintf( stderr, "Timeout waiting for Opaque Done event\n" );
80.59 + ta_dump_regs();
80.60 + asic_dump( stderr );
80.61 + }
80.62 +
80.63 + char *result = (char *)(PVR_VRAM_BASE+OBJ_START);
80.64 + int result_length = pvr_get_objbuf_size();
80.65 + if( test_block_compare( output, result, result_length ) != 0 ) {
80.66 + fprintf( stderr, "Test %s: Failed. Expected %d bytes:\n", test_case->test_name, output->length );
80.67 + fwrite_dump( stderr, output->data, output->length );
80.68 + fprintf( stderr, "but was %d bytes =>\n", result_length );
80.69 + fwrite_dump( stderr, result, result_length );
80.70 + return -1;
80.71 + } else {
80.72 + fprintf( stdout, "Test %s: OK\n", test_case->test_name );
80.73 + return 0;
80.74 + }
80.75 +
80.76 +}
80.77 +
80.78 +int main( int argc, char *argv[] )
80.79 +{
80.80 + int test_cases = 0;
80.81 + int test_failures = 0;
80.82 + test_data_t test_data = load_test_dataset(stdin);
80.83 + test_data_t test_case = test_data;
80.84 +
80.85 + asic_mask_all();
80.86 + pvr_init();
80.87 +
80.88 + while( test_case != NULL ) {
80.89 + test_cases++;
80.90 + int result = test_ta(test_case);
80.91 + if( result != 0 ) {
80.92 + test_failures++;
80.93 + }
80.94 + test_case = test_case->next;
80.95 + }
80.96 + free_test_dataset(test_data);
80.97 + if( test_failures != 0 ) {
80.98 + fprintf( stderr, "%d/%d test failures!\n", test_failures, test_cases );
80.99 + return 1;
80.100 + } else {
80.101 + fprintf( stderr, "%d tests OK\n", test_cases );
80.102 + return 0;
80.103 + }
80.104 +}
81.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
81.2 +++ b/test/testta.data Tue Jul 11 01:35:27 2006 +0000
81.3 @@ -0,0 +1,45 @@
81.4 +[1.1 Type 0 - quad]
81.5 +input =
81.6 +80840002 E0000000 2083242D 00000000 00000000 00000000 00000000 00000000
81.7 +E0000000 0.0 0.1 0.2 00000000 00000000 FF00FF00 FE010203
81.8 +E0000000 31.2 0.3 0.4 00000000 00000000 FF0000FF FD040506
81.9 +E0000000 0.5 31.6 0.7 00000000 00000000 FFFF0000 FC070809
81.10 +F0000000 31.8 31.9 0.9 00000000 00000000 FFFFFFFF FB0A0B0C
81.11 +00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
81.12 +output =
81.13 +E0A00000 2083242D 00000000
81.14 +0.0 0.1 0.2 FF00FF00
81.15 +31.2 0.3 0.4 FF0000FF
81.16 +0.5 31.6 0.7 FFFF0000
81.17 +31.8 31.9 0.9 FFFFFFFF
81.18 +[1.2 Type 0 - overlength]
81.19 +input =
81.20 +80840002 E0000000 2083242D 00000000 00000000 00000000 00000000 00000000
81.21 +E0000000 0.0 0.1 0.2 00000000 00000000 FF00FF00 FE010203
81.22 +E0000000 31.2 0.3 0.4 00000000 00000000 FF0000FF FD040506
81.23 +E0000000 0.5 31.6 0.7 00000000 00000000 FFFF0000 FC070809
81.24 +E0000000 31.8 31.9 0.9 00000000 00000000 FFFFFFFF FB0A0B0C
81.25 +F0000000 0.8 61.5 1.1 00000000 00000000 FEFDFCFB FA0D0E0F
81.26 +00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
81.27 +output =
81.28 +E0A00000 2083242D 00000000
81.29 +0.0 0.1 0.2 FF00FF00
81.30 +31.2 0.3 0.4 FF0000FF
81.31 +0.5 31.6 0.7 FFFF0000
81.32 +31.8 31.9 0.9 FFFFFFFF
81.33 +E0800000 2083242D 00000000
81.34 +0.5 31.6 0.7 FFFF0000
81.35 +31.8 31.9 0.9 FFFFFFFF
81.36 +0.8 61.5 1.1 FEFDFCFB
81.37 +[1.3 Type 1 - triangle]
81.38 +input =
81.39 +80800012 E0000000 2083242D 00000000 00000000 00000000 00000000 00000000
81.40 +E0000000 0.0 0.1 0.2 1.0 0.9 0.95 0.8
81.41 +E0000000 31.2 0.3 0.4 1.0 0.7 0.85 0.87
81.42 +E0000000 0.5 31.6 0.7 1.0 0.75 0.72 0.73
81.43 +00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
81.44 +output =
81.45 +E0A00000 2083242D 00000000
81.46 +0.0 0.1 0.2 FF00FF00
81.47 +31.2 0.3 0.4 FF0000FF
81.48 +0.5 31.6 0.7 FFFF0000
.