summaryrefslogtreecommitdiff
path: root/usr.bin/rdist
diff options
context:
space:
mode:
authorPhilip Guenther <guenther@cvs.openbsd.org>2014-07-05 06:45:01 +0000
committerPhilip Guenther <guenther@cvs.openbsd.org>2014-07-05 06:45:01 +0000
commit0b7b73f48bec66b5d7995c35472720b839cf5366 (patch)
tree2bd5a97a65bcf103fcd4ea761d4cbc426040c246 /usr.bin/rdist
parenta8956608d4d561a71b6197754b94d806f957b8b3 (diff)
Assume POSIX: <dirent.h>, struct dirent
Diffstat (limited to 'usr.bin/rdist')
-rw-r--r--usr.bin/rdist/client.c6
-rw-r--r--usr.bin/rdist/config-data.h17
-rw-r--r--usr.bin/rdist/config-def.h8
-rw-r--r--usr.bin/rdist/docmd.c11
-rw-r--r--usr.bin/rdist/expand.c6
-rw-r--r--usr.bin/rdist/os-openbsd.h7
6 files changed, 17 insertions, 38 deletions
diff --git a/usr.bin/rdist/client.c b/usr.bin/rdist/client.c
index 17d66472f33..ae4e5c0af73 100644
--- a/usr.bin/rdist/client.c
+++ b/usr.bin/rdist/client.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: client.c,v 1.27 2014/07/05 05:05:51 guenther Exp $ */
+/* $OpenBSD: client.c,v 1.28 2014/07/05 06:45:00 guenther Exp $ */
/*
* Copyright (c) 1983 Regents of the University of California.
@@ -29,6 +29,8 @@
* SUCH DAMAGE.
*/
+#include <dirent.h>
+
#include "defs.h"
#include "y.tab.h"
@@ -577,7 +579,7 @@ static int
senddir(char *rname, opt_t opts, struct stat *stb, char *user,
char *group, int destdir)
{
- DIRENTRY *dp;
+ struct dirent *dp;
DIR *d;
char *optarget, *cp;
int len;
diff --git a/usr.bin/rdist/config-data.h b/usr.bin/rdist/config-data.h
index 86c3d8fdc09..235d04e4d83 100644
--- a/usr.bin/rdist/config-data.h
+++ b/usr.bin/rdist/config-data.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: config-data.h,v 1.8 2014/07/05 06:18:58 guenther Exp $ */
+/* $OpenBSD: config-data.h,v 1.9 2014/07/05 06:45:00 guenther Exp $ */
/*
* Copyright (c) 1993 Michael A. Cooper
@@ -50,21 +50,6 @@
#define PIPE_WRITE 1
/*
- * Directory information
- */
-#if DIR_TYPE == DIR_DIRECT
-#include <sys/dir.h>
-typedef struct direct DIRENTRY;
-#define D_NAMLEN(p) ((p)->d_namlen)
-#endif /* DIR_DIRECT */
-
-#if DIR_TYPE == DIR_DIRENT
-#include <dirent.h>
-typedef struct dirent DIRENTRY;
-#define D_NAMLEN(p) (strlen((p)->d_name))
-#endif /* DIR_DIRENT */
-
-/*
* Set default write(2) return and amount types.
*/
#if !defined(WRITE_RETURN_T)
diff --git a/usr.bin/rdist/config-def.h b/usr.bin/rdist/config-def.h
index 78ba23178b1..7a689328a35 100644
--- a/usr.bin/rdist/config-def.h
+++ b/usr.bin/rdist/config-def.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: config-def.h,v 1.9 2014/07/05 06:35:03 guenther Exp $ */
+/* $OpenBSD: config-def.h,v 1.10 2014/07/05 06:45:00 guenther Exp $ */
/*
* Copyright (c) 1993 Michael A. Cooper
@@ -43,12 +43,6 @@
*/
/*
- * Types of directory routines
- */
-#define DIR_DIRECT 1
-#define DIR_DIRENT 2
-
-/*
* Types of filesystem info routines
*/
#define FSI_GETFSSTAT 1
diff --git a/usr.bin/rdist/docmd.c b/usr.bin/rdist/docmd.c
index 378eeecbe54..944439c9040 100644
--- a/usr.bin/rdist/docmd.c
+++ b/usr.bin/rdist/docmd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: docmd.c,v 1.27 2014/07/05 06:18:58 guenther Exp $ */
+/* $OpenBSD: docmd.c,v 1.28 2014/07/05 06:45:00 guenther Exp $ */
/*
* Copyright (c) 1983 Regents of the University of California.
@@ -29,6 +29,10 @@
* SUCH DAMAGE.
*/
+#include <sys/socket.h>
+#include <dirent.h>
+#include <netdb.h>
+
#include "defs.h"
#include "y.tab.h"
@@ -36,9 +40,6 @@
* Functions for rdist that do command (cmd) related activities.
*/
-#include <sys/socket.h>
-#include <netdb.h>
-
struct subcmd *subcmds; /* list of sub-commands for
current cmd */
struct namelist *filelist; /* list of source files */
@@ -636,7 +637,7 @@ static void
rcmptime(struct stat *st, struct subcmd *sbcmds, char **env)
{
DIR *d;
- DIRENTRY *dp;
+ struct dirent *dp;
char *cp;
char *optarget;
int len;
diff --git a/usr.bin/rdist/expand.c b/usr.bin/rdist/expand.c
index f9d86419034..efc1a9e2d0f 100644
--- a/usr.bin/rdist/expand.c
+++ b/usr.bin/rdist/expand.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: expand.c,v 1.13 2012/11/12 01:14:41 guenther Exp $ */
+/* $OpenBSD: expand.c,v 1.14 2014/07/05 06:45:00 guenther Exp $ */
/*
* Copyright (c) 1983 Regents of the University of California.
@@ -29,6 +29,8 @@
* SUCH DAMAGE.
*/
+#include <dirent.h>
+
#include "defs.h"
#define MAXEARGS 2048
@@ -356,7 +358,7 @@ void
matchdir(char *pattern) /* quote in pattern */
{
struct stat stb;
- DIRENTRY *dp;
+ struct dirent *dp;
DIR *dirp;
dirp = opendir(path);
diff --git a/usr.bin/rdist/os-openbsd.h b/usr.bin/rdist/os-openbsd.h
index c71cc91a980..c119b62b455 100644
--- a/usr.bin/rdist/os-openbsd.h
+++ b/usr.bin/rdist/os-openbsd.h
@@ -29,7 +29,7 @@
*/
/*
- * $OpenBSD: os-openbsd.h,v 1.16 2014/07/05 06:35:03 guenther Exp $
+ * $OpenBSD: os-openbsd.h,v 1.17 2014/07/05 06:45:00 guenther Exp $
*/
/*
@@ -51,11 +51,6 @@
#define HAVE_SETPROCTITLE
/*
- * Define the type of directory routines your system has.
- */
-#define DIR_TYPE DIR_DIRENT
-
-/*
* Determine what routines we have to get filesystem info.
*/
#define FSI_TYPE FSI_GETFSSTAT