summaryrefslogtreecommitdiffstats
path: root/testsuites/psxtests/psxhdrs/ucontext
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2019-11-27 12:02:45 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2019-12-02 07:46:25 +0100
commit8f6b7abd1aed966f205cc26e09ef38f9b0d40744 (patch)
treece1bbb3e882e050a865755bf159331b8b0ea7ba6 /testsuites/psxtests/psxhdrs/ucontext
parentada/sp19: Add m4 generated sptest.adb (diff)
downloadrtems-8f6b7abd1aed966f205cc26e09ef38f9b0d40744.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 'testsuites/psxtests/psxhdrs/ucontext')
-rwxr-xr-xtestsuites/psxtests/psxhdrs/ucontext/makecontext.c9
-rwxr-xr-xtestsuites/psxtests/psxhdrs/ucontext/setcontext.c5
2 files changed, 8 insertions, 6 deletions
diff --git a/testsuites/psxtests/psxhdrs/ucontext/makecontext.c b/testsuites/psxtests/psxhdrs/ucontext/makecontext.c
index 1149a2c52b..b180a8e55c 100755
--- a/testsuites/psxtests/psxhdrs/ucontext/makecontext.c
+++ b/testsuites/psxtests/psxhdrs/ucontext/makecontext.c
@@ -30,16 +30,17 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
+#define _XOPEN_SOURCE_EXTENDED 1
+
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
-#define STACK_SIZE (1<<15) // 32KiB
-
-#define _XOPEN_SOURCE_EXTENDED 1
#include <ucontext.h>
#include <stdlib.h>
+#define STACK_SIZE (1<<15) // 32KiB
+
int test( void );
void func( void );
@@ -63,4 +64,4 @@ int test( void )
void func( void )
{
return;
-} \ No newline at end of file
+}
diff --git a/testsuites/psxtests/psxhdrs/ucontext/setcontext.c b/testsuites/psxtests/psxhdrs/ucontext/setcontext.c
index d2f2848d96..3f8cd6328f 100755
--- a/testsuites/psxtests/psxhdrs/ucontext/setcontext.c
+++ b/testsuites/psxtests/psxhdrs/ucontext/setcontext.c
@@ -30,11 +30,12 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
+#define _XOPEN_SOURCE_EXTENDED 1
+
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
-#define _XOPEN_SOURCE_EXTENDED 1
#include <ucontext.h>
int return_value = 0;
@@ -54,4 +55,4 @@ void func( void )
{
setcontext(ucp);
return_value = 1;
-} \ No newline at end of file
+}