Resurrect <machine/types.h> for <sys/types.h>
Resurrect <machine/_user_types.h> for use in <sys/types.h>. Newlib targets may provide an own version of <machine/types.h> in their machine directory to add custom user types for <sys/types.h>. Check the _SYS_TYPES_H header guard to prevent a direct include of <machine/types.h>, since the <machine/types.h> file is a Newlib speciality. Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
This commit is contained in:
committed by
Corinna Vinschen
parent
5c9403eaf4
commit
9bb91b6c6b
@ -1,11 +1,7 @@
|
||||
#ifndef _MACHTYPES_H_
|
||||
#define _MACHTYPES_H_
|
||||
|
||||
/*
|
||||
* This file is provided for backward compatibility. It is no longer used in
|
||||
* Newlib. Do not add new things to it.
|
||||
* Newlib targets may provide an own version of this file in their machine
|
||||
* directory to add custom user types for <sys/types.h>.
|
||||
*/
|
||||
|
||||
#include <sys/_types.h>
|
||||
|
||||
#endif /* _MACHTYPES_H_ */
|
||||
#ifndef _SYS_TYPES_H
|
||||
#error "must be included via <sys/types.h>"
|
||||
#endif /* !_SYS_TYPES_H */
|
||||
|
@ -199,11 +199,6 @@ int _EXFUN(sigaltstack, (const stack_t *__restrict, stack_t *__restrict));
|
||||
#endif
|
||||
|
||||
#if defined(_POSIX_THREADS)
|
||||
#ifdef __CYGWIN__
|
||||
# ifndef _CYGWIN_TYPES_H
|
||||
# error You need the winsup sources or a cygwin installation to compile the cygwin version of newlib.
|
||||
# endif
|
||||
#endif
|
||||
int _EXFUN(pthread_kill, (pthread_t thread, int sig));
|
||||
#endif
|
||||
|
||||
|
@ -245,7 +245,7 @@ typedef __int64_t sbintime_t;
|
||||
* pointers rather than structs to ensure maximum binary compatability with
|
||||
* previous releases.
|
||||
* This means that we don't use the types defined here, but rather in
|
||||
* <cygwin/types.h>
|
||||
* <machine/types.h>
|
||||
*/
|
||||
#if defined(_POSIX_THREADS) && !defined(__CYGWIN__)
|
||||
|
||||
@ -430,11 +430,7 @@ typedef struct {
|
||||
int is_initialized; /* is this structure initialized? */
|
||||
int init_executed; /* has the initialization routine been run? */
|
||||
} pthread_once_t; /* dynamic package initialization */
|
||||
#else
|
||||
#if defined (__CYGWIN__)
|
||||
#include <cygwin/types.h>
|
||||
#endif
|
||||
#endif /* defined(_POSIX_THREADS) */
|
||||
#endif /* defined(_POSIX_THREADS) && !defined(__CYGWIN__) */
|
||||
|
||||
/* POSIX Barrier Types */
|
||||
|
||||
@ -468,6 +464,8 @@ typedef struct {
|
||||
#endif /* defined(_POSIX_READER_WRITER_LOCKS) */
|
||||
#endif /* __CYGWIN__ */
|
||||
|
||||
#include <machine/types.h>
|
||||
|
||||
#endif /* !__need_inttypes */
|
||||
|
||||
#undef __need_inttypes
|
||||
|
Reference in New Issue
Block a user