Eliminated includes of the "temporary" backwards compatibility header
<sys/dir.h> in applications. Maintained existing (inadequate) ifdefs for dir.h vs dirent.h in libdialog, amd and rarpd, but didn't add any new ones.
This commit is contained in:
parent
251d6f360e
commit
0c8ea4d48c
@ -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;
|
||||
|
||||
|
@ -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"
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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>
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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>
|
||||
|
@ -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;
|
||||
|
@ -296,7 +296,7 @@ matchdir(pattern)
|
||||
char *pattern;
|
||||
{
|
||||
struct stat stb;
|
||||
register struct direct *dp;
|
||||
register struct dirent *dp;
|
||||
DIR *dirp;
|
||||
|
||||
dirp = opendir(path);
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user