git://git.exim.org
/
users
/
jgh
/
exim.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
46017ba
)
Testsuite: handle platforms having distinct bints for O_RDONLY/OWRONLY (Hurd)
author
Jeremy Harris
<jgh146exb@wizmail.org>
Sun, 15 Dec 2019 18:40:08 +0000
(18:40 +0000)
committer
Jeremy Harris
<jgh146exb@wizmail.org>
Sun, 15 Dec 2019 18:40:08 +0000
(18:40 +0000)
test/src/fd.c
patch
|
blob
|
history
diff --git
a/test/src/fd.c
b/test/src/fd.c
index 2dc12c6a7e290b7318bf87badfeb0dbcb6a375cd..fc3a544564972209a932667a10997c799268e90b 100644
(file)
--- a/
test/src/fd.c
+++ b/
test/src/fd.c
@@
-65,28
+65,21
@@
for (fd = 0; fd <= mac_maxfd; fd++)
p += sprintf(p, "%3d opt=%d status=%X ", fd, options, status);
switch(status & 3)
{
p += sprintf(p, "%3d opt=%d status=%X ", fd, options, status);
switch(status & 3)
{
- case 0: p += sprintf(p, "RDONLY");
- break;
- case 1: p += sprintf(p, "WRONLY");
- break;
- case 2: p += sprintf(p, "RDWR");
- break;
+ case O_RDONLY: p += sprintf(p, "RDONLY"); break;
+ case O_WRONLY: p += sprintf(p, "WRONLY"); break;
+ case O_RDWR: p += sprintf(p, "RDWR"); break;
}
if (isatty(fd)) p += sprintf(p, " TTY");
if ((status & 8) != 0) p += sprintf(p, " APPEND");
if (use_stat && fstat(fd, &statbuf) >= 0)
}
if (isatty(fd)) p += sprintf(p, " TTY");
if ((status & 8) != 0) p += sprintf(p, " APPEND");
if (use_stat && fstat(fd, &statbuf) >= 0)
- {
p += sprintf(p, " mode=%o uid=%d size=%d", (int)statbuf.st_mode,
(int)statbuf.st_uid, (int)statbuf.st_size);
p += sprintf(p, " mode=%o uid=%d size=%d", (int)statbuf.st_mode,
(int)statbuf.st_uid, (int)statbuf.st_size);
- }
p += sprintf(p, "\n");
}
else if (errno != EBADF)
p += sprintf(p, "\n");
}
else if (errno != EBADF)
- {
p += sprintf(p, "%3d errno=%d %s\n", fd, errno, strerror(errno));
p += sprintf(p, "%3d errno=%d %s\n", fd, errno, strerror(errno));
- }
}
if (qpgm)
}
if (qpgm)