diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2019-11-16 16:01:13 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2019-11-19 16:05:54 +0100 |
commit | 38207a31e41b8cb3f3978c1ccbe10c6467f85c51 (patch) | |
tree | 809519382feb6373b946eb082dca7295193bd18d /cpukit/posix | |
parent | bsp/lpc32xx: Fix linker command file (diff) | |
download | rtems-38207a31e41b8cb3f3978c1ccbe10c6467f85c51.tar.bz2 |
Move feature macro before "config.h" include
This allows to use header includes in "config.h" to reduce the build
configuration checks.
Update #3818.
Diffstat (limited to 'cpukit/posix')
-rw-r--r-- | cpukit/posix/src/pthreadattrgetaffinitynp.c | 3 | ||||
-rw-r--r-- | cpukit/posix/src/pthreadattrsetaffinitynp.c | 11 | ||||
-rw-r--r-- | cpukit/posix/src/pthreadgetaffinitynp.c | 2 | ||||
-rw-r--r-- | cpukit/posix/src/pthreadgetattrnp.c | 3 | ||||
-rw-r--r-- | cpukit/posix/src/pthreadgetnamenp.c | 3 | ||||
-rw-r--r-- | cpukit/posix/src/pthreadsetaffinitynp.c | 3 | ||||
-rw-r--r-- | cpukit/posix/src/pthreadsetnamenp.c | 3 |
7 files changed, 17 insertions, 11 deletions
diff --git a/cpukit/posix/src/pthreadattrgetaffinitynp.c b/cpukit/posix/src/pthreadattrgetaffinitynp.c index b281b11e5f..19acfa85aa 100644 --- a/cpukit/posix/src/pthreadattrgetaffinitynp.c +++ b/cpukit/posix/src/pthreadattrgetaffinitynp.c @@ -14,13 +14,14 @@ * http://www.rtems.org/license/LICENSE. */ +#define _GNU_SOURCE + #if HAVE_CONFIG_H #include "config.h" #endif #if HAVE_DECL_PTHREAD_ATTR_GETAFFINITY_NP -#define _GNU_SOURCE #include <pthread.h> #include <errno.h> diff --git a/cpukit/posix/src/pthreadattrsetaffinitynp.c b/cpukit/posix/src/pthreadattrsetaffinitynp.c index 0e3c828c38..a05b74e4de 100644 --- a/cpukit/posix/src/pthreadattrsetaffinitynp.c +++ b/cpukit/posix/src/pthreadattrsetaffinitynp.c @@ -1,7 +1,3 @@ -#if HAVE_CONFIG_H -#include "config.h" -#endif - /** * @file * @@ -18,9 +14,14 @@ * http://www.rtems.org/license/LICENSE. */ +#define _GNU_SOURCE + +#if HAVE_CONFIG_H +#include "config.h" +#endif + #if HAVE_DECL_PTHREAD_ATTR_SETAFFINITY_NP -#define _GNU_SOURCE #include <pthread.h> #include <errno.h> diff --git a/cpukit/posix/src/pthreadgetaffinitynp.c b/cpukit/posix/src/pthreadgetaffinitynp.c index dab6b63aa0..c9595a45f5 100644 --- a/cpukit/posix/src/pthreadgetaffinitynp.c +++ b/cpukit/posix/src/pthreadgetaffinitynp.c @@ -14,6 +14,7 @@ * http://www.rtems.org/license/LICENSE. */ +#define _GNU_SOURCE #if HAVE_CONFIG_H #include "config.h" @@ -21,7 +22,6 @@ #if HAVE_DECL_PTHREAD_GETAFFINITY_NP -#define _GNU_SOURCE #include <pthread.h> #include <errno.h> diff --git a/cpukit/posix/src/pthreadgetattrnp.c b/cpukit/posix/src/pthreadgetattrnp.c index 5cc47c6901..d84383c204 100644 --- a/cpukit/posix/src/pthreadgetattrnp.c +++ b/cpukit/posix/src/pthreadgetattrnp.c @@ -14,11 +14,12 @@ * http://www.rtems.org/license/LICENSE. */ +#define _GNU_SOURCE + #if HAVE_CONFIG_H #include "config.h" #endif -#define _GNU_SOURCE #include <pthread.h> #include <errno.h> #include <string.h> diff --git a/cpukit/posix/src/pthreadgetnamenp.c b/cpukit/posix/src/pthreadgetnamenp.c index e753823976..502f051b81 100644 --- a/cpukit/posix/src/pthreadgetnamenp.c +++ b/cpukit/posix/src/pthreadgetnamenp.c @@ -6,11 +6,12 @@ * http://www.rtems.org/license/LICENSE. */ +#define _GNU_SOURCE + #if HAVE_CONFIG_H #include "config.h" #endif -#define _GNU_SOURCE #include <pthread.h> #include <errno.h> #include <string.h> diff --git a/cpukit/posix/src/pthreadsetaffinitynp.c b/cpukit/posix/src/pthreadsetaffinitynp.c index 0d3fec4482..7c8ac8c605 100644 --- a/cpukit/posix/src/pthreadsetaffinitynp.c +++ b/cpukit/posix/src/pthreadsetaffinitynp.c @@ -14,13 +14,14 @@ * http://www.rtems.org/license/LICENSE. */ +#define _GNU_SOURCE + #if HAVE_CONFIG_H #include "config.h" #endif #if HAVE_DECL_PTHREAD_SETAFFINITY_NP -#define _GNU_SOURCE #include <pthread.h> #include <errno.h> diff --git a/cpukit/posix/src/pthreadsetnamenp.c b/cpukit/posix/src/pthreadsetnamenp.c index cb0e47ce94..cbb2e43311 100644 --- a/cpukit/posix/src/pthreadsetnamenp.c +++ b/cpukit/posix/src/pthreadsetnamenp.c @@ -6,11 +6,12 @@ * http://www.rtems.org/license/LICENSE. */ +#define _GNU_SOURCE + #if HAVE_CONFIG_H #include "config.h" #endif -#define _GNU_SOURCE #include <pthread.h> #include <errno.h> |