2005/12/8, Paul Brook <paul@codesourcery.com>:
This breaks arm-none-eabi (and probably also arm-none-elf) with
libgloss/arm/libcfunc.c:81: error: syntax error before "useconds"
The definition of useconds_t in newlib/libc/include/sys/types.h is conditional
on #if defined(__CYGWIN__) || defined(__rtems__)
Paul
Ah, yes. The above line, which is repeated over and over, is truly the
bane of my newlib existence these days. I suggest removing the armour.
Please apply.
Cheers,
Shaun
2005-12-08 Shaun Jackman <sjackman@gmail.com>
* libc/include/sys/types.h: Remove the ifdef armour around
standard POSIX types.
Index: newlib/libc/include/sys/types.h
===================================================================
RCS file: /cvs/src/src/newlib/libc/include/sys/types.h,v
retrieving revision 1.21
diff -u -r1.21 types.h
--- newlib/libc/include/sys/types.h 6 Mar 2005 20:32:16 -0000 1.21
+++ newlib/libc/include/sys/types.h 8 Dec 2005 17:39:58 -0000
@@ -251,11 +251,6 @@
#undef __MS_types__
#undef _ST_INT32
-/* The following are actually standard POSIX 1003.1b-1993 threads, mutexes,
- condition variables, and keys. But since RTEMS is currently the only
- newlib user of these, the ifdef is just on RTEMS. */
-
-#if defined(__rtems__) || defined(__CYGWIN__)
#ifndef __clockid_t_defined
typedef _CLOCKID_T_ clockid_t;
@@ -267,9 +262,7 @@
#define __timer_t_defined
#endif
-#if defined(__CYGWIN__) || defined(__rtems__)
typedef long useconds_t;
-#endif
#include <sys/features.h>
@@ -380,8 +373,6 @@
#endif
#endif /* defined(_POSIX_THREADS) */
-#endif /* defined(__rtems__) */
-
#endif /* !__need_inttypes */
#undef __need_inttypes