diff options
author | Eric Blake <ebb9@byu.net> | 2009-10-08 09:35:51 -0600 |
---|---|---|
committer | Eric Blake <ebb9@byu.net> | 2009-10-08 20:30:06 -0600 |
commit | aa092ccf6ab48f7e0c154a6c12b40c5a120500be (patch) | |
tree | 949656aae8f805fc3a9d8741a17c98772f78b73c /src | |
parent | 2a876d901d8cccb3f633b65a93abaead81628a8f (diff) | |
download | coreutils-aa092ccf6ab48f7e0c154a6c12b40c5a120500be.tar.xz |
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 <time.h> and <sys/time.h>, 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.
Diffstat (limited to 'src')
-rw-r--r-- | src/system.h | 59 |
1 files changed, 4 insertions, 55 deletions
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 <sys/types.h> before including this file #include "configmake.h" -#if TIME_WITH_SYS_TIME -# include <sys/time.h> -# include <time.h> -#else -# if HAVE_SYS_TIME_H -# include <sys/time.h> -# else -# include <time.h> -# endif -#endif +#include <sys/time.h> +#include <time.h> /* Since major is a function on SVR4, we can't use `ifndef major'. */ #if MAJOR_IN_MKDEV @@ -86,16 +78,8 @@ you must include <sys/types.h> before including this file #include <errno.h> -/* 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 <fcntl.h> -#ifndef F_OK -# define F_OK 0 -# define X_OK 1 -# define W_OK 2 -# define R_OK 4 -#endif - #include <dirent.h> #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 |