summaryrefslogtreecommitdiff
path: root/test/unistd
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2002-11-15 11:03:30 +0000
committerEric Andersen <andersen@codepoet.org>2002-11-15 11:03:30 +0000
commit5389078d0aa3306ef37711408f21f0d81003dbd3 (patch)
tree7ffc66108e63487b76b59a8f84fad28e5b8284ac /test/unistd
parent2b6476af1373ff21d3a06b9b8d59ccfc8bbda648 (diff)
Only build the 64 tests when relevant
Diffstat (limited to 'test/unistd')
-rw-r--r--test/unistd/preadwrite.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/unistd/preadwrite.c b/test/unistd/preadwrite.c
index 8f6c90d0c..cfc8635b9 100644
--- a/test/unistd/preadwrite.c
+++ b/test/unistd/preadwrite.c
@@ -71,6 +71,8 @@ int test(int argc, char *argv[])
}
/* Test the 64-bit versions as well. */
+#if defined __UCLIBC_HAS_LFS__
+
#undef PREAD
#undef PWRITE
#define PREAD pread64
@@ -106,6 +108,7 @@ int test64(int argc, char *argv[])
unlink (name);
return memcmp (buf + 50, res, sizeof (buf) - 50);
}
+#endif
void prepare(void)
{
@@ -134,6 +137,7 @@ int main (int argc, char **argv)
}
fprintf(stderr, "pread/pwrite test successful.\n");
+#if defined __UCLIBC_HAS_LFS__
prepare();
result+=test64(argc, argv);
if (result) {
@@ -141,5 +145,6 @@ int main (int argc, char **argv)
return(EXIT_FAILURE);
}
fprintf(stderr, "pread64/pwrite64 test successful.\n");
+#endif
return(EXIT_SUCCESS);
}