summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--games/fortune/fortune/fortune.c8
-rw-r--r--gnu/lib/libdialog/dir.c8
-rw-r--r--lib/libss/help.c4
-rw-r--r--sbin/badsect/badsect.c4
-rw-r--r--sbin/startslip/uucplock.c2
-rw-r--r--sys/i386/boot/biosboot/sys.c14
-rw-r--r--usr.bin/msgs/msgs.c4
-rw-r--r--usr.bin/rdist/defs.h2
-rw-r--r--usr.bin/rdist/docmd.c4
-rw-r--r--usr.bin/rdist/expand.c2
-rw-r--r--usr.bin/rdist/server.c6
-rw-r--r--usr.bin/rwho/rwho.c4
-rw-r--r--usr.sbin/amd/amd/info_union.c6
-rw-r--r--usr.sbin/rarpd/rarpd.c10
-rw-r--r--usr.sbin/sup/lib/expand.c4
-rw-r--r--usr.sbin/sup/lib/scan.c7
16 files changed, 46 insertions, 43 deletions
diff --git a/games/fortune/fortune/fortune.c b/games/fortune/fortune/fortune.c
index 05dcb05..e993a1b 100644
--- a/games/fortune/fortune/fortune.c
+++ b/games/fortune/fortune/fortune.c
@@ -46,8 +46,8 @@ static const char sccsid[] = "@(#)fortune.c 8.1 (Berkeley) 5/31/93";
# include <sys/param.h>
# include <sys/stat.h>
-# include <sys/dir.h>
+# include <dirent.h>
# include <fcntl.h>
# include <assert.h>
# include <unistd.h>
@@ -693,11 +693,7 @@ add_dir(fp)
register FILEDESC *fp;
{
register DIR *dir;
-#ifdef SYSV
- register struct dirent *dirent; /* NIH, of course! */
-#else
- register struct direct *dirent;
-#endif
+ register struct dirent *dirent;
auto FILEDESC *tailp;
auto char *name;
diff --git a/gnu/lib/libdialog/dir.c b/gnu/lib/libdialog/dir.c
index 04a30b2..9c2c7b5 100644
--- a/gnu/lib/libdialog/dir.c
+++ b/gnu/lib/libdialog/dir.c
@@ -1,4 +1,3 @@
-
/****************************************************************************
*
* Program: dir.c
@@ -22,20 +21,21 @@
#include <sys/types.h>
#include <sys/stat.h>
-#if !defined sgi
+#include <unistd.h> /* XXX for _POSIX_VERSION ifdefs */
+
+#if !defined sgi && !defined _POSIX_VERSION
#include <sys/dir.h>
#endif
#if defined __sun__
#include <sys/dirent.h>
#endif
-#if defined sgi
+#if defined sgi || defined _POSIX_VERSION
#include <dirent.h>
#endif
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
-#include <unistd.h>
#include <fnmatch.h>
#include <sys/param.h>
#include "dir.h"
diff --git a/lib/libss/help.c b/lib/libss/help.c
index c6e99d8..48aece43 100644
--- a/lib/libss/help.c
+++ b/lib/libss/help.c
@@ -7,6 +7,7 @@
#include <sys/param.h>
#include <sys/file.h>
#include <sys/wait.h>
+#include <dirent.h>
#include <stdlib.h>
#include <unistd.h>
#include "ss_internal.h"
@@ -87,9 +88,6 @@ got_it:
}
}
-#include <sys/types.h>
-#include <sys/dir.h>
-
void ss_add_info_dir(sci_idx, info_dir, code_ptr)
int sci_idx;
char *info_dir;
diff --git a/sbin/badsect/badsect.c b/sbin/badsect/badsect.c
index 01f8ea2..4526c1b 100644
--- a/sbin/badsect/badsect.c
+++ b/sbin/badsect/badsect.c
@@ -52,12 +52,12 @@ static const char sccsid[] = "@(#)badsect.c 8.1 (Berkeley) 6/5/93";
* does not support bad block forwarding.
*/
#include <sys/param.h>
-#include <sys/dir.h>
#include <sys/stat.h>
#include <ufs/ffs/fs.h>
#include <ufs/ufs/dinode.h>
+#include <dirent.h>
#include <fcntl.h>
#include <paths.h>
#include <stdio.h>
@@ -92,7 +92,7 @@ main(argc, argv)
daddr_t diskbn;
daddr_t number;
struct stat stbuf, devstat;
- register struct direct *dp;
+ register struct dirent *dp;
DIR *dirp;
char name[2 * MAXPATHLEN];
char *name_dir_end;
diff --git a/sbin/startslip/uucplock.c b/sbin/startslip/uucplock.c
index 1f19b1b..20eafe4 100644
--- a/sbin/startslip/uucplock.c
+++ b/sbin/startslip/uucplock.c
@@ -37,7 +37,7 @@ static const char sccsid[] = "@(#)uucplock.c 8.1 (Berkeley) 6/6/93";
#include <sys/types.h>
#include <sys/file.h>
-#include <sys/dir.h>
+#include <dirent.h>
#include <errno.h>
#ifndef USE_PERROR
#include <syslog.h>
diff --git a/sys/i386/boot/biosboot/sys.c b/sys/i386/boot/biosboot/sys.c
index 651968f..1ab30e7 100644
--- a/sys/i386/boot/biosboot/sys.c
+++ b/sys/i386/boot/biosboot/sys.c
@@ -24,11 +24,11 @@
* the rights to redistribute these changes.
*
* from: Mach, Revision 2.2 92/04/04 11:36:34 rpd
- * $Id: sys.c,v 1.14 1996/09/11 19:23:11 phk Exp $
+ * $Id: sys.c,v 1.15 1996/09/14 07:41:00 bde Exp $
*/
#include "boot.h"
-#include <sys/dir.h>
+#include <sys/dirent.h>
#include <sys/reboot.h>
#ifdef 0
@@ -133,7 +133,7 @@ find(char *path)
{
char *rest, ch;
int block, off, loc, ino = ROOTINO;
- struct direct *dp;
+ struct dirent *dp;
char list_only;
list_only = (path[0] == '?' && path[1] == '\0');
@@ -165,12 +165,12 @@ loop:
devread(iobuf, fsbtodb(fs, block_map(block)) + boff,
blksize(fs, &inode, block));
}
- dp = (struct direct *)(iobuf + off);
+ dp = (struct dirent *)(iobuf + off);
loc += dp->d_reclen;
- if (dp->d_ino && list_only)
+ if (dp->d_fileno && list_only)
printf("%s ", dp->d_name);
- } while (!dp->d_ino || strcmp(path, dp->d_name));
- ino = dp->d_ino;
+ } while (!dp->d_fileno || strcmp(path, dp->d_name));
+ ino = dp->d_fileno;
*(path = rest) = ch;
goto loop;
}
diff --git a/usr.bin/msgs/msgs.c b/usr.bin/msgs/msgs.c
index 0143e42..9af8f58 100644
--- a/usr.bin/msgs/msgs.c
+++ b/usr.bin/msgs/msgs.c
@@ -69,9 +69,9 @@ static char sccsid[] = "@(#)msgs.c 8.1 (Berkeley) 6/6/93";
/* #define UNBUFFERED *//* use unbuffered output */
#include <sys/param.h>
-#include <sys/dir.h>
#include <sys/stat.h>
#include <ctype.h>
+#include <dirent.h>
#include <errno.h>
#include <locale.h>
#include <pwd.h>
@@ -245,7 +245,7 @@ int argc; char *argv[];
keep = t - (rcback? rcback : NDAYS) DAYS;
if (clean || bounds == NULL) { /* relocate message bounds */
- struct direct *dp;
+ struct dirent *dp;
struct stat stbuf;
bool seenany = NO;
DIR *dirp;
diff --git a/usr.bin/rdist/defs.h b/usr.bin/rdist/defs.h
index e23ae6f..8e4f381 100644
--- a/usr.bin/rdist/defs.h
+++ b/usr.bin/rdist/defs.h
@@ -34,13 +34,13 @@
*/
#include <sys/param.h>
-#include <sys/dir.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/file.h>
#include <netinet/in.h>
+#include <dirent.h>
#include <errno.h>
#include <pwd.h>
#include <grp.h>
diff --git a/usr.bin/rdist/docmd.c b/usr.bin/rdist/docmd.c
index e941d78..ebc6470 100644
--- a/usr.bin/rdist/docmd.c
+++ b/usr.bin/rdist/docmd.c
@@ -34,7 +34,7 @@
#ifndef lint
/*static char sccsid[] = "From: @(#)docmd.c 8.1 (Berkeley) 6/9/93";*/
static const char rcsid[] =
- "$Id: docmd.c,v 1.4 1996/07/12 04:00:13 nate Exp $";
+ "$Id: docmd.c,v 1.5 1996/08/10 07:54:12 peter Exp $";
#endif /* not lint */
#include "defs.h"
@@ -512,7 +512,7 @@ rcmptime(st)
struct stat *st;
{
register DIR *d;
- register struct direct *dp;
+ register struct dirent *dp;
register char *cp;
char *otp;
int len;
diff --git a/usr.bin/rdist/expand.c b/usr.bin/rdist/expand.c
index 4d1819b..142e086 100644
--- a/usr.bin/rdist/expand.c
+++ b/usr.bin/rdist/expand.c
@@ -296,7 +296,7 @@ matchdir(pattern)
char *pattern;
{
struct stat stb;
- register struct direct *dp;
+ register struct dirent *dp;
DIR *dirp;
dirp = opendir(path);
diff --git a/usr.bin/rdist/server.c b/usr.bin/rdist/server.c
index a511174..e3a12fb 100644
--- a/usr.bin/rdist/server.c
+++ b/usr.bin/rdist/server.c
@@ -306,7 +306,7 @@ sendf(rname, opts)
int sizerr, f, u, len;
off_t i;
DIR *d;
- struct direct *dp;
+ struct dirent *dp;
char *otp, *cp;
extern struct subcmd *subcmds;
static char user[15], group[15];
@@ -1184,7 +1184,7 @@ clean(cp)
register char *cp;
{
DIR *d;
- register struct direct *dp;
+ register struct dirent *dp;
struct stat stb;
char *otp;
int len, opts;
@@ -1258,7 +1258,7 @@ removeit(stp)
struct stat *stp;
{
DIR *d;
- struct direct *dp;
+ struct dirent *dp;
register char *cp;
struct stat stb;
char *otp;
diff --git a/usr.bin/rwho/rwho.c b/usr.bin/rwho/rwho.c
index 0f6570e..9ba05e2 100644
--- a/usr.bin/rwho/rwho.c
+++ b/usr.bin/rwho/rwho.c
@@ -42,9 +42,9 @@ static char sccsid[] = "@(#)rwho.c 8.1 (Berkeley) 6/6/93";
#endif /* not lint */
#include <sys/param.h>
-#include <sys/dir.h>
#include <sys/file.h>
#include <protocols/rwhod.h>
+#include <dirent.h>
#include <stdio.h>
#include <time.h>
#include <string.h>
@@ -78,7 +78,7 @@ main(argc, argv)
extern char *optarg;
extern int optind;
int ch;
- struct direct *dp;
+ struct dirent *dp;
int cc, width;
register struct whod *w = &wd;
register struct whoent *we;
diff --git a/usr.sbin/amd/amd/info_union.c b/usr.sbin/amd/amd/info_union.c
index e3062ad..07e44a1 100644
--- a/usr.sbin/amd/amd/info_union.c
+++ b/usr.sbin/amd/amd/info_union.c
@@ -37,7 +37,7 @@
*
* @(#)info_union.c 8.1 (Berkeley) 6/6/93
*
- * $Id: info_union.c,v 5.2.2.1 1992/02/09 15:08:34 jsp beta $
+ * $Id: info_union.c,v 1.1.1.1 1994/05/26 05:22:03 rgrimes Exp $
*
*/
@@ -52,7 +52,9 @@
#ifdef HAS_UNION_MAPS
-#ifdef _POSIX_SOURCE
+#include <unistd.h> /* for _POSIX_VERSION ifdef */
+
+#if defined(_POSIX_SOURCE) || defined(_POSIX_VERSION)
#include <dirent.h>
#define DIRENT struct dirent
#else
diff --git a/usr.sbin/rarpd/rarpd.c b/usr.sbin/rarpd/rarpd.c
index 8fb06f4..90ca240 100644
--- a/usr.sbin/rarpd/rarpd.c
+++ b/usr.sbin/rarpd/rarpd.c
@@ -26,7 +26,7 @@ char copyright[] =
#ifndef lint
static char rcsid[] =
- "@(#) $Header: /home/ncvs/src/usr.sbin/rarpd/rarpd.c,v 1.5 1995/07/18 21:35:32 wpaul Exp $ (LBL)";
+ "@(#) $Header: /home/ncvs/src/usr.sbin/rarpd/rarpd.c,v 1.6 1996/08/24 23:05:08 wpaul Exp $ (LBL)";
#endif
@@ -60,7 +60,11 @@ static char rcsid[] =
#include <sys/file.h>
#include <netdb.h>
-#ifdef SUNOS4
+#if defined(SUNOS4) || defined(__FreeBSD__) /* XXX */
+#define HAVE_DIRENT_H
+#endif
+
+#ifdef HAVE_DIRENT_H
#include <dirent.h>
#else
#include <sys/dir.h>
@@ -456,7 +460,7 @@ rarp_bootable(addr)
u_long addr;
{
-#ifdef SUNOS4
+#ifdef HAVE_DIRENT_H
register struct dirent *dent;
#else
register struct direct *dent;
diff --git a/usr.sbin/sup/lib/expand.c b/usr.sbin/sup/lib/expand.c
index ff4b094..b909efc 100644
--- a/usr.sbin/sup/lib/expand.c
+++ b/usr.sbin/sup/lib/expand.c
@@ -61,7 +61,7 @@
*/
#include <sys/param.h>
#include <sys/stat.h>
-#include <sys/dir.h>
+#include <dirent.h>
#include <pwd.h>
#include <ctype.h>
#include <libc.h>
@@ -159,7 +159,7 @@ endit:
static matchdir(pattern)
char *pattern;
{
- register struct direct *dp;
+ register struct dirent *dp;
DIR *dirp;
dirp = opendir(path);
diff --git a/usr.sbin/sup/lib/scan.c b/usr.sbin/sup/lib/scan.c
index edb42ea..0823e4d 100644
--- a/usr.sbin/sup/lib/scan.c
+++ b/usr.sbin/sup/lib/scan.c
@@ -28,6 +28,9 @@
**********************************************************************
* HISTORY
* $Log: scan.c,v $
+ * Revision 1.3 1995/12/26 05:10:59 peter
+ * Apply ports/net/sup/patches/patch-ab
+ *
* Revision 1.2 1995/12/26 05:02:48 peter
* Apply ports/net/sup/patches/patch-aa...
*
@@ -101,8 +104,8 @@
#include <sys/types.h>
#include <sys/time.h>
#include <sys/stat.h>
-#include <sys/dir.h>
#include <sys/file.h>
+#include <dirent.h>
#include "sup.h"
/*************************
@@ -711,7 +714,7 @@ listdir (name,always) /* expand directory */
char *name;
int always;
{
- struct direct *dentry;
+ struct dirent *dentry;
register DIR *dirp;
char ename[STRINGLENGTH],newname[STRINGLENGTH],filename[STRINGLENGTH];
register char *p,*newp;
OpenPOWER on IntegriCloud