From fc799c2b12fef83615f04485addd98964e3f6c8b Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Thu, 27 Aug 2009 16:26:44 +0000 Subject: Appease gcc2 (I wish people would write in C, rather than "latest crap gcc added") ok millert miod --- usr.bin/file/apprentice.c | 11 ++++++----- usr.bin/file/file.c | 11 ++++++----- usr.bin/file/file.h | 6 +++--- usr.bin/file/magic.c | 11 ++++++----- 4 files changed, 21 insertions(+), 18 deletions(-) (limited to 'usr.bin/file') 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 +#include +#include + #include "file.h" #include "magic.h" #include "patchlevel.h" @@ -41,16 +45,13 @@ #include #include #include -#include -#include #ifdef QUICK #include #endif -#include #include #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 +#include /* for MAXPATHLEN */ +#include + #include "file.h" #include "magic.h" @@ -37,9 +41,6 @@ #include #include #include -#include -#include /* for MAXPATHLEN */ -#include #ifdef RESTORE_TIME # if (__COHERENT__ >= 0x420) # include @@ -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 +#include /* for MAXPATHLEN */ +#include + #include "file.h" #include "magic.h" @@ -33,9 +37,6 @@ #include #include #include -#include -#include /* for MAXPATHLEN */ -#include #ifdef QUICK #include #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 -- cgit v1.2.3