summaryrefslogtreecommitdiff
path: root/openbsd-compat/strmode.c
diff options
context:
space:
mode:
Diffstat (limited to 'openbsd-compat/strmode.c')
-rw-r--r--openbsd-compat/strmode.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/openbsd-compat/strmode.c b/openbsd-compat/strmode.c
index adf5e273e..e64d19869 100644
--- a/openbsd-compat/strmode.c
+++ b/openbsd-compat/strmode.c
@@ -10,7 +10,11 @@
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the 11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution. 12 * documentation and/or other materials provided with the distribution.
13 * 3. Neither the name of the University nor the names of its contributors 13 * 3. All advertising materials mentioning features or use of this software
14 * must display the following acknowledgement:
15 * This product includes software developed by the University of
16 * California, Berkeley and its contributors.
17 * 4. Neither the name of the University nor the names of its contributors
14 * may be used to endorse or promote products derived from this software 18 * may be used to endorse or promote products derived from this software
15 * without specific prior written permission. 19 * without specific prior written permission.
16 * 20 *
@@ -31,17 +35,15 @@
31#ifndef HAVE_STRMODE 35#ifndef HAVE_STRMODE
32 36
33#if defined(LIBC_SCCS) && !defined(lint) 37#if defined(LIBC_SCCS) && !defined(lint)
34static char *rcsid = "$OpenBSD: strmode.c,v 1.5 2003/06/11 21:08:16 deraadt Exp $"; 38static char *rcsid = "$OpenBSD: strmode.c,v 1.3 1997/06/13 13:57:20 deraadt Exp $";
35#endif /* LIBC_SCCS and not lint */ 39#endif /* LIBC_SCCS and not lint */
36 40
37#include <sys/types.h> 41#include <sys/types.h>
38#include <sys/stat.h> 42#include <sys/stat.h>
39#include <string.h> 43#include <string.h>
40 44
41/* XXX mode should be mode_t */
42
43void 45void
44strmode(int mode, char *p) 46strmode(register mode_t mode, register char *p)
45{ 47{
46 /* print type */ 48 /* print type */
47 switch (mode & S_IFMT) { 49 switch (mode & S_IFMT) {