<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>change log for rtems (2011-07-24)</title>
</head>
<body text='#000000' bgcolor='#ffffff'>
<a name='cs1'></a>
<table border='0' cellspacing='0' cellpadding='5' width='100%' bgcolor='#eeeeee'>
<tr><td colspan='3' bgcolor='#dddddd'>
 <font color='#bb2222'><strong>ralf</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>New.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/contrib/crossrpms/patches/newlib-1.19.0-rtems4.11-20110724.diff?rev=1.1&content-type=text/vnd.viewcvs-markup">A</a></td><td width='1%'><font color="#000088">1.1</font></td><td width='100%'><font color="#000088">contrib/crossrpms/patches/newlib-1.19.0-rtems4.11-20110724.diff</font></td></tr>
</table>
<pre>
<font color='#006600'>diff -u /dev/null rtems/contrib/crossrpms/patches/newlib-1.19.0-rtems4.11-20110724.diff:1.1
--- /dev/null   Sun Jul 24 10:10:21 2011
+++ rtems/contrib/crossrpms/patches/newlib-1.19.0-rtems4.11-20110724.diff       Sun Jul 24 09:10:48 2011
</font><font color='#997700'>@@ -0,0 +1,5988 @@
</font><font color='#000088'>+diff -Naur newlib-1.19.0.orig/.cvsignore newlib-1.19.0/.cvsignore
+--- newlib-1.19.0.orig/.cvsignore      2007-02-13 16:25:58.000000000 +0100
++++ newlib-1.19.0/.cvsignore   1970-01-01 01:00:00.000000000 +0100
+@@ -1,33 +0,0 @@
+-*-all
+-*-co
+-*-dirs
+-*-done
+-*-install-info
+-*-src
+-*-stamp-*
+-*-tagged
+-blockit
+-cfg-paper.info
+-config.status
+-configure.aux
+-configure.cp
+-configure.cps
+-configure.dvi
+-configure.fn
+-configure.fns
+-configure.ky
+-configure.kys
+-configure.log
+-configure.pg
+-configure.pgs
+-configure.toc
+-configure.tp
+-configure.tps
+-configure.vr
+-configure.vrs
+-dir.info
+-Makefile
+-lost+found
+-update.out
+-update.sourceware
+-autom4te.cache
+diff -Naur newlib-1.19.0.orig/newlib/ChangeLog newlib-1.19.0/newlib/ChangeLog
+--- newlib-1.19.0.orig/newlib/ChangeLog        2010-12-16 22:58:38.000000000 +0100
++++ newlib-1.19.0/newlib/ChangeLog     2011-07-24 06:43:01.625138903 +0200
+@@ -1,3 +1,381 @@
++2011-07-19  Yaakov Selkowitz  <yselkowitz@users.sourceforge.net>
++
++      * libc/include/sys/unistd.h (_CS_XBS5_WIDTH_RESTRICTED_ENVS): Define.
++      (_CS_V6_ENV): Fix definition.
++
++2011-07-19  Ralf Corsépius <ralf.corsepius@rtems.org>
++
++      * libc/locale/lmessages.c (_C_messages_locale):
++      Move __HAVE_LOCALE_INFO_EXTENDED__ before codeset.
++
++2011-07-19  Matt Johnson  <johnso87@crhc.illinois.edu>
++
++      * libc/reent/sbrkr.c: Define _sbrk_r independently of the definition
++      of MALLOC_PROVIDED.
++
++2011-07-15  Yufeng Zhang  <yufeng.zhang@arm.com>
++
++      * libc/stdio/vfwprintf.c (wcvt): Add a new parameter len of type
++      int.  *length is set to the value of (rev - digits) regardless
++      of whether _MB_CAPABLE is defined or not.  Replace BUF with len
++      in calling _mbsnrtowcs_r and also in the loop where _MB_CAPABLE
++      is not defined.
++      (_VFWPRINTF_R): Call wcvt with an extra argument.  Call wcvt
++      again with allocated new buffer if buf is not large enough for
++      the conversion.
++      * testsuite/newlib.stdio/stdio.exp: New.
++      * testsuite/newlib.stdio/swprintf.c: Likewise.
++
++2011-07-15  Matt Johnson  <johnso87@crhc.illinois.edu>
++
++      * libc/stdio/fscanf.c (fscanf): Call _vfscanf_r instead of __svfscanf_r
++      to make sure CHECK_INIT is called.
++      (_fscanf_r): Ditto.
++      * /libc/stdio/scanf.c (scanf): Ditto.
++      (_scanf_r): Ditto.
++      * libc/stdio/fwscanf.c (fwscanf): Call _vfwscanf_r instead of
++      __svfwscanf_r to make sure CHECK_INIT is called.
++      (_fwscanf_r): Ditto.
++      * libc/stdio/wscanf.c (wscanf): Ditto.
++      (_wscanf_r): Ditto.
++
++2011-07-13  Hans-Peter Nilsson <hp@axis.com>
++
++      * libm/complex/cacos.c: Use temporaries and correct sequencing
++      error in previous reordering change.
++
++2011-06-25  Andreas Becker  <becker@se-elektronic.de>
++
++      * libc/time/mktime.c (mktime): Lock global timezone info while
++      accessing it.
++
++2011-06-14  Philip Munts  <phil@munts.net>
++
++      * libc/time/asctime_r.c (asctime_r): Replace call to sprintf with call
++      to siprintf.
++      * libc/time/strftime.c: Define snprintf to sniprintf in multibyte case.
++      * libc/time/tzset_r.c: Define sscanf to siscanf.
++
++2011-06-14  Joseph Myers  <joseph@codesourcery.com>
++
++      * configure.host: Don't handle ep9312, strongarm, xscale and thumb
++      target names.
++      * libc/machine/configure.in: Don't handle xscale target names.
++      * libc/machine/configure: Regenerate.
++
++2011-06-14  Craig Howland <howland@LGSInnovations.com>
++
++      * libc/time/tzset_r.c (tzset_r):  Correct behavior for changing from
++      non-GMT to GMT, when un-setting TZ.  Set _timezone and _daylight even
++      if no DST is given in TZ.
++
++2011-06-13  Eric Blake  <eblake@redhat.com>
++
++      * libc/stdio/wsetup.c (__swsetup_r): Set errno on failure.
++      * libc/stdio/fvwrite.c (__sfvwrite_r): Simplify.
++      * libc/stdio/wbuf.c (__swbuf_r): Likewise.
++      * libc/stdio/local.h (cantwrite): Adjust comment.
++
++2011-06-09  Yaakov Selkowitz  <yselkowitz@...>
++
++      * libc/include/string.h (strdupa): New macro function.
++      (strndupa): New macro function.
++
++2011-05-27  Nick Clifton  <nickc@redhat.com>
++
++      * libc/sys/sysnecv850/sbrk.c (_sbrk): Tidy code.
++      Base start of heap on the "heap_start" symbol.
++
++2011-05-25  Eric Blake  <eblake@redhat.com>
++
++      * libc/string/strerror.c (_strerror_r): Report "Success" for 0.
++
++2011-05-25  Eric Blake  <eblake@redhat.com>
++
++      * libc/string/strerror.c (strerror): Split body into...
++      (_strerror_r): ...new reentrant function.
++      * libc/string/u_strerr.c (_user_strerror): Update signature.
++      * libc/include/string.h (_strerror_r): New prototype.
++      * libc/posix/collate.c (__collate_err): Adjust callers.
++      * libc/stdio/perror.c (_perror_r): Likewise.
++      * libc/string/strerror_r.c (strerror_r): Likewise.
++      * libc/string/xpg_strerror_r.c (__xpg_strerror_r): Likewise.
++
++2011-05-19  Yaakov Selkowitz  <yselkowitz@users.sourceforge.net>
++
++      * libc/include/stdio_ext.h: New header.
++      * libc/stdio/fpurge.c [!__rtems__] (__fpurge): New function.
++
++2011-05-19  Matthew Gretton-Dann  <matthew.gretton-dann@arm.com>
++
++      * Makefile.am (install-data-local): Fix condition and rm call.
++      * Makefile.in: Regenerate.
++
++2011-05-16  Yaakov Selkowitz  <yselkowitz@users.sourceforge.net>
++
++      * libc/include/time.h (CLOCK_PROCESS_CPUTIME_ID): Rename from
++      CLOCK_PROCESS_CPUTIME.
++      (CLOCK_THREAD_CPUTIME_ID): Rename from CLOCK_THREAD_CPUTIME.
++      * libc/include/sys/features.h [__CYGWIN__] (_POSIX_CPUTIME): Define.
++      (_POSIX_THREAD_CPUTIME): Define.
++
++2011-05-16  Christian Bruel  <christian.bruel@st.com>
++
++      * libc/stdlib/strtod.c (_strtod_r): Fix nf/nd counts to not exceed
++      DBL_DIG.
++
++2011-05-15  Corinna Vinschen  <vinschen@redhat.com>
++
++      * libc/include/sys/features.h (_POSIX_THREAD_ATTR_STACKADDR): Define
++      to 200112L for Cygwin.
++
++2011-05-12  Peter Rosin  <peda@lysator.liu.se>
++
++      * libc/time/strptime.c (strptime): Fill in tm_yday when all of tm_year,
++      tm_mon and tm_mday are updated. Fill in tm_mon, tm_mday and tm_wday
++      when both of tm_year and tm_yday are updated.
++
++2011-05-12  Peter Rosin  <peda@lysator.liu.se>
++
++      * libc/time/strptime.c (first_day): Actually return the wday
++      of the first day of the year.
++
++2011-05-10  Corinna Vinschen  <vinschen@redhat.com>
++
++      * libc/locale/lmessages.c (_C_messages_locale): Add missing comma.
++
++2011-05-04  Yaakov Selkowitz  <yselkowitz@users.sourceforge.net>
++
++      * libc/include/signal.h (psignal): Declare.
++      * libc/sys/linux/psignal.c: Move from here...
++      * libc/signal/psignal.c: ... to here. Document.
++      * libc/sys/linux/Makefile.am (GENERAL_SOURCES): Move psignal.c from here...
++      * libc/signal/Makefile.am (LIB_SOURCES): ... to here.
++      (CHEWOUT_FILES): Add psignal.def.
++      * libc/sys/linux/Makefile.in: Regenerate.
++      * libc/signal/Makefile.in: Ditto.
++      * libc/signal/signal.tex: Add references to psignal.
++
++2011-05-04  Corinna Vinschen  <vinschen@redhat.com>
++
++      * libc/locale/lmessages.h (__messages_load_locale): Declare.  Remove
++      accidental declaration of __numeric_load_locale.
++      * libc/locale/locale.c: Include timelocal.h to get declaration of
++      __time_load_locale.
++      (__set_locale_from_locale_alias): Fix return type.
++      (__locale_msgcharset): Avoid compiler warnings.
++      (_localeconv_r): Ditto.
++
++2011-05-04  Andy Koppe  <andy.koppe@gmail.com>
++
++      * libc/locale/locale.c (current_categories): On Cygwin, set LC_CTYPE<span style="background-color: #FF0000"> </span>
++      to C.UTF-8 to match initial __wctomb and __mbtowc settings.
++      (lc_ctype_charset): On Cygwin, initialize to "UTF-8".
++      (loadlocale): Remove unused Cygwin-specifc code.
++
++2011-05-02  Yaakov Selkowitz  <yselkowitz@users.sourceforge.net>
++
++      * libc/include/sys/features.h [__CYGWIN__] (_POSIX_SPIN_LOCKS): Define.
++      * libc/include/sys/types.h: Cygwin provides its own pthread_spinlock_t
++      typedef.
++
++2011-04-20  Ralf Corsépius <ralf.corsepius@rtems.org>
++
++      * libc/sys/rtems/include/limits.h: Compute SSIZE_MAX on __SIZE_MAX__.
++
++2011-04-19  Ralf Corsépius <ralf.corsepius@rtems.org>
++
++      * libc/include/stdint.h: Rework SIZE_MAX.
++      * libc/sys/rtems/include/limits.h: Rework SSIZE_MAX.
++
++2011-04-19  Corinna Vinschen  <vinschen@redhat.com>
++
++      * libc/include/sys/signal.h (_sig_func_ptr): Define with int parameter
++      per POSIX.  Explain in comment.
++
++2011-04-15  Eric Blake  <eblake@redhat.com>
++
++      * libc/string/strchrnul.c (strchrnul): Fix strchrnul.
++
++2011-03-27  Yaakov Selkowitz  <yselkowitz@users.sourceforge.net>
++
++      * libc/include/string.h (strchrnul): Declare.
++      * libc/string/strchrnul.c: New file.
++      * libc/string/Makefile.am (ELIX_2_SOURCES): Add strchrnul.c.
++      * libc/string/Makefile.in: Regenerate.
++
++2011-03-23  Ralf Corsépius <ralf.corsepius@rtems.org>
++
++      * libc/sys/rtems/sys/dirent.h: Add const to "select" parameter.
++
++2011-03-23  Nick Clifton  <nickc@redhat.com>
++
++      * libc/machine/frv/setjmp.S: Fix typo in .size directive.
++
++2011-03-21  Kevin Buettner  <kevinb@redhat.com>
++
++      * libc/sys/sysnecv850/trap.S (___trap0): Fix errno handling.
++      * libc/sys/sysnecv850/rename.c: New file.
++      * libc/sys/sysnecv850/Makefile.am (lib_a_SOURCES): Add rename.c
++      * libc/sys/sysnecv850/Makefile.in: Regenerate.
++      * libc/sys/sysnecv850/fstat.c (_fstat): Invoke trap for SYS_fstat.
++      * libc/sys/sysnecv850/unlink.c (_unlink): Invoke trap for SYS_unlink.
++
++2011-03-03  Corinna Vinschen  <vinschen@redhat.com>
++
++      * libc/include/string.h: Include sys/cdefs.h.
++
++2011-03-03  Corinna Vinschen  <vinschen@redhat.com>
++
++      * libc/include/sys/cdefs.h (__CONCAT1): Define.
++      (__CONCAT): Define.
++      (__STRING): Define.
++      (__XSTRING): Define.
++      (__ASMNAME): Define.
++      * libc/include/string.h (strerror_r): Use __ASMNAME to take target
++      specific label prefixes into account.
++
++2011-03-01  Aaron Landwehr <snaphat@gmail.com>
++
++      * libm/complex/cproj.c: Fix typo.
++      * libm/complex/cprojf.c: Ditto.
++
++2011-02-22  Corinna Vinschen  <vinschen@redhat.com>
++
++      * libc/stdio/fmemopen.c (fmemopen): Fix EINVAL condition.  Avoid SEGV
++      if incoming buffer is NULL.
++
++2011-02-09  Eric Blake  <eblake@redhat.com>
++
++      * libc/include/string.h (strerror_r): Update declaration.
++      * libc/string/strerror.c (strerror): Update documentation.
++      * libc/string/strerror_r.c (strerror_r): Always return
++      NUL-terminated string; don't overwrite too-short buf.
++      * libc/string/xpg_strerror_r.c (__xpg_strerror_r): Implement POSIX
++      variant.
++      * libc/string/Makefile.am (GENERAL_SOURCES): Build new file.
++      * libc/string/Makefile.in: Regenerate.
++
++2011-02-07    Ralf Corsépius  <ralf.corsepius@rtems.org>
++
++      * libc/include/stdlib.h: More ansi-compliance.
++
++2011-02-01    Ralf Corsépius  <ralf.corsepius@rtems.org>
++<span style="background-color: #FF0000">      </span>
++      * libc/include/stdio.h: More ansi-compliance.
++
++      * libc/include/stdlib.h: Remove atoff.
++      * libc/stdlib/atoff.c: Remove.
++      * libc/stdlib/atof.c: Remove atoff.
++      * libc/stdlib/Makefile.am: Remove atoff.
++      * libc/stdlib/Makefile.in: Regenerate.
++
++      * libc/include/stdio.h: Make fdopen accessible to c99.
++
++2011-01-31    Ralf Corsépius  <ralf.corsepius@rtems.org>
++
++      * libc/sys/rtems/crt0.c: Add clock_gettime, gettimeofday,
++      sched_yield.
++
++2011-01-28  Corinna Vinschen  <vinschen@redhat.com>
++
++      * libc/stdio/fclose.c: Only use sfp lock to guard non-atomic
++      changes of flags and fp lock.
++      * libc/stdio/freopen.c: Ditto.
++      * libc/stdio64/freopen64.c: Ditto.
++      * libc/stdio/fgetc.c: Revert change from 2009-04-24, remove sfp locks
++      which guard entire function to avoid potential deadlocks when using
++      stdio functions in multiple thraeds.
++      * libc/stdio/fgets.c: Ditto.
++      * libc/stdio/fgetwc.c: Ditto.
++      * libc/stdio/fgetws.c: Ditto.
++      * libc/stdio/fread.c: Ditto.
++      * libc/stdio/fseek.c: Ditto.
++      * libc/stdio/getc.c: Ditto.
++      * libc/stdio/getdelim.c: Ditto.
++      * libc/stdio/gets.c: Ditto.
++      * libc/stdio/vfscanf.c: Ditto.
++      * libc/stdio/vfwscanf.c: Ditto.
++
++      * libc/stdio/fflush.c (_fflush_r): Split out core functionality into
++      new function __sflush_r.  Just lock file and call __sflush_r from here.
++      * libc/stdio/fwalk.c (_fwalk): Remove static helper function and move
++      functionality back into main function. Don't walk a file with flags
++      value of 1.  Add comment.
++      (_fwalk_reent): Ditto.
++      * libc/stdio/local.h (__sflush_r): Declare.
++      * libc/stdio/refill.c (__srefill): Before calling fwalk, set flags
++      value to 1 so this file pointer isn't walked.  Revert flags afterwards
++      and call __sflush_r for this fp if necessary.  Add comments.
++
++2011-01-27  Corinna Vinschen  <vinschen@redhat.com>
++
++      * libc/include/sys/features.h: Define __STDC_ISO_10646__ for Cygwin.
++      * libc/include/wchar.h: Include features.h.
++
++2011-01-15  Yaakov Selkowitz  <yselkowitz@users.sourceforge.net>
++
++      * libc/include/sys/types.h (ulong): Add typedef.
++
++2011-01-12  Ralf Corsépius  <ralf.corsepius@rtems.org>
++
++      * libm/math/w_tgamma.c: Only build ifndef _DOUBLE_IS_32BITS.
++      * libm/math/wf_tgamma.c: Map tgamma to tgammaf, ifdef _DOUBLE_IS_32BITS.
++
++2011-01-11    Ralf Corsépius  <ralf.corsepius@rtems.org>
++
++      * libc/include/string.h: Remove Cygwin DEFS_H kludge.
++
++2011-01-10  Corinna Vinschen  <vinschen@redhat.com>
++
++      * libc/machine/mips/strlen.c (strlen): Add delay slot for R3000.
++
++2011-01-10  Joel Sherrill <joel.sherrill@oarcorp.com>
++
++      * libc/include/string.h: Make strsignal() available unconditionally.
++
++2011-01-07  Ralf Corsépius  <ralf.corsepius@rtems.org>
++
++      * libc/sys/rtems/crt0.c: Adjust free() and calloc() to match their
++      public decls.
++
++2011-01-05  Ralf Corsépius  <ralf.corsepius@rtems.org>
++
++      * Makefile.am: Move cleaning targ-include to clean-local.
++      * Makefile.in: Regenerate.
++
++2011-01-05  Ralf Corsépius  <ralf.corsepius@rtems.org>
++
++      * libc/stdio/open_memstream.c (internal_open_memstream_r):
++      Don't limit c->max to 64*1024 on targets with SIZE_MAX < 64*1024.
++
++2011-01-05  Ralf Corsépius  <ralf.corsepius@rtems.org>
++
++      * libc/xdr/xdr.c: Fix typos in #errors.
++
++2011-01-05  Ralf Corsépius  <ralf.corsepius@rtems.org>
++
++      * libc/xdr/xdr_private.h: Include <stdint.h>
++      * libc/xdr/xdr_rec.c: Include limits.h
++
++2011-01-05  Ralf Corsépius  <ralf.corsepius@rtems.org>
++
++      * libc/Makefile.am (SUBDEFS): Remove redundant posix/stmp-def.
++      * libc/Makefile.in: Regenerate.
++
++2011-01-05  Ralf Corsépius  <ralf.corsepius@rtems.org>
++
++      * libc/configure.in: Remove redundant posix_dir processing.
++      * libc/configure: Regenerate.
++
++2011-01-04    Ralf Corsépius  <ralf.corsepius@rtems.org>
++
++      * doc/makedoc.c: Add cludge to make makedoc 64bit compliant.
++
++2010-12-31  Ralf Corsépius  <ralf.corsepius@rtems.org>
++
++      * MAINTAINERS: Change corinna@vinchen.de to corinna@vinschen.de.
++
+ 2010-12-16  Jeff Johnston  <jjohnstn@redhat.com>
+<span style="background-color: #FF0000"> </span>
+<span style="background-color: #FF0000"> </span> * NEWS: Update with 1.19.0 info.
+@@ -28,12 +406,12 @@
+<span style="background-color: #FF0000"> </span>
+<span style="background-color: #FF0000"> </span> * libm/mathfp/sf_logarithm.c: Change isfinitef reference to isfinite.
+<span style="background-color: #FF0000"> </span>
+-2010-12-08      Ralf Corsepius <ralf.corsepius@rtems.org>
++2010-12-08  Ralf Corsépius <ralf.corsepius@rtems.org>
+<span style="background-color: #FF0000"> </span>
+<span style="background-color: #FF0000"> </span> * include/sys/types.h: Add #if defined(__rtems__) around
+<span style="background-color: #FF0000"> </span> pthread_attr_t.guardsize.
+<span style="background-color: #FF0000"> </span>
+-2010-12-08      Joel Sherrill <joel@OARcorp.com>
++2010-12-08  Joel Sherrill <joel@OARcorp.com>
+<span style="background-color: #FF0000"> </span>
+<span style="background-color: #FF0000"> </span> * include/pthread.h: Add pthread_attr_setstack, pthread_attr_getstack,
+<span style="background-color: #FF0000"> </span> pthread_attr_getguardsize, pthread_attr_setguardsize.
+@@ -847,7 +1225,7 @@
+<span style="background-color: #FF0000"> </span> (__cp_index): Map invalid Windows codepage number 101 to
+<span style="background-color: #FF0000"> </span> GEORGIAN-PS conversion array, 102 to PT154 conversion array.
+<span style="background-color: #FF0000"> </span>
+-2010-02-06  Ralf Corsepius  <ralf.corsepius@rtems.org>
++2010-02-06  Ralf Corsépius  <ralf.corsepius@rtems.org>
+<span style="background-color: #FF0000"> </span>
+<span style="background-color: #FF0000"> </span> * libc/posix/telldir.c: Remove bogus nested prototype of lseek().
+<span style="background-color: #FF0000"> </span>
+@@ -1005,6 +1383,18 @@
+<span style="background-color: #FF0000"> </span> * libc/include/sys/unistd.h (suboptarg, getsubopt): Move...
+<span style="background-color: #FF0000"> </span> * libc/include/stdlib.h: ...here, to match POSIX for getsubopt.
+<span style="background-color: #FF0000"> </span>
++2009-12-18    Ralf Corsépius <ralf.corsepius@rtems.org>
++
++      * libc/search/db_local.h:
++      Use __uint32_t instead of u_int (prototype mismatches).
++      * libc/search/extern.h (__buf_init):<span style="background-color: #FF0000"> </span>
++      Use __uint32_t instead of int (16 bit target portability).
++      * libc/search/hash_buf.c: Use ptrdiff_t instead of __uint32_t,
++      use __uint32_t instead of int (16 bit target portability).
++      * libc/search/hash.h: Use __uint32_it instead of int
++      (16 bit target portability).
++      * libm/common/modfl.c: Add cast to (double*) to avoid GCC warning.
++
+ 2009-12-17  Jeff Johnston  <jjohnstn@redhat.com>
+<span style="background-color: #FF0000"> </span>
+<span style="background-color: #FF0000"> </span> * NEWS: Update with 1.18.0 info.
+@@ -1048,17 +1438,17 @@
+<span style="background-color: #FF0000"> </span> * libc/stdlib/atexit.c: Ditto.
+<span style="background-color: #FF0000"> </span> * libc/stdlib/on_exit.c: Ditto.
+<span style="background-color: #FF0000"> </span>
+-2009-12-17  Ralf Corsépius <ralf.corsepius@rtems.org>
++2009-12-17  Ralf Corsépius <ralf.corsepius@rtems.org>
+<span style="background-color: #FF0000"> </span>
+<span style="background-color: #FF0000"> </span> * libc/include/machine/ieeefp.h: Rework __IEEE_*_ENDIAN handling.
+<span style="background-color: #FF0000"> </span> * libc/machine/arm/machine/endian.h: Remove (Conflicts with
+<span style="background-color: #FF0000"> </span> libc/include/machine/endian.h)
+<span style="background-color: #FF0000"> </span>
+-2009-12-17  Ralf Corsépius <ralf.corsepius@rtems.org>
++2009-12-17  Ralf Corsépius <ralf.corsepius@rtems.org>
+<span style="background-color: #FF0000"> </span>
+<span style="background-color: #FF0000"> </span> * libc/include/machine/setjmp.h: Set up _JBLEN #ifdef __m68k__.
+<span style="background-color: #FF0000"> </span>
+-2009-12-17  Ralf Corsepius <ralf.corsepius@rtems.org>
++2009-12-17  Ralf Corsépius <ralf.corsepius@rtems.org>
+<span style="background-color: #FF0000"> </span>
+<span style="background-color: #FF0000"> </span> * libc/include/pthread.h: Add pthread_atfork, pthread_rwlock_unlock
+<span style="background-color: #FF0000"> </span> * libc/include/sys/stat.h: Use struct timespec st_*tim,
+@@ -1076,11 +1466,11 @@
+<span style="background-color: #FF0000"> </span> and ETOOMANYREFS into general list as they are referenced
+<span style="background-color: #FF0000"> </span> by OpenGroup and needed by RTEMS.
+<span style="background-color: #FF0000"> </span>
+-2009-12-16  Ralf Corsépius <ralf.corsepius@rtems.org>
++2009-12-16  Ralf Corsépius <ralf.corsepius@rtems.org>
+<span style="background-color: #FF0000"> </span>
+<span style="background-color: #FF0000"> </span> * libc/search/hcreate.c: Don't include <sys/queue.h> (Unused).
+<span style="background-color: #FF0000"> </span>
+-2009-12-16  Ralf Corsépius <ralf.corsepius@rtems.org>
++2009-12-16  Ralf Corsépius <ralf.corsepius@rtems.org>
+<span style="background-color: #FF0000"> </span>
+<span style="background-color: #FF0000"> </span> * libc/sys/rtems/machine/_types.h: New (Derived from
+<span style="background-color: #FF0000"> </span> machine/_default_types.h).
+@@ -1204,6 +1594,18 @@
+<span style="background-color: #FF0000"> </span> rather check for return value of -1 and errno.  Handle EINVAL
+<span style="background-color: #FF0000"> </span> just like ESPIPE.  Only set fp->_offset if errno is 0.
+<span style="background-color: #FF0000"> </span>
++2009-10-29    Ralf Corsépius <ralf.corsepius@rtems.org>
++
++      * libc/include/inttypes.h:<span style="background-color: #FF0000"> </span>
++      Rework logic to determine PRI*PTR.
++      Prefer long64 over longlong64.
++      * libc/include/machine/_default_types.h:<span style="background-color: #FF0000"> </span>
++      Sync logic for __int32 with stdint.h (Prefer long over int).
++      * libc/include/stdint.h:
++      Remove __SPU__ hack.
++      Prefer int for int16_t (sync with _default_types.h).
++      Rework intptr_t determination.
++
+ 2009-10-27  Nick Clifton  <nickc@redhat.com>
+<span style="background-color: #FF0000"> </span>
+<span style="background-color: #FF0000"> </span> * MAINTAINERS (ARM): Add myself as an ARM maintainer.
+@@ -1368,16 +1770,16 @@
+<span style="background-color: #FF0000"> </span> * libc/locale/locale.c: Drop Cygwin-specific windows.h include.
+<span style="background-color: #FF0000"> </span> (loadlocale): Call __set_charset_from_codepage with 0 codepage.
+<span style="background-color: #FF0000"> </span>
+-2009-09-22  Ralf Corsépius <ralf.corsepius@rtems.org>
++2009-09-22  Ralf Corsépius <ralf.corsepius@rtems.org>
+<span style="background-color: #FF0000"> </span>
+<span style="background-color: #FF0000"> </span> * libc/include/stdlib.h: Add posix_memalign.
+<span style="background-color: #FF0000"> </span>
+-2009-09-22  Ralf Corsépius <ralf.corsepius@rtems.org>
++2009-09-22  Ralf Corsépius <ralf.corsepius@rtems.org>
+<span style="background-color: #FF0000"> </span>
+<span style="background-color: #FF0000"> </span> * configure.host (*-rtems*): Remove -DMISSING_SYSCALL_NAMES.
+<span style="background-color: #FF0000"> </span> Add -DHAVE_BLKSIZE, -D_NO_WORDEXP -D_NO_POPEN.
+<span style="background-color: #FF0000"> </span>
+-2009-09-22  Ralf Corsépius <ralf.corsepius@rtems.org>
++2009-09-22  Ralf Corsépius <ralf.corsepius@rtems.org>
+<span style="background-color: #FF0000"> </span>
+<span style="background-color: #FF0000"> </span> * configure.host (m32c): Move setting -DABORT_PROVIDED to second
+<span style="background-color: #FF0000"> </span> "case $host".
+@@ -2576,6 +2978,12 @@
+<span style="background-color: #FF0000"> </span> * libc/stdio/vfprintf.c: Ditto.
+<span style="background-color: #FF0000"> </span> * libc/stdio/vswprintf.c: Ditto.
+<span style="background-color: #FF0000"> </span>
++2009-03-09    Ralf Corsépius <ralf.corsepius@rtems.org>
++
++      * libc/machine/powerpc/times.c: Remove.
++      * libc/machine/powerpc/Makefile.am: Remove times.c.
++      * libc/machine/powerpc/Makefile.in: Regenerate.
++
+ 2009-03-09  Brooks Moses  <brooks@codesourcery.com>
+<span style="background-color: #FF0000"> </span>
+<span style="background-color: #FF0000"> </span> * libc/machine/arm/arm_asm.h: Fix typo.
+@@ -2673,7 +3081,7 @@
+<span style="background-color: #FF0000"> </span>
+<span style="background-color: #FF0000"> </span> * libc/machine/arm/strcpy.c: Add missing comma.
+<span style="background-color: #FF0000"> </span>
+-2009-02-26  Ralf Corsepius  <ralf.corsepius@rtems.org>
++2009-02-26  Ralf Corsépius  <ralf.corsepius@rtems.org>
+<span style="background-color: #FF0000"> </span>
+<span style="background-color: #FF0000"> </span> * libc/machine/lm32/configure.in: Let
+<span style="background-color: #FF0000"> </span> AC_CONFIG_SRCDIR point to setjmp.S instead of setjmp.s
+@@ -2859,24 +3267,24 @@
+<span style="background-color: #FF0000"> </span> * libc/string/wcstrings.tex: Ditto.
+<span style="background-color: #FF0000"> </span> * libc/string/Makefile.in: Regenerated.
+<span style="background-color: #FF0000"> </span>
+-2008-12-12  Ralf Corsepius  <ralf.corsepius@rtems.org>
++2008-12-12  Ralf Corsépius  <ralf.corsepius@rtems.org>
+<span style="background-color: #FF0000"> </span>
+<span style="background-color: #FF0000"> </span> * libc/stdio/fputws.c: Fix documentation.
+<span style="background-color: #FF0000"> </span> * libc/stdio/getwchar.c: Ditto.
+<span style="background-color: #FF0000"> </span> * libc/stdio/putwchar.c: Ditto.
+<span style="background-color: #FF0000"> </span>
+-2008-12-12  Ralf Corsepius  <ralf.corsepius@rtems.org>
++2008-12-12  Ralf Corsépius  <ralf.corsepius@rtems.org>
+<span style="background-color: #FF0000"> </span>
+<span style="background-color: #FF0000"> </span> * libc/include/sys/features.h: Set RTEMS's _POSIX_MONOTONIC_CLOCK to
+<span style="background-color: #FF0000"> </span> 200112L (SUSv3 compliance).
+<span style="background-color: #FF0000"> </span> Comment out RTEMS's _POSIX_SHARED_MEMORY_OBJECTS (Unsupported).
+<span style="background-color: #FF0000"> </span>
+-2008-12-12  Ralf Corsepius  <ralf.corsepius@rtems.org>
++2008-12-12  Ralf Corsépius  <ralf.corsepius@rtems.org>
+<span style="background-color: #FF0000"> </span>
+<span style="background-color: #FF0000"> </span> * libc/sys/rtems/crt0.c: Add stubs for getdents(), nanosleep(),
+<span style="background-color: #FF0000"> </span> _execve(), _exit().
+<span style="background-color: #FF0000"> </span>
+-2008-12-12  Ralf Corsepius  <ralf.corsepius@rtems.org>
++2008-12-12  Ralf Corsépius  <ralf.corsepius@rtems.org>
+<span style="background-color: #FF0000"> </span>
+<span style="background-color: #FF0000"> </span> * configure.host: Let *rtems* default to c99-formats.
+<span style="background-color: #FF0000"> </span>
+@@ -3026,7 +3434,7 @@
+<span style="background-color: #FF0000"> </span> <linux/dirent.h>.
+<span style="background-color: #FF0000"> </span> * libc/sys/linux/io64.c: Add weak alias for _stat64.
+<span style="background-color: #FF0000"> </span>
+-2008-11-27  Ralf Corsepius <ralf.corsepius@rtems.org>
++2008-11-27  Ralf Corsépius <ralf.corsepius@rtems.org>
+<span style="background-color: #FF0000"> </span>
+<span style="background-color: #FF0000"> </span> * libc/posix/telldir.c: Use #if !defined() instead of #ifndef
+<span style="background-color: #FF0000"> </span> to fix GCC warning.
+@@ -3198,17 +3606,17 @@
+<span style="background-color: #FF0000"> </span> * libc/unix/collate.c (__collate_err): simplify to remove unnecessary
+<span style="background-color: #FF0000"> </span> strdup() and strlen() calls, also getting rid of a compiler warning.
+<span style="background-color: #FF0000"> </span>
+-2008-11-19  Ralf Corsepius <ralf.corsepius@rtems.org>
++2008-11-19  Ralf Corsépius <ralf.corsepius@rtems.org>
+<span style="background-color: #FF0000"> </span>
+<span style="background-color: #FF0000"> </span> * libc/include/sys/config.h: Don't put
+<span style="background-color: #FF0000"> </span> __ATTRIBUTE_IMPURE_PTR__ into .sdata section for mips-rtems.
+<span style="background-color: #FF0000"> </span>
+-2008-11-19  Ralf Corsepius  <ralf.corsepius@rtems.org>
++2008-11-19  Ralf Corsépius  <ralf.corsepius@rtems.org>
+<span style="background-color: #FF0000"> </span>
+<span style="background-color: #FF0000"> </span> * libc/posix/runetype.h: Add include of stddef.h and remove
+<span style="background-color: #FF0000"> </span> defining standard types: size_t and wchar_t.
+<span style="background-color: #FF0000"> </span>
+-2008-11-19  Ralf Corsepius  <ralf.corsepius@rtems.org>
++2008-11-19  Ralf Corsépius  <ralf.corsepius@rtems.org>
+<span style="background-color: #FF0000"> </span>
+<span style="background-color: #FF0000"> </span> * libc/include/pthread.h: Remove prototypes for
+<span style="background-color: #FF0000"> </span> pthread_attr_getcputime and pthread_attr_setcputime which
+@@ -5263,7 +5671,7 @@
+<span style="background-color: #FF0000"> </span> * libc/machine/spu/sprintf.c: Ditto.
+<span style="background-color: #FF0000"> </span> * libc/machine/spu/sscanf.c: Ditto.
+<span style="background-color: #FF0000"> </span>
+-2007-08-03  Ralf Corsepius  <ralf.corsepius@rtems.org>
++2007-08-03  Ralf Corsépius  <ralf.corsepius@rtems.org>
+<span style="background-color: #FF0000"> </span>
+<span style="background-color: #FF0000"> </span> * libc/include/tar.h: New.
+<span style="background-color: #FF0000"> </span>
+@@ -6455,7 +6863,7 @@
+<span style="background-color: #FF0000"> </span> * libc/include/sys/unistd.h: Define all _SC_xxx values as
+<span style="background-color: #FF0000"> </span> required by SUSv3.  Unify formatting.
+<span style="background-color: #FF0000"> </span>
+-2007-02-02  Ralf Corsépius <ralf.corsepius@rtems.org>
++2007-02-02  Ralf Corsépius <ralf.corsepius@rtems.org>
+<span style="background-color: #FF0000"> </span>
+<span style="background-color: #FF0000"> </span> * libc/include/sys/errno.h: Add ECANCELED.
+<span style="background-color: #FF0000"> </span>
+@@ -7248,7 +7656,7 @@
+<span style="background-color: #FF0000"> </span> * libc/include/sys/signal.h (sigdelset, sigfillset, sigismember): New macros.
+<span style="background-color: #FF0000"> </span> (sigaddset, sigemptyset): Add return code.
+<span style="background-color: #FF0000"> </span>
+-2006-04-13  Ralf Corsepius  <ralf.corsepius@rtems.org>
++2006-04-13  Ralf Corsépius  <ralf.corsepius@rtems.org>
+<span style="background-color: #FF0000"> </span>
+<span style="background-color: #FF0000"> </span> * acinclude.m4: New _NEWLIB_VERSION.
+<span style="background-color: #FF0000"> </span> * acinclude.m4(NEWLIB_CONFIGURE): AC_REQUIRE(_NEWLIB_VERSION).
+@@ -7737,7 +8145,7 @@
+<span style="background-color: #FF0000"> </span> * libc/sys/linux/sys/stat.h: Change *stat64 prototypes to
+<span style="background-color: #FF0000"> </span> take a pointer to struct stat64 rather than struct stat.
+<span style="background-color: #FF0000"> </span>
+-2005-12-16  Ralf Corsepius <ralf.corsepius@rtems.org>
++2005-12-16  Ralf Corsépius <ralf.corsepius@rtems.org>
+<span style="background-color: #FF0000"> </span>
+<span style="background-color: #FF0000"> </span> * libc/include/stdint.h: Prefer long over int for int32_t.
+<span style="background-color: #FF0000"> </span> Use __have_long32 to set up int32_t.
+@@ -7766,7 +8174,7 @@
+<span style="background-color: #FF0000"> </span> * libc/include/sys/types.h: Remove the ifdef armour around
+<span style="background-color: #FF0000"> </span> standard POSIX types.
+<span style="background-color: #FF0000"> </span>
+-2005-12-06  Ralf Corsepius <ralf.corsepius@rtems.org>
++2005-12-06  Ralf Corsépius <ralf.corsepius@rtems.org>
+<span style="background-color: #FF0000"> </span>
+<span style="background-color: #FF0000"> </span> * libc/sys/rtems/crt0.c: Add rtems_gxx_key_create,
+<span style="background-color: #FF0000"> </span> rtems_gxx_key_delete, rtems_gxx_getspecific,
+@@ -7845,7 +8253,7 @@
+<span style="background-color: #FF0000"> </span> * libc/sys/linux/sys/unistd.h (readlink, symlink): New
+<span style="background-color: #FF0000"> </span> prototypes.
+<span style="background-color: #FF0000"> </span>
+-2005-11-01  Ralf Corsepius <ralf.corsepius@rtems.org>
++2005-11-01  Ralf Corsépius <ralf.corsepius@rtems.org>
+<span style="background-color: #FF0000"> </span>
+<span style="background-color: #FF0000"> </span> * libc/include/stdint.h: Cleanup #if vs. #ifdef.
+<span style="background-color: #FF0000"> </span>
+@@ -8069,11 +8477,11 @@
+<span style="background-color: #FF0000"> </span> * libc/stdlib/mallocr.c (mALLOc, rEALLOCc, mEMALIGn): Set errno
+<span style="background-color: #FF0000"> </span> to ENOMEM on failure.
+<span style="background-color: #FF0000"> </span>
+-2005-10-06  Ralf Corsepius <ralf.corsepius@rtems.org>
++2005-10-06  Ralf Corsépius <ralf.corsepius@rtems.org>
+<span style="background-color: #FF0000"> </span>
+<span style="background-color: #FF0000"> </span> * libc/include/stdint.h: Add [u]int_fast<N>_t types.
+<span style="background-color: #FF0000"> </span>
+-2005-10-04  Ralf Corsepius <ralf.corsepius@rtems.org>
++2005-10-04  Ralf Corsépius <ralf.corsepius@rtems.org>
+<span style="background-color: #FF0000"> </span>
+<span style="background-color: #FF0000"> </span> * libc/include/stdint.h: Move magic to set __have_long* to the
+<span style="background-color: #FF0000"> </span> beginning.  Use #if __have* instead of #if defined(__have*).
+@@ -8089,14 +8497,14 @@
+<span style="background-color: #FF0000"> </span> * libc/sys/linux/include/stdint.h: Include <sys/types.h> and
+<span style="background-color: #FF0000"> </span> incorporate Ralf's change below.
+<span style="background-color: #FF0000"> </span>
+-2005-10-03  Ralf Corsepius <ralf.corsepius@rtems.org>
++2005-10-03  Ralf Corsépius <ralf.corsepius@rtems.org>
+<span style="background-color: #FF0000"> </span>
+<span style="background-color: #FF0000"> </span> * libc/include/stdint.h:
+<span style="background-color: #FF0000"> </span> Use __INTMAX_TYPE__ to derive intmax_t.
+<span style="background-color: #FF0000"> </span> Use __UINTMAX_TYPE__ to derive uintmax_t.
+<span style="background-color: #FF0000"> </span> Fix minor typo.
+<span style="background-color: #FF0000"> </span>
+-2005-09-27  Ralf Corsepius <ralf.corsepius@rtems.org>
++2005-09-27  Ralf Corsépius <ralf.corsepius@rtems.org>
+<span style="background-color: #FF0000"> </span>
+<span style="background-color: #FF0000"> </span> * libc/include/stdint.h: Correct __STDINT_EXP macro incorrectly
+<span style="background-color: #FF0000"> </span> handling GCC >= 4.
+@@ -8432,16 +8840,16 @@
+<span style="background-color: #FF0000"> </span> * configure.host (newlib_cflags) <cris-*-*, crisv32-*-*>: Add
+<span style="background-color: #FF0000"> </span> -DCOMPACT_CTYPE.
+<span style="background-color: #FF0000"> </span>
+-2005-03-06  Ralf Corsepious  <ralf.corsepius@rtems.org>
++2005-03-06  Ralf Corsépius  <ralf.corsepius@rtems.org>
+<span style="background-color: #FF0000"> </span>
+<span style="background-color: #FF0000"> </span> * libc/sys/rtems/include/inttypes.h: New file.
+<span style="background-color: #FF0000"> </span> * libc/sys/rtems/include/stdint.h: Ditto.
+<span style="background-color: #FF0000"> </span>
+-2005-03-06  Ralf Corsepious  <ralf.corsepius@rtems.org>
++2005-03-06  Ralf Corsépius  <ralf.corsepius@rtems.org>
+<span style="background-color: #FF0000"> </span>
+<span style="background-color: #FF0000"> </span> * libc/string/memcmp.c: Fix to avoid pointer signedness warning.
+<span style="background-color: #FF0000"> </span>
+-2005-03-06  Ralf Corsepious  <ralf.corsepius@rtems.org>
++2005-03-06  Ralf Corsépius  <ralf.corsepius@rtems.org>
+<span style="background-color: #FF0000"> </span>
+<span style="background-color: #FF0000"> </span> * libc/include/machine/_types.h: New file.
+<span style="background-color: #FF0000"> </span> * libc/include/sys/types.h: Do not check for __rtems__
+@@ -8450,7 +8858,7 @@
+<span style="background-color: #FF0000"> </span> * libc/sys/rtems/machine/_types.h: Removed.  Replaced with
+<span style="background-color: #FF0000"> </span> shared header file.
+<span style="background-color: #FF0000"> </span>
+-2005-02-25  Ralf Corsepious  <ralf.corsepius@rtems.org>
++2005-02-25  Ralf Corsépius  <ralf.corsepius@rtems.org>
+<span style="background-color: #FF0000"> </span>
+<span style="background-color: #FF0000"> </span> * libm/common/fdlibm.h (FLT_UWORD_MAX, FLT_UWORD_HALF_MAX): Add
+<span style="background-color: #FF0000"> </span> L qualifier for these long constants.
+@@ -8466,13 +8874,13 @@
+<span style="background-color: #FF0000"> </span> * libc/time/strftime.c (strftime): Fix '%x' to deal with negative
+<span style="background-color: #FF0000"> </span> years.  Fix '%z' to use long, not int.
+<span style="background-color: #FF0000"> </span>
+-2005-02-24  Ralf Corsepious  <ralf.corsepius@rtems.org>
++2005-02-24  Ralf Corsépius  <ralf.corsepius@rtems.org>
+<span style="background-color: #FF0000"> </span>
+<span style="background-color: #FF0000"> </span> * libm/common/s_fpclassify.c: Use __uint32_t instead of int to
+<span style="background-color: #FF0000"> </span> manipulate float values in integer form.
+<span style="background-color: #FF0000"> </span> * libm/common/sf_round.c: Ditto.
+<span style="background-color: #FF0000"> </span>
+-2005-02-24  Ralf Corsepious  <ralf.corsepius@rtems.org>
++2005-02-24  Ralf Corsépius  <ralf.corsepius@rtems.org>
+<span style="background-color: #FF0000"> </span>
+<span style="background-color: #FF0000"> </span> * libc/include/sys/types.h [__rtems__]: Include new
+<span style="background-color: #FF0000"> </span> header file machine/_types.h.
+@@ -8836,7 +9244,7 @@
+<span style="background-color: #FF0000"> </span> * libc/stdio/fread.c (fread): Fix return value for unbuffered
+<span style="background-color: #FF0000"> </span> fread.
+<span style="background-color: #FF0000"> </span>
+-2004-10-25  Ralf Corsepius <corsepiu@faw.uni-ulm.de>
++2004-10-25  Ralf Corsépius <corsepiu@faw.uni-ulm.de>
+<span style="background-color: #FF0000"> </span>
+<span style="background-color: #FF0000"> </span> * libc/include/machine/setjmp.h: Add AVR support.
+<span style="background-color: #FF0000"> </span> * libc/sys/rtems/crt0.S [__AVR__]: Add __stack.
+@@ -15068,7 +15476,7 @@
+<span style="background-color: #FF0000"> </span>
+<span style="background-color: #FF0000"> </span> * libc/include/sys/unistd.h: Prototype chroot() for RTEMS.
+<span style="background-color: #FF0000"> </span>
+-2001-08-29  Ralf Corsepius <corsepiu@faw.uni-ulm.de>
++2001-08-29  Ralf Corsépius <corsepiu@faw.uni-ulm.de>
+<span style="background-color: #FF0000"> </span>
+<span style="background-color: #FF0000"> </span> * libc/machine/i386/f_atan2.S, libc/machine/i386/f_atan2f.S,
+<span style="background-color: #FF0000"> </span>   libc/machine/i386/f_exp.c, libc/machine/i386/f_expf.c,
+@@ -15745,7 +16153,7 @@
+<span style="background-color: #FF0000"> </span> * libc/sys/linux/sys/utsname.h: Ditto.
+<span style="background-color: #FF0000"> </span> * libc/sys/linux/sys/wait.h: Ditto.
+<span style="background-color: #FF0000"> </span>
+-2000-12-08  Ralf Corsepius <corsepiu@faw.uni-ulm.de>
++2000-12-08  Ralf Corsépius <corsepiu@faw.uni-ulm.de>
+<span style="background-color: #FF0000"> </span>
+<span style="background-color: #FF0000"> </span> * Makefile.am: $(INSTALL), $(INSTALL_DATA), and $(INSTALL_PROGRAM)
+<span style="background-color: #FF0000"> </span> can be a relative path to $(top_srcdir)/install.sh so ensure the
+@@ -16650,7 +17058,7 @@
+<span style="background-color: #FF0000"> </span> * libc/include/stdlib.h: add ptsname, grantpt, unlockpt to cygwin
+<span style="background-color: #FF0000"> </span> section
+<span style="background-color: #FF0000"> </span>
+-Sat Oct  2 02:02:00 MEST 1999  Ralf Corsepius <corsepiu@faw.uni-ulm.de>
++Sat Oct  2 02:02:00 MEST 1999  Ralf Corsépius <corsepiu@faw.uni-ulm.de>
+<span style="background-color: #FF0000"> </span>
+<span style="background-color: #FF0000"> </span> * libc/machine/sh/asm.h: Added __SH4_SINGLE__ to DELAYED_BRANCHES
+<span style="background-color: #FF0000"> </span> * libc/machine/sh/memcpy.S: Fix line wrapping in SL macro
+diff -Naur newlib-1.19.0.orig/newlib/ChangeLog.rtems newlib-1.19.0/newlib/ChangeLog.rtems
+--- newlib-1.19.0.orig/newlib/ChangeLog.rtems  1970-01-01 01:00:00.000000000 +0100
++++ newlib-1.19.0/newlib/ChangeLog.rtems       2011-07-24 06:43:01.627138933 +0200
+@@ -0,0 +1,88 @@
++2011-07-24    Ralf Corsépius  <ralf.corsepius@rtems.org>
++
++      * libc/iconv/iconv.tex: Rename node "Introduction" into
++      "Introduction to iconv".
++
++2011-01-07    Ralf Corsépius  <ralf.corsepius@rtems.org>
++
++      * libc/stdio/open_memstream.c: Replace 64 * 1024 with 0x10000 to<span style="background-color: #FF0000"> </span>
++      avoid integer overflow on h8300.
++
++2011-01-05    Ralf Corsépius  <ralf.corsepius@rtems.org>
++
++      * libc/stdio/tmpnam.c: Include <stdint.h>.
++      Use intptr_t instead of _POINTER_INT for improved portability.
++      * libc/misc/__dprintf.c: Include <stdint.h>
++      Use intptr_t instead of _POINTER_INT for improved portability.
++
++2011-01-05    Ralf Corsépius  <ralf.corsepius@rtems.org>
++
++      * libm/common/s_round.c: Cast const int to __int32_t.
++
++2011-01-04    Ralf Corsépius  <ralf.corsepius@rtems.org>
++
++      * libm/math/e_scalb.c: Include <limits.h>.
++      Don't rely on 65000 being a valid int.
++
++2011-01-04    Ralf Corsépius  <ralf.corsepius@rtems.org>
++
++      * libc/posix/readdir.c: Include <stdint.h>.
++      Cast to intptr_t instead of int.
++
++2011-01-04    Ralf Corsépius  <ralf.corsepius@rtems.org>
++
++      * libc/string/memccpy.c, libc/string/memchr.c,
++      libc/string/memcmp.c, libc/string/memcpy.c,
++      libc/string/memmove.c, libc/string/mempcpy.c,
++      libc/string/memset.c, libc/string/stpcpy.c,
++      libc/string/stpncpy.c, libc/string/strcpy.c,
++      libc/string/strlen.c, libc/string/strncat.c,
++      libc/string/strncpy.c (UNALIGNED):
++      Include <stdint.h>.
++      Cast to intptr_t instead of long.
++
++2011-01-04    Ralf Corsépius  <ralf.corsepius@rtems.org>
++
++      * Makefile.am: Don't install include/rpc/*.h.
++      * Makefile.in: Regenerate.
++      * libc/Makefile.am: Install include/rpc/xdr.h include/rpc/types.h.<span style="background-color: #FF0000"> </span>
++      * libc/Makefile.in: Regenerate.
++
++2010-12-30    Ralf Corsépius  <ralf.corsepius@rtems.org>
++
++      * libc/include/signal.h: Don't provide sighandler_t.
++
++2010-12-29    Ralf Corsépius  <ralf.corsepius@rtems.org>
++
++      * libc/include/sys/dir.h: Remove.
++
++2010-08-10    Ralf Corsépius <ralf.corsepius@rtems.org>
++
++      PR 1475/newlib:
++      * libc/include/stdint.h: Fall back to compute SIZE_MAX based on
++      __SIZEOF_SIZE_T__ and __CHAR_BIT__ if available.
++
++2010-08-04    Ralf Corsépius <ralf.corsepius@rtems.org>
++
++      * libc/string/strcat.c:<span style="background-color: #FF0000"> </span>
++      Include <stdint.h>. Use uintptr_t instead of long in ALIGNED.
++      * libc/string/strchr.c, libc/string/strcmp.c, libc/string/strncmp.c:
++      Include <stdint.h>. Use uintptr_t instead of long in UNALIGNED.
++
++2010-07-08    Ralf Corsépius <ralf.corsepius@rtems.org>
++
++      * libc/string/index.c, libc/string/rindex.c: Include <string.h>.
++      * libc/stdlib/putenv_r.c: Include <strings.h>
++
++2010-03-25    Ralf Corsépius <ralf.corsepius@rtems.org>
++
++      * libc/include/string.h: Remove bcmp, bcopy, bzero, ffs, index, rindex,
++      strcasecmp, strncasecmp (Moved to strings.h).
++      Remove strcmpi, stricmp, strncmpi, strnicmp.
++      * libc/misc/ffs.c: Use <strings.h> instead of <string.h>.
++      * libc/string/bcmp.c: Use <strings.h> instead of <string.h>.
++      * libc/string/bzero.c: Use <strings.h> instead of <string.h>.
++      * libc/string/rindex.c: Use <strings.h> instead of <string.h>.
++      * libc/string/strcasecmp.c: Use <strings.h> instead of <string.h>.
++      * libc/string/strncasecmp.c: Use <strings.h> instead of <string.h>.
++
+diff -Naur newlib-1.19.0.orig/newlib/configure.host newlib-1.19.0/newlib/configure.host
+--- newlib-1.19.0.orig/newlib/configure.host   2010-12-02 20:30:46.000000000 +0100
++++ newlib-1.19.0/newlib/configure.host        2011-07-24 06:43:01.628138948 +0200
+@@ -120,9 +120,6 @@
+   d30v*)
+<span style="background-color: #FF0000"> </span> machine_dir=d30v
+<span style="background-color: #FF0000"> </span> ;;
+-  ep9312)
+-      machine_dir=arm
+-      ;;
+   fido)
+<span style="background-color: #FF0000"> </span> machine_dir=m68k
+<span style="background-color: #FF0000"> </span> newlib_cflags="${newlib_cflags} -DCOMPACT_CTYPE"
+@@ -240,15 +237,6 @@
+<span style="background-color: #FF0000"> </span> # FIXME: Might wish to make MALLOC_ALIGNMENT more generic.
+<span style="background-color: #FF0000"> </span> newlib_cflags="${newlib_cflags} -DMALLOC_ALIGNMENT=8"
+<span style="background-color: #FF0000"> </span> ;;
+-  strongarm)
+-      machine_dir=arm
+-      ;;
+-  xscale)
+-      machine_dir=xscale
+-      ;;
+-  thumb)
+-      machine_dir=arm
+-      ;;
+   tic4x|c4x)
+<span style="background-color: #FF0000"> </span> machine_dir=tic4x
+<span style="background-color: #FF0000"> </span> ;;
+@@ -391,12 +379,6 @@
+   d30v*)
+<span style="background-color: #FF0000"> </span> sys_dir=
+<span style="background-color: #FF0000"> </span> ;;
+-  ep9312-*-*)
+-      sys_dir=arm
+-      if [ "x${newlib_may_supply_syscalls}" = "xno" ] ; then
+-        have_crt0="no"
+-      fi
+-      ;;
+   frv*)
+         sys_dir=
+         ;;
+@@ -493,18 +475,6 @@
+<span style="background-color: #FF0000"> </span> default_newlib_io_long_long="yes"
+<span style="background-color: #FF0000"> </span> default_newlib_atexit_dynamic_alloc="no"
+<span style="background-color: #FF0000"> </span> ;;
+-  strongarm-*-*)
+-      sys_dir=arm
+-      if [ "x${newlib_may_supply_syscalls}" = "xno" ] ; then
+-        have_crt0="no"
+-      fi
+-      ;;
+-  thumb-*-*)
+-      sys_dir=arm
+-      if [ "x${newlib_may_supply_syscalls}" = "xno" ] ; then
+-        have_crt0="no"
+-      fi
+-      ;;
+   tic6x*)
+<span style="background-color: #FF0000"> </span> newlib_cflags="${newlib_cflags} -DMISSING_SYSCALL_NAMES"
+<span style="background-color: #FF0000"> </span> have_crt0="no"
+@@ -527,12 +497,6 @@
+   w65-*-*)
+<span style="background-color: #FF0000"> </span> sys_dir=w65
+<span style="background-color: #FF0000"> </span> ;;
+-  xscale-*-*)
+-      sys_dir=arm
+-      if [ "x${newlib_may_supply_syscalls}" = "xno" ] ; then
+-        have_crt0="no"
+-      fi
+-      ;;
+   z8k-*-coff)
+<span style="background-color: #FF0000"> </span> sys_dir=z8ksim
+<span style="background-color: #FF0000"> </span> ;;
+@@ -594,7 +558,6 @@
+ # to create the program's environment.
+ # If --disable-newlib-supplied-syscalls is specified, then the end-user
+ # may specify the protocol via gcc spec files supplied by libgloss.
+-# See also thumb below.
+<span style="background-color: #FF0000"> </span> if [ "x${newlib_may_supply_syscalls}" = "xyes" ] ; then
+ #         newlib_cflags="${newlib_cflags} -DARM_RDP_MONITOR"
+<span style="background-color: #FF0000"> </span>   newlib_cflags="${newlib_cflags} -DARM_RDI_MONITOR"
+@@ -629,12 +592,6 @@
+<span style="background-color: #FF0000"> </span> newlib_cflags="${newlib_cflags} -DABORT_MESSAGE -DSMALL_MEMORY -DMISSING_SYSCALL_NAMES"
+<span style="background-color: #FF0000"> </span> syscall_dir=
+<span style="background-color: #FF0000"> </span> ;;
+-  ep9312-*-*)
+-      syscall_dir=syscalls
+-      if [ "x${newlib_may_supply_syscalls}" = "xyes" ] ; then
+-        newlib_cflags="${newlib_cflags} -DARM_RDI_MONITOR"
+-      fi
+-      ;;
+   fido-*-elf)
+<span style="background-color: #FF0000"> </span> newlib_cflags="${newlib_cflags} -DHAVE_RENAME -DHAVE_SYSTEM -DMISSING_SYSCALL_NAMES"
+<span style="background-color: #FF0000"> </span> syscall_dir=
+@@ -758,27 +715,6 @@
+<span style="background-color: #FF0000"> </span>         newlib_cflags="${newlib_cflags} -DTARGET_PTR_SIZE=64" ;;
+<span style="background-color: #FF0000"> </span> esac
+<span style="background-color: #FF0000"> </span> ;;
+-  strongarm-*-*)
+-      syscall_dir=syscalls
+-      ;;
+-  thumb-*-pe)
+-      syscall_dir=syscalls
+-# Don't use the debugging protocols just yet.
+-      ;;
+-  thumb-*-*)
+-      syscall_dir=syscalls
+-# If newlib is supplying syscalls, select which debug protocol is being used.
+-# ARM_RDP_MONITOR selects the Demon monitor.
+-# ARM_RDI_MONITOR selects the Angel monitor.
+-# If neither are defined, then hard coded defaults will be used
+-# to create the program's environment.
+-# If --disable-newlib-supplied-syscalls is specified, then the end-user
+-# may specify the protocol via gcc spec files supplied by libgloss.
+-      if [ "x${newlib_may_supply_syscalls}" = "xyes" ] ; then
+-#         newlib_cflags="${newlib_cflags} -DARM_RDP_MONITOR"
+-        newlib_cflags="${newlib_cflags} -DARM_RDI_MONITOR"
+-      fi
+-      ;;
+   tic6x*)
+<span style="background-color: #FF0000"> </span> syscall_dir=
+<span style="background-color: #FF0000"> </span> newlib_cflags="${newlib_cflags} -DCLOCK_PROVIDED"
+@@ -796,13 +732,6 @@
+   xc16x-*)
+           syscall_dir=syscalls
+         ;;
+-  xscale-*-*)
+-      syscall_dir=syscalls
+-      newlib_cflags="${newlib_cflags} -DHAVE_SYSTEM -DHAVE_RENAME"
+-      if [ "x${newlib_may_supply_syscalls}" = "xyes" ] ; then
+-        newlib_cflags="${newlib_cflags} -DARM_RDI_MONITOR"
+-      fi
+-      ;;
+   xstormy16-*-*)
+<span style="background-color: #FF0000"> </span> syscall_dir=syscalls
+<span style="background-color: #FF0000"> </span> ;;
+diff -Naur newlib-1.19.0.orig/newlib/doc/makedoc.c newlib-1.19.0/newlib/doc/makedoc.c
+--- newlib-1.19.0.orig/newlib/doc/makedoc.c    2009-03-25 22:16:04.000000000 +0100
++++ newlib-1.19.0/newlib/doc/makedoc.c 2011-07-24 06:43:01.681139767 +0200
+@@ -57,7 +57,7 @@
+ {
+     char *ptr;
+     unsigned int write_idx;
+-    unsigned int size;
++    size_t size;
+ } string_type;
+<span style="background-color: #FF0000"> </span>
+<span style="background-color: #FF0000"> </span>
+@@ -68,7 +68,7 @@
+<span style="background-color: #FF0000"> </span>
+ static void DEFUN(init_string_with_size,(buffer, size),
+<span style="background-color: #FF0000"> </span>    string_type *buffer AND
+-         unsigned int size )
++         size_t size )
+ {
+   buffer->write_idx = 0;
+   buffer->size = size;
+@@ -219,8 +219,8 @@
+ stinst_type *pc;
+ stinst_type sstack[STACK];
+ stinst_type *ssp = &sstack[0];
+-int istack[STACK];
+-int *isp = &istack[0];
++long istack[STACK];
++long *isp = &istack[0];
+<span style="background-color: #FF0000"> </span>
+ typedef int *word_type;
+<span style="background-color: #FF0000"> </span>
+@@ -270,7 +270,7 @@
+ {
+     isp++;
+     pc++;
+-    *isp = (int)(*pc);
++    *isp = (long)(*pc);
+     pc++;
+<span style="background-color: #FF0000">     </span>
+ }
+diff -Naur newlib-1.19.0.orig/newlib/libc/configure newlib-1.19.0/newlib/libc/configure
+--- newlib-1.19.0.orig/newlib/libc/configure   2010-12-16 22:58:39.000000000 +0100
++++ newlib-1.19.0/newlib/libc/configure        2011-07-24 06:43:01.702140072 +0200
+@@ -625,7 +625,10 @@
+ HAVE_XDR_DIR_TRUE
+ LIBC_XDR_DEF
+ LIBC_XDR_LIB
++HAVE_POSIX_DIR_FALSE
++HAVE_POSIX_DIR_TRUE
+ LIBC_POSIX_DEF
++LIBC_POSIX_LIB
+ HAVE_STDIO64_DIR_FALSE
+ HAVE_STDIO64_DIR_TRUE
+ LIBC_STDIO64_DEF
+@@ -638,9 +641,6 @@
+ HAVE_SIGNAL_DIR_TRUE
+ LIBC_SIGNAL_DEF
+ LIBC_SIGNAL_LIB
+-HAVE_POSIX_DIR_FALSE
+-HAVE_POSIX_DIR_TRUE
+-LIBC_POSIX_LIB
+ CRT0
+ subdirs
+ CPP
+@@ -11805,24 +11805,6 @@
+<span style="background-color: #FF0000"> </span>
+<span style="background-color: #FF0000"> </span>
+<span style="background-color: #FF0000"> </span>
+-LIBC_POSIX_LIB=
+-if test -n "${posix_dir}"; then
+-  if test "${use_libtool}" = "yes"; then
+-    LIBC_POSIX_LIB=${posix_dir}/lib${posix_dir}.${aext}
+-  else
+-    LIBC_POSIX_LIB=${posix_dir}/lib.${aext}
+-  fi
+-fi
+-
+- if test x${posix_dir} != x; then
+-  HAVE_POSIX_DIR_TRUE=
+-  HAVE_POSIX_DIR_FALSE='#'
+-else
+-  HAVE_POSIX_DIR_TRUE='#'
+-  HAVE_POSIX_DIR_FALSE=
+-fi
+-
+-
+ LIBC_SIGNAL_LIB=
+ LIBC_SIGNAL_DEF=
+ if test -n "${signal_dir}"; then
+@@ -12225,10 +12207,6 @@
+   as_fn_error "conditional \"am__fastdepCC\" was never defined.
+ Usually this means the macro was only invoked conditionally." "$LINENO" 5
+ fi
+-if test -z "${HAVE_POSIX_DIR_TRUE}" && test -z "${HAVE_POSIX_DIR_FALSE}"; then
+-  as_fn_error "conditional \"HAVE_POSIX_DIR\" was never defined.
+-Usually this means the macro was only invoked conditionally." "$LINENO" 5
+-fi
+ if test -z "${HAVE_SIGNAL_DIR_TRUE}" && test -z "${HAVE_SIGNAL_DIR_FALSE}"; then
+   as_fn_error "conditional \"HAVE_SIGNAL_DIR\" was never defined.
+ Usually this means the macro was only invoked conditionally." "$LINENO" 5
+diff -Naur newlib-1.19.0.orig/newlib/libc/configure.in newlib-1.19.0/newlib/libc/configure.in
+--- newlib-1.19.0.orig/newlib/libc/configure.in        2010-04-23 01:32:40.000000000 +0200
++++ newlib-1.19.0/newlib/libc/configure.in     2011-07-24 06:43:01.702140072 +0200
+@@ -41,17 +41,6 @@
+ dnl for the library and an automake conditional for whether we should
+ dnl build the library.
+<span style="background-color: #FF0000"> </span>
+-LIBC_POSIX_LIB=
+-if test -n "${posix_dir}"; then
+-  if test "${use_libtool}" = "yes"; then
+-    LIBC_POSIX_LIB=${posix_dir}/lib${posix_dir}.${aext}
+-  else
+-    LIBC_POSIX_LIB=${posix_dir}/lib.${aext}
+-  fi
+-fi
+-AC_SUBST(LIBC_POSIX_LIB)
+-AM_CONDITIONAL(HAVE_POSIX_DIR, test x${posix_dir} != x)
+-
+ LIBC_SIGNAL_LIB=
+ LIBC_SIGNAL_DEF=
+ if test -n "${signal_dir}"; then
+diff -Naur newlib-1.19.0.orig/newlib/libc/iconv/iconv.tex newlib-1.19.0/newlib/libc/iconv/iconv.tex
+--- newlib-1.19.0.orig/newlib/libc/iconv/iconv.tex     2004-09-13 19:10:20.000000000 +0200
++++ newlib-1.19.0/newlib/libc/iconv/iconv.tex  2011-07-24 06:43:01.705140119 +0200
+@@ -7,7 +7,7 @@
+<span style="background-color: #FF0000"> </span>
+ @menu
+ * iconv::                           Encoding conversion routines
+-* Introduction::                    Introduction to iconv and encodings
++* Introduction to iconv::           Introduction to iconv and encodings
+ * Supported encodings::             The list of currently supported encodings
+ * iconv design decisions::          General iconv library design issues
+ * iconv configuration::             iconv-related configure script options
+@@ -24,8 +24,8 @@
+ @include iconv/iconv.def
+<span style="background-color: #FF0000"> </span>
+ @page
+-@node Introduction
+-@section Introduction
++@node Introduction to iconv
++@section Introduction to iconv
+ @findex encoding
+ @findex character set
+ @findex charset
+diff -Naur newlib-1.19.0.orig/newlib/libc/include/inttypes.h newlib-1.19.0/newlib/libc/include/inttypes.h
+--- newlib-1.19.0.orig/newlib/libc/include/inttypes.h  2009-01-19 23:02:06.000000000 +0100
++++ newlib-1.19.0/newlib/libc/include/inttypes.h       2011-07-24 06:43:01.705140119 +0200
+@@ -242,15 +242,17 @@
+ #define SCNxMAX               __SCNMAX(x)
+<span style="background-color: #FF0000"> </span>
+ /* ptr types */
+-#if __have_long64
+-#define __PRIPTR(x) __STRINGIFY(l##x)
+-#define __SCNPTR(x) __STRINGIFY(l##x)
+-#elif __have_longlong64
+-#define __PRIPTR(x) __STRINGIFY(ll##x)
+-#define __SCNPTR(x) __STRINGIFY(ll##x)
++#if INTPTR_MAX == INT64_MAX
++#define __PRIPTR(x) __PRI64(x)
++#define __SCNPTR(x) __SCN64(x)
++#elif INTPTR_MAX == INT32_MAX
++#define __PRIPTR(x) __PRI32(x)
++#define __SCNPTR(x) __SCN32(x)
++#elif INTPTR_MAX == INT16_MAX
++#define __PRIPTR(x) __PRI16(x)
++#define __SCNPTR(x) __SCN16(x)
+ #else
+-#define __PRIPTR(x) __STRINGIFY(x)
+-#define __SCNPTR(x) __STRINGIFY(x)
++#error cannot determine PRI*PTR
+ #endif
+<span style="background-color: #FF0000"> </span>
+ #define PRIdPTR               __PRIPTR(d)
+diff -Naur newlib-1.19.0.orig/newlib/libc/include/machine/_default_types.h newlib-1.19.0/newlib/libc/include/machine/_default_types.h
+--- newlib-1.19.0.orig/newlib/libc/include/machine/_default_types.h    2008-06-12 00:14:54.000000000 +0200
++++ newlib-1.19.0/newlib/libc/include/machine/_default_types.h 2011-07-24 06:43:01.705140119 +0200
+@@ -54,14 +54,14 @@
+ #endif
+ #endif
+<span style="background-color: #FF0000"> </span>
+-#if __EXP(INT_MAX) == 0x7fffffffL
+-typedef signed int __int32_t;
+-typedef unsigned int __uint32_t;
+-#define ___int32_t_defined 1
+-#elif __EXP(LONG_MAX) == 0x7fffffffL
++#if __EXP(LONG_MAX) == 0x7fffffffL
+ typedef signed long __int32_t;
+ typedef unsigned long __uint32_t;
+ #define ___int32_t_defined 1
++#elif __EXP(INT_MAX) == 0x7fffffffL
++typedef signed int __int32_t;
++typedef unsigned int __uint32_t;
++#define ___int32_t_defined 1
+ #elif __EXP(SHRT_MAX) == 0x7fffffffL
+ typedef signed short __int32_t;
+ typedef unsigned short __uint32_t;
+diff -Naur newlib-1.19.0.orig/newlib/libc/include/signal.h newlib-1.19.0/newlib/libc/include/signal.h
+--- newlib-1.19.0.orig/newlib/libc/include/signal.h    2010-07-13 13:18:55.000000000 +0200
++++ newlib-1.19.0/newlib/libc/include/signal.h 2011-07-24 06:43:01.706140134 +0200
+@@ -7,9 +7,6 @@
+ _BEGIN_STD_C
+<span style="background-color: #FF0000"> </span>
+ typedef int   sig_atomic_t;           /* Atomic entity type (ANSI) */
+-#ifndef _POSIX_SOURCE
+-typedef _sig_func_ptr sighandler_t;   /* glibc naming */
+-#endif /* !_POSIX_SOURCE */
+<span style="background-color: #FF0000"> </span>
+ #define SIG_DFL ((_sig_func_ptr)0)    /* Default action */
+ #define SIG_IGN ((_sig_func_ptr)1)    /* Ignore action */
+@@ -23,6 +20,7 @@
+ #ifndef _REENT_ONLY
+ _sig_func_ptr _EXFUN(signal, (int, _sig_func_ptr));
+ int   _EXFUN(raise, (int));
++void  _EXFUN(psignal, (int, const char *));
+ #endif
+<span style="background-color: #FF0000"> </span>
+ _END_STD_C
+diff -Naur newlib-1.19.0.orig/newlib/libc/include/stdint.h newlib-1.19.0/newlib/libc/include/stdint.h
+--- newlib-1.19.0.orig/newlib/libc/include/stdint.h    2009-04-24 23:55:07.000000000 +0200
++++ newlib-1.19.0/newlib/libc/include/stdint.h 2011-07-24 06:43:01.706140134 +0200
+@@ -33,7 +33,7 @@
+ /* Check if "long" is 64bit or 32bit wide */
+ #if __STDINT_EXP(LONG_MAX) > 0x7fffffff
+ #define __have_long64 1
+-#elif __STDINT_EXP(LONG_MAX) == 0x7fffffff && !defined(__SPU__)
++#elif __STDINT_EXP(LONG_MAX) == 0x7fffffff
+ #define __have_long32 1
+ #endif
+<span style="background-color: #FF0000"> </span>
+@@ -49,14 +49,14 @@
+ #define __int_least8_t_defined 1
+ #endif
+<span style="background-color: #FF0000"> </span>
+-#if __STDINT_EXP(SHRT_MAX) == 0x7fff
+-typedef signed short int16_t;
+-typedef unsigned short uint16_t;
+-#define __int16_t_defined 1
+-#elif __STDINT_EXP(INT_MAX) == 0x7fff
++#if __STDINT_EXP(INT_MAX) == 0x7fff
+ typedef signed int int16_t;
+ typedef unsigned int uint16_t;
+ #define __int16_t_defined 1
++#elif __STDINT_EXP(SHRT_MAX) == 0x7fff
++typedef signed short int16_t;
++typedef unsigned short uint16_t;
++#define __int16_t_defined 1
+ #elif __STDINT_EXP(SCHAR_MAX) == 0x7fff
+ typedef signed char int16_t;
+ typedef unsigned char uint16_t;
+@@ -239,6 +239,29 @@
+  * GCC doesn't provide an appropriate macro for [u]intptr_t
+  * For now, use __PTRDIFF_TYPE__
+  */
++#if defined(__SIZEOF_POINTER__)
++#if __SIZEOF_POINTER__ == 8
++  typedef int64_t intptr_t;
++  typedef uint64_t uintptr_t;
++#define INTPTR_MAX INT64_MAX
++#define INTPTR_MIN INT64_MIN
++#define UINTPTR_MAX UINT64_MAX
++#elif __SIZEOF_POINTER__ == 4
++  typedef int32_t intptr_t;
++  typedef uint32_t uintptr_t;
++#define INTPTR_MAX INT32_MAX
++#define INTPTR_MIN INT32_MIN
++#define UINTPTR_MAX UINT32_MAX
++#elif __SIZEOF_POINTER__ == 2
++  typedef int16_t intptr_t;
++  typedef uint16_t uintptr_t;
++#define INTPTR_MAX INT16_MAX
++#define INTPTR_MIN INT16_MIN
++#define UINTPTR_MAX UINT16_MAX
++#else
++#error cannot determine intptr_t
++#endif
++#else
+ #if defined(__PTRDIFF_TYPE__)
+ typedef signed __PTRDIFF_TYPE__ intptr_t;
+ typedef unsigned __PTRDIFF_TYPE__ uintptr_t;
+@@ -260,6 +283,7 @@
+ #define INTPTR_MIN (-__STDINT_EXP(LONG_MAX) - 1)
+ #define UINTPTR_MAX (__STDINT_EXP(LONG_MAX) * 2UL + 1)
+ #endif
++#endif
+<span style="background-color: #FF0000"> </span>
+ /* Limits of Specified-Width Integer Types */
+<span style="background-color: #FF0000"> </span>
+@@ -408,6 +432,8 @@
+ /* This must match size_t in stddef.h, currently long unsigned int */
+ #ifdef __SIZE_MAX__
+ #define SIZE_MAX __SIZE_MAX__
++#elif defined(__SIZEOF_SIZE_T__) && defined(__CHAR_BIT__)
++#define SIZE_MAX (((1UL << (__SIZEOF_SIZE_T__ * __CHAR_BIT__ - 1)) - 1) * 2 + 1)
+ #else
+ #define SIZE_MAX (__STDINT_EXP(LONG_MAX) * 2UL + 1)
+ #endif
+diff -Naur newlib-1.19.0.orig/newlib/libc/include/stdio_ext.h newlib-1.19.0/newlib/libc/include/stdio_ext.h
+--- newlib-1.19.0.orig/newlib/libc/include/stdio_ext.h 1970-01-01 01:00:00.000000000 +0100
++++ newlib-1.19.0/newlib/libc/include/stdio_ext.h      2011-07-24 06:43:01.706140134 +0200
+@@ -0,0 +1,22 @@
++/*
++ * stdio_ext.h
++ *
++ * Definitions for I/O internal operations, originally from Solaris.
++ */
++
++#ifndef _STDIO_EXT_H_
++#define _STDIO_EXT_H_
++
++#ifdef __rtems__
++#error "<stdio_ext.h> not supported"
++#endif
++
++#include <stdio.h>
++
++_BEGIN_STD_C
++
++void   _EXFUN(__fpurge,(FILE *));
++
++_END_STD_C
++
++#endif /* _STDIO_EXT_H_ */
+diff -Naur newlib-1.19.0.orig/newlib/libc/include/stdio.h newlib-1.19.0/newlib/libc/include/stdio.h
+--- newlib-1.19.0.orig/newlib/libc/include/stdio.h     2010-02-26 10:41:43.000000000 +0100
++++ newlib-1.19.0/newlib/libc/include/stdio.h  2011-07-24 06:43:01.706140134 +0200
+@@ -308,7 +308,7 @@
+  * Routines in POSIX 1003.1:2001.
+  */
+<span style="background-color: #FF0000"> </span>
+-#ifndef __STRICT_ANSI__
++#if (!defined(__STRICT_ANSI__) || (__STDC_VERSION__ >= 199901L))
+ #ifndef _REENT_ONLY
+ FILE *        _EXFUN(fdopen, (int, const char *));
+ #endif
+diff -Naur newlib-1.19.0.orig/newlib/libc/include/stdlib.h newlib-1.19.0/newlib/libc/include/stdlib.h
+--- newlib-1.19.0.orig/newlib/libc/include/stdlib.h    2010-07-19 20:21:11.000000000 +0200
++++ newlib-1.19.0/newlib/libc/include/stdlib.h 2011-07-24 06:43:01.707140149 +0200
+@@ -38,7 +38,7 @@
+   long rem; /* remainder */
+ } ldiv_t;
+<span style="background-color: #FF0000"> </span>
+-#ifndef __STRICT_ANSI__
++#if !defined(__STRICT_ANSI__) || (__STDC_VERSION__ >= 199901L)
+ typedef struct
+ {
+   long long int quot; /* quotient */
+@@ -63,13 +63,12 @@
+ int   _EXFUN(abs,(int));
+ int   _EXFUN(atexit,(_VOID (*__func)(_VOID)));
+ double        _EXFUN(atof,(const char *__nptr));
+-#ifndef __STRICT_ANSI__
+-float _EXFUN(atoff,(const char *__nptr));
+-#endif
+ int   _EXFUN(atoi,(const char *__nptr));
+-int   _EXFUN(_atoi_r,(struct _reent *, const char *__nptr));
+ long  _EXFUN(atol,(const char *__nptr));
++#ifndef __STRICT_ANSI__
++int   _EXFUN(_atoi_r,(struct _reent *, const char *__nptr));
+ long  _EXFUN(_atol_r,(struct _reent *, const char *__nptr));
++#endif /* ! __STRICT_ANSI__ */
+ _PTR  _EXFUN(bsearch,(const _PTR __key,
+<span style="background-color: #FF0000"> </span>                const _PTR __base,
+<span style="background-color: #FF0000"> </span>                size_t __nmemb,
+@@ -80,10 +79,10 @@
+ _VOID _EXFUN(exit,(int __status) _ATTRIBUTE ((noreturn)));
+ _VOID _EXFUN_NOTHROW(free,(_PTR));
+ char *  _EXFUN(getenv,(const char *__string));
++#ifndef __STRICT_ANSI__
+ char *        _EXFUN(_getenv_r,(struct _reent *, const char *__string));
+ char *        _EXFUN(_findenv,(_CONST char *, int *));
+ char *        _EXFUN(_findenv_r,(struct _reent *, _CONST char *, int *));
+-#ifndef __STRICT_ANSI__
+ extern char *suboptarg;                       /* getsubopt(3) external variable */
+ int   _EXFUN(getsubopt,(char **, char * const *, char **));
+ #endif
+@@ -91,16 +90,16 @@
+ ldiv_t        _EXFUN(ldiv,(long __numer, long __denom));
+ _PTR  _EXFUN_NOTHROW(malloc,(size_t __size));
+ int   _EXFUN(mblen,(const char *, size_t));
+-int   _EXFUN(_mblen_r,(struct _reent *, const char *, size_t, _mbstate_t *));
+ int   _EXFUN(mbtowc,(wchar_t *, const char *, size_t));
+-int   _EXFUN(_mbtowc_r,(struct _reent *, wchar_t *, const char *, size_t, _mbstate_t *));
+ int   _EXFUN(wctomb,(char *, wchar_t));
+-int   _EXFUN(_wctomb_r,(struct _reent *, char *, wchar_t, _mbstate_t *));
+ size_t        _EXFUN(mbstowcs,(wchar_t *, const char *, size_t));
+-size_t        _EXFUN(_mbstowcs_r,(struct _reent *, wchar_t *, const char *, size_t, _mbstate_t *));
+ size_t        _EXFUN(wcstombs,(char *, const wchar_t *, size_t));
+-size_t        _EXFUN(_wcstombs_r,(struct _reent *, char *, const wchar_t *, size_t, _mbstate_t *));
+ #ifndef __STRICT_ANSI__
++int   _EXFUN(_mblen_r,(struct _reent *, const char *, size_t, _mbstate_t *));
++int   _EXFUN(_mbtowc_r,(struct _reent *, wchar_t *, const char *, size_t, _mbstate_t *));
++int   _EXFUN(_wctomb_r,(struct _reent *, char *, wchar_t, _mbstate_t *));
++size_t        _EXFUN(_mbstowcs_r,(struct _reent *, wchar_t *, const char *, size_t, _mbstate_t *));
++size_t        _EXFUN(_wcstombs_r,(struct _reent *, char *, const wchar_t *, size_t, _mbstate_t *));
+ #ifndef _REENT_ONLY
+ char *        _EXFUN(mkdtemp,(char *));
+ int   _EXFUN(mkostemp,(char *, int));
+@@ -133,10 +132,11 @@
+ # endif
+ #endif
+ long  _EXFUN(strtol,(const char *__n, char **__end_PTR, int __base));
+-long  _EXFUN(_strtol_r,(struct _reent *,const char *__n, char **__end_PTR, int __base));
+ unsigned long _EXFUN(strtoul,(const char *__n, char **__end_PTR, int __base));
++#ifndef __STRICT_ANSI__
+ unsigned long _EXFUN(_strtoul_r,(struct _reent *,const char *__n, char **__end_PTR, int __base));
+-
++long  _EXFUN(_strtol_r,(struct _reent *,const char *__n, char **__end_PTR, int __base));
++#endif /* !__STRICT_ANSI__ */
+ int   _EXFUN(system,(const char *__string));
+<span style="background-color: #FF0000"> </span>
+ #ifndef __STRICT_ANSI__
+@@ -163,33 +163,39 @@
+ int   _EXFUN(rand_r,(unsigned *__seed));
+<span style="background-color: #FF0000"> </span>
+ double _EXFUN(drand48,(_VOID));
+-double _EXFUN(_drand48_r,(struct _reent *));
+ double _EXFUN(erand48,(unsigned short [3]));
+-double _EXFUN(_erand48_r,(struct _reent *, unsigned short [3]));
+ long   _EXFUN(jrand48,(unsigned short [3]));
+-long   _EXFUN(_jrand48_r,(struct _reent *, unsigned short [3]));
+ _VOID  _EXFUN(lcong48,(unsigned short [7]));
+-_VOID  _EXFUN(_lcong48_r,(struct _reent *, unsigned short [7]));
+ long   _EXFUN(lrand48,(_VOID));
+-long   _EXFUN(_lrand48_r,(struct _reent *));
+ long   _EXFUN(mrand48,(_VOID));
+-long   _EXFUN(_mrand48_r,(struct _reent *));
+ long   _EXFUN(nrand48,(unsigned short [3]));
+-long   _EXFUN(_nrand48_r,(struct _reent *, unsigned short [3]));
+ unsigned short *
+        _EXFUN(seed48,(unsigned short [3]));
++_VOID  _EXFUN(srand48,(long));
++long long _EXFUN(atoll,(const char *__nptr));
++#ifndef __STRICT_ANSI__
++double _EXFUN(_drand48_r,(struct _reent *));
++double _EXFUN(_erand48_r,(struct _reent *, unsigned short [3]));
++long   _EXFUN(_jrand48_r,(struct _reent *, unsigned short [3]));
++_VOID  _EXFUN(_lcong48_r,(struct _reent *, unsigned short [7]));
++long   _EXFUN(_lrand48_r,(struct _reent *));
++long   _EXFUN(_mrand48_r,(struct _reent *));
++long   _EXFUN(_nrand48_r,(struct _reent *, unsigned short [3]));
+ unsigned short *
+        _EXFUN(_seed48_r,(struct _reent *, unsigned short [3]));
+-_VOID  _EXFUN(srand48,(long));
+ _VOID  _EXFUN(_srand48_r,(struct _reent *, long));
+-long long _EXFUN(atoll,(const char *__nptr));
+ long long _EXFUN(_atoll_r,(struct _reent *, const char *__nptr));
++#endif /* ! __STRICT_ANSI__ */
++#if !defined(__STRICT_ANSI__) || (__STDC_VERSION__ >= 199901L)
+ long long _EXFUN(llabs,(long long));
+ lldiv_t       _EXFUN(lldiv,(long long __numer, long long __denom));
+ long long _EXFUN(strtoll,(const char *__n, char **__end_PTR, int __base));
+-long long _EXFUN(_strtoll_r,(struct _reent *, const char *__n, char **__end_PTR, int __base));
+ unsigned long long _EXFUN(strtoull,(const char *__n, char **__end_PTR, int __base));
++#endif
++#ifndef __STRICT_ANSI__
++long long _EXFUN(_strtoll_r,(struct _reent *, const char *__n, char **__end_PTR, int __base));
+ unsigned long long _EXFUN(_strtoull_r,(struct _reent *, const char *__n, char **__end_PTR, int __base));
++#endif /* ! __STRICT_ANSI__ */
+<span style="background-color: #FF0000"> </span>
+ #ifndef __CYGWIN__
+ _VOID _EXFUN(cfree,(_PTR));
+@@ -203,6 +209,7 @@
+<span style="background-color: #FF0000"> </span>
+ #endif /* ! __STRICT_ANSI__ */
+<span style="background-color: #FF0000"> </span>
++#ifndef __STRICT_ANSI__
+ char *        _EXFUN(_dtoa_r,(struct _reent *, double, int, int, int *, int*, char**));
+ #ifndef __CYGWIN__
+ _PTR  _EXFUN_NOTHROW(_malloc_r,(struct _reent *, size_t));
+@@ -214,6 +221,7 @@
+ int   _EXFUN(_system_r,(struct _reent *, const char *));
+<span style="background-color: #FF0000"> </span>
+ _VOID _EXFUN(__eprintf,(const char *, const char *, unsigned int, const char *));
++#endif /* ! __STRICT_ANSI__ */
+<span style="background-color: #FF0000"> </span>
+ /* On platforms where long double equals double.  */
+ #ifdef _LDBL_EQ_DBL
+diff -Naur newlib-1.19.0.orig/newlib/libc/include/string.h newlib-1.19.0/newlib/libc/include/string.h
+--- newlib-1.19.0.orig/newlib/libc/include/string.h    2008-06-18 17:27:27.000000000 +0200
++++ newlib-1.19.0/newlib/libc/include/string.h 2011-07-24 06:43:01.707140149 +0200
+@@ -9,6 +9,7 @@
+<span style="background-color: #FF0000"> </span>
+ #include "_ansi.h"
+ #include <sys/reent.h>
++#include <sys/cdefs.h>
+<span style="background-color: #FF0000"> </span>
+ #define __need_size_t
+ #include <stddef.h>
+@@ -49,51 +50,58 @@
+ #ifndef __STRICT_ANSI__
+ char<span style="background-color: #FF0000"> </span>    *_EXFUN(strtok_r,(char *, const char *, char **));
+<span style="background-color: #FF0000"> </span>
+-int    _EXFUN(bcmp,(const void *, const void *, size_t));
+-void   _EXFUN(bcopy,(const void *, void *, size_t));
+-void   _EXFUN(bzero,(void *, size_t));
+-int    _EXFUN(ffs,(int));
+-char<span style="background-color: #FF0000"> </span>    *_EXFUN(index,(const char *, int));
+ _PTR   _EXFUN(memccpy,(_PTR, const _PTR, int, size_t));
+ _PTR   _EXFUN(mempcpy,(_PTR, const _PTR, size_t));
+ _PTR   _EXFUN(memmem, (const _PTR, size_t, const _PTR, size_t));
+-char<span style="background-color: #FF0000"> </span>    *_EXFUN(rindex,(const char *, int));
+ char<span style="background-color: #FF0000"> </span>    *_EXFUN(stpcpy,(char *, const char *));
+ char<span style="background-color: #FF0000"> </span>    *_EXFUN(stpncpy,(char *, const char *, size_t));
+-int    _EXFUN(strcasecmp,(const char *, const char *));
+ char  *_EXFUN(strcasestr,(const char *, const char *));
++char<span style="background-color: #FF0000"> </span>    *_EXFUN(strchrnul,(const char *, int));
+ char<span style="background-color: #FF0000"> </span>    *_EXFUN(strdup,(const char *));
+ char<span style="background-color: #FF0000"> </span>    *_EXFUN(_strdup_r,(struct _reent *, const char *));
+ char<span style="background-color: #FF0000"> </span>    *_EXFUN(strndup,(const char *, size_t));
+ char<span style="background-color: #FF0000"> </span>    *_EXFUN(_strndup_r,(struct _reent *, const char *, size_t));
+-char<span style="background-color: #FF0000"> </span>    *_EXFUN(strerror_r,(int, char *, size_t));
++/* There are two common strerror_r variants.  If you request
++   _GNU_SOURCE, you get the GNU version; otherwise you get the POSIX
++   version.  POSIX requires that #undef strerror_r will still let you
++   invoke the underlying function, but that requires gcc support.  */
++#ifdef _GNU_SOURCE
++char    *_EXFUN(strerror_r,(int, char *, size_t));
++#else
++# ifdef __GNUC__
++int      _EXFUN(strerror_r,(int, char *, size_t)) __asm__ (__ASMNAME ("__xpg_strerror_r"));
++# else
++int      _EXFUN(__xpg_strerror_r,(int, char *, size_t));
++#  define strerror_r __xpg_strerror_r
++# endif
++#endif
+ size_t         _EXFUN(strlcat,(char *, const char *, size_t));
+ size_t         _EXFUN(strlcpy,(char *, const char *, size_t));
+-int    _EXFUN(strncasecmp,(const char *, const char *, size_t));
+ size_t         _EXFUN(strnlen,(const char *, size_t));
+ char<span style="background-color: #FF0000"> </span>    *_EXFUN(strsep,(char **, const char *));
+ char  *_EXFUN(strlwr,(char *));
+ char  *_EXFUN(strupr,(char *));
++char  *_EXFUN(strsignal, (int __signo));
+ #ifdef __CYGWIN__
+-#ifndef DEFS_H        /* Kludge to work around problem compiling in gdb */
+-char  *_EXFUN(strsignal, (int __signo));
+-#endif
+ int     _EXFUN(strtosigno, (const char *__name));
+ #endif
+<span style="background-color: #FF0000"> </span>
+-/* These function names are used on Windows and perhaps other systems.  */
+-#ifndef strcmpi
+-#define strcmpi strcasecmp
+-#endif
+-#ifndef stricmp
+-#define stricmp strcasecmp
+-#endif
+-#ifndef strncmpi
+-#define strncmpi strncasecmp
+-#endif
+-#ifndef strnicmp
+-#define strnicmp strncasecmp
+-#endif
++/* Recursive version of strerror.  */
++char *        _EXFUN(_strerror_r, (struct _reent *, int, int, int *));
++
++#if defined _GNU_SOURCE && defined __GNUC__
++#define strdupa(__s) \
++      (__extension__ ({const char *__in = (__s); \
++                       size_t __len = strlen (__in) + 1; \
++                       char * __out = (char *) __builtin_alloca (__len); \
++                       (char *) memcpy (__out, __in, __len);}))
++#define strndupa(__s, __n) \
++      (__extension__ ({const char *__in = (__s); \
++                       size_t __len = strnlen (__in, (__n)) + 1; \
++                       char *__out = (char *) __builtin_alloca (__len); \
++                       __out[__len-1] = '\0'; \
++                       (char *) memcpy (__out, __in, __len-1);}))
++#endif /* _GNU_SOURCE && __GNUC__ */
+<span style="background-color: #FF0000"> </span>
+ #endif /* ! __STRICT_ANSI__ */
+<span style="background-color: #FF0000"> </span>
+diff -Naur newlib-1.19.0.orig/newlib/libc/include/sys/cdefs.h newlib-1.19.0/newlib/libc/include/sys/cdefs.h
+--- newlib-1.19.0.orig/newlib/libc/include/sys/cdefs.h 2002-06-20 21:51:24.000000000 +0200
++++ newlib-1.19.0/newlib/libc/include/sys/cdefs.h      2011-07-24 06:43:01.713140239 +0200
+@@ -58,6 +58,27 @@
+ #define __DOTS<span style="background-color: #FF0000">    </span>       , ...
+ #define __THROW
+<span style="background-color: #FF0000"> </span>
++/*
++ * The __CONCAT macro is used to concatenate parts of symbol names, e.g.
++ * with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo.
++ * The __CONCAT macro is a bit tricky to use if it must work in non-ANSI
++ * mode -- there must be no spaces between its arguments, and for nested
++ * __CONCAT's, all the __CONCAT's must be at the left.  __CONCAT can also
++ * concatenate double-quoted strings produced by the __STRING macro, but
++ * this only works with ANSI C.
++ *
++ * __XSTRING is like __STRING, but it expands any macros in its argument
++ * first.  It is only available with ANSI C.
++ */
++#define __CONCAT1(x,y)  x ## y
++#define __CONCAT(x,y)   __CONCAT1(x,y)
++#define __STRING(x)     #x              /* stringify without expanding x */
++#define __XSTRING(x)    __STRING(x)     /* expand x, then stringify */
++
++#ifdef __GNUC__
++# define __ASMNAME(cname)  __XSTRING (__USER_LABEL_PREFIX__) cname
++#endif
++
+ #define __ptr_t void *
+ #define __long_double_t  long double
+<span style="background-color: #FF0000"> </span>
+diff -Naur newlib-1.19.0.orig/newlib/libc/include/sys/_default_fcntl.h newlib-1.19.0/newlib/libc/include/sys/_default_fcntl.h
+--- newlib-1.19.0.orig/newlib/libc/include/sys/_default_fcntl.h        2010-01-14 19:49:13.000000000 +0100
++++ newlib-1.19.0/newlib/libc/include/sys/_default_fcntl.h     2011-07-24 06:43:01.713140239 +0200
+@@ -51,8 +51,6 @@
+ #define O_BINARY      _FBINARY
+ #define O_TEXT                _FTEXT
+ #define O_NOINHERIT   _FNOINHERIT
+-/* O_CLOEXEC is the Linux equivalent to O_NOINHERIT */
+-#define O_CLOEXEC     _FNOINHERIT
+<span style="background-color: #FF0000"> </span>
+ /* The windows header files define versions with a leading underscore.  */
+ #define _O_RDONLY     O_RDONLY
+@@ -124,9 +122,6 @@
+ #define       F_CNVT<span style="background-color: #FF0000"> </span>            12      /* Convert a fhandle to an open fd */
+ #define       F_RSETLKW<span style="background-color: #FF0000"> </span> 13      /* Set or Clear remote record-lock(Blocking) */
+ #endif        /* !_POSIX_SOURCE */
+-#ifdef __CYGWIN__
+-#define       F_DUPFD_CLOEXEC 14      /* As F_DUPFD, but set close-on-exec flag */
+-#endif
+<span style="background-color: #FF0000"> </span>
+ /* fcntl(2) flags (l_type field of flock structure) */
+ #define       F_RDLCK         1       /* read lock */
+diff -Naur newlib-1.19.0.orig/newlib/libc/include/sys/dir.h newlib-1.19.0/newlib/libc/include/sys/dir.h
+--- newlib-1.19.0.orig/newlib/libc/include/sys/dir.h   2010-08-11 20:14:54.000000000 +0200
++++ newlib-1.19.0/newlib/libc/include/sys/dir.h        1970-01-01 01:00:00.000000000 +0100
+@@ -1,10 +0,0 @@
+-/* BSD predecessor of POSIX.1 <dirent.h> and struct dirent */
+-
+-#ifndef _SYS_DIR_H_
+-#define _SYS_DIR_H_
+-
+-#include <dirent.h>
+-
+-#define direct dirent
+-
+-#endif /*_SYS_DIR_H_*/
+diff -Naur newlib-1.19.0.orig/newlib/libc/include/sys/features.h newlib-1.19.0/newlib/libc/include/sys/features.h
+--- newlib-1.19.0.orig/newlib/libc/include/sys/features.h      2010-08-09 10:29:22.000000000 +0200
++++ newlib-1.19.0/newlib/libc/include/sys/features.h   2011-07-24 06:43:01.717140301 +0200
+@@ -15,7 +15,7 @@
+  *  OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY OF THIS
+  *  SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.
+  *
+- *  $Id$
++ *  $Id$
+  */
+<span style="background-color: #FF0000"> </span>
+ #ifndef _SYS_FEATURES_H
+@@ -103,7 +103,7 @@
+ /* #define _POSIX_BARRIERS                        -1 */
+ #define _POSIX_CHOWN_RESTRICTED                            1
+ /* #define _POSIX_CLOCK_SELECTION                 -1 */
+-/* #define _POSIX_CPUTIME                         -1 */
++#define _POSIX_CPUTIME                        <span style="background-color: #FF0000">    </span>       200112L
+ #define _POSIX_FSYNC                          200112L
+ #define _POSIX_IPV6                           200112L
+ #define _POSIX_JOB_CONTROL                         1
+@@ -125,12 +125,12 @@
+ #define _POSIX_SHARED_MEMORY_OBJECTS          200112L<span style="background-color: #FF0000"> </span>
+ #define _POSIX_SHELL                               1
+ /* #define _POSIX_SPAWN                                   -1 */
+-/* #define _POSIX_SPIN_LOCKS                      -1 */
++#define _POSIX_SPIN_LOCKS                         200112L
+ /* #define _POSIX_SPORADIC_SERVER                 -1 */
+ #define _POSIX_SYNCHRONIZED_IO                        200112L
+-/* #define _POSIX_THREAD_ATTR_STACKADDR                   -1 */
++#define _POSIX_THREAD_ATTR_STACKADDR          200112L
+ #define _POSIX_THREAD_ATTR_STACKSIZE          200112L
+-/* #define _POSIX_THREAD_CPUTIME                  -1 */
++#define _POSIX_THREAD_CPUTIME                 200112L
+ /* #define _POSIX_THREAD_PRIO_INHERIT             -1 */
+ /* #define _POSIX_THREAD_PRIO_PROTECT             -1 */
+ #define _POSIX_THREAD_PRIORITY_SCHEDULING     200112L
+@@ -178,6 +178,12 @@
+ /* #define _XOPEN_UNIX                                    -1 */
+<span style="background-color: #FF0000"> </span>
+ #endif /* !__STRICT_ANSI__ || __cplusplus || __STDC_VERSION__ >= 199901L */
++
++/* The value corresponds to UNICODE version 4.0, which is the version
++   supported by XP.  Newlib supports 5.2 (2011) but so far Cygwin needs
++   the MS conversions for double-byte charsets. */
++#define __STDC_ISO_10646__ 200305L
++
+ #endif /* __CYGWIN__ */
+<span style="background-color: #FF0000"> </span>
+ /* Per the permission given in POSIX.1-2008 section 2.2.1, define
+diff -Naur newlib-1.19.0.orig/newlib/libc/include/sys/signal.h newlib-1.19.0/newlib/libc/include/sys/signal.h
+--- newlib-1.19.0.orig/newlib/libc/include/sys/signal.h        2009-10-13 19:31:49.000000000 +0200
++++ newlib-1.19.0/newlib/libc/include/sys/signal.h     2011-07-24 06:43:01.717140301 +0200
+@@ -76,11 +76,12 @@
+  *
+  *  (1) Routines stored in sa_handler should take a single int as
+  *      their argument although the POSIX standard does not require this.
++ *      This is not longer true since at least POSIX.1-2008
+  *  (2) The fields sa_handler and sa_sigaction may overlap, and a conforming
+  *      application should not use both simultaneously.
+  */
+<span style="background-color: #FF0000"> </span>
+-typedef void (*_sig_func_ptr)();
++typedef void (*_sig_func_ptr)(int);
+<span style="background-color: #FF0000"> </span>
+ struct sigaction {
+   int         sa_flags;       /* Special flags to affect behavior of signal */
+diff -Naur newlib-1.19.0.orig/newlib/libc/include/sys/types.h newlib-1.19.0/newlib/libc/include/sys/types.h
+--- newlib-1.19.0.orig/newlib/libc/include/sys/types.h 2010-12-08 15:44:06.000000000 +0100
++++ newlib-1.19.0/newlib/libc/include/sys/types.h      2011-07-24 06:43:01.717140301 +0200
+@@ -98,6 +98,7 @@
+<span style="background-color: #FF0000"> </span>
+ typedef       unsigned short  ushort;         /* System V compatibility */
+ typedef       unsigned int    uint;           /* System V compatibility */
++typedef       unsigned long   ulong;          /* System V compatibility */
+ # endif       /*!_POSIX_SOURCE */
+<span style="background-color: #FF0000"> </span>
+ #ifndef __clock_t_defined
+@@ -462,13 +463,13 @@
+<span style="background-color: #FF0000"> </span>
+ /* POSIX Spin Lock Types */
+<span style="background-color: #FF0000"> </span>
++#if !defined (__CYGWIN__)
+ #if defined(_POSIX_SPIN_LOCKS)
+ typedef __uint32_t pthread_spinlock_t;        /* POSIX Spin Lock Object */
+ #endif /* defined(_POSIX_SPIN_LOCKS) */
+<span style="background-color: #FF0000"> </span>
+ /* POSIX Reader/Writer Lock Types */
+<span style="background-color: #FF0000"> </span>
+-#if !defined (__CYGWIN__)
+ #if defined(_POSIX_READER_WRITER_LOCKS)
+ typedef __uint32_t pthread_rwlock_t;         /* POSIX RWLock Object */
+ typedef struct {
+diff -Naur newlib-1.19.0.orig/newlib/libc/include/sys/unistd.h newlib-1.19.0/newlib/libc/include/sys/unistd.h
+--- newlib-1.19.0.orig/newlib/libc/include/sys/unistd.h        2010-10-08 17:28:49.000000000 +0200
++++ newlib-1.19.0/newlib/libc/include/sys/unistd.h     2011-07-24 06:43:01.718140316 +0200
+@@ -487,10 +487,11 @@
+ #define _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS       16
+ #define _CS_POSIX_V7_WIDTH_RESTRICTED_ENVS    17
+ #define _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS    _CS_POSIX_V7_WIDTH_RESTRICTED_ENVS
++#define _CS_XBS5_WIDTH_RESTRICTED_ENVS        _CS_POSIX_V7_WIDTH_RESTRICTED_ENVS
+ #define _CS_POSIX_V7_THREADS_CFLAGS           18
+ #define _CS_POSIX_V7_THREADS_LDFLAGS          19
+ #define _CS_V7_ENV                            20
+-#define _CS_V6_ENV                           _CS_V6_ENV
++#define _CS_V6_ENV                            _CS_V7_ENV
+ #endif
+<span style="background-color: #FF0000"> </span>
+ #ifndef __CYGWIN__
+diff -Naur newlib-1.19.0.orig/newlib/libc/include/time.h newlib-1.19.0/newlib/libc/include/time.h
+--- newlib-1.19.0.orig/newlib/libc/include/time.h      2008-10-16 23:53:58.000000000 +0200
++++ newlib-1.19.0/newlib/libc/include/time.h   2011-07-24 06:43:01.718140316 +0200
+@@ -212,7 +212,7 @@
+    the identifier of the CPU_time clock associated with the PROCESS
+    making the function call.  */
+<span style="background-color: #FF0000"> </span>
+-#define CLOCK_PROCESS_CPUTIME (clockid_t)2
++#define CLOCK_PROCESS_CPUTIME_ID (clockid_t)2
+<span style="background-color: #FF0000"> </span>
+ #endif
+<span style="background-color: #FF0000"> </span>
+@@ -222,7 +222,7 @@
+     the identifier of the CPU_time clock associated with the THREAD
+     making the function call.  */
+<span style="background-color: #FF0000"> </span>
+-#define CLOCK_THREAD_CPUTIME (clockid_t)3
++#define CLOCK_THREAD_CPUTIME_ID (clockid_t)3
+<span style="background-color: #FF0000"> </span>
+ #endif
+<span style="background-color: #FF0000"> </span>
+diff -Naur newlib-1.19.0.orig/newlib/libc/include/wchar.h newlib-1.19.0/newlib/libc/include/wchar.h
+--- newlib-1.19.0.orig/newlib/libc/include/wchar.h     2009-10-15 10:23:27.000000000 +0200
++++ newlib-1.19.0/newlib/libc/include/wchar.h  2011-07-24 06:43:01.718140316 +0200
+@@ -16,6 +16,9 @@
+ /* For _mbstate_t definition. */
+ #include <sys/_types.h>
+<span style="background-color: #FF0000"> </span>
++/* For __STDC_ISO_10646__ */
++#include <sys/features.h>
++
+ #ifndef NULL
+ #define NULL  0
+ #endif
+diff -Naur newlib-1.19.0.orig/newlib/libc/locale/lmessages.c newlib-1.19.0/newlib/libc/locale/lmessages.c
+--- newlib-1.19.0.orig/newlib/libc/locale/lmessages.c  2010-04-28 11:59:37.000000000 +0200
++++ newlib-1.19.0/newlib/libc/locale/lmessages.c       2011-07-24 06:43:01.726140437 +0200
+@@ -42,9 +42,9 @@
+<span style="background-color: #FF0000"> </span> "^[nN]" ,     /* noexpr */
+<span style="background-color: #FF0000"> </span> "yes" ,       /* yesstr */
+<span style="background-color: #FF0000"> </span> "no"          /* nostr */
+-      "ASCII"               /* codeset */
+ #ifdef __HAVE_LOCALE_INFO_EXTENDED__
+-      , L"^[yY]" ,  /* wyesexpr */
++      , "ASCII" ,   /* codeset */
++      L"^[yY]" ,    /* wyesexpr */
+<span style="background-color: #FF0000"> </span> L"^[nN]" ,    /* wnoexpr */
+<span style="background-color: #FF0000"> </span> L"yes" ,      /* wyesstr */
+<span style="background-color: #FF0000"> </span> L"no"         /* wnostr */
+diff -Naur newlib-1.19.0.orig/newlib/libc/locale/lmessages.h newlib-1.19.0/newlib/libc/locale/lmessages.h
+--- newlib-1.19.0.orig/newlib/libc/locale/lmessages.h  2010-04-28 11:59:37.000000000 +0200
++++ newlib-1.19.0/newlib/libc/locale/lmessages.h       2011-07-24 06:43:01.726140437 +0200
+@@ -50,7 +50,7 @@
+ };
+<span style="background-color: #FF0000"> </span>
+ struct lc_messages_T *__get_current_messages_locale(void);
+-int __numeric_load_locale(const char *, void *, const char *);
++int __messages_load_locale(const char *, void *, const char *);
+<span style="background-color: #FF0000"> </span>
+ __END_DECLS
+<span style="background-color: #FF0000"> </span>
+diff -Naur newlib-1.19.0.orig/newlib/libc/locale/locale.c newlib-1.19.0/newlib/libc/locale/locale.c
+--- newlib-1.19.0.orig/newlib/libc/locale/locale.c     2010-11-19 11:02:36.000000000 +0100
++++ newlib-1.19.0/newlib/libc/locale/locale.c  2011-07-24 06:43:01.727140453 +0200
+@@ -182,6 +182,7 @@
+ #include "lmonetary.h"
+ #include "lnumeric.h"
+ #include "lctype.h"
++#include "timelocal.h"
+ #include "../stdlib/local.h"
+<span style="background-color: #FF0000"> </span>
+ #define _LC_LAST      7
+@@ -235,7 +236,11 @@
+ static char current_categories[_LC_LAST][ENCODING_LEN + 1] = {
+     "C",
+     "C",
++#ifdef __CYGWIN__ /* Cygwin starts with LC_CTYPE set to "C.UTF-8". */
++    "C.UTF-8",
++#else
+     "C",
++#endif
+     "C",
+     "C",
+     "C",
+@@ -255,13 +260,12 @@
+<span style="background-color: #FF0000"> </span>
+ #endif /* _MB_CAPABLE */
+<span style="background-color: #FF0000"> </span>
+-#if 0 /*def __CYGWIN__  TODO: temporarily(?) disable C == UTF-8 */
++#ifdef __CYGWIN__
+ static char lc_ctype_charset[ENCODING_LEN + 1] = "UTF-8";
+-static char lc_message_charset[ENCODING_LEN + 1] = "UTF-8";
+ #else
+ static char lc_ctype_charset[ENCODING_LEN + 1] = "ASCII";
+-static char lc_message_charset[ENCODING_LEN + 1] = "ASCII";
+ #endif
++static char lc_message_charset[ENCODING_LEN + 1] = "ASCII";
+ static int lc_ctype_cjk_lang = 0;
+<span style="background-color: #FF0000"> </span>
+ char *
+@@ -432,7 +436,7 @@
+ #ifdef _MB_CAPABLE
+ #ifdef __CYGWIN__
+ extern void __set_charset_from_locale (const char *locale, char *charset);
+-extern int __set_locale_from_locale_alias (const char *, char *);
++extern char *__set_locale_from_locale_alias (const char *, char *);
+ extern int __collate_load_locale (const char *, void *, const char *);
+ #endif /* __CYGWIN__ */
+<span style="background-color: #FF0000"> </span>
+@@ -495,11 +499,7 @@
+   if (!strcmp (locale, "POSIX"))
+     strcpy (locale, "C");
+   if (!strcmp (locale, "C"))                                /* Default "C" locale */
+-#if 0 /*def __CYGWIN__  TODO: temporarily(?) disable C == UTF-8 */
+-    strcpy (charset, "UTF-8");
+-#else
+     strcpy (charset, "ASCII");
+-#endif
+   else if (locale[0] == 'C'
+<span style="background-color: #FF0000"> </span>    && (locale[1] == '-'         /* Old newlib style */
+<span style="background-color: #FF0000"> </span>        || locale[1] == '.'))    /* Extension for the C locale to allow
+@@ -952,7 +952,7 @@
+ _DEFUN_VOID(__locale_msgcharset)
+ {
+ #ifdef __HAVE_LOCALE_INFO__
+-  return __get_current_messages_locale ()->codeset;
++  return (char *) __get_current_messages_locale ()->codeset;
+ #else
+   return lc_message_charset;
+ #endif
+@@ -972,21 +972,21 @@
+   if (__nlocale_changed)
+     {
+       struct lc_numeric_T *n = __get_current_numeric_locale ();
+-      lconv.decimal_point = n->decimal_point;
+-      lconv.thousands_sep = n->thousands_sep;
+-      lconv.grouping = n->grouping;
++      lconv.decimal_point = (char *) n->decimal_point;
++      lconv.thousands_sep = (char *) n->thousands_sep;
++      lconv.grouping = (char *) n->grouping;
+       __nlocale_changed = 0;
+     }
+   if (__mlocale_changed)
+     {
+       struct lc_monetary_T *m = __get_current_monetary_locale ();
+-      lconv.int_curr_symbol = m->int_curr_symbol;
+-      lconv.currency_symbol = m->currency_symbol;
+-      lconv.mon_decimal_point = m->mon_decimal_point;
+-      lconv.mon_thousands_sep = m->mon_thousands_sep;
+-      lconv.mon_grouping = m->mon_grouping;
+-      lconv.positive_sign = m->positive_sign;
+-      lconv.negative_sign = m->negative_sign;
++      lconv.int_curr_symbol = (char *) m->int_curr_symbol;
++      lconv.currency_symbol = (char *) m->currency_symbol;
++      lconv.mon_decimal_point = (char *) m->mon_decimal_point;
++      lconv.mon_thousands_sep = (char *) m->mon_thousands_sep;
++      lconv.mon_grouping = (char *) m->mon_grouping;
++      lconv.positive_sign = (char *) m->positive_sign;
++      lconv.negative_sign = (char *) m->negative_sign;
+       lconv.int_frac_digits = m->int_frac_digits[0];
+       lconv.frac_digits = m->frac_digits[0];
+       lconv.p_cs_precedes = m->p_cs_precedes[0];
+diff -Naur newlib-1.19.0.orig/newlib/libc/machine/configure newlib-1.19.0/newlib/libc/machine/configure
+--- newlib-1.19.0.orig/newlib/libc/machine/configure   2010-12-16 22:58:42.000000000 +0100
++++ newlib-1.19.0/newlib/libc/machine/configure        2011-07-24 06:43:01.730140498 +0200
+@@ -651,6 +651,7 @@
+ ELIX_LEVEL_0_FALSE
+ ELIX_LEVEL_0_TRUE
+ LDFLAGS
++NO_INCLUDE_LIST
+ NEWLIB_CFLAGS
+ CCASFLAGS
+ CCAS
+@@ -816,7 +817,6 @@
+ w65
+ x86_64
+ xc16x
+-xscale
+ xstormy16
+ z8k'
+<span style="background-color: #FF0000"> </span>
+@@ -3694,6 +3694,9 @@
+ NEWLIB_CFLAGS=${newlib_cflags}
+<span style="background-color: #FF0000"> </span>
+<span style="background-color: #FF0000"> </span>
++NO_INCLUDE_LIST=${noinclude}
++
++
+ LDFLAGS=${ldflags}
+<span style="background-color: #FF0000"> </span>
+<span style="background-color: #FF0000"> </span>
+@@ -9660,10 +9663,6 @@
+       hardcode_shlibpath_var=no
+       ;;
+<span style="background-color: #FF0000"> </span>
+-    freebsd1*)
+-      ld_shlibs=no
+-      ;;
+-
+     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+     # support.  Future versions do this automatically, but an explicit c++rt0.o
+     # does not break anything, and helps significantly (at the cost of a little
+@@ -10582,10 +10581,6 @@
+   shlibpath_var=LD_LIBRARY_PATH
+   ;;
+<span style="background-color: #FF0000"> </span>
+-freebsd1*)
+-  dynamic_linker=no
+-  ;;
+-
+ freebsd* | dragonfly*)
+   # DragonFly does not have aout.  When/if they implement a new
+   # versioning mechanism, adjust this.
+@@ -11445,7 +11440,7 @@
+   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+   lt_status=$lt_dlunknown
+   cat > conftest.$ac_ext <<_LT_EOF
+-#line 11448 "configure"
++#line 11443 "configure"
+ #include "confdefs.h"
+<span style="background-color: #FF0000"> </span>
+ #if HAVE_DLFCN_H
+@@ -11551,7 +11546,7 @@
+   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+   lt_status=$lt_dlunknown
+   cat > conftest.$ac_ext <<_LT_EOF
+-#line 11554 "configure"
++#line 11549 "configure"
+ #include "confdefs.h"
+<span style="background-color: #FF0000"> </span>
+ #if HAVE_DLFCN_H
+@@ -11878,8 +11873,6 @@
+  ;;
+<span style="background-color: #FF0000"> </span> xc16x) subdirs="$subdirs xc16x"
+  ;;
+-      xscale) subdirs="$subdirs xscale"
+- ;;
+<span style="background-color: #FF0000"> </span> xstormy16) subdirs="$subdirs xstormy16"
+  ;;
+<span style="background-color: #FF0000"> </span> z8k) subdirs="$subdirs z8k"
+diff -Naur newlib-1.19.0.orig/newlib/libc/machine/configure.in newlib-1.19.0/newlib/libc/machine/configure.in
+--- newlib-1.19.0.orig/newlib/libc/machine/configure.in        2010-12-02 20:30:47.000000000 +0100
++++ newlib-1.19.0/newlib/libc/machine/configure.in     2011-07-24 06:43:01.730140498 +0200
+@@ -65,7 +65,6 @@
+<span style="background-color: #FF0000"> </span> w65) AC_CONFIG_SUBDIRS(w65) ;;
+<span style="background-color: #FF0000"> </span> x86_64) AC_CONFIG_SUBDIRS(x86_64) ;;
+<span style="background-color: #FF0000"> </span> xc16x) AC_CONFIG_SUBDIRS(xc16x) ;;
+-      xscale) AC_CONFIG_SUBDIRS(xscale) ;;
+<span style="background-color: #FF0000"> </span> xstormy16) AC_CONFIG_SUBDIRS(xstormy16) ;;
+<span style="background-color: #FF0000"> </span> z8k) AC_CONFIG_SUBDIRS(z8k) ;;
+   esac;
+diff -Naur newlib-1.19.0.orig/newlib/libc/machine/frv/setjmp.S newlib-1.19.0/newlib/libc/machine/frv/setjmp.S
+--- newlib-1.19.0.orig/newlib/libc/machine/frv/setjmp.S        2002-06-18 23:20:28.000000000 +0200
++++ newlib-1.19.0/newlib/libc/machine/frv/setjmp.S     2011-07-24 06:43:01.731140513 +0200
+@@ -123,4 +123,4 @@
+<span style="background-color: #FF0000"> </span> cmov    gr9, gr8, cc4, 1
+<span style="background-color: #FF0000"> </span> ret
+ .Lend2:
+-      .size   EXT(longjmp),.Lend2-EXT(longjmp2)
++      .size   EXT(longjmp),.Lend2-EXT(longjmp)
+diff -Naur newlib-1.19.0.orig/newlib/libc/machine/m68k/memcpy.S newlib-1.19.0/newlib/libc/machine/m68k/memcpy.S
+--- newlib-1.19.0.orig/newlib/libc/machine/m68k/memcpy.S       2010-02-08 18:24:22.000000000 +0100
++++ newlib-1.19.0/newlib/libc/machine/m68k/memcpy.S    2011-07-24 06:43:01.731140513 +0200
+@@ -15,7 +15,7 @@
+<span style="background-color: #FF0000"> </span>
+ #include "m68kasm.h"
+<span style="background-color: #FF0000"> </span>
+-#if defined (__mcoldfire__) || defined (__mc68010__) || defined (__mc68020__) || defined (__mc68030__) || defined (__mc68040__) || defined (__mc68060__)
++#if defined (__mcoldfire__) || defined (__mcpu32__) || defined (__mc68010__) || defined (__mc68020__) || defined (__mc68030__) || defined (__mc68040__) || defined (__mc68060__)
+ # define MISALIGNED_OK 1
+ #else
+ # define MISALIGNED_OK 0
+diff -Naur newlib-1.19.0.orig/newlib/libc/machine/mips/strlen.c newlib-1.19.0/newlib/libc/machine/mips/strlen.c
+--- newlib-1.19.0.orig/newlib/libc/machine/mips/strlen.c       2002-03-14 03:41:43.000000000 +0100
++++ newlib-1.19.0/newlib/libc/machine/mips/strlen.c    2011-07-24 06:43:01.731140513 +0200
+@@ -60,6 +60,9 @@
+<span style="background-color: #FF0000"> </span> "  addiu   $2,$4,1\n"
+<span style="background-color: #FF0000"> </span> "\n"
+<span style="background-color: #FF0000"> </span> "1:        lbu     $3,0($4)\n"
++#if defined(_R3000)
++      "  nop     \n"
++#endif
+<span style="background-color: #FF0000"> </span> "  bnez    $3,1b\n"
+<span style="background-color: #FF0000"> </span> "  addiu   $4,$4,1\n"
+<span style="background-color: #FF0000"> </span> "\n"
+diff -Naur newlib-1.19.0.orig/newlib/libc/machine/powerpc/Makefile.am newlib-1.19.0/newlib/libc/machine/powerpc/Makefile.am
+--- newlib-1.19.0.orig/newlib/libc/machine/powerpc/Makefile.am 2007-05-24 19:33:35.000000000 +0200
++++ newlib-1.19.0/newlib/libc/machine/powerpc/Makefile.am      2011-07-24 06:43:01.731140513 +0200
+@@ -10,7 +10,7 @@
+<span style="background-color: #FF0000"> </span>
+ AM_CFLAGS = -I $(srcdir)/../../stdio -I $(srcdir)/../../stdlib
+<span style="background-color: #FF0000"> </span>
+-lib_a_SOURCES = setjmp.S times.c
++lib_a_SOURCES = setjmp.S
+ lib_a_CCASFLAGS=$(AM_CCASFLAGS)
+ lib_a_CFLAGS=$(AM_CFLAGS)
+ lib_a_LIBADD = @extra_objs@
+diff -Naur newlib-1.19.0.orig/newlib/libc/machine/powerpc/Makefile.in newlib-1.19.0/newlib/libc/machine/powerpc/Makefile.in
+--- newlib-1.19.0.orig/newlib/libc/machine/powerpc/Makefile.in 2011-07-20 08:45:15.913332235 +0200
++++ newlib-1.19.0/newlib/libc/machine/powerpc/Makefile.in      2011-07-24 06:43:01.731140513 +0200
+@@ -51,7 +51,7 @@
+ LIBRARIES = $(noinst_LIBRARIES)
+ ARFLAGS = cru
+ lib_a_AR = $(AR) $(ARFLAGS)
+-am_lib_a_OBJECTS = lib_a-setjmp.$(OBJEXT) lib_a-times.$(OBJEXT)
++am_lib_a_OBJECTS = lib_a-setjmp.$(OBJEXT)
+ lib_a_OBJECTS = $(am_lib_a_OBJECTS)
+ DEFAULT_INCLUDES = -I.@am__isrc@
+ depcomp =
+@@ -174,7 +174,7 @@
+ AM_CCASFLAGS = $(INCLUDES)
+ noinst_LIBRARIES = lib.a
+ AM_CFLAGS = -I $(srcdir)/../../stdio -I $(srcdir)/../../stdlib
+-lib_a_SOURCES = setjmp.S times.c
++lib_a_SOURCES = setjmp.S
+ lib_a_CCASFLAGS = $(AM_CCASFLAGS)
+ lib_a_CFLAGS = $(AM_CFLAGS)
+ lib_a_LIBADD = @extra_objs@
+@@ -185,7 +185,7 @@
+ all: all-am
+<span style="background-color: #FF0000"> </span>
+ .SUFFIXES:
+-.SUFFIXES: .S .c .o .obj
++.SUFFIXES: .S .o .obj
+ am--refresh:
+<span style="background-color: #FF0000"> </span> @:
+ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+@@ -246,18 +246,6 @@
+ lib_a-setjmp.obj: setjmp.S
+<span style="background-color: #FF0000"> </span> $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-setjmp.obj `if test -f 'setjmp.S'; then $(CYGPATH_W) 'setjmp.S'; else $(CYGPATH_W) '$(srcdir)/setjmp.S'; fi`
+<span style="background-color: #FF0000"> </span>
+-.c.o:
+-      $(COMPILE) -c $<
+-
+-.c.obj:
+-      $(COMPILE) -c `$(CYGPATH_W) '$<'`
+-
+-lib_a-times.o: times.c
+-      $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-times.o `test -f 'times.c' || echo '$(srcdir)/'`times.c
+-
+-lib_a-times.obj: times.c
+-      $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-times.obj `if test -f 'times.c'; then $(CYGPATH_W) 'times.c'; else $(CYGPATH_W) '$(srcdir)/times.c'; fi`
+-
+ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+<span style="background-color: #FF0000"> </span> list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+<span style="background-color: #FF0000"> </span> unique=`for i in $$list; do \
+diff -Naur newlib-1.19.0.orig/newlib/libc/machine/powerpc/times.c newlib-1.19.0/newlib/libc/machine/powerpc/times.c
+--- newlib-1.19.0.orig/newlib/libc/machine/powerpc/times.c     2002-07-22 22:26:51.000000000 +0200
++++ newlib-1.19.0/newlib/libc/machine/powerpc/times.c  1970-01-01 01:00:00.000000000 +0100
+@@ -1,36 +0,0 @@
+-/* Time support routines for PowerPC.
+- *
+- * Written by Aldy Hernandez.
+- */
+-
+-#include <_ansi.h>
+-#include <reent.h>
+-#include <sys/time.h>
+-#include <sys/times.h>
+-#include <sys/resource.h>
+-
+-clock_t
+-times (struct tms *tp)
+-{
+-  struct rusage usage;
+-  union {
+-    struct rusage r;
+-    /* Newlib's rusage has only 2 fields.  We need to make room for
+-       when we call the system's rusage.  This should be enough.  */
+-    int filler[32];
+-  } host_ru;
+-
+-  getrusage (RUSAGE_SELF, (void *)&host_ru);
+-
+-  if (tp)
+-    {
+-      tp->tms_utime = host_ru.r.ru_utime.tv_sec * 1000
+-      + host_ru.r.ru_utime.tv_usec;
+-      tp->tms_stime = host_ru.r.ru_stime.tv_sec * 1000
+-      + host_ru.r.ru_stime.tv_usec;
+-      tp->tms_cutime = 0;  /* user time, children */
+-      tp->tms_cstime = 0;  /* system time, children */
+-    }
+-
+-  return tp->tms_utime;
+-}
+diff -Naur newlib-1.19.0.orig/newlib/libc/Makefile.am newlib-1.19.0/newlib/libc/Makefile.am
+--- newlib-1.19.0.orig/newlib/libc/Makefile.am 2010-05-07 01:25:16.000000000 +0200
++++ newlib-1.19.0/newlib/libc/Makefile.am      2011-07-24 06:43:01.698140024 +0200
+@@ -36,6 +36,8 @@
+<span style="background-color: #FF0000"> </span>
+ if HAVE_XDR_DIR
+ XDR_SUBDIR = xdr
++rpcincludedir = $(tooldir)
++nobase_rpcinclude_HEADERS = include/rpc/xdr.h include/rpc/types.h
+ endif
+<span style="background-color: #FF0000"> </span>
+ # The order of SUBDIRS is important for the integrated documentation.
+@@ -140,8 +142,7 @@
+<span style="background-color: #FF0000"> </span> locale/stmp-def \
+<span style="background-color: #FF0000"> </span> reent/stmp-def \
+<span style="background-color: #FF0000"> </span> $(LIBC_EXTRA_DEF) \
+-      misc/stmp-def \
+-      posix/stmp-def
++      misc/stmp-def
+<span style="background-color: #FF0000"> </span>
+ libc.info: sigset.texi extra.texi stdio64.texi posix.texi iconvset.texi \
+<span style="background-color: #FF0000"> </span> targetdep.tex $(SUBDEFS)
+diff -Naur newlib-1.19.0.orig/newlib/libc/Makefile.in newlib-1.19.0/newlib/libc/Makefile.in
+--- newlib-1.19.0.orig/newlib/libc/Makefile.in 2011-07-20 08:45:15.822330771 +0200
++++ newlib-1.19.0/newlib/libc/Makefile.in      2011-07-24 06:43:01.698140024 +0200
+@@ -17,6 +17,7 @@
+<span style="background-color: #FF0000"> </span>
+<span style="background-color: #FF0000"> </span>
+<span style="background-color: #FF0000"> </span>
++
+ VPATH = @srcdir@
+ pkgdatadir = $(datadir)/@PACKAGE@
+ pkgincludedir = $(includedir)/@PACKAGE@
+@@ -39,7 +40,8 @@
+ subdir = .
+ DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+<span style="background-color: #FF0000"> </span> $(top_srcdir)/configure $(am__configure_deps) \
+-      $(srcdir)/../../mkinstalldirs $(libc_TEXINFOS)
++      $(srcdir)/../../mkinstalldirs $(libc_TEXINFOS) \
++      $(am__nobase_rpcinclude_HEADERS_DIST)
+ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+ am__aclocal_m4_deps = $(top_srcdir)/../../libtool.m4 \
+<span style="background-color: #FF0000"> </span> $(top_srcdir)/../../ltoptions.m4 \
+@@ -155,6 +157,10 @@
+   sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+   sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+ DATA = $(noinst_DATA)
++am__nobase_rpcinclude_HEADERS_DIST = include/rpc/xdr.h \
++      include/rpc/types.h
++am__installdirs = "$(DESTDIR)$(rpcincludedir)"
++HEADERS = $(nobase_rpcinclude_HEADERS)
+ RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive       \
+   distclean-recursive maintainer-clean-recursive
+ AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
+@@ -319,6 +325,8 @@
+ @ENABLE_NEWLIB_ICONV_FALSE@NEWLIB_ICONV_LIBS =<span style="background-color: #FF0000"> </span>
+ @ENABLE_NEWLIB_ICONV_TRUE@NEWLIB_ICONV_LIBS = iconv/ces/lib.$(aext) iconv/ccs/lib.$(aext) iconv/lib/lib.$(aext)
+ @HAVE_XDR_DIR_TRUE@XDR_SUBDIR = xdr
++@HAVE_XDR_DIR_TRUE@rpcincludedir = $(tooldir)
++@HAVE_XDR_DIR_TRUE@nobase_rpcinclude_HEADERS = include/rpc/xdr.h include/rpc/types.h
+<span style="background-color: #FF0000"> </span>
+ # The order of SUBDIRS is important for the integrated documentation.
+ # Do not change the order without considering the doc impact.
+@@ -396,8 +404,7 @@
+<span style="background-color: #FF0000"> </span> locale/stmp-def \
+<span style="background-color: #FF0000"> </span> reent/stmp-def \
+<span style="background-color: #FF0000"> </span> $(LIBC_EXTRA_DEF) \
+-      misc/stmp-def \
+-      posix/stmp-def
++      misc/stmp-def
+<span style="background-color: #FF0000"> </span>
+ info_TEXINFOS = libc.texinfo
+ libc_TEXINFOS = sigset.texi extra.texi posix.texi stdio64.texi iconvset.texi \
+@@ -638,6 +645,29 @@
+<span style="background-color: #FF0000"> </span> done
+<span style="background-color: #FF0000"> </span>
+ clean-info: mostlyclean-aminfo clean-aminfo
++install-nobase_rpcincludeHEADERS: $(nobase_rpcinclude_HEADERS)
++      @$(NORMAL_INSTALL)
++      test -z "$(rpcincludedir)" || $(MKDIR_P) "$(DESTDIR)$(rpcincludedir)"
++      @list='$(nobase_rpcinclude_HEADERS)'; test -n "$(rpcincludedir)" || list=; \
++      $(am__nobase_list) | while read dir files; do \
++        xfiles=; for file in $$files; do \
++          if test -f "$$file"; then xfiles="$$xfiles $$file"; \
++          else xfiles="$$xfiles $(srcdir)/$$file"; fi; done; \
++        test -z "$$xfiles" || { \
++          test "x$$dir" = x. || { \
++            echo "$(MKDIR_P) '$(DESTDIR)$(rpcincludedir)/$$dir'"; \
++            $(MKDIR_P) "$(DESTDIR)$(rpcincludedir)/$$dir"; }; \
++          echo " $(INSTALL_HEADER) $$xfiles '$(DESTDIR)$(rpcincludedir)/$$dir'"; \
++          $(INSTALL_HEADER) $$xfiles "$(DESTDIR)$(rpcincludedir)/$$dir" || exit $$?; }; \
++      done
++
++uninstall-nobase_rpcincludeHEADERS:
++      @$(NORMAL_UNINSTALL)
++      @list='$(nobase_rpcinclude_HEADERS)'; test -n "$(rpcincludedir)" || list=; \
++      $(am__nobase_strip_setup); files=`$(am__nobase_strip)`; \
++      test -n "$$files" || exit 0; \
++      echo " ( cd '$(DESTDIR)$(rpcincludedir)' && rm -f" $$files ")"; \
++      cd "$(DESTDIR)$(rpcincludedir)" && rm -f $$files
+<span style="background-color: #FF0000"> </span>
+ # This directory's subdirectories are mostly independent; you can cd
+ # into them and run `make' without going through this Makefile.
+@@ -775,9 +805,12 @@
+<span style="background-color: #FF0000"> </span> -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+ check-am:
+ check: check-recursive
+-all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) $(DATA)
++all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) $(DATA) $(HEADERS)
+ installdirs: installdirs-recursive
+ installdirs-am:
++      for dir in "$(DESTDIR)$(rpcincludedir)"; do \
++        test -z "$$dir" || $(MKDIR_P) "$$dir"; \
++      done
+ install: install-recursive
+ install-exec: install-exec-recursive
+ install-data: install-data-recursive
+@@ -827,7 +860,7 @@
+<span style="background-color: #FF0000"> </span>
+ info-am: $(INFO_DEPS)
+<span style="background-color: #FF0000"> </span>
+-install-data-am:
++install-data-am: install-nobase_rpcincludeHEADERS
+<span style="background-color: #FF0000"> </span>
+ install-dvi: install-dvi-recursive
+<span style="background-color: #FF0000"> </span>
+@@ -952,7 +985,8 @@
+ ps-am: $(PSS)
+<span style="background-color: #FF0000"> </span>
+ uninstall-am: uninstall-dvi-am uninstall-html-am uninstall-info-am \
+-      uninstall-pdf-am uninstall-ps-am
++      uninstall-nobase_rpcincludeHEADERS uninstall-pdf-am \
++      uninstall-ps-am
+<span style="background-color: #FF0000"> </span>
+ .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
+<span style="background-color: #FF0000"> </span> install-am install-strip tags-recursive
+@@ -966,14 +1000,16 @@
+<span style="background-color: #FF0000"> </span> info-am install install-am install-data install-data-am \
+<span style="background-color: #FF0000"> </span> install-dvi install-dvi-am install-exec install-exec-am \
+<span style="background-color: #FF0000"> </span> install-html install-html-am install-info install-info-am \
+-      install-man install-pdf install-pdf-am install-ps \
+-      install-ps-am install-strip installcheck installcheck-am \
+-      installdirs installdirs-am maintainer-clean \
+-      maintainer-clean-aminfo maintainer-clean-generic mostlyclean \
+-      mostlyclean-aminfo mostlyclean-compile mostlyclean-generic \
+-      mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
+-      uninstall uninstall-am uninstall-dvi-am uninstall-html-am \
+-      uninstall-info-am uninstall-pdf-am uninstall-ps-am
++      install-man install-nobase_rpcincludeHEADERS install-pdf \
++      install-pdf-am install-ps install-ps-am install-strip \
++      installcheck installcheck-am installdirs installdirs-am \
++      maintainer-clean maintainer-clean-aminfo \
++      maintainer-clean-generic mostlyclean mostlyclean-aminfo \
++      mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
++      pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
++      uninstall-dvi-am uninstall-html-am uninstall-info-am \
++      uninstall-nobase_rpcincludeHEADERS uninstall-pdf-am \
++      uninstall-ps-am
+<span style="background-color: #FF0000"> </span>
+ @USE_LIBTOOL_FALSE@libc.a: $(SUBLIBS)
+ @USE_LIBTOOL_FALSE@   rm -f $@
+diff -Naur newlib-1.19.0.orig/newlib/libc/misc/__dprintf.c newlib-1.19.0/newlib/libc/misc/__dprintf.c
+--- newlib-1.19.0.orig/newlib/libc/misc/__dprintf.c    2008-12-11 18:27:55.000000000 +0100
++++ newlib-1.19.0/newlib/libc/misc/__dprintf.c 2011-07-24 06:43:01.732140528 +0200
+@@ -5,6 +5,7 @@
+ */
+<span style="background-color: #FF0000"> </span>
+ #include <_ansi.h>
++#include <stdint.h>
+ #include "ctype.h"
+ #include "reent.h"
+ #include "string.h"
+@@ -131,7 +132,7 @@
+<span style="background-color: #FF0000"> </span>       write_string (unctrl (c));
+<span style="background-color: #FF0000"> </span>       break;
+<span style="background-color: #FF0000"> </span>     case 'p' :
+-            l = (_POINTER_INT) va_arg (args, char *);
++            l = (intptr_t) va_arg (args, char *);
+<span style="background-color: #FF0000"> </span>       print_number (16, 1, l);
+<span style="background-color: #FF0000"> </span>       break;
+<span style="background-color: #FF0000"> </span>     case 'd' :
+diff -Naur newlib-1.19.0.orig/newlib/libc/misc/ffs.c newlib-1.19.0/newlib/libc/misc/ffs.c
+--- newlib-1.19.0.orig/newlib/libc/misc/ffs.c  2003-06-06 21:57:51.000000000 +0200
++++ newlib-1.19.0/newlib/libc/misc/ffs.c       2011-07-24 06:43:01.732140528 +0200
+@@ -6,9 +6,11 @@
+<span style="background-color: #FF0000"> </span> ffs
+<span style="background-color: #FF0000"> </span>
+ ANSI_SYNOPSIS
++      #include <strings.h>
+<span style="background-color: #FF0000"> </span> int ffs(int <[word]>);
+<span style="background-color: #FF0000"> </span>
+ TRAD_SYNOPSIS
++      #include <strings.h>
+<span style="background-color: #FF0000"> </span> int ffs(<[word]>);
+<span style="background-color: #FF0000"> </span>
+ DESCRIPTION
+@@ -24,7 +26,7 @@
+<span style="background-color: #FF0000"> </span>
+ No supporting OS subroutines are required.  */
+<span style="background-color: #FF0000"> </span>
+-#include <_ansi.h>
++#include <strings.h>
+<span style="background-color: #FF0000"> </span>
+ int
+ _DEFUN(ffs, (word),
+diff -Naur newlib-1.19.0.orig/newlib/libc/posix/collate.c newlib-1.19.0/newlib/libc/posix/collate.c
+--- newlib-1.19.0.orig/newlib/libc/posix/collate.c     2008-11-19 21:04:09.000000000 +0100
++++ newlib-1.19.0/newlib/libc/posix/collate.c  2011-07-24 06:43:01.732140528 +0200
+@@ -177,12 +177,13 @@
+ {
+<span style="background-color: #FF0000"> </span> const char *s;
+<span style="background-color: #FF0000"> </span> int serrno = errno;
++      int dummy;
+<span style="background-color: #FF0000"> </span>
+<span style="background-color: #FF0000"> </span> /* Be careful to change write counts if you change the strings */
+<span style="background-color: #FF0000"> </span> write(STDERR_FILENO, "collate_error: ", 15);
+<span style="background-color: #FF0000"> </span> write(STDERR_FILENO, f, strlen(f));
+<span style="background-color: #FF0000"> </span> write(STDERR_FILENO, ": ", 2);
+-      s = strerror(serrno);
++      s = _strerror_r(_REENT, serrno, 1, &dummy);
+<span style="background-color: #FF0000"> </span> write(STDERR_FILENO, s, strlen(s));
+<span style="background-color: #FF0000"> </span> write(STDERR_FILENO, "\n", 1);
+<span style="background-color: #FF0000"> </span> exit(ex);
+diff -Naur newlib-1.19.0.orig/newlib/libc/posix/readdir.c newlib-1.19.0/newlib/libc/posix/readdir.c
+--- newlib-1.19.0.orig/newlib/libc/posix/readdir.c     2003-06-06 21:57:51.000000000 +0200
++++ newlib-1.19.0/newlib/libc/posix/readdir.c  2011-07-24 06:43:01.732140528 +0200
+@@ -37,6 +37,7 @@
+ static char sccsid[] = "@(#)readdir.c    5.7 (Berkeley) 6/1/90";
+ #endif /* LIBC_SCCS and not lint */
+<span style="background-color: #FF0000"> </span>
++#include <stdint.h>
+ #include <dirent.h>
+<span style="background-color: #FF0000"> </span>
+ extern int getdents (int fd, void *dp, int count);
+@@ -75,7 +76,7 @@
+       continue;
+     }
+     dp = (struct dirent *)(dirp->dd_buf + dirp->dd_loc);
+-    if ((int)dp & 03) {   /* bogus pointer check */
++    if ((intptr_t)dp & 03) {      /* bogus pointer check */
+ #ifdef HAVE_DD_LOCK
+       __lock_release_recursive(dirp->dd_lock);
+ #endif
+diff -Naur newlib-1.19.0.orig/newlib/libc/reent/sbrkr.c newlib-1.19.0/newlib/libc/reent/sbrkr.c
+--- newlib-1.19.0.orig/newlib/libc/reent/sbrkr.c       2003-06-03 21:48:07.000000000 +0200
++++ newlib-1.19.0/newlib/libc/reent/sbrkr.c    2011-07-24 06:43:01.733140543 +0200
+@@ -13,9 +13,7 @@
+ #endif
+ #endif
+<span style="background-color: #FF0000"> </span>
+-/* If MALLOC_PROVIDED is defined, we don't need this function.  */
+-
+-#if defined (REENTRANT_SYSCALLS_PROVIDED) || defined (MALLOC_PROVIDED)
++#if defined (REENTRANT_SYSCALLS_PROVIDED)
+<span style="background-color: #FF0000"> </span>
+ int _dummy_sbrk_syscalls = 1;
+<span style="background-color: #FF0000"> </span>
+diff -Naur newlib-1.19.0.orig/newlib/libc/search/db_local.h newlib-1.19.0/newlib/libc/search/db_local.h
+--- newlib-1.19.0.orig/newlib/libc/search/db_local.h   2010-03-05 09:55:15.000000000 +0100
++++ newlib-1.19.0/newlib/libc/search/db_local.h        2011-07-24 06:43:01.733140543 +0200
+@@ -102,11 +102,11 @@
+ typedef struct __db {
+<span style="background-color: #FF0000"> </span> DBTYPE type;                    /* Underlying db type. */
+<span style="background-color: #FF0000"> </span> int (*close)(struct __db *);
+-      int (*del)(const struct __db *, const DBT *, u_int);
+-      int (*get)(const struct __db *, const DBT *, DBT *, u_int);
+-      int (*put)(const struct __db *, DBT *, const DBT *, u_int);
+-      int (*seq)(const struct __db *, DBT *, DBT *, u_int);
+-      int (*sync)(const struct __db *, u_int);
++      int (*del)(const struct __db *, const DBT *, __uint32_t);
++      int (*get)(const struct __db *, const DBT *, DBT *, __uint32_t);
++      int (*put)(const struct __db *, DBT *, const DBT *, __uint32_t);
++      int (*seq)(const struct __db *, DBT *, DBT *, __uint32_t);
++      int (*sync)(const struct __db *, __uint32_t);
+<span style="background-color: #FF0000"> </span> void *internal;                 /* Access method private. */
+<span style="background-color: #FF0000"> </span> int (*fd)(const struct __db *);
+ } DB;
+diff -Naur newlib-1.19.0.orig/newlib/libc/search/extern.h newlib-1.19.0/newlib/libc/search/extern.h
+--- newlib-1.19.0.orig/newlib/libc/search/extern.h     2002-06-20 21:51:31.000000000 +0200
++++ newlib-1.19.0/newlib/libc/search/extern.h  2011-07-24 06:43:01.733140543 +0200
+@@ -43,7 +43,7 @@
+ int    __big_split(HTAB *, BUFHEAD *, BUFHEAD *, BUFHEAD *,
+<span style="background-color: #FF0000"> </span>         int, __uint32_t, SPLIT_RETURN *);
+ int    __buf_free(HTAB *, int, int);
+-void   __buf_init(HTAB *, int);
++void   __buf_init(HTAB *, __uint32_t);
+ __uint32_t     __call_hash(HTAB *, char *, int);
+ int    __delpair(HTAB *, BUFHEAD *, int);
+ int    __expand_table(HTAB *);
+diff -Naur newlib-1.19.0.orig/newlib/libc/search/hash_buf.c newlib-1.19.0/newlib/libc/search/hash_buf.c
+--- newlib-1.19.0.orig/newlib/libc/search/hash_buf.c   2004-05-26 19:57:10.000000000 +0200
++++ newlib-1.19.0/newlib/libc/search/hash_buf.c        2011-07-24 06:43:01.733140543 +0200
+@@ -118,7 +118,7 @@
+<span style="background-color: #FF0000"> </span> int newpage;    /* If prev_bp set, indicates a new overflow page. */
+ {
+<span style="background-color: #FF0000"> </span> BUFHEAD *bp;
+-      __uint32_t is_disk_mask;
++      ptrdiff_t is_disk_mask;
+<span style="background-color: #FF0000"> </span> int is_disk, segment_ndx;
+<span style="background-color: #FF0000"> </span> SEGMENT segp;
+<span style="background-color: #FF0000"> </span>
+@@ -298,7 +298,7 @@
+ extern void
+ __buf_init(hashp, nbytes)
+<span style="background-color: #FF0000"> </span> HTAB *hashp;
+-      int nbytes;
++      __uint32_t nbytes;
+ {
+<span style="background-color: #FF0000"> </span> BUFHEAD *bfp;
+<span style="background-color: #FF0000"> </span> int npages;
+diff -Naur newlib-1.19.0.orig/newlib/libc/search/hash.h newlib-1.19.0/newlib/libc/search/hash.h
+--- newlib-1.19.0.orig/newlib/libc/search/hash.h       2008-07-02 20:38:45.000000000 +0200
++++ newlib-1.19.0/newlib/libc/search/hash.h    2011-07-24 06:43:01.733140543 +0200
+@@ -82,7 +82,7 @@
+<span style="background-color: #FF0000"> </span>
+ /* Hash Table Information */
+ typedef struct hashhdr {              /* Disk resident portion */
+-      int             magic;          /* Magic NO for hash tables */
++      __uint32_t      magic;          /* Magic NO for hash tables */
+<span style="background-color: #FF0000"> </span> int             version;        /* Version ID */
+<span style="background-color: #FF0000"> </span> __uint32_t      lorder;         /* Byte Order */
+<span style="background-color: #FF0000"> </span> int             bsize;          /* Bucket/Page Size */
+@@ -97,7 +97,7 @@
+<span style="background-color: #FF0000"> </span> int             high_mask;      /* Mask to modulo into entire table */
+<span style="background-color: #FF0000"> </span> int             low_mask;       /* Mask to modulo into lower half of<span style="background-color: #FF0000"> </span>
+<span style="background-color: #FF0000"> </span>                                  * table */
+-      int             ffactor;        /* Fill factor */
++      __uint32_t      ffactor;        /* Fill factor */
+<span style="background-color: #FF0000"> </span> int             nkeys;          /* Number of keys in hash table */
+<span style="background-color: #FF0000"> </span> int             hdrpages;       /* Size of table header */
+<span style="background-color: #FF0000"> </span> int             h_charkey;      /* value of hash(CHARKEY) */
+diff -Naur newlib-1.19.0.orig/newlib/libc/signal/Makefile.am newlib-1.19.0/newlib/libc/signal/Makefile.am
+--- newlib-1.19.0.orig/newlib/libc/signal/Makefile.am  2006-04-11 21:02:09.000000000 +0200
++++ newlib-1.19.0/newlib/libc/signal/Makefile.am       2011-07-24 06:43:01.734140558 +0200
+@@ -4,7 +4,7 @@
+<span style="background-color: #FF0000"> </span>
+ INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
+<span style="background-color: #FF0000"> </span>
+-LIB_SOURCES = raise.c signal.c
++LIB_SOURCES = psignal.c raise.c signal.c
+<span style="background-color: #FF0000"> </span>
+ libsignal_la_LDFLAGS = -Xcompiler -nostdlib
+<span style="background-color: #FF0000"> </span>
+@@ -21,7 +21,7 @@
+<span style="background-color: #FF0000"> </span>
+ include $(srcdir)/../../Makefile.shared
+<span style="background-color: #FF0000"> </span>
+-CHEWOUT_FILES = raise.def signal.def
++CHEWOUT_FILES = psignal.def raise.def signal.def
+<span style="background-color: #FF0000"> </span>
+ SUFFIXES = .def
+<span style="background-color: #FF0000"> </span>
+diff -Naur newlib-1.19.0.orig/newlib/libc/signal/Makefile.in newlib-1.19.0/newlib/libc/signal/Makefile.in
+--- newlib-1.19.0.orig/newlib/libc/signal/Makefile.in  2011-07-20 08:45:15.831330915 +0200
++++ newlib-1.19.0/newlib/libc/signal/Makefile.in       2011-07-24 06:43:01.734140558 +0200
+@@ -55,12 +55,13 @@
+ ARFLAGS = cru
+ lib_a_AR = $(AR) $(ARFLAGS)
+ lib_a_LIBADD =
+-am__objects_1 = lib_a-raise.$(OBJEXT) lib_a-signal.$(OBJEXT)
++am__objects_1 = lib_a-psignal.$(OBJEXT) lib_a-raise.$(OBJEXT) \
++      lib_a-signal.$(OBJEXT)
+ @USE_LIBTOOL_FALSE@am_lib_a_OBJECTS = $(am__objects_1)
+ lib_a_OBJECTS = $(am_lib_a_OBJECTS)
+ LTLIBRARIES = $(noinst_LTLIBRARIES)
+ libsignal_la_LIBADD =
+-am__objects_2 = raise.lo signal.lo
++am__objects_2 = psignal.lo raise.lo signal.lo
+ @USE_LIBTOOL_TRUE@am_libsignal_la_OBJECTS = $(am__objects_2)
+ libsignal_la_OBJECTS = $(am_libsignal_la_OBJECTS)
+ libsignal_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+@@ -228,7 +229,7 @@
+ top_srcdir = @top_srcdir@
+ AUTOMAKE_OPTIONS = cygnus
+ INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
+-LIB_SOURCES = raise.c signal.c
++LIB_SOURCES = psignal.c raise.c signal.c
+ libsignal_la_LDFLAGS = -Xcompiler -nostdlib
+ @USE_LIBTOOL_TRUE@noinst_LTLIBRARIES = libsignal.la
+ @USE_LIBTOOL_TRUE@libsignal_la_SOURCES = $(LIB_SOURCES)
+@@ -237,7 +238,7 @@
+ @USE_LIBTOOL_FALSE@noinst_LIBRARIES = lib.a
+ @USE_LIBTOOL_FALSE@lib_a_SOURCES = $(LIB_SOURCES)
+ @USE_LIBTOOL_FALSE@lib_a_CFLAGS = $(AM_CFLAGS)
+-CHEWOUT_FILES = raise.def signal.def
++CHEWOUT_FILES = psignal.def raise.def signal.def
+ SUFFIXES = .def
+ CHEW = ../../doc/makedoc -f $(srcdir)/../../doc/doc.str
+ TARGETDOC = ../tmp.texi
+@@ -310,6 +311,12 @@
+ .c.lo:
+<span style="background-color: #FF0000"> </span> $(LTCOMPILE) -c -o $@ $<
+<span style="background-color: #FF0000"> </span>
++lib_a-psignal.o: psignal.c
++      $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-psignal.o `test -f 'psignal.c' || echo '$(srcdir)/'`psignal.c
++
++lib_a-psignal.obj: psignal.c
++      $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-psignal.obj `if test -f 'psignal.c'; then $(CYGPATH_W) 'psignal.c'; else $(CYGPATH_W) '$(srcdir)/psignal.c'; fi`
++
+ lib_a-raise.o: raise.c
+<span style="background-color: #FF0000"> </span> $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-raise.o `test -f 'raise.c' || echo '$(srcdir)/'`raise.c
+<span style="background-color: #FF0000"> </span>
+diff -Naur newlib-1.19.0.orig/newlib/libc/signal/psignal.c newlib-1.19.0/newlib/libc/signal/psignal.c
+--- newlib-1.19.0.orig/newlib/libc/signal/psignal.c    1970-01-01 01:00:00.000000000 +0100
++++ newlib-1.19.0/newlib/libc/signal/psignal.c 2011-07-24 06:43:01.734140558 +0200
+@@ -0,0 +1,51 @@
++/* Copyright 2002, 2011 Red Hat Inc. */
++/*
++FUNCTION
++<<psignal>>---print a signal message on standard error
++
++INDEX
++      psignal
++
++ANSI_SYNOPSIS
++      #include <stdio.h>
++      void psignal(int <[signal]>, const char *<[prefix]>);
++
++TRAD_SYNOPSIS
++      #include <stdio.h>
++      void psignal(<[signal]>, <[prefix]>)
++      int <[signal]>;
++      const char *<[prefix]>;
++
++DESCRIPTION
++Use <<psignal>> to print (on standard error) a signal message
++corresponding to the value of the signal number <[signal]>.
++Unless you use <<NULL>> as the value of the argument <[prefix]>, the
++signal message will begin with the string at <[prefix]>, followed by a
++colon and a space (<<: >>). The remainder of the signal message is one
++of the strings described for <<strsignal>>.
++
++RETURNS
++<<psignal>> returns no result.
++
++PORTABILITY
++POSIX.1-2008 requires <<psignal>>, but the strings issued vary from one
++implementation to another.
++
++Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>,
++<<lseek>>, <<read>>, <<sbrk>>, <<write>>.
++*/
++
++#include <_ansi.h>
++#include <stdio.h>
++#include <string.h>
++
++_VOID
++_DEFUN(psignal, (sig, s),
++       int sig _AND
++       _CONST char *s)
++{
++  if (s != NULL && *s != '\0')
++    fprintf (stderr, "%s: %s\n", s, strsignal (sig));
++  else
++    fprintf (stderr, "%s\n", strsignal (sig));
++}
+diff -Naur newlib-1.19.0.orig/newlib/libc/signal/signal.tex newlib-1.19.0/newlib/libc/signal/signal.tex
+--- newlib-1.19.0.orig/newlib/libc/signal/signal.tex   2000-02-17 20:39:47.000000000 +0100
++++ newlib-1.19.0/newlib/libc/signal/signal.tex        2011-07-24 06:43:01.734140558 +0200
+@@ -59,11 +59,15 @@
+ reliable from signal handlers.)
+<span style="background-color: #FF0000"> </span>
+ @menu
++* psignal:: Print a signal message to standard error
+ * raise::   Send a signal
+ * signal::  Specify handler subroutine for a signal
+ @end menu
+<span style="background-color: #FF0000"> </span>
+ @page
++@include signal/psignal.def
++
++@page
+ @include signal/raise.def
+<span style="background-color: #FF0000"> </span>
+ @page
+diff -Naur newlib-1.19.0.orig/newlib/libc/stdio/fclose.c newlib-1.19.0/newlib/libc/stdio/fclose.c
+--- newlib-1.19.0.orig/newlib/libc/stdio/fclose.c      2007-07-13 22:37:53.000000000 +0200
++++ newlib-1.19.0/newlib/libc/stdio/fclose.c   2011-07-24 06:43:01.735140574 +0200
+@@ -74,8 +74,6 @@
+   if (fp == NULL)
+     return (0);                       /* on NULL */
+<span style="background-color: #FF0000"> </span>
+-  __sfp_lock_acquire ();
+-
+   CHECK_INIT (rptr, fp);
+<span style="background-color: #FF0000"> </span>
+   _flockfile (fp);
+@@ -83,7 +81,6 @@
+   if (fp->_flags == 0)             /* not open! */
+     {
+       _funlockfile (fp);
+-      __sfp_lock_release ();
+       return (0);
+     }
+   /* Unconditionally flush to allow special handling for seekable read
+@@ -98,6 +95,7 @@
+     FREEUB (rptr, fp);
+   if (HASLB (fp))
+     FREELB (rptr, fp);
++  __sfp_lock_acquire ();
+   fp->_flags = 0;          /* release this FILE for reuse */
+   _funlockfile (fp);
+ #ifndef __SINGLE_THREAD__
+diff -Naur newlib-1.19.0.orig/newlib/libc/stdio/fflush.c newlib-1.19.0/newlib/libc/stdio/fflush.c
+--- newlib-1.19.0.orig/newlib/libc/stdio/fflush.c      2009-10-30 09:26:41.000000000 +0100
++++ newlib-1.19.0/newlib/libc/stdio/fflush.c   2011-07-24 06:43:01.735140574 +0200
+@@ -67,37 +67,16 @@
+<span style="background-color: #FF0000"> </span>
+ /* Flush a single file, or (if fp is NULL) all files.  */
+<span style="background-color: #FF0000"> </span>
++/* Core function which does not lock file pointer.  This gets called
++   directly from __srefill. */
+ int
+-_DEFUN(_fflush_r, (ptr, fp),
++_DEFUN(__sflush_r, (ptr, fp),
+        struct _reent *ptr _AND
+        register FILE * fp)
+ {
+   register unsigned char *p;
+   register int n, t;
+<span style="background-color: #FF0000"> </span>
+-#ifdef _REENT_SMALL
+-  /* For REENT_SMALL platforms, it is possible we are being
+-     called for the first time on a std stream.  This std
+-     stream can belong to a reentrant struct that is not
+-     _REENT.  If CHECK_INIT gets called below based on _REENT,
+-     we will end up changing said file pointers to the equivalent
+-     std stream off of _REENT.  This causes unexpected behavior if
+-     there is any data to flush on the _REENT std stream.  There
+-     are two alternatives to fix this:  1) make a reentrant fflush
+-     or 2) simply recognize that this file has nothing to flush
+-     and return immediately before performing a CHECK_INIT.  Choice
+-     2 is implemented here due to its simplicity.  */
+-  if (fp->_bf._base == NULL)
+-    return 0;
+-#endif /* _REENT_SMALL  */
+-
+-  CHECK_INIT (ptr, fp);
+-
+-  if (!fp->_flags)
+-    return 0;
+-
+-  _flockfile (fp);
+-
+   t = fp->_flags;
+   if ((t & __SWR) == 0)
+     {
+@@ -150,7 +129,6 @@
+<span style="background-color: #FF0000"> </span>             }
+<span style="background-color: #FF0000"> </span>           else
+<span style="background-color: #FF0000"> </span>             fp->_flags |= __SERR;
+-                _funlockfile (fp);
+<span style="background-color: #FF0000"> </span>           return result;
+<span style="background-color: #FF0000"> </span>         }
+             }
+@@ -186,17 +164,14 @@
+<span style="background-color: #FF0000"> </span>   else
+<span style="background-color: #FF0000"> </span>     {
+<span style="background-color: #FF0000"> </span>       fp->_flags |= __SERR;
+-            _funlockfile (fp);
+<span style="background-color: #FF0000"> </span>       return EOF;
+<span style="background-color: #FF0000"> </span>     }
+<span style="background-color: #FF0000"> </span> }
+-      _funlockfile (fp);
+       return 0;
+     }
+   if ((p = fp->_bf._base) == NULL)
+     {
+       /* Nothing to flush.  */
+-      _funlockfile (fp);
+       return 0;
+     }
+   n = fp->_p - p;          /* write this much */
+@@ -215,16 +190,48 @@
+       if (t <= 0)
+<span style="background-color: #FF0000"> </span> {
+           fp->_flags |= __SERR;
+-          _funlockfile (fp);
+           return EOF;
+<span style="background-color: #FF0000"> </span> }
+       p += t;
+       n -= t;
+     }
+-  _funlockfile (fp);
+   return 0;
+ }
+<span style="background-color: #FF0000"> </span>
++int
++_DEFUN(_fflush_r, (ptr, fp),
++       struct _reent *ptr _AND
++       register FILE * fp)
++{
++  int ret;
++
++#ifdef _REENT_SMALL
++  /* For REENT_SMALL platforms, it is possible we are being
++     called for the first time on a std stream.  This std
++     stream can belong to a reentrant struct that is not
++     _REENT.  If CHECK_INIT gets called below based on _REENT,
++     we will end up changing said file pointers to the equivalent
++     std stream off of _REENT.  This causes unexpected behavior if
++     there is any data to flush on the _REENT std stream.  There
++     are two alternatives to fix this:  1) make a reentrant fflush
++     or 2) simply recognize that this file has nothing to flush
++     and return immediately before performing a CHECK_INIT.  Choice
++     2 is implemented here due to its simplicity.  */
++  if (fp->_bf._base == NULL)
++    return 0;
++#endif /* _REENT_SMALL  */
++
++  CHECK_INIT (ptr, fp);
++
++  if (!fp->_flags)
++    return 0;
++
++  _flockfile (fp);
++  ret = __sflush_r (ptr, fp);
++  _funlockfile (fp);
++  return ret;
++}
++
+ #ifndef _REENT_ONLY
+<span style="background-color: #FF0000"> </span>
+ int
+diff -Naur newlib-1.19.0.orig/newlib/libc/stdio/fgetc.c newlib-1.19.0/newlib/libc/stdio/fgetc.c
+--- newlib-1.19.0.orig/newlib/libc/stdio/fgetc.c       2009-04-25 00:52:51.000000000 +0200
++++ newlib-1.19.0/newlib/libc/stdio/fgetc.c    2011-07-24 06:43:01.735140574 +0200
+@@ -93,11 +93,9 @@
+ #if !defined(PREFER_SIZE_OVER_SPEED) && !defined(__OPTIMIZE_SIZE__)
+   int result;
+   CHECK_INIT(_REENT, fp);
+-  __sfp_lock_acquire ();
+   _flockfile (fp);
+   result = __sgetc_r (_REENT, fp);
+   _funlockfile (fp);
+-  __sfp_lock_release ();
+   return result;
+ #else
+   return _fgetc_r (_REENT, fp);
+diff -Naur newlib-1.19.0.orig/newlib/libc/stdio/fgets.c newlib-1.19.0/newlib/libc/stdio/fgets.c
+--- newlib-1.19.0.orig/newlib/libc/stdio/fgets.c       2009-04-25 00:52:51.000000000 +0200
++++ newlib-1.19.0/newlib/libc/stdio/fgets.c    2011-07-24 06:43:01.735140574 +0200
+@@ -98,7 +98,6 @@
+<span style="background-color: #FF0000"> </span>
+   CHECK_INIT(ptr, fp);
+<span style="background-color: #FF0000"> </span>
+-  __sfp_lock_acquire ();
+   _flockfile (fp);
+ #ifdef __SCLE
+   if (fp->_flags & __SCLE)
+@@ -114,12 +113,10 @@
+       if (c == EOF && s == buf)
+         {
+           _funlockfile (fp);
+-        __sfp_lock_release ();
+           return NULL;
+         }
+       *s = 0;
+       _funlockfile (fp);
+-      __sfp_lock_release ();
+       return buf;
+     }
+ #endif
+@@ -138,7 +135,6 @@
+<span style="background-color: #FF0000"> </span>       if (s == buf)
+                 {
+                   _funlockfile (fp);
+-                __sfp_lock_release ();
+                   return 0;
+                 }
+<span style="background-color: #FF0000"> </span>       break;
+@@ -164,7 +160,6 @@
+<span style="background-color: #FF0000"> </span>   _CAST_VOID memcpy ((_PTR) s, (_PTR) p, len);
+<span style="background-color: #FF0000"> </span>   s[len] = 0;
+           _funlockfile (fp);
+-        __sfp_lock_release ();
+<span style="background-color: #FF0000"> </span>   return (buf);
+<span style="background-color: #FF0000"> </span> }
+       fp->_r -= len;
+@@ -175,7 +170,6 @@
+   while ((n -= len) != 0);
+   *s = 0;
+   _funlockfile (fp);
+-  __sfp_lock_release ();
+   return buf;
+ }
+<span style="background-color: #FF0000"> </span>
+diff -Naur newlib-1.19.0.orig/newlib/libc/stdio/fgetwc.c newlib-1.19.0/newlib/libc/stdio/fgetwc.c
+--- newlib-1.19.0.orig/newlib/libc/stdio/fgetwc.c      2009-04-25 00:52:52.000000000 +0200
++++ newlib-1.19.0/newlib/libc/stdio/fgetwc.c   2011-07-24 06:43:01.735140574 +0200
+@@ -164,12 +164,10 @@
+ {
+   wint_t r;
+<span style="background-color: #FF0000"> </span>
+-  __sfp_lock_acquire ();
+   _flockfile (fp);
+   ORIENT(fp, 1);
+   r = __fgetwc (ptr, fp);
+   _funlockfile (fp);
+-  __sfp_lock_release ();
+   return r;
+ }
+<span style="background-color: #FF0000"> </span>
+diff -Naur newlib-1.19.0.orig/newlib/libc/stdio/fgetws.c newlib-1.19.0/newlib/libc/stdio/fgetws.c
+--- newlib-1.19.0.orig/newlib/libc/stdio/fgetws.c      2009-04-25 00:52:52.000000000 +0200
++++ newlib-1.19.0/newlib/libc/stdio/fgetws.c   2011-07-24 06:43:01.736140590 +0200
+@@ -93,7 +93,6 @@
+   const char *src;
+   unsigned char *nl;
+<span style="background-color: #FF0000"> </span>
+-  __sfp_lock_acquire ();
+   _flockfile (fp);
+   ORIENT (fp, 1);
+<span style="background-color: #FF0000"> </span>
+@@ -144,12 +143,10 @@
+     goto error;
+   *wsp++ = L'\0';
+   _funlockfile (fp);
+-  __sfp_lock_release ();
+   return ws;
+<span style="background-color: #FF0000"> </span>
+ error:
+   _funlockfile (fp);
+-  __sfp_lock_release ();
+   return NULL;
+ }
+<span style="background-color: #FF0000"> </span>
+diff -Naur newlib-1.19.0.orig/newlib/libc/stdio/fmemopen.c newlib-1.19.0/newlib/libc/stdio/fmemopen.c
+--- newlib-1.19.0.orig/newlib/libc/stdio/fmemopen.c    2007-08-02 22:23:06.000000000 +0200
++++ newlib-1.19.0/newlib/libc/stdio/fmemopen.c 2011-07-24 06:43:01.736140590 +0200
+@@ -281,7 +281,7 @@
+<span style="background-color: #FF0000"> </span>
+   if ((flags = __sflags (ptr, mode, &dummy)) == 0)
+     return NULL;
+-  if (!size || !(buf || flags & __SAPP))
++  if (!size || !(buf || flags & __SRW))
+     {
+       ptr->_errno = EINVAL;
+       return NULL;
+@@ -310,7 +310,7 @@
+     {
+       /* r+/w+/a+, and no buf: file starts empty.  */
+       c->buf = (char *) (c + 1);
+-      *(char *) buf = '\0';
++      c->buf[0] = '\0';
+       c->pos = c->eof = 0;
+       c->append = (flags & __SAPP) != 0;
+     }
+diff -Naur newlib-1.19.0.orig/newlib/libc/stdio/fpurge.c newlib-1.19.0/newlib/libc/stdio/fpurge.c
+--- newlib-1.19.0.orig/newlib/libc/stdio/fpurge.c      2009-07-03 13:58:04.000000000 +0200
++++ newlib-1.19.0/newlib/libc/stdio/fpurge.c   2011-07-24 06:43:01.736140590 +0200
+@@ -11,6 +11,8 @@
+<span style="background-color: #FF0000"> </span> fpurge
+ INDEX
+<span style="background-color: #FF0000"> </span> _fpurge_r
++INDEX
++      __fpurge
+<span style="background-color: #FF0000"> </span>
+ ANSI_SYNOPSIS
+<span style="background-color: #FF0000"> </span> #include <stdio.h>
+@@ -18,6 +20,11 @@
+<span style="background-color: #FF0000"> </span>
+<span style="background-color: #FF0000"> </span> int _fpurge_r(struct _reent *<[reent]>, FILE *<[fp]>);
+<span style="background-color: #FF0000"> </span>
++      #include <stdio.h>
++      #include <stdio_ext.h>
++      void  __fpurge(FILE *<[fp]>);
++
++
+ DESCRIPTION
+ Use <<fpurge>> to clear all buffers of the given stream.  For output
+ streams, this discards data not yet written to disk.  For input streams,
+@@ -26,6 +33,8 @@
+ and generally is only needed when manually altering the underlying file
+ descriptor of a stream.
+<span style="background-color: #FF0000"> </span>
++<<__fpurge>> behaves exactly like <<fpurge>> but does not return a value.
++
+ The alternate function <<_fpurge_r>> is a reentrant version, where the
+ extra argument <[reent]> is a pointer to a reentrancy structure, and
+ <[fp]> must not be NULL.
+@@ -42,6 +51,9 @@
+<span style="background-color: #FF0000"> </span>
+ #include <_ansi.h>
+ #include <stdio.h>
++#ifndef __rtems__
++#include <stdio_ext.h>
++#endif
+ #include <errno.h>
+ #include "local.h"
+<span style="background-color: #FF0000"> </span>
+@@ -87,4 +99,15 @@
+   return _fpurge_r (_REENT, fp);
+ }
+<span style="background-color: #FF0000"> </span>
++#ifndef __rtems__
++
++void
++_DEFUN(__fpurge, (fp),
++       register FILE * fp)
++{
++  _fpurge_r (_REENT, fp);
++}
++
++#endif
++
+ #endif /* _REENT_ONLY */
+diff -Naur newlib-1.19.0.orig/newlib/libc/stdio/fread.c newlib-1.19.0/newlib/libc/stdio/fread.c
+--- newlib-1.19.0.orig/newlib/libc/stdio/fread.c       2009-04-25 00:52:52.000000000 +0200
++++ newlib-1.19.0/newlib/libc/stdio/fread.c    2011-07-24 06:43:01.736140590 +0200
+@@ -146,7 +146,6 @@
+<span style="background-color: #FF0000"> </span>
+   CHECK_INIT(ptr, fp);
+<span style="background-color: #FF0000"> </span>
+-  __sfp_lock_acquire ();
+   _flockfile (fp);
+   ORIENT (fp, -1);
+   if (fp->_r < 0)
+@@ -197,12 +196,10 @@
+               if (fp->_flags & __SCLE)
+<span style="background-color: #FF0000"> </span>         {
+<span style="background-color: #FF0000"> </span>           _funlockfile (fp);
+-                __sfp_lock_release ();
+<span style="background-color: #FF0000"> </span>           return crlf_r (ptr, fp, buf, total-resid, 1) / size;
+<span style="background-color: #FF0000"> </span>         }
+ #endif
+<span style="background-color: #FF0000"> </span>       _funlockfile (fp);
+-            __sfp_lock_release ();
+<span style="background-color: #FF0000"> </span>       return (total - resid) / size;
+<span style="background-color: #FF0000"> </span>     }
+<span style="background-color: #FF0000"> </span> }
+@@ -224,12 +221,10 @@
+<span style="background-color: #FF0000"> </span>       if (fp->_flags & __SCLE)
+<span style="background-color: #FF0000"> </span>         {
+<span style="background-color: #FF0000"> </span>           _funlockfile (fp);
+-                __sfp_lock_release ();
+<span style="background-color: #FF0000"> </span>           return crlf_r (ptr, fp, buf, total-resid, 1) / size;
+<span style="background-color: #FF0000"> </span>         }
+ #endif
+<span style="background-color: #FF0000"> </span>       _funlockfile (fp);
+-            __sfp_lock_release ();
+<span style="background-color: #FF0000"> </span>       return (total - resid) / size;
+<span style="background-color: #FF0000"> </span>     }
+<span style="background-color: #FF0000"> </span> }
+@@ -243,12 +238,10 @@
+   if (fp->_flags & __SCLE)
+     {
+       _funlockfile (fp);
+-      __sfp_lock_release ();
+       return crlf_r(ptr, fp, buf, total, 0) / size;
+     }
+ #endif
+   _funlockfile (fp);
+-  __sfp_lock_release ();
+   return count;
+ }
+<span style="background-color: #FF0000"> </span>
+diff -Naur newlib-1.19.0.orig/newlib/libc/stdio/freopen.c newlib-1.19.0/newlib/libc/stdio/freopen.c
+--- newlib-1.19.0.orig/newlib/libc/stdio/freopen.c     2008-12-12 16:45:19.000000000 +0100
++++ newlib-1.19.0/newlib/libc/stdio/freopen.c  2011-07-24 06:43:01.736140590 +0200
+@@ -98,8 +98,6 @@
+   int flags, oflags;
+   int e = 0;
+<span style="background-color: #FF0000"> </span>
+-  __sfp_lock_acquire ();
+-
+   CHECK_INIT (ptr, fp);
+<span style="background-color: #FF0000"> </span>
+   _flockfile (fp);
+@@ -108,7 +106,6 @@
+     {
+       _funlockfile (fp);
+       _fclose_r (ptr, fp);
+-      __sfp_lock_release ();
+       return NULL;
+     }
+<span style="background-color: #FF0000"> </span>
+@@ -208,6 +205,7 @@
+<span style="background-color: #FF0000"> </span>
+   if (f < 0)
+     {                         /* did not get it after all */
++      __sfp_lock_acquire ();
+       fp->_flags = 0;              /* set it free */
+       ptr->_errno = e;             /* restore in case _close clobbered */
+       _funlockfile (fp);
+@@ -232,7 +230,6 @@
+ #endif
+<span style="background-color: #FF0000"> </span>
+   _funlockfile (fp);
+-  __sfp_lock_release ();
+   return fp;
+ }
+<span style="background-color: #FF0000"> </span>
+diff -Naur newlib-1.19.0.orig/newlib/libc/stdio/fscanf.c newlib-1.19.0/newlib/libc/stdio/fscanf.c
+--- newlib-1.19.0.orig/newlib/libc/stdio/fscanf.c      2004-04-23 22:01:55.000000000 +0200
++++ newlib-1.19.0/newlib/libc/stdio/fscanf.c   2011-07-24 06:43:01.736140590 +0200
+@@ -45,7 +45,7 @@
+ #else
+   va_start (ap);
+ #endif
+-  ret = __svfscanf_r (_REENT, fp, fmt, ap);
++  ret = _vfscanf_r (_REENT, fp, fmt, ap);
+   va_end (ap);
+   return ret;
+ }
+@@ -71,7 +71,7 @@
+ #else
+   va_start (ap);
+ #endif
+-  ret = __svfscanf_r (ptr, fp, fmt, ap);
++  ret = _vfscanf_r (ptr, fp, fmt, ap);
+   va_end (ap);
+   return (ret);
+ }
+diff -Naur newlib-1.19.0.orig/newlib/libc/stdio/fseek.c newlib-1.19.0/newlib/libc/stdio/fseek.c
+--- newlib-1.19.0.orig/newlib/libc/stdio/fseek.c       2009-12-17 20:43:43.000000000 +0100
++++ newlib-1.19.0/newlib/libc/stdio/fseek.c    2011-07-24 06:43:01.737140605 +0200
+@@ -138,7 +138,6 @@
+<span style="background-color: #FF0000"> </span>
+   CHECK_INIT (ptr, fp);
+<span style="background-color: #FF0000"> </span>
+-  __sfp_lock_acquire ();
+   _flockfile (fp);
+<span style="background-color: #FF0000"> </span>
+   /* If we've been doing some writing, and we're in append mode
+@@ -156,7 +155,6 @@
+     {
+       ptr->_errno = ESPIPE;        /* ??? */
+       _funlockfile (fp);
+-      __sfp_lock_release ();
+       return EOF;
+     }
+<span style="background-color: #FF0000"> </span>
+@@ -182,7 +180,6 @@
+<span style="background-color: #FF0000"> </span>   if (curoff == -1L)
+<span style="background-color: #FF0000"> </span>     {
+<span style="background-color: #FF0000"> </span>       _funlockfile (fp);
+-            __sfp_lock_release ();
+<span style="background-color: #FF0000"> </span>       return EOF;
+<span style="background-color: #FF0000"> </span>     }
+<span style="background-color: #FF0000"> </span> }
+@@ -208,7 +205,6 @@
+     default:
+       ptr->_errno = EINVAL;
+       _funlockfile (fp);
+-      __sfp_lock_release ();
+       return (EOF);
+     }
+<span style="background-color: #FF0000"> </span>
+@@ -268,7 +264,6 @@
+     {
+       ptr->_errno = EOVERFLOW;
+       _funlockfile (fp);
+-      __sfp_lock_release ();
+       return EOF;
+     }
+<span style="background-color: #FF0000"> </span>
+@@ -325,7 +320,6 @@
+       fp->_flags &= ~__SEOF;
+       memset (&fp->_mbstate, 0, sizeof (_mbstate_t));
+       _funlockfile (fp);
+-      __sfp_lock_release ();
+       return 0;
+     }
+<span style="background-color: #FF0000"> </span>
+@@ -356,7 +350,6 @@
+     }
+   memset (&fp->_mbstate, 0, sizeof (_mbstate_t));
+   _funlockfile (fp);
+-  __sfp_lock_release ();
+   return 0;
+<span style="background-color: #FF0000"> </span>
+   /*
+@@ -369,7 +362,6 @@
+       || seekfn (ptr, fp->_cookie, offset, whence) == POS_ERR)
+     {
+       _funlockfile (fp);
+-      __sfp_lock_release ();
+       return EOF;
+     }
+   /* success: clear EOF indicator and discard ungetc() data */
+@@ -388,7 +380,6 @@
+   fp->_flags &= ~__SNPT;
+   memset (&fp->_mbstate, 0, sizeof (_mbstate_t));
+   _funlockfile (fp);
+-  __sfp_lock_release ();
+   return 0;
+ }
+<span style="background-color: #FF0000"> </span>
+diff -Naur newlib-1.19.0.orig/newlib/libc/stdio/fvwrite.c newlib-1.19.0/newlib/libc/stdio/fvwrite.c
+--- newlib-1.19.0.orig/newlib/libc/stdio/fvwrite.c     2007-07-13 22:37:53.000000000 +0200
++++ newlib-1.19.0/newlib/libc/stdio/fvwrite.c  2011-07-24 06:43:01.737140605 +0200
+@@ -61,11 +61,7 @@
+<span style="background-color: #FF0000"> </span>
+   /* make sure we can write */
+   if (cantwrite (ptr, fp))
+-    {
+-      fp->_flags |= __SERR;
+-      ptr->_errno = EBADF;
+-      return EOF;
+-    }
++    return EOF;
+<span style="background-color: #FF0000"> </span>
+   iov = uio->uio_iov;
+   len = 0;
+diff -Naur newlib-1.19.0.orig/newlib/libc/stdio/fwalk.c newlib-1.19.0/newlib/libc/stdio/fwalk.c
+--- newlib-1.19.0.orig/newlib/libc/stdio/fwalk.c       2009-01-12 23:19:11.000000000 +0100
++++ newlib-1.19.0/newlib/libc/stdio/fwalk.c    2011-07-24 06:43:01.737140605 +0200
+@@ -27,8 +27,8 @@
+ #include <errno.h>
+ #include "local.h"
+<span style="background-color: #FF0000"> </span>
+-static int
+-_DEFUN(__fwalk, (ptr, function),
++int
++_DEFUN(_fwalk, (ptr, function),
+        struct _reent *ptr _AND
+        register int (*function) (FILE *))
+ {
+@@ -36,11 +36,19 @@
+   register int n, ret = 0;
+   register struct _glue *g;
+<span style="background-color: #FF0000"> </span>
++  /*
++   * It should be safe to walk the list without locking it;
++   * new nodes are only added to the end and none are ever
++   * removed.
++   *
++   * Avoid locking this list while walking it or else you will
++   * introduce a potential deadlock in [at least] refill.c.
++   */
+   for (g = &ptr->__sglue; g != NULL; g = g->_next)
+     for (fp = g->_iobs, n = g->_niobs; --n >= 0; fp++)
+       if (fp->_flags != 0)
+         {
+-          if (fp->_flags != 0 && fp->_file != -1)
++          if (fp->_flags != 0 && fp->_flags != 1 && fp->_file != -1)
+             ret |= (*function) (fp);
+         }
+<span style="background-color: #FF0000"> </span>
+@@ -49,8 +57,8 @@
+<span style="background-color: #FF0000"> </span>
+ /* Special version of __fwalk where the function pointer is a reentrant
+    I/O function (e.g. _fclose_r).  */
+-static int
+-_DEFUN(__fwalk_reent, (ptr, reent_function),
++int
++_DEFUN(_fwalk_reent, (ptr, reent_function),
+        struct _reent *ptr _AND
+        register int (*reent_function) (struct _reent *, FILE *))
+ {
+@@ -58,51 +66,21 @@
+   register int n, ret = 0;
+   register struct _glue *g;
+<span style="background-color: #FF0000"> </span>
++  /*
++   * It should be safe to walk the list without locking it;
++   * new nodes are only added to the end and none are ever
++   * removed.
++   *
++   * Avoid locking this list while walking it or else you will
++   * introduce a potential deadlock in [at least] refill.c.
++   */
+   for (g = &ptr->__sglue; g != NULL; g = g->_next)
+     for (fp = g->_iobs, n = g->_niobs; --n >= 0; fp++)
+       if (fp->_flags != 0)
+         {
+-          if (fp->_flags != 0 && fp->_file != -1)
++          if (fp->_flags != 0 && fp->_flags != 1 && fp->_file != -1)
+             ret |= (*reent_function) (ptr, fp);
+         }
+<span style="background-color: #FF0000"> </span>
+   return ret;
+ }
+-
+-int
+-_DEFUN(_fwalk, (ptr, function),
+-       struct _reent *ptr _AND
+-       register int (*function)(FILE *))
+-{
+-  register int ret = 0;
+-
+-  __sfp_lock_acquire ();
+-
+-  /* Must traverse given list for streams.  Note that _GLOBAL_REENT
+-     only walked once in exit().  */
+-  ret |= __fwalk (ptr, function);
+-
+-  __sfp_lock_release ();
+-
+-  return ret;
+-}
+-
+-/* Special version of _fwalk which handles a function pointer to a
+-   reentrant I/O function (e.g. _fclose_r).  */
+-int
+-_DEFUN(_fwalk_reent, (ptr, reent_function),
+-       struct _reent *ptr _AND
+-       register int (*reent_function) (struct _reent *, FILE *))
+-{
+-  register int ret = 0;
+-
+-  __sfp_lock_acquire ();
+-
+-  /* Must traverse given list for streams.  Note that _GLOBAL_REENT
+-     only walked once in exit().  */
+-  ret |= __fwalk_reent (ptr, reent_function);
+-
+-  __sfp_lock_release ();
+-
+-  return ret;
+-}
+diff -Naur newlib-1.19.0.orig/newlib/libc/stdio/fwscanf.c newlib-1.19.0/newlib/libc/stdio/fwscanf.c
+--- newlib-1.19.0.orig/newlib/libc/stdio/fwscanf.c     2009-03-11 12:53:22.000000000 +0100
++++ newlib-1.19.0/newlib/libc/stdio/fwscanf.c  2011-07-24 06:43:01.737140605 +0200
+@@ -31,7 +31,7 @@
+   va_list ap;
+<span style="background-color: #FF0000"> </span>
+   va_start (ap, fmt);
+-  ret = __svfwscanf_r (_REENT, fp, fmt, ap);
++  ret = _vfwscanf_r (_REENT, fp, fmt, ap);
+   va_end (ap);
+   return ret;
+ }
+@@ -45,7 +45,7 @@
+   va_list ap;
+<span style="background-color: #FF0000"> </span>
+   va_start (ap, fmt);
+-  ret = __svfwscanf_r (ptr, fp, fmt, ap);
++  ret = _vfwscanf_r (ptr, fp, fmt, ap);
+   va_end (ap);
+   return (ret);
+ }
+diff -Naur newlib-1.19.0.orig/newlib/libc/stdio/getc.c newlib-1.19.0/newlib/libc/stdio/getc.c
+--- newlib-1.19.0.orig/newlib/libc/stdio/getc.c        2009-04-25 00:52:52.000000000 +0200
++++ newlib-1.19.0/newlib/libc/stdio/getc.c     2011-07-24 06:43:01.737140605 +0200
+@@ -92,11 +92,9 @@
+ {
+   int result;
+   CHECK_INIT (ptr, fp);
+-  __sfp_lock_acquire ();
+   _flockfile (fp);
+   result = __sgetc_r (ptr, fp);
+   _funlockfile (fp);
+-  __sfp_lock_release ();
+   return result;
+ }
+<span style="background-color: #FF0000"> </span>
+@@ -108,11 +106,9 @@
+ {
+   int result;
+   CHECK_INIT (_REENT, fp);
+-  __sfp_lock_acquire ();
+   _flockfile (fp);
+   result = __sgetc_r (_REENT, fp);
+   _funlockfile (fp);
+-  __sfp_lock_release ();
+   return result;
+ }
+<span style="background-color: #FF0000"> </span>
+diff -Naur newlib-1.19.0.orig/newlib/libc/stdio/getdelim.c newlib-1.19.0/newlib/libc/stdio/getdelim.c
+--- newlib-1.19.0.orig/newlib/libc/stdio/getdelim.c    2009-04-25 00:52:52.000000000 +0200
++++ newlib-1.19.0/newlib/libc/stdio/getdelim.c 2011-07-24 06:43:01.738140620 +0200
+@@ -81,7 +81,6 @@
+<span style="background-color: #FF0000"> </span>
+   CHECK_INIT (_REENT, fp);
+<span style="background-color: #FF0000"> </span>
+-  __sfp_lock_acquire ();
+   _flockfile (fp);
+<span style="background-color: #FF0000"> </span>
+   numbytes = *n;
+@@ -131,7 +130,6 @@
+     }
+<span style="background-color: #FF0000"> </span>
+   _funlockfile (fp);
+-  __sfp_lock_release ();
+<span style="background-color: #FF0000"> </span>
+   /* if no input data, return failure */
+   if (ptr == buf)
+diff -Naur newlib-1.19.0.orig/newlib/libc/stdio/gets.c newlib-1.19.0/newlib/libc/stdio/gets.c
+--- newlib-1.19.0.orig/newlib/libc/stdio/gets.c        2009-04-25 00:52:52.000000000 +0200
++++ newlib-1.19.0/newlib/libc/stdio/gets.c     2011-07-24 06:43:01.738140620 +0200
+@@ -79,14 +79,12 @@
+   register int c;
+   register char *s = buf;
+<span style="background-color: #FF0000"> </span>
+-  __sfp_lock_acquire ();
+   _flockfile (stdin);
+   while ((c = __sgetc_r (ptr, stdin)) != '\n')
+     if (c == EOF)
+       if (s == buf)
+<span style="background-color: #FF0000"> </span> {
+<span style="background-color: #FF0000"> </span>   _funlockfile (stdin);
+-        __sfp_lock_release ();
+<span style="background-color: #FF0000"> </span>   return NULL;
+<span style="background-color: #FF0000"> </span> }
+       else
+@@ -95,7 +93,6 @@
+       *s++ = c;
+   *s = 0;
+   _funlockfile (stdin);
+-  __sfp_lock_release ();
+   return buf;
+ }
+<span style="background-color: #FF0000"> </span>
+diff -Naur newlib-1.19.0.orig/newlib/libc/stdio/local.h newlib-1.19.0/newlib/libc/stdio/local.h
+--- newlib-1.19.0.orig/newlib/libc/stdio/local.h       2009-04-22 10:30:03.000000000 +0200
++++ newlib-1.19.0/newlib/libc/stdio/local.h    2011-07-24 06:43:01.738140620 +0200
+@@ -54,6 +54,7 @@
+<span style="background-color: #FF0000"> </span>                           va_list));
+ extern FILE  *_EXFUN(__sfp,(struct _reent *));
+ extern int    _EXFUN(__sflags,(struct _reent *,_CONST char*, int*));
++extern int    _EXFUN(__sflush_r,(struct _reent *,FILE *));
+ extern int    _EXFUN(__srefill_r,(struct _reent *,FILE *));
+ extern _READ_WRITE_RETURN_TYPE _EXFUN(__sread,(struct _reent *, void *, char *,
+<span style="background-color: #FF0000"> </span>                                        int));
+@@ -112,7 +113,8 @@
+     }                                         \
+   while (0)
+<span style="background-color: #FF0000"> </span>
+-/* Return true iff the given FILE cannot be written now.  */
++/* Return true and set errno and stream error flag iff the given FILE
++   cannot be written now.  */
+<span style="background-color: #FF0000"> </span>
+ #define       cantwrite(ptr, fp)                                     \
+   ((((fp)->_flags & __SWR) == 0 || (fp)->_bf._base == NULL) && \
+diff -Naur newlib-1.19.0.orig/newlib/libc/stdio/open_memstream.c newlib-1.19.0/newlib/libc/stdio/open_memstream.c
+--- newlib-1.19.0.orig/newlib/libc/stdio/open_memstream.c      2009-02-25 05:00:05.000000000 +0100
++++ newlib-1.19.0/newlib/libc/stdio/open_memstream.c   2011-07-24 06:43:01.738140620 +0200
+@@ -330,8 +330,10 @@
+     c->max *= sizeof(wchar_t);
+   if (c->max < 64)
+     c->max = 64;
+-  else if (c->max > 64 * 1024)
+-    c->max = 64 * 1024;
++#if (SIZE_MAX >= 0x10000)
++  else if (c->max > 0x10000)
++    c->max = 0x10000;
++#endif
+   *size = 0;
+   *buf = _malloc_r (ptr, c->max);
+   if (!*buf)
+diff -Naur newlib-1.19.0.orig/newlib/libc/stdio/perror.c newlib-1.19.0/newlib/libc/stdio/perror.c
+--- newlib-1.19.0.orig/newlib/libc/stdio/perror.c      2005-02-08 02:33:17.000000000 +0100
++++ newlib-1.19.0/newlib/libc/stdio/perror.c   2011-07-24 06:43:01.738140620 +0200
+@@ -73,6 +73,7 @@
+        _CONST char *s)
+ {
+   char *error;
++  int dummy;
+<span style="background-color: #FF0000"> </span>
+   _REENT_SMALL_CHECK_INIT (ptr);
+   if (s != NULL && *s != '\0')
+@@ -81,7 +82,7 @@
+       fputs (": ", _stderr_r (ptr));
+     }
+<span style="background-color: #FF0000"> </span>
+-  if ((error = strerror (ptr->_errno)) != NULL)
++  if ((error = _strerror_r (ptr, ptr->_errno, 1, &dummy)) != NULL)
+     fputs (error, _stderr_r (ptr));
+<span style="background-color: #FF0000"> </span>
+   fputc ('\n', _stderr_r (ptr));
+diff -Naur newlib-1.19.0.orig/newlib/libc/stdio/refill.c newlib-1.19.0/newlib/libc/stdio/refill.c
+--- newlib-1.19.0.orig/newlib/libc/stdio/refill.c      2008-12-11 00:43:12.000000000 +0100
++++ newlib-1.19.0/newlib/libc/stdio/refill.c   2011-07-24 06:43:01.739140635 +0200
+@@ -102,9 +102,19 @@
+    * flush all line buffered output files, per the ANSI C
+    * standard.
+    */
+-
+   if (fp->_flags & (__SLBF | __SNBF))
+-    _CAST_VOID _fwalk (_GLOBAL_REENT, lflush);
++    {
++      /* Ignore this file in _fwalk to avoid potential deadlock. */
++      short orig_flags = fp->_flags;
++      fp->_flags = 1;
++      _CAST_VOID _fwalk (_GLOBAL_REENT, lflush);
++      fp->_flags = orig_flags;
++
++      /* Now flush this file without locking it. */
++      if ((fp->_flags & (__SLBF|__SWR)) == (__SLBF|__SWR))
++      __sflush_r (ptr, fp);
++    }
++
+   fp->_p = fp->_bf._base;
+   fp->_r = fp->_read (ptr, fp->_cookie, (char *) fp->_p, fp->_bf._size);
+ #ifndef __CYGWIN__
+diff -Naur newlib-1.19.0.orig/newlib/libc/stdio/scanf.c newlib-1.19.0/newlib/libc/stdio/scanf.c
+--- newlib-1.19.0.orig/newlib/libc/stdio/scanf.c       2005-02-08 02:33:17.000000000 +0100
++++ newlib-1.19.0/newlib/libc/stdio/scanf.c    2011-07-24 06:43:01.739140635 +0200
+@@ -45,7 +45,7 @@
+ #else
+   va_start (ap);
+ #endif
+-  ret = __svfscanf_r (_REENT, _stdin_r (_REENT), fmt, ap);
++  ret = _vfscanf_r (_REENT, _stdin_r (_REENT), fmt, ap);
+   va_end (ap);
+   return ret;
+ }
+@@ -71,7 +71,7 @@
+ #else
+   va_start (ap);
+ #endif
+-  ret = __svfscanf_r (ptr, _stdin_r (ptr), fmt, ap);
++  ret = _vfscanf_r (ptr, _stdin_r (ptr), fmt, ap);
+   va_end (ap);
+   return (ret);
+ }
+diff -Naur newlib-1.19.0.orig/newlib/libc/stdio/tmpnam.c newlib-1.19.0/newlib/libc/stdio/tmpnam.c
+--- newlib-1.19.0.orig/newlib/libc/stdio/tmpnam.c      2004-04-23 22:01:55.000000000 +0200
++++ newlib-1.19.0/newlib/libc/stdio/tmpnam.c   2011-07-24 06:43:01.739140635 +0200
+@@ -94,6 +94,7 @@
+ #include <_ansi.h>
+ #include <reent.h>
+ #include <stdio.h>
++#include <stdint.h>
+ #include <stdlib.h>
+ #include <string.h>
+ #include <fcntl.h>
+@@ -109,7 +110,7 @@
+        char *result       _AND
+        _CONST char *part1 _AND
+        _CONST char *part2 _AND
+-       int part3          _AND
++       intptr_t part3     _AND
+        int *part4)
+ {
+   /*  Generate the filename and make sure that there isn't one called
+@@ -183,7 +184,7 @@
+   if (filename)
+     {
+       if (! worker (p, filename, dir, prefix,
+-                  _getpid_r (p) ^ (int) (_POINTER_INT) p, &p->_inc))
++                  _getpid_r (p) ^ (intptr_t) p, &p->_inc))
+<span style="background-color: #FF0000"> </span> return NULL;
+     }
+   return filename;
+diff -Naur newlib-1.19.0.orig/newlib/libc/stdio/vfscanf.c newlib-1.19.0/newlib/libc/stdio/vfscanf.c
+--- newlib-1.19.0.orig/newlib/libc/stdio/vfscanf.c     2010-01-20 00:16:45.000000000 +0100
++++ newlib-1.19.0/newlib/libc/stdio/vfscanf.c  2011-07-24 06:43:01.739140635 +0200
+@@ -494,7 +494,6 @@
+ # define GET_ARG(n, ap, type) (va_arg (ap, type))
+ #endif
+<span style="background-color: #FF0000"> </span>
+-  __sfp_lock_acquire ();
+   _flockfile (fp);
+<span style="background-color: #FF0000"> </span>
+   ORIENT (fp, -1);
+@@ -795,7 +794,6 @@
+<span style="background-color: #FF0000"> </span>    */
+<span style="background-color: #FF0000"> </span> case '\0':              /* compat */
+<span style="background-color: #FF0000"> </span>   _funlockfile (fp);
+-        __sfp_lock_release ();
+<span style="background-color: #FF0000"> </span>   return EOF;
+<span style="background-color: #FF0000"> </span>
+<span style="background-color: #FF0000"> </span> default:                /* compat */
+@@ -1596,13 +1594,11 @@
+      invalid format string), return EOF if no matches yet, else number
+      of matches made prior to failure.  */
+   _funlockfile (fp);
+-  __sfp_lock_release ();
+   return nassigned && !(fp->_flags & __SERR) ? nassigned : EOF;
+ match_failure:
+ all_done:
+   /* Return number of matches, which can be 0 on match failure.  */
+   _funlockfile (fp);
+-  __sfp_lock_release ();
+   return nassigned;
+ }
+<span style="background-color: #FF0000"> </span>
+diff -Naur newlib-1.19.0.orig/newlib/libc/stdio/vfwprintf.c newlib-1.19.0/newlib/libc/stdio/vfwprintf.c
+--- newlib-1.19.0.orig/newlib/libc/stdio/vfwprintf.c   2010-04-28 11:59:37.000000000 +0200
++++ newlib-1.19.0/newlib/libc/stdio/vfwprintf.c        2011-07-24 06:43:01.740140650 +0200
+@@ -240,7 +240,7 @@
+ # endif /* !_NO_LONGDBL */
+<span style="background-color: #FF0000"> </span>
+ static wchar_t *wcvt(struct _reent *, _PRINTF_FLOAT_TYPE, int, int, wchar_t *,
+-                  int *, int, int *, wchar_t *);
++                  int *, int, int *, wchar_t *, int);
+<span style="background-color: #FF0000"> </span>
+ static int wexponent(wchar_t *, int, int);
+<span style="background-color: #FF0000"> </span>
+@@ -996,7 +996,23 @@
+<span style="background-color: #FF0000"> </span>                 flags |= FPT;
+<span style="background-color: #FF0000"> </span>
+<span style="background-color: #FF0000"> </span>                 cp = wcvt (data, _fpvalue, prec, flags, &softsign,
+-                                 &expt, ch, &ndig, cp);
++                                 &expt, ch, &ndig, cp, BUF);
++
++                      /* If buf is not large enough for the converted wchar_t
++                         sequence, call wcvt again with a malloced new buffer.
++                         This should happen fairly rarely.
++                       */
++                      if (cp == buf && ndig > BUF && malloc_buf == NULL) {
++                              if ((malloc_buf =
++                                  (wchar_t *)_malloc_r (data, ndig * sizeof (wchar_t)))
++                                  == NULL)
++                                {
++                                  fp->_flags |= __SERR;
++                                  goto error;
++                                }
++                              cp = wcvt (data, _fpvalue, prec, flags, &softsign,
++                                         &expt, ch, &ndig, malloc_buf, ndig);
++                      }
+<span style="background-color: #FF0000"> </span>
+<span style="background-color: #FF0000"> </span>                 if (ch == L'g' || ch == L'G') {
+<span style="background-color: #FF0000"> </span>                         if (expt <= -4 || expt > prec)
+@@ -1450,11 +1466,15 @@
+    to whether trailing zeros must be included.  Set *SIGN to nonzero
+    if VALUE was negative.  Set *DECPT to the exponent plus one.  Set
+    *LENGTH to the length of the returned string.  CH must be one of
+-   [aAeEfFgG]; if it is [aA], then the return string lives in BUF,
+-   otherwise the return value shares the mprec reentrant storage.  */
++   [aAeEfFgG]; different from vfprintf.c:cvt(), the return string
++   lives in BUF regardless of CH.  LEN is the length of BUF, except
++   when CH is [aA], in which case LEN is not in use.  If BUF is not
++   large enough for the converted string, only the first LEN number
++   of characters will be returned in BUF, but *LENGTH will be set to
++   the full length of the string before the truncation.  */
+ static wchar_t *
+ wcvt(struct _reent *data, _PRINTF_FLOAT_TYPE value, int ndigits, int flags,
+-     wchar_t *sign, int *decpt, int ch, int *length, wchar_t *buf)
++     wchar_t *sign, int *decpt, int ch, int *length, wchar_t *buf, int len)
+ {
+<span style="background-color: #FF0000"> </span> int mode, dsgn;
+ # ifdef _NO_LONGDBL
+@@ -1548,12 +1568,13 @@
+<span style="background-color: #FF0000"> </span>         while (rve < bp)
+<span style="background-color: #FF0000"> </span>                 *rve++ = '0';
+<span style="background-color: #FF0000"> </span>   }
++
++        *length = rve - digits; /* full length of the string */
+ #ifdef _MB_CAPABLE
+-        *length = _mbsnrtowcs_r (data, buf, (const char **) &digits,
+-                                 rve - digits, BUF, NULL);
++        _mbsnrtowcs_r (data, buf, (const char **) &digits, *length,
++                       len, NULL);
+ #else
+-        *length = rve - digits;
+-        for (i = 0; i < *length && i < BUF; ++i)
++        for (i = 0; i < *length && i < len; ++i)
+<span style="background-color: #FF0000"> </span>     buf[i] = (wchar_t) digits[i];
+ #endif
+<span style="background-color: #FF0000"> </span>   return buf;
+diff -Naur newlib-1.19.0.orig/newlib/libc/stdio/vfwscanf.c newlib-1.19.0/newlib/libc/stdio/vfwscanf.c
+--- newlib-1.19.0.orig/newlib/libc/stdio/vfwscanf.c    2009-03-11 12:53:22.000000000 +0100
++++ newlib-1.19.0/newlib/libc/stdio/vfwscanf.c 2011-07-24 06:43:01.740140650 +0200
+@@ -434,7 +434,6 @@
+ # define GET_ARG(n, ap, type) (va_arg (ap, type))
+ #endif
+<span style="background-color: #FF0000"> </span>
+-  __sfp_lock_acquire ();
+   _flockfile (fp);
+<span style="background-color: #FF0000"> </span>
+   ORIENT (fp, 1);
+@@ -714,7 +713,6 @@
+<span style="background-color: #FF0000"> </span>    */
+<span style="background-color: #FF0000"> </span> case L'\0':             /* compat */
+<span style="background-color: #FF0000"> </span>   _funlockfile (fp);
+-        __sfp_lock_release ();
+<span style="background-color: #FF0000"> </span>   return EOF;
+<span style="background-color: #FF0000"> </span>
+<span style="background-color: #FF0000"> </span> default:                /* compat */
+@@ -1443,13 +1441,11 @@
+      invalid format string), return EOF if no matches yet, else number
+      of matches made prior to failure.  */
+   _funlockfile (fp);
+-  __sfp_lock_release ();
+   return nassigned && !(fp->_flags & __SERR) ? nassigned : EOF;
+ match_failure:
+ all_done:
+   /* Return number of matches, which can be 0 on match failure.  */
+   _funlockfile (fp);
+-  __sfp_lock_release ();
+   return nassigned;
+ }
+<span style="background-color: #FF0000"> </span>
+diff -Naur newlib-1.19.0.orig/newlib/libc/stdio/wbuf.c newlib-1.19.0/newlib/libc/stdio/wbuf.c
+--- newlib-1.19.0.orig/newlib/libc/stdio/wbuf.c        2008-12-11 00:43:12.000000000 +0100
++++ newlib-1.19.0/newlib/libc/stdio/wbuf.c     2011-07-24 06:43:01.740140650 +0200
+@@ -54,11 +54,7 @@
+<span style="background-color: #FF0000"> </span>
+   fp->_w = fp->_lbfsize;
+   if (cantwrite (ptr, fp))
+-    {
+-      fp->_flags |= __SERR;
+-      ptr->_errno = EBADF;
+-      return EOF;
+-    }
++    return EOF;
+   c = (unsigned char) c;
+<span style="background-color: #FF0000"> </span>
+   ORIENT (fp, -1);
+diff -Naur newlib-1.19.0.orig/newlib/libc/stdio/wscanf.c newlib-1.19.0/newlib/libc/stdio/wscanf.c
+--- newlib-1.19.0.orig/newlib/libc/stdio/wscanf.c      2009-03-11 12:53:22.000000000 +0100
++++ newlib-1.19.0/newlib/libc/stdio/wscanf.c   2011-07-24 06:43:01.741140665 +0200
+@@ -32,7 +32,7 @@
+<span style="background-color: #FF0000"> </span>
+   _REENT_SMALL_CHECK_INIT (_REENT);
+   va_start (ap, fmt);
+-  ret = __svfwscanf_r (_REENT, _stdin_r (_REENT), fmt, ap);
++  ret = _vfwscanf_r (_REENT, _stdin_r (_REENT), fmt, ap);
+   va_end (ap);
+   return ret;
+ }
+@@ -47,7 +47,7 @@
+<span style="background-color: #FF0000"> </span>
+   _REENT_SMALL_CHECK_INIT (ptr);
+   va_start (ap, fmt);
+-  ret = __svfwscanf_r (ptr, _stdin_r (ptr), fmt, ap);
++  ret = _vfwscanf_r (ptr, _stdin_r (ptr), fmt, ap);
+   va_end (ap);
+   return (ret);
+ }
+diff -Naur newlib-1.19.0.orig/newlib/libc/stdio/wsetup.c newlib-1.19.0/newlib/libc/stdio/wsetup.c
+--- newlib-1.19.0.orig/newlib/libc/stdio/wsetup.c      2007-03-15 19:40:48.000000000 +0100
++++ newlib-1.19.0/newlib/libc/stdio/wsetup.c   2011-07-24 06:43:01.741140665 +0200
+@@ -20,12 +20,13 @@
+ #include <_ansi.h>
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <errno.h>
+ #include "local.h"
+<span style="background-color: #FF0000"> </span>
+ /*
+  * Various output routines call wsetup to be sure it is safe to write,
+  * because either _flags does not include __SWR, or _buf is NULL.
+- * _wsetup returns 0 if OK to write, nonzero otherwise.
++ * _wsetup returns 0 if OK to write, nonzero and set errno otherwise.
+  */
+<span style="background-color: #FF0000"> </span>
+ int
+@@ -44,7 +45,11 @@
+   if ((fp->_flags & __SWR) == 0)
+     {
+       if ((fp->_flags & __SRW) == 0)
+-      return EOF;
++        {
++        ptr->_errno = EBADF;
++        fp->_flags |= __SERR;
++        return EOF;
++        }
+       if (fp->_flags & __SRD)
+<span style="background-color: #FF0000"> </span> {
+<span style="background-color: #FF0000"> </span>   /* clobber any ungetc data */
+@@ -62,7 +67,7 @@
+    * A string I/O file should not explicitly allocate a buffer
+    * unless asprintf is being used.
+    */
+-  if (fp->_bf._base == NULL<span style="background-color: #FF0000"> </span>
++  if (fp->_bf._base == NULL
+         && (!(fp->_flags & __SSTR) || (fp->_flags & __SMBF)))
+     __smakebuf_r (ptr, fp);
+<span style="background-color: #FF0000"> </span>
+@@ -79,5 +84,11 @@
+   else
+     fp->_w = fp->_flags & __SNBF ? 0 : fp->_bf._size;
+<span style="background-color: #FF0000"> </span>
+-  return (!fp->_bf._base && (fp->_flags & __SMBF)) ? EOF : 0;
++  if (!fp->_bf._base && (fp->_flags & __SMBF))
++    {
++      /* __smakebuf_r set errno, but not flag */
++      fp->_flags |= __SERR;
++      return EOF;
++    }
++  return 0;
+ }
+diff -Naur newlib-1.19.0.orig/newlib/libc/stdio64/freopen64.c newlib-1.19.0/newlib/libc/stdio64/freopen64.c
+--- newlib-1.19.0.orig/newlib/libc/stdio64/freopen64.c 2007-07-13 22:37:53.000000000 +0200
++++ newlib-1.19.0/newlib/libc/stdio64/freopen64.c      2011-07-24 06:43:01.741140665 +0200
+@@ -97,7 +97,6 @@
+   int flags, oflags;
+   int e = 0;
+<span style="background-color: #FF0000"> </span>
+-  __sfp_lock_acquire ();
+<span style="background-color: #FF0000"> </span>
+   CHECK_INIT (ptr, fp);
+<span style="background-color: #FF0000"> </span>
+@@ -107,7 +106,6 @@
+     {
+       _funlockfile(fp);
+       _fclose_r (ptr, fp);
+-      __sfp_lock_release ();
+       return NULL;
+     }
+<span style="background-color: #FF0000"> </span>
+@@ -204,6 +202,7 @@
+<span style="background-color: #FF0000"> </span>
+   if (f < 0)
+     {                         /* did not get it after all */
++      __sfp_lock_acquire ();
+       fp->_flags = 0;              /* set it free */
+       ptr->_errno = e;             /* restore in case _close clobbered */
+       _funlockfile(fp);
+@@ -231,7 +230,6 @@
+   fp->_flags |= __SL64;
+<span style="background-color: #FF0000"> </span>
+   _funlockfile(fp);
+-  __sfp_lock_release ();
+   return fp;
+ }
+<span style="background-color: #FF0000"> </span>
+diff -Naur newlib-1.19.0.orig/newlib/libc/stdlib/atof.c newlib-1.19.0/newlib/libc/stdlib/atof.c
+--- newlib-1.19.0.orig/newlib/libc/stdlib/atof.c       2003-10-20 20:46:37.000000000 +0200
++++ newlib-1.19.0/newlib/libc/stdlib/atof.c    2011-07-24 06:43:01.742140680 +0200
+@@ -1,6 +1,6 @@
+ /*
+ FUNCTION
+-   <<atof>>, <<atoff>>---string to double or float
++   <<atof>> ---string to double
+<span style="background-color: #FF0000"> </span>
+ INDEX
+<span style="background-color: #FF0000"> </span> atof
+@@ -10,19 +10,14 @@
+ ANSI_SYNOPSIS
+<span style="background-color: #FF0000"> </span> #include <stdlib.h>
+         double atof(const char *<[s]>);
+-        float atoff(const char *<[s]>);
+<span style="background-color: #FF0000"> </span>
+ TRAD_SYNOPSIS
+<span style="background-color: #FF0000"> </span> #include <stdlib.h>
+         double atof(<[s]>)
+         char *<[s]>;
+<span style="background-color: #FF0000"> </span>
+-        float atoff(<[s]>)
+-        char *<[s]>;
+-
+ DESCRIPTION
+ <<atof>> converts the initial portion of a string to a <<double>>.
+-<<atoff>> converts the initial portion of a string to a <<float>>.
+<span style="background-color: #FF0000"> </span>
+ The functions parse the character string <[s]>,
+ locating a substring which can be converted to a floating-point
+@@ -36,7 +31,6 @@
+ something other than <<+>>, <<->>, <<.>>, or a digit.
+<span style="background-color: #FF0000"> </span>
+ <<atof(<[s]>)>> is implemented as <<strtod(<[s]>, NULL)>>.
+-<<atoff(<[s]>)>> is implemented as <<strtof(<[s]>, NULL)>>.
+<span style="background-color: #FF0000"> </span>
+ RETURNS
+ <<atof>> returns the converted substring value, if any, as a
+@@ -47,12 +41,9 @@
+ If the correct value would cause underflow, <<0.0>> is returned
+ and <<ERANGE>> is stored in <<errno>>.
+<span style="background-color: #FF0000"> </span>
+-<<atoff>> obeys the same rules as <<atof>>, except that it
+-returns a <<float>>.
+-
+ PORTABILITY
+-<<atof>> is ANSI C. <<atof>>, <<atoi>>, and <<atol>> are subsumed by <<strod>>
+-and <<strol>>, but are used extensively in existing code. These functions are
++<<atof>> is ANSI C. <<atof>>, <<atoi>>, and <<atol>> are subsumed by <<strtod>>
++and <<strtol>>, but are used extensively in existing code. These functions are
+ less reliable, but may be faster if the argument is verified to be in a valid
+ range.
+<span style="background-color: #FF0000"> </span>
+diff -Naur newlib-1.19.0.orig/newlib/libc/stdlib/atoff.c newlib-1.19.0/newlib/libc/stdlib/atoff.c
+--- newlib-1.19.0.orig/newlib/libc/stdlib/atoff.c      2002-12-06 19:58:51.000000000 +0100
++++ newlib-1.19.0/newlib/libc/stdlib/atoff.c   1970-01-01 01:00:00.000000000 +0100
+@@ -1,9 +0,0 @@
+-#include <stdlib.h>
+-#include <_ansi.h>
+-
+-float
+-_DEFUN (atoff, (s),
+-      _CONST char *s)
+-{
+-  return strtof (s, NULL);
+-}
+diff -Naur newlib-1.19.0.orig/newlib/libc/stdlib/Makefile.am newlib-1.19.0/newlib/libc/stdlib/Makefile.am
+--- newlib-1.19.0.orig/newlib/libc/stdlib/Makefile.am  2009-04-16 20:24:35.000000000 +0200
++++ newlib-1.19.0/newlib/libc/stdlib/Makefile.am       2011-07-24 06:43:01.741140665 +0200
+@@ -16,7 +16,6 @@
+<span style="background-color: #FF0000"> </span> assert.c        \
+<span style="background-color: #FF0000"> </span> atexit.c        \
+<span style="background-color: #FF0000"> </span> atof.c          \
+-      atoff.c         \
+<span style="background-color: #FF0000"> </span> atoi.c          \
+<span style="background-color: #FF0000"> </span> atol.c          \
+<span style="background-color: #FF0000"> </span> calloc.c        \
+diff -Naur newlib-1.19.0.orig/newlib/libc/stdlib/Makefile.in newlib-1.19.0/newlib/libc/stdlib/Makefile.in
+--- newlib-1.19.0.orig/newlib/libc/stdlib/Makefile.in  2011-07-20 08:45:15.846331158 +0200
++++ newlib-1.19.0/newlib/libc/stdlib/Makefile.in       2011-07-24 06:43:01.742140680 +0200
+@@ -69,8 +69,7 @@
+<span style="background-color: #FF0000"> </span> lib_a-__ten_mu.$(OBJEXT) lib_a-_Exit.$(OBJEXT) \
+<span style="background-color: #FF0000"> </span> lib_a-abort.$(OBJEXT) lib_a-abs.$(OBJEXT) \
+<span style="background-color: #FF0000"> </span> lib_a-assert.$(OBJEXT) lib_a-atexit.$(OBJEXT) \
+-      lib_a-atof.$(OBJEXT) lib_a-atoff.$(OBJEXT) \
+-      lib_a-atoi.$(OBJEXT) lib_a-atol.$(OBJEXT) \
++      lib_a-atof.$(OBJEXT) lib_a-atoi.$(OBJEXT) lib_a-atol.$(OBJEXT) \
+<span style="background-color: #FF0000"> </span> lib_a-calloc.$(OBJEXT) lib_a-div.$(OBJEXT) \
+<span style="background-color: #FF0000"> </span> lib_a-dtoa.$(OBJEXT) lib_a-dtoastub.$(OBJEXT) \
+<span style="background-color: #FF0000"> </span> lib_a-environ.$(OBJEXT) lib_a-envlock.$(OBJEXT) \
+@@ -132,15 +131,15 @@
+ @HAVE_LONG_DOUBLE_TRUE@am__objects_8 = strtold.lo wcstold.lo
+ am__objects_9 = __adjust.lo __atexit.lo __call_atexit.lo __exp10.lo \
+<span style="background-color: #FF0000"> </span> __ten_mu.lo _Exit.lo abort.lo abs.lo assert.lo atexit.lo \
+-      atof.lo atoff.lo atoi.lo atol.lo calloc.lo div.lo dtoa.lo \
+-      dtoastub.lo environ.lo envlock.lo eprintf.lo exit.lo \
+-      gdtoa-gethex.lo gdtoa-hexnan.lo getenv.lo getenv_r.lo labs.lo \
+-      ldiv.lo ldtoa.lo malloc.lo mblen.lo mblen_r.lo mbstowcs.lo \
+-      mbstowcs_r.lo mbtowc.lo mbtowc_r.lo mlock.lo mprec.lo \
+-      mstats.lo rand.lo rand_r.lo realloc.lo reallocf.lo \
+-      sb_charsets.lo strtod.lo strtol.lo strtoul.lo wcstod.lo \
+-      wcstol.lo wcstoul.lo wcstombs.lo wcstombs_r.lo wctomb.lo \
+-      wctomb_r.lo $(am__objects_8)
++      atof.lo atoi.lo atol.lo calloc.lo div.lo dtoa.lo dtoastub.lo \
++      environ.lo envlock.lo eprintf.lo exit.lo gdtoa-gethex.lo \
++      gdtoa-hexnan.lo getenv.lo getenv_r.lo labs.lo ldiv.lo ldtoa.lo \
++      malloc.lo mblen.lo mblen_r.lo mbstowcs.lo mbstowcs_r.lo \
++      mbtowc.lo mbtowc_r.lo mlock.lo mprec.lo mstats.lo rand.lo \
++      rand_r.lo realloc.lo reallocf.lo sb_charsets.lo strtod.lo \
++      strtol.lo strtoul.lo wcstod.lo wcstol.lo wcstoul.lo \
++      wcstombs.lo wcstombs_r.lo wctomb.lo wctomb_r.lo \
++      $(am__objects_8)
+ am__objects_10 = cxa_atexit.lo cxa_finalize.lo drand48.lo ecvtbuf.lo \
+<span style="background-color: #FF0000"> </span> efgcvt.lo erand48.lo jrand48.lo lcong48.lo lrand48.lo \
+<span style="background-color: #FF0000"> </span> mrand48.lo msize.lo mtrim.lo nrand48.lo rand48.lo seed48.lo \
+@@ -330,13 +329,13 @@
+ INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
+ GENERAL_SOURCES = __adjust.c __atexit.c __call_atexit.c __exp10.c \
+<span style="background-color: #FF0000"> </span> __ten_mu.c _Exit.c abort.c abs.c assert.c atexit.c atof.c \
+-      atoff.c atoi.c atol.c calloc.c div.c dtoa.c dtoastub.c \
+-      environ.c envlock.c eprintf.c exit.c gdtoa-gethex.c \
+-      gdtoa-hexnan.c getenv.c getenv_r.c labs.c ldiv.c ldtoa.c \
+-      malloc.c mblen.c mblen_r.c mbstowcs.c mbstowcs_r.c mbtowc.c \
+-      mbtowc_r.c mlock.c mprec.c mstats.c rand.c rand_r.c realloc.c \
+-      reallocf.c sb_charsets.c strtod.c strtol.c strtoul.c wcstod.c \
+-      wcstol.c wcstoul.c wcstombs.c wcstombs_r.c wctomb.c wctomb_r.c \
++      atoi.c atol.c calloc.c div.c dtoa.c dtoastub.c environ.c \
++      envlock.c eprintf.c exit.c gdtoa-gethex.c gdtoa-hexnan.c \
++      getenv.c getenv_r.c labs.c ldiv.c ldtoa.c malloc.c mblen.c \
++      mblen_r.c mbstowcs.c mbstowcs_r.c mbtowc.c mbtowc_r.c mlock.c \
++      mprec.c mstats.c rand.c rand_r.c realloc.c reallocf.c \
++      sb_charsets.c strtod.c strtol.c strtoul.c wcstod.c wcstol.c \
++      wcstoul.c wcstombs.c wcstombs_r.c wctomb.c wctomb_r.c \
+<span style="background-color: #FF0000"> </span> $(am__append_1)
+ EXTENDED_SOURCES = \
+<span style="background-color: #FF0000"> </span> cxa_atexit.c    \
+@@ -616,12 +615,6 @@
+ lib_a-atof.obj: atof.c
+<span style="background-color: #FF0000"> </span> $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-atof.obj `if test -f 'atof.c'; then $(CYGPATH_W) 'atof.c'; else $(CYGPATH_W) '$(srcdir)/atof.c'; fi`
+<span style="background-color: #FF0000"> </span>
+-lib_a-atoff.o: atoff.c
+-      $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-atoff.o `test -f 'atoff.c' || echo '$(srcdir)/'`atoff.c
+-
+-lib_a-atoff.obj: atoff.c
+-      $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-atoff.obj `if test -f 'atoff.c'; then $(CYGPATH_W) 'atoff.c'; else $(CYGPATH_W) '$(srcdir)/atoff.c'; fi`
+-
+ lib_a-atoi.o: atoi.c
+<span style="background-color: #FF0000"> </span> $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-atoi.o `test -f 'atoi.c' || echo '$(srcdir)/'`atoi.c
+<span style="background-color: #FF0000"> </span>
+diff -Naur newlib-1.19.0.orig/newlib/libc/stdlib/putenv_r.c newlib-1.19.0/newlib/libc/stdlib/putenv_r.c
+--- newlib-1.19.0.orig/newlib/libc/stdlib/putenv_r.c   2004-11-24 23:34:14.000000000 +0100
++++ newlib-1.19.0/newlib/libc/stdlib/putenv_r.c        2011-07-24 06:43:01.742140680 +0200
+@@ -24,6 +24,7 @@
+ #include <reent.h>
+ #include <stdlib.h>
+ #include <string.h>
++#include <strings.h>
+<span style="background-color: #FF0000"> </span>
+ #include "envlock.h"
+<span style="background-color: #FF0000"> </span>
+diff -Naur newlib-1.19.0.orig/newlib/libc/stdlib/strtod.c newlib-1.19.0/newlib/libc/stdlib/strtod.c
+--- newlib-1.19.0.orig/newlib/libc/stdlib/strtod.c     2010-12-07 22:26:45.000000000 +0100
++++ newlib-1.19.0/newlib/libc/stdlib/strtod.c  2011-07-24 06:43:01.743140695 +0200
+@@ -309,8 +309,7 @@
+         }
+<span style="background-color: #FF0000"> </span> nd0 = nd;
+<span style="background-color: #FF0000"> </span> if (strncmp (s, _localeconv_r (ptr)->decimal_point,
+-                   strlen (_localeconv_r (ptr)->decimal_point)) == 0)
+-              {
++                   strlen (_localeconv_r (ptr)->decimal_point)) == 0) {
+<span style="background-color: #FF0000"> </span>         decpt = 1;
+<span style="background-color: #FF0000"> </span>         c = *(s += strlen (_localeconv_r (ptr)->decimal_point));
+<span style="background-color: #FF0000"> </span>         if (!nd) {
+@@ -328,25 +327,28 @@
+  have_dig:
+<span style="background-color: #FF0000"> </span>                 nz++;
+<span style="background-color: #FF0000"> </span>                 if (c -= '0') {
+-                              nf += nz;
+<span style="background-color: #FF0000"> </span>                         for(i = 1; i < nz; i++) {
+-                                      if (nd++ <= DBL_DIG + 1) {
+-                                              if (nd < 10)
++                                      if (nd <= DBL_DIG + 1) {
++                                              if (nd + i < 10)
+<span style="background-color: #FF0000"> </span>                                                 y *= 10;
+<span style="background-color: #FF0000"> </span>                                         else
+<span style="background-color: #FF0000"> </span>                                                 z *= 10;
+<span style="background-color: #FF0000"> </span>                                 }
+<span style="background-color: #FF0000"> </span>                         }
+-                              if (nd++ <= DBL_DIG + 1) {
+-                                      if (nd < 10)
++                              if (nd <= DBL_DIG + 1) {
++                                      if (nd + i < 10)
+<span style="background-color: #FF0000"> </span>                                         y = 10*y + c;
+<span style="background-color: #FF0000"> </span>                                 else
+<span style="background-color: #FF0000"> </span>                                         z = 10*z + c;
+<span style="background-color: #FF0000"> </span>                         }
+-                              nz = 0;
++                              if (nd <= DBL_DIG + 1) {
++                                      nf += nz;
++                                      nd += nz;
+<span style="background-color: #FF0000"> </span>                         }
++                              nz = 0;
+<span style="background-color: #FF0000"> </span>                 }
+<span style="background-color: #FF0000"> </span>         }
++      }
+  dig_done:
+<span style="background-color: #FF0000"> </span> e = 0;
+<span style="background-color: #FF0000"> </span> if (c == 'e' || c == 'E') {
+diff -Naur newlib-1.19.0.orig/newlib/libc/string/bcmp.c newlib-1.19.0/newlib/libc/string/bcmp.c
+--- newlib-1.19.0.orig/newlib/libc/string/bcmp.c       2005-10-28 23:21:07.000000000 +0200
++++ newlib-1.19.0/newlib/libc/string/bcmp.c    2011-07-24 06:43:01.744140710 +0200
+@@ -6,11 +6,11 @@
+<span style="background-color: #FF0000"> </span> bcmp
+<span style="background-color: #FF0000"> </span>
+ ANSI_SYNOPSIS
+-      #include <string.h>
++      #include <strings.h>
+<span style="background-color: #FF0000"> </span> int bcmp(const void *<[s1]>, const void *<[s2]>, size_t <[n]>);
+<span style="background-color: #FF0000"> </span>
+ TRAD_SYNOPSIS
+-      #include <string.h>
++      #include <strings.h>
+<span style="background-color: #FF0000"> </span> int bcmp(<[s1]>, <[s2]>, <[n]>)
+<span style="background-color: #FF0000"> </span> const void *<[s1]>;
+<span style="background-color: #FF0000"> </span> const void *<[s2]>;
+@@ -35,7 +35,7 @@
+<span style="background-color: #FF0000"> </span> bcmp ansi pure
+ */
+<span style="background-color: #FF0000"> </span>
+-#include <string.h>
++#include <strings.h>
+<span style="background-color: #FF0000"> </span>
+ int
+ _DEFUN (bcmp, (m1, m2, n),
+diff -Naur newlib-1.19.0.orig/newlib/libc/string/bcopy.c newlib-1.19.0/newlib/libc/string/bcopy.c
+--- newlib-1.19.0.orig/newlib/libc/string/bcopy.c      2002-05-23 20:46:04.000000000 +0200
++++ newlib-1.19.0/newlib/libc/string/bcopy.c   2011-07-24 06:43:01.744140710 +0200
+@@ -3,7 +3,7 @@
+<span style="background-color: #FF0000"> </span> <<bcopy>>---copy memory regions
+<span style="background-color: #FF0000"> </span>
+ ANSI_SYNOPSIS
+-      #include <string.h>
++      #include <strings.h>
+<span style="background-color: #FF0000"> </span> void bcopy(const void *<[in]>, void *<[out]>, size_t <[n]>);
+<span style="background-color: #FF0000"> </span>
+ TRAD_SYNOPSIS
+@@ -26,7 +26,7 @@
+<span style="background-color: #FF0000"> </span> bcopy - pure
+ */
+<span style="background-color: #FF0000"> </span>
+-#include <string.h>
++#include <strings.h>
+<span style="background-color: #FF0000"> </span>
+ void
+ _DEFUN (bcopy, (b1, b2, length),
+diff -Naur newlib-1.19.0.orig/newlib/libc/string/bzero.c newlib-1.19.0/newlib/libc/string/bzero.c
+--- newlib-1.19.0.orig/newlib/libc/string/bzero.c      2002-05-23 20:46:04.000000000 +0200
++++ newlib-1.19.0/newlib/libc/string/bzero.c   2011-07-24 06:43:01.744140710 +0200
+@@ -6,11 +6,11 @@
+<span style="background-color: #FF0000"> </span> bzero
+<span style="background-color: #FF0000"> </span>
+ ANSI_SYNOPSIS
+-      #include <string.h>
++      #include <strings.h>
+<span style="background-color: #FF0000"> </span> void bzero(void *<[b]>, size_t <[length]>);
+<span style="background-color: #FF0000"> </span>
+ TRAD_SYNOPSIS
+-      #include <string.h>
++      #include <strings.h>
+<span style="background-color: #FF0000"> </span> void bzero(<[b]>, <[length]>)
+<span style="background-color: #FF0000"> </span> void *<[b]>;
+<span style="background-color: #FF0000"> </span> size_t <[length]>;
+@@ -30,7 +30,7 @@
+ <<bzero>> requires no supporting OS subroutines.
+ */
+<span style="background-color: #FF0000"> </span>
+-#include <string.h>
++#include <strings.h>
+<span style="background-color: #FF0000"> </span>
+ _VOID
+ _DEFUN (bzero, (b, length),
+diff -Naur newlib-1.19.0.orig/newlib/libc/string/index.c newlib-1.19.0/newlib/libc/string/index.c
+--- newlib-1.19.0.orig/newlib/libc/string/index.c      2000-02-17 20:39:48.000000000 +0100
++++ newlib-1.19.0/newlib/libc/string/index.c   2011-07-24 06:43:01.744140710 +0200
+@@ -6,11 +6,11 @@
+<span style="background-color: #FF0000"> </span> index
+<span style="background-color: #FF0000"> </span>
+ ANSI_SYNOPSIS
+-      #include <string.h>
++      #include <strings.h>
+<span style="background-color: #FF0000"> </span> char * index(const char *<[string]>, int <[c]>);
+<span style="background-color: #FF0000"> </span>
+ TRAD_SYNOPSIS
+-      #include <string.h>
++      #include <strings.h>
+<span style="background-color: #FF0000"> </span> char * index(<[string]>, <[c]>);
+<span style="background-color: #FF0000"> </span> char *<[string]>;
+<span style="background-color: #FF0000"> </span> int *<[c]>;
+@@ -33,7 +33,8 @@
+<span style="background-color: #FF0000"> </span> index - pure
+ */
+<span style="background-color: #FF0000"> </span>
+-#include <string.h>
++#include <strings.h>
++#include <string.h> /* strchr */
+<span style="background-color: #FF0000"> </span>
+ char *
+ _DEFUN (index, (s, c),
+diff -Naur newlib-1.19.0.orig/newlib/libc/string/Makefile.am newlib-1.19.0/newlib/libc/string/Makefile.am
+--- newlib-1.19.0.orig/newlib/libc/string/Makefile.am  2010-05-11 22:27:20.000000000 +0200
++++ newlib-1.19.0/newlib/libc/string/Makefile.am       2011-07-24 06:43:01.743140695 +0200
+@@ -71,7 +71,8 @@
+<span style="background-color: #FF0000"> </span> wmemcmp.c \
+<span style="background-color: #FF0000"> </span> wmemcpy.c \
+<span style="background-color: #FF0000"> </span> wmemmove.c \
+-      wmemset.c
++      wmemset.c \
++      xpg_strerror_r.c
+<span style="background-color: #FF0000"> </span>
+ if ELIX_LEVEL_1
+ ELIX_2_SOURCES =
+@@ -84,6 +85,7 @@
+<span style="background-color: #FF0000"> </span> stpncpy.c \
+<span style="background-color: #FF0000"> </span> strndup.c \
+<span style="background-color: #FF0000"> </span> strcasestr.c \
++      strchrnul.c \
+<span style="background-color: #FF0000"> </span> strndup_r.c \
+<span style="background-color: #FF0000"> </span> wcpcpy.c \
+<span style="background-color: #FF0000"> </span> wcpncpy.c \
+diff -Naur newlib-1.19.0.orig/newlib/libc/string/Makefile.in newlib-1.19.0/newlib/libc/string/Makefile.in
+--- newlib-1.19.0.orig/newlib/libc/string/Makefile.in  2011-07-20 08:45:15.826330835 +0200
++++ newlib-1.19.0/newlib/libc/string/Makefile.in       2011-07-24 06:43:01.744140710 +0200
+@@ -88,7 +88,7 @@
+<span style="background-color: #FF0000"> </span> lib_a-wcsxfrm.$(OBJEXT) lib_a-wcwidth.$(OBJEXT) \
+<span style="background-color: #FF0000"> </span> lib_a-wmemchr.$(OBJEXT) lib_a-wmemcmp.$(OBJEXT) \
+<span style="background-color: #FF0000"> </span> lib_a-wmemcpy.$(OBJEXT) lib_a-wmemmove.$(OBJEXT) \
+-      lib_a-wmemset.$(OBJEXT)
++      lib_a-wmemset.$(OBJEXT) lib_a-xpg_strerror_r.$(OBJEXT)
+ @ELIX_LEVEL_1_FALSE@am__objects_2 = lib_a-bcmp.$(OBJEXT) \
+ @ELIX_LEVEL_1_FALSE@  lib_a-memccpy.$(OBJEXT) \
+ @ELIX_LEVEL_1_FALSE@  lib_a-mempcpy.$(OBJEXT) \
+@@ -96,6 +96,7 @@
+ @ELIX_LEVEL_1_FALSE@  lib_a-stpncpy.$(OBJEXT) \
+ @ELIX_LEVEL_1_FALSE@  lib_a-strndup.$(OBJEXT) \
+ @ELIX_LEVEL_1_FALSE@  lib_a-strcasestr.$(OBJEXT) \
++@ELIX_LEVEL_1_FALSE@  lib_a-strchrnul.$(OBJEXT) \
+ @ELIX_LEVEL_1_FALSE@  lib_a-strndup_r.$(OBJEXT) \
+ @ELIX_LEVEL_1_FALSE@  lib_a-wcpcpy.$(OBJEXT) \
+ @ELIX_LEVEL_1_FALSE@  lib_a-wcpncpy.$(OBJEXT) \
+@@ -120,11 +121,11 @@
+<span style="background-color: #FF0000"> </span> wcslcpy.lo wcslen.lo wcsncat.lo wcsncmp.lo wcsncpy.lo \
+<span style="background-color: #FF0000"> </span> wcsnlen.lo wcspbrk.lo wcsrchr.lo wcsspn.lo wcsstr.lo wcstok.lo \
+<span style="background-color: #FF0000"> </span> wcswidth.lo wcsxfrm.lo wcwidth.lo wmemchr.lo wmemcmp.lo \
+-      wmemcpy.lo wmemmove.lo wmemset.lo
++      wmemcpy.lo wmemmove.lo wmemset.lo xpg_strerror_r.lo
+ @ELIX_LEVEL_1_FALSE@am__objects_5 = bcmp.lo memccpy.lo mempcpy.lo \
+ @ELIX_LEVEL_1_FALSE@  stpcpy.lo stpncpy.lo strndup.lo \
+-@ELIX_LEVEL_1_FALSE@  strcasestr.lo strndup_r.lo wcpcpy.lo \
+-@ELIX_LEVEL_1_FALSE@  wcpncpy.lo wcsdup.lo
++@ELIX_LEVEL_1_FALSE@  strcasestr.lo strchrnul.lo strndup_r.lo \
++@ELIX_LEVEL_1_FALSE@  wcpcpy.lo wcpncpy.lo wcsdup.lo
+ @ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@am__objects_6 = memmem.lo \
+ @ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@  wcscasecmp.lo \
+ @ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@  wcsncasecmp.lo
+@@ -363,7 +364,8 @@
+<span style="background-color: #FF0000"> </span> wmemcmp.c \
+<span style="background-color: #FF0000"> </span> wmemcpy.c \
+<span style="background-color: #FF0000"> </span> wmemmove.c \
+-      wmemset.c
++      wmemset.c \
++      xpg_strerror_r.c
+<span style="background-color: #FF0000"> </span>
+ @ELIX_LEVEL_1_FALSE@ELIX_2_SOURCES = \
+ @ELIX_LEVEL_1_FALSE@  bcmp.c \
+@@ -373,6 +375,7 @@
+ @ELIX_LEVEL_1_FALSE@  stpncpy.c \
+ @ELIX_LEVEL_1_FALSE@  strndup.c \
+ @ELIX_LEVEL_1_FALSE@  strcasestr.c \
++@ELIX_LEVEL_1_FALSE@  strchrnul.c \
+ @ELIX_LEVEL_1_FALSE@  strndup_r.c \
+ @ELIX_LEVEL_1_FALSE@  wcpcpy.c \
+ @ELIX_LEVEL_1_FALSE@  wcpncpy.c \
+@@ -887,6 +890,12 @@
+ lib_a-wmemset.obj: wmemset.c
+<span style="background-color: #FF0000"> </span> $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-wmemset.obj `if test -f 'wmemset.c'; then $(CYGPATH_W) 'wmemset.c'; else $(CYGPATH_W) '$(srcdir)/wmemset.c'; fi`
+<span style="background-color: #FF0000"> </span>
++lib_a-xpg_strerror_r.o: xpg_strerror_r.c
++      $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-xpg_strerror_r.o `test -f 'xpg_strerror_r.c' || echo '$(srcdir)/'`xpg_strerror_r.c
++
++lib_a-xpg_strerror_r.obj: xpg_strerror_r.c
++      $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-xpg_strerror_r.obj `if test -f 'xpg_strerror_r.c'; then $(CYGPATH_W) 'xpg_strerror_r.c'; else $(CYGPATH_W) '$(srcdir)/xpg_strerror_r.c'; fi`
++
+ lib_a-bcmp.o: bcmp.c
+<span style="background-color: #FF0000"> </span> $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-bcmp.o `test -f 'bcmp.c' || echo '$(srcdir)/'`bcmp.c
+<span style="background-color: #FF0000"> </span>
+@@ -929,6 +938,12 @@
+ lib_a-strcasestr.obj: strcasestr.c
+<span style="background-color: #FF0000"> </span> $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-strcasestr.obj `if test -f 'strcasestr.c'; then $(CYGPATH_W) 'strcasestr.c'; else $(CYGPATH_W) '$(srcdir)/strcasestr.c'; fi`
+<span style="background-color: #FF0000"> </span>
++lib_a-strchrnul.o: strchrnul.c
++      $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-strchrnul.o `test -f 'strchrnul.c' || echo '$(srcdir)/'`strchrnul.c
++
++lib_a-strchrnul.obj: strchrnul.c
++      $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-strchrnul.obj `if test -f 'strchrnul.c'; then $(CYGPATH_W) 'strchrnul.c'; else $(CYGPATH_W) '$(srcdir)/strchrnul.c'; fi`
++
+ lib_a-strndup_r.o: strndup_r.c
+<span style="background-color: #FF0000"> </span> $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-strndup_r.o `test -f 'strndup_r.c' || echo '$(srcdir)/'`strndup_r.c
+<span style="background-color: #FF0000"> </span>
+diff -Naur newlib-1.19.0.orig/newlib/libc/string/memccpy.c newlib-1.19.0/newlib/libc/string/memccpy.c
+--- newlib-1.19.0.orig/newlib/libc/string/memccpy.c    2010-09-22 05:15:07.000000000 +0200
++++ newlib-1.19.0/newlib/libc/string/memccpy.c 2011-07-24 06:43:01.744140710 +0200
+@@ -35,13 +35,14 @@
+<span style="background-color: #FF0000"> </span> */
+<span style="background-color: #FF0000"> </span>
+ #include <_ansi.h>
++#include <stdint.h>
+ #include <stddef.h>
+ #include <string.h>
+ #include <limits.h>
+<span style="background-color: #FF0000"> </span>
+ /* Nonzero if either X or Y is not aligned on a "long" boundary.  */
+ #define UNALIGNED(X, Y) \
+-  (((long)X & (sizeof (long) - 1)) | ((long)Y & (sizeof (long) - 1)))
++  (((intptr_t)X & (sizeof (long) - 1)) | ((intptr_t)Y & (sizeof (long) - 1)))
+<span style="background-color: #FF0000"> </span>
+ /* How many bytes are copied each iteration of the word copy loop.  */
+ #define LITTLEBLOCKSIZE (sizeof (long))
+diff -Naur newlib-1.19.0.orig/newlib/libc/string/memchr.c newlib-1.19.0/newlib/libc/string/memchr.c
+--- newlib-1.19.0.orig/newlib/libc/string/memchr.c     2008-05-27 01:31:08.000000000 +0200
++++ newlib-1.19.0/newlib/libc/string/memchr.c  2011-07-24 06:43:01.744140710 +0200
+@@ -38,10 +38,11 @@
+<span style="background-color: #FF0000"> </span>
+ #include <_ansi.h>
+ #include <string.h>
++#include <stdint.h>
+ #include <limits.h>
+<span style="background-color: #FF0000"> </span>
+ /* Nonzero if either X or Y is not aligned on a "long" boundary.  */
+-#define UNALIGNED(X) ((long)X & (sizeof (long) - 1))
++#define UNALIGNED(X) ((intptr_t)X & (sizeof (long) - 1))
+<span style="background-color: #FF0000"> </span>
+ /* How many bytes are loaded each iteration of the word copy loop.  */
+ #define LBLOCKSIZE (sizeof (long))
+diff -Naur newlib-1.19.0.orig/newlib/libc/string/memcmp.c newlib-1.19.0/newlib/libc/string/memcmp.c
+--- newlib-1.19.0.orig/newlib/libc/string/memcmp.c     2005-03-06 21:40:05.000000000 +0100
++++ newlib-1.19.0/newlib/libc/string/memcmp.c  2011-07-24 06:43:01.745140726 +0200
+@@ -37,11 +37,11 @@
+ */
+<span style="background-color: #FF0000"> </span>
+ #include <string.h>
+-
++#include <stdint.h>
+<span style="background-color: #FF0000"> </span>
+ /* Nonzero if either X or Y is not aligned on a "long" boundary.  */
+ #define UNALIGNED(X, Y) \
+-  (((long)X & (sizeof (long) - 1)) | ((long)Y & (sizeof (long) - 1)))
++  (((intptr_t)X & (sizeof (long) - 1)) | ((intptr_t)Y & (sizeof (long) - 1)))
+<span style="background-color: #FF0000"> </span>
+ /* How many bytes are copied each iteration of the word copy loop.  */
+ #define LBLOCKSIZE (sizeof (long))
+diff -Naur newlib-1.19.0.orig/newlib/libc/string/memcpy.c newlib-1.19.0/newlib/libc/string/memcpy.c
+--- newlib-1.19.0.orig/newlib/libc/string/memcpy.c     2010-09-22 05:15:07.000000000 +0200
++++ newlib-1.19.0/newlib/libc/string/memcpy.c  2011-07-24 06:43:01.745140726 +0200
+@@ -34,11 +34,12 @@
+<span style="background-color: #FF0000"> </span> */
+<span style="background-color: #FF0000"> </span>
+ #include <_ansi.h>
++#include <stdint.h>
+ #include <string.h>
+<span style="background-color: #FF0000"> </span>
+ /* Nonzero if either X or Y is not aligned on a "long" boundary.  */
+ #define UNALIGNED(X, Y) \
+-  (((long)X & (sizeof (long) - 1)) | ((long)Y & (sizeof (long) - 1)))
++  (((intptr_t)X & (sizeof (long) - 1)) | ((intptr_t)Y & (sizeof (long) - 1)))
+<span style="background-color: #FF0000"> </span>
+ /* How many bytes are copied each iteration of the 4X unrolled loop.  */
+ #define BIGBLOCKSIZE    (sizeof (long) << 2)
+diff -Naur newlib-1.19.0.orig/newlib/libc/string/memmove.c newlib-1.19.0/newlib/libc/string/memmove.c
+--- newlib-1.19.0.orig/newlib/libc/string/memmove.c    2010-09-22 05:15:07.000000000 +0200
++++ newlib-1.19.0/newlib/libc/string/memmove.c 2011-07-24 06:43:01.745140726 +0200
+@@ -36,13 +36,14 @@
+ */
+<span style="background-color: #FF0000"> </span>
+ #include <string.h>
++#include <stdint.h>
+ #include <_ansi.h>
+ #include <stddef.h>
+ #include <limits.h>
+<span style="background-color: #FF0000"> </span>
+ /* Nonzero if either X or Y is not aligned on a "long" boundary.  */
+ #define UNALIGNED(X, Y) \
+-  (((long)X & (sizeof (long) - 1)) | ((long)Y & (sizeof (long) - 1)))
++  (((intptr_t)X & (sizeof (long) - 1)) | ((intptr_t)Y & (sizeof (long) - 1)))
+<span style="background-color: #FF0000"> </span>
+ /* How many bytes are copied each iteration of the 4X unrolled loop.  */
+ #define BIGBLOCKSIZE    (sizeof (long) << 2)
+diff -Naur newlib-1.19.0.orig/newlib/libc/string/mempcpy.c newlib-1.19.0/newlib/libc/string/mempcpy.c
+--- newlib-1.19.0.orig/newlib/libc/string/mempcpy.c    2010-09-22 05:15:07.000000000 +0200
++++ newlib-1.19.0/newlib/libc/string/mempcpy.c 2011-07-24 06:43:01.745140726 +0200
+@@ -34,10 +34,11 @@
+ #include <stddef.h>
+ #include <limits.h>
+ #include <string.h>
++#include <stdint.h>
+<span style="background-color: #FF0000"> </span>
+ /* Nonzero if either X or Y is not aligned on a "long" boundary.  */
+ #define UNALIGNED(X, Y) \
+-  (((long)X & (sizeof (long) - 1)) | ((long)Y & (sizeof (long) - 1)))
++  (((intptr_t)X & (sizeof (long) - 1)) | ((uintptr_t)Y & (sizeof (long) - 1)))
+<span style="background-color: #FF0000"> </span>
+ /* How many bytes are copied each iteration of the 4X unrolled loop.  */
+ #define BIGBLOCKSIZE    (sizeof (long) << 2)
+diff -Naur newlib-1.19.0.orig/newlib/libc/string/memset.c newlib-1.19.0/newlib/libc/string/memset.c
+--- newlib-1.19.0.orig/newlib/libc/string/memset.c     2008-05-27 20:44:40.000000000 +0200
++++ newlib-1.19.0/newlib/libc/string/memset.c  2011-07-24 06:43:01.745140726 +0200
+@@ -34,9 +34,10 @@
+ */
+<span style="background-color: #FF0000"> </span>
+ #include <string.h>
++#include <stdint.h>
+<span style="background-color: #FF0000"> </span>
+ #define LBLOCKSIZE (sizeof(long))
+-#define UNALIGNED(X)   ((long)X & (LBLOCKSIZE - 1))
++#define UNALIGNED(X)   ((intptr_t)X & (LBLOCKSIZE - 1))
+ #define TOO_SMALL(LEN) ((LEN) < LBLOCKSIZE)
+<span style="background-color: #FF0000"> </span>
+ _PTR
+diff -Naur newlib-1.19.0.orig/newlib/libc/string/rindex.c newlib-1.19.0/newlib/libc/string/rindex.c
+--- newlib-1.19.0.orig/newlib/libc/string/rindex.c     2000-02-17 20:39:48.000000000 +0100
++++ newlib-1.19.0/newlib/libc/string/rindex.c  2011-07-24 06:43:01.745140726 +0200
+@@ -10,7 +10,7 @@
+<span style="background-color: #FF0000"> </span> char * rindex(const char *<[string]>, int <[c]>);
+<span style="background-color: #FF0000"> </span>
+ TRAD_SYNOPSIS
+-      #include <string.h>
++      #include <strings.h>
+<span style="background-color: #FF0000"> </span> char * rindex(<[string]>, <[c]>);
+<span style="background-color: #FF0000"> </span> char *<[string]>;
+<span style="background-color: #FF0000"> </span> int *<[c]>;
+@@ -33,7 +33,8 @@
+<span style="background-color: #FF0000"> </span> rindex - pure
+ */
+<span style="background-color: #FF0000"> </span>
+-#include <string.h>
++#include <strings.h>
++#include <string.h> /* strchr */
+<span style="background-color: #FF0000"> </span>
+ char *
+ _DEFUN (rindex, (s, c),
+diff -Naur newlib-1.19.0.orig/newlib/libc/string/stpcpy.c newlib-1.19.0/newlib/libc/string/stpcpy.c
+--- newlib-1.19.0.orig/newlib/libc/string/stpcpy.c     2007-06-28 19:07:23.000000000 +0200
++++ newlib-1.19.0/newlib/libc/string/stpcpy.c  2011-07-24 06:43:01.746140742 +0200
+@@ -34,6 +34,7 @@
+ */
+<span style="background-color: #FF0000"> </span>
+ #include <string.h>
++#include <stdint.h>
+ #include <limits.h>
+<span style="background-color: #FF0000"> </span>
+ /*SUPPRESS 560*/
+@@ -41,7 +42,7 @@
+<span style="background-color: #FF0000"> </span>
+ /* Nonzero if either X or Y is not aligned on a "long" boundary.  */
+ #define UNALIGNED(X, Y) \
+-  (((long)X & (sizeof (long) - 1)) | ((long)Y & (sizeof (long) - 1)))
++  (((intptr_t)X & (sizeof (long) - 1)) | ((intptr_t)Y & (sizeof (long) - 1)))
+<span style="background-color: #FF0000"> </span>
+ #if LONG_MAX == 2147483647L
+ #define DETECTNULL(X) (((X) - 0x01010101) & ~(X) & 0x80808080)
+diff -Naur newlib-1.19.0.orig/newlib/libc/string/stpncpy.c newlib-1.19.0/newlib/libc/string/stpncpy.c
+--- newlib-1.19.0.orig/newlib/libc/string/stpncpy.c    2007-06-28 19:07:23.000000000 +0200
++++ newlib-1.19.0/newlib/libc/string/stpncpy.c 2011-07-24 06:43:01.746140742 +0200
+@@ -40,6 +40,7 @@
+ */
+<span style="background-color: #FF0000"> </span>
+ #include <string.h>
++#include <stdint.h>
+ #include <limits.h>
+<span style="background-color: #FF0000"> </span>
+ /*SUPPRESS 560*/
+@@ -47,7 +48,7 @@
+<span style="background-color: #FF0000"> </span>
+ /* Nonzero if either X or Y is not aligned on a "long" boundary.  */
+ #define UNALIGNED(X, Y) \
+-  (((long)X & (sizeof (long) - 1)) | ((long)Y & (sizeof (long) - 1)))
++  (((intptr_t)X & (sizeof (long) - 1)) | ((intptr_t)Y & (sizeof (long) - 1)))
+<span style="background-color: #FF0000"> </span>
+ #if LONG_MAX == 2147483647L
+ #define DETECTNULL(X) (((X) - 0x01010101) & ~(X) & 0x80808080)
+diff -Naur newlib-1.19.0.orig/newlib/libc/string/strcasecmp.c newlib-1.19.0/newlib/libc/string/strcasecmp.c
+--- newlib-1.19.0.orig/newlib/libc/string/strcasecmp.c 2009-04-23 20:11:22.000000000 +0200
++++ newlib-1.19.0/newlib/libc/string/strcasecmp.c      2011-07-24 06:43:01.746140742 +0200
+@@ -6,11 +6,11 @@
+<span style="background-color: #FF0000"> </span> strcasecmp
+<span style="background-color: #FF0000"> </span>
+ ANSI_SYNOPSIS
+-      #include <string.h>
++      #include <strings.h>
+<span style="background-color: #FF0000"> </span> int strcasecmp(const char *<[a]>, const char *<[b]>);
+<span style="background-color: #FF0000"> </span>
+ TRAD_SYNOPSIS
+-      #include <string.h>
++      #include <strings.h>
+<span style="background-color: #FF0000"> </span> int strcasecmp(<[a]>, <[b]>)
+<span style="background-color: #FF0000"> </span> char *<[a]>;
+<span style="background-color: #FF0000"> </span> char *<[b]>;
+@@ -38,7 +38,7 @@
+<span style="background-color: #FF0000"> </span> strcasecmp
+ */
+<span style="background-color: #FF0000"> </span>
+-#include <string.h>
++#include <strings.h>
+ #include <ctype.h>
+<span style="background-color: #FF0000"> </span>
+ int
+diff -Naur newlib-1.19.0.orig/newlib/libc/string/strcat.c newlib-1.19.0/newlib/libc/string/strcat.c
+--- newlib-1.19.0.orig/newlib/libc/string/strcat.c     2000-02-17 20:39:48.000000000 +0100
++++ newlib-1.19.0/newlib/libc/string/strcat.c  2011-07-24 06:43:01.746140742 +0200
+@@ -33,12 +33,13 @@
+<span style="background-color: #FF0000"> </span> strcat ansi pure
+ */
+<span style="background-color: #FF0000"> </span>
++#include <stdint.h>
+ #include <string.h>
+ #include <limits.h>
+<span style="background-color: #FF0000"> </span>
+ /* Nonzero if X is aligned on a "long" boundary.  */
+ #define ALIGNED(X) \
+-  (((long)X & (sizeof (long) - 1)) == 0)
++  (((uintptr_t)X & (sizeof (long) - 1)) == 0)
+<span style="background-color: #FF0000"> </span>
+ #if LONG_MAX == 2147483647L
+ #define DETECTNULL(X) (((X) - 0x01010101) & ~(X) & 0x80808080)
+diff -Naur newlib-1.19.0.orig/newlib/libc/string/strchr.c newlib-1.19.0/newlib/libc/string/strchr.c
+--- newlib-1.19.0.orig/newlib/libc/string/strchr.c     2008-05-22 04:31:46.000000000 +0200
++++ newlib-1.19.0/newlib/libc/string/strchr.c  2011-07-24 06:43:01.746140742 +0200
+@@ -33,11 +33,12 @@
+<span style="background-color: #FF0000"> </span> strchr ansi pure
+ */
+<span style="background-color: #FF0000"> </span>
++#include <stdint.h>
+ #include <string.h>
+ #include <limits.h>
+<span style="background-color: #FF0000"> </span>
+ /* Nonzero if X is not aligned on a "long" boundary.  */
+-#define UNALIGNED(X) ((long)X & (sizeof (long) - 1))
++#define UNALIGNED(X) ((uintptr_t)X & (sizeof (long) - 1))
+<span style="background-color: #FF0000"> </span>
+ /* How many bytes are loaded each iteration of the word copy loop.  */
+ #define LBLOCKSIZE (sizeof (long))
+diff -Naur newlib-1.19.0.orig/newlib/libc/string/strchrnul.c newlib-1.19.0/newlib/libc/string/strchrnul.c
+--- newlib-1.19.0.orig/newlib/libc/string/strchrnul.c  1970-01-01 01:00:00.000000000 +0100
++++ newlib-1.19.0/newlib/libc/string/strchrnul.c       2011-07-24 06:43:01.746140742 +0200
+@@ -0,0 +1,47 @@
++/*
++FUNCTION
++      <<strchrnul>>---search for character in string
++
++INDEX
++      strchrnul
++
++ANSI_SYNOPSIS
++      #include <string.h>
++      char * strchrnul(const char *<[string]>, int <[c]>);
++
++TRAD_SYNOPSIS
++      #include <string.h>
++      char * strchrnul(<[string]>, <[c]>);
++      const char *<[string]>;
++      int <[c]>;
++
++DESCRIPTION
++      This function finds the first occurence of <[c]> (converted to
++      a char) in the string pointed to by <[string]> (including the
++      terminating null character).
++
++RETURNS
++      Returns a pointer to the located character, or a pointer
++      to the concluding null byte if <[c]> does not occur in <[string]>.
++
++PORTABILITY
++<<strchrnul>> is a GNU extension.
++
++<<strchrnul>> requires no supporting OS subroutines.  It uses
++strchr() and strlen() from elsewhere in this library.
++
++QUICKREF
++      strchrnul
++*/
++
++#include <string.h>
++
++char *
++_DEFUN (strchrnul, (s1, i),
++      _CONST char *s1 _AND
++      int i)
++{
++  char *s = strchr(s1, i);
++
++  return s ? s : (char *)s1 + strlen(s1);
++}
+diff -Naur newlib-1.19.0.orig/newlib/libc/string/strcmp.c newlib-1.19.0/newlib/libc/string/strcmp.c
+--- newlib-1.19.0.orig/newlib/libc/string/strcmp.c     2000-02-17 20:39:48.000000000 +0100
++++ newlib-1.19.0/newlib/libc/string/strcmp.c  2011-07-24 06:43:01.746140742 +0200
+@@ -35,12 +35,13 @@
+<span style="background-color: #FF0000"> </span> strcmp ansi pure
+ */
+<span style="background-color: #FF0000"> </span>
++#include <stdint.h>
+ #include <string.h>
+ #include <limits.h>
+<span style="background-color: #FF0000"> </span>
+ /* Nonzero if either X or Y is not aligned on a "long" boundary.  */
+ #define UNALIGNED(X, Y) \
+-  (((long)X & (sizeof (long) - 1)) | ((long)Y & (sizeof (long) - 1)))
++  (((uintptr_t)X & (sizeof (long) - 1)) | ((uintptr_t)Y & (sizeof (long) - 1)))
+<span style="background-color: #FF0000"> </span>
+ /* DETECTNULL returns nonzero if (long)X contains a NULL byte. */
+ #if LONG_MAX == 2147483647L
+diff -Naur newlib-1.19.0.orig/newlib/libc/string/strcpy.c newlib-1.19.0/newlib/libc/string/strcpy.c
+--- newlib-1.19.0.orig/newlib/libc/string/strcpy.c     2007-05-29 23:26:59.000000000 +0200
++++ newlib-1.19.0/newlib/libc/string/strcpy.c  2011-07-24 06:43:01.747140757 +0200
+@@ -32,6 +32,7 @@
+<span style="background-color: #FF0000"> </span> strcpy ansi pure
+ */
+<span style="background-color: #FF0000"> </span>
++#include <stdint.h>
+ #include <string.h>
+ #include <limits.h>
+<span style="background-color: #FF0000"> </span>
+@@ -40,7 +41,7 @@
+<span style="background-color: #FF0000"> </span>
+ /* Nonzero if either X or Y is not aligned on a "long" boundary.  */
+ #define UNALIGNED(X, Y) \
+-  (((long)X & (sizeof (long) - 1)) | ((long)Y & (sizeof (long) - 1)))
++  (((intptr_t)X & (sizeof (long) - 1)) | ((intptr_t)Y & (sizeof (long) - 1)))
+<span style="background-color: #FF0000"> </span>
+ #if LONG_MAX == 2147483647L
+ #define DETECTNULL(X) (((X) - 0x01010101) & ~(X) & 0x80808080)
+diff -Naur newlib-1.19.0.orig/newlib/libc/string/strerror.c newlib-1.19.0/newlib/libc/string/strerror.c
+--- newlib-1.19.0.orig/newlib/libc/string/strerror.c   2009-03-15 14:41:46.000000000 +0100
++++ newlib-1.19.0/newlib/libc/string/strerror.c        2011-07-24 06:43:01.747140757 +0200
+@@ -15,6 +15,8 @@
+ ANSI_SYNOPSIS
+<span style="background-color: #FF0000"> </span> #include <string.h>
+<span style="background-color: #FF0000"> </span> char *strerror(int <[errnum]>);
++      char *_strerror_r(struct _reent <[ptr]>, int <[errnum]>,
++                        int <[internal]>, int *<[error]>);
+<span style="background-color: #FF0000"> </span>
+ TRAD_SYNOPSIS
+<span style="background-color: #FF0000"> </span> #include <string.h>
+@@ -31,6 +33,9 @@
+ for each of the values defined in `<<errno.h>>':
+<span style="background-color: #FF0000"> </span>
+ o+
++o 0
++Success
++
+ o E2BIG
+ Arg list too long
+<span style="background-color: #FF0000"> </span>
+@@ -288,6 +293,8 @@
+<span style="background-color: #FF0000"> </span>
+ o-
+<span style="background-color: #FF0000"> </span>
++<<_strerror_r>> is a reentrant version of the above.
++
+ RETURNS
+ This function returns a pointer to a string.  Your application must
+ not modify that string.
+@@ -296,22 +303,45 @@
+ ANSI C requires <<strerror>>, but does not specify the strings used
+ for each error number.
+<span style="background-color: #FF0000"> </span>
+-Although this implementation of <<strerror>> is reentrant, ANSI C
+-declares that subsequent calls to <<strerror>> may overwrite the
+-result string; therefore portable code cannot depend on the reentrancy
+-of this subroutine.
++Although this implementation of <<strerror>> is reentrant (depending
++on <<_user_strerror>>), ANSI C declares that subsequent calls to
++<<strerror>> may overwrite the result string; therefore portable
++code cannot depend on the reentrancy of this subroutine.
++
++Although this implementation of <<strerror>> guarantees a non-null
++result with a NUL-terminator, some implementations return <<NULL>>
++on failure.  Although POSIX allows <<strerror>> to set <<errno>>
++to EINVAL on failure, this implementation does not do so (unless
++you provide <<_user_strerror>>).
++
++POSIX recommends that unknown <[errnum]> result in a message
++including that value, however it is not a requirement and this
++implementation does not provide that information (unless you
++provide <<_user_strerror>>).
+<span style="background-color: #FF0000"> </span>
+ This implementation of <<strerror>> provides for user-defined
+ extensibility.  <<errno.h>> defines <[__ELASTERROR]>, which can be
+ used as a base for user-defined error values.  If the user supplies a
+ routine named <<_user_strerror>>, and <[errnum]> passed to
+ <<strerror>> does not match any of the supported values,
+-<<_user_strerror>> is called with <[errnum]> as its argument.
+-
+-<<_user_strerror>> takes one argument of type <[int]>, and returns a
+-character pointer.  If <[errnum]> is unknown to <<_user_strerror>>,
+-<<_user_strerror>> returns <[NULL]>.  The default <<_user_strerror>>
+-returns <[NULL]> for all input values.
++<<_user_strerror>> is called with three arguments.  The first is of
++type <[int]>, and is the <[errnum]> value unknown to <<strerror>>.
++The second is of type <[int]>, and matches the <[internal]> argument
++of <<_strerror_r>>; this should be zero if called from <<strerror>>
++and non-zero if called from any other function; <<_user_strerror>> can
++use this information to satisfy the POSIX rule that no other
++standardized function can overwrite a static buffer reused by
++<<strerror>>.  The third is of type <[int *]>, and matches the
++<[error]> argument of <<_strerror_r>>; if a non-zero value is stored
++into that location (usually <[EINVAL]>), then <<strerror>> will set
++<<errno>> to that value, and the XPG variant of <<strerror_r>> will
++return that value instead of zero or <[ERANGE]>.  <<_user_strerror>>
++returns a <[char *]> value; returning <[NULL]> implies that the user
++function did not choose to handle <[errnum]>.  The default
++<<_user_strerror>> returns <[NULL]> for all input values.  Note that
++<<_user_sterror>> must be thread-safe, and only denote errors via the
++third argument rather than modifying <<errno>>, if <<strerror>> and
++<<strerror_r>> are are to comply with POSIX.
+<span style="background-color: #FF0000"> </span>
+ <<strerror>> requires no supporting OS subroutines.
+<span style="background-color: #FF0000"> </span>
+@@ -323,14 +353,20 @@
+ #include <string.h>
+<span style="background-color: #FF0000"> </span>
+ char *
+-_DEFUN (strerror, (errnum),
+-      int errnum)
++_DEFUN (_strerror_r, (ptr, errnum, internal, errptr),
++      struct _reent *ptr _AND
++      int errnum _AND
++      int internal _AND
++      int *errptr)
+ {
+   char *error;
+-  extern char *_user_strerror _PARAMS ((int));
++  extern char *_user_strerror _PARAMS ((int, int, int *));
+<span style="background-color: #FF0000"> </span>
+   switch (errnum)
+     {
++    case 0:
++      error = "Success";
++      break;
+ /* go32 defines EPERM as EACCES */
+ #if defined (EPERM) && (!defined (EACCES) || (EPERM != EACCES))
+     case EPERM:
+@@ -784,10 +820,19 @@
+         break;
+ #endif
+     default:
+-      if ((error = _user_strerror (errnum)) == 0)
+-      error = "";
++      if (!errptr)
++        errptr = &ptr->_errno;
++      if ((error = _user_strerror (errnum, internal, errptr)) == 0)
++        error = "";
+       break;
+     }
+<span style="background-color: #FF0000"> </span>
+   return error;
+ }
++
++char *
++_DEFUN(strerror, (int),
++       int errnum)
++{
++  return _strerror_r (_REENT, errnum, 0, NULL);
++}
+diff -Naur newlib-1.19.0.orig/newlib/libc/string/strerror_r.c newlib-1.19.0/newlib/libc/string/strerror_r.c
+--- newlib-1.19.0.orig/newlib/libc/string/strerror_r.c 2005-10-28 23:21:07.000000000 +0200
++++ newlib-1.19.0/newlib/libc/string/strerror_r.c      2011-07-24 06:43:01.747140757 +0200
+@@ -1,3 +1,4 @@
++/* GNU variant of strerror_r. */
+ /*
+ FUNCTION
+<span style="background-color: #FF0000"> </span> <<strerror_r>>---convert error number to string and copy to buffer
+@@ -7,7 +8,11 @@
+<span style="background-color: #FF0000"> </span>
+ ANSI_SYNOPSIS
+<span style="background-color: #FF0000"> </span> #include <string.h>
++      #ifdef _GNU_SOURCE
+<span style="background-color: #FF0000"> </span> char *strerror_r(int <[errnum]>, char *<[buffer]>, size_t <[n]>);
++      #else
++      int strerror_r(int <[errnum]>, char *<[buffer]>, size_t <[n]>);
++      #endif
+<span style="background-color: #FF0000"> </span>
+ TRAD_SYNOPSIS
+<span style="background-color: #FF0000"> </span> #include <string.h>
+@@ -19,35 +24,62 @@
+ DESCRIPTION
+ <<strerror_r>> converts the error number <[errnum]> into a
+ string and copies the result into the supplied <[buffer]> for
+-a length up to <[n]>, including the NUL terminator. The value of<span style="background-color: #FF0000"> </span>
+-<[errnum]> is usually a copy of <<errno>>.  If <<errnum>> is not a known<span style="background-color: #FF0000"> </span>
++a length up to <[n]>, including the NUL terminator. The value of
++<[errnum]> is usually a copy of <<errno>>.  If <<errnum>> is not a known
+ error number, the result is the empty string.
+<span style="background-color: #FF0000"> </span>
+ See <<strerror>> for how strings are mapped to <<errnum>>.
+<span style="background-color: #FF0000"> </span>
+ RETURNS
+-This function returns a pointer to a string.  Your application must
+-not modify that string.
++There are two variants: the GNU version always returns a NUL-terminated
++string, which is <[buffer]> if all went well, but which is another
++pointer if <[n]> was too small (leaving <[buffer]> untouched).  If the
++return is not <[buffer]>, your application must not modify that string.
++The POSIX version returns 0 on success, <[EINVAL]> if <<errnum>> was not
++recognized, and <[ERANGE]> if <[n]> was too small.  The variant chosen
++depends on macros that you define before inclusion of <<string.h>>.
+<span style="background-color: #FF0000"> </span>
+ PORTABILITY
+-<<strerror_r>> is a GNU extension.
++<<strerror_r>> with a <[char *]> result is a GNU extension.
++<<strerror_r>> with an <[int]> result is required by POSIX 2001.
++This function is compliant only if <<_user_strerror>> is not provided,
++or if it is thread-safe and uses separate storage according to whether
++the second argument of that function is non-zero.  For more details
++on <<_user_strerror>>, see the <<strerror>> documentation.
++
++POSIX states that the contents of <[buf]> are unspecified on error,
++although this implementation guarantees a NUL-terminated string for
++all except <[n]> of 0.
++
++POSIX recommends that unknown <[errnum]> result in a message including
++that value, however it is not a requirement and this implementation
++provides only an empty string (unless you provide <<_user_strerror>>).
++POSIX also recommends that unknown <[errnum]> fail with EINVAL even
++when providing such a message, however it is not a requirement and
++this implementation will return success if <<_user_strerror>> provided
++a non-empty alternate string without assigning into its third argument.
+<span style="background-color: #FF0000"> </span>
+ <<strerror_r>> requires no supporting OS subroutines.
+<span style="background-color: #FF0000"> </span>
+ */
+<span style="background-color: #FF0000"> </span>
+ #undef __STRICT_ANSI__
++#define _GNU_SOURCE
+ #include <errno.h>
+ #include <string.h>
++#undef strerror_r
+<span style="background-color: #FF0000"> </span>
++/* For backwards-compatible linking, this must be the GNU signature;
++   see xpg_strerror_r.c for the POSIX version.  */
+ char *
+ _DEFUN (strerror_r, (errnum, buffer, n),
+<span style="background-color: #FF0000"> </span> int errnum _AND
+<span style="background-color: #FF0000"> </span> char *buffer _AND
+<span style="background-color: #FF0000"> </span> size_t n)
+ {
+-  char *error;
+-  error = strerror (errnum);
++  char *error = _strerror_r (_REENT, errnum, 1, NULL);
+<span style="background-color: #FF0000"> </span>
+-  return strncpy (buffer, (const char *)error, n);
++  if (strlen (error) >= n)
++    return error;
++  return strcpy (buffer, error);
+ }
+diff -Naur newlib-1.19.0.orig/newlib/libc/string/strlen.c newlib-1.19.0/newlib/libc/string/strlen.c
+--- newlib-1.19.0.orig/newlib/libc/string/strlen.c     2008-05-27 00:56:14.000000000 +0200
++++ newlib-1.19.0/newlib/libc/string/strlen.c  2011-07-24 06:43:01.747140757 +0200
+@@ -32,11 +32,12 @@
+ */
+<span style="background-color: #FF0000"> </span>
+ #include <_ansi.h>
++#include <stdint.h>
+ #include <string.h>
+ #include <limits.h>
+<span style="background-color: #FF0000"> </span>
+ #define LBLOCKSIZE   (sizeof (long))
+-#define UNALIGNED(X) ((long)X & (LBLOCKSIZE - 1))
++#define UNALIGNED(X) ((intptr_t)X & (LBLOCKSIZE - 1))
+<span style="background-color: #FF0000"> </span>
+ #if LONG_MAX == 2147483647L
+ #define DETECTNULL(X) (((X) - 0x01010101) & ~(X) & 0x80808080)
+diff -Naur newlib-1.19.0.orig/newlib/libc/string/strncasecmp.c newlib-1.19.0/newlib/libc/string/strncasecmp.c
+--- newlib-1.19.0.orig/newlib/libc/string/strncasecmp.c        2009-04-23 20:11:22.000000000 +0200
++++ newlib-1.19.0/newlib/libc/string/strncasecmp.c     2011-07-24 06:43:01.747140757 +0200
+@@ -6,11 +6,11 @@
+<span style="background-color: #FF0000"> </span> strncasecmp
+<span style="background-color: #FF0000"> </span>
+ ANSI_SYNOPSIS
+-      #include <string.h>
++      #include <strings.h>
+<span style="background-color: #FF0000"> </span> int strncasecmp(const char *<[a]>, const char * <[b]>, size_t <[length]>);
+<span style="background-color: #FF0000"> </span>
+ TRAD_SYNOPSIS
+-      #include <string.h>
++      #include <strings.h>
+<span style="background-color: #FF0000"> </span> int strncasecmp(<[a]>, <[b]>, <[length]>)
+<span style="background-color: #FF0000"> </span> char *<[a]>;
+<span style="background-color: #FF0000"> </span> char *<[b]>;
+@@ -40,7 +40,7 @@
+<span style="background-color: #FF0000"> </span> strncasecmp
+ */
+<span style="background-color: #FF0000"> </span>
+-#include <string.h>
++#include <strings.h>
+ #include <ctype.h>
+<span style="background-color: #FF0000"> </span>
+ int<span style="background-color: #FF0000"> </span>
+diff -Naur newlib-1.19.0.orig/newlib/libc/string/strncat.c newlib-1.19.0/newlib/libc/string/strncat.c
+--- newlib-1.19.0.orig/newlib/libc/string/strncat.c    2005-10-28 23:21:07.000000000 +0200
++++ newlib-1.19.0/newlib/libc/string/strncat.c 2011-07-24 06:43:01.748140772 +0200
+@@ -42,11 +42,12 @@
+ */
+<span style="background-color: #FF0000"> </span>
+ #include <string.h>
++#include <stdint.h>
+ #include <limits.h>
+<span style="background-color: #FF0000"> </span>
+ /* Nonzero if X is aligned on a "long" boundary.  */
+ #define ALIGNED(X) \
+-  (((long)X & (sizeof (long) - 1)) == 0)
++  (((intptr_t)X & (sizeof (long) - 1)) == 0)
+<span style="background-color: #FF0000"> </span>
+ #if LONG_MAX == 2147483647L
+ #define DETECTNULL(X) (((X) - 0x01010101) & ~(X) & 0x80808080)
+diff -Naur newlib-1.19.0.orig/newlib/libc/string/strncmp.c newlib-1.19.0/newlib/libc/string/strncmp.c
+--- newlib-1.19.0.orig/newlib/libc/string/strncmp.c    2000-02-17 20:39:48.000000000 +0100
++++ newlib-1.19.0/newlib/libc/string/strncmp.c 2011-07-24 06:43:01.748140772 +0200
+@@ -36,12 +36,13 @@
+<span style="background-color: #FF0000"> </span> strncmp ansi pure
+ */
+<span style="background-color: #FF0000"> </span>
++#include <stdint.h>
+ #include <string.h>
+ #include <limits.h>
+<span style="background-color: #FF0000"> </span>
+ /* Nonzero if either X or Y is not aligned on a "long" boundary.  */
+ #define UNALIGNED(X, Y) \
+-  (((long)X & (sizeof (long) - 1)) | ((long)Y & (sizeof (long) - 1)))
++  (((uintptr_t)X & (sizeof (long) - 1)) | ((uintptr_t)Y & (sizeof (long) - 1)))
+<span style="background-color: #FF0000"> </span>
+ /* DETECTNULL returns nonzero if (long)X contains a NULL byte. */
+ #if LONG_MAX == 2147483647L
+diff -Naur newlib-1.19.0.orig/newlib/libc/string/strncpy.c newlib-1.19.0/newlib/libc/string/strncpy.c
+--- newlib-1.19.0.orig/newlib/libc/string/strncpy.c    2000-02-17 20:39:48.000000000 +0100
++++ newlib-1.19.0/newlib/libc/string/strncpy.c 2011-07-24 06:43:01.748140772 +0200
+@@ -38,6 +38,7 @@
+ */
+<span style="background-color: #FF0000"> </span>
+ #include <string.h>
++#include <stdint.h>
+ #include <limits.h>
+<span style="background-color: #FF0000"> </span>
+ /*SUPPRESS 560*/
+@@ -45,7 +46,7 @@
+<span style="background-color: #FF0000"> </span>
+ /* Nonzero if either X or Y is not aligned on a "long" boundary.  */
+ #define UNALIGNED(X, Y) \
+-  (((long)X & (sizeof (long) - 1)) | ((long)Y & (sizeof (long) - 1)))
++  (((intptr_t)X & (sizeof (long) - 1)) | ((intptr_t)Y & (sizeof (long) - 1)))
+<span style="background-color: #FF0000"> </span>
+ #if LONG_MAX == 2147483647L
+ #define DETECTNULL(X) (((X) - 0x01010101) & ~(X) & 0x80808080)
+diff -Naur newlib-1.19.0.orig/newlib/libc/string/u_strerr.c newlib-1.19.0/newlib/libc/string/u_strerr.c
+--- newlib-1.19.0.orig/newlib/libc/string/u_strerr.c   2000-02-17 20:39:48.000000000 +0100
++++ newlib-1.19.0/newlib/libc/string/u_strerr.c        2011-07-24 06:43:01.748140772 +0200
+@@ -1,8 +1,10 @@
+ #include <_ansi.h>
+<span style="background-color: #FF0000"> </span>
+ char *
+-_DEFUN(_user_strerror, (errnum),
+-       int errnum)
++_DEFUN(_user_strerror, (errnum, internal, errptr),
++       int errnum _AND
++       int internal _AND
++       int *errptr)
+ {
+   return 0;
+ }
+diff -Naur newlib-1.19.0.orig/newlib/libc/string/xpg_strerror_r.c newlib-1.19.0/newlib/libc/string/xpg_strerror_r.c
+--- newlib-1.19.0.orig/newlib/libc/string/xpg_strerror_r.c     1970-01-01 01:00:00.000000000 +0100
++++ newlib-1.19.0/newlib/libc/string/xpg_strerror_r.c  2011-07-24 06:43:01.748140772 +0200
+@@ -0,0 +1,26 @@
++/* POSIX variant of strerror_r. */
++#undef __STRICT_ANSI__
++#include <errno.h>
++#include <string.h>
++
++int
++_DEFUN (__xpg_strerror_r, (errnum, buffer, n),
++      int errnum _AND
++      char *buffer _AND
++      size_t n)
++{
++  char *error;
++  int result = 0;
++
++  if (!n)
++    return ERANGE;
++  error = _strerror_r (_REENT, errnum, 1, &result);
++  if (strlen (error) >= n)
++    {
++      memcpy (buffer, error, n - 1);
++      buffer[n - 1] = '\0';
++      return ERANGE;
++    }
++  strcpy (buffer, error);
++  return (result || *error) ? result : EINVAL;
++}
+diff -Naur newlib-1.19.0.orig/newlib/libc/sys/linux/Makefile.am newlib-1.19.0/newlib/libc/sys/linux/Makefile.am
+--- newlib-1.19.0.orig/newlib/libc/sys/linux/Makefile.am       2009-08-19 22:04:43.000000000 +0200
++++ newlib-1.19.0/newlib/libc/sys/linux/Makefile.am    2011-07-24 06:43:01.754140861 +0200
+@@ -72,7 +72,6 @@
+<span style="background-color: #FF0000"> </span> process.c \
+<span style="background-color: #FF0000"> </span> prof-freq.c \
+<span style="background-color: #FF0000"> </span> profile.c \
+-      psignal.c \
+<span style="background-color: #FF0000"> </span> pwrite.c \
+<span style="background-color: #FF0000"> </span> raise.c \
+<span style="background-color: #FF0000"> </span> realloc.c \
+diff -Naur newlib-1.19.0.orig/newlib/libc/sys/linux/Makefile.in newlib-1.19.0/newlib/libc/sys/linux/Makefile.in
+--- newlib-1.19.0.orig/newlib/libc/sys/linux/Makefile.in       2011-07-20 08:45:15.805330498 +0200
++++ newlib-1.19.0/newlib/libc/sys/linux/Makefile.in    2011-07-24 06:43:01.754140861 +0200
+@@ -82,24 +82,23 @@
+<span style="background-color: #FF0000"> </span> lib_a-mtrim.$(OBJEXT) lib_a-mtrimr.$(OBJEXT) \
+<span style="background-color: #FF0000"> </span> lib_a-ntp_gettime.$(OBJEXT) lib_a-pread.$(OBJEXT) \
+<span style="background-color: #FF0000"> </span> lib_a-process.$(OBJEXT) lib_a-prof-freq.$(OBJEXT) \
+-      lib_a-profile.$(OBJEXT) lib_a-psignal.$(OBJEXT) \
+-      lib_a-pwrite.$(OBJEXT) lib_a-raise.$(OBJEXT) \
+-      lib_a-realloc.$(OBJEXT) lib_a-reallocr.$(OBJEXT) \
+-      lib_a-rename.$(OBJEXT) lib_a-resource.$(OBJEXT) \
+-      lib_a-sched.$(OBJEXT) lib_a-select.$(OBJEXT) \
+-      lib_a-seteuid.$(OBJEXT) lib_a-sethostid.$(OBJEXT) \
+-      lib_a-sethostname.$(OBJEXT) lib_a-shm_open.$(OBJEXT) \
+-      lib_a-shm_unlink.$(OBJEXT) lib_a-sig.$(OBJEXT) \
+-      lib_a-sigaction.$(OBJEXT) lib_a-sigqueue.$(OBJEXT) \
+-      lib_a-signal.$(OBJEXT) lib_a-siglongjmp.$(OBJEXT) \
+-      lib_a-sigset.$(OBJEXT) lib_a-sigwait.$(OBJEXT) \
+-      lib_a-socket.$(OBJEXT) lib_a-sleep.$(OBJEXT) \
+-      lib_a-strsignal.$(OBJEXT) lib_a-strverscmp.$(OBJEXT) \
+-      lib_a-sysconf.$(OBJEXT) lib_a-sysctl.$(OBJEXT) \
+-      lib_a-systat.$(OBJEXT) lib_a-tcdrain.$(OBJEXT) \
+-      lib_a-tcsendbrk.$(OBJEXT) lib_a-termios.$(OBJEXT) \
+-      lib_a-time.$(OBJEXT) lib_a-usleep.$(OBJEXT) \
+-      lib_a-versionsort.$(OBJEXT)
++      lib_a-profile.$(OBJEXT) lib_a-pwrite.$(OBJEXT) \
++      lib_a-raise.$(OBJEXT) lib_a-realloc.$(OBJEXT) \
++      lib_a-reallocr.$(OBJEXT) lib_a-rename.$(OBJEXT) \
++      lib_a-resource.$(OBJEXT) lib_a-sched.$(OBJEXT) \
++      lib_a-select.$(OBJEXT) lib_a-seteuid.$(OBJEXT) \
++      lib_a-sethostid.$(OBJEXT) lib_a-sethostname.$(OBJEXT) \
++      lib_a-shm_open.$(OBJEXT) lib_a-shm_unlink.$(OBJEXT) \
++      lib_a-sig.$(OBJEXT) lib_a-sigaction.$(OBJEXT) \
++      lib_a-sigqueue.$(OBJEXT) lib_a-signal.$(OBJEXT) \
++      lib_a-siglongjmp.$(OBJEXT) lib_a-sigset.$(OBJEXT) \
++      lib_a-sigwait.$(OBJEXT) lib_a-socket.$(OBJEXT) \
++      lib_a-sleep.$(OBJEXT) lib_a-strsignal.$(OBJEXT) \
++      lib_a-strverscmp.$(OBJEXT) lib_a-sysconf.$(OBJEXT) \
++      lib_a-sysctl.$(OBJEXT) lib_a-systat.$(OBJEXT) \
++      lib_a-tcdrain.$(OBJEXT) lib_a-tcsendbrk.$(OBJEXT) \
++      lib_a-termios.$(OBJEXT) lib_a-time.$(OBJEXT) \
++      lib_a-usleep.$(OBJEXT) lib_a-versionsort.$(OBJEXT)
+ am__objects_2 = lib_a-aio64.$(OBJEXT) lib_a-confstr.$(OBJEXT) \
+<span style="background-color: #FF0000"> </span> lib_a-ctermid.$(OBJEXT) lib_a-fclean.$(OBJEXT) \
+<span style="background-color: #FF0000"> </span> lib_a-fpathconf.$(OBJEXT) lib_a-fstab.$(OBJEXT) \
+@@ -141,8 +140,8 @@
+<span style="background-color: #FF0000"> </span> mq_close.lo mq_getattr.lo mq_notify.lo mq_open.lo \
+<span style="background-color: #FF0000"> </span> mq_receive.lo mq_send.lo mq_setattr.lo mq_unlink.lo msize.lo \
+<span style="background-color: #FF0000"> </span> msizer.lo mstats.lo mtrim.lo mtrimr.lo ntp_gettime.lo pread.lo \
+-      process.lo prof-freq.lo profile.lo psignal.lo pwrite.lo \
+-      raise.lo realloc.lo reallocr.lo rename.lo resource.lo sched.lo \
++      process.lo prof-freq.lo profile.lo pwrite.lo raise.lo \
++      realloc.lo reallocr.lo rename.lo resource.lo sched.lo \
+<span style="background-color: #FF0000"> </span> select.lo seteuid.lo sethostid.lo sethostname.lo shm_open.lo \
+<span style="background-color: #FF0000"> </span> shm_unlink.lo sig.lo sigaction.lo sigqueue.lo signal.lo \
+<span style="background-color: #FF0000"> </span> siglongjmp.lo sigset.lo sigwait.lo socket.lo sleep.lo \
+@@ -396,7 +395,6 @@
+<span style="background-color: #FF0000"> </span> process.c \
+<span style="background-color: #FF0000"> </span> prof-freq.c \
+<span style="background-color: #FF0000"> </span> profile.c \
+-      psignal.c \
+<span style="background-color: #FF0000"> </span> pwrite.c \
+<span style="background-color: #FF0000"> </span> raise.c \
+<span style="background-color: #FF0000"> </span> realloc.c \
+@@ -865,12 +863,6 @@
+ lib_a-profile.obj: profile.c
+<span style="background-color: #FF0000"> </span> $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-profile.obj `if test -f 'profile.c'; then $(CYGPATH_W) 'profile.c'; else $(CYGPATH_W) '$(srcdir)/profile.c'; fi`
+<span style="background-color: #FF0000"> </span>
+-lib_a-psignal.o: psignal.c
+-      $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-psignal.o `test -f 'psignal.c' || echo '$(srcdir)/'`psignal.c
+-
+-lib_a-psignal.obj: psignal.c
+-      $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-psignal.obj `if test -f 'psignal.c'; then $(CYGPATH_W) 'psignal.c'; else $(CYGPATH_W) '$(srcdir)/psignal.c'; fi`
+-
+ lib_a-pwrite.o: pwrite.c
+<span style="background-color: #FF0000"> </span> $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-pwrite.o `test -f 'pwrite.c' || echo '$(srcdir)/'`pwrite.c
+<span style="background-color: #FF0000"> </span>
+diff -Naur newlib-1.19.0.orig/newlib/libc/sys/linux/psignal.c newlib-1.19.0/newlib/libc/sys/linux/psignal.c
+--- newlib-1.19.0.orig/newlib/libc/sys/linux/psignal.c 2002-06-05 22:58:58.000000000 +0200
++++ newlib-1.19.0/newlib/libc/sys/linux/psignal.c      1970-01-01 01:00:00.000000000 +0100
+@@ -1,15 +0,0 @@
+-/* libc/sys/linux/psignal.c - print signal message to stderr */
+-
+-/* Copyright 2002, Red Hat Inc. */
+-
+-#include <stdio.h>
+-#include <string.h>
+-
+-void
+-psignal (int sig, const char *s)
+-{
+-  if (s != NULL)
+-    fprintf (stderr, "%s: %s\n", s, strsignal (sig));
+-  else
+-    fprintf (stderr, "%s\n", strsignal (sig));
+-}
+diff -Naur newlib-1.19.0.orig/newlib/libc/sys/linux/sys/signal.h newlib-1.19.0/newlib/libc/sys/linux/sys/signal.h
+--- newlib-1.19.0.orig/newlib/libc/sys/linux/sys/signal.h      2002-07-24 20:18:07.000000000 +0200
++++ newlib-1.19.0/newlib/libc/sys/linux/sys/signal.h   2011-07-24 06:43:01.755140877 +0200
+@@ -37,7 +37,6 @@
+ #include <_ansi.h>
+<span style="background-color: #FF0000"> </span>
+ int<span style="background-color: #FF0000"> </span>     _EXFUN(kill, (int, int));
+-_VOID<span style="background-color: #FF0000"> </span>   _EXFUN(psignal, (int, const char *));
+ int<span style="background-color: #FF0000"> </span>     _EXFUN(sigaction, (int, const struct sigaction *, struct sigaction *));
+ int<span style="background-color: #FF0000"> </span>     _EXFUN(sigaddset, (sigset_t *, const int));
+ int<span style="background-color: #FF0000"> </span>     _EXFUN(sigdelset, (sigset_t *, const int));
+@@ -50,7 +49,6 @@
+<span style="background-color: #FF0000"> </span>
+ #ifndef _POSIX_SOURCE
+ extern const char *const sys_siglist[];
+-typedef __sighandler_t sig_t; /* BSDism */
+ #endif
+<span style="background-color: #FF0000"> </span>
+ #endif
+diff -Naur newlib-1.19.0.orig/newlib/libc/sys/rtems/crt0.c newlib-1.19.0/newlib/libc/sys/rtems/crt0.c
+--- newlib-1.19.0.orig/newlib/libc/sys/rtems/crt0.c    2009-12-16 19:28:14.000000000 +0100
++++ newlib-1.19.0/newlib/libc/sys/rtems/crt0.c 2011-07-24 06:43:01.755140877 +0200
+@@ -24,8 +24,8 @@
+ /* RTEMS provides some of its own routines including a Malloc family */
+ RTEMS_STUB(void *,malloc(size_t s)) { return 0; }
+ RTEMS_STUB(void *,realloc(void* p, size_t s)) { return 0; }
+-RTEMS_STUB(void, free(void)) { ; }
+-RTEMS_STUB(_PTR, calloc(struct _reent *r, size_t s1, size_t s2)) {}
++RTEMS_STUB(void, free(void* ptr)) { ; }
++RTEMS_STUB(_PTR, calloc(size_t s1, size_t s2)) {}
+<span style="background-color: #FF0000"> </span>
+ #if defined(__GNUC__)
+ /*
+@@ -49,6 +49,7 @@
+ #endif
+<span style="background-color: #FF0000"> </span>
+ /* stubs for functions RTEMS provides */
++RTEMS_STUB(int, clock_gettime(clockid_t clk_id, struct timespec *tp)) { return -1; }
+ RTEMS_STUB(int, close (int fd)) { return -1; }
+ RTEMS_STUB(int, dup2(int oldfd, int newfd)) { return -1; }
+ RTEMS_STUB(int, fcntl( int fd, int cmd, ... /* arg */ )) { return -1; }
+@@ -56,6 +57,7 @@
+ RTEMS_STUB(int, fstat(int fd, struct stat *buf)) { return -1; }
+ RTEMS_STUB(int, getdents(int fd, void *dp, int count)) { return -1; }
+ RTEMS_STUB(char *, getlogin(void)) { return 0; }
++RTEMS_STUB(int, gettimeofday(struct timeval *tv, struct timezone *tz)) { return -1; }
+ RTEMS_STUB(struct passwd *, getpwnam(const char *name)) { return 0; }
+ RTEMS_STUB(struct passwd *, getpwuid(uid_t uid)) { return 0; }
+ RTEMS_STUB(uid_t, getuid(void)) { return 0; }
+@@ -65,6 +67,7 @@
+ RTEMS_STUB(int, open(const char *pathname, int flags, int mode)) { return -1; }
+ RTEMS_STUB(int, pipe(int pipefd[2])) { return -1; }
+ RTEMS_STUB(_ssize_t, read(int fd, void *buf, size_t count)) { return -1; }
++RTEMS_STUB(int, sched_yield(void)) { return -1; }
+ RTEMS_STUB(int, sigfillset(sigset_t *set)) { return -1; }
+ RTEMS_STUB(int, sigprocmask(int how, const sigset_t *set, sigset_t *oldset)) { return -1; }
+ RTEMS_STUB(int, stat(const char *path, struct stat *buf)) { return -1; }
+@@ -95,7 +98,7 @@
+ RTEMS_STUB(int, _kill_r (struct _reent *r, int pid, int sig )) { return -1; }
+ #if !defined(REENTRANT_SYSCALLS_PROVIDED)
+ /* cf. newlib/libc/reent/linkr.c */
+-RTEMS_STUB(int, _link_r (struct _reent *, const char *, const char *)) { return -1; }
++RTEMS_STUB(int, _link_r (struct _reent *r, const char *oldpath, const char *newpath)) { return -1; }
+ #endif
+ RTEMS_STUB(_off_t, _lseek_r ( struct _reent *ptr, int fd, _off_t offset, int whence )) { return -1; }
+ RTEMS_STUB(int, _open_r (struct _reent *r, const char *buf, int flags, int mode)) { return -1; }
+@@ -103,14 +106,14 @@
+ RTEMS_STUB(int, _rename_r (struct _reent *r, const char *a, const char *b)){ return -1; }
+ #if !(defined (REENTRANT_SYSCALLS_PROVIDED) || defined (MALLOC_PROVIDED))
+ /* cf. newlib/libc/reent/sbrkr.c */
+-RTEMS_STUB(void *,_sbrk_r (struct _reent *r, ptrdiff_t)) { return -1; }
++RTEMS_STUB(void *,_sbrk_r (struct _reent *r, ptrdiff_t addr)) { return 0; }
+ #endif
+ RTEMS_STUB(int, _stat_r (struct _reent *r, const char *path, struct stat *buf)) { return -1; }
+ RTEMS_STUB(_CLOCK_T_, _times_r (struct _reent *r, struct tms *ptms)) { return -1; }
+ RTEMS_STUB(int, _unlink_r (struct _reent *r, const char *path)) { return -1; }
+ #if !(defined (REENTRANT_SYSCALLS_PROVIDED) || defined (NO_EXEC))
+ /* cf. newlib/libc/reent/execr.c */
+-RTEMS_STUB(int, _wait_r (struct _reent *r, int *)) { return -1; }
++RTEMS_STUB(int, _wait_r (struct _reent *r, int *status)) { return -1; }
+ #endif
+ RTEMS_STUB(_ssize_t, _write_r (struct _reent *r, int fd, const void *buf, size_t nbytes)) { return -1; }
+<span style="background-color: #FF0000"> </span>
+diff -Naur newlib-1.19.0.orig/newlib/libc/sys/rtems/include/limits.h newlib-1.19.0/newlib/libc/sys/rtems/include/limits.h
+--- newlib-1.19.0.orig/newlib/libc/sys/rtems/include/limits.h  2008-11-17 23:05:12.000000000 +0100
++++ newlib-1.19.0/newlib/libc/sys/rtems/include/limits.h       2011-07-24 06:43:01.755140877 +0200
+@@ -78,7 +78,13 @@
+  *  Invariant values
+  */
+<span style="background-color: #FF0000"> </span>
++#ifdef __SIZE_MAX__
++#define SSIZE_MAX             (__SIZE_MAX__ >> 1)
++#elif defined(__SIZEOF_SIZE_T__) && defined(__CHAR_BIT__)
++#define SSIZE_MAX               ((1UL << (__SIZEOF_SIZE_T__ * __CHAR_BIT__ - 1)) - 1)
++#else /* historic fallback, wrong in most cases */
+ #define SSIZE_MAX               32767
++#endif
+<span style="background-color: #FF0000"> </span>
+ /*
+  *  Maximum Values
+diff -Naur newlib-1.19.0.orig/newlib/libc/sys/rtems/sys/dirent.h newlib-1.19.0/newlib/libc/sys/rtems/sys/dirent.h
+--- newlib-1.19.0.orig/newlib/libc/sys/rtems/sys/dirent.h      2010-07-06 17:23:27.000000000 +0200
++++ newlib-1.19.0/newlib/libc/sys/rtems/sys/dirent.h   2011-07-24 06:43:01.755140877 +0200
+@@ -50,7 +50,7 @@
+<span style="background-color: #FF0000"> </span>
+ int scandir ( const char *dirname,
+    struct dirent *** namelist,
+-   int (*select)(struct dirent *),
++   int (*select)(const struct dirent *),
+    int (*dcomp)(const struct dirent **, const struct dirent **)
+ );
+<span style="background-color: #FF0000"> </span>
+diff -Naur newlib-1.19.0.orig/newlib/libc/sys/sysnecv850/fstat.c newlib-1.19.0/newlib/libc/sys/sysnecv850/fstat.c
+--- newlib-1.19.0.orig/newlib/libc/sys/sysnecv850/fstat.c      2000-02-17 20:39:50.000000000 +0100
++++ newlib-1.19.0/newlib/libc/sys/sysnecv850/fstat.c   2011-07-24 06:43:01.756140893 +0200
+@@ -13,6 +13,5 @@
+ _fstat (int file,
+<span style="background-color: #FF0000"> </span> struct stat *st)
+ {
+-  st->st_mode = S_IFCHR;
+-  return 0;
++  return TRAP0 (SYS_fstat, file, st, 0);
+ }
+diff -Naur newlib-1.19.0.orig/newlib/libc/sys/sysnecv850/Makefile.am newlib-1.19.0/newlib/libc/sys/sysnecv850/Makefile.am
+--- newlib-1.19.0.orig/newlib/libc/sys/sysnecv850/Makefile.am  2010-09-09 16:54:24.000000000 +0200
++++ newlib-1.19.0/newlib/libc/sys/sysnecv850/Makefile.am       2011-07-24 06:43:01.756140893 +0200
+@@ -16,7 +16,7 @@
+<span style="background-color: #FF0000"> </span> $(lpfx)open.o $(lpfx)pipe.o $(lpfx)read.o $(lpfx)link.o \
+<span style="background-color: #FF0000"> </span> $(lpfx)sbrk.o $(lpfx)stat.o $(lpfx)time.o $(lpfx)trap.o \
+<span style="background-color: #FF0000"> </span> $(lpfx)unlink.o $(lpfx)utime.o $(lpfx)wait.o $(lpfx)write.o \
+-      $(lpfx)times.o $(lpfx)gettime.o
++      $(lpfx)times.o $(lpfx)gettime.o $(lpfx)rename.o
+ else
+ extra_objs =
+ endif
+@@ -27,7 +27,7 @@
+<span style="background-color: #FF0000"> </span> execv.c execve.c fork.c fstat.c getpid.c isatty.c \
+<span style="background-color: #FF0000"> </span> kill.c lseek.c open.c pipe.c read.c link.c \
+<span style="background-color: #FF0000"> </span> sbrk.c stat.c time.c trap.S unlink.c utime.c wait.c write.c \
+-      times.c gettime.c
++      times.c gettime.c rename.c
+ lib_a_SOURCES =
+ lib_a_DEPENDENCIES = $(extra_objs)
+ lib_a_CCASFLAGS = $(AM_CCASFLAGS)
+diff -Naur newlib-1.19.0.orig/newlib/libc/sys/sysnecv850/Makefile.in newlib-1.19.0/newlib/libc/sys/sysnecv850/Makefile.in
+--- newlib-1.19.0.orig/newlib/libc/sys/sysnecv850/Makefile.in  2011-07-20 08:45:15.796330353 +0200
++++ newlib-1.19.0/newlib/libc/sys/sysnecv850/Makefile.in       2011-07-24 06:43:01.756140893 +0200
+@@ -65,7 +65,8 @@
+ @MAY_SUPPLY_SYSCALLS_TRUE@    $(lpfx)time.o $(lpfx)trap.o \
+ @MAY_SUPPLY_SYSCALLS_TRUE@    $(lpfx)unlink.o $(lpfx)utime.o \
+ @MAY_SUPPLY_SYSCALLS_TRUE@    $(lpfx)wait.o $(lpfx)write.o \
+-@MAY_SUPPLY_SYSCALLS_TRUE@    $(lpfx)times.o $(lpfx)gettime.o
++@MAY_SUPPLY_SYSCALLS_TRUE@    $(lpfx)times.o $(lpfx)gettime.o \
++@MAY_SUPPLY_SYSCALLS_TRUE@    $(lpfx)rename.o
+ am_lib_a_OBJECTS =
+ lib_a_OBJECTS = $(am_lib_a_OBJECTS)
+ DEFAULT_INCLUDES = -I.@am__isrc@
+@@ -111,6 +112,7 @@
+ MAKEINFO = @MAKEINFO@
+ MKDIR_P = @MKDIR_P@
+ NEWLIB_CFLAGS = @NEWLIB_CFLAGS@
++NO_INCLUDE_LIST = @NO_INCLUDE_LIST@
+ OBJEXT = @OBJEXT@
+ PACKAGE = @PACKAGE@
+ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+@@ -194,7 +196,7 @@
+ @MAY_SUPPLY_SYSCALLS_TRUE@    $(lpfx)open.o $(lpfx)pipe.o $(lpfx)read.o $(lpfx)link.o \
+ @MAY_SUPPLY_SYSCALLS_TRUE@    $(lpfx)sbrk.o $(lpfx)stat.o $(lpfx)time.o $(lpfx)trap.o \
+ @MAY_SUPPLY_SYSCALLS_TRUE@    $(lpfx)unlink.o $(lpfx)utime.o $(lpfx)wait.o $(lpfx)write.o \
+-@MAY_SUPPLY_SYSCALLS_TRUE@    $(lpfx)times.o $(lpfx)gettime.o
++@MAY_SUPPLY_SYSCALLS_TRUE@    $(lpfx)times.o $(lpfx)gettime.o $(lpfx)rename.o
+<span style="background-color: #FF0000"> </span>
+ lib_a_LIBADD = $(extra_objs)
+ EXTRA_lib_a_SOURCES = \
+@@ -202,7 +204,7 @@
+<span style="background-color: #FF0000"> </span> execv.c execve.c fork.c fstat.c getpid.c isatty.c \
+<span style="background-color: #FF0000"> </span> kill.c lseek.c open.c pipe.c read.c link.c \
+<span style="background-color: #FF0000"> </span> sbrk.c stat.c time.c trap.S unlink.c utime.c wait.c write.c \
+-      times.c gettime.c
++      times.c gettime.c rename.c
+<span style="background-color: #FF0000"> </span>
+ lib_a_SOURCES =<span style="background-color: #FF0000"> </span>
+ lib_a_DEPENDENCIES = $(extra_objs)
+@@ -448,6 +450,12 @@
+ lib_a-gettime.obj: gettime.c
+<span style="background-color: #FF0000"> </span> $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-gettime.obj `if test -f 'gettime.c'; then $(CYGPATH_W) 'gettime.c'; else $(CYGPATH_W) '$(srcdir)/gettime.c'; fi`
+<span style="background-color: #FF0000"> </span>
++lib_a-rename.o: rename.c
++      $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-rename.o `test -f 'rename.c' || echo '$(srcdir)/'`rename.c
++
++lib_a-rename.obj: rename.c
++      $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-rename.obj `if test -f 'rename.c'; then $(CYGPATH_W) 'rename.c'; else $(CYGPATH_W) '$(srcdir)/rename.c'; fi`
++
+ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+<span style="background-color: #FF0000"> </span> list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+<span style="background-color: #FF0000"> </span> unique=`for i in $$list; do \
+diff -Naur newlib-1.19.0.orig/newlib/libc/sys/sysnecv850/rename.c newlib-1.19.0/newlib/libc/sys/sysnecv850/rename.c
+--- newlib-1.19.0.orig/newlib/libc/sys/sysnecv850/rename.c     1970-01-01 01:00:00.000000000 +0100
++++ newlib-1.19.0/newlib/libc/sys/sysnecv850/rename.c  2011-07-24 06:43:01.756140893 +0200
+@@ -0,0 +1,17 @@
++#include <_ansi.h>
++#include <sys/types.h>
++#include <sys/stat.h>
++#include "sys/syscall.h"
++
++int errno;
++
++int __trap0 (int function, int p1, int p2, int p3);
++
++#define TRAP0(f, p1, p2, p3) __trap0(f, (int)(p1), (int)(p2), (int)(p3))
++
++int
++rename (const char *oldpath,
++       const char *newpath)
++{
++  return TRAP0 (SYS_rename, oldpath, newpath, 0);
++}
+diff -Naur newlib-1.19.0.orig/newlib/libc/sys/sysnecv850/sbrk.c newlib-1.19.0/newlib/libc/sys/sysnecv850/sbrk.c
+--- newlib-1.19.0.orig/newlib/libc/sys/sysnecv850/sbrk.c       2000-02-17 20:39:50.000000000 +0100
++++ newlib-1.19.0/newlib/libc/sys/sysnecv850/sbrk.c    2011-07-24 06:43:01.756140893 +0200
+@@ -3,34 +3,27 @@
+ #include <sys/stat.h>
+ #include "sys/syscall.h"
+<span style="background-color: #FF0000"> </span>
+-int errno;
+-
+-int __trap0 (int function, int p1, int p2, int p3);
+-
+-#define TRAP0(f, p1, p2, p3) __trap0(f, (int)(p1), (int)(p2), (int)(p3))
+-
+ caddr_t
+ _sbrk (int incr)
+ {
+-  extern char end;            /* Defined by the linker */
+-  static char *heap_end;
+-  char *prev_heap_end;
+-#if 0
+-  char *sp = (char *)stack_ptr;
+-#else
+-  char *sp = (char *)&sp;
+-#endif
++  extern char   heap_start;   /* Defined by the linker script.  */
++  static char * heap_end = NULL;
++  char *        prev_heap_end;
++  char *        sp = (char *) & sp;
++
++  if (heap_end == NULL)
++    heap_end = & heap_start;
+<span style="background-color: #FF0000"> </span>
+-  if (heap_end == 0)
+-    {
+-      heap_end = &end;
+-    }
+   prev_heap_end = heap_end;
++
+   if (heap_end + incr > sp)
+     {
+-      _write (1, "Heap and stack collision\n", 25);
++#define MESSAGE "Heap and stack collision\n"
++      _write (1, MESSAGE, sizeof MESSAGE);
+       abort ();
+     }
++
+   heap_end += incr;
++
+   return (caddr_t) prev_heap_end;
+ }
+diff -Naur newlib-1.19.0.orig/newlib/libc/sys/sysnecv850/sys/syscall.h newlib-1.19.0/newlib/libc/sys/sysnecv850/sys/syscall.h
+--- newlib-1.19.0.orig/newlib/libc/sys/sysnecv850/sys/syscall.h        2000-02-17 20:39:50.000000000 +0100
++++ newlib-1.19.0/newlib/libc/sys/sysnecv850/sys/syscall.h     2011-07-24 06:43:01.757140909 +0200
+@@ -29,6 +29,7 @@
+ #define       SYS_execve      59
+ #define   SYS_times       43
+ #define SYS_gettimeofday 116
++#define SYS_rename    134
+<span style="background-color: #FF0000"> </span>
+ #define SYS_utime       201 /* not really a system call */
+ #define SYS_wait        202 /* nor is this */
+diff -Naur newlib-1.19.0.orig/newlib/libc/sys/sysnecv850/trap.S newlib-1.19.0/newlib/libc/sys/sysnecv850/trap.S
+--- newlib-1.19.0.orig/newlib/libc/sys/sysnecv850/trap.S       2000-02-17 20:39:50.000000000 +0100
++++ newlib-1.19.0/newlib/libc/sys/sysnecv850/trap.S    2011-07-24 06:43:01.757140909 +0200
+@@ -2,9 +2,9 @@
+<span style="background-color: #FF0000"> </span> .global ___trap0
+ ___trap0:
+<span style="background-color: #FF0000"> </span> trap 31
+-      tst r10,r10
++      tst r11,r11
+<span style="background-color: #FF0000"> </span> bz .L0
+<span style="background-color: #FF0000"> </span> movhi hi(_errno),r0,r6
+-      st.w r10,lo(_errno)[r6]
++      st.w r11,lo(_errno)[r6]
+ .L0:
+<span style="background-color: #FF0000"> </span> jmp [r31]
+diff -Naur newlib-1.19.0.orig/newlib/libc/sys/sysnecv850/unlink.c newlib-1.19.0/newlib/libc/sys/sysnecv850/unlink.c
+--- newlib-1.19.0.orig/newlib/libc/sys/sysnecv850/unlink.c     2000-02-17 20:39:50.000000000 +0100
++++ newlib-1.19.0/newlib/libc/sys/sysnecv850/unlink.c  2011-07-24 06:43:01.757140909 +0200
+@@ -10,7 +10,7 @@
+ #define TRAP0(f, p1, p2, p3) __trap0(f, (int)(p1), (int)(p2), (int)(p3))
+<span style="background-color: #FF0000"> </span>
+ int
+-_unlink ()
++_unlink (const char *path)
+ {
+-  return -1;
++  return TRAP0 (SYS_unlink, path, 0, 0);
+ }
+diff -Naur newlib-1.19.0.orig/newlib/libc/time/asctime_r.c newlib-1.19.0/newlib/libc/time/asctime_r.c
+--- newlib-1.19.0.orig/newlib/libc/time/asctime_r.c    2000-05-10 19:58:29.000000000 +0200
++++ newlib-1.19.0/newlib/libc/time/asctime_r.c 2011-07-24 06:43:01.757140909 +0200
+@@ -18,10 +18,10 @@
+<span style="background-color: #FF0000"> </span> "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
+   };
+<span style="background-color: #FF0000"> </span>
+-  sprintf (result, "%.3s %.3s%3d %.2d:%.2d:%.2d %d\n",
+-         day_name[tim_p->tm_wday],<span style="background-color: #FF0000"> </span>
+-         mon_name[tim_p->tm_mon],
+-         tim_p->tm_mday, tim_p->tm_hour, tim_p->tm_min,
+-         tim_p->tm_sec, 1900 + tim_p->tm_year);
++  siprintf (result, "%.3s %.3s%3d %.2d:%.2d:%.2d %d\n",
++          day_name[tim_p->tm_wday],<span style="background-color: #FF0000"> </span>
++          mon_name[tim_p->tm_mon],
++          tim_p->tm_mday, tim_p->tm_hour, tim_p->tm_min,
++          tim_p->tm_sec, 1900 + tim_p->tm_year);
+   return result;
+ }
+diff -Naur newlib-1.19.0.orig/newlib/libc/time/mktime.c newlib-1.19.0/newlib/libc/time/mktime.c
+--- newlib-1.19.0.orig/newlib/libc/time/mktime.c       2008-12-11 18:27:56.000000000 +0100
++++ newlib-1.19.0/newlib/libc/time/mktime.c    2011-07-24 06:43:01.757140909 +0200
+@@ -208,6 +208,8 @@
+   tm_isdst = tim_p->tm_isdst > 0  ?  1 : tim_p->tm_isdst;
+   isdst = tm_isdst;
+<span style="background-color: #FF0000"> </span>
++  TZ_LOCK;
++
+   if (_daylight)
+     {
+       int y = tim_p->tm_year + YEAR_BASE;
+@@ -257,6 +259,8 @@
+   else /* otherwise assume std time */
+     tim += (time_t) tz->__tzrule[0].offset;
+<span style="background-color: #FF0000"> </span>
++  TZ_UNLOCK;
++
+   /* reset isdst flag to what we have calculated */
+   tim_p->tm_isdst = isdst;
+<span style="background-color: #FF0000"> </span>
+diff -Naur newlib-1.19.0.orig/newlib/libc/time/strftime.c newlib-1.19.0/newlib/libc/time/strftime.c
+--- newlib-1.19.0.orig/newlib/libc/time/strftime.c     2010-04-28 11:59:37.000000000 +0200
++++ newlib-1.19.0/newlib/libc/time/strftime.c  2011-07-24 06:43:01.758140924 +0200
+@@ -285,6 +285,7 @@
+ #  define CQ(a)               a               /* character constant qualifier */
+ #  define SFLG                                /* %s flag (null for normal char) */
+ #  define _ctloc(x) (ctloclen = strlen (ctloc = _CurrentTimeLocale->x), ctloc)
++#  define snprintf    sniprintf       /* avoid to pull in FP functions. */
+ #  define TOLOWER(c)  tolower((int)(unsigned char)(c))
+ #  define STRTOUL(c,p,b) strtoul((c),(p),(b))
+ #  define STRCPY(a,b) strcpy((a),(b))
+diff -Naur newlib-1.19.0.orig/newlib/libc/time/strptime.c newlib-1.19.0/newlib/libc/time/strptime.c
+--- newlib-1.19.0.orig/newlib/libc/time/strptime.c     2010-01-22 14:03:42.000000000 +0100
++++ newlib-1.19.0/newlib/libc/time/strptime.c  2011-07-24 06:43:01.758140924 +0200
+@@ -40,6 +40,16 @@
+<span style="background-color: #FF0000"> </span>
+ #define _ctloc(x) (_CurrentTimeLocale->x)
+<span style="background-color: #FF0000"> </span>
++static _CONST int _DAYS_BEFORE_MONTH[12] =
++{0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334};
++
++#define SET_MDAY 1
++#define SET_MON  2
++#define SET_YEAR 4
++#define SET_WDAY 8
++#define SET_YDAY 16
++#define SET_YMD  (SET_YEAR | SET_MON | SET_MDAY)
++
+ /*
+  * tm_year is relative this year<span style="background-color: #FF0000"> </span>
+  */
+@@ -78,8 +88,8 @@
+ {
+     int ret = 4;
+<span style="background-color: #FF0000"> </span>
+-    for (; year > 1970; --year)
+-      ret = (ret + 365 + is_leap_year (year) ? 1 : 0) % 7;
++    while (--year >= 1970)
++      ret = (ret + 365 + is_leap_year (year)) % 7;
+     return ret;
+ }
+<span style="background-color: #FF0000"> </span>
+@@ -147,6 +157,7 @@
+<span style="background-color: #FF0000"> </span> struct tm *timeptr)
+ {
+     char c;
++    int ymd = 0;
+<span style="background-color: #FF0000"> </span>
+     struct lc_time_T *_CurrentTimeLocale = __get_current_time_locale ();
+     for (; (c = *format) != '\0'; ++format) {
+@@ -166,18 +177,21 @@
+<span style="background-color: #FF0000"> </span>         if (ret < 0)
+<span style="background-color: #FF0000"> </span>             return NULL;
+<span style="background-color: #FF0000"> </span>         timeptr->tm_wday = ret;
++              ymd |= SET_WDAY;
+<span style="background-color: #FF0000"> </span>         break;
+<span style="background-color: #FF0000"> </span>     case 'a' :
+<span style="background-color: #FF0000"> </span>         ret = match_string (&buf, _ctloc (wday));
+<span style="background-color: #FF0000"> </span>         if (ret < 0)
+<span style="background-color: #FF0000"> </span>             return NULL;
+<span style="background-color: #FF0000"> </span>         timeptr->tm_wday = ret;
++              ymd |= SET_WDAY;
+<span style="background-color: #FF0000"> </span>         break;
+<span style="background-color: #FF0000"> </span>     case 'B' :
+<span style="background-color: #FF0000"> </span>         ret = match_string (&buf, _ctloc (month));
+<span style="background-color: #FF0000"> </span>         if (ret < 0)
+<span style="background-color: #FF0000"> </span>             return NULL;
+<span style="background-color: #FF0000"> </span>         timeptr->tm_mon = ret;
++              ymd |= SET_MON;
+<span style="background-color: #FF0000"> </span>         break;
+<span style="background-color: #FF0000"> </span>     case 'b' :
+<span style="background-color: #FF0000"> </span>     case 'h' :
+@@ -185,6 +199,7 @@
+<span style="background-color: #FF0000"> </span>         if (ret < 0)
+<span style="background-color: #FF0000"> </span>             return NULL;
+<span style="background-color: #FF0000"> </span>         timeptr->tm_mon = ret;
++              ymd |= SET_MON;
+<span style="background-color: #FF0000"> </span>         break;
+<span style="background-color: #FF0000"> </span>     case 'C' :
+<span style="background-color: #FF0000"> </span>         ret = strtol (buf, &s, 10);
+@@ -192,18 +207,21 @@
+<span style="background-color: #FF0000"> </span>             return NULL;
+<span style="background-color: #FF0000"> </span>         timeptr->tm_year = (ret * 100) - tm_year_base;
+<span style="background-color: #FF0000"> </span>         buf = s;
++              ymd |= SET_YEAR;
+<span style="background-color: #FF0000"> </span>         break;
+<span style="background-color: #FF0000"> </span>     case 'c' :          /* %a %b %e %H:%M:%S %Y */
+<span style="background-color: #FF0000"> </span>         s = strptime (buf, _ctloc (c_fmt), timeptr);
+<span style="background-color: #FF0000"> </span>         if (s == NULL)
+<span style="background-color: #FF0000"> </span>             return NULL;
+<span style="background-color: #FF0000"> </span>         buf = s;
++              ymd |= SET_WDAY | SET_YMD;
+<span style="background-color: #FF0000"> </span>         break;
+<span style="background-color: #FF0000"> </span>     case 'D' :          /* %m/%d/%y */
+<span style="background-color: #FF0000"> </span>         s = strptime (buf, "%m/%d/%y", timeptr);
+<span style="background-color: #FF0000"> </span>         if (s == NULL)
+<span style="background-color: #FF0000"> </span>             return NULL;
+<span style="background-color: #FF0000"> </span>         buf = s;
++              ymd |= SET_YMD;
+<span style="background-color: #FF0000"> </span>         break;
+<span style="background-color: #FF0000"> </span>     case 'd' :
+<span style="background-color: #FF0000"> </span>     case 'e' :
+@@ -212,6 +230,7 @@
+<span style="background-color: #FF0000"> </span>             return NULL;
+<span style="background-color: #FF0000"> </span>         timeptr->tm_mday = ret;
+<span style="background-color: #FF0000"> </span>         buf = s;
++              ymd |= SET_MDAY;
+<span style="background-color: #FF0000"> </span>         break;
+<span style="background-color: #FF0000"> </span>     case 'H' :
+<span style="background-color: #FF0000"> </span>     case 'k' :
+@@ -238,6 +257,7 @@
+<span style="background-color: #FF0000"> </span>             return NULL;
+<span style="background-color: #FF0000"> </span>         timeptr->tm_yday = ret - 1;
+<span style="background-color: #FF0000"> </span>         buf = s;
++              ymd |= SET_YDAY;
+<span style="background-color: #FF0000"> </span>         break;
+<span style="background-color: #FF0000"> </span>     case 'm' :
+<span style="background-color: #FF0000"> </span>         ret = strtol (buf, &s, 10);
+@@ -245,6 +265,7 @@
+<span style="background-color: #FF0000"> </span>             return NULL;
+<span style="background-color: #FF0000"> </span>         timeptr->tm_mon = ret - 1;
+<span style="background-color: #FF0000"> </span>         buf = s;
++              ymd |= SET_MON;
+<span style="background-color: #FF0000"> </span>         break;
+<span style="background-color: #FF0000"> </span>     case 'M' :
+<span style="background-color: #FF0000"> </span>         ret = strtol (buf, &s, 10);
+@@ -306,6 +327,7 @@
+<span style="background-color: #FF0000"> </span>             return NULL;
+<span style="background-color: #FF0000"> </span>         timeptr->tm_wday = ret - 1;
+<span style="background-color: #FF0000"> </span>         buf = s;
++              ymd |= SET_WDAY;
+<span style="background-color: #FF0000"> </span>         break;
+<span style="background-color: #FF0000"> </span>     case 'w' :
+<span style="background-color: #FF0000"> </span>         ret = strtol (buf, &s, 10);
+@@ -313,6 +335,7 @@
+<span style="background-color: #FF0000"> </span>             return NULL;
+<span style="background-color: #FF0000"> </span>         timeptr->tm_wday = ret;
+<span style="background-color: #FF0000"> </span>         buf = s;
++              ymd |= SET_WDAY;
+<span style="background-color: #FF0000"> </span>         break;
+<span style="background-color: #FF0000"> </span>     case 'U' :
+<span style="background-color: #FF0000"> </span>         ret = strtol (buf, &s, 10);
+@@ -320,6 +343,7 @@
+<span style="background-color: #FF0000"> </span>             return NULL;
+<span style="background-color: #FF0000"> </span>         set_week_number_sun (timeptr, ret);
+<span style="background-color: #FF0000"> </span>         buf = s;
++              ymd |= SET_YDAY;
+<span style="background-color: #FF0000"> </span>         break;
+<span style="background-color: #FF0000"> </span>     case 'V' :
+<span style="background-color: #FF0000"> </span>         ret = strtol (buf, &s, 10);
+@@ -327,6 +351,7 @@
+<span style="background-color: #FF0000"> </span>             return NULL;
+<span style="background-color: #FF0000"> </span>         set_week_number_mon4 (timeptr, ret);
+<span style="background-color: #FF0000"> </span>         buf = s;
++              ymd |= SET_YDAY;
+<span style="background-color: #FF0000"> </span>         break;
+<span style="background-color: #FF0000"> </span>     case 'W' :
+<span style="background-color: #FF0000"> </span>         ret = strtol (buf, &s, 10);
+@@ -334,12 +359,14 @@
+<span style="background-color: #FF0000"> </span>             return NULL;
+<span style="background-color: #FF0000"> </span>         set_week_number_mon (timeptr, ret);
+<span style="background-color: #FF0000"> </span>         buf = s;
++              ymd |= SET_YDAY;
+<span style="background-color: #FF0000"> </span>         break;
+<span style="background-color: #FF0000"> </span>     case 'x' :
+<span style="background-color: #FF0000"> </span>         s = strptime (buf, _ctloc (x_fmt), timeptr);
+<span style="background-color: #FF0000"> </span>         if (s == NULL)
+<span style="background-color: #FF0000"> </span>             return NULL;
+<span style="background-color: #FF0000"> </span>         buf = s;
++              ymd |= SET_YMD;
+<span style="background-color: #FF0000"> </span>         break;
+<span style="background-color: #FF0000"> </span>     case 'X' :
+<span style="background-color: #FF0000"> </span>         s = strptime (buf, _ctloc (X_fmt), timeptr);
+@@ -356,6 +383,7 @@
+<span style="background-color: #FF0000"> </span>         else
+<span style="background-color: #FF0000"> </span>             timeptr->tm_year = ret;
+<span style="background-color: #FF0000"> </span>         buf = s;
++              ymd |= SET_YEAR;
+<span style="background-color: #FF0000"> </span>         break;
+<span style="background-color: #FF0000"> </span>     case 'Y' :
+<span style="background-color: #FF0000"> </span>         ret = strtol (buf, &s, 10);
+@@ -363,6 +391,7 @@
+<span style="background-color: #FF0000"> </span>             return NULL;
+<span style="background-color: #FF0000"> </span>         timeptr->tm_year = ret - tm_year_base;
+<span style="background-color: #FF0000"> </span>         buf = s;
++              ymd |= SET_YEAR;
+<span style="background-color: #FF0000"> </span>         break;
+<span style="background-color: #FF0000"> </span>     case 'Z' :
+<span style="background-color: #FF0000"> </span>         /* Unsupported. Just ignore.  */
+@@ -390,6 +419,58 @@
+<span style="background-color: #FF0000"> </span>         return NULL;
+<span style="background-color: #FF0000"> </span> }
+     }
++
++    if ((ymd & SET_YMD) == SET_YMD) {
++      /* all of tm_year, tm_mon and tm_mday, but... */
++
++      if (!(ymd & SET_YDAY)) {
++          /* ...not tm_yday, so fill it in */
++          timeptr->tm_yday = _DAYS_BEFORE_MONTH[timeptr->tm_mon]
++              + timeptr->tm_mday;
++          if (!is_leap_year (timeptr->tm_year + tm_year_base)
++              || timeptr->tm_mon < 2)
++          {
++              timeptr->tm_yday--;
++          }
++          ymd |= SET_YDAY;
++      }
++    }
++    else if ((ymd & (SET_YEAR | SET_YDAY)) == (SET_YEAR | SET_YDAY)) {
++      /* both of tm_year and tm_yday, but... */
++
++      if (!(ymd & SET_MON)) {
++          /* ...not tm_mon, so fill it in, and/or... */
++          if (timeptr->tm_yday < _DAYS_BEFORE_MONTH[1])
++              timeptr->tm_mon = 0;
++          else {
++              int leap = is_leap_year (timeptr->tm_year + tm_year_base);
++              int i;
++              for (i = 2; i < 12; ++i) {
++                  if (timeptr->tm_yday < _DAYS_BEFORE_MONTH[i] + leap)
++                      break;
++              }
++              timeptr->tm_mon = i - 1;
++          }
++      }
++
++      if (!(ymd & SET_MDAY)) {
++          /* ...not tm_mday, so fill it in */
++          timeptr->tm_mday = timeptr->tm_yday
++              - _DAYS_BEFORE_MONTH[timeptr->tm_mon];
++          if (!is_leap_year (timeptr->tm_year + tm_year_base)
++              || timeptr->tm_mon < 2)
++          {
++              timeptr->tm_mday++;
++          }
++      }
++    }
++
++    if ((ymd & (SET_YEAR | SET_YDAY | SET_WDAY)) == (SET_YEAR | SET_YDAY)) {
++      /* fill in tm_wday */
++      int fday = first_day (timeptr->tm_year + tm_year_base);
++      timeptr->tm_wday = (fday + timeptr->tm_yday) % 7;
++    }
++
+     return (char *)buf;
+ }
+<span style="background-color: #FF0000"> </span>
+diff -Naur newlib-1.19.0.orig/newlib/libc/time/tzset_r.c newlib-1.19.0/newlib/libc/time/tzset_r.c
+--- newlib-1.19.0.orig/newlib/libc/time/tzset_r.c      2008-10-06 21:21:29.000000000 +0200
++++ newlib-1.19.0/newlib/libc/time/tzset_r.c   2011-07-24 06:43:01.758140924 +0200
+@@ -7,6 +7,8 @@
+ #include <sys/time.h>
+ #include "local.h"
+<span style="background-color: #FF0000"> </span>
++#define sscanf siscanf        /* avoid to pull in FP functions. */
++
+ static char __tzname_std[11];
+ static char __tzname_dst[11];
+ static char *prev_tzenv = NULL;
+@@ -28,6 +30,8 @@
+<span style="background-color: #FF0000"> </span> _daylight = 0;
+<span style="background-color: #FF0000"> </span> _tzname[0] = "GMT";
+<span style="background-color: #FF0000"> </span> _tzname[1] = "GMT";
++      free(prev_tzenv);
++      prev_tzenv = NULL;
+<span style="background-color: #FF0000"> </span> TZ_UNLOCK;
+<span style="background-color: #FF0000"> </span> return;
+       }
+@@ -80,8 +84,10 @@
+   tzenv += n;
+<span style="background-color: #FF0000">   </span>
+   if (sscanf (tzenv, "%10[^0-9,+-]%n", __tzname_dst, &n) <= 0)
+-    {
++    { /* No dst */
+       _tzname[1] = _tzname[0];
++      _timezone = tz->__tzrule[0].offset;
++      _daylight = 0;
+       TZ_UNLOCK;
+       return;
+     }
+diff -Naur newlib-1.19.0.orig/newlib/libc/xdr/xdr.c newlib-1.19.0/newlib/libc/xdr/xdr.c
+--- newlib-1.19.0.orig/newlib/libc/xdr/xdr.c   2010-03-02 13:05:18.000000000 +0100
++++ newlib-1.19.0/newlib/libc/xdr/xdr.c        2011-07-24 06:43:01.759140939 +0200
+@@ -113,7 +113,7 @@
+ #elif INT_MAX == LONG_MAX
+   return xdr_long (xdrs, (long *) ip);
+ #else
+-# error Unexpeced integer sizes in xdr_int()
++# error Unexpected integer sizes in xdr_int()
+ #endif
+ }
+<span style="background-color: #FF0000"> </span>
+@@ -148,7 +148,7 @@
+ #elif UINT_MAX == ULONG_MAX
+   return xdr_u_long (xdrs, (u_long *) up);
+ #else
+-# error Unexpeced integer sizes in xdr_int()
++# error Unexpected integer sizes in xdr_int()
+ #endif
+ }
+<span style="background-color: #FF0000"> </span>
+diff -Naur newlib-1.19.0.orig/newlib/libc/xdr/xdr_private.h newlib-1.19.0/newlib/libc/xdr/xdr_private.h
+--- newlib-1.19.0.orig/newlib/libc/xdr/xdr_private.h   2010-03-02 13:05:18.000000000 +0100
++++ newlib-1.19.0/newlib/libc/xdr/xdr_private.h        2011-07-24 06:43:01.759140939 +0200
+@@ -25,6 +25,7 @@
+<span style="background-color: #FF0000"> </span>
+ #include <_ansi.h>
+ #include <stdarg.h>
++#include <stdint.h>
+ #include <sys/param.h>
+<span style="background-color: #FF0000"> </span>
+ /* avoid including stdio header here */
+diff -Naur newlib-1.19.0.orig/newlib/libc/xdr/xdr_rec.c newlib-1.19.0/newlib/libc/xdr/xdr_rec.c
+--- newlib-1.19.0.orig/newlib/libc/xdr/xdr_rec.c       2010-03-02 13:05:18.000000000 +0100
++++ newlib-1.19.0/newlib/libc/xdr/xdr_rec.c    2011-07-24 06:43:01.759140939 +0200
+@@ -51,6 +51,7 @@
+ #include <assert.h>
+ #include <unistd.h>
+ #include <errno.h>
++#include <limits.h>
+<span style="background-color: #FF0000"> </span>
+ #include <rpc/types.h>
+ #include <rpc/xdr.h>
+diff -Naur newlib-1.19.0.orig/newlib/libm/common/modfl.c newlib-1.19.0/newlib/libm/common/modfl.c
+--- newlib-1.19.0.orig/newlib/libm/common/modfl.c      2009-04-18 00:15:43.000000000 +0200
++++ newlib-1.19.0/newlib/libm/common/modfl.c   2011-07-24 06:43:01.760140954 +0200
+@@ -36,7 +36,7 @@
+ long double
+ modfl (long double x, long double *iptr)
+ {
+-  return modf(x, iptr);
++  return modf(x, (double*) iptr);
+ }
+ #endif
+<span style="background-color: #FF0000"> </span>
+diff -Naur newlib-1.19.0.orig/newlib/libm/common/s_round.c newlib-1.19.0/newlib/libm/common/s_round.c
+--- newlib-1.19.0.orig/newlib/libm/common/s_round.c    2009-03-25 20:13:01.000000000 +0100
++++ newlib-1.19.0/newlib/libm/common/s_round.c 2011-07-24 06:43:01.760140954 +0200
+@@ -68,7 +68,7 @@
+           msw &= 0x80000000;
+           if (exponent_less_1023 == -1)
+             /* Result is +1.0 or -1.0. */
+-            msw |= (1023 << 20);
++            msw |= ((__int32_t)1023 << 20);
+           lsw = 0;
+         }
+       else
+diff -Naur newlib-1.19.0.orig/newlib/libm/complex/cacos.c newlib-1.19.0/newlib/libm/complex/cacos.c
+--- newlib-1.19.0.orig/newlib/libm/complex/cacos.c     2010-11-04 19:27:13.000000000 +0100
++++ newlib-1.19.0/newlib/libm/complex/cacos.c  2011-07-24 06:43:01.760140954 +0200
+@@ -82,8 +82,18 @@
+ {
+<span style="background-color: #FF0000"> </span> double complex w;
+<span style="background-color: #FF0000"> </span>
++      /* FIXME: The original NetBSD code results in an ICE when trying to
++         build this function on ARM/Thumb using gcc 4.5.1.  For now we use
++         a hopefully temporary workaround. */
++#if 0
+<span style="background-color: #FF0000"> </span> w = casin(z);
+-      w = M_PI_2 - creal(w);
+-      w -= (cimag(w) * I);
++      w = (M_PI_2 - creal(w)) - cimag(w) * I;
++#else
++      double complex tmp0, tmp1;
++
++      tmp0 = casin(z);
++      tmp1 = M_PI_2 - creal(tmp0);
++      w = tmp1 - (cimag(tmp0) * I);
++#endif
+<span style="background-color: #FF0000"> </span> return w;
+ }
+diff -Naur newlib-1.19.0.orig/newlib/libm/complex/cproj.c newlib-1.19.0/newlib/libm/complex/cproj.c
+--- newlib-1.19.0.orig/newlib/libm/complex/cproj.c     2010-10-19 00:40:24.000000000 +0200
++++ newlib-1.19.0/newlib/libm/complex/cproj.c  2011-07-24 06:43:01.760140954 +0200
+@@ -93,7 +93,7 @@
+ {
+<span style="background-color: #FF0000"> </span> double_complex w = { .z = z };
+<span style="background-color: #FF0000"> </span>
+-      if (isinf(creal(z) || isinf(cimag(z)))) {
++      if (isinf(creal(z)) || isinf(cimag(z))) {
+ #ifdef __INFINITY
+<span style="background-color: #FF0000"> </span>         REAL_PART(w) = __INFINITY;
+ #else
+diff -Naur newlib-1.19.0.orig/newlib/libm/complex/cprojf.c newlib-1.19.0/newlib/libm/complex/cprojf.c
+--- newlib-1.19.0.orig/newlib/libm/complex/cprojf.c    2010-10-08 12:35:14.000000000 +0200
++++ newlib-1.19.0/newlib/libm/complex/cprojf.c 2011-07-24 06:43:01.761140969 +0200
+@@ -55,7 +55,7 @@
+ {
+<span style="background-color: #FF0000"> </span> float_complex w = { .z = z };
+<span style="background-color: #FF0000"> </span>
+-      if (isinf(crealf(z) || isinf(cimagf(z)))) {
++      if (isinf(crealf(z)) || isinf(cimagf(z))) {
+ #ifdef __INFINITY
+<span style="background-color: #FF0000"> </span>         REAL_PART(w) = __INFINITY;
+ #else
+diff -Naur newlib-1.19.0.orig/newlib/libm/math/e_scalb.c newlib-1.19.0/newlib/libm/math/e_scalb.c
+--- newlib-1.19.0.orig/newlib/libm/math/e_scalb.c      2000-02-17 20:39:51.000000000 +0100
++++ newlib-1.19.0/newlib/libm/math/e_scalb.c   2011-07-24 06:43:01.761140969 +0200
+@@ -17,6 +17,7 @@
+  * should use scalbn() instead.
+  */
+<span style="background-color: #FF0000"> </span>
++#include <limits.h>
+ #include "fdlibm.h"
+<span style="background-color: #FF0000"> </span>
+ #ifndef _DOUBLE_IS_32BITS
+@@ -46,8 +47,17 @@
+<span style="background-color: #FF0000"> </span>     else       return x/(-fn);
+<span style="background-color: #FF0000"> </span> }
+<span style="background-color: #FF0000"> </span> if (rint(fn)!=fn) return (fn-fn)/(fn-fn);
++#if (INT_MAX < 65000)
++      if ( fn > (double) INT_MAX) return scalbn(x, INT_MAX);
++#else
+<span style="background-color: #FF0000"> </span> if ( fn > 65000.0) return scalbn(x, 65000);
+-      if (-fn > 65000.0) return scalbn(x,-65000);
++#endif
++
++#if (INT_MIN > -65000)
++        if (fn < (double) INT_MIN) return scalbn(x,INT_MIN);
++#else
++      if (fn < -65000.0) return scalbn(x,-65000);
++#endif
+<span style="background-color: #FF0000"> </span> return scalbn(x,(int)fn);
+ #endif
+ }
+diff -Naur newlib-1.19.0.orig/newlib/libm/math/wf_tgamma.c newlib-1.19.0/newlib/libm/math/wf_tgamma.c
+--- newlib-1.19.0.orig/newlib/libm/math/wf_tgamma.c    2007-09-04 19:33:10.000000000 +0200
++++ newlib-1.19.0/newlib/libm/math/wf_tgamma.c 2011-07-24 06:43:01.761140969 +0200
+@@ -43,3 +43,17 @@
+<span style="background-color: #FF0000"> </span> return y;
+ #endif
+ }
++
++#ifdef _DOUBLE_IS_32BITS
++
++#ifdef __STDC__
++      double tgamma(double x)
++#else
++      double tgamma(x)
++      double x;
++#endif
++{
++      return (double) tgammaf((float) x);
++}
++
++#endif /* defined(_DOUBLE_IS_32BITS) */
+diff -Naur newlib-1.19.0.orig/newlib/libm/math/w_tgamma.c newlib-1.19.0/newlib/libm/math/w_tgamma.c
+--- newlib-1.19.0.orig/newlib/libm/math/w_tgamma.c     2002-06-07 23:59:56.000000000 +0200
++++ newlib-1.19.0/newlib/libm/math/w_tgamma.c  2011-07-24 06:43:01.761140969 +0200
+@@ -17,6 +17,8 @@
+<span style="background-color: #FF0000"> </span>
+ #include "fdlibm.h"
+<span style="background-color: #FF0000"> </span>
++#ifndef _DOUBLE_IS_32BITS
++
+ #ifdef __STDC__
+<span style="background-color: #FF0000"> </span> double tgamma(double x)
+ #else
+@@ -42,3 +44,5 @@
+<span style="background-color: #FF0000"> </span> return y;
+ #endif
+ }
++
++#endif /* defined(_DOUBLE_IS_32BITS) */
+diff -Naur newlib-1.19.0.orig/newlib/MAINTAINERS newlib-1.19.0/newlib/MAINTAINERS
+--- newlib-1.19.0.orig/newlib/MAINTAINERS      2010-12-16 22:58:38.000000000 +0100
++++ newlib-1.19.0/newlib/MAINTAINERS   2011-07-24 06:43:01.627138933 +0200
+@@ -6,7 +6,7 @@
+ The official maintainers of newlib:
+<span style="background-color: #FF0000"> </span>
+ Jeff Johnston                 jjohnstn@redhat.com
+-Corinna       Vinschen                corinna@vinchen.de
++Corinna Vinschen              corinna@vinschen.de
+<span style="background-color: #FF0000"> </span>
+<span style="background-color: #FF0000"> </span>
+<span style="background-color: #FF0000"> </span>              Various Domain Maintainers
+diff -Naur newlib-1.19.0.orig/newlib/Makefile.am newlib-1.19.0/newlib/Makefile.am
+--- newlib-1.19.0.orig/newlib/Makefile.am      2010-12-16 22:58:38.000000000 +0100
++++ newlib-1.19.0/newlib/Makefile.am   2011-07-24 06:43:01.627138933 +0200
+@@ -81,7 +81,7 @@
+<span style="background-color: #FF0000"> </span> libc.a
+ endif
+<span style="background-color: #FF0000"> </span>
+-noinst_DATA = stmp-targ-include
++BUILT_SOURCES = stmp-targ-include
+<span style="background-color: #FF0000"> </span>
+ toollib_DATA = $(CRT0) $(CRT1)
+<span style="background-color: #FF0000"> </span>
+@@ -255,7 +255,7 @@
+<span style="background-color: #FF0000"> </span>   done
+<span style="background-color: #FF0000"> </span> touch $@
+<span style="background-color: #FF0000"> </span>
+-CLEANFILES = targ-include stmp-targ-include
++CLEANFILES = stmp-targ-include
+<span style="background-color: #FF0000"> </span>
+ install-data-local:   install-toollibLIBRARIES
+ if USE_LIBTOOL
+@@ -279,10 +279,6 @@
+<span style="background-color: #FF0000"> </span>      $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/machine/`basename $$i`; \
+<span style="background-color: #FF0000"> </span>     else true; fi ; \
+<span style="background-color: #FF0000"> </span>   done; \
+-        $(mkinstalldirs) $(DESTDIR)$(tooldir)/include/rpc; \
+-        for i in $(srcdir)/libc/include/rpc/*.h; do \
+-         $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/rpc/`basename $$i`; \
+-        done; \
+<span style="background-color: #FF0000"> </span>   $(mkinstalldirs) $(DESTDIR)$(tooldir)/include/sys; \
+<span style="background-color: #FF0000"> </span>   for i in $(srcdir)/libc/include/sys/*.h; do \
+<span style="background-color: #FF0000"> </span>    $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/sys/`basename $$i`; \
+@@ -430,3 +426,6 @@
+<span style="background-color: #FF0000"> </span> else \
+<span style="background-color: #FF0000"> </span>    echo "WARNING: could not find \`runtest'" 1>&2 ; \
+<span style="background-color: #FF0000"> </span> fi
++
++clean-local:
++      -rm -rf targ-include
+diff -Naur newlib-1.19.0.orig/newlib/Makefile.in newlib-1.19.0/newlib/Makefile.in
+--- newlib-1.19.0.orig/newlib/Makefile.in      2011-07-20 08:45:15.622327553 +0200
++++ newlib-1.19.0/newlib/Makefile.in   2011-07-24 06:43:01.628138948 +0200
+@@ -122,7 +122,7 @@
+<span style="background-color: #FF0000"> </span> install-pdf-recursive install-ps-recursive install-recursive \
+<span style="background-color: #FF0000"> </span> installcheck-recursive installdirs-recursive pdf-recursive \
+<span style="background-color: #FF0000"> </span> ps-recursive uninstall-recursive
+-DATA = $(noinst_DATA) $(toollib_DATA)
++DATA = $(toollib_DATA)
+ RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive       \
+   distclean-recursive maintainer-clean-recursive
+ AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
+@@ -351,7 +351,7 @@
+ @USE_LIBTOOL_FALSE@toollib_LIBRARIES = libm.a \
+ @USE_LIBTOOL_FALSE@   libc.a
+<span style="background-color: #FF0000"> </span>
+-noinst_DATA = stmp-targ-include
++BUILT_SOURCES = stmp-targ-include
+ toollib_DATA = $(CRT0) $(CRT1)
+<span style="background-color: #FF0000"> </span>
+ # The functions ldexp, frexp and modf are traditionally supplied in
+@@ -405,13 +405,13 @@
+ @USE_LIBTOOL_TRUE@libm_la_DEPENDENCIES = libm-libtool-objectlist
+ @USE_LIBTOOL_TRUE@libc_la_SOURCES =<span style="background-color: #FF0000"> </span>
+ @USE_LIBTOOL_TRUE@libc_la_DEPENDENCIES = libc-libtool-objectlist
+-CLEANFILES = targ-include stmp-targ-include
++CLEANFILES = stmp-targ-include
+ CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
+ MAKEOVERRIDES =<span style="background-color: #FF0000"> </span>
+<span style="background-color: #FF0000"> </span>
+ # dejagnu support
+ RUNTESTFLAGS =<span style="background-color: #FF0000"> </span>
+-all: newlib.h
++all: $(BUILT_SOURCES) newlib.h
+<span style="background-color: #FF0000"> </span> $(MAKE) $(AM_MAKEFLAGS) all-recursive
+<span style="background-color: #FF0000"> </span>
+ .SUFFIXES:
+@@ -725,14 +725,16 @@
+<span style="background-color: #FF0000"> </span> done
+ check-am:
+<span style="background-color: #FF0000"> </span> $(MAKE) $(AM_MAKEFLAGS) check-DEJAGNU
+-check: check-recursive
++check: $(BUILT_SOURCES)
++      $(MAKE) $(AM_MAKEFLAGS) check-recursive
+ all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) $(DATA) newlib.h
+ installdirs: installdirs-recursive
+ installdirs-am:
+<span style="background-color: #FF0000"> </span> for dir in "$(DESTDIR)$(toollibdir)" "$(DESTDIR)$(toollibdir)" "$(DESTDIR)$(toollibdir)"; do \
+<span style="background-color: #FF0000"> </span>   test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+<span style="background-color: #FF0000"> </span> done
+-install: install-recursive
++install: $(BUILT_SOURCES)
++      $(MAKE) $(AM_MAKEFLAGS) install-recursive
+ install-exec: install-exec-recursive
+ install-data: install-data-recursive
+ uninstall: uninstall-recursive
+@@ -758,10 +760,11 @@
+ maintainer-clean-generic:
+<span style="background-color: #FF0000"> </span> @echo "This command is intended for maintainers to use"
+<span style="background-color: #FF0000"> </span> @echo "it deletes files that may require special tools to rebuild."
++      -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+ clean: clean-recursive
+<span style="background-color: #FF0000"> </span>
+-clean-am: clean-generic clean-libtool clean-toollibLIBRARIES \
+-      clean-toollibLTLIBRARIES mostlyclean-am
++clean-am: clean-generic clean-libtool clean-local \
++      clean-toollibLIBRARIES clean-toollibLTLIBRARIES mostlyclean-am
+<span style="background-color: #FF0000"> </span>
+ distclean: distclean-recursive
+<span style="background-color: #FF0000"> </span> -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+@@ -833,12 +836,13 @@
+ uninstall-am: uninstall-toollibDATA uninstall-toollibLIBRARIES \
+<span style="background-color: #FF0000"> </span> uninstall-toollibLTLIBRARIES
+<span style="background-color: #FF0000"> </span>
+-.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check-am \
+-      ctags-recursive install-am install-strip tags-recursive
++.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check \
++      check-am ctags-recursive install install-am install-strip \
++      tags-recursive
+<span style="background-color: #FF0000"> </span>
+ .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+<span style="background-color: #FF0000"> </span> all all-am am--refresh check check-DEJAGNU check-am clean \
+-      clean-generic clean-libtool clean-toollibLIBRARIES \
++      clean-generic clean-libtool clean-local clean-toollibLIBRARIES \
+<span style="background-color: #FF0000"> </span> clean-toollibLTLIBRARIES ctags ctags-recursive distclean \
+<span style="background-color: #FF0000"> </span> distclean-DEJAGNU distclean-compile distclean-generic \
+<span style="background-color: #FF0000"> </span> distclean-hdr distclean-libtool distclean-tags dvi dvi-am html \
+@@ -985,10 +989,6 @@
+<span style="background-color: #FF0000"> </span>      $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/machine/`basename $$i`; \
+<span style="background-color: #FF0000"> </span>     else true; fi ; \
+<span style="background-color: #FF0000"> </span>   done; \
+-        $(mkinstalldirs) $(DESTDIR)$(tooldir)/include/rpc; \
+-        for i in $(srcdir)/libc/include/rpc/*.h; do \
+-         $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/rpc/`basename $$i`; \
+-        done; \
+<span style="background-color: #FF0000"> </span>   $(mkinstalldirs) $(DESTDIR)$(tooldir)/include/sys; \
+<span style="background-color: #FF0000"> </span>   for i in $(srcdir)/libc/include/sys/*.h; do \
+<span style="background-color: #FF0000"> </span>    $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/sys/`basename $$i`; \
+@@ -1129,6 +1129,9 @@
+<span style="background-color: #FF0000"> </span>    echo "WARNING: could not find \`runtest'" 1>&2 ; \
+<span style="background-color: #FF0000"> </span> fi
+<span style="background-color: #FF0000"> </span>
++clean-local:
++      -rm -rf targ-include
++
+ # Tell versions [3.59,3.63) of GNU make to not export all variables.
+ # Otherwise a system limit (for SysV at least) may be exceeded.
+ .NOEXPORT:
+diff -Naur newlib-1.19.0.orig/newlib/testsuite/newlib.stdio/stdio.exp newlib-1.19.0/newlib/testsuite/newlib.stdio/stdio.exp
+--- newlib-1.19.0.orig/newlib/testsuite/newlib.stdio/stdio.exp 1970-01-01 01:00:00.000000000 +0100
++++ newlib-1.19.0/newlib/testsuite/newlib.stdio/stdio.exp      2011-07-24 06:43:01.761140969 +0200
+@@ -0,0 +1,12 @@
++# Copyright (C) 2011 by ARM Ltd. All rights reserved.
++#
++# Permission to use, copy, modify, and distribute this software
++# is freely granted, provided that this notice is preserved.
++#
++
++load_lib passfail.exp
++
++set exclude_list {
++}
++
++newlib_pass_fail_all -x $exclude_list
+diff -Naur newlib-1.19.0.orig/newlib/testsuite/newlib.stdio/swprintf.c newlib-1.19.0/newlib/testsuite/newlib.stdio/swprintf.c
+--- newlib-1.19.0.orig/newlib/testsuite/newlib.stdio/swprintf.c        1970-01-01 01:00:00.000000000 +0100
++++ newlib-1.19.0/newlib/testsuite/newlib.stdio/swprintf.c     2011-07-24 06:43:01.762140984 +0200
+@@ -0,0 +1,30 @@
++/*
++ * Copyright (C) 2011 by ARM Ltd. All rights reserved.
++ *
++ * Permission to use, copy, modify, and distribute this software
++ * is freely granted, provided that this notice is preserved.
++ */
++
++#include <stdio.h>
++#include <newlib.h>
++#include <stdlib.h>
++#include <wchar.h>
++#include "check.h"
++
++int main()
++{
++#if defined(INTEGER_ONLY) || defined(NO_FLOATING_POINT)
++
++#else
++  char cbuf[512];
++  wchar_t wcbuf[512], wcbuf2[512];
++  double val = 1E+308;
++  snprintf(cbuf, 512, "%.*f", 3, val);
++  swprintf(wcbuf, 512, L"%.*f", 3, val);
++  mbstowcs(wcbuf2, cbuf, 512);
++
++  CHECK (wcscmp(wcbuf, wcbuf2) == 0);
++#endif
++
++  exit (0);
++}
</font></pre>
<p> </p>
<a name='cs2'></a>
<table border='0' cellspacing='0' cellpadding='5' width='100%' bgcolor='#eeeeee'>
<tr><td colspan='3' bgcolor='#dddddd'>
 <font color='#bb2222'><strong>ralf</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>Enable iconv by default.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/contrib/crossrpms/gcc/gccnewlib.add.diff?r1=text&tr1=1.74&r2=text&tr2=1.75&diff_format=h">M</a></td><td width='1%'>1.75</td><td width='100%'>contrib/crossrpms/gcc/gccnewlib.add</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/contrib/crossrpms/gcc/gccnewlib.add:1.74 rtems/contrib/crossrpms/gcc/gccnewlib.add:1.75
--- rtems/contrib/crossrpms/gcc/gccnewlib.add:1.74      Sun Jul 24 00:45:28 2011
+++ rtems/contrib/crossrpms/gcc/gccnewlib.add   Sun Jul 24 09:12:19 2011
</font><font color='#997700'>@@ -38,7 +38,7 @@
</font> %bcond_with gcc_stdint
 
 # EXPERIMENTAL: Enable newlib's iconv
<font color='#880000'>-%bcond_with iconv
</font><font color='#000088'>+%bcond_without iconv
</font> 
 # versions of libraries, we conditionally bundle if necessary
 %global mpc_version    0.8.1
</pre>
<p> </p>
<a name='cs3'></a>
<table border='0' cellspacing='0' cellpadding='5' width='100%' bgcolor='#eeeeee'>
<tr><td colspan='3' bgcolor='#dddddd'>
 <font color='#bb2222'><strong>ralf</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>newlib-1.19.0-rtems4.11-20110724.diff.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/contrib/crossrpms/rtems4.11/arm-eabi/gcc-sources.add.diff?r1=text&tr1=1.6&r2=text&tr2=1.7&diff_format=h">M</a></td><td width='1%'>1.7</td><td width='100%'>contrib/crossrpms/rtems4.11/arm-eabi/gcc-sources.add</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/contrib/crossrpms/rtems4.11/arm/gcc-sources.add.diff?r1=text&tr1=1.47&r2=text&tr2=1.48&diff_format=h">M</a></td><td width='1%'>1.48</td><td width='100%'>contrib/crossrpms/rtems4.11/arm/gcc-sources.add</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/contrib/crossrpms/rtems4.11/avr/gcc-sources.add.diff?r1=text&tr1=1.47&r2=text&tr2=1.48&diff_format=h">M</a></td><td width='1%'>1.48</td><td width='100%'>contrib/crossrpms/rtems4.11/avr/gcc-sources.add</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/contrib/crossrpms/rtems4.11/bfin/gcc-sources.add.diff?r1=text&tr1=1.47&r2=text&tr2=1.48&diff_format=h">M</a></td><td width='1%'>1.48</td><td width='100%'>contrib/crossrpms/rtems4.11/bfin/gcc-sources.add</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/contrib/crossrpms/rtems4.11/h8300/gcc-sources.add.diff?r1=text&tr1=1.48&r2=text&tr2=1.49&diff_format=h">M</a></td><td width='1%'>1.49</td><td width='100%'>contrib/crossrpms/rtems4.11/h8300/gcc-sources.add</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/contrib/crossrpms/rtems4.11/i386/gcc-sources.add.diff?r1=text&tr1=1.47&r2=text&tr2=1.48&diff_format=h">M</a></td><td width='1%'>1.48</td><td width='100%'>contrib/crossrpms/rtems4.11/i386/gcc-sources.add</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/contrib/crossrpms/rtems4.11/lm32/gcc-sources.add.diff?r1=text&tr1=1.47&r2=text&tr2=1.48&diff_format=h">M</a></td><td width='1%'>1.48</td><td width='100%'>contrib/crossrpms/rtems4.11/lm32/gcc-sources.add</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/contrib/crossrpms/rtems4.11/m32c/gcc-sources.add.diff?r1=text&tr1=1.47&r2=text&tr2=1.48&diff_format=h">M</a></td><td width='1%'>1.48</td><td width='100%'>contrib/crossrpms/rtems4.11/m32c/gcc-sources.add</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/contrib/crossrpms/rtems4.11/m32r/gcc-sources.add.diff?r1=text&tr1=1.47&r2=text&tr2=1.48&diff_format=h">M</a></td><td width='1%'>1.48</td><td width='100%'>contrib/crossrpms/rtems4.11/m32r/gcc-sources.add</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/contrib/crossrpms/rtems4.11/m68k/gcc-sources.add.diff?r1=text&tr1=1.47&r2=text&tr2=1.48&diff_format=h">M</a></td><td width='1%'>1.48</td><td width='100%'>contrib/crossrpms/rtems4.11/m68k/gcc-sources.add</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/contrib/crossrpms/rtems4.11/mips/gcc-sources.add.diff?r1=text&tr1=1.47&r2=text&tr2=1.48&diff_format=h">M</a></td><td width='1%'>1.48</td><td width='100%'>contrib/crossrpms/rtems4.11/mips/gcc-sources.add</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/contrib/crossrpms/rtems4.11/powerpc/gcc-sources.add.diff?r1=text&tr1=1.47&r2=text&tr2=1.48&diff_format=h">M</a></td><td width='1%'>1.48</td><td width='100%'>contrib/crossrpms/rtems4.11/powerpc/gcc-sources.add</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/contrib/crossrpms/rtems4.11/sh/gcc-sources.add.diff?r1=text&tr1=1.47&r2=text&tr2=1.48&diff_format=h">M</a></td><td width='1%'>1.48</td><td width='100%'>contrib/crossrpms/rtems4.11/sh/gcc-sources.add</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/contrib/crossrpms/rtems4.11/sparc/gcc-sources.add.diff?r1=text&tr1=1.47&r2=text&tr2=1.48&diff_format=h">M</a></td><td width='1%'>1.48</td><td width='100%'>contrib/crossrpms/rtems4.11/sparc/gcc-sources.add</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/contrib/crossrpms/rtems4.11/sparc64/gcc-sources.add.diff?r1=text&tr1=1.38&r2=text&tr2=1.39&diff_format=h">M</a></td><td width='1%'>1.39</td><td width='100%'>contrib/crossrpms/rtems4.11/sparc64/gcc-sources.add</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/contrib/crossrpms/rtems4.11/arm-eabi/gcc-sources.add:1.6 rtems/contrib/crossrpms/rtems4.11/arm-eabi/gcc-sources.add:1.7
--- rtems/contrib/crossrpms/rtems4.11/arm-eabi/gcc-sources.add:1.6      Wed Jul 20 01:44:30 2011
+++ rtems/contrib/crossrpms/rtems4.11/arm-eabi/gcc-sources.add  Sun Jul 24 09:13:30 2011
</font><font color='#997700'>@@ -36,6 +36,6 @@
</font> %if %build_newlib
 %if "%{newlib_version}" == "1.19.0"
 Source50:      ftp://sources.redhat.com/pub/newlib/newlib-%{newlib_pkgvers}.tar.gz
<font color='#880000'>-Patch50:   ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/newlib-1.19.0-rtems4.11-20110720.diff
</font><font color='#000088'>+Patch50:      ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/newlib-1.19.0-rtems4.11-20110724.diff
</font> %endif
 %endif

<font color='#006600'>diff -u rtems/contrib/crossrpms/rtems4.11/arm/gcc-sources.add:1.47 rtems/contrib/crossrpms/rtems4.11/arm/gcc-sources.add:1.48
--- rtems/contrib/crossrpms/rtems4.11/arm/gcc-sources.add:1.47  Wed Jul 20 01:44:30 2011
+++ rtems/contrib/crossrpms/rtems4.11/arm/gcc-sources.add       Sun Jul 24 09:13:30 2011
</font><font color='#997700'>@@ -36,6 +36,6 @@
</font> %if %build_newlib
 %if "%{newlib_version}" == "1.19.0"
 Source50:      ftp://sources.redhat.com/pub/newlib/newlib-%{newlib_pkgvers}.tar.gz
<font color='#880000'>-Patch50:   ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/newlib-1.19.0-rtems4.11-20110720.diff
</font><font color='#000088'>+Patch50:      ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/newlib-1.19.0-rtems4.11-20110724.diff
</font> %endif
 %endif

<font color='#006600'>diff -u rtems/contrib/crossrpms/rtems4.11/avr/gcc-sources.add:1.47 rtems/contrib/crossrpms/rtems4.11/avr/gcc-sources.add:1.48
--- rtems/contrib/crossrpms/rtems4.11/avr/gcc-sources.add:1.47  Wed Jul 20 01:44:30 2011
+++ rtems/contrib/crossrpms/rtems4.11/avr/gcc-sources.add       Sun Jul 24 09:13:31 2011
</font><font color='#997700'>@@ -36,6 +36,6 @@
</font> %if %build_newlib
 %if "%{newlib_version}" == "1.19.0"
 Source50:      ftp://sources.redhat.com/pub/newlib/newlib-%{newlib_pkgvers}.tar.gz
<font color='#880000'>-Patch50:   ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/newlib-1.19.0-rtems4.11-20110720.diff
</font><font color='#000088'>+Patch50:      ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/newlib-1.19.0-rtems4.11-20110724.diff
</font> %endif
 %endif

<font color='#006600'>diff -u rtems/contrib/crossrpms/rtems4.11/bfin/gcc-sources.add:1.47 rtems/contrib/crossrpms/rtems4.11/bfin/gcc-sources.add:1.48
--- rtems/contrib/crossrpms/rtems4.11/bfin/gcc-sources.add:1.47 Wed Jul 20 01:44:30 2011
+++ rtems/contrib/crossrpms/rtems4.11/bfin/gcc-sources.add      Sun Jul 24 09:13:31 2011
</font><font color='#997700'>@@ -36,6 +36,6 @@
</font> %if %build_newlib
 %if "%{newlib_version}" == "1.19.0"
 Source50:      ftp://sources.redhat.com/pub/newlib/newlib-%{newlib_pkgvers}.tar.gz
<font color='#880000'>-Patch50:   ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/newlib-1.19.0-rtems4.11-20110720.diff
</font><font color='#000088'>+Patch50:      ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/newlib-1.19.0-rtems4.11-20110724.diff
</font> %endif
 %endif

<font color='#006600'>diff -u rtems/contrib/crossrpms/rtems4.11/h8300/gcc-sources.add:1.48 rtems/contrib/crossrpms/rtems4.11/h8300/gcc-sources.add:1.49
--- rtems/contrib/crossrpms/rtems4.11/h8300/gcc-sources.add:1.48        Wed Jul 20 01:44:30 2011
+++ rtems/contrib/crossrpms/rtems4.11/h8300/gcc-sources.add     Sun Jul 24 09:13:31 2011
</font><font color='#997700'>@@ -36,6 +36,6 @@
</font> %if %build_newlib
 %if "%{newlib_version}" == "1.19.0"
 Source50:      ftp://sources.redhat.com/pub/newlib/newlib-%{newlib_pkgvers}.tar.gz
<font color='#880000'>-Patch50:   ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/newlib-1.19.0-rtems4.11-20110720.diff
</font><font color='#000088'>+Patch50:      ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/newlib-1.19.0-rtems4.11-20110724.diff
</font> %endif
 %endif

<font color='#006600'>diff -u rtems/contrib/crossrpms/rtems4.11/i386/gcc-sources.add:1.47 rtems/contrib/crossrpms/rtems4.11/i386/gcc-sources.add:1.48
--- rtems/contrib/crossrpms/rtems4.11/i386/gcc-sources.add:1.47 Wed Jul 20 01:44:30 2011
+++ rtems/contrib/crossrpms/rtems4.11/i386/gcc-sources.add      Sun Jul 24 09:13:31 2011
</font><font color='#997700'>@@ -36,6 +36,6 @@
</font> %if %build_newlib
 %if "%{newlib_version}" == "1.19.0"
 Source50:      ftp://sources.redhat.com/pub/newlib/newlib-%{newlib_pkgvers}.tar.gz
<font color='#880000'>-Patch50:   ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/newlib-1.19.0-rtems4.11-20110720.diff
</font><font color='#000088'>+Patch50:      ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/newlib-1.19.0-rtems4.11-20110724.diff
</font> %endif
 %endif

<font color='#006600'>diff -u rtems/contrib/crossrpms/rtems4.11/lm32/gcc-sources.add:1.47 rtems/contrib/crossrpms/rtems4.11/lm32/gcc-sources.add:1.48
--- rtems/contrib/crossrpms/rtems4.11/lm32/gcc-sources.add:1.47 Wed Jul 20 01:44:30 2011
+++ rtems/contrib/crossrpms/rtems4.11/lm32/gcc-sources.add      Sun Jul 24 09:13:31 2011
</font><font color='#997700'>@@ -36,6 +36,6 @@
</font> %if %build_newlib
 %if "%{newlib_version}" == "1.19.0"
 Source50:      ftp://sources.redhat.com/pub/newlib/newlib-%{newlib_pkgvers}.tar.gz
<font color='#880000'>-Patch50:   ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/newlib-1.19.0-rtems4.11-20110720.diff
</font><font color='#000088'>+Patch50:      ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/newlib-1.19.0-rtems4.11-20110724.diff
</font> %endif
 %endif

<font color='#006600'>diff -u rtems/contrib/crossrpms/rtems4.11/m32c/gcc-sources.add:1.47 rtems/contrib/crossrpms/rtems4.11/m32c/gcc-sources.add:1.48
--- rtems/contrib/crossrpms/rtems4.11/m32c/gcc-sources.add:1.47 Wed Jul 20 01:44:31 2011
+++ rtems/contrib/crossrpms/rtems4.11/m32c/gcc-sources.add      Sun Jul 24 09:13:31 2011
</font><font color='#997700'>@@ -36,6 +36,6 @@
</font> %if %build_newlib
 %if "%{newlib_version}" == "1.19.0"
 Source50:      ftp://sources.redhat.com/pub/newlib/newlib-%{newlib_pkgvers}.tar.gz
<font color='#880000'>-Patch50:   ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/newlib-1.19.0-rtems4.11-20110720.diff
</font><font color='#000088'>+Patch50:      ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/newlib-1.19.0-rtems4.11-20110724.diff
</font> %endif
 %endif

<font color='#006600'>diff -u rtems/contrib/crossrpms/rtems4.11/m32r/gcc-sources.add:1.47 rtems/contrib/crossrpms/rtems4.11/m32r/gcc-sources.add:1.48
--- rtems/contrib/crossrpms/rtems4.11/m32r/gcc-sources.add:1.47 Wed Jul 20 01:44:31 2011
+++ rtems/contrib/crossrpms/rtems4.11/m32r/gcc-sources.add      Sun Jul 24 09:13:31 2011
</font><font color='#997700'>@@ -36,6 +36,6 @@
</font> %if %build_newlib
 %if "%{newlib_version}" == "1.19.0"
 Source50:      ftp://sources.redhat.com/pub/newlib/newlib-%{newlib_pkgvers}.tar.gz
<font color='#880000'>-Patch50:   ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/newlib-1.19.0-rtems4.11-20110720.diff
</font><font color='#000088'>+Patch50:      ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/newlib-1.19.0-rtems4.11-20110724.diff
</font> %endif
 %endif

<font color='#006600'>diff -u rtems/contrib/crossrpms/rtems4.11/m68k/gcc-sources.add:1.47 rtems/contrib/crossrpms/rtems4.11/m68k/gcc-sources.add:1.48
--- rtems/contrib/crossrpms/rtems4.11/m68k/gcc-sources.add:1.47 Wed Jul 20 01:44:31 2011
+++ rtems/contrib/crossrpms/rtems4.11/m68k/gcc-sources.add      Sun Jul 24 09:13:31 2011
</font><font color='#997700'>@@ -36,6 +36,6 @@
</font> %if %build_newlib
 %if "%{newlib_version}" == "1.19.0"
 Source50:      ftp://sources.redhat.com/pub/newlib/newlib-%{newlib_pkgvers}.tar.gz
<font color='#880000'>-Patch50:   ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/newlib-1.19.0-rtems4.11-20110720.diff
</font><font color='#000088'>+Patch50:      ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/newlib-1.19.0-rtems4.11-20110724.diff
</font> %endif
 %endif

<font color='#006600'>diff -u rtems/contrib/crossrpms/rtems4.11/mips/gcc-sources.add:1.47 rtems/contrib/crossrpms/rtems4.11/mips/gcc-sources.add:1.48
--- rtems/contrib/crossrpms/rtems4.11/mips/gcc-sources.add:1.47 Wed Jul 20 01:44:31 2011
+++ rtems/contrib/crossrpms/rtems4.11/mips/gcc-sources.add      Sun Jul 24 09:13:31 2011
</font><font color='#997700'>@@ -36,6 +36,6 @@
</font> %if %build_newlib
 %if "%{newlib_version}" == "1.19.0"
 Source50:      ftp://sources.redhat.com/pub/newlib/newlib-%{newlib_pkgvers}.tar.gz
<font color='#880000'>-Patch50:   ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/newlib-1.19.0-rtems4.11-20110720.diff
</font><font color='#000088'>+Patch50:      ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/newlib-1.19.0-rtems4.11-20110724.diff
</font> %endif
 %endif

<font color='#006600'>diff -u rtems/contrib/crossrpms/rtems4.11/powerpc/gcc-sources.add:1.47 rtems/contrib/crossrpms/rtems4.11/powerpc/gcc-sources.add:1.48
--- rtems/contrib/crossrpms/rtems4.11/powerpc/gcc-sources.add:1.47      Wed Jul 20 01:44:31 2011
+++ rtems/contrib/crossrpms/rtems4.11/powerpc/gcc-sources.add   Sun Jul 24 09:13:31 2011
</font><font color='#997700'>@@ -36,6 +36,6 @@
</font> %if %build_newlib
 %if "%{newlib_version}" == "1.19.0"
 Source50:      ftp://sources.redhat.com/pub/newlib/newlib-%{newlib_pkgvers}.tar.gz
<font color='#880000'>-Patch50:   ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/newlib-1.19.0-rtems4.11-20110720.diff
</font><font color='#000088'>+Patch50:      ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/newlib-1.19.0-rtems4.11-20110724.diff
</font> %endif
 %endif

<font color='#006600'>diff -u rtems/contrib/crossrpms/rtems4.11/sh/gcc-sources.add:1.47 rtems/contrib/crossrpms/rtems4.11/sh/gcc-sources.add:1.48
--- rtems/contrib/crossrpms/rtems4.11/sh/gcc-sources.add:1.47   Wed Jul 20 01:44:31 2011
+++ rtems/contrib/crossrpms/rtems4.11/sh/gcc-sources.add        Sun Jul 24 09:13:31 2011
</font><font color='#997700'>@@ -36,6 +36,6 @@
</font> %if %build_newlib
 %if "%{newlib_version}" == "1.19.0"
 Source50:      ftp://sources.redhat.com/pub/newlib/newlib-%{newlib_pkgvers}.tar.gz
<font color='#880000'>-Patch50:   ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/newlib-1.19.0-rtems4.11-20110720.diff
</font><font color='#000088'>+Patch50:      ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/newlib-1.19.0-rtems4.11-20110724.diff
</font> %endif
 %endif

<font color='#006600'>diff -u rtems/contrib/crossrpms/rtems4.11/sparc/gcc-sources.add:1.47 rtems/contrib/crossrpms/rtems4.11/sparc/gcc-sources.add:1.48
--- rtems/contrib/crossrpms/rtems4.11/sparc/gcc-sources.add:1.47        Wed Jul 20 01:44:31 2011
+++ rtems/contrib/crossrpms/rtems4.11/sparc/gcc-sources.add     Sun Jul 24 09:13:31 2011
</font><font color='#997700'>@@ -36,6 +36,6 @@
</font> %if %build_newlib
 %if "%{newlib_version}" == "1.19.0"
 Source50:      ftp://sources.redhat.com/pub/newlib/newlib-%{newlib_pkgvers}.tar.gz
<font color='#880000'>-Patch50:   ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/newlib-1.19.0-rtems4.11-20110720.diff
</font><font color='#000088'>+Patch50:      ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/newlib-1.19.0-rtems4.11-20110724.diff
</font> %endif
 %endif

<font color='#006600'>diff -u rtems/contrib/crossrpms/rtems4.11/sparc64/gcc-sources.add:1.38 rtems/contrib/crossrpms/rtems4.11/sparc64/gcc-sources.add:1.39
--- rtems/contrib/crossrpms/rtems4.11/sparc64/gcc-sources.add:1.38      Wed Jul 20 01:44:31 2011
+++ rtems/contrib/crossrpms/rtems4.11/sparc64/gcc-sources.add   Sun Jul 24 09:13:31 2011
</font><font color='#997700'>@@ -36,6 +36,6 @@
</font> %if %build_newlib
 %if "%{newlib_version}" == "1.19.0"
 Source50:      ftp://sources.redhat.com/pub/newlib/newlib-%{newlib_pkgvers}.tar.gz
<font color='#880000'>-Patch50:   ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/newlib-1.19.0-rtems4.11-20110720.diff
</font><font color='#000088'>+Patch50:      ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/newlib-1.19.0-rtems4.11-20110724.diff
</font> %endif
 %endif
</pre>
<p> </p>
<a name='cs4'></a>
<table border='0' cellspacing='0' cellpadding='5' width='100%' bgcolor='#eeeeee'>
<tr><td colspan='3' bgcolor='#dddddd'>
 <font color='#bb2222'><strong>ralf</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>Bump GCC_RPMREL.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/contrib/crossrpms/rtems4.11/arm-eabi/Makefile.am.diff?r1=text&tr1=1.7&r2=text&tr2=1.8&diff_format=h">M</a></td><td width='1%'>1.8</td><td width='100%'>contrib/crossrpms/rtems4.11/arm-eabi/Makefile.am</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/contrib/crossrpms/rtems4.11/arm/Makefile.am.diff?r1=text&tr1=1.52&r2=text&tr2=1.53&diff_format=h">M</a></td><td width='1%'>1.53</td><td width='100%'>contrib/crossrpms/rtems4.11/arm/Makefile.am</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/contrib/crossrpms/rtems4.11/avr/Makefile.am.diff?r1=text&tr1=1.53&r2=text&tr2=1.54&diff_format=h">M</a></td><td width='1%'>1.54</td><td width='100%'>contrib/crossrpms/rtems4.11/avr/Makefile.am</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/contrib/crossrpms/rtems4.11/bfin/Makefile.am.diff?r1=text&tr1=1.51&r2=text&tr2=1.52&diff_format=h">M</a></td><td width='1%'>1.52</td><td width='100%'>contrib/crossrpms/rtems4.11/bfin/Makefile.am</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/contrib/crossrpms/rtems4.11/h8300/Makefile.am.diff?r1=text&tr1=1.52&r2=text&tr2=1.53&diff_format=h">M</a></td><td width='1%'>1.53</td><td width='100%'>contrib/crossrpms/rtems4.11/h8300/Makefile.am</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/contrib/crossrpms/rtems4.11/i386/Makefile.am.diff?r1=text&tr1=1.54&r2=text&tr2=1.55&diff_format=h">M</a></td><td width='1%'>1.55</td><td width='100%'>contrib/crossrpms/rtems4.11/i386/Makefile.am</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/contrib/crossrpms/rtems4.11/lm32/Makefile.am.diff?r1=text&tr1=1.54&r2=text&tr2=1.55&diff_format=h">M</a></td><td width='1%'>1.55</td><td width='100%'>contrib/crossrpms/rtems4.11/lm32/Makefile.am</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/contrib/crossrpms/rtems4.11/m32c/Makefile.am.diff?r1=text&tr1=1.55&r2=text&tr2=1.56&diff_format=h">M</a></td><td width='1%'>1.56</td><td width='100%'>contrib/crossrpms/rtems4.11/m32c/Makefile.am</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/contrib/crossrpms/rtems4.11/m32r/Makefile.am.diff?r1=text&tr1=1.52&r2=text&tr2=1.53&diff_format=h">M</a></td><td width='1%'>1.53</td><td width='100%'>contrib/crossrpms/rtems4.11/m32r/Makefile.am</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/contrib/crossrpms/rtems4.11/m68k/Makefile.am.diff?r1=text&tr1=1.54&r2=text&tr2=1.55&diff_format=h">M</a></td><td width='1%'>1.55</td><td width='100%'>contrib/crossrpms/rtems4.11/m68k/Makefile.am</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/contrib/crossrpms/rtems4.11/mips/Makefile.am.diff?r1=text&tr1=1.54&r2=text&tr2=1.55&diff_format=h">M</a></td><td width='1%'>1.55</td><td width='100%'>contrib/crossrpms/rtems4.11/mips/Makefile.am</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/contrib/crossrpms/rtems4.11/powerpc/Makefile.am.diff?r1=text&tr1=1.56&r2=text&tr2=1.57&diff_format=h">M</a></td><td width='1%'>1.57</td><td width='100%'>contrib/crossrpms/rtems4.11/powerpc/Makefile.am</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/contrib/crossrpms/rtems4.11/sh/Makefile.am.diff?r1=text&tr1=1.54&r2=text&tr2=1.55&diff_format=h">M</a></td><td width='1%'>1.55</td><td width='100%'>contrib/crossrpms/rtems4.11/sh/Makefile.am</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/contrib/crossrpms/rtems4.11/sparc/Makefile.am.diff?r1=text&tr1=1.57&r2=text&tr2=1.58&diff_format=h">M</a></td><td width='1%'>1.58</td><td width='100%'>contrib/crossrpms/rtems4.11/sparc/Makefile.am</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/contrib/crossrpms/rtems4.11/sparc64/Makefile.am.diff?r1=text&tr1=1.44&r2=text&tr2=1.45&diff_format=h">M</a></td><td width='1%'>1.45</td><td width='100%'>contrib/crossrpms/rtems4.11/sparc64/Makefile.am</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/contrib/crossrpms/rtems4.11/arm-eabi/Makefile.am:1.7 rtems/contrib/crossrpms/rtems4.11/arm-eabi/Makefile.am:1.8
--- rtems/contrib/crossrpms/rtems4.11/arm-eabi/Makefile.am:1.7  Wed Jul 20 01:45:09 2011
+++ rtems/contrib/crossrpms/rtems4.11/arm-eabi/Makefile.am      Sun Jul 24 09:16:09 2011
</font><font color='#997700'>@@ -13,7 +13,7 @@
</font> 
 GCC_VERS = 4.6.1
 GCC_PKGVERS = $(GCC_VERS)
<font color='#880000'>-GCC_RPMREL = 4
</font><font color='#000088'>+GCC_RPMREL = 5
</font> NEWLIB_VERS = 1.19.0
 NEWLIB_PKGVERS = $(NEWLIB_VERS)
 NEWLIB_RPMREL = `expr $(GCC_RPMREL) + 10`

<font color='#006600'>diff -u rtems/contrib/crossrpms/rtems4.11/arm/Makefile.am:1.52 rtems/contrib/crossrpms/rtems4.11/arm/Makefile.am:1.53
--- rtems/contrib/crossrpms/rtems4.11/arm/Makefile.am:1.52      Wed Jul 20 01:45:09 2011
+++ rtems/contrib/crossrpms/rtems4.11/arm/Makefile.am   Sun Jul 24 09:16:09 2011
</font><font color='#997700'>@@ -13,7 +13,7 @@
</font> 
 GCC_VERS = 4.6.1
 GCC_PKGVERS = $(GCC_VERS)
<font color='#880000'>-GCC_RPMREL = 4
</font><font color='#000088'>+GCC_RPMREL = 5
</font> 
 NEWLIB_VERS = 1.19.0
 NEWLIB_PKGVERS = $(NEWLIB_VERS)

<font color='#006600'>diff -u rtems/contrib/crossrpms/rtems4.11/avr/Makefile.am:1.53 rtems/contrib/crossrpms/rtems4.11/avr/Makefile.am:1.54
--- rtems/contrib/crossrpms/rtems4.11/avr/Makefile.am:1.53      Wed Jul 20 01:45:09 2011
+++ rtems/contrib/crossrpms/rtems4.11/avr/Makefile.am   Sun Jul 24 09:16:09 2011
</font><font color='#997700'>@@ -13,7 +13,7 @@
</font> 
 GCC_VERS = 4.6.1
 GCC_PKGVERS = $(GCC_VERS)
<font color='#880000'>-GCC_RPMREL = 4
</font><font color='#000088'>+GCC_RPMREL = 5
</font> NEWLIB_VERS = 1.19.0
 NEWLIB_PKGVERS = $(NEWLIB_VERS)
 NEWLIB_RPMREL = `expr $(GCC_RPMREL) + 10`

<font color='#006600'>diff -u rtems/contrib/crossrpms/rtems4.11/bfin/Makefile.am:1.51 rtems/contrib/crossrpms/rtems4.11/bfin/Makefile.am:1.52
--- rtems/contrib/crossrpms/rtems4.11/bfin/Makefile.am:1.51     Wed Jul 20 01:45:09 2011
+++ rtems/contrib/crossrpms/rtems4.11/bfin/Makefile.am  Sun Jul 24 09:16:09 2011
</font><font color='#997700'>@@ -13,7 +13,7 @@
</font> 
 GCC_VERS = 4.6.1
 GCC_PKGVERS = $(GCC_VERS)
<font color='#880000'>-GCC_RPMREL = 4
</font><font color='#000088'>+GCC_RPMREL = 5
</font> NEWLIB_VERS = 1.19.0
 NEWLIB_PKGVERS = $(NEWLIB_VERS)
 NEWLIB_RPMREL = `expr $(GCC_RPMREL) + 10`

<font color='#006600'>diff -u rtems/contrib/crossrpms/rtems4.11/h8300/Makefile.am:1.52 rtems/contrib/crossrpms/rtems4.11/h8300/Makefile.am:1.53
--- rtems/contrib/crossrpms/rtems4.11/h8300/Makefile.am:1.52    Wed Jul 20 01:45:09 2011
+++ rtems/contrib/crossrpms/rtems4.11/h8300/Makefile.am Sun Jul 24 09:16:09 2011
</font><font color='#997700'>@@ -13,7 +13,7 @@
</font> 
 GCC_VERS = 4.5.3
 GCC_PKGVERS = $(GCC_VERS)
<font color='#880000'>-GCC_RPMREL = 4
</font><font color='#000088'>+GCC_RPMREL = 5
</font> NEWLIB_VERS = 1.19.0
 NEWLIB_PKGVERS = $(NEWLIB_VERS)
 NEWLIB_RPMREL = `expr $(GCC_RPMREL) + 7`

<font color='#006600'>diff -u rtems/contrib/crossrpms/rtems4.11/i386/Makefile.am:1.54 rtems/contrib/crossrpms/rtems4.11/i386/Makefile.am:1.55
--- rtems/contrib/crossrpms/rtems4.11/i386/Makefile.am:1.54     Wed Jul 20 01:45:09 2011
+++ rtems/contrib/crossrpms/rtems4.11/i386/Makefile.am  Sun Jul 24 09:16:10 2011
</font><font color='#997700'>@@ -13,7 +13,7 @@
</font> 
 GCC_VERS = 4.6.1
 GCC_PKGVERS = $(GCC_VERS)
<font color='#880000'>-GCC_RPMREL = 4
</font><font color='#000088'>+GCC_RPMREL = 5
</font> NEWLIB_VERS = 1.19.0
 NEWLIB_PKGVERS = $(NEWLIB_VERS)
 NEWLIB_RPMREL = `expr $(GCC_RPMREL) + 10`

<font color='#006600'>diff -u rtems/contrib/crossrpms/rtems4.11/lm32/Makefile.am:1.54 rtems/contrib/crossrpms/rtems4.11/lm32/Makefile.am:1.55
--- rtems/contrib/crossrpms/rtems4.11/lm32/Makefile.am:1.54     Wed Jul 20 01:45:09 2011
+++ rtems/contrib/crossrpms/rtems4.11/lm32/Makefile.am  Sun Jul 24 09:16:10 2011
</font><font color='#997700'>@@ -13,7 +13,7 @@
</font> 
 GCC_VERS = 4.5.3
 GCC_PKGVERS = $(GCC_VERS)
<font color='#880000'>-GCC_RPMREL = 4
</font><font color='#000088'>+GCC_RPMREL = 5
</font> NEWLIB_VERS = 1.19.0
 NEWLIB_PKGVERS = $(NEWLIB_VERS)
 NEWLIB_RPMREL = `expr $(GCC_RPMREL) + 7`

<font color='#006600'>diff -u rtems/contrib/crossrpms/rtems4.11/m32c/Makefile.am:1.55 rtems/contrib/crossrpms/rtems4.11/m32c/Makefile.am:1.56
--- rtems/contrib/crossrpms/rtems4.11/m32c/Makefile.am:1.55     Wed Jul 20 01:45:09 2011
+++ rtems/contrib/crossrpms/rtems4.11/m32c/Makefile.am  Sun Jul 24 09:16:10 2011
</font><font color='#997700'>@@ -13,7 +13,7 @@
</font> 
 GCC_VERS = 4.6.1
 GCC_PKGVERS = $(GCC_VERS)
<font color='#880000'>-GCC_RPMREL = 4
</font><font color='#000088'>+GCC_RPMREL = 5
</font> NEWLIB_VERS = 1.19.0
 NEWLIB_PKGVERS = $(NEWLIB_VERS)
 NEWLIB_RPMREL = `expr $(GCC_RPMREL) + 10`

<font color='#006600'>diff -u rtems/contrib/crossrpms/rtems4.11/m32r/Makefile.am:1.52 rtems/contrib/crossrpms/rtems4.11/m32r/Makefile.am:1.53
--- rtems/contrib/crossrpms/rtems4.11/m32r/Makefile.am:1.52     Wed Jul 20 01:45:09 2011
+++ rtems/contrib/crossrpms/rtems4.11/m32r/Makefile.am  Sun Jul 24 09:16:10 2011
</font><font color='#997700'>@@ -13,7 +13,7 @@
</font> 
 GCC_VERS = 4.6.1
 GCC_PKGVERS = $(GCC_VERS)
<font color='#880000'>-GCC_RPMREL = 4
</font><font color='#000088'>+GCC_RPMREL = 5
</font> NEWLIB_VERS = 1.19.0
 NEWLIB_PKGVERS = $(NEWLIB_VERS)
 NEWLIB_RPMREL = `expr $(GCC_RPMREL) + 10`

<font color='#006600'>diff -u rtems/contrib/crossrpms/rtems4.11/m68k/Makefile.am:1.54 rtems/contrib/crossrpms/rtems4.11/m68k/Makefile.am:1.55
--- rtems/contrib/crossrpms/rtems4.11/m68k/Makefile.am:1.54     Wed Jul 20 01:45:09 2011
+++ rtems/contrib/crossrpms/rtems4.11/m68k/Makefile.am  Sun Jul 24 09:16:10 2011
</font><font color='#997700'>@@ -13,7 +13,7 @@
</font> 
 GCC_VERS = 4.6.1
 GCC_PKGVERS = $(GCC_VERS)
<font color='#880000'>-GCC_RPMREL = 4
</font><font color='#000088'>+GCC_RPMREL = 5
</font> NEWLIB_VERS = 1.19.0
 NEWLIB_PKGVERS = $(NEWLIB_VERS)
 NEWLIB_RPMREL = `expr $(GCC_RPMREL) + 10`

<font color='#006600'>diff -u rtems/contrib/crossrpms/rtems4.11/mips/Makefile.am:1.54 rtems/contrib/crossrpms/rtems4.11/mips/Makefile.am:1.55
--- rtems/contrib/crossrpms/rtems4.11/mips/Makefile.am:1.54     Wed Jul 20 01:45:09 2011
+++ rtems/contrib/crossrpms/rtems4.11/mips/Makefile.am  Sun Jul 24 09:16:10 2011
</font><font color='#997700'>@@ -13,7 +13,7 @@
</font> 
 GCC_VERS = 4.6.1
 GCC_PKGVERS = $(GCC_VERS)
<font color='#880000'>-GCC_RPMREL = 4
</font><font color='#000088'>+GCC_RPMREL = 5
</font> NEWLIB_VERS = 1.19.0
 NEWLIB_PKGVERS = $(NEWLIB_VERS)
 NEWLIB_RPMREL = `expr $(GCC_RPMREL) + 10`

<font color='#006600'>diff -u rtems/contrib/crossrpms/rtems4.11/powerpc/Makefile.am:1.56 rtems/contrib/crossrpms/rtems4.11/powerpc/Makefile.am:1.57
--- rtems/contrib/crossrpms/rtems4.11/powerpc/Makefile.am:1.56  Wed Jul 20 01:45:09 2011
+++ rtems/contrib/crossrpms/rtems4.11/powerpc/Makefile.am       Sun Jul 24 09:16:10 2011
</font><font color='#997700'>@@ -13,7 +13,7 @@
</font> 
 GCC_VERS = 4.6.1
 GCC_PKGVERS = $(GCC_VERS)
<font color='#880000'>-GCC_RPMREL = 4
</font><font color='#000088'>+GCC_RPMREL = 5
</font> NEWLIB_VERS = 1.19.0
 NEWLIB_PKGVERS = $(NEWLIB_VERS)
 NEWLIB_RPMREL = `expr $(GCC_RPMREL) + 10`

<font color='#006600'>diff -u rtems/contrib/crossrpms/rtems4.11/sh/Makefile.am:1.54 rtems/contrib/crossrpms/rtems4.11/sh/Makefile.am:1.55
--- rtems/contrib/crossrpms/rtems4.11/sh/Makefile.am:1.54       Wed Jul 20 01:45:09 2011
+++ rtems/contrib/crossrpms/rtems4.11/sh/Makefile.am    Sun Jul 24 09:16:10 2011
</font><font color='#997700'>@@ -13,7 +13,7 @@
</font> 
 GCC_VERS = 4.6.1
 GCC_PKGVERS = $(GCC_VERS)
<font color='#880000'>-GCC_RPMREL = 4
</font><font color='#000088'>+GCC_RPMREL = 5
</font> NEWLIB_VERS = 1.19.0
 NEWLIB_PKGVERS = $(NEWLIB_VERS)
 NEWLIB_RPMREL = `expr $(GCC_RPMREL) + 10`

<font color='#006600'>diff -u rtems/contrib/crossrpms/rtems4.11/sparc/Makefile.am:1.57 rtems/contrib/crossrpms/rtems4.11/sparc/Makefile.am:1.58
--- rtems/contrib/crossrpms/rtems4.11/sparc/Makefile.am:1.57    Wed Jul 20 01:45:09 2011
+++ rtems/contrib/crossrpms/rtems4.11/sparc/Makefile.am Sun Jul 24 09:16:10 2011
</font><font color='#997700'>@@ -13,7 +13,7 @@
</font> 
 GCC_VERS = 4.6.1
 GCC_PKGVERS = $(GCC_VERS)
<font color='#880000'>-GCC_RPMREL = 4
</font><font color='#000088'>+GCC_RPMREL = 5
</font> NEWLIB_VERS = 1.19.0
 NEWLIB_PKGVERS = $(NEWLIB_VERS)
 NEWLIB_RPMREL = `expr $(GCC_RPMREL) + 10`

<font color='#006600'>diff -u rtems/contrib/crossrpms/rtems4.11/sparc64/Makefile.am:1.44 rtems/contrib/crossrpms/rtems4.11/sparc64/Makefile.am:1.45
--- rtems/contrib/crossrpms/rtems4.11/sparc64/Makefile.am:1.44  Wed Jul 20 01:45:09 2011
+++ rtems/contrib/crossrpms/rtems4.11/sparc64/Makefile.am       Sun Jul 24 09:16:10 2011
</font><font color='#997700'>@@ -13,7 +13,7 @@
</font> 
 GCC_VERS = 4.6.1
 GCC_PKGVERS = $(GCC_VERS)
<font color='#880000'>-GCC_RPMREL = 4
</font><font color='#000088'>+GCC_RPMREL = 5
</font> NEWLIB_VERS = 1.19.0
 NEWLIB_PKGVERS = $(NEWLIB_VERS)
 NEWLIB_RPMREL = `expr $(GCC_RPMREL) + 10`
</pre>
<p> </p>
<a name='cs5'></a>
<table border='0' cellspacing='0' cellpadding='5' width='100%' bgcolor='#eeeeee'>
<tr><td colspan='3' bgcolor='#dddddd'>
 <font color='#bb2222'><strong>ralf</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>Regenerate.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/contrib/crossrpms/rtems4.11/arm-eabi/rtems-4.11-arm-rtemseabi4.11-gcc.spec.diff?r1=text&tr1=1.6&r2=text&tr2=1.7&diff_format=h">M</a></td><td width='1%'>1.7</td><td width='100%'>contrib/crossrpms/rtems4.11/arm-eabi/rtems-4.11-arm-rtemseabi4.11-gcc.spec</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/contrib/crossrpms/rtems4.11/arm/rtems-4.11-arm-rtems4.11-gcc.spec.diff?r1=text&tr1=1.56&r2=text&tr2=1.57&diff_format=h">M</a></td><td width='1%'>1.57</td><td width='100%'>contrib/crossrpms/rtems4.11/arm/rtems-4.11-arm-rtems4.11-gcc.spec</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/contrib/crossrpms/rtems4.11/avr/rtems-4.11-avr-rtems4.11-gcc.spec.diff?r1=text&tr1=1.55&r2=text&tr2=1.56&diff_format=h">M</a></td><td width='1%'>1.56</td><td width='100%'>contrib/crossrpms/rtems4.11/avr/rtems-4.11-avr-rtems4.11-gcc.spec</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/contrib/crossrpms/rtems4.11/bfin/rtems-4.11-bfin-rtems4.11-gcc.spec.diff?r1=text&tr1=1.58&r2=text&tr2=1.59&diff_format=h">M</a></td><td width='1%'>1.59</td><td width='100%'>contrib/crossrpms/rtems4.11/bfin/rtems-4.11-bfin-rtems4.11-gcc.spec</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/contrib/crossrpms/rtems4.11/h8300/rtems-4.11-h8300-rtems4.11-gcc.spec.diff?r1=text&tr1=1.58&r2=text&tr2=1.59&diff_format=h">M</a></td><td width='1%'>1.59</td><td width='100%'>contrib/crossrpms/rtems4.11/h8300/rtems-4.11-h8300-rtems4.11-gcc.spec</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/contrib/crossrpms/rtems4.11/i386/rtems-4.11-i386-rtems4.11-gcc.spec.diff?r1=text&tr1=1.57&r2=text&tr2=1.58&diff_format=h">M</a></td><td width='1%'>1.58</td><td width='100%'>contrib/crossrpms/rtems4.11/i386/rtems-4.11-i386-rtems4.11-gcc.spec</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/contrib/crossrpms/rtems4.11/lm32/rtems-4.11-lm32-rtems4.11-gcc.spec.diff?r1=text&tr1=1.58&r2=text&tr2=1.59&diff_format=h">M</a></td><td width='1%'>1.59</td><td width='100%'>contrib/crossrpms/rtems4.11/lm32/rtems-4.11-lm32-rtems4.11-gcc.spec</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/contrib/crossrpms/rtems4.11/m32c/rtems-4.11-m32c-rtems4.11-gcc.spec.diff?r1=text&tr1=1.55&r2=text&tr2=1.56&diff_format=h">M</a></td><td width='1%'>1.56</td><td width='100%'>contrib/crossrpms/rtems4.11/m32c/rtems-4.11-m32c-rtems4.11-gcc.spec</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/contrib/crossrpms/rtems4.11/m32r/rtems-4.11-m32r-rtems4.11-gcc.spec.diff?r1=text&tr1=1.54&r2=text&tr2=1.55&diff_format=h">M</a></td><td width='1%'>1.55</td><td width='100%'>contrib/crossrpms/rtems4.11/m32r/rtems-4.11-m32r-rtems4.11-gcc.spec</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/contrib/crossrpms/rtems4.11/m68k/rtems-4.11-m68k-rtems4.11-gcc.spec.diff?r1=text&tr1=1.57&r2=text&tr2=1.58&diff_format=h">M</a></td><td width='1%'>1.58</td><td width='100%'>contrib/crossrpms/rtems4.11/m68k/rtems-4.11-m68k-rtems4.11-gcc.spec</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/contrib/crossrpms/rtems4.11/mips/rtems-4.11-mips-rtems4.11-gcc.spec.diff?r1=text&tr1=1.57&r2=text&tr2=1.58&diff_format=h">M</a></td><td width='1%'>1.58</td><td width='100%'>contrib/crossrpms/rtems4.11/mips/rtems-4.11-mips-rtems4.11-gcc.spec</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/contrib/crossrpms/rtems4.11/powerpc/rtems-4.11-powerpc-rtems4.11-gcc.spec.diff?r1=text&tr1=1.57&r2=text&tr2=1.58&diff_format=h">M</a></td><td width='1%'>1.58</td><td width='100%'>contrib/crossrpms/rtems4.11/powerpc/rtems-4.11-powerpc-rtems4.11-gcc.spec</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/contrib/crossrpms/rtems4.11/sh/rtems-4.11-sh-rtems4.11-gcc.spec.diff?r1=text&tr1=1.57&r2=text&tr2=1.58&diff_format=h">M</a></td><td width='1%'>1.58</td><td width='100%'>contrib/crossrpms/rtems4.11/sh/rtems-4.11-sh-rtems4.11-gcc.spec</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/contrib/crossrpms/rtems4.11/sparc/rtems-4.11-sparc-rtems4.11-gcc.spec.diff?r1=text&tr1=1.60&r2=text&tr2=1.61&diff_format=h">M</a></td><td width='1%'>1.61</td><td width='100%'>contrib/crossrpms/rtems4.11/sparc/rtems-4.11-sparc-rtems4.11-gcc.spec</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/contrib/crossrpms/rtems4.11/sparc64/rtems-4.11-sparc64-rtems4.11-gcc.spec.diff?r1=text&tr1=1.42&r2=text&tr2=1.43&diff_format=h">M</a></td><td width='1%'>1.43</td><td width='100%'>contrib/crossrpms/rtems4.11/sparc64/rtems-4.11-sparc64-rtems4.11-gcc.spec</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/contrib/crossrpms/rtems4.11/arm-eabi/rtems-4.11-arm-rtemseabi4.11-gcc.spec:1.6 rtems/contrib/crossrpms/rtems4.11/arm-eabi/rtems-4.11-arm-rtemseabi4.11-gcc.spec:1.7
--- rtems/contrib/crossrpms/rtems4.11/arm-eabi/rtems-4.11-arm-rtemseabi4.11-gcc.spec:1.6        Wed Jul 20 01:46:47 2011
+++ rtems/contrib/crossrpms/rtems4.11/arm-eabi/rtems-4.11-arm-rtemseabi4.11-gcc.spec    Sun Jul 24 09:17:54 2011
</font><font color='#997700'>@@ -58,7 +58,7 @@
</font> 
 Group: <span style="background-color: #FF0000">      </span>     Development/Tools
 Version:        %{gcc_rpmvers}
<font color='#880000'>-Release:<span style="background-color: #FF0000">      </span>        4%{?dist}
</font><font color='#000088'>+Release:<span style="background-color: #FF0000">      </span>   5%{?dist}
</font> License:<span style="background-color: #FF0000">      </span>       GPL
 URL:           http://gcc.gnu.org
 BuildRoot:     %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
<font color='#997700'>@@ -82,6 +82,9 @@
</font> # Should be applicable to gcc >= 4.5.0
 %bcond_with gcc_stdint
 
<font color='#000088'>+# EXPERIMENTAL: Enable newlib's iconv
+%bcond_without iconv
+
</font> # versions of libraries, we conditionally bundle if necessary
 %global mpc_version    0.8.1
 %global mpfr_version   2.4.2
<font color='#997700'>@@ -107,12 +110,6 @@
</font> %global gmp_provided 4.3.1
 %endif
 
<font color='#880000'>-%if 0%{?fc13}
-%global mpc_provided 0.8.1
-%global mpfr_provided 2.4.2
-%global gmp_provided 4.3.1
-%endif
-
</font> %if 0%{?el6}
 %global mpc_provided %{nil}
 %global mpfr_provided 2.4.1
<font color='#997700'>@@ -209,7 +206,6 @@
</font> 
 
 %if %{defined cloog_required}
<font color='#880000'>-%{?fc13:BuildRequires: cloog-ppl-devel >= %cloog_required}
</font> %{?fc14:BuildRequires: cloog-ppl-devel >= %cloog_required}
 %{?fc15:BuildRequires: cloog-ppl-devel >= %cloog_required}
 %{?fc16:BuildRequires: cloog-ppl-devel >= %cloog_required}
<font color='#997700'>@@ -245,7 +241,7 @@
</font> Requires: rtems-4.11-gcc-common
 Requires:      rtems-4.11-arm-rtemseabi4.11-binutils
 Requires:      rtems-4.11-arm-rtemseabi4.11-gcc-libgcc = %{gcc_rpmvers}-%{release}
<font color='#880000'>-Requires:  rtems-4.11-arm-rtemseabi4.11-newlib = %{newlib_version}-14%{?dist}
</font><font color='#000088'>+Requires:     rtems-4.11-arm-rtemseabi4.11-newlib = %{newlib_version}-15%{?dist}
</font> 
 %if "%{gcc_version}" >= "4.5.0"
 BuildRequires:  zlib-devel
<font color='#997700'>@@ -276,7 +272,7 @@
</font> 
 %if "%{newlib_version}" == "1.19.0"
 Source50:      ftp://sources.redhat.com/pub/newlib/newlib-%{newlib_pkgvers}.tar.gz
<font color='#880000'>-Patch50:   ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/newlib-1.19.0-rtems4.11-20110720.diff
</font><font color='#000088'>+Patch50:      ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/newlib-1.19.0-rtems4.11-20110724.diff
</font> %endif
 
 %if 0%{?_build_mpfr}
<font color='#997700'>@@ -360,7 +356,7 @@
</font>   ln -s ../libelf-%{libelf_version} gcc-%{gcc_pkgvers}/libelf
 %endif
 
<font color='#880000'>-echo "RTEMS gcc-%{gcc_version}-4%{?dist}/newlib-%{newlib_version}-14%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE
</font><font color='#000088'>+echo "RTEMS gcc-%{gcc_version}-5%{?dist}/newlib-%{newlib_version}-15%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE
</font> 
 
   # Fix timestamps
<font color='#997700'>@@ -405,6 +401,7 @@
</font>     %{?with_lto:--enable-lto}%{!?with_lto:--disable-lto} \
     %{?with_plugin:--enable-plugin}%{!?with_plugin:--disable-plugin} \
     --enable-newlib-io-c99-formats \
<font color='#000088'>+    %{?with_iconv:--enable-newlib-iconv} \
</font>     --enable-languages="$languages"
 
 %if "%_host" != "%_build"
<font color='#997700'>@@ -473,13 +470,20 @@
</font>     rmdir ${RPM_BUILD_ROOT}%{_prefix}/arm-rtemseabi4.11/include/bits
   fi
 
<font color='#880000'>-  # gcc >= 4.5.0: installs weird libstdc++ python bindings.
</font><font color='#000088'>+%if %{with iconv}
+  # Iconv enabled newlib installs external ccts (target files)
+  if test -d ${RPM_BUILD_ROOT}%{_datadir}/iconv_data; then
+    rm -rf ${RPM_BUILD_ROOT}%{_datadir}/iconv_data
+  fi
+%endif
+
</font> %if ! %{with pygdb}
<font color='#000088'>+  # gcc >= 4.5.0: installs weird libstdc++ python bindings.
</font>   if test -d ${RPM_BUILD_ROOT}%{_datadir}/gcc-%{gcc_version}/python; then
     rm -rf ${RPM_BUILD_ROOT}%{_datadir}/gcc-%{gcc_version}/python/libstdcxx
   fi
<font color='#880000'>-%endif
</font> 
<font color='#000088'>+%endif
</font>   # Collect multilib subdirectories
   multilibs=`build/gcc/xgcc -Bbuild/gcc/ --print-multi-lib | sed -e 's,;.*$,,'`
 
<font color='#997700'>@@ -637,7 +641,7 @@
</font> # Group:          Development/Tools
 # Version:        %{gcc_rpmvers}
 # Requires:       rtems-4.11-arm-rtemseabi4.11-binutils
<font color='#880000'>-# Requires:       rtems-4.11-arm-rtemseabi4.11-newlib = %{newlib_version}-14%{?dist}
</font><font color='#000088'>+# Requires:       rtems-4.11-arm-rtemseabi4.11-newlib = %{newlib_version}-15%{?dist}
</font> # License:        GPL
 
 # %if %build_infos
<font color='#997700'>@@ -655,7 +659,7 @@
</font> Group:          Development/Tools
 Version:        %{gcc_rpmvers}
 %{?_with_noarch_subpackages:BuildArch: noarch}
<font color='#880000'>-Requires:       rtems-4.11-arm-rtemseabi4.11-newlib = %{newlib_version}-14%{?dist}
</font><font color='#000088'>+Requires:       rtems-4.11-arm-rtemseabi4.11-newlib = %{newlib_version}-15%{?dist}
</font> License:  GPL
 
 %description -n rtems-4.11-arm-rtemseabi4.11-gcc-libgcc
<font color='#997700'>@@ -834,7 +838,7 @@
</font> Group:<span style="background-color: #FF0000"> </span>              Development/Tools
 License:       Distributable
 Version:       %{newlib_version}
<font color='#880000'>-Release:        14%{?dist}
</font><font color='#000088'>+Release:        15%{?dist}
</font> %{?_with_noarch_subpackages:BuildArch: noarch}
 
 Requires:      rtems-4.11-newlib-common
<font color='#997700'>@@ -855,7 +859,7 @@
</font> Summary:  Base package for RTEMS newlib C Library
 Group:          Development/Tools
 Version:        %{newlib_version}
<font color='#880000'>-Release:        14%{?dist}
</font><font color='#000088'>+Release:        15%{?dist}
</font> %{?_with_noarch_subpackages:BuildArch: noarch}
 License:       Distributable
 

<font color='#006600'>diff -u rtems/contrib/crossrpms/rtems4.11/arm/rtems-4.11-arm-rtems4.11-gcc.spec:1.56 rtems/contrib/crossrpms/rtems4.11/arm/rtems-4.11-arm-rtems4.11-gcc.spec:1.57
--- rtems/contrib/crossrpms/rtems4.11/arm/rtems-4.11-arm-rtems4.11-gcc.spec:1.56        Wed Jul 20 01:46:47 2011
+++ rtems/contrib/crossrpms/rtems4.11/arm/rtems-4.11-arm-rtems4.11-gcc.spec     Sun Jul 24 09:17:54 2011
</font><font color='#997700'>@@ -58,7 +58,7 @@
</font> 
 Group: <span style="background-color: #FF0000">      </span>     Development/Tools
 Version:        %{gcc_rpmvers}
<font color='#880000'>-Release:<span style="background-color: #FF0000">      </span>        4%{?dist}
</font><font color='#000088'>+Release:<span style="background-color: #FF0000">      </span>   5%{?dist}
</font> License:<span style="background-color: #FF0000">      </span>       GPL
 URL:           http://gcc.gnu.org
 BuildRoot:     %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
<font color='#997700'>@@ -82,6 +82,9 @@
</font> # Should be applicable to gcc >= 4.5.0
 %bcond_with gcc_stdint
 
<font color='#000088'>+# EXPERIMENTAL: Enable newlib's iconv
+%bcond_without iconv
+
</font> # versions of libraries, we conditionally bundle if necessary
 %global mpc_version    0.8.1
 %global mpfr_version   2.4.2
<font color='#997700'>@@ -107,12 +110,6 @@
</font> %global gmp_provided 4.3.1
 %endif
 
<font color='#880000'>-%if 0%{?fc13}
-%global mpc_provided 0.8.1
-%global mpfr_provided 2.4.2
-%global gmp_provided 4.3.1
-%endif
-
</font> %if 0%{?el6}
 %global mpc_provided %{nil}
 %global mpfr_provided 2.4.1
<font color='#997700'>@@ -209,7 +206,6 @@
</font> 
 
 %if %{defined cloog_required}
<font color='#880000'>-%{?fc13:BuildRequires: cloog-ppl-devel >= %cloog_required}
</font> %{?fc14:BuildRequires: cloog-ppl-devel >= %cloog_required}
 %{?fc15:BuildRequires: cloog-ppl-devel >= %cloog_required}
 %{?fc16:BuildRequires: cloog-ppl-devel >= %cloog_required}
<font color='#997700'>@@ -245,7 +241,7 @@
</font> Requires: rtems-4.11-gcc-common
 Requires:      rtems-4.11-arm-rtems4.11-binutils
 Requires:      rtems-4.11-arm-rtems4.11-gcc-libgcc = %{gcc_rpmvers}-%{release}
<font color='#880000'>-Requires:  rtems-4.11-arm-rtems4.11-newlib = %{newlib_version}-14%{?dist}
</font><font color='#000088'>+Requires:     rtems-4.11-arm-rtems4.11-newlib = %{newlib_version}-15%{?dist}
</font> 
 %if "%{gcc_version}" >= "4.5.0"
 BuildRequires:  zlib-devel
<font color='#997700'>@@ -276,7 +272,7 @@
</font> 
 %if "%{newlib_version}" == "1.19.0"
 Source50:      ftp://sources.redhat.com/pub/newlib/newlib-%{newlib_pkgvers}.tar.gz
<font color='#880000'>-Patch50:   ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/newlib-1.19.0-rtems4.11-20110720.diff
</font><font color='#000088'>+Patch50:      ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/newlib-1.19.0-rtems4.11-20110724.diff
</font> %endif
 
 %if 0%{?_build_mpfr}
<font color='#997700'>@@ -360,7 +356,7 @@
</font>   ln -s ../libelf-%{libelf_version} gcc-%{gcc_pkgvers}/libelf
 %endif
 
<font color='#880000'>-echo "RTEMS gcc-%{gcc_version}-4%{?dist}/newlib-%{newlib_version}-14%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE
</font><font color='#000088'>+echo "RTEMS gcc-%{gcc_version}-5%{?dist}/newlib-%{newlib_version}-15%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE
</font> 
 
   # Fix timestamps
<font color='#997700'>@@ -405,6 +401,7 @@
</font>     %{?with_lto:--enable-lto}%{!?with_lto:--disable-lto} \
     %{?with_plugin:--enable-plugin}%{!?with_plugin:--disable-plugin} \
     --enable-newlib-io-c99-formats \
<font color='#000088'>+    %{?with_iconv:--enable-newlib-iconv} \
</font>     --enable-languages="$languages"
 
 %if "%_host" != "%_build"
<font color='#997700'>@@ -473,13 +470,20 @@
</font>     rmdir ${RPM_BUILD_ROOT}%{_prefix}/arm-rtems4.11/include/bits
   fi
 
<font color='#880000'>-  # gcc >= 4.5.0: installs weird libstdc++ python bindings.
</font><font color='#000088'>+%if %{with iconv}
+  # Iconv enabled newlib installs external ccts (target files)
+  if test -d ${RPM_BUILD_ROOT}%{_datadir}/iconv_data; then
+    rm -rf ${RPM_BUILD_ROOT}%{_datadir}/iconv_data
+  fi
+%endif
+
</font> %if ! %{with pygdb}
<font color='#000088'>+  # gcc >= 4.5.0: installs weird libstdc++ python bindings.
</font>   if test -d ${RPM_BUILD_ROOT}%{_datadir}/gcc-%{gcc_version}/python; then
     rm -rf ${RPM_BUILD_ROOT}%{_datadir}/gcc-%{gcc_version}/python/libstdcxx
   fi
<font color='#880000'>-%endif
</font> 
<font color='#000088'>+%endif
</font>   # Collect multilib subdirectories
   multilibs=`build/gcc/xgcc -Bbuild/gcc/ --print-multi-lib | sed -e 's,;.*$,,'`
 
<font color='#997700'>@@ -637,7 +641,7 @@
</font> # Group:          Development/Tools
 # Version:        %{gcc_rpmvers}
 # Requires:       rtems-4.11-arm-rtems4.11-binutils
<font color='#880000'>-# Requires:       rtems-4.11-arm-rtems4.11-newlib = %{newlib_version}-14%{?dist}
</font><font color='#000088'>+# Requires:       rtems-4.11-arm-rtems4.11-newlib = %{newlib_version}-15%{?dist}
</font> # License:        GPL
 
 # %if %build_infos
<font color='#997700'>@@ -655,7 +659,7 @@
</font> Group:          Development/Tools
 Version:        %{gcc_rpmvers}
 %{?_with_noarch_subpackages:BuildArch: noarch}
<font color='#880000'>-Requires:       rtems-4.11-arm-rtems4.11-newlib = %{newlib_version}-14%{?dist}
</font><font color='#000088'>+Requires:       rtems-4.11-arm-rtems4.11-newlib = %{newlib_version}-15%{?dist}
</font> License:  GPL
 
 %description -n rtems-4.11-arm-rtems4.11-gcc-libgcc
<font color='#997700'>@@ -834,7 +838,7 @@
</font> Group:<span style="background-color: #FF0000"> </span>              Development/Tools
 License:       Distributable
 Version:       %{newlib_version}
<font color='#880000'>-Release:        14%{?dist}
</font><font color='#000088'>+Release:        15%{?dist}
</font> %{?_with_noarch_subpackages:BuildArch: noarch}
 
 Requires:      rtems-4.11-newlib-common
<font color='#997700'>@@ -855,7 +859,7 @@
</font> Summary:  Base package for RTEMS newlib C Library
 Group:          Development/Tools
 Version:        %{newlib_version}
<font color='#880000'>-Release:        14%{?dist}
</font><font color='#000088'>+Release:        15%{?dist}
</font> %{?_with_noarch_subpackages:BuildArch: noarch}
 License:       Distributable
 

<font color='#006600'>diff -u rtems/contrib/crossrpms/rtems4.11/avr/rtems-4.11-avr-rtems4.11-gcc.spec:1.55 rtems/contrib/crossrpms/rtems4.11/avr/rtems-4.11-avr-rtems4.11-gcc.spec:1.56
--- rtems/contrib/crossrpms/rtems4.11/avr/rtems-4.11-avr-rtems4.11-gcc.spec:1.55        Wed Jul 20 01:46:47 2011
+++ rtems/contrib/crossrpms/rtems4.11/avr/rtems-4.11-avr-rtems4.11-gcc.spec     Sun Jul 24 09:17:54 2011
</font><font color='#997700'>@@ -58,7 +58,7 @@
</font> 
 Group: <span style="background-color: #FF0000">      </span>     Development/Tools
 Version:        %{gcc_rpmvers}
<font color='#880000'>-Release:<span style="background-color: #FF0000">      </span>        4%{?dist}
</font><font color='#000088'>+Release:<span style="background-color: #FF0000">      </span>   5%{?dist}
</font> License:<span style="background-color: #FF0000">      </span>       GPL
 URL:           http://gcc.gnu.org
 BuildRoot:     %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
<font color='#997700'>@@ -82,6 +82,9 @@
</font> # Should be applicable to gcc >= 4.5.0
 %bcond_with gcc_stdint
 
<font color='#000088'>+# EXPERIMENTAL: Enable newlib's iconv
+%bcond_without iconv
+
</font> # versions of libraries, we conditionally bundle if necessary
 %global mpc_version    0.8.1
 %global mpfr_version   2.4.2
<font color='#997700'>@@ -107,12 +110,6 @@
</font> %global gmp_provided 4.3.1
 %endif
 
<font color='#880000'>-%if 0%{?fc13}
-%global mpc_provided 0.8.1
-%global mpfr_provided 2.4.2
-%global gmp_provided 4.3.1
-%endif
-
</font> %if 0%{?el6}
 %global mpc_provided %{nil}
 %global mpfr_provided 2.4.1
<font color='#997700'>@@ -209,7 +206,6 @@
</font> 
 
 %if %{defined cloog_required}
<font color='#880000'>-%{?fc13:BuildRequires: cloog-ppl-devel >= %cloog_required}
</font> %{?fc14:BuildRequires: cloog-ppl-devel >= %cloog_required}
 %{?fc15:BuildRequires: cloog-ppl-devel >= %cloog_required}
 %{?fc16:BuildRequires: cloog-ppl-devel >= %cloog_required}
<font color='#997700'>@@ -245,7 +241,7 @@
</font> Requires: rtems-4.11-gcc-common
 Requires:      rtems-4.11-avr-rtems4.11-binutils
 Requires:      rtems-4.11-avr-rtems4.11-gcc-libgcc = %{gcc_rpmvers}-%{release}
<font color='#880000'>-Requires:  rtems-4.11-avr-rtems4.11-newlib = %{newlib_version}-14%{?dist}
</font><font color='#000088'>+Requires:     rtems-4.11-avr-rtems4.11-newlib = %{newlib_version}-15%{?dist}
</font> 
 %if "%{gcc_version}" >= "4.5.0"
 BuildRequires:  zlib-devel
<font color='#997700'>@@ -268,7 +264,7 @@
</font> 
 %if "%{newlib_version}" == "1.19.0"
 Source50:      ftp://sources.redhat.com/pub/newlib/newlib-%{newlib_pkgvers}.tar.gz
<font color='#880000'>-Patch50:   ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/newlib-1.19.0-rtems4.11-20110720.diff
</font><font color='#000088'>+Patch50:      ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/newlib-1.19.0-rtems4.11-20110724.diff
</font> %endif
 
 %if 0%{?_build_mpfr}
<font color='#997700'>@@ -348,7 +344,7 @@
</font>   ln -s ../libelf-%{libelf_version} gcc-%{gcc_pkgvers}/libelf
 %endif
 
<font color='#880000'>-echo "RTEMS gcc-%{gcc_version}-4%{?dist}/newlib-%{newlib_version}-14%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE
</font><font color='#000088'>+echo "RTEMS gcc-%{gcc_version}-5%{?dist}/newlib-%{newlib_version}-15%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE
</font> 
 
   # Fix timestamps
<font color='#997700'>@@ -392,6 +388,7 @@
</font>     %{?with_lto:--enable-lto}%{!?with_lto:--disable-lto} \
     %{?with_plugin:--enable-plugin}%{!?with_plugin:--disable-plugin} \
     --enable-newlib-io-c99-formats \
<font color='#000088'>+    %{?with_iconv:--enable-newlib-iconv} \
</font>     --enable-languages="$languages"
 
 %if "%_host" != "%_build"
<font color='#997700'>@@ -460,13 +457,20 @@
</font>     rmdir ${RPM_BUILD_ROOT}%{_prefix}/avr-rtems4.11/include/bits
   fi
 
<font color='#880000'>-  # gcc >= 4.5.0: installs weird libstdc++ python bindings.
</font><font color='#000088'>+%if %{with iconv}
+  # Iconv enabled newlib installs external ccts (target files)
+  if test -d ${RPM_BUILD_ROOT}%{_datadir}/iconv_data; then
+    rm -rf ${RPM_BUILD_ROOT}%{_datadir}/iconv_data
+  fi
+%endif
+
</font> %if ! %{with pygdb}
<font color='#000088'>+  # gcc >= 4.5.0: installs weird libstdc++ python bindings.
</font>   if test -d ${RPM_BUILD_ROOT}%{_datadir}/gcc-%{gcc_version}/python; then
     rm -rf ${RPM_BUILD_ROOT}%{_datadir}/gcc-%{gcc_version}/python/libstdcxx
   fi
<font color='#880000'>-%endif
</font> 
<font color='#000088'>+%endif
</font>   # Collect multilib subdirectories
   multilibs=`build/gcc/xgcc -Bbuild/gcc/ --print-multi-lib | sed -e 's,;.*$,,'`
 
<font color='#997700'>@@ -624,7 +628,7 @@
</font> # Group:          Development/Tools
 # Version:        %{gcc_rpmvers}
 # Requires:       rtems-4.11-avr-rtems4.11-binutils
<font color='#880000'>-# Requires:       rtems-4.11-avr-rtems4.11-newlib = %{newlib_version}-14%{?dist}
</font><font color='#000088'>+# Requires:       rtems-4.11-avr-rtems4.11-newlib = %{newlib_version}-15%{?dist}
</font> # License:        GPL
 
 # %if %build_infos
<font color='#997700'>@@ -642,7 +646,7 @@
</font> Group:          Development/Tools
 Version:        %{gcc_rpmvers}
 %{?_with_noarch_subpackages:BuildArch: noarch}
<font color='#880000'>-Requires:       rtems-4.11-avr-rtems4.11-newlib = %{newlib_version}-14%{?dist}
</font><font color='#000088'>+Requires:       rtems-4.11-avr-rtems4.11-newlib = %{newlib_version}-15%{?dist}
</font> License:  GPL
 
 %description -n rtems-4.11-avr-rtems4.11-gcc-libgcc
<font color='#997700'>@@ -760,7 +764,7 @@
</font> Group:<span style="background-color: #FF0000"> </span>              Development/Tools
 License:       Distributable
 Version:       %{newlib_version}
<font color='#880000'>-Release:        14%{?dist}
</font><font color='#000088'>+Release:        15%{?dist}
</font> %{?_with_noarch_subpackages:BuildArch: noarch}
 
 Requires:      rtems-4.11-newlib-common
<font color='#997700'>@@ -781,7 +785,7 @@
</font> Summary:  Base package for RTEMS newlib C Library
 Group:          Development/Tools
 Version:        %{newlib_version}
<font color='#880000'>-Release:        14%{?dist}
</font><font color='#000088'>+Release:        15%{?dist}
</font> %{?_with_noarch_subpackages:BuildArch: noarch}
 License:       Distributable
 

<font color='#006600'>diff -u rtems/contrib/crossrpms/rtems4.11/bfin/rtems-4.11-bfin-rtems4.11-gcc.spec:1.58 rtems/contrib/crossrpms/rtems4.11/bfin/rtems-4.11-bfin-rtems4.11-gcc.spec:1.59
--- rtems/contrib/crossrpms/rtems4.11/bfin/rtems-4.11-bfin-rtems4.11-gcc.spec:1.58      Wed Jul 20 01:46:47 2011
+++ rtems/contrib/crossrpms/rtems4.11/bfin/rtems-4.11-bfin-rtems4.11-gcc.spec   Sun Jul 24 09:17:54 2011
</font><font color='#997700'>@@ -58,7 +58,7 @@
</font> 
 Group: <span style="background-color: #FF0000">      </span>     Development/Tools
 Version:        %{gcc_rpmvers}
<font color='#880000'>-Release:<span style="background-color: #FF0000">      </span>        4%{?dist}
</font><font color='#000088'>+Release:<span style="background-color: #FF0000">      </span>   5%{?dist}
</font> License:<span style="background-color: #FF0000">      </span>       GPL
 URL:           http://gcc.gnu.org
 BuildRoot:     %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
<font color='#997700'>@@ -82,6 +82,9 @@
</font> # Should be applicable to gcc >= 4.5.0
 %bcond_with gcc_stdint
 
<font color='#000088'>+# EXPERIMENTAL: Enable newlib's iconv
+%bcond_without iconv
+
</font> # versions of libraries, we conditionally bundle if necessary
 %global mpc_version    0.8.1
 %global mpfr_version   2.4.2
<font color='#997700'>@@ -107,12 +110,6 @@
</font> %global gmp_provided 4.3.1
 %endif
 
<font color='#880000'>-%if 0%{?fc13}
-%global mpc_provided 0.8.1
-%global mpfr_provided 2.4.2
-%global gmp_provided 4.3.1
-%endif
-
</font> %if 0%{?el6}
 %global mpc_provided %{nil}
 %global mpfr_provided 2.4.1
<font color='#997700'>@@ -209,7 +206,6 @@
</font> 
 
 %if %{defined cloog_required}
<font color='#880000'>-%{?fc13:BuildRequires: cloog-ppl-devel >= %cloog_required}
</font> %{?fc14:BuildRequires: cloog-ppl-devel >= %cloog_required}
 %{?fc15:BuildRequires: cloog-ppl-devel >= %cloog_required}
 %{?fc16:BuildRequires: cloog-ppl-devel >= %cloog_required}
<font color='#997700'>@@ -245,7 +241,7 @@
</font> Requires: rtems-4.11-gcc-common
 Requires:      rtems-4.11-bfin-rtems4.11-binutils
 Requires:      rtems-4.11-bfin-rtems4.11-gcc-libgcc = %{gcc_rpmvers}-%{release}
<font color='#880000'>-Requires:  rtems-4.11-bfin-rtems4.11-newlib = %{newlib_version}-14%{?dist}
</font><font color='#000088'>+Requires:     rtems-4.11-bfin-rtems4.11-newlib = %{newlib_version}-15%{?dist}
</font> 
 %if "%{gcc_version}" >= "4.5.0"
 BuildRequires:  zlib-devel
<font color='#997700'>@@ -276,7 +272,7 @@
</font> 
 %if "%{newlib_version}" == "1.19.0"
 Source50:      ftp://sources.redhat.com/pub/newlib/newlib-%{newlib_pkgvers}.tar.gz
<font color='#880000'>-Patch50:   ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/newlib-1.19.0-rtems4.11-20110720.diff
</font><font color='#000088'>+Patch50:      ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/newlib-1.19.0-rtems4.11-20110724.diff
</font> %endif
 
 %if 0%{?_build_mpfr}
<font color='#997700'>@@ -360,7 +356,7 @@
</font>   ln -s ../libelf-%{libelf_version} gcc-%{gcc_pkgvers}/libelf
 %endif
 
<font color='#880000'>-echo "RTEMS gcc-%{gcc_version}-4%{?dist}/newlib-%{newlib_version}-14%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE
</font><font color='#000088'>+echo "RTEMS gcc-%{gcc_version}-5%{?dist}/newlib-%{newlib_version}-15%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE
</font> 
 
   # Fix timestamps
<font color='#997700'>@@ -405,6 +401,7 @@
</font>     %{?with_lto:--enable-lto}%{!?with_lto:--disable-lto} \
     %{?with_plugin:--enable-plugin}%{!?with_plugin:--disable-plugin} \
     --enable-newlib-io-c99-formats \
<font color='#000088'>+    %{?with_iconv:--enable-newlib-iconv} \
</font>     --enable-languages="$languages"
 
 %if "%_host" != "%_build"
<font color='#997700'>@@ -473,13 +470,20 @@
</font>     rmdir ${RPM_BUILD_ROOT}%{_prefix}/bfin-rtems4.11/include/bits
   fi
 
<font color='#880000'>-  # gcc >= 4.5.0: installs weird libstdc++ python bindings.
</font><font color='#000088'>+%if %{with iconv}
+  # Iconv enabled newlib installs external ccts (target files)
+  if test -d ${RPM_BUILD_ROOT}%{_datadir}/iconv_data; then
+    rm -rf ${RPM_BUILD_ROOT}%{_datadir}/iconv_data
+  fi
+%endif
+
</font> %if ! %{with pygdb}
<font color='#000088'>+  # gcc >= 4.5.0: installs weird libstdc++ python bindings.
</font>   if test -d ${RPM_BUILD_ROOT}%{_datadir}/gcc-%{gcc_version}/python; then
     rm -rf ${RPM_BUILD_ROOT}%{_datadir}/gcc-%{gcc_version}/python/libstdcxx
   fi
<font color='#880000'>-%endif
</font> 
<font color='#000088'>+%endif
</font>   # Collect multilib subdirectories
   multilibs=`build/gcc/xgcc -Bbuild/gcc/ --print-multi-lib | sed -e 's,;.*$,,'`
 
<font color='#997700'>@@ -637,7 +641,7 @@
</font> # Group:          Development/Tools
 # Version:        %{gcc_rpmvers}
 # Requires:       rtems-4.11-bfin-rtems4.11-binutils
<font color='#880000'>-# Requires:       rtems-4.11-bfin-rtems4.11-newlib = %{newlib_version}-14%{?dist}
</font><font color='#000088'>+# Requires:       rtems-4.11-bfin-rtems4.11-newlib = %{newlib_version}-15%{?dist}
</font> # License:        GPL
 
 # %if %build_infos
<font color='#997700'>@@ -655,7 +659,7 @@
</font> Group:          Development/Tools
 Version:        %{gcc_rpmvers}
 %{?_with_noarch_subpackages:BuildArch: noarch}
<font color='#880000'>-Requires:       rtems-4.11-bfin-rtems4.11-newlib = %{newlib_version}-14%{?dist}
</font><font color='#000088'>+Requires:       rtems-4.11-bfin-rtems4.11-newlib = %{newlib_version}-15%{?dist}
</font> License:  GPL
 
 %description -n rtems-4.11-bfin-rtems4.11-gcc-libgcc
<font color='#997700'>@@ -833,7 +837,7 @@
</font> Group:<span style="background-color: #FF0000"> </span>              Development/Tools
 License:       Distributable
 Version:       %{newlib_version}
<font color='#880000'>-Release:        14%{?dist}
</font><font color='#000088'>+Release:        15%{?dist}
</font> %{?_with_noarch_subpackages:BuildArch: noarch}
 
 Requires:      rtems-4.11-newlib-common
<font color='#997700'>@@ -854,7 +858,7 @@
</font> Summary:  Base package for RTEMS newlib C Library
 Group:          Development/Tools
 Version:        %{newlib_version}
<font color='#880000'>-Release:        14%{?dist}
</font><font color='#000088'>+Release:        15%{?dist}
</font> %{?_with_noarch_subpackages:BuildArch: noarch}
 License:       Distributable
 

<font color='#006600'>diff -u rtems/contrib/crossrpms/rtems4.11/h8300/rtems-4.11-h8300-rtems4.11-gcc.spec:1.58 rtems/contrib/crossrpms/rtems4.11/h8300/rtems-4.11-h8300-rtems4.11-gcc.spec:1.59
--- rtems/contrib/crossrpms/rtems4.11/h8300/rtems-4.11-h8300-rtems4.11-gcc.spec:1.58    Wed Jul 20 01:46:47 2011
+++ rtems/contrib/crossrpms/rtems4.11/h8300/rtems-4.11-h8300-rtems4.11-gcc.spec Sun Jul 24 09:17:54 2011
</font><font color='#997700'>@@ -58,7 +58,7 @@
</font> 
 Group: <span style="background-color: #FF0000">      </span>     Development/Tools
 Version:        %{gcc_rpmvers}
<font color='#880000'>-Release:<span style="background-color: #FF0000">      </span>        4%{?dist}
</font><font color='#000088'>+Release:<span style="background-color: #FF0000">      </span>   5%{?dist}
</font> License:<span style="background-color: #FF0000">      </span>       GPL
 URL:           http://gcc.gnu.org
 BuildRoot:     %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
<font color='#997700'>@@ -82,6 +82,9 @@
</font> # Should be applicable to gcc >= 4.5.0
 %bcond_with gcc_stdint
 
<font color='#000088'>+# EXPERIMENTAL: Enable newlib's iconv
+%bcond_without iconv
+
</font> # versions of libraries, we conditionally bundle if necessary
 %global mpc_version    0.8.1
 %global mpfr_version   2.4.2
<font color='#997700'>@@ -107,12 +110,6 @@
</font> %global gmp_provided 4.3.1
 %endif
 
<font color='#880000'>-%if 0%{?fc13}
-%global mpc_provided 0.8.1
-%global mpfr_provided 2.4.2
-%global gmp_provided 4.3.1
-%endif
-
</font> %if 0%{?el6}
 %global mpc_provided %{nil}
 %global mpfr_provided 2.4.1
<font color='#997700'>@@ -209,7 +206,6 @@
</font> 
 
 %if %{defined cloog_required}
<font color='#880000'>-%{?fc13:BuildRequires: cloog-ppl-devel >= %cloog_required}
</font> %{?fc14:BuildRequires: cloog-ppl-devel >= %cloog_required}
 %{?fc15:BuildRequires: cloog-ppl-devel >= %cloog_required}
 %{?fc16:BuildRequires: cloog-ppl-devel >= %cloog_required}
<font color='#997700'>@@ -245,7 +241,7 @@
</font> Requires: rtems-4.11-gcc-common
 Requires:      rtems-4.11-h8300-rtems4.11-binutils
 Requires:      rtems-4.11-h8300-rtems4.11-gcc-libgcc = %{gcc_rpmvers}-%{release}
<font color='#880000'>-Requires:  rtems-4.11-h8300-rtems4.11-newlib = %{newlib_version}-11%{?dist}
</font><font color='#000088'>+Requires:     rtems-4.11-h8300-rtems4.11-newlib = %{newlib_version}-12%{?dist}
</font> 
 %if "%{gcc_version}" >= "4.5.0"
 BuildRequires:  zlib-devel
<font color='#997700'>@@ -276,7 +272,7 @@
</font> 
 %if "%{newlib_version}" == "1.19.0"
 Source50:      ftp://sources.redhat.com/pub/newlib/newlib-%{newlib_pkgvers}.tar.gz
<font color='#880000'>-Patch50:   ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/newlib-1.19.0-rtems4.11-20110720.diff
</font><font color='#000088'>+Patch50:      ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/newlib-1.19.0-rtems4.11-20110724.diff
</font> %endif
 
 %if 0%{?_build_mpfr}
<font color='#997700'>@@ -360,7 +356,7 @@
</font>   ln -s ../libelf-%{libelf_version} gcc-%{gcc_pkgvers}/libelf
 %endif
 
<font color='#880000'>-echo "RTEMS gcc-%{gcc_version}-4%{?dist}/newlib-%{newlib_version}-11%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE
</font><font color='#000088'>+echo "RTEMS gcc-%{gcc_version}-5%{?dist}/newlib-%{newlib_version}-12%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE
</font> 
 
   # Fix timestamps
<font color='#997700'>@@ -405,6 +401,7 @@
</font>     %{?with_lto:--enable-lto}%{!?with_lto:--disable-lto} \
     %{?with_plugin:--enable-plugin}%{!?with_plugin:--disable-plugin} \
     --enable-newlib-io-c99-formats \
<font color='#000088'>+    %{?with_iconv:--enable-newlib-iconv} \
</font>     --enable-languages="$languages"
 
 %if "%_host" != "%_build"
<font color='#997700'>@@ -473,13 +470,20 @@
</font>     rmdir ${RPM_BUILD_ROOT}%{_prefix}/h8300-rtems4.11/include/bits
   fi
 
<font color='#880000'>-  # gcc >= 4.5.0: installs weird libstdc++ python bindings.
</font><font color='#000088'>+%if %{with iconv}
+  # Iconv enabled newlib installs external ccts (target files)
+  if test -d ${RPM_BUILD_ROOT}%{_datadir}/iconv_data; then
+    rm -rf ${RPM_BUILD_ROOT}%{_datadir}/iconv_data
+  fi
+%endif
+
</font> %if ! %{with pygdb}
<font color='#000088'>+  # gcc >= 4.5.0: installs weird libstdc++ python bindings.
</font>   if test -d ${RPM_BUILD_ROOT}%{_datadir}/gcc-%{gcc_version}/python; then
     rm -rf ${RPM_BUILD_ROOT}%{_datadir}/gcc-%{gcc_version}/python/libstdcxx
   fi
<font color='#880000'>-%endif
</font> 
<font color='#000088'>+%endif
</font>   # Collect multilib subdirectories
   multilibs=`build/gcc/xgcc -Bbuild/gcc/ --print-multi-lib | sed -e 's,;.*$,,'`
 
<font color='#997700'>@@ -637,7 +641,7 @@
</font> # Group:          Development/Tools
 # Version:        %{gcc_rpmvers}
 # Requires:       rtems-4.11-h8300-rtems4.11-binutils
<font color='#880000'>-# Requires:       rtems-4.11-h8300-rtems4.11-newlib = %{newlib_version}-11%{?dist}
</font><font color='#000088'>+# Requires:       rtems-4.11-h8300-rtems4.11-newlib = %{newlib_version}-12%{?dist}
</font> # License:        GPL
 
 # %if %build_infos
<font color='#997700'>@@ -655,7 +659,7 @@
</font> Group:          Development/Tools
 Version:        %{gcc_rpmvers}
 %{?_with_noarch_subpackages:BuildArch: noarch}
<font color='#880000'>-Requires:       rtems-4.11-h8300-rtems4.11-newlib = %{newlib_version}-11%{?dist}
</font><font color='#000088'>+Requires:       rtems-4.11-h8300-rtems4.11-newlib = %{newlib_version}-12%{?dist}
</font> License:  GPL
 
 %description -n rtems-4.11-h8300-rtems4.11-gcc-libgcc
<font color='#997700'>@@ -834,7 +838,7 @@
</font> Group:<span style="background-color: #FF0000"> </span>              Development/Tools
 License:       Distributable
 Version:       %{newlib_version}
<font color='#880000'>-Release:        11%{?dist}
</font><font color='#000088'>+Release:        12%{?dist}
</font> %{?_with_noarch_subpackages:BuildArch: noarch}
 
 Requires:      rtems-4.11-newlib-common
<font color='#997700'>@@ -855,7 +859,7 @@
</font> Summary:  Base package for RTEMS newlib C Library
 Group:          Development/Tools
 Version:        %{newlib_version}
<font color='#880000'>-Release:        11%{?dist}
</font><font color='#000088'>+Release:        12%{?dist}
</font> %{?_with_noarch_subpackages:BuildArch: noarch}
 License:       Distributable
 

<font color='#006600'>diff -u rtems/contrib/crossrpms/rtems4.11/i386/rtems-4.11-i386-rtems4.11-gcc.spec:1.57 rtems/contrib/crossrpms/rtems4.11/i386/rtems-4.11-i386-rtems4.11-gcc.spec:1.58
--- rtems/contrib/crossrpms/rtems4.11/i386/rtems-4.11-i386-rtems4.11-gcc.spec:1.57      Wed Jul 20 01:46:47 2011
+++ rtems/contrib/crossrpms/rtems4.11/i386/rtems-4.11-i386-rtems4.11-gcc.spec   Sun Jul 24 09:17:54 2011
</font><font color='#997700'>@@ -58,7 +58,7 @@
</font> 
 Group: <span style="background-color: #FF0000">      </span>     Development/Tools
 Version:        %{gcc_rpmvers}
<font color='#880000'>-Release:<span style="background-color: #FF0000">      </span>        4%{?dist}
</font><font color='#000088'>+Release:<span style="background-color: #FF0000">      </span>   5%{?dist}
</font> License:<span style="background-color: #FF0000">      </span>       GPL
 URL:           http://gcc.gnu.org
 BuildRoot:     %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
<font color='#997700'>@@ -82,6 +82,9 @@
</font> # Should be applicable to gcc >= 4.5.0
 %bcond_with gcc_stdint
 
<font color='#000088'>+# EXPERIMENTAL: Enable newlib's iconv
+%bcond_without iconv
+
</font> # versions of libraries, we conditionally bundle if necessary
 %global mpc_version    0.8.1
 %global mpfr_version   2.4.2
<font color='#997700'>@@ -107,12 +110,6 @@
</font> %global gmp_provided 4.3.1
 %endif
 
<font color='#880000'>-%if 0%{?fc13}
-%global mpc_provided 0.8.1
-%global mpfr_provided 2.4.2
-%global gmp_provided 4.3.1
-%endif
-
</font> %if 0%{?el6}
 %global mpc_provided %{nil}
 %global mpfr_provided 2.4.1
<font color='#997700'>@@ -209,7 +206,6 @@
</font> 
 
 %if %{defined cloog_required}
<font color='#880000'>-%{?fc13:BuildRequires: cloog-ppl-devel >= %cloog_required}
</font> %{?fc14:BuildRequires: cloog-ppl-devel >= %cloog_required}
 %{?fc15:BuildRequires: cloog-ppl-devel >= %cloog_required}
 %{?fc16:BuildRequires: cloog-ppl-devel >= %cloog_required}
<font color='#997700'>@@ -245,7 +241,7 @@
</font> Requires: rtems-4.11-gcc-common
 Requires:      rtems-4.11-i386-rtems4.11-binutils
 Requires:      rtems-4.11-i386-rtems4.11-gcc-libgcc = %{gcc_rpmvers}-%{release}
<font color='#880000'>-Requires:  rtems-4.11-i386-rtems4.11-newlib = %{newlib_version}-14%{?dist}
</font><font color='#000088'>+Requires:     rtems-4.11-i386-rtems4.11-newlib = %{newlib_version}-15%{?dist}
</font> 
 %if "%{gcc_version}" >= "4.5.0"
 BuildRequires:  zlib-devel
<font color='#997700'>@@ -276,7 +272,7 @@
</font> 
 %if "%{newlib_version}" == "1.19.0"
 Source50:      ftp://sources.redhat.com/pub/newlib/newlib-%{newlib_pkgvers}.tar.gz
<font color='#880000'>-Patch50:   ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/newlib-1.19.0-rtems4.11-20110720.diff
</font><font color='#000088'>+Patch50:      ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/newlib-1.19.0-rtems4.11-20110724.diff
</font> %endif
 
 %if 0%{?_build_mpfr}
<font color='#997700'>@@ -360,7 +356,7 @@
</font>   ln -s ../libelf-%{libelf_version} gcc-%{gcc_pkgvers}/libelf
 %endif
 
<font color='#880000'>-echo "RTEMS gcc-%{gcc_version}-4%{?dist}/newlib-%{newlib_version}-14%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE
</font><font color='#000088'>+echo "RTEMS gcc-%{gcc_version}-5%{?dist}/newlib-%{newlib_version}-15%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE
</font> 
 
   # Fix timestamps
<font color='#997700'>@@ -405,6 +401,7 @@
</font>     %{?with_lto:--enable-lto}%{!?with_lto:--disable-lto} \
     %{?with_plugin:--enable-plugin}%{!?with_plugin:--disable-plugin} \
     --enable-newlib-io-c99-formats \
<font color='#000088'>+    %{?with_iconv:--enable-newlib-iconv} \
</font>     --enable-languages="$languages"
 
 %if "%_host" != "%_build"
<font color='#997700'>@@ -473,13 +470,20 @@
</font>     rmdir ${RPM_BUILD_ROOT}%{_prefix}/i386-rtems4.11/include/bits
   fi
 
<font color='#880000'>-  # gcc >= 4.5.0: installs weird libstdc++ python bindings.
</font><font color='#000088'>+%if %{with iconv}
+  # Iconv enabled newlib installs external ccts (target files)
+  if test -d ${RPM_BUILD_ROOT}%{_datadir}/iconv_data; then
+    rm -rf ${RPM_BUILD_ROOT}%{_datadir}/iconv_data
+  fi
+%endif
+
</font> %if ! %{with pygdb}
<font color='#000088'>+  # gcc >= 4.5.0: installs weird libstdc++ python bindings.
</font>   if test -d ${RPM_BUILD_ROOT}%{_datadir}/gcc-%{gcc_version}/python; then
     rm -rf ${RPM_BUILD_ROOT}%{_datadir}/gcc-%{gcc_version}/python/libstdcxx
   fi
<font color='#880000'>-%endif
</font> 
<font color='#000088'>+%endif
</font>   # Collect multilib subdirectories
   multilibs=`build/gcc/xgcc -Bbuild/gcc/ --print-multi-lib | sed -e 's,;.*$,,'`
 
<font color='#997700'>@@ -637,7 +641,7 @@
</font> # Group:          Development/Tools
 # Version:        %{gcc_rpmvers}
 # Requires:       rtems-4.11-i386-rtems4.11-binutils
<font color='#880000'>-# Requires:       rtems-4.11-i386-rtems4.11-newlib = %{newlib_version}-14%{?dist}
</font><font color='#000088'>+# Requires:       rtems-4.11-i386-rtems4.11-newlib = %{newlib_version}-15%{?dist}
</font> # License:        GPL
 
 # %if %build_infos
<font color='#997700'>@@ -655,7 +659,7 @@
</font> Group:          Development/Tools
 Version:        %{gcc_rpmvers}
 %{?_with_noarch_subpackages:BuildArch: noarch}
<font color='#880000'>-Requires:       rtems-4.11-i386-rtems4.11-newlib = %{newlib_version}-14%{?dist}
</font><font color='#000088'>+Requires:       rtems-4.11-i386-rtems4.11-newlib = %{newlib_version}-15%{?dist}
</font> License:  GPL
 
 %description -n rtems-4.11-i386-rtems4.11-gcc-libgcc
<font color='#997700'>@@ -834,7 +838,7 @@
</font> Group:<span style="background-color: #FF0000"> </span>              Development/Tools
 License:       Distributable
 Version:       %{newlib_version}
<font color='#880000'>-Release:        14%{?dist}
</font><font color='#000088'>+Release:        15%{?dist}
</font> %{?_with_noarch_subpackages:BuildArch: noarch}
 
 Requires:      rtems-4.11-newlib-common
<font color='#997700'>@@ -855,7 +859,7 @@
</font> Summary:  Base package for RTEMS newlib C Library
 Group:          Development/Tools
 Version:        %{newlib_version}
<font color='#880000'>-Release:        14%{?dist}
</font><font color='#000088'>+Release:        15%{?dist}
</font> %{?_with_noarch_subpackages:BuildArch: noarch}
 License:       Distributable
 

<font color='#006600'>diff -u rtems/contrib/crossrpms/rtems4.11/lm32/rtems-4.11-lm32-rtems4.11-gcc.spec:1.58 rtems/contrib/crossrpms/rtems4.11/lm32/rtems-4.11-lm32-rtems4.11-gcc.spec:1.59
--- rtems/contrib/crossrpms/rtems4.11/lm32/rtems-4.11-lm32-rtems4.11-gcc.spec:1.58      Wed Jul 20 01:46:47 2011
+++ rtems/contrib/crossrpms/rtems4.11/lm32/rtems-4.11-lm32-rtems4.11-gcc.spec   Sun Jul 24 09:17:54 2011
</font><font color='#997700'>@@ -58,7 +58,7 @@
</font> 
 Group: <span style="background-color: #FF0000">      </span>     Development/Tools
 Version:        %{gcc_rpmvers}
<font color='#880000'>-Release:<span style="background-color: #FF0000">      </span>        4%{?dist}
</font><font color='#000088'>+Release:<span style="background-color: #FF0000">      </span>   5%{?dist}
</font> License:<span style="background-color: #FF0000">      </span>       GPL
 URL:           http://gcc.gnu.org
 BuildRoot:     %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
<font color='#997700'>@@ -82,6 +82,9 @@
</font> # Should be applicable to gcc >= 4.5.0
 %bcond_with gcc_stdint
 
<font color='#000088'>+# EXPERIMENTAL: Enable newlib's iconv
+%bcond_without iconv
+
</font> # versions of libraries, we conditionally bundle if necessary
 %global mpc_version    0.8.1
 %global mpfr_version   2.4.2
<font color='#997700'>@@ -107,12 +110,6 @@
</font> %global gmp_provided 4.3.1
 %endif
 
<font color='#880000'>-%if 0%{?fc13}
-%global mpc_provided 0.8.1
-%global mpfr_provided 2.4.2
-%global gmp_provided 4.3.1
-%endif
-
</font> %if 0%{?el6}
 %global mpc_provided %{nil}
 %global mpfr_provided 2.4.1
<font color='#997700'>@@ -209,7 +206,6 @@
</font> 
 
 %if %{defined cloog_required}
<font color='#880000'>-%{?fc13:BuildRequires: cloog-ppl-devel >= %cloog_required}
</font> %{?fc14:BuildRequires: cloog-ppl-devel >= %cloog_required}
 %{?fc15:BuildRequires: cloog-ppl-devel >= %cloog_required}
 %{?fc16:BuildRequires: cloog-ppl-devel >= %cloog_required}
<font color='#997700'>@@ -245,7 +241,7 @@
</font> Requires: rtems-4.11-gcc-common
 Requires:      rtems-4.11-lm32-rtems4.11-binutils
 Requires:      rtems-4.11-lm32-rtems4.11-gcc-libgcc = %{gcc_rpmvers}-%{release}
<font color='#880000'>-Requires:  rtems-4.11-lm32-rtems4.11-newlib = %{newlib_version}-11%{?dist}
</font><font color='#000088'>+Requires:     rtems-4.11-lm32-rtems4.11-newlib = %{newlib_version}-12%{?dist}
</font> 
 %if "%{gcc_version}" >= "4.5.0"
 BuildRequires:  zlib-devel
<font color='#997700'>@@ -276,7 +272,7 @@
</font> 
 %if "%{newlib_version}" == "1.19.0"
 Source50:      ftp://sources.redhat.com/pub/newlib/newlib-%{newlib_pkgvers}.tar.gz
<font color='#880000'>-Patch50:   ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/newlib-1.19.0-rtems4.11-20110720.diff
</font><font color='#000088'>+Patch50:      ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/newlib-1.19.0-rtems4.11-20110724.diff
</font> %endif
 
 %if 0%{?_build_mpfr}
<font color='#997700'>@@ -360,7 +356,7 @@
</font>   ln -s ../libelf-%{libelf_version} gcc-%{gcc_pkgvers}/libelf
 %endif
 
<font color='#880000'>-echo "RTEMS gcc-%{gcc_version}-4%{?dist}/newlib-%{newlib_version}-11%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE
</font><font color='#000088'>+echo "RTEMS gcc-%{gcc_version}-5%{?dist}/newlib-%{newlib_version}-12%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE
</font> 
 
   # Fix timestamps
<font color='#997700'>@@ -405,6 +401,7 @@
</font>     %{?with_lto:--enable-lto}%{!?with_lto:--disable-lto} \
     %{?with_plugin:--enable-plugin}%{!?with_plugin:--disable-plugin} \
     --enable-newlib-io-c99-formats \
<font color='#000088'>+    %{?with_iconv:--enable-newlib-iconv} \
</font>     --enable-languages="$languages"
 
 %if "%_host" != "%_build"
<font color='#997700'>@@ -473,13 +470,20 @@
</font>     rmdir ${RPM_BUILD_ROOT}%{_prefix}/lm32-rtems4.11/include/bits
   fi
 
<font color='#880000'>-  # gcc >= 4.5.0: installs weird libstdc++ python bindings.
</font><font color='#000088'>+%if %{with iconv}
+  # Iconv enabled newlib installs external ccts (target files)
+  if test -d ${RPM_BUILD_ROOT}%{_datadir}/iconv_data; then
+    rm -rf ${RPM_BUILD_ROOT}%{_datadir}/iconv_data
+  fi
+%endif
+
</font> %if ! %{with pygdb}
<font color='#000088'>+  # gcc >= 4.5.0: installs weird libstdc++ python bindings.
</font>   if test -d ${RPM_BUILD_ROOT}%{_datadir}/gcc-%{gcc_version}/python; then
     rm -rf ${RPM_BUILD_ROOT}%{_datadir}/gcc-%{gcc_version}/python/libstdcxx
   fi
<font color='#880000'>-%endif
</font> 
<font color='#000088'>+%endif
</font>   # Collect multilib subdirectories
   multilibs=`build/gcc/xgcc -Bbuild/gcc/ --print-multi-lib | sed -e 's,;.*$,,'`
 
<font color='#997700'>@@ -637,7 +641,7 @@
</font> # Group:          Development/Tools
 # Version:        %{gcc_rpmvers}
 # Requires:       rtems-4.11-lm32-rtems4.11-binutils
<font color='#880000'>-# Requires:       rtems-4.11-lm32-rtems4.11-newlib = %{newlib_version}-11%{?dist}
</font><font color='#000088'>+# Requires:       rtems-4.11-lm32-rtems4.11-newlib = %{newlib_version}-12%{?dist}
</font> # License:        GPL
 
 # %if %build_infos
<font color='#997700'>@@ -655,7 +659,7 @@
</font> Group:          Development/Tools
 Version:        %{gcc_rpmvers}
 %{?_with_noarch_subpackages:BuildArch: noarch}
<font color='#880000'>-Requires:       rtems-4.11-lm32-rtems4.11-newlib = %{newlib_version}-11%{?dist}
</font><font color='#000088'>+Requires:       rtems-4.11-lm32-rtems4.11-newlib = %{newlib_version}-12%{?dist}
</font> License:  GPL
 
 %description -n rtems-4.11-lm32-rtems4.11-gcc-libgcc
<font color='#997700'>@@ -834,7 +838,7 @@
</font> Group:<span style="background-color: #FF0000"> </span>              Development/Tools
 License:       Distributable
 Version:       %{newlib_version}
<font color='#880000'>-Release:        11%{?dist}
</font><font color='#000088'>+Release:        12%{?dist}
</font> %{?_with_noarch_subpackages:BuildArch: noarch}
 
 Requires:      rtems-4.11-newlib-common
<font color='#997700'>@@ -855,7 +859,7 @@
</font> Summary:  Base package for RTEMS newlib C Library
 Group:          Development/Tools
 Version:        %{newlib_version}
<font color='#880000'>-Release:        11%{?dist}
</font><font color='#000088'>+Release:        12%{?dist}
</font> %{?_with_noarch_subpackages:BuildArch: noarch}
 License:       Distributable
 

<font color='#006600'>diff -u rtems/contrib/crossrpms/rtems4.11/m32c/rtems-4.11-m32c-rtems4.11-gcc.spec:1.55 rtems/contrib/crossrpms/rtems4.11/m32c/rtems-4.11-m32c-rtems4.11-gcc.spec:1.56
--- rtems/contrib/crossrpms/rtems4.11/m32c/rtems-4.11-m32c-rtems4.11-gcc.spec:1.55      Wed Jul 20 01:46:47 2011
+++ rtems/contrib/crossrpms/rtems4.11/m32c/rtems-4.11-m32c-rtems4.11-gcc.spec   Sun Jul 24 09:17:54 2011
</font><font color='#997700'>@@ -58,7 +58,7 @@
</font> 
 Group: <span style="background-color: #FF0000">      </span>     Development/Tools
 Version:        %{gcc_rpmvers}
<font color='#880000'>-Release:<span style="background-color: #FF0000">      </span>        4%{?dist}
</font><font color='#000088'>+Release:<span style="background-color: #FF0000">      </span>   5%{?dist}
</font> License:<span style="background-color: #FF0000">      </span>       GPL
 URL:           http://gcc.gnu.org
 BuildRoot:     %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
<font color='#997700'>@@ -82,6 +82,9 @@
</font> # Should be applicable to gcc >= 4.5.0
 %bcond_with gcc_stdint
 
<font color='#000088'>+# EXPERIMENTAL: Enable newlib's iconv
+%bcond_without iconv
+
</font> # versions of libraries, we conditionally bundle if necessary
 %global mpc_version    0.8.1
 %global mpfr_version   2.4.2
<font color='#997700'>@@ -107,12 +110,6 @@
</font> %global gmp_provided 4.3.1
 %endif
 
<font color='#880000'>-%if 0%{?fc13}
-%global mpc_provided 0.8.1
-%global mpfr_provided 2.4.2
-%global gmp_provided 4.3.1
-%endif
-
</font> %if 0%{?el6}
 %global mpc_provided %{nil}
 %global mpfr_provided 2.4.1
<font color='#997700'>@@ -209,7 +206,6 @@
</font> 
 
 %if %{defined cloog_required}
<font color='#880000'>-%{?fc13:BuildRequires: cloog-ppl-devel >= %cloog_required}
</font> %{?fc14:BuildRequires: cloog-ppl-devel >= %cloog_required}
 %{?fc15:BuildRequires: cloog-ppl-devel >= %cloog_required}
 %{?fc16:BuildRequires: cloog-ppl-devel >= %cloog_required}
<font color='#997700'>@@ -245,7 +241,7 @@
</font> Requires: rtems-4.11-gcc-common
 Requires:      rtems-4.11-m32c-rtems4.11-binutils
 Requires:      rtems-4.11-m32c-rtems4.11-gcc-libgcc = %{gcc_rpmvers}-%{release}
<font color='#880000'>-Requires:  rtems-4.11-m32c-rtems4.11-newlib = %{newlib_version}-14%{?dist}
</font><font color='#000088'>+Requires:     rtems-4.11-m32c-rtems4.11-newlib = %{newlib_version}-15%{?dist}
</font> 
 %if "%{gcc_version}" >= "4.5.0"
 BuildRequires:  zlib-devel
<font color='#997700'>@@ -268,7 +264,7 @@
</font> 
 %if "%{newlib_version}" == "1.19.0"
 Source50:      ftp://sources.redhat.com/pub/newlib/newlib-%{newlib_pkgvers}.tar.gz
<font color='#880000'>-Patch50:   ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/newlib-1.19.0-rtems4.11-20110720.diff
</font><font color='#000088'>+Patch50:      ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/newlib-1.19.0-rtems4.11-20110724.diff
</font> %endif
 
 %if 0%{?_build_mpfr}
<font color='#997700'>@@ -348,7 +344,7 @@
</font>   ln -s ../libelf-%{libelf_version} gcc-%{gcc_pkgvers}/libelf
 %endif
 
<font color='#880000'>-echo "RTEMS gcc-%{gcc_version}-4%{?dist}/newlib-%{newlib_version}-14%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE
</font><font color='#000088'>+echo "RTEMS gcc-%{gcc_version}-5%{?dist}/newlib-%{newlib_version}-15%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE
</font> 
 
   # Fix timestamps
<font color='#997700'>@@ -392,6 +388,7 @@
</font>     %{?with_lto:--enable-lto}%{!?with_lto:--disable-lto} \
     %{?with_plugin:--enable-plugin}%{!?with_plugin:--disable-plugin} \
     --enable-newlib-io-c99-formats \
<font color='#000088'>+    %{?with_iconv:--enable-newlib-iconv} \
</font>     --enable-languages="$languages"
 
 %if "%_host" != "%_build"
<font color='#997700'>@@ -460,13 +457,20 @@
</font>     rmdir ${RPM_BUILD_ROOT}%{_prefix}/m32c-rtems4.11/include/bits
   fi
 
<font color='#880000'>-  # gcc >= 4.5.0: installs weird libstdc++ python bindings.
</font><font color='#000088'>+%if %{with iconv}
+  # Iconv enabled newlib installs external ccts (target files)
+  if test -d ${RPM_BUILD_ROOT}%{_datadir}/iconv_data; then
+    rm -rf ${RPM_BUILD_ROOT}%{_datadir}/iconv_data
+  fi
+%endif
+
</font> %if ! %{with pygdb}
<font color='#000088'>+  # gcc >= 4.5.0: installs weird libstdc++ python bindings.
</font>   if test -d ${RPM_BUILD_ROOT}%{_datadir}/gcc-%{gcc_version}/python; then
     rm -rf ${RPM_BUILD_ROOT}%{_datadir}/gcc-%{gcc_version}/python/libstdcxx
   fi
<font color='#880000'>-%endif
</font> 
<font color='#000088'>+%endif
</font>   # Collect multilib subdirectories
   multilibs=`build/gcc/xgcc -Bbuild/gcc/ --print-multi-lib | sed -e 's,;.*$,,'`
 
<font color='#997700'>@@ -624,7 +628,7 @@
</font> # Group:          Development/Tools
 # Version:        %{gcc_rpmvers}
 # Requires:       rtems-4.11-m32c-rtems4.11-binutils
<font color='#880000'>-# Requires:       rtems-4.11-m32c-rtems4.11-newlib = %{newlib_version}-14%{?dist}
</font><font color='#000088'>+# Requires:       rtems-4.11-m32c-rtems4.11-newlib = %{newlib_version}-15%{?dist}
</font> # License:        GPL
 
 # %if %build_infos
<font color='#997700'>@@ -642,7 +646,7 @@
</font> Group:          Development/Tools
 Version:        %{gcc_rpmvers}
 %{?_with_noarch_subpackages:BuildArch: noarch}
<font color='#880000'>-Requires:       rtems-4.11-m32c-rtems4.11-newlib = %{newlib_version}-14%{?dist}
</font><font color='#000088'>+Requires:       rtems-4.11-m32c-rtems4.11-newlib = %{newlib_version}-15%{?dist}
</font> License:  GPL
 
 %description -n rtems-4.11-m32c-rtems4.11-gcc-libgcc
<font color='#997700'>@@ -761,7 +765,7 @@
</font> Group:<span style="background-color: #FF0000"> </span>              Development/Tools
 License:       Distributable
 Version:       %{newlib_version}
<font color='#880000'>-Release:        14%{?dist}
</font><font color='#000088'>+Release:        15%{?dist}
</font> %{?_with_noarch_subpackages:BuildArch: noarch}
 
 Requires:      rtems-4.11-newlib-common
<font color='#997700'>@@ -782,7 +786,7 @@
</font> Summary:  Base package for RTEMS newlib C Library
 Group:          Development/Tools
 Version:        %{newlib_version}
<font color='#880000'>-Release:        14%{?dist}
</font><font color='#000088'>+Release:        15%{?dist}
</font> %{?_with_noarch_subpackages:BuildArch: noarch}
 License:       Distributable
 

<font color='#006600'>diff -u rtems/contrib/crossrpms/rtems4.11/m32r/rtems-4.11-m32r-rtems4.11-gcc.spec:1.54 rtems/contrib/crossrpms/rtems4.11/m32r/rtems-4.11-m32r-rtems4.11-gcc.spec:1.55
--- rtems/contrib/crossrpms/rtems4.11/m32r/rtems-4.11-m32r-rtems4.11-gcc.spec:1.54      Wed Jul 20 01:46:47 2011
+++ rtems/contrib/crossrpms/rtems4.11/m32r/rtems-4.11-m32r-rtems4.11-gcc.spec   Sun Jul 24 09:17:54 2011
</font><font color='#997700'>@@ -58,7 +58,7 @@
</font> 
 Group: <span style="background-color: #FF0000">      </span>     Development/Tools
 Version:        %{gcc_rpmvers}
<font color='#880000'>-Release:<span style="background-color: #FF0000">      </span>        4%{?dist}
</font><font color='#000088'>+Release:<span style="background-color: #FF0000">      </span>   5%{?dist}
</font> License:<span style="background-color: #FF0000">      </span>       GPL
 URL:           http://gcc.gnu.org
 BuildRoot:     %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
<font color='#997700'>@@ -82,6 +82,9 @@
</font> # Should be applicable to gcc >= 4.5.0
 %bcond_with gcc_stdint
 
<font color='#000088'>+# EXPERIMENTAL: Enable newlib's iconv
+%bcond_without iconv
+
</font> # versions of libraries, we conditionally bundle if necessary
 %global mpc_version    0.8.1
 %global mpfr_version   2.4.2
<font color='#997700'>@@ -107,12 +110,6 @@
</font> %global gmp_provided 4.3.1
 %endif
 
<font color='#880000'>-%if 0%{?fc13}
-%global mpc_provided 0.8.1
-%global mpfr_provided 2.4.2
-%global gmp_provided 4.3.1
-%endif
-
</font> %if 0%{?el6}
 %global mpc_provided %{nil}
 %global mpfr_provided 2.4.1
<font color='#997700'>@@ -209,7 +206,6 @@
</font> 
 
 %if %{defined cloog_required}
<font color='#880000'>-%{?fc13:BuildRequires: cloog-ppl-devel >= %cloog_required}
</font> %{?fc14:BuildRequires: cloog-ppl-devel >= %cloog_required}
 %{?fc15:BuildRequires: cloog-ppl-devel >= %cloog_required}
 %{?fc16:BuildRequires: cloog-ppl-devel >= %cloog_required}
<font color='#997700'>@@ -245,7 +241,7 @@
</font> Requires: rtems-4.11-gcc-common
 Requires:      rtems-4.11-m32r-rtems4.11-binutils
 Requires:      rtems-4.11-m32r-rtems4.11-gcc-libgcc = %{gcc_rpmvers}-%{release}
<font color='#880000'>-Requires:  rtems-4.11-m32r-rtems4.11-newlib = %{newlib_version}-14%{?dist}
</font><font color='#000088'>+Requires:     rtems-4.11-m32r-rtems4.11-newlib = %{newlib_version}-15%{?dist}
</font> 
 %if "%{gcc_version}" >= "4.5.0"
 BuildRequires:  zlib-devel
<font color='#997700'>@@ -268,7 +264,7 @@
</font> 
 %if "%{newlib_version}" == "1.19.0"
 Source50:      ftp://sources.redhat.com/pub/newlib/newlib-%{newlib_pkgvers}.tar.gz
<font color='#880000'>-Patch50:   ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/newlib-1.19.0-rtems4.11-20110720.diff
</font><font color='#000088'>+Patch50:      ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/newlib-1.19.0-rtems4.11-20110724.diff
</font> %endif
 
 %if 0%{?_build_mpfr}
<font color='#997700'>@@ -348,7 +344,7 @@
</font>   ln -s ../libelf-%{libelf_version} gcc-%{gcc_pkgvers}/libelf
 %endif
 
<font color='#880000'>-echo "RTEMS gcc-%{gcc_version}-4%{?dist}/newlib-%{newlib_version}-14%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE
</font><font color='#000088'>+echo "RTEMS gcc-%{gcc_version}-5%{?dist}/newlib-%{newlib_version}-15%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE
</font> 
 
   # Fix timestamps
<font color='#997700'>@@ -392,6 +388,7 @@
</font>     %{?with_lto:--enable-lto}%{!?with_lto:--disable-lto} \
     %{?with_plugin:--enable-plugin}%{!?with_plugin:--disable-plugin} \
     --enable-newlib-io-c99-formats \
<font color='#000088'>+    %{?with_iconv:--enable-newlib-iconv} \
</font>     --enable-languages="$languages"
 
 %if "%_host" != "%_build"
<font color='#997700'>@@ -460,13 +457,20 @@
</font>     rmdir ${RPM_BUILD_ROOT}%{_prefix}/m32r-rtems4.11/include/bits
   fi
 
<font color='#880000'>-  # gcc >= 4.5.0: installs weird libstdc++ python bindings.
</font><font color='#000088'>+%if %{with iconv}
+  # Iconv enabled newlib installs external ccts (target files)
+  if test -d ${RPM_BUILD_ROOT}%{_datadir}/iconv_data; then
+    rm -rf ${RPM_BUILD_ROOT}%{_datadir}/iconv_data
+  fi
+%endif
+
</font> %if ! %{with pygdb}
<font color='#000088'>+  # gcc >= 4.5.0: installs weird libstdc++ python bindings.
</font>   if test -d ${RPM_BUILD_ROOT}%{_datadir}/gcc-%{gcc_version}/python; then
     rm -rf ${RPM_BUILD_ROOT}%{_datadir}/gcc-%{gcc_version}/python/libstdcxx
   fi
<font color='#880000'>-%endif
</font> 
<font color='#000088'>+%endif
</font>   # Collect multilib subdirectories
   multilibs=`build/gcc/xgcc -Bbuild/gcc/ --print-multi-lib | sed -e 's,;.*$,,'`
 
<font color='#997700'>@@ -624,7 +628,7 @@
</font> # Group:          Development/Tools
 # Version:        %{gcc_rpmvers}
 # Requires:       rtems-4.11-m32r-rtems4.11-binutils
<font color='#880000'>-# Requires:       rtems-4.11-m32r-rtems4.11-newlib = %{newlib_version}-14%{?dist}
</font><font color='#000088'>+# Requires:       rtems-4.11-m32r-rtems4.11-newlib = %{newlib_version}-15%{?dist}
</font> # License:        GPL
 
 # %if %build_infos
<font color='#997700'>@@ -642,7 +646,7 @@
</font> Group:          Development/Tools
 Version:        %{gcc_rpmvers}
 %{?_with_noarch_subpackages:BuildArch: noarch}
<font color='#880000'>-Requires:       rtems-4.11-m32r-rtems4.11-newlib = %{newlib_version}-14%{?dist}
</font><font color='#000088'>+Requires:       rtems-4.11-m32r-rtems4.11-newlib = %{newlib_version}-15%{?dist}
</font> License:  GPL
 
 %description -n rtems-4.11-m32r-rtems4.11-gcc-libgcc
<font color='#997700'>@@ -761,7 +765,7 @@
</font> Group:<span style="background-color: #FF0000"> </span>              Development/Tools
 License:       Distributable
 Version:       %{newlib_version}
<font color='#880000'>-Release:        14%{?dist}
</font><font color='#000088'>+Release:        15%{?dist}
</font> %{?_with_noarch_subpackages:BuildArch: noarch}
 
 Requires:      rtems-4.11-newlib-common
<font color='#997700'>@@ -782,7 +786,7 @@
</font> Summary:  Base package for RTEMS newlib C Library
 Group:          Development/Tools
 Version:        %{newlib_version}
<font color='#880000'>-Release:        14%{?dist}
</font><font color='#000088'>+Release:        15%{?dist}
</font> %{?_with_noarch_subpackages:BuildArch: noarch}
 License:       Distributable
 

<font color='#006600'>diff -u rtems/contrib/crossrpms/rtems4.11/m68k/rtems-4.11-m68k-rtems4.11-gcc.spec:1.57 rtems/contrib/crossrpms/rtems4.11/m68k/rtems-4.11-m68k-rtems4.11-gcc.spec:1.58
--- rtems/contrib/crossrpms/rtems4.11/m68k/rtems-4.11-m68k-rtems4.11-gcc.spec:1.57      Wed Jul 20 01:46:47 2011
+++ rtems/contrib/crossrpms/rtems4.11/m68k/rtems-4.11-m68k-rtems4.11-gcc.spec   Sun Jul 24 09:17:54 2011
</font><font color='#997700'>@@ -58,7 +58,7 @@
</font> 
 Group: <span style="background-color: #FF0000">      </span>     Development/Tools
 Version:        %{gcc_rpmvers}
<font color='#880000'>-Release:<span style="background-color: #FF0000">      </span>        4%{?dist}
</font><font color='#000088'>+Release:<span style="background-color: #FF0000">      </span>   5%{?dist}
</font> License:<span style="background-color: #FF0000">      </span>       GPL
 URL:           http://gcc.gnu.org
 BuildRoot:     %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
<font color='#997700'>@@ -82,6 +82,9 @@
</font> # Should be applicable to gcc >= 4.5.0
 %bcond_with gcc_stdint
 
<font color='#000088'>+# EXPERIMENTAL: Enable newlib's iconv
+%bcond_without iconv
+
</font> # versions of libraries, we conditionally bundle if necessary
 %global mpc_version    0.8.1
 %global mpfr_version   2.4.2
<font color='#997700'>@@ -107,12 +110,6 @@
</font> %global gmp_provided 4.3.1
 %endif
 
<font color='#880000'>-%if 0%{?fc13}
-%global mpc_provided 0.8.1
-%global mpfr_provided 2.4.2
-%global gmp_provided 4.3.1
-%endif
-
</font> %if 0%{?el6}
 %global mpc_provided %{nil}
 %global mpfr_provided 2.4.1
<font color='#997700'>@@ -209,7 +206,6 @@
</font> 
 
 %if %{defined cloog_required}
<font color='#880000'>-%{?fc13:BuildRequires: cloog-ppl-devel >= %cloog_required}
</font> %{?fc14:BuildRequires: cloog-ppl-devel >= %cloog_required}
 %{?fc15:BuildRequires: cloog-ppl-devel >= %cloog_required}
 %{?fc16:BuildRequires: cloog-ppl-devel >= %cloog_required}
<font color='#997700'>@@ -245,7 +241,7 @@
</font> Requires: rtems-4.11-gcc-common
 Requires:      rtems-4.11-m68k-rtems4.11-binutils
 Requires:      rtems-4.11-m68k-rtems4.11-gcc-libgcc = %{gcc_rpmvers}-%{release}
<font color='#880000'>-Requires:  rtems-4.11-m68k-rtems4.11-newlib = %{newlib_version}-14%{?dist}
</font><font color='#000088'>+Requires:     rtems-4.11-m68k-rtems4.11-newlib = %{newlib_version}-15%{?dist}
</font> 
 %if "%{gcc_version}" >= "4.5.0"
 BuildRequires:  zlib-devel
<font color='#997700'>@@ -276,7 +272,7 @@
</font> 
 %if "%{newlib_version}" == "1.19.0"
 Source50:      ftp://sources.redhat.com/pub/newlib/newlib-%{newlib_pkgvers}.tar.gz
<font color='#880000'>-Patch50:   ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/newlib-1.19.0-rtems4.11-20110720.diff
</font><font color='#000088'>+Patch50:      ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/newlib-1.19.0-rtems4.11-20110724.diff
</font> %endif
 
 %if 0%{?_build_mpfr}
<font color='#997700'>@@ -360,7 +356,7 @@
</font>   ln -s ../libelf-%{libelf_version} gcc-%{gcc_pkgvers}/libelf
 %endif
 
<font color='#880000'>-echo "RTEMS gcc-%{gcc_version}-4%{?dist}/newlib-%{newlib_version}-14%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE
</font><font color='#000088'>+echo "RTEMS gcc-%{gcc_version}-5%{?dist}/newlib-%{newlib_version}-15%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE
</font> 
 
   # Fix timestamps
<font color='#997700'>@@ -405,6 +401,7 @@
</font>     %{?with_lto:--enable-lto}%{!?with_lto:--disable-lto} \
     %{?with_plugin:--enable-plugin}%{!?with_plugin:--disable-plugin} \
     --enable-newlib-io-c99-formats \
<font color='#000088'>+    %{?with_iconv:--enable-newlib-iconv} \
</font>     --enable-languages="$languages"
 
 %if "%_host" != "%_build"
<font color='#997700'>@@ -473,13 +470,20 @@
</font>     rmdir ${RPM_BUILD_ROOT}%{_prefix}/m68k-rtems4.11/include/bits
   fi
 
<font color='#880000'>-  # gcc >= 4.5.0: installs weird libstdc++ python bindings.
</font><font color='#000088'>+%if %{with iconv}
+  # Iconv enabled newlib installs external ccts (target files)
+  if test -d ${RPM_BUILD_ROOT}%{_datadir}/iconv_data; then
+    rm -rf ${RPM_BUILD_ROOT}%{_datadir}/iconv_data
+  fi
+%endif
+
</font> %if ! %{with pygdb}
<font color='#000088'>+  # gcc >= 4.5.0: installs weird libstdc++ python bindings.
</font>   if test -d ${RPM_BUILD_ROOT}%{_datadir}/gcc-%{gcc_version}/python; then
     rm -rf ${RPM_BUILD_ROOT}%{_datadir}/gcc-%{gcc_version}/python/libstdcxx
   fi
<font color='#880000'>-%endif
</font> 
<font color='#000088'>+%endif
</font>   # Collect multilib subdirectories
   multilibs=`build/gcc/xgcc -Bbuild/gcc/ --print-multi-lib | sed -e 's,;.*$,,'`
 
<font color='#997700'>@@ -637,7 +641,7 @@
</font> # Group:          Development/Tools
 # Version:        %{gcc_rpmvers}
 # Requires:       rtems-4.11-m68k-rtems4.11-binutils
<font color='#880000'>-# Requires:       rtems-4.11-m68k-rtems4.11-newlib = %{newlib_version}-14%{?dist}
</font><font color='#000088'>+# Requires:       rtems-4.11-m68k-rtems4.11-newlib = %{newlib_version}-15%{?dist}
</font> # License:        GPL
 
 # %if %build_infos
<font color='#997700'>@@ -655,7 +659,7 @@
</font> Group:          Development/Tools
 Version:        %{gcc_rpmvers}
 %{?_with_noarch_subpackages:BuildArch: noarch}
<font color='#880000'>-Requires:       rtems-4.11-m68k-rtems4.11-newlib = %{newlib_version}-14%{?dist}
</font><font color='#000088'>+Requires:       rtems-4.11-m68k-rtems4.11-newlib = %{newlib_version}-15%{?dist}
</font> License:  GPL
 
 %description -n rtems-4.11-m68k-rtems4.11-gcc-libgcc
<font color='#997700'>@@ -834,7 +838,7 @@
</font> Group:<span style="background-color: #FF0000"> </span>              Development/Tools
 License:       Distributable
 Version:       %{newlib_version}
<font color='#880000'>-Release:        14%{?dist}
</font><font color='#000088'>+Release:        15%{?dist}
</font> %{?_with_noarch_subpackages:BuildArch: noarch}
 
 Requires:      rtems-4.11-newlib-common
<font color='#997700'>@@ -855,7 +859,7 @@
</font> Summary:  Base package for RTEMS newlib C Library
 Group:          Development/Tools
 Version:        %{newlib_version}
<font color='#880000'>-Release:        14%{?dist}
</font><font color='#000088'>+Release:        15%{?dist}
</font> %{?_with_noarch_subpackages:BuildArch: noarch}
 License:       Distributable
 

<font color='#006600'>diff -u rtems/contrib/crossrpms/rtems4.11/mips/rtems-4.11-mips-rtems4.11-gcc.spec:1.57 rtems/contrib/crossrpms/rtems4.11/mips/rtems-4.11-mips-rtems4.11-gcc.spec:1.58
--- rtems/contrib/crossrpms/rtems4.11/mips/rtems-4.11-mips-rtems4.11-gcc.spec:1.57      Wed Jul 20 01:46:47 2011
+++ rtems/contrib/crossrpms/rtems4.11/mips/rtems-4.11-mips-rtems4.11-gcc.spec   Sun Jul 24 09:17:54 2011
</font><font color='#997700'>@@ -58,7 +58,7 @@
</font> 
 Group: <span style="background-color: #FF0000">      </span>     Development/Tools
 Version:        %{gcc_rpmvers}
<font color='#880000'>-Release:<span style="background-color: #FF0000">      </span>        4%{?dist}
</font><font color='#000088'>+Release:<span style="background-color: #FF0000">      </span>   5%{?dist}
</font> License:<span style="background-color: #FF0000">      </span>       GPL
 URL:           http://gcc.gnu.org
 BuildRoot:     %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
<font color='#997700'>@@ -82,6 +82,9 @@
</font> # Should be applicable to gcc >= 4.5.0
 %bcond_with gcc_stdint
 
<font color='#000088'>+# EXPERIMENTAL: Enable newlib's iconv
+%bcond_without iconv
+
</font> # versions of libraries, we conditionally bundle if necessary
 %global mpc_version    0.8.1
 %global mpfr_version   2.4.2
<font color='#997700'>@@ -107,12 +110,6 @@
</font> %global gmp_provided 4.3.1
 %endif
 
<font color='#880000'>-%if 0%{?fc13}
-%global mpc_provided 0.8.1
-%global mpfr_provided 2.4.2
-%global gmp_provided 4.3.1
-%endif
-
</font> %if 0%{?el6}
 %global mpc_provided %{nil}
 %global mpfr_provided 2.4.1
<font color='#997700'>@@ -209,7 +206,6 @@
</font> 
 
 %if %{defined cloog_required}
<font color='#880000'>-%{?fc13:BuildRequires: cloog-ppl-devel >= %cloog_required}
</font> %{?fc14:BuildRequires: cloog-ppl-devel >= %cloog_required}
 %{?fc15:BuildRequires: cloog-ppl-devel >= %cloog_required}
 %{?fc16:BuildRequires: cloog-ppl-devel >= %cloog_required}
<font color='#997700'>@@ -245,7 +241,7 @@
</font> Requires: rtems-4.11-gcc-common
 Requires:      rtems-4.11-mips-rtems4.11-binutils
 Requires:      rtems-4.11-mips-rtems4.11-gcc-libgcc = %{gcc_rpmvers}-%{release}
<font color='#880000'>-Requires:  rtems-4.11-mips-rtems4.11-newlib = %{newlib_version}-14%{?dist}
</font><font color='#000088'>+Requires:     rtems-4.11-mips-rtems4.11-newlib = %{newlib_version}-15%{?dist}
</font> 
 %if "%{gcc_version}" >= "4.5.0"
 BuildRequires:  zlib-devel
<font color='#997700'>@@ -276,7 +272,7 @@
</font> 
 %if "%{newlib_version}" == "1.19.0"
 Source50:      ftp://sources.redhat.com/pub/newlib/newlib-%{newlib_pkgvers}.tar.gz
<font color='#880000'>-Patch50:   ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/newlib-1.19.0-rtems4.11-20110720.diff
</font><font color='#000088'>+Patch50:      ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/newlib-1.19.0-rtems4.11-20110724.diff
</font> %endif
 
 %if 0%{?_build_mpfr}
<font color='#997700'>@@ -360,7 +356,7 @@
</font>   ln -s ../libelf-%{libelf_version} gcc-%{gcc_pkgvers}/libelf
 %endif
 
<font color='#880000'>-echo "RTEMS gcc-%{gcc_version}-4%{?dist}/newlib-%{newlib_version}-14%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE
</font><font color='#000088'>+echo "RTEMS gcc-%{gcc_version}-5%{?dist}/newlib-%{newlib_version}-15%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE
</font> 
 
   # Fix timestamps
<font color='#997700'>@@ -405,6 +401,7 @@
</font>     %{?with_lto:--enable-lto}%{!?with_lto:--disable-lto} \
     %{?with_plugin:--enable-plugin}%{!?with_plugin:--disable-plugin} \
     --enable-newlib-io-c99-formats \
<font color='#000088'>+    %{?with_iconv:--enable-newlib-iconv} \
</font>     --enable-languages="$languages"
 
 %if "%_host" != "%_build"
<font color='#997700'>@@ -473,13 +470,20 @@
</font>     rmdir ${RPM_BUILD_ROOT}%{_prefix}/mips-rtems4.11/include/bits
   fi
 
<font color='#880000'>-  # gcc >= 4.5.0: installs weird libstdc++ python bindings.
</font><font color='#000088'>+%if %{with iconv}
+  # Iconv enabled newlib installs external ccts (target files)
+  if test -d ${RPM_BUILD_ROOT}%{_datadir}/iconv_data; then
+    rm -rf ${RPM_BUILD_ROOT}%{_datadir}/iconv_data
+  fi
+%endif
+
</font> %if ! %{with pygdb}
<font color='#000088'>+  # gcc >= 4.5.0: installs weird libstdc++ python bindings.
</font>   if test -d ${RPM_BUILD_ROOT}%{_datadir}/gcc-%{gcc_version}/python; then
     rm -rf ${RPM_BUILD_ROOT}%{_datadir}/gcc-%{gcc_version}/python/libstdcxx
   fi
<font color='#880000'>-%endif
</font> 
<font color='#000088'>+%endif
</font>   # Collect multilib subdirectories
   multilibs=`build/gcc/xgcc -Bbuild/gcc/ --print-multi-lib | sed -e 's,;.*$,,'`
 
<font color='#997700'>@@ -637,7 +641,7 @@
</font> # Group:          Development/Tools
 # Version:        %{gcc_rpmvers}
 # Requires:       rtems-4.11-mips-rtems4.11-binutils
<font color='#880000'>-# Requires:       rtems-4.11-mips-rtems4.11-newlib = %{newlib_version}-14%{?dist}
</font><font color='#000088'>+# Requires:       rtems-4.11-mips-rtems4.11-newlib = %{newlib_version}-15%{?dist}
</font> # License:        GPL
 
 # %if %build_infos
<font color='#997700'>@@ -655,7 +659,7 @@
</font> Group:          Development/Tools
 Version:        %{gcc_rpmvers}
 %{?_with_noarch_subpackages:BuildArch: noarch}
<font color='#880000'>-Requires:       rtems-4.11-mips-rtems4.11-newlib = %{newlib_version}-14%{?dist}
</font><font color='#000088'>+Requires:       rtems-4.11-mips-rtems4.11-newlib = %{newlib_version}-15%{?dist}
</font> License:  GPL
 
 %description -n rtems-4.11-mips-rtems4.11-gcc-libgcc
<font color='#997700'>@@ -834,7 +838,7 @@
</font> Group:<span style="background-color: #FF0000"> </span>              Development/Tools
 License:       Distributable
 Version:       %{newlib_version}
<font color='#880000'>-Release:        14%{?dist}
</font><font color='#000088'>+Release:        15%{?dist}
</font> %{?_with_noarch_subpackages:BuildArch: noarch}
 
 Requires:      rtems-4.11-newlib-common
<font color='#997700'>@@ -855,7 +859,7 @@
</font> Summary:  Base package for RTEMS newlib C Library
 Group:          Development/Tools
 Version:        %{newlib_version}
<font color='#880000'>-Release:        14%{?dist}
</font><font color='#000088'>+Release:        15%{?dist}
</font> %{?_with_noarch_subpackages:BuildArch: noarch}
 License:       Distributable
 

<font color='#006600'>diff -u rtems/contrib/crossrpms/rtems4.11/powerpc/rtems-4.11-powerpc-rtems4.11-gcc.spec:1.57 rtems/contrib/crossrpms/rtems4.11/powerpc/rtems-4.11-powerpc-rtems4.11-gcc.spec:1.58
--- rtems/contrib/crossrpms/rtems4.11/powerpc/rtems-4.11-powerpc-rtems4.11-gcc.spec:1.57        Wed Jul 20 01:46:47 2011
+++ rtems/contrib/crossrpms/rtems4.11/powerpc/rtems-4.11-powerpc-rtems4.11-gcc.spec     Sun Jul 24 09:17:54 2011
</font><font color='#997700'>@@ -58,7 +58,7 @@
</font> 
 Group: <span style="background-color: #FF0000">      </span>     Development/Tools
 Version:        %{gcc_rpmvers}
<font color='#880000'>-Release:<span style="background-color: #FF0000">      </span>        4%{?dist}
</font><font color='#000088'>+Release:<span style="background-color: #FF0000">      </span>   5%{?dist}
</font> License:<span style="background-color: #FF0000">      </span>       GPL
 URL:           http://gcc.gnu.org
 BuildRoot:     %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
<font color='#997700'>@@ -82,6 +82,9 @@
</font> # Should be applicable to gcc >= 4.5.0
 %bcond_with gcc_stdint
 
<font color='#000088'>+# EXPERIMENTAL: Enable newlib's iconv
+%bcond_without iconv
+
</font> # versions of libraries, we conditionally bundle if necessary
 %global mpc_version    0.8.1
 %global mpfr_version   2.4.2
<font color='#997700'>@@ -107,12 +110,6 @@
</font> %global gmp_provided 4.3.1
 %endif
 
<font color='#880000'>-%if 0%{?fc13}
-%global mpc_provided 0.8.1
-%global mpfr_provided 2.4.2
-%global gmp_provided 4.3.1
-%endif
-
</font> %if 0%{?el6}
 %global mpc_provided %{nil}
 %global mpfr_provided 2.4.1
<font color='#997700'>@@ -209,7 +206,6 @@
</font> 
 
 %if %{defined cloog_required}
<font color='#880000'>-%{?fc13:BuildRequires: cloog-ppl-devel >= %cloog_required}
</font> %{?fc14:BuildRequires: cloog-ppl-devel >= %cloog_required}
 %{?fc15:BuildRequires: cloog-ppl-devel >= %cloog_required}
 %{?fc16:BuildRequires: cloog-ppl-devel >= %cloog_required}
<font color='#997700'>@@ -245,7 +241,7 @@
</font> Requires: rtems-4.11-gcc-common
 Requires:      rtems-4.11-powerpc-rtems4.11-binutils
 Requires:      rtems-4.11-powerpc-rtems4.11-gcc-libgcc = %{gcc_rpmvers}-%{release}
<font color='#880000'>-Requires:  rtems-4.11-powerpc-rtems4.11-newlib = %{newlib_version}-14%{?dist}
</font><font color='#000088'>+Requires:     rtems-4.11-powerpc-rtems4.11-newlib = %{newlib_version}-15%{?dist}
</font> 
 %if "%{gcc_version}" >= "4.5.0"
 BuildRequires:  zlib-devel
<font color='#997700'>@@ -276,7 +272,7 @@
</font> 
 %if "%{newlib_version}" == "1.19.0"
 Source50:      ftp://sources.redhat.com/pub/newlib/newlib-%{newlib_pkgvers}.tar.gz
<font color='#880000'>-Patch50:   ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/newlib-1.19.0-rtems4.11-20110720.diff
</font><font color='#000088'>+Patch50:      ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/newlib-1.19.0-rtems4.11-20110724.diff
</font> %endif
 
 %if 0%{?_build_mpfr}
<font color='#997700'>@@ -360,7 +356,7 @@
</font>   ln -s ../libelf-%{libelf_version} gcc-%{gcc_pkgvers}/libelf
 %endif
 
<font color='#880000'>-echo "RTEMS gcc-%{gcc_version}-4%{?dist}/newlib-%{newlib_version}-14%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE
</font><font color='#000088'>+echo "RTEMS gcc-%{gcc_version}-5%{?dist}/newlib-%{newlib_version}-15%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE
</font> 
 
   # Fix timestamps
<font color='#997700'>@@ -405,6 +401,7 @@
</font>     %{?with_lto:--enable-lto}%{!?with_lto:--disable-lto} \
     %{?with_plugin:--enable-plugin}%{!?with_plugin:--disable-plugin} \
     --enable-newlib-io-c99-formats \
<font color='#000088'>+    %{?with_iconv:--enable-newlib-iconv} \
</font>     --enable-languages="$languages"
 
 %if "%_host" != "%_build"
<font color='#997700'>@@ -473,13 +470,20 @@
</font>     rmdir ${RPM_BUILD_ROOT}%{_prefix}/powerpc-rtems4.11/include/bits
   fi
 
<font color='#880000'>-  # gcc >= 4.5.0: installs weird libstdc++ python bindings.
</font><font color='#000088'>+%if %{with iconv}
+  # Iconv enabled newlib installs external ccts (target files)
+  if test -d ${RPM_BUILD_ROOT}%{_datadir}/iconv_data; then
+    rm -rf ${RPM_BUILD_ROOT}%{_datadir}/iconv_data
+  fi
+%endif
+
</font> %if ! %{with pygdb}
<font color='#000088'>+  # gcc >= 4.5.0: installs weird libstdc++ python bindings.
</font>   if test -d ${RPM_BUILD_ROOT}%{_datadir}/gcc-%{gcc_version}/python; then
     rm -rf ${RPM_BUILD_ROOT}%{_datadir}/gcc-%{gcc_version}/python/libstdcxx
   fi
<font color='#880000'>-%endif
</font> 
<font color='#000088'>+%endif
</font>   # Collect multilib subdirectories
   multilibs=`build/gcc/xgcc -Bbuild/gcc/ --print-multi-lib | sed -e 's,;.*$,,'`
 
<font color='#997700'>@@ -637,7 +641,7 @@
</font> # Group:          Development/Tools
 # Version:        %{gcc_rpmvers}
 # Requires:       rtems-4.11-powerpc-rtems4.11-binutils
<font color='#880000'>-# Requires:       rtems-4.11-powerpc-rtems4.11-newlib = %{newlib_version}-14%{?dist}
</font><font color='#000088'>+# Requires:       rtems-4.11-powerpc-rtems4.11-newlib = %{newlib_version}-15%{?dist}
</font> # License:        GPL
 
 # %if %build_infos
<font color='#997700'>@@ -655,7 +659,7 @@
</font> Group:          Development/Tools
 Version:        %{gcc_rpmvers}
 %{?_with_noarch_subpackages:BuildArch: noarch}
<font color='#880000'>-Requires:       rtems-4.11-powerpc-rtems4.11-newlib = %{newlib_version}-14%{?dist}
</font><font color='#000088'>+Requires:       rtems-4.11-powerpc-rtems4.11-newlib = %{newlib_version}-15%{?dist}
</font> License:  GPL
 
 %description -n rtems-4.11-powerpc-rtems4.11-gcc-libgcc
<font color='#997700'>@@ -834,7 +838,7 @@
</font> Group:<span style="background-color: #FF0000"> </span>              Development/Tools
 License:       Distributable
 Version:       %{newlib_version}
<font color='#880000'>-Release:        14%{?dist}
</font><font color='#000088'>+Release:        15%{?dist}
</font> %{?_with_noarch_subpackages:BuildArch: noarch}
 
 Requires:      rtems-4.11-newlib-common
<font color='#997700'>@@ -855,7 +859,7 @@
</font> Summary:  Base package for RTEMS newlib C Library
 Group:          Development/Tools
 Version:        %{newlib_version}
<font color='#880000'>-Release:        14%{?dist}
</font><font color='#000088'>+Release:        15%{?dist}
</font> %{?_with_noarch_subpackages:BuildArch: noarch}
 License:       Distributable
 

<font color='#006600'>diff -u rtems/contrib/crossrpms/rtems4.11/sh/rtems-4.11-sh-rtems4.11-gcc.spec:1.57 rtems/contrib/crossrpms/rtems4.11/sh/rtems-4.11-sh-rtems4.11-gcc.spec:1.58
--- rtems/contrib/crossrpms/rtems4.11/sh/rtems-4.11-sh-rtems4.11-gcc.spec:1.57  Wed Jul 20 01:46:47 2011
+++ rtems/contrib/crossrpms/rtems4.11/sh/rtems-4.11-sh-rtems4.11-gcc.spec       Sun Jul 24 09:17:54 2011
</font><font color='#997700'>@@ -58,7 +58,7 @@
</font> 
 Group: <span style="background-color: #FF0000">      </span>     Development/Tools
 Version:        %{gcc_rpmvers}
<font color='#880000'>-Release:<span style="background-color: #FF0000">      </span>        4%{?dist}
</font><font color='#000088'>+Release:<span style="background-color: #FF0000">      </span>   5%{?dist}
</font> License:<span style="background-color: #FF0000">      </span>       GPL
 URL:           http://gcc.gnu.org
 BuildRoot:     %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
<font color='#997700'>@@ -82,6 +82,9 @@
</font> # Should be applicable to gcc >= 4.5.0
 %bcond_with gcc_stdint
 
<font color='#000088'>+# EXPERIMENTAL: Enable newlib's iconv
+%bcond_without iconv
+
</font> # versions of libraries, we conditionally bundle if necessary
 %global mpc_version    0.8.1
 %global mpfr_version   2.4.2
<font color='#997700'>@@ -107,12 +110,6 @@
</font> %global gmp_provided 4.3.1
 %endif
 
<font color='#880000'>-%if 0%{?fc13}
-%global mpc_provided 0.8.1
-%global mpfr_provided 2.4.2
-%global gmp_provided 4.3.1
-%endif
-
</font> %if 0%{?el6}
 %global mpc_provided %{nil}
 %global mpfr_provided 2.4.1
<font color='#997700'>@@ -209,7 +206,6 @@
</font> 
 
 %if %{defined cloog_required}
<font color='#880000'>-%{?fc13:BuildRequires: cloog-ppl-devel >= %cloog_required}
</font> %{?fc14:BuildRequires: cloog-ppl-devel >= %cloog_required}
 %{?fc15:BuildRequires: cloog-ppl-devel >= %cloog_required}
 %{?fc16:BuildRequires: cloog-ppl-devel >= %cloog_required}
<font color='#997700'>@@ -245,7 +241,7 @@
</font> Requires: rtems-4.11-gcc-common
 Requires:      rtems-4.11-sh-rtems4.11-binutils
 Requires:      rtems-4.11-sh-rtems4.11-gcc-libgcc = %{gcc_rpmvers}-%{release}
<font color='#880000'>-Requires:  rtems-4.11-sh-rtems4.11-newlib = %{newlib_version}-14%{?dist}
</font><font color='#000088'>+Requires:     rtems-4.11-sh-rtems4.11-newlib = %{newlib_version}-15%{?dist}
</font> 
 %if "%{gcc_version}" >= "4.5.0"
 BuildRequires:  zlib-devel
<font color='#997700'>@@ -276,7 +272,7 @@
</font> 
 %if "%{newlib_version}" == "1.19.0"
 Source50:      ftp://sources.redhat.com/pub/newlib/newlib-%{newlib_pkgvers}.tar.gz
<font color='#880000'>-Patch50:   ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/newlib-1.19.0-rtems4.11-20110720.diff
</font><font color='#000088'>+Patch50:      ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/newlib-1.19.0-rtems4.11-20110724.diff
</font> %endif
 
 %if 0%{?_build_mpfr}
<font color='#997700'>@@ -360,7 +356,7 @@
</font>   ln -s ../libelf-%{libelf_version} gcc-%{gcc_pkgvers}/libelf
 %endif
 
<font color='#880000'>-echo "RTEMS gcc-%{gcc_version}-4%{?dist}/newlib-%{newlib_version}-14%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE
</font><font color='#000088'>+echo "RTEMS gcc-%{gcc_version}-5%{?dist}/newlib-%{newlib_version}-15%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE
</font> 
 
   # Fix timestamps
<font color='#997700'>@@ -405,6 +401,7 @@
</font>     %{?with_lto:--enable-lto}%{!?with_lto:--disable-lto} \
     %{?with_plugin:--enable-plugin}%{!?with_plugin:--disable-plugin} \
     --enable-newlib-io-c99-formats \
<font color='#000088'>+    %{?with_iconv:--enable-newlib-iconv} \
</font>     --enable-languages="$languages"
 
 %if "%_host" != "%_build"
<font color='#997700'>@@ -473,13 +470,20 @@
</font>     rmdir ${RPM_BUILD_ROOT}%{_prefix}/sh-rtems4.11/include/bits
   fi
 
<font color='#880000'>-  # gcc >= 4.5.0: installs weird libstdc++ python bindings.
</font><font color='#000088'>+%if %{with iconv}
+  # Iconv enabled newlib installs external ccts (target files)
+  if test -d ${RPM_BUILD_ROOT}%{_datadir}/iconv_data; then
+    rm -rf ${RPM_BUILD_ROOT}%{_datadir}/iconv_data
+  fi
+%endif
+
</font> %if ! %{with pygdb}
<font color='#000088'>+  # gcc >= 4.5.0: installs weird libstdc++ python bindings.
</font>   if test -d ${RPM_BUILD_ROOT}%{_datadir}/gcc-%{gcc_version}/python; then
     rm -rf ${RPM_BUILD_ROOT}%{_datadir}/gcc-%{gcc_version}/python/libstdcxx
   fi
<font color='#880000'>-%endif
</font> 
<font color='#000088'>+%endif
</font>   # Collect multilib subdirectories
   multilibs=`build/gcc/xgcc -Bbuild/gcc/ --print-multi-lib | sed -e 's,;.*$,,'`
 
<font color='#997700'>@@ -637,7 +641,7 @@
</font> # Group:          Development/Tools
 # Version:        %{gcc_rpmvers}
 # Requires:       rtems-4.11-sh-rtems4.11-binutils
<font color='#880000'>-# Requires:       rtems-4.11-sh-rtems4.11-newlib = %{newlib_version}-14%{?dist}
</font><font color='#000088'>+# Requires:       rtems-4.11-sh-rtems4.11-newlib = %{newlib_version}-15%{?dist}
</font> # License:        GPL
 
 # %if %build_infos
<font color='#997700'>@@ -655,7 +659,7 @@
</font> Group:          Development/Tools
 Version:        %{gcc_rpmvers}
 %{?_with_noarch_subpackages:BuildArch: noarch}
<font color='#880000'>-Requires:       rtems-4.11-sh-rtems4.11-newlib = %{newlib_version}-14%{?dist}
</font><font color='#000088'>+Requires:       rtems-4.11-sh-rtems4.11-newlib = %{newlib_version}-15%{?dist}
</font> License:  GPL
 
 %description -n rtems-4.11-sh-rtems4.11-gcc-libgcc
<font color='#997700'>@@ -834,7 +838,7 @@
</font> Group:<span style="background-color: #FF0000"> </span>              Development/Tools
 License:       Distributable
 Version:       %{newlib_version}
<font color='#880000'>-Release:        14%{?dist}
</font><font color='#000088'>+Release:        15%{?dist}
</font> %{?_with_noarch_subpackages:BuildArch: noarch}
 
 Requires:      rtems-4.11-newlib-common
<font color='#997700'>@@ -855,7 +859,7 @@
</font> Summary:  Base package for RTEMS newlib C Library
 Group:          Development/Tools
 Version:        %{newlib_version}
<font color='#880000'>-Release:        14%{?dist}
</font><font color='#000088'>+Release:        15%{?dist}
</font> %{?_with_noarch_subpackages:BuildArch: noarch}
 License:       Distributable
 

<font color='#006600'>diff -u rtems/contrib/crossrpms/rtems4.11/sparc/rtems-4.11-sparc-rtems4.11-gcc.spec:1.60 rtems/contrib/crossrpms/rtems4.11/sparc/rtems-4.11-sparc-rtems4.11-gcc.spec:1.61
--- rtems/contrib/crossrpms/rtems4.11/sparc/rtems-4.11-sparc-rtems4.11-gcc.spec:1.60    Wed Jul 20 01:46:47 2011
+++ rtems/contrib/crossrpms/rtems4.11/sparc/rtems-4.11-sparc-rtems4.11-gcc.spec Sun Jul 24 09:17:54 2011
</font><font color='#997700'>@@ -58,7 +58,7 @@
</font> 
 Group: <span style="background-color: #FF0000">      </span>     Development/Tools
 Version:        %{gcc_rpmvers}
<font color='#880000'>-Release:<span style="background-color: #FF0000">      </span>        4%{?dist}
</font><font color='#000088'>+Release:<span style="background-color: #FF0000">      </span>   5%{?dist}
</font> License:<span style="background-color: #FF0000">      </span>       GPL
 URL:           http://gcc.gnu.org
 BuildRoot:     %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
<font color='#997700'>@@ -82,6 +82,9 @@
</font> # Should be applicable to gcc >= 4.5.0
 %bcond_with gcc_stdint
 
<font color='#000088'>+# EXPERIMENTAL: Enable newlib's iconv
+%bcond_without iconv
+
</font> # versions of libraries, we conditionally bundle if necessary
 %global mpc_version    0.8.1
 %global mpfr_version   2.4.2
<font color='#997700'>@@ -107,12 +110,6 @@
</font> %global gmp_provided 4.3.1
 %endif
 
<font color='#880000'>-%if 0%{?fc13}
-%global mpc_provided 0.8.1
-%global mpfr_provided 2.4.2
-%global gmp_provided 4.3.1
-%endif
-
</font> %if 0%{?el6}
 %global mpc_provided %{nil}
 %global mpfr_provided 2.4.1
<font color='#997700'>@@ -209,7 +206,6 @@
</font> 
 
 %if %{defined cloog_required}
<font color='#880000'>-%{?fc13:BuildRequires: cloog-ppl-devel >= %cloog_required}
</font> %{?fc14:BuildRequires: cloog-ppl-devel >= %cloog_required}
 %{?fc15:BuildRequires: cloog-ppl-devel >= %cloog_required}
 %{?fc16:BuildRequires: cloog-ppl-devel >= %cloog_required}
<font color='#997700'>@@ -245,7 +241,7 @@
</font> Requires: rtems-4.11-gcc-common
 Requires:      rtems-4.11-sparc-rtems4.11-binutils
 Requires:      rtems-4.11-sparc-rtems4.11-gcc-libgcc = %{gcc_rpmvers}-%{release}
<font color='#880000'>-Requires:  rtems-4.11-sparc-rtems4.11-newlib = %{newlib_version}-14%{?dist}
</font><font color='#000088'>+Requires:     rtems-4.11-sparc-rtems4.11-newlib = %{newlib_version}-15%{?dist}
</font> 
 %if "%{gcc_version}" >= "4.5.0"
 BuildRequires:  zlib-devel
<font color='#997700'>@@ -276,7 +272,7 @@
</font> 
 %if "%{newlib_version}" == "1.19.0"
 Source50:      ftp://sources.redhat.com/pub/newlib/newlib-%{newlib_pkgvers}.tar.gz
<font color='#880000'>-Patch50:   ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/newlib-1.19.0-rtems4.11-20110720.diff
</font><font color='#000088'>+Patch50:      ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/newlib-1.19.0-rtems4.11-20110724.diff
</font> %endif
 
 %if 0%{?_build_mpfr}
<font color='#997700'>@@ -360,7 +356,7 @@
</font>   ln -s ../libelf-%{libelf_version} gcc-%{gcc_pkgvers}/libelf
 %endif
 
<font color='#880000'>-echo "RTEMS gcc-%{gcc_version}-4%{?dist}/newlib-%{newlib_version}-14%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE
</font><font color='#000088'>+echo "RTEMS gcc-%{gcc_version}-5%{?dist}/newlib-%{newlib_version}-15%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE
</font> 
 
   # Fix timestamps
<font color='#997700'>@@ -405,6 +401,7 @@
</font>     %{?with_lto:--enable-lto}%{!?with_lto:--disable-lto} \
     %{?with_plugin:--enable-plugin}%{!?with_plugin:--disable-plugin} \
     --enable-newlib-io-c99-formats \
<font color='#000088'>+    %{?with_iconv:--enable-newlib-iconv} \
</font>     --enable-languages="$languages"
 
 %if "%_host" != "%_build"
<font color='#997700'>@@ -473,13 +470,20 @@
</font>     rmdir ${RPM_BUILD_ROOT}%{_prefix}/sparc-rtems4.11/include/bits
   fi
 
<font color='#880000'>-  # gcc >= 4.5.0: installs weird libstdc++ python bindings.
</font><font color='#000088'>+%if %{with iconv}
+  # Iconv enabled newlib installs external ccts (target files)
+  if test -d ${RPM_BUILD_ROOT}%{_datadir}/iconv_data; then
+    rm -rf ${RPM_BUILD_ROOT}%{_datadir}/iconv_data
+  fi
+%endif
+
</font> %if ! %{with pygdb}
<font color='#000088'>+  # gcc >= 4.5.0: installs weird libstdc++ python bindings.
</font>   if test -d ${RPM_BUILD_ROOT}%{_datadir}/gcc-%{gcc_version}/python; then
     rm -rf ${RPM_BUILD_ROOT}%{_datadir}/gcc-%{gcc_version}/python/libstdcxx
   fi
<font color='#880000'>-%endif
</font> 
<font color='#000088'>+%endif
</font>   # Collect multilib subdirectories
   multilibs=`build/gcc/xgcc -Bbuild/gcc/ --print-multi-lib | sed -e 's,;.*$,,'`
 
<font color='#997700'>@@ -637,7 +641,7 @@
</font> # Group:          Development/Tools
 # Version:        %{gcc_rpmvers}
 # Requires:       rtems-4.11-sparc-rtems4.11-binutils
<font color='#880000'>-# Requires:       rtems-4.11-sparc-rtems4.11-newlib = %{newlib_version}-14%{?dist}
</font><font color='#000088'>+# Requires:       rtems-4.11-sparc-rtems4.11-newlib = %{newlib_version}-15%{?dist}
</font> # License:        GPL
 
 # %if %build_infos
<font color='#997700'>@@ -655,7 +659,7 @@
</font> Group:          Development/Tools
 Version:        %{gcc_rpmvers}
 %{?_with_noarch_subpackages:BuildArch: noarch}
<font color='#880000'>-Requires:       rtems-4.11-sparc-rtems4.11-newlib = %{newlib_version}-14%{?dist}
</font><font color='#000088'>+Requires:       rtems-4.11-sparc-rtems4.11-newlib = %{newlib_version}-15%{?dist}
</font> License:  GPL
 
 %description -n rtems-4.11-sparc-rtems4.11-gcc-libgcc
<font color='#997700'>@@ -834,7 +838,7 @@
</font> Group:<span style="background-color: #FF0000"> </span>              Development/Tools
 License:       Distributable
 Version:       %{newlib_version}
<font color='#880000'>-Release:        14%{?dist}
</font><font color='#000088'>+Release:        15%{?dist}
</font> %{?_with_noarch_subpackages:BuildArch: noarch}
 
 Requires:      rtems-4.11-newlib-common
<font color='#997700'>@@ -855,7 +859,7 @@
</font> Summary:  Base package for RTEMS newlib C Library
 Group:          Development/Tools
 Version:        %{newlib_version}
<font color='#880000'>-Release:        14%{?dist}
</font><font color='#000088'>+Release:        15%{?dist}
</font> %{?_with_noarch_subpackages:BuildArch: noarch}
 License:       Distributable
 

<font color='#006600'>diff -u rtems/contrib/crossrpms/rtems4.11/sparc64/rtems-4.11-sparc64-rtems4.11-gcc.spec:1.42 rtems/contrib/crossrpms/rtems4.11/sparc64/rtems-4.11-sparc64-rtems4.11-gcc.spec:1.43
--- rtems/contrib/crossrpms/rtems4.11/sparc64/rtems-4.11-sparc64-rtems4.11-gcc.spec:1.42        Wed Jul 20 01:46:47 2011
+++ rtems/contrib/crossrpms/rtems4.11/sparc64/rtems-4.11-sparc64-rtems4.11-gcc.spec     Sun Jul 24 09:17:54 2011
</font><font color='#997700'>@@ -58,7 +58,7 @@
</font> 
 Group: <span style="background-color: #FF0000">      </span>     Development/Tools
 Version:        %{gcc_rpmvers}
<font color='#880000'>-Release:<span style="background-color: #FF0000">      </span>        4%{?dist}
</font><font color='#000088'>+Release:<span style="background-color: #FF0000">      </span>   5%{?dist}
</font> License:<span style="background-color: #FF0000">      </span>       GPL
 URL:           http://gcc.gnu.org
 BuildRoot:     %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
<font color='#997700'>@@ -82,6 +82,9 @@
</font> # Should be applicable to gcc >= 4.5.0
 %bcond_with gcc_stdint
 
<font color='#000088'>+# EXPERIMENTAL: Enable newlib's iconv
+%bcond_without iconv
+
</font> # versions of libraries, we conditionally bundle if necessary
 %global mpc_version    0.8.1
 %global mpfr_version   2.4.2
<font color='#997700'>@@ -107,12 +110,6 @@
</font> %global gmp_provided 4.3.1
 %endif
 
<font color='#880000'>-%if 0%{?fc13}
-%global mpc_provided 0.8.1
-%global mpfr_provided 2.4.2
-%global gmp_provided 4.3.1
-%endif
-
</font> %if 0%{?el6}
 %global mpc_provided %{nil}
 %global mpfr_provided 2.4.1
<font color='#997700'>@@ -209,7 +206,6 @@
</font> 
 
 %if %{defined cloog_required}
<font color='#880000'>-%{?fc13:BuildRequires: cloog-ppl-devel >= %cloog_required}
</font> %{?fc14:BuildRequires: cloog-ppl-devel >= %cloog_required}
 %{?fc15:BuildRequires: cloog-ppl-devel >= %cloog_required}
 %{?fc16:BuildRequires: cloog-ppl-devel >= %cloog_required}
<font color='#997700'>@@ -245,7 +241,7 @@
</font> Requires: rtems-4.11-gcc-common
 Requires:      rtems-4.11-sparc64-rtems4.11-binutils
 Requires:      rtems-4.11-sparc64-rtems4.11-gcc-libgcc = %{gcc_rpmvers}-%{release}
<font color='#880000'>-Requires:  rtems-4.11-sparc64-rtems4.11-newlib = %{newlib_version}-14%{?dist}
</font><font color='#000088'>+Requires:     rtems-4.11-sparc64-rtems4.11-newlib = %{newlib_version}-15%{?dist}
</font> 
 %if "%{gcc_version}" >= "4.5.0"
 BuildRequires:  zlib-devel
<font color='#997700'>@@ -276,7 +272,7 @@
</font> 
 %if "%{newlib_version}" == "1.19.0"
 Source50:      ftp://sources.redhat.com/pub/newlib/newlib-%{newlib_pkgvers}.tar.gz
<font color='#880000'>-Patch50:   ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/newlib-1.19.0-rtems4.11-20110720.diff
</font><font color='#000088'>+Patch50:      ftp://ftp.rtems.org/pub/rtems/SOURCES/4.11/newlib-1.19.0-rtems4.11-20110724.diff
</font> %endif
 
 %if 0%{?_build_mpfr}
<font color='#997700'>@@ -360,7 +356,7 @@
</font>   ln -s ../libelf-%{libelf_version} gcc-%{gcc_pkgvers}/libelf
 %endif
 
<font color='#880000'>-echo "RTEMS gcc-%{gcc_version}-4%{?dist}/newlib-%{newlib_version}-14%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE
</font><font color='#000088'>+echo "RTEMS gcc-%{gcc_version}-5%{?dist}/newlib-%{newlib_version}-15%{?dist}" > gcc-%{gcc_pkgvers}/gcc/DEV-PHASE
</font> 
 
   # Fix timestamps
<font color='#997700'>@@ -405,6 +401,7 @@
</font>     %{?with_lto:--enable-lto}%{!?with_lto:--disable-lto} \
     %{?with_plugin:--enable-plugin}%{!?with_plugin:--disable-plugin} \
     --enable-newlib-io-c99-formats \
<font color='#000088'>+    %{?with_iconv:--enable-newlib-iconv} \
</font>     --enable-languages="$languages"
 
 %if "%_host" != "%_build"
<font color='#997700'>@@ -473,13 +470,20 @@
</font>     rmdir ${RPM_BUILD_ROOT}%{_prefix}/sparc64-rtems4.11/include/bits
   fi
 
<font color='#880000'>-  # gcc >= 4.5.0: installs weird libstdc++ python bindings.
</font><font color='#000088'>+%if %{with iconv}
+  # Iconv enabled newlib installs external ccts (target files)
+  if test -d ${RPM_BUILD_ROOT}%{_datadir}/iconv_data; then
+    rm -rf ${RPM_BUILD_ROOT}%{_datadir}/iconv_data
+  fi
+%endif
+
</font> %if ! %{with pygdb}
<font color='#000088'>+  # gcc >= 4.5.0: installs weird libstdc++ python bindings.
</font>   if test -d ${RPM_BUILD_ROOT}%{_datadir}/gcc-%{gcc_version}/python; then
     rm -rf ${RPM_BUILD_ROOT}%{_datadir}/gcc-%{gcc_version}/python/libstdcxx
   fi
<font color='#880000'>-%endif
</font> 
<font color='#000088'>+%endif
</font>   # Collect multilib subdirectories
   multilibs=`build/gcc/xgcc -Bbuild/gcc/ --print-multi-lib | sed -e 's,;.*$,,'`
 
<font color='#997700'>@@ -637,7 +641,7 @@
</font> # Group:          Development/Tools
 # Version:        %{gcc_rpmvers}
 # Requires:       rtems-4.11-sparc64-rtems4.11-binutils
<font color='#880000'>-# Requires:       rtems-4.11-sparc64-rtems4.11-newlib = %{newlib_version}-14%{?dist}
</font><font color='#000088'>+# Requires:       rtems-4.11-sparc64-rtems4.11-newlib = %{newlib_version}-15%{?dist}
</font> # License:        GPL
 
 # %if %build_infos
<font color='#997700'>@@ -655,7 +659,7 @@
</font> Group:          Development/Tools
 Version:        %{gcc_rpmvers}
 %{?_with_noarch_subpackages:BuildArch: noarch}
<font color='#880000'>-Requires:       rtems-4.11-sparc64-rtems4.11-newlib = %{newlib_version}-14%{?dist}
</font><font color='#000088'>+Requires:       rtems-4.11-sparc64-rtems4.11-newlib = %{newlib_version}-15%{?dist}
</font> License:  GPL
 
 %description -n rtems-4.11-sparc64-rtems4.11-gcc-libgcc
<font color='#997700'>@@ -834,7 +838,7 @@
</font> Group:<span style="background-color: #FF0000"> </span>              Development/Tools
 License:       Distributable
 Version:       %{newlib_version}
<font color='#880000'>-Release:        14%{?dist}
</font><font color='#000088'>+Release:        15%{?dist}
</font> %{?_with_noarch_subpackages:BuildArch: noarch}
 
 Requires:      rtems-4.11-newlib-common
<font color='#997700'>@@ -855,7 +859,7 @@
</font> Summary:  Base package for RTEMS newlib C Library
 Group:          Development/Tools
 Version:        %{newlib_version}
<font color='#880000'>-Release:        14%{?dist}
</font><font color='#000088'>+Release:        15%{?dist}
</font> %{?_with_noarch_subpackages:BuildArch: noarch}
 License:       Distributable
 
</pre>
<p> </p>

<p>--<br />
<small>Generated by <a href="http://www.codewiz.org/projects/index.html#loginfo">Deluxe Loginfo</a> 2.122 by Bernardo Innocenti <bernie@develer.com></small></p>
</body>
</html>