From aa092ccf6ab48f7e0c154a6c12b40c5a120500be Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Thu, 8 Oct 2009 09:35:51 -0600 Subject: maint: remove unused macros and declarations * src/system.h (EDQUOT, EISDIR, ENOSYS, EOVERFLOW, F_OK, X_OK) (W_OK, R_OK): Delete; macros provided by gnulib. (includes): Gnulib guarantees both and , in either order. (free, malloc, memchr, realloc, getenv, lseek): Delete, gnulib guarantees these declarations. * m4/check-decl.m4 (gl_CHECK_DECLS): Delete checks now done by gnulib. --- src/system.h | 59 ++++------------------------------------------------------- 1 file changed, 4 insertions(+), 55 deletions(-) (limited to 'src') diff --git a/src/system.h b/src/system.h index f3e26a835..8de0f3cd2 100644 --- a/src/system.h +++ b/src/system.h @@ -44,16 +44,8 @@ you must include before including this file #include "configmake.h" -#if TIME_WITH_SYS_TIME -# include -# include -#else -# if HAVE_SYS_TIME_H -# include -# else -# include -# endif -#endif +#include +#include /* Since major is a function on SVR4, we can't use `ifndef major'. */ #if MAJOR_IN_MKDEV @@ -86,16 +78,8 @@ you must include before including this file #include -/* Some systems don't define the following symbols. */ -#ifndef EDQUOT -# define EDQUOT (-1) -#endif -#ifndef EISDIR -# define EISDIR (-1) -#endif -#ifndef ENOSYS -# define ENOSYS (-1) -#endif +/* Some systems don't define this; POSIX mentions it but says it is + obsolete, so gnulib does not provide it either. */ #ifndef ENODATA # define ENODATA (-1) #endif @@ -125,13 +109,6 @@ initialize_exit_failure (int status) #include -#ifndef F_OK -# define F_OK 0 -# define X_OK 1 -# define W_OK 2 -# define R_OK 4 -#endif - #include #ifndef _D_EXACT_NAMLEN # define _D_EXACT_NAMLEN(dp) strlen ((dp)->d_name) @@ -281,30 +258,6 @@ select_plural (uintmax_t n) #define STREQ(a, b) (strcmp (a, b) == 0) -#if !HAVE_DECL_FREE -void free (); -#endif - -#if !HAVE_DECL_MALLOC -char *malloc (); -#endif - -#if !HAVE_DECL_MEMCHR -char *memchr (); -#endif - -#if !HAVE_DECL_REALLOC -char *realloc (); -#endif - -#if !HAVE_DECL_GETENV -char *getenv (); -#endif - -#if !HAVE_DECL_LSEEK -off_t lseek (); -#endif - #if !HAVE_DECL_GETLOGIN char *getlogin (); #endif @@ -549,10 +502,6 @@ enum while (0) #endif -#ifndef EOVERFLOW -# define EOVERFLOW EINVAL -#endif - #if ! HAVE_SYNC # define sync() /* empty */ #endif -- cgit v1.2.3-54-g00ecf