newlib: fixup missing bits + make compile for 32bit.
authorSimon Gerber <simon.gerber@inf.ethz.ch>
Mon, 1 Jun 2015 15:16:19 +0000 (17:16 +0200)
committerSimon Gerber <simon.gerber@inf.ethz.ch>
Mon, 1 Jun 2015 15:16:19 +0000 (17:16 +0200)
Signed-off-by: Simon Gerber <simon.gerber@inf.ethz.ch>

include/sys/types.h
lib/newlib/newlib/libc/include/inttypes.h
lib/newlib/newlib/libc/string/Hakefile

index 635c220..c0f9217 100644 (file)
@@ -99,8 +99,9 @@ typedef __clockid_t     clockid_t;
 #define _CLOCKID_T_DECLARED
 #endif
 
-#ifndef _TIME_T_DECLARED
+#ifndef __time_t_defined
 typedef __time_t  time_t;
+#define __time_t_defined
 #define _TIME_T_DECLARED
 #endif
 
index 1119fbd..bd62da2 100644 (file)
 #define SCNxFAST16     __SCN16(x)
 
 /* 32-bit types */
-#if __have_long32
+// XXX: PRI*32 l##x for 32-bit Barrelfish makes problems. -SG, 2015-06-01.
+#if __have_long32 && !defined(BARRELFISH)
 #define __PRI32(x) __STRINGIFY(l##x)
 #define __SCN32(x) __STRINGIFY(l##x)
 #else
index 85e42f8..bedc33d 100644 (file)
@@ -30,6 +30,7 @@ if Config.libc == "newlib" then [ build library {
     "strcspn.c",
     "strdup.c",
     "strdup_r.c",
+    "strerror.c",
     "strlcat.c",
     "strlcpy.c",
     "strlen.c",