]> granicus.if.org Git - file/commitdiff
remove tests for stddef.h, locale.h, limits.h all defined in c89 (petk)
authorChristos Zoulas <christos@zoulas.com>
Mon, 1 Oct 2018 18:45:39 +0000 (18:45 +0000)
committerChristos Zoulas <christos@zoulas.com>
Mon, 1 Oct 2018 18:45:39 +0000 (18:45 +0000)
configure.ac
src/apprentice.c
src/cdf.c
src/file.h
src/funcs.c
src/magic.c
src/vasprintf.c

index 72d69ed66c982bb17c169098037b49439fb66ad9..715f147dec8b44ced6b661e8d08fc6878d7f861e 100644 (file)
@@ -90,7 +90,7 @@ dnl Checks for headers
 AC_HEADER_STDC
 AC_HEADER_MAJOR
 AC_HEADER_SYS_WAIT
-AC_CHECK_HEADERS(stdint.h fcntl.h locale.h stdint.h inttypes.h unistd.h)
+AC_CHECK_HEADERS(stdint.h fcntl.h stdint.h inttypes.h unistd.h)
 AC_CHECK_HEADERS(stddef.h utime.h wchar.h wctype.h limits.h)
 AC_CHECK_HEADERS(getopt.h err.h xlocale.h)
 AC_CHECK_HEADERS(sys/mman.h sys/stat.h sys/types.h sys/utime.h sys/time.h)
index 28a513f66061f3c281fbc3cff76d5b5c704d0a4a..ecb15d3bf6ab09b7bc541db5566649d68d6f4173 100644 (file)
@@ -32,7 +32,7 @@
 #include "file.h"
 
 #ifndef        lint
-FILE_RCSID("@(#)$File: apprentice.c,v 1.279 2018/09/09 20:33:28 christos Exp $")
+FILE_RCSID("@(#)$File: apprentice.c,v 1.280 2018/10/01 18:45:39 christos Exp $")
 #endif /* lint */
 
 #include "magic.h"
@@ -40,9 +40,7 @@ FILE_RCSID("@(#)$File: apprentice.c,v 1.279 2018/09/09 20:33:28 christos Exp $")
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#ifdef HAVE_STDDEF_H
 #include <stddef.h>
-#endif
 #include <string.h>
 #include <assert.h>
 #include <ctype.h>
@@ -51,9 +49,7 @@ FILE_RCSID("@(#)$File: apprentice.c,v 1.279 2018/09/09 20:33:28 christos Exp $")
 #include <sys/mman.h>
 #endif
 #include <dirent.h>
-#if defined(HAVE_LIMITS_H)
 #include <limits.h>
-#endif
 
 
 #define        EATAB {while (isascii((unsigned char) *l) && \
index b4a9c488e68abc4ec897b82dab712e48e58fe31f..47ccbd5148bd6f6d625800da7d8b3708f116ff1c 100644 (file)
--- a/src/cdf.c
+++ b/src/cdf.c
@@ -35,7 +35,7 @@
 #include "file.h"
 
 #ifndef lint
-FILE_RCSID("@(#)$File: cdf.c,v 1.111 2018/09/09 20:33:28 christos Exp $")
+FILE_RCSID("@(#)$File: cdf.c,v 1.112 2018/10/01 18:45:39 christos Exp $")
 #endif
 
 #include <assert.h>
@@ -47,9 +47,7 @@ FILE_RCSID("@(#)$File: cdf.c,v 1.111 2018/09/09 20:33:28 christos Exp $")
 #include <string.h>
 #include <time.h>
 #include <ctype.h>
-#ifdef HAVE_LIMITS_H
 #include <limits.h>
-#endif
 
 #ifndef EFTYPE
 #define EFTYPE EINVAL
index c24e0a903696404b96e19a2c3694205f9905ab41..3898726101f26386bc3987ba0576ac87d49a63b8 100644 (file)
@@ -27,7 +27,7 @@
  */
 /*
  * file.h - definitions for file(1) program
- * @(#)$File: file.h,v 1.197 2018/09/09 20:33:28 christos Exp $
+ * @(#)$File: file.h,v 1.198 2018/10/01 18:45:39 christos Exp $
  */
 
 #ifndef __file_h__
@@ -513,9 +513,7 @@ protected void buffer_init(struct buffer *, int, const void *, size_t);
 protected void buffer_fini(struct buffer *);
 protected int buffer_fill(const struct buffer *);
 
-#if defined(HAVE_LOCALE_H)
 #include <locale.h>
-#endif
 #if defined(HAVE_XLOCALE_H)
 #include <xlocale.h>
 #endif
index 8193bdffac8ea5cfd5a097211133a9be96b9543d..48c85538fc4ffd98fec74d2d119239d15e548815 100644 (file)
@@ -27,7 +27,7 @@
 #include "file.h"
 
 #ifndef        lint
-FILE_RCSID("@(#)$File: funcs.c,v 1.99 2018/08/20 10:08:18 christos Exp $")
+FILE_RCSID("@(#)$File: funcs.c,v 1.100 2018/10/01 18:45:39 christos Exp $")
 #endif /* lint */
 
 #include "magic.h"
@@ -42,9 +42,7 @@ FILE_RCSID("@(#)$File: funcs.c,v 1.99 2018/08/20 10:08:18 christos Exp $")
 #if defined(HAVE_WCTYPE_H)
 #include <wctype.h>
 #endif
-#if defined(HAVE_LIMITS_H)
 #include <limits.h>
-#endif
 
 #ifndef SIZE_MAX
 #define SIZE_MAX       ((size_t)~0)
index b774f1bd1180a07bf24458bbc48a492afdf083fc..7f469c59b45b89c74086b1a56ac01566d1fd6767 100644 (file)
@@ -33,7 +33,7 @@
 #include "file.h"
 
 #ifndef        lint
-FILE_RCSID("@(#)$File: magic.c,v 1.105 2018/08/02 12:53:51 christos Exp $")
+FILE_RCSID("@(#)$File: magic.c,v 1.106 2018/10/01 18:45:39 christos Exp $")
 #endif /* lint */
 
 #include "magic.h"
@@ -44,9 +44,7 @@ FILE_RCSID("@(#)$File: magic.c,v 1.105 2018/08/02 12:53:51 christos Exp $")
 #ifdef QUICK
 #include <sys/mman.h>
 #endif
-#ifdef HAVE_LIMITS_H
 #include <limits.h>    /* for PIPE_BUF */
-#endif
 
 #if defined(HAVE_UTIMES)
 # include <sys/time.h>
index 8d0531541162737b0a67c4cc46b61cdcf9a5778d..c87465bd53488a7b79d466e17c8e4788e491b8eb 100644 (file)
@@ -108,7 +108,7 @@ you use strange formats.
 #include "file.h"
 
 #ifndef        lint
-FILE_RCSID("@(#)$File: vasprintf.c,v 1.15 2018/09/09 20:33:28 christos Exp $")
+FILE_RCSID("@(#)$File: vasprintf.c,v 1.16 2018/10/01 18:45:39 christos Exp $")
 #endif /* lint */
 
 #include <assert.h>
@@ -116,12 +116,8 @@ FILE_RCSID("@(#)$File: vasprintf.c,v 1.15 2018/09/09 20:33:28 christos Exp $")
 #include <stdlib.h>
 #include <stdarg.h>
 #include <ctype.h>
-#ifdef HAVE_LIMITS_H
 #include <limits.h>
-#endif
-#ifdef HAVE_STDDEF_H
 #include <stddef.h>
-#endif
 
 #define ALLOC_CHUNK 2048
 #define ALLOC_SECURITY_MARGIN 1024   /* big value because some platforms have very big 'G' exponent */