[LTP] [PATCH] openposix: Remove _XOPEN_SOURCE in strchr/strcpy/strncpy
Xiao Yang
yangx.jy@cn.fujitsu.com
Thu Dec 6 10:40:11 CET 2018
We have defined _XOPEN_SOURCE to 600 by gcc -D in open_posix_testsuite/CFLAGS,
So defining _XOPEN_SOURCE to different value in test results in a "_XOPEN_SOURCE
redefined" warning.
It seems that all of tests get pass even if _XOPEN_SOURCE is defined to 600
by default, so remove the duplicate _XOPEN_SOURCE in test.
Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
---
testcases/open_posix_testsuite/conformance/interfaces/strchr/1-1.c | 1 -
testcases/open_posix_testsuite/conformance/interfaces/strcpy/1-1.c | 1 -
testcases/open_posix_testsuite/conformance/interfaces/strncpy/1-1.c | 1 -
testcases/open_posix_testsuite/conformance/interfaces/strncpy/2-1.c | 1 -
4 files changed, 4 deletions(-)
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/strchr/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/strchr/1-1.c
index 95eda79..611a64d 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/strchr/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/strchr/1-1.c
@@ -25,7 +25,6 @@
* -Repeat the above all steps for given number of iterations.
*/
-#define _XOPEN_SOURCE 700
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/strcpy/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/strcpy/1-1.c
index 2fdc002..adfbfc3 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/strcpy/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/strcpy/1-1.c
@@ -17,7 +17,6 @@
* -Also compare returned pointer with s2.
*/
-#define _XOPEN_SOURCE 700
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/strncpy/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/strncpy/1-1.c
index 3458015..396bd60 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/strncpy/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/strncpy/1-1.c
@@ -20,7 +20,6 @@
* -Repeat the above steps for given number of iterations.
*/
-#define _XOPEN_SOURCE 700
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/strncpy/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/strncpy/2-1.c
index a7761c5..2a20872 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/strncpy/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/strncpy/2-1.c
@@ -20,7 +20,6 @@
* -Repeat the above steps for given number of iterations.
*/
-#define _XOPEN_SOURCE 700
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
--
1.8.3.1
More information about the ltp
mailing list