summaryrefslogtreecommitdiff
path: root/test/unistd
diff options
context:
space:
mode:
authorCarmelo Amoroso <carmelo.amoroso@st.com>2008-09-25 06:38:21 +0000
committerCarmelo Amoroso <carmelo.amoroso@st.com>2008-09-25 06:38:21 +0000
commit9d7a9d2ef6298b0d3680dc86c76af79da04c2199 (patch)
tree5813cdfdf53668f143a96f7e7f224aa616c026a1 /test/unistd
parent3898083f5b4276ed4a2c4803d633962b6a0f9325 (diff)
Add globally __stringify macro in libc-symbols.h.
Remove all other duplicated definitions. Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Diffstat (limited to 'test/unistd')
-rw-r--r--test/unistd/tst-preadwrite.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/test/unistd/tst-preadwrite.c b/test/unistd/tst-preadwrite.c
index 281044858..9650562d8 100644
--- a/test/unistd/tst-preadwrite.c
+++ b/test/unistd/tst-preadwrite.c
@@ -30,9 +30,6 @@
# define PWRITE pwrite
#endif
-#define STRINGIFY(s) STRINGIFY2 (s)
-#define STRINGIFY2(s) #s
-
/* Prototype for our test function. */
extern void do_prepare (int argc, char *argv[]);
extern int do_test (int argc, char *argv[]);
@@ -56,7 +53,7 @@ do_prepare (int argc, char *argv[])
char name_len;
#define FNAME FNAME2(TRUNCATE)
-#define FNAME2(s) "/" STRINGIFY(s) "XXXXXX"
+#define FNAME2(s) "/" __stringify(s) "XXXXXX"
name_len = strlen (test_dir);
name = malloc (name_len + sizeof (FNAME));
@@ -88,15 +85,15 @@ do_test (int argc, char *argv[])
for (i = 100; i < 200; ++i)
buf[i] = i;
if (PWRITE (fd, buf + 100, 100, 100) != 100)
- error (EXIT_FAILURE, errno, "during %s", STRINGIFY (PWRITE));
+ error (EXIT_FAILURE, errno, "during %s", __stringify (PWRITE));
for (i = 450; i < 600; ++i)
buf[i] = i;
if (PWRITE (fd, buf + 450, 150, 450) != 150)
- error (EXIT_FAILURE, errno, "during %s", STRINGIFY (PWRITE));
+ error (EXIT_FAILURE, errno, "during %s", __stringify (PWRITE));
if (PREAD (fd, res, sizeof (buf) - 50, 50) != sizeof (buf) - 50)
- error (EXIT_FAILURE, errno, "during %s", STRINGIFY (PREAD));
+ error (EXIT_FAILURE, errno, "during %s", __stringify (PREAD));
close (fd);
unlink (name);