[Libsysio-commit] RedStorm: libsysio/tests test_copy.c test_getcwd.c test_list.c test_mounts.c test_
Brought to you by:
lward
|
From: Lee W. <lw...@us...> - 2003-05-27 12:58:50
|
Update of /cvsroot/libsysio/libsysio/tests
In directory sc8-pr-cvs1:/tmp/cvs-serv9677
Modified Files:
Tag: RedStorm
test_copy.c test_getcwd.c test_list.c test_mounts.c
test_path.c test_stats.c test_stdfd.c
Log Message:
RedStorm (BSD-based) declares getopt in unistd.h. There is no
separate getopt.h include.
Index: test_copy.c
===================================================================
RCS file: /cvsroot/libsysio/libsysio/tests/test_copy.c,v
retrieving revision 1.5
retrieving revision 1.5.6.1
diff -u -w -b -B -p -r1.5 -r1.5.6.1
--- test_copy.c 24 Mar 2003 22:09:49 -0000 1.5
+++ test_copy.c 27 May 2003 12:58:47 -0000 1.5.6.1
@@ -46,7 +46,9 @@
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
+#ifndef REDSTORM
#include <getopt.h>
+#endif
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
Index: test_getcwd.c
===================================================================
RCS file: /cvsroot/libsysio/libsysio/tests/test_getcwd.c,v
retrieving revision 1.1
retrieving revision 1.1.10.1
diff -u -w -b -B -p -r1.1 -r1.1.10.1
--- test_getcwd.c 9 Mar 2003 16:58:41 -0000 1.1
+++ test_getcwd.c 27 May 2003 12:58:47 -0000 1.1.10.1
@@ -44,7 +44,11 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#ifndef REDSTORM
#include <getopt.h>
+#else
+#include <unistd.h>
+#endif
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
Index: test_list.c
===================================================================
RCS file: /cvsroot/libsysio/libsysio/tests/test_list.c,v
retrieving revision 1.4
retrieving revision 1.4.6.1
diff -u -w -b -B -p -r1.4 -r1.4.6.1
--- test_list.c 24 Mar 2003 22:09:49 -0000 1.4
+++ test_list.c 27 May 2003 12:58:47 -0000 1.4.6.1
@@ -44,7 +44,11 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#ifndef REDSTORM
#include <getopt.h>
+#else
+#include <unistd.h>
+#endif
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
@@ -200,10 +204,9 @@ listit(const char *path)
while ((cc = getdirentries(fd, (char *)buf, n, &base)) > 0) {
dp = buf;
while (cc > 0) {
- (void )printf("\t%s: ino %llu off %llu type %u\n",
+ (void )printf("\t%s: ino %llu type %u\n",
dp->d_name,
(unsigned long long )dp->d_ino,
- (unsigned long long )dp->d_off,
(int )dp->d_type);
cc -= dp->d_reclen;
dp = (void *)dp + dp->d_reclen;
Index: test_mounts.c
===================================================================
RCS file: /cvsroot/libsysio/libsysio/tests/test_mounts.c,v
retrieving revision 1.3
retrieving revision 1.3.10.1
diff -u -w -b -B -p -r1.3 -r1.3.10.1
--- test_mounts.c 9 Mar 2003 16:57:47 -0000 1.3
+++ test_mounts.c 27 May 2003 12:58:47 -0000 1.3.10.1
@@ -44,7 +44,11 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#ifndef REDSTORM
#include <getopt.h>
+#else
+#include <unistd.h>
+#endif
#include <errno.h>
#include <assert.h>
Index: test_path.c
===================================================================
RCS file: /cvsroot/libsysio/libsysio/tests/test_path.c,v
retrieving revision 1.3
retrieving revision 1.3.10.1
diff -u -w -b -B -p -r1.3 -r1.3.10.1
--- test_path.c 9 Mar 2003 16:57:47 -0000 1.3
+++ test_path.c 27 May 2003 12:58:47 -0000 1.3.10.1
@@ -44,7 +44,11 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#ifndef REDSTORM
#include <getopt.h>
+#else
+#include <unistd.h>
+#endif
#include <errno.h>
#include <assert.h>
Index: test_stats.c
===================================================================
RCS file: /cvsroot/libsysio/libsysio/tests/test_stats.c,v
retrieving revision 1.3.10.1
retrieving revision 1.3.10.2
diff -u -w -b -B -p -r1.3.10.1 -r1.3.10.2
--- test_stats.c 27 May 2003 12:37:53 -0000 1.3.10.1
+++ test_stats.c 27 May 2003 12:58:47 -0000 1.3.10.2
@@ -46,13 +46,17 @@
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
+#ifndef REDSTORM
#include <getopt.h>
+#endif
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/queue.h>
+#ifdef notdef
#include <sys/statvfs.h>
+#endif
#include "sysio.h"
#include "mount.h"
@@ -152,7 +156,9 @@ do_stats(const char *path)
int fd;
int err;
struct stat stbuf1, stbuf2;
+#ifdef notdef
struct statvfs stvfsbuf1, stvfsbuf2;
+#endif
fd = open(path, O_RDONLY);
if (fd < 0) {
@@ -162,10 +168,12 @@ do_stats(const char *path)
err = fstat(fd, &stbuf1);
if (!err)
err = stat(path, &stbuf2);
+#ifdef notdef
if (!err)
err = fstatvfs(fd, &stvfsbuf1);
if (!err)
err = statvfs(path, &stvfsbuf1);
+#endif
if (err) {
perror(path);
goto out;
@@ -175,9 +183,11 @@ do_stats(const char *path)
(void )fprintf(stderr, "%s: [f]stat info mismatch\n", path);
goto out;
}
+#ifdef notdef
if (stvfsbuf1.f_fsid != stvfsbuf2.f_fsid) {
(void )fprintf(stderr, "%s: [f]statvfs info mismatch\n", path);
}
+#endif
printf("%s:"
" dev %lu,"
" ino %lu,"
Index: test_stdfd.c
===================================================================
RCS file: /cvsroot/libsysio/libsysio/tests/test_stdfd.c,v
retrieving revision 1.2
retrieving revision 1.2.6.1
diff -u -w -b -B -p -r1.2 -r1.2.6.1
--- test_stdfd.c 24 Mar 2003 22:09:49 -0000 1.2
+++ test_stdfd.c 27 May 2003 12:58:47 -0000 1.2.6.1
@@ -49,7 +49,9 @@
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
+#ifndef REDSTORM
#include <getopt.h>
+#endif
#include <errno.h>
#include <assert.h>
#include <sys/queue.h>
|