mirror of
https://github.com/coreutils/coreutils.git
synced 2024-11-24 02:17:22 +08:00
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.
This commit is contained in:
parent
2a876d901d
commit
aa092ccf6a
@ -1,4 +1,4 @@
|
||||
#serial 24
|
||||
#serial 25
|
||||
# Check declarations for this package.
|
||||
|
||||
dnl Copyright (C) 1997-2001, 2003-2006, 2008-2009 Free Software
|
||||
@ -37,13 +37,7 @@ AC_DEFUN([gl_CHECK_DECLS],
|
||||
|
||||
AC_CHECK_DECLS([isblank], [], [], [#include <ctype.h>])
|
||||
|
||||
AC_CHECK_DECLS_ONCE([free])
|
||||
AC_CHECK_DECLS_ONCE([getenv])
|
||||
AC_CHECK_DECLS_ONCE([geteuid])
|
||||
AC_CHECK_DECLS_ONCE([getlogin])
|
||||
AC_CHECK_DECLS_ONCE([getuid])
|
||||
AC_CHECK_DECLS_ONCE([lseek])
|
||||
AC_CHECK_DECLS_ONCE([malloc])
|
||||
AC_CHECK_DECLS_ONCE([memchr])
|
||||
AC_CHECK_DECLS_ONCE([realloc])
|
||||
])
|
||||
|
59
src/system.h
59
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
|
||||
|
Loading…
Reference in New Issue
Block a user