chiark
/
gitweb
/
~mdw
/
disorder
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix about ... page
[disorder]
/
lib
/
t-syscalls.c
diff --git
a/lib/t-syscalls.c
b/lib/t-syscalls.c
index 6fcf413b12cd872a6551f1dc8f760d1bb639a917..a4ab19bdeabbf78b41554f0a5aa624e812d39e3c 100644
(file)
--- a/
lib/t-syscalls.c
+++ b/
lib/t-syscalls.c
@@
-19,13
+19,11
@@
*/
#include "test.h"
*/
#include "test.h"
-void test_syscalls(void) {
+
static
void test_syscalls(void) {
int p[2];
char buf[128], *e;
long n;
long long nn;
int p[2];
char buf[128], *e;
long n;
long long nn;
-
- printf("test_syscalls\n");
xpipe(p);
nonblock(p[1]);
xpipe(p);
nonblock(p[1]);
@@
-70,6
+68,10
@@
void test_syscalls(void) {
insist(e != 0);
check_string(e, "xyzzy");
insist(e != 0);
check_string(e, "xyzzy");
+#ifdef LLONG_MAX
+ /* Debian's gcc 2.95 cannot easily be persuaded to define LLONG_MAX even in
+ * extensions modes. If your compiler is this broken you just don't get the
+ * full set of tests. Deal. */
nn = 0;
e = 0;
sprintf(buf, "%lld", LLONG_MAX);
nn = 0;
e = 0;
sprintf(buf, "%lld", LLONG_MAX);
@@
-90,9
+92,12
@@
void test_syscalls(void) {
insist(xstrtoll(&nn, buf, &e, 0) == 0);
insist(nn == LLONG_MAX);
insist(e != 0);
insist(xstrtoll(&nn, buf, &e, 0) == 0);
insist(nn == LLONG_MAX);
insist(e != 0);
- check_string(e, "xyzzy");
+ check_string(e, "xyzzy");
+#endif
}
}
+TEST(syscalls);
+
/*
Local Variables:
c-basic-offset:2
/*
Local Variables:
c-basic-offset:2