projects
/
libc-test
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
api: ifdef out some posix options
[libc-test]
/
src
/
stdio
/
fdopen.c
diff --git
a/src/stdio/fdopen.c
b/src/stdio/fdopen.c
index
7e85165
..
98a849f
100644
(file)
--- a/
src/stdio/fdopen.c
+++ b/
src/stdio/fdopen.c
@@
-1,10
+1,12
@@
+#ifndef _XOPEN_SOURCE
#define _XOPEN_SOURCE 700
#define _XOPEN_SOURCE 700
-#include "test.h"
-#include <stdlib.h>
-#include <unistd.h>
-#include <stdio.h>
+#endif
#include <errno.h>
#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
#include <string.h>
#include <string.h>
+#include <unistd.h>
+#include "test.h"
#define TEST(c) do { \
errno = 0; \
#define TEST(c) do { \
errno = 0; \
@@
-12,7
+14,7
@@
error("%s failed (errno = %d)\n", #c, errno); \
} while(0)
error("%s failed (errno = %d)\n", #c, errno); \
} while(0)
-
void test_fdope
n(void)
+
int mai
n(void)
{
char tmp[] = "/tmp/testsuite-XXXXXX";
char foo[6];
{
char tmp[] = "/tmp/testsuite-XXXXXX";
char foo[6];
@@
-32,4
+34,5
@@
void test_fdopen(void)
}
if (fd > 2)
TEST(unlink(tmp) != -1);
}
if (fd > 2)
TEST(unlink(tmp) != -1);
+ return test_status;
}
}