From 477463a2011ba81907a753df9ce7a71b6563db54 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Wed, 13 Apr 2016 13:10:15 +0200 Subject: Eliminate use of Newlib-specific This change solves a glibc/BSD compatibility problem. glibc and BSD use double underscore types for internal types. The Linux port of Newlib uses some glibc provided internal type definitions which are not protected by guard defines, e.g. __off_t. To avoid a conflict Newlib uses single underscore types for some internal types, e.g. _off_t. However, for BSD compatibility we have to define the internal types with double underscore names in . The header file is Newlib-specific. It was used instead of to provide the internal type definitions _CLOCK_T, _TIME_T_, _CLOCKID_T_, _TIMER_T_, and __suseconds_t. Move these definitions to (there exist two instances of this file, one for Linux and one for all other targets). This makes the _HAVE_SYSTYPES configuration define obsolete (could possibly break the __RDOS__ target). Use the standard include throughout. Move __loff_t defintion to default (non-Linux) . Define it via _off64_t to avoid a dependency on the compiler. Provide the __off_t definition via default (non-Linux) based on _off_t for all systems except Cygwin. For Cygwin use _off64_t. Define off_t via __off_t. Provide the __pid_t definition via default (non-Linux) . This prevents a potential __pid_t and pid_t incompatibility. Add BSD guard defines for pid_t. Signed-off-by: Sebastian Huber --- newlib/libc/include/sys/_timeval.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'newlib/libc/include/sys/_timeval.h') diff --git a/newlib/libc/include/sys/_timeval.h b/newlib/libc/include/sys/_timeval.h index 0a4c539d9..d813d1f5b 100644 --- a/newlib/libc/include/sys/_timeval.h +++ b/newlib/libc/include/sys/_timeval.h @@ -29,7 +29,7 @@ #ifndef _SYS__TIMEVAL_H_ #define _SYS__TIMEVAL_H_ -#include +#include #ifndef _SUSECONDS_T_DECLARED typedef __suseconds_t suseconds_t; -- cgit v1.2.3