This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Turn on posix directory for RTEMS


On Mon, 2008-11-17 at 17:07 -0500, Jeff Johnston wrote:
> Joel Sherrill wrote:
> > Hi Jeff,
> >
> > You and I discussed this a week or two ago and here
> > is the patch.  We had stubs for the exec* routines and
> > a copy of the *dir routines from around newlib 1.8.
> > After this is merged and Ralf turns the crank for
> > new RTEMS gcc/newlib RPMs with this, we can
> > delete some files from RTEMS.  :)
> >
> > 2008-11-05  Joel Sherrill <joel.sherrill@oarcorp.com>
> >
> >    * configure.host: RTEMS now uses posix subdirectory.
> >
> Patch checked in.  Sorry for the delay.

With this patch applied, I am not able to build any rtems-toolchain (!)
anymore:

...
In file included
from /builddir/build/BUILD/rtems-4.10-bfin-rtems4.10-gcc-4.3.2/gcc-4.3.2/newlib/libc/include/stdio.h:34,

from ../../../../../gcc-4.3.2/newlib/libc/posix/rune.h:40,

from ../../../../../gcc-4.3.2/newlib/libc/posix/collate.c:31:
/builddir/build/BUILD/rtems-4.10-bfin-rtems4.10-gcc-4.3.2/build/./gcc/include/stddef.h:214: error: conflicting types for 'size_t'
../../../../../gcc-4.3.2/newlib/libc/posix/runetype.h:54: error:
previous declaration of 'size_t' was here


AFAIS, this code suffers from its BSD-heritage, so I worked around it by
replacing the BSD-types in runetype.h with POSIX/susv3-types from
stddef.h.

Corresponding patch enclosed below.

Ralf

diff -Naur --exclude=CVS --exclude=.cvsignore --exclude='*~' --exclude='.#*' newlib-1.17.0.orig/newlib/libc/posix/runetype.h newlib-1.17.0/newlib/libc/posix/runetype.h
--- newlib-1.17.0.orig/newlib/libc/posix/runetype.h	2008-10-31 22:03:41.000000000 +0100
+++ newlib-1.17.0/newlib/libc/posix/runetype.h	2008-11-19 07:14:46.000000000 +0100
@@ -36,26 +36,15 @@
 #ifndef	_RUNETYPE_H_
 #define	_RUNETYPE_H_
 
+#include <stddef.h>
 #include <sys/cdefs.h>
 #include <machine/ansi.h>
 
 #ifdef	_BSD_RUNE_T_
 typedef	_BSD_RUNE_T_	rune_t;
 #undef	_BSD_RUNE_T_
-#endif
-
+#else
 typedef int rune_t;
-
-#ifdef	_BSD_SIZE_T_
-typedef	_BSD_SIZE_T_	size_t;
-#undef	_BSD_SIZE_T_
-#endif
-
-typedef unsigned int size_t;
-
-#ifdef	_BSD_WCHAR_T_
-typedef	_BSD_WCHAR_T_	wchar_t;
-#undef	_BSD_WCHAR_T_
 #endif
 
 #define	_CACHED_RUNES	(1 <<8 )	/* Must be a power of 2 */

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]