diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2009-08-27 16:26:44 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2009-08-27 16:26:44 +0000 |
commit | fc799c2b12fef83615f04485addd98964e3f6c8b (patch) | |
tree | b6476d49c24b0ebac8cad7061312676ca67a6d26 | |
parent | b7f5ad085124a99744ae40715274e883f8461659 (diff) |
Appease gcc2 (I wish people would write in C, rather than "latest crap
gcc added")
ok millert miod
-rw-r--r-- | usr.bin/file/apprentice.c | 11 | ||||
-rw-r--r-- | usr.bin/file/file.c | 11 | ||||
-rw-r--r-- | usr.bin/file/file.h | 6 | ||||
-rw-r--r-- | usr.bin/file/magic.c | 11 |
4 files changed, 21 insertions, 18 deletions
diff --git a/usr.bin/file/apprentice.c b/usr.bin/file/apprentice.c index 46cb5f81ec4..8d2d78347fd 100644 --- a/usr.bin/file/apprentice.c +++ b/usr.bin/file/apprentice.c @@ -1,4 +1,4 @@ -/* $OpenBSD: apprentice.c,v 1.26 2009/04/24 18:54:34 chl Exp $ */ +/* $OpenBSD: apprentice.c,v 1.27 2009/08/27 16:26:42 deraadt Exp $ */ /* * Copyright (c) Ian F. Darwin 1986-1995. * Software written by Ian F. Darwin and others; @@ -30,6 +30,10 @@ * apprentice - make one pass through /etc/magic, learning its secrets. */ +#include <sys/param.h> +#include <sys/stat.h> +#include <sys/types.h> + #include "file.h" #include "magic.h" #include "patchlevel.h" @@ -41,16 +45,13 @@ #include <assert.h> #include <ctype.h> #include <fcntl.h> -#include <sys/stat.h> -#include <sys/param.h> #ifdef QUICK #include <sys/mman.h> #endif -#include <sys/types.h> #include <dirent.h> #ifndef lint -FILE_RCSID("@(#)$Id: apprentice.c,v 1.26 2009/04/24 18:54:34 chl Exp $") +FILE_RCSID("@(#)$Id: apprentice.c,v 1.27 2009/08/27 16:26:42 deraadt Exp $") #endif /* lint */ #define EATAB {while (isascii((unsigned char) *l) && \ diff --git a/usr.bin/file/file.c b/usr.bin/file/file.c index b4d05763cbf..0b3e646b11b 100644 --- a/usr.bin/file/file.c +++ b/usr.bin/file/file.c @@ -1,4 +1,4 @@ -/* $OpenBSD: file.c,v 1.19 2009/04/24 18:54:34 chl Exp $ */ +/* $OpenBSD: file.c,v 1.20 2009/08/27 16:26:43 deraadt Exp $ */ /* * Copyright (c) Ian F. Darwin 1986-1995. * Software written by Ian F. Darwin and others; @@ -30,6 +30,10 @@ * file - find type of a file or files - main program. */ +#include <sys/types.h> +#include <sys/param.h> /* for MAXPATHLEN */ +#include <sys/stat.h> + #include "file.h" #include "magic.h" @@ -37,9 +41,6 @@ #include <stdlib.h> #include <unistd.h> #include <string.h> -#include <sys/types.h> -#include <sys/param.h> /* for MAXPATHLEN */ -#include <sys/stat.h> #ifdef RESTORE_TIME # if (__COHERENT__ >= 0x420) # include <sys/utime.h> @@ -71,7 +72,7 @@ int getopt_long(int argc, char * const *argv, const char *optstring, const struc #include "patchlevel.h" #ifndef lint -FILE_RCSID("@(#)$Id: file.c,v 1.19 2009/04/24 18:54:34 chl Exp $") +FILE_RCSID("@(#)$Id: file.c,v 1.20 2009/08/27 16:26:43 deraadt Exp $") #endif /* lint */ diff --git a/usr.bin/file/file.h b/usr.bin/file/file.h index 13d7ece44dc..5cef2e7e2b3 100644 --- a/usr.bin/file/file.h +++ b/usr.bin/file/file.h @@ -1,4 +1,4 @@ -/* $OpenBSD: file.h,v 1.20 2009/04/24 18:54:34 chl Exp $ */ +/* $OpenBSD: file.h,v 1.21 2009/08/27 16:26:43 deraadt Exp $ */ /* * Copyright (c) Ian F. Darwin 1986-1995. * Software written by Ian F. Darwin and others; @@ -28,7 +28,7 @@ */ /* * file.h - definitions for file(1) program - * @(#)$Id: file.h,v 1.20 2009/04/24 18:54:34 chl Exp $ + * @(#)$Id: file.h,v 1.21 2009/08/27 16:26:43 deraadt Exp $ */ #ifndef __file_h__ @@ -382,7 +382,7 @@ int asprintf(char **ptr, const char *format_string, ...); #define O_BINARY 0 #endif -#ifdef __GNUC__ +#if defined(__GNUC__) && (__GNUC__ >= 3) static const char *rcsid(const char *) __attribute__((__used__)); #endif #define FILE_RCSID(id) \ diff --git a/usr.bin/file/magic.c b/usr.bin/file/magic.c index e28186a9639..4e821d4890e 100644 --- a/usr.bin/file/magic.c +++ b/usr.bin/file/magic.c @@ -1,4 +1,4 @@ -/* $OpenBSD: magic.c,v 1.6 2009/04/24 18:54:34 chl Exp $ */ +/* $OpenBSD: magic.c,v 1.7 2009/08/27 16:26:43 deraadt Exp $ */ /* * Copyright (c) Christos Zoulas 2003. * All Rights Reserved. @@ -26,6 +26,10 @@ * SUCH DAMAGE. */ +#include <sys/types.h> +#include <sys/param.h> /* for MAXPATHLEN */ +#include <sys/stat.h> + #include "file.h" #include "magic.h" @@ -33,9 +37,6 @@ #include <stdlib.h> #include <unistd.h> #include <string.h> -#include <sys/types.h> -#include <sys/param.h> /* for MAXPATHLEN */ -#include <sys/stat.h> #ifdef QUICK #include <sys/mman.h> #endif @@ -64,7 +65,7 @@ #include "patchlevel.h" #ifndef lint -FILE_RCSID("@(#)$Id: magic.c,v 1.6 2009/04/24 18:54:34 chl Exp $") +FILE_RCSID("@(#)$Id: magic.c,v 1.7 2009/08/27 16:26:43 deraadt Exp $") #endif /* lint */ #ifndef PIPE_BUF |