summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2010-09-24 13:56:32 +0000
committermillert <millert@openbsd.org>2010-09-24 13:56:32 +0000
commit0530874776a9e5bd9996f9b886f2f379e8512bf9 (patch)
tree750320efba787a6850baab910a5ba5a91785f41b
parentProvide IRIX-compatible get_fpc_csr() and set_fpc_csr() for mips, although (diff)
downloadwireguard-openbsd-0530874776a9e5bd9996f9b886f2f379e8512bf9.tar.xz
wireguard-openbsd-0530874776a9e5bd9996f9b886f2f379e8512bf9.zip
Bump fts_level from short to int and add a spare short so things
line up nicely. OK deraadt@
-rw-r--r--include/fts.h8
-rw-r--r--lib/libc/gen/fts.36
-rw-r--r--lib/libc/gen/fts.c4
3 files changed, 10 insertions, 8 deletions
diff --git a/include/fts.h b/include/fts.h
index da26a8823ee..537e24b6c29 100644
--- a/include/fts.h
+++ b/include/fts.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: fts.h,v 1.12 2009/08/27 16:19:27 millert Exp $ */
+/* $OpenBSD: fts.h,v 1.13 2010/09/24 13:56:32 millert Exp $ */
/* $NetBSD: fts.h,v 1.5 1994/12/28 01:41:50 mycroft Exp $ */
/*
@@ -79,8 +79,8 @@ typedef struct _ftsent {
#define FTS_ROOTPARENTLEVEL -1
#define FTS_ROOTLEVEL 0
-#define FTS_MAXLEVEL 0x7fff
- short fts_level; /* depth (-1 to N) */
+#define FTS_MAXLEVEL 0x7fffffff
+ int fts_level; /* depth (-1 to N) */
#define FTS_D 1 /* preorder directory */
#define FTS_DC 2 /* directory that causes cycles */
@@ -107,6 +107,8 @@ typedef struct _ftsent {
#define FTS_SKIP 4 /* discard node */
unsigned short fts_instr; /* fts_set() instructions */
+ unsigned short fts_spare; /* unused */
+
struct stat *fts_statp; /* stat(2) information */
char fts_name[1]; /* file name */
} FTSENT;
diff --git a/lib/libc/gen/fts.3 b/lib/libc/gen/fts.3
index 1ec32b6d33d..e81834df98e 100644
--- a/lib/libc/gen/fts.3
+++ b/lib/libc/gen/fts.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: fts.3,v 1.27 2009/11/27 20:12:34 otto Exp $
+.\" $OpenBSD: fts.3,v 1.28 2010/09/24 13:56:32 millert Exp $
.\"
.\" Copyright (c) 1989, 1991, 1993, 1994
.\" The Regents of the University of California. All rights reserved.
@@ -29,7 +29,7 @@
.\"
.\" @(#)fts.3 8.5 (Berkeley) 4/16/94
.\"
-.Dd $Mdocdate: November 27 2009 $
+.Dd $Mdocdate: September 24 2010 $
.Dt FTS 3
.Os
.Sh NAME
@@ -117,7 +117,7 @@ typedef struct _ftsent {
size_t fts_pathlen; /* strlen(fts_path) */
char *fts_name; /* file name */
size_t fts_namelen; /* strlen(fts_name) */
- short fts_level; /* depth (-1 to N) */
+ int fts_level; /* depth (-1 to N) */
int fts_errno; /* file errno */
long fts_number; /* local numeric value */
void *fts_pointer; /* local address value */
diff --git a/lib/libc/gen/fts.c b/lib/libc/gen/fts.c
index bbc1dc7475b..8b12b45b20a 100644
--- a/lib/libc/gen/fts.c
+++ b/lib/libc/gen/fts.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fts.c,v 1.43 2009/08/27 16:19:27 millert Exp $ */
+/* $OpenBSD: fts.c,v 1.44 2010/09/24 13:56:32 millert Exp $ */
/*-
* Copyright (c) 1990, 1993, 1994
@@ -634,7 +634,7 @@ fts_build(FTS *sp, int type)
maxlen = sp->fts_pathlen - len;
/*
- * fts_level is a short so we must prevent it from wrapping
+ * fts_level is signed so we must prevent it from wrapping
* around to FTS_ROOTLEVEL and FTS_ROOTPARENTLEVEL.
*/
level = cur->fts_level;