From: Paul Eggert Date: Tue, 9 Sep 2003 19:37:26 +0000 (+0000) Subject: Remove K&R cruft. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=46474c5a6fc8a449b041731529a668528f47ec07;p=pspp Remove K&R cruft. --- diff --git a/lib/hard-locale.c b/lib/hard-locale.c index 0070542e09..8c0ee8c777 100644 --- a/lib/hard-locale.c +++ b/lib/hard-locale.c @@ -1,6 +1,6 @@ /* hard-locale.c -- Determine whether a locale is hard. - Copyright (C) 1997, 1998, 1999, 2002 Free Software Foundation, Inc. + Copyright (C) 1997, 1998, 1999, 2002, 2003 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -20,19 +20,14 @@ # include #endif +#include "hard-locale.h" + #if HAVE_LOCALE_H # include #endif -#if HAVE_STDLIB_H -# include -#endif - -#if HAVE_STRING_H -# include -#endif - -#include "hard-locale.h" +#include +#include /* Return nonzero if the current CATEGORY locale is hard, i.e. if you can't get away with assuming traditional C or POSIX behavior. */ diff --git a/lib/hash.c b/lib/hash.c index 7373a011ce..3948ce4cf6 100644 --- a/lib/hash.c +++ b/lib/hash.c @@ -27,27 +27,11 @@ #if HAVE_CONFIG_H # include #endif -#if HAVE_STDLIB_H -# include -#endif #include #include #include - -#ifndef HAVE_DECL_FREE -"this configure-time declaration test was not run" -#endif -#if !HAVE_DECL_FREE -void free (); -#endif - -#ifndef HAVE_DECL_MALLOC -"this configure-time declaration test was not run" -#endif -#if !HAVE_DECL_MALLOC -char *malloc (); -#endif +#include #if USE_OBSTACK # include "obstack.h" diff --git a/lib/human.c b/lib/human.c index 285e4fd55e..b342bf1784 100644 --- a/lib/human.c +++ b/lib/human.c @@ -36,25 +36,9 @@ # include #endif -#if HAVE_STDLIB_H -# include -#endif -#ifndef HAVE_DECL_GETENV -"this configure-time declaration test was not run" -#endif -#if !HAVE_DECL_GETENV -char *getenv (); -#endif - -#if HAVE_STRING_H -# include -#endif - -#if HAVE_STRINGS_H -# include -#endif - #include +#include +#include #include "gettext.h" #define _(msgid) gettext (msgid) diff --git a/m4/hard-locale.m4 b/m4/hard-locale.m4 index 79f24d28db..3e2a08ccb5 100644 --- a/m4/hard-locale.m4 +++ b/m4/hard-locale.m4 @@ -1,5 +1,5 @@ -# hard-locale.m4 serial 1 -dnl Copyright (C) 2002 Free Software Foundation, Inc. +# hard-locale.m4 serial 2 +dnl Copyright (C) 2002, 2003 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program @@ -9,6 +9,6 @@ dnl the same distribution terms as the rest of that program. AC_DEFUN([gl_HARD_LOCALE], [ dnl Prerequisites of lib/hard-locale.c. - AC_CHECK_HEADERS_ONCE(locale.h stdlib.h string.h) + AC_CHECK_HEADERS_ONCE(locale.h) AC_CHECK_FUNCS_ONCE(setlocale) ]) diff --git a/m4/hash.m4 b/m4/hash.m4 index ab48a1d230..9fe3211f91 100644 --- a/m4/hash.m4 +++ b/m4/hash.m4 @@ -1,4 +1,4 @@ -# hash.m4 serial 2 +# hash.m4 serial 3 dnl Copyright (C) 2002, 2003 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General @@ -10,6 +10,4 @@ AC_DEFUN([gl_HASH], [ dnl Prerequisites of lib/hash.c. AC_REQUIRE([AM_STDBOOL_H]) - AC_CHECK_HEADERS_ONCE(stdlib.h) - AC_CHECK_DECLS_ONCE(free malloc) ]) diff --git a/m4/human.m4 b/m4/human.m4 index 1a23f166fe..a2b2365700 100644 --- a/m4/human.m4 +++ b/m4/human.m4 @@ -1,4 +1,4 @@ -# human.m4 serial 3 +# human.m4 serial 4 dnl Copyright (C) 2002, 2003 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General @@ -13,7 +13,6 @@ AC_DEFUN([gl_HUMAN], AC_REQUIRE([jm_AC_TYPE_UINTMAX_T]) dnl Prerequisites of lib/human.c. - AC_CHECK_HEADERS_ONCE(locale.h stdlib.h string.h) - AC_CHECK_DECLS_ONCE(getenv) + AC_CHECK_HEADERS_ONCE(locale.h) AC_CHECK_FUNCS_ONCE(localeconv) ])