Index: contrib/crossrpms/patches/newlib-1.15.0-rtems4.8-20071221.diff
===================================================================
--- contrib/crossrpms/patches/newlib-1.15.0-rtems4.8-20071221.diff	(revision 5881d06cb9c85312b996a684bf03a2d72d2d505f)
+++ contrib/crossrpms/patches/newlib-1.15.0-rtems4.8-20071221.diff	(revision 2bf27202ea831dbd7a703c099161fe72c51b09f7)
@@ -1,5 +1,5 @@
 diff -uNr newlib-1.15.0.orig/newlib/libc/include/inttypes.h newlib-1.15.0/newlib/libc/include/inttypes.h
 --- newlib-1.15.0.orig/newlib/libc/include/inttypes.h	2005-12-16 20:03:12.000000000 +0100
-+++ newlib-1.15.0/newlib/libc/include/inttypes.h	2007-12-21 12:24:11.000000000 +0100
++++ newlib-1.15.0/newlib/libc/include/inttypes.h	2007-12-21 18:01:37.000000000 +0100
 @@ -242,9 +242,12 @@
  #define SCNxMAX		__SCNMAX(x)
@@ -20,5 +20,5 @@
 diff -uNr newlib-1.15.0.orig/newlib/libc/include/machine/setjmp.h newlib-1.15.0/newlib/libc/include/machine/setjmp.h
 --- newlib-1.15.0.orig/newlib/libc/include/machine/setjmp.h	2006-12-18 17:48:03.000000000 +0100
-+++ newlib-1.15.0/newlib/libc/include/machine/setjmp.h	2007-12-21 12:24:11.000000000 +0100
++++ newlib-1.15.0/newlib/libc/include/machine/setjmp.h	2007-12-21 18:01:37.000000000 +0100
 @@ -27,7 +27,7 @@
  
@@ -32,5 +32,5 @@
 diff -uNr newlib-1.15.0.orig/newlib/libc/include/stdint.h newlib-1.15.0/newlib/libc/include/stdint.h
 --- newlib-1.15.0.orig/newlib/libc/include/stdint.h	2006-08-16 23:39:43.000000000 +0200
-+++ newlib-1.15.0/newlib/libc/include/stdint.h	2007-12-21 12:24:11.000000000 +0100
++++ newlib-1.15.0/newlib/libc/include/stdint.h	2007-12-21 18:01:37.000000000 +0100
 @@ -393,6 +393,9 @@
  #define UINTMAX_C(x)	x##UL
@@ -45,5 +45,5 @@
 diff -uNr newlib-1.15.0.orig/newlib/libc/include/sys/errno.h newlib-1.15.0/newlib/libc/include/sys/errno.h
 --- newlib-1.15.0.orig/newlib/libc/include/sys/errno.h	2002-09-24 16:10:12.000000000 +0200
-+++ newlib-1.15.0/newlib/libc/include/sys/errno.h	2007-12-21 12:24:11.000000000 +0100
++++ newlib-1.15.0/newlib/libc/include/sys/errno.h	2007-12-21 18:01:37.000000000 +0100
 @@ -148,6 +148,7 @@
  #define ECASECLASH 137  /* Filename exists with different case */
@@ -56,5 +56,5 @@
 diff -uNr newlib-1.15.0.orig/newlib/libc/include/sys/features.h newlib-1.15.0/newlib/libc/include/sys/features.h
 --- newlib-1.15.0.orig/newlib/libc/include/sys/features.h	2006-09-14 00:09:27.000000000 +0200
-+++ newlib-1.15.0/newlib/libc/include/sys/features.h	2007-12-21 12:24:11.000000000 +0100
++++ newlib-1.15.0/newlib/libc/include/sys/features.h	2007-12-21 18:01:37.000000000 +0100
 @@ -38,6 +38,7 @@
  #define _POSIX_MEMLOCK_RANGE		1
@@ -176,5 +176,5 @@
 diff -uNr newlib-1.15.0.orig/newlib/libc/include/sys/time.h newlib-1.15.0/newlib/libc/include/sys/time.h
 --- newlib-1.15.0.orig/newlib/libc/include/sys/time.h	2006-02-15 11:26:30.000000000 +0100
-+++ newlib-1.15.0/newlib/libc/include/sys/time.h	2007-12-21 12:24:11.000000000 +0100
++++ newlib-1.15.0/newlib/libc/include/sys/time.h	2007-12-21 18:01:37.000000000 +0100
 @@ -70,7 +70,7 @@
    } while (0)
@@ -188,5 +188,5 @@
 diff -uNr newlib-1.15.0.orig/newlib/libc/include/sys/_types.h newlib-1.15.0/newlib/libc/include/sys/_types.h
 --- newlib-1.15.0.orig/newlib/libc/include/sys/_types.h	2004-06-11 22:37:09.000000000 +0200
-+++ newlib-1.15.0/newlib/libc/include/sys/_types.h	2007-12-21 12:24:11.000000000 +0100
++++ newlib-1.15.0/newlib/libc/include/sys/_types.h	2007-12-21 18:01:37.000000000 +0100
 @@ -39,4 +39,7 @@
  /* Iconv descriptor type */
@@ -199,5 +199,5 @@
 diff -uNr newlib-1.15.0.orig/newlib/libc/include/sys/unistd.h newlib-1.15.0/newlib/libc/include/sys/unistd.h
 --- newlib-1.15.0.orig/newlib/libc/include/sys/unistd.h	2006-11-07 16:33:40.000000000 +0100
-+++ newlib-1.15.0/newlib/libc/include/sys/unistd.h	2007-12-21 12:24:11.000000000 +0100
++++ newlib-1.15.0/newlib/libc/include/sys/unistd.h	2007-12-21 18:01:37.000000000 +0100
 @@ -27,6 +27,9 @@
  int     _EXFUN(chroot, (const char *__path ));
@@ -524,7 +524,50 @@
  #endif
  
+diff -uNr newlib-1.15.0.orig/newlib/libc/include/tar.h newlib-1.15.0/newlib/libc/include/tar.h
+--- newlib-1.15.0.orig/newlib/libc/include/tar.h	1970-01-01 01:00:00.000000000 +0100
++++ newlib-1.15.0/newlib/libc/include/tar.h	2007-12-21 18:01:37.000000000 +0100
+@@ -0,0 +1,39 @@
++/*
++ * tar.h
++ */
++
++#ifndef _TAR_H
++#define _TAR_H
++
++/* General definitions */
++#define TMAGIC 		"ustar" /* ustar plus null byte. */
++#define TMAGLEN 	6 	/* Length of the above. */
++#define TVERSION 	"00"	/* 00 without a null byte. */
++#define TVERSLEN	2	/* Length of the above. */
++
++/* Typeflag field definitions */
++#define REGTYPE 	'0'	/* Regular file. */
++#define AREGTYPE	'\0'	/* Regular file. */
++#define LNKTYPE		'1'	/* Link. */
++#define SYMTYPE		'2'	/* Symbolic link. */
++#define CHRTYPE		'3'	/* Character special. */
++#define BLKTYPE		'4'	/* Block special. */
++#define DIRTYPE		'5'	/* Directory. */
++#define FIFOTYPE	'6'	/* FIFO special. */
++#define CONTTYPE	'7'	/* Reserved. */
++
++/* Mode field bit definitions (octal) */
++#define	TSUID		04000	/* Set UID on execution. */
++#define	TSGID		02000	/* Set GID on execution. */
++#define	TSVTX		01000	/* On directories, restricted deletion flag. */
++#define	TUREAD		00400	/* Read by owner. */
++#define	TUWRITE		00200	/* Write by owner. */
++#define	TUEXEC		00100	/* Execute/search by owner. */
++#define	TGREAD		00040	/* Read by group. */
++#define	TGWRITE		00020	/* Write by group. */
++#define	TGEXEC		00010	/* Execute/search by group. */
++#define	TOREAD		00004	/* Read by other. */
++#define	TOWRITE		00002	/* Write by other. */
++#define	TOEXEC		00001	/* Execute/search by other. */
++
++#endif
 diff -uNr newlib-1.15.0.orig/newlib/libc/include/time.h newlib-1.15.0/newlib/libc/include/time.h
 --- newlib-1.15.0.orig/newlib/libc/include/time.h	2005-11-18 16:57:24.000000000 +0100
-+++ newlib-1.15.0/newlib/libc/include/time.h	2007-12-21 12:24:11.000000000 +0100
++++ newlib-1.15.0/newlib/libc/include/time.h	2007-12-21 18:01:37.000000000 +0100
 @@ -226,6 +226,16 @@
  
@@ -544,7 +587,23 @@
  
  /* Accessing a Process CPU-time CLock, P1003.4b/D8, p. 55 */
+diff -uNr newlib-1.15.0.orig/newlib/libc/machine/arm/machine/endian.h newlib-1.15.0/newlib/libc/machine/arm/machine/endian.h
+--- newlib-1.15.0.orig/newlib/libc/machine/arm/machine/endian.h	2004-05-07 22:29:24.000000000 +0200
++++ newlib-1.15.0/newlib/libc/machine/arm/machine/endian.h	1970-01-01 01:00:00.000000000 +0100
+@@ -1,12 +0,0 @@
+-/* ARM configuration file */
+-
+-#ifndef _MACHINE_ENDIAN_H
+-# define _MACHINE_ENDIAN_H
+-
+-#ifdef __ARMEB__
+-#define BYTE_ORDER BIG_ENDIAN
+-#else
+-#define BYTE_ORDER LITTLE_ENDIAN
+-#endif
+-
+-#endif
 diff -uNr newlib-1.15.0.orig/newlib/libc/machine/powerpc/setjmp.S newlib-1.15.0/newlib/libc/machine/powerpc/setjmp.S
 --- newlib-1.15.0.orig/newlib/libc/machine/powerpc/setjmp.S	2002-04-19 21:16:17.000000000 +0200
-+++ newlib-1.15.0/newlib/libc/machine/powerpc/setjmp.S	2007-12-21 12:24:11.000000000 +0100
++++ newlib-1.15.0/newlib/libc/machine/powerpc/setjmp.S	2007-12-21 18:01:37.000000000 +0100
 @@ -5,13 +5,14 @@
  #include "ppc-asm.h"
@@ -680,5 +739,5 @@
 diff -uNr newlib-1.15.0.orig/newlib/libc/search/db_local.h newlib-1.15.0/newlib/libc/search/db_local.h
 --- newlib-1.15.0.orig/newlib/libc/search/db_local.h	2002-06-25 01:05:08.000000000 +0200
-+++ newlib-1.15.0/newlib/libc/search/db_local.h	2007-12-21 12:24:11.000000000 +0100
++++ newlib-1.15.0/newlib/libc/search/db_local.h	2007-12-21 18:01:37.000000000 +0100
 @@ -50,7 +50,7 @@
  #define	MAX_PAGE_NUMBER	0xffffffff	/* >= # of pages in a file */
@@ -707,5 +766,5 @@
 diff -uNr newlib-1.15.0.orig/newlib/libc/search/extern.h newlib-1.15.0/newlib/libc/search/extern.h
 --- newlib-1.15.0.orig/newlib/libc/search/extern.h	2002-06-20 21:51:31.000000000 +0200
-+++ newlib-1.15.0/newlib/libc/search/extern.h	2007-12-21 12:24:11.000000000 +0100
++++ newlib-1.15.0/newlib/libc/search/extern.h	2007-12-21 18:01:37.000000000 +0100
 @@ -48,7 +48,7 @@
  int	 __delpair(HTAB *, BUFHEAD *, int);
@@ -719,5 +778,5 @@
 diff -uNr newlib-1.15.0.orig/newlib/libc/search/hash_bigkey.c newlib-1.15.0/newlib/libc/search/hash_bigkey.c
 --- newlib-1.15.0.orig/newlib/libc/search/hash_bigkey.c	2006-06-07 21:22:59.000000000 +0200
-+++ newlib-1.15.0/newlib/libc/search/hash_bigkey.c	2007-12-21 12:24:11.000000000 +0100
++++ newlib-1.15.0/newlib/libc/search/hash_bigkey.c	2007-12-21 18:01:37.000000000 +0100
 @@ -92,13 +92,13 @@
  	BUFHEAD *bufp;
@@ -972,5 +1031,5 @@
 diff -uNr newlib-1.15.0.orig/newlib/libc/search/hash_buf.c newlib-1.15.0/newlib/libc/search/hash_buf.c
 --- newlib-1.15.0.orig/newlib/libc/search/hash_buf.c	2004-05-26 19:57:10.000000000 +0200
-+++ newlib-1.15.0/newlib/libc/search/hash_buf.c	2007-12-21 12:24:11.000000000 +0100
++++ newlib-1.15.0/newlib/libc/search/hash_buf.c	2007-12-21 18:01:37.000000000 +0100
 @@ -176,7 +176,7 @@
  	BUFHEAD *next_xbp;
@@ -1002,5 +1061,5 @@
 diff -uNr newlib-1.15.0.orig/newlib/libc/search/hash.c newlib-1.15.0/newlib/libc/search/hash.c
 --- newlib-1.15.0.orig/newlib/libc/search/hash.c	2004-05-26 19:57:10.000000000 +0200
-+++ newlib-1.15.0/newlib/libc/search/hash.c	2007-12-21 12:24:11.000000000 +0100
++++ newlib-1.15.0/newlib/libc/search/hash.c	2007-12-21 18:01:37.000000000 +0100
 @@ -628,10 +628,10 @@
  {
@@ -1090,5 +1149,5 @@
 diff -uNr newlib-1.15.0.orig/newlib/libc/search/hash.h newlib-1.15.0/newlib/libc/search/hash.h
 --- newlib-1.15.0.orig/newlib/libc/search/hash.h	2002-07-02 20:18:58.000000000 +0200
-+++ newlib-1.15.0/newlib/libc/search/hash.h	2007-12-21 12:24:11.000000000 +0100
++++ newlib-1.15.0/newlib/libc/search/hash.h	2007-12-21 18:01:37.000000000 +0100
 @@ -102,7 +102,7 @@
  #define NCACHED	32			/* number of bit maps and spare 
@@ -1102,5 +1161,5 @@
 diff -uNr newlib-1.15.0.orig/newlib/libc/search/hash_page.c newlib-1.15.0/newlib/libc/search/hash_page.c
 --- newlib-1.15.0.orig/newlib/libc/search/hash_page.c	2002-09-19 23:28:51.000000000 +0200
-+++ newlib-1.15.0/newlib/libc/search/hash_page.c	2007-12-21 12:24:11.000000000 +0100
++++ newlib-1.15.0/newlib/libc/search/hash_page.c	2007-12-21 18:01:37.000000000 +0100
 @@ -77,16 +77,16 @@
  static __uint32_t	*fetch_bitmap(HTAB *, int);
@@ -1449,5 +1508,5 @@
 diff -uNr newlib-1.15.0.orig/newlib/libc/search/page.h newlib-1.15.0/newlib/libc/search/page.h
 --- newlib-1.15.0.orig/newlib/libc/search/page.h	2002-06-20 21:51:31.000000000 +0200
-+++ newlib-1.15.0/newlib/libc/search/page.h	2007-12-21 12:24:11.000000000 +0100
++++ newlib-1.15.0/newlib/libc/search/page.h	2007-12-21 18:01:37.000000000 +0100
 @@ -74,20 +74,20 @@
   * You might as well do this up front.
@@ -1477,7 +1536,42 @@
 +	__uint_least16_t next_addr;
  }       SPLIT_RETURN;
+diff -uNr newlib-1.15.0.orig/newlib/libc/sys/rtems/machine/stdint.h newlib-1.15.0/newlib/libc/sys/rtems/machine/stdint.h
+--- newlib-1.15.0.orig/newlib/libc/sys/rtems/machine/stdint.h	1970-01-01 01:00:00.000000000 +0100
++++ newlib-1.15.0/newlib/libc/sys/rtems/machine/stdint.h	2007-12-21 18:01:37.000000000 +0100
+@@ -0,0 +1,31 @@
++/*
++ *
++ */
++#ifndef _MACHINE_STDINT_H
++#define _MACHINE_STDINT_H
++
++#ifndef _STDINT_H
++#error machine/stdint.h is an internal file and  must not be directly included
++#endif
++
++#if defined(__sparc__) \
++  || defined(__powerpc__) || defined(__PPC__) \
++  || defined(__mips__) \
++  || defined(__sh__) \
++  || defined(__AVR__) \
++  || defined(_C4x) || defined(_C3x) \
++  || defined(__H8300__)
++/* PTRDIFF_TYPE = int */
++#define __ptrint_t_int_defined 1
++#endif
++
++#if defined(__i386__) \
++  || defined(__m68k__) \
++  || defined(__bfin__) \
++  || defined(__arm__) \
++  || defined(__H8300S__) || defined(__H8300H__)
++/* PTRDIFF_TYPE = long */
++#define __ptrint_t_long_defined 1
++#endif
++
++#endif
 diff -uNr newlib-1.15.0.orig/newlib/libc/sys/rtems/sys/param.h newlib-1.15.0/newlib/libc/sys/rtems/sys/param.h
 --- newlib-1.15.0.orig/newlib/libc/sys/rtems/sys/param.h	2004-05-07 22:29:24.000000000 +0200
-+++ newlib-1.15.0/newlib/libc/sys/rtems/sys/param.h	2007-12-21 12:24:11.000000000 +0100
++++ newlib-1.15.0/newlib/libc/sys/rtems/sys/param.h	2007-12-21 18:01:37.000000000 +0100
 @@ -93,7 +93,6 @@
  #include <sys/resource.h>
@@ -1490,5 +1584,5 @@
 diff -uNr newlib-1.15.0.orig/newlib/Makefile.am newlib-1.15.0/newlib/Makefile.am
 --- newlib-1.15.0.orig/newlib/Makefile.am	2006-06-05 19:42:57.000000000 +0200
-+++ newlib-1.15.0/newlib/Makefile.am	2007-12-21 12:24:11.000000000 +0100
++++ newlib-1.15.0/newlib/Makefile.am	2007-12-21 18:01:37.000000000 +0100
 @@ -81,7 +81,7 @@
  	libc.a
@@ -1512,5 +1606,5 @@
 diff -uNr newlib-1.15.0.orig/newlib/Makefile.in newlib-1.15.0/newlib/Makefile.in
 --- newlib-1.15.0.orig/newlib/Makefile.in	2006-12-18 21:32:41.000000000 +0100
-+++ newlib-1.15.0/newlib/Makefile.in	2007-12-21 12:24:11.000000000 +0100
++++ newlib-1.15.0/newlib/Makefile.in	2007-12-21 18:01:37.000000000 +0100
 @@ -103,7 +103,7 @@
  	pdf-recursive ps-recursive uninstall-info-recursive \
