mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-21 18:23:59 +00:00
Remove HAVE_RAW_DECL_CHOWN etc. from config.h
This commit is contained in:
parent
8ab7032073
commit
d6974efa70
15
ChangeLog
15
ChangeLog
@ -1,3 +1,18 @@
|
||||
2011-01-24 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
Remove HAVE_RAW_DECL_CHOWN etc. from config.h
|
||||
* Makefile.in (sync-from-gnulib): Remove m4/warn-on-use.m4,
|
||||
as it is no longer needed.
|
||||
* aclocal.m4, configure, lib/Makefile.in, src/config.in: Regenerate.
|
||||
* configure.in: Invoke the new gnulib macro
|
||||
gl_ASSERT_NO_GNULIB_POSIXCHECK, which removes the need for
|
||||
warn-on-use.m4 and for the HAVE_RAW_DECL_* symbols in config.h.
|
||||
* m4/getopt.m4: Sync from gnulib; this removes the need for
|
||||
HAVE_DECL_OPTRESET and HAVE_DECL_GETOPT_CLIP from config.h.
|
||||
* m4/gnulib-common.m4 (gl_ASSERT_NO_GNULIB_POSIXCHECK):
|
||||
New macro, synced from gnulib.
|
||||
* m4/warn-on-use.m4: Remove.
|
||||
|
||||
2011-01-22 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
aclocal.m4: put this file back into repository
|
||||
|
@ -335,6 +335,7 @@ GNULIB_TOOL_FLAGS = \
|
||||
sync-from-gnulib: $(gnulib_srcdir)
|
||||
cd $(srcdir) && \
|
||||
$(gnulib_srcdir)/gnulib-tool $(GNULIB_TOOL_FLAGS) $(GNULIB_MODULES)
|
||||
rm $(srcdir)/m4/warn-on-use.m4
|
||||
cp $(gnulib_srcdir)/build-aux/texinfo.tex $(srcdir)/doc/misc
|
||||
cp \
|
||||
$(gnulib_srcdir)/build-aux/config.sub \
|
||||
|
1
aclocal.m4
vendored
1
aclocal.m4
vendored
@ -997,5 +997,4 @@ m4_include([m4/stddef_h.m4])
|
||||
m4_include([m4/time_h.m4])
|
||||
m4_include([m4/time_r.m4])
|
||||
m4_include([m4/unistd_h.m4])
|
||||
m4_include([m4/warn-on-use.m4])
|
||||
m4_include([m4/wchar_t.m4])
|
||||
|
@ -2662,6 +2662,7 @@ AC_FUNC_FSEEKO
|
||||
AC_FUNC_GETPGRP
|
||||
|
||||
# Configure gnulib.
|
||||
gl_ASSERT_NO_GNULIB_POSIXCHECK
|
||||
gl_ASSERT_NO_GNULIB_TESTS
|
||||
gl_INIT
|
||||
|
||||
|
@ -56,8 +56,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
|
||||
$(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/mktime.m4 \
|
||||
$(top_srcdir)/m4/multiarch.m4 $(top_srcdir)/m4/stddef_h.m4 \
|
||||
$(top_srcdir)/m4/time_h.m4 $(top_srcdir)/m4/time_r.m4 \
|
||||
$(top_srcdir)/m4/unistd_h.m4 $(top_srcdir)/m4/warn-on-use.m4 \
|
||||
$(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/configure.in
|
||||
$(top_srcdir)/m4/unistd_h.m4 $(top_srcdir)/m4/wchar_t.m4 \
|
||||
$(top_srcdir)/configure.in
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
|
45
m4/getopt.m4
45
m4/getopt.m4
@ -1,4 +1,4 @@
|
||||
# getopt.m4 serial 33
|
||||
# getopt.m4 serial 34
|
||||
dnl Copyright (C) 2002-2006, 2008-2011 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
@ -75,20 +75,6 @@ AC_DEFUN([gl_GETOPT_CHECK_HEADERS],
|
||||
AC_CHECK_FUNCS([getopt_long_only], [], [gl_replace_getopt=yes])
|
||||
fi
|
||||
|
||||
dnl BSD getopt_long uses an incompatible method to reset option processing.
|
||||
dnl Existence of the variable, in and of itself, is not a reason to replace
|
||||
dnl getopt, but knowledge of the variable is needed to determine how to
|
||||
dnl reset and whether a reset reparses the environment.
|
||||
dnl Solaris supports neither optreset nor optind=0, but keeps no state that
|
||||
dnl needs a reset beyond setting optind=1; detect Solaris by getopt_clip.
|
||||
if test -z "$gl_replace_getopt"; then
|
||||
AC_CHECK_DECLS([optreset], [],
|
||||
[AC_CHECK_DECLS([getopt_clip], [], [],
|
||||
[[#include <getopt.h>]])
|
||||
],
|
||||
[[#include <getopt.h>]])
|
||||
fi
|
||||
|
||||
dnl mingw's getopt (in libmingwex.a) does weird things when the options
|
||||
dnl strings starts with '+' and it's not the first call. Some internal state
|
||||
dnl is left over from earlier calls, and neither setting optind = 0 nor
|
||||
@ -102,18 +88,34 @@ AC_DEFUN([gl_GETOPT_CHECK_HEADERS],
|
||||
AC_CACHE_CHECK([whether getopt is POSIX compatible],
|
||||
[gl_cv_func_getopt_posix],
|
||||
[
|
||||
dnl BSD getopt_long uses an incompatible method to reset
|
||||
dnl option processing. Existence of the variable, in and of
|
||||
dnl itself, is not a reason to replace getopt, but knowledge
|
||||
dnl of the variable is needed to determine how to reset and
|
||||
dnl whether a reset reparses the environment. Solaris
|
||||
dnl supports neither optreset nor optind=0, but keeps no state
|
||||
dnl that needs a reset beyond setting optind=1; detect Solaris
|
||||
dnl by getopt_clip.
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[[#include <unistd.h>]],
|
||||
[[int *p = &optreset; return optreset;]])],
|
||||
[gl_optind_min=1],
|
||||
[AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[[#include <getopt.h>]],
|
||||
[[return !getopt_clip;]])],
|
||||
[gl_optind_min=1],
|
||||
[gl_optind_min=0])])
|
||||
|
||||
dnl This test fails on mingw and succeeds on many other platforms.
|
||||
gl_save_CPPFLAGS=$CPPFLAGS
|
||||
CPPFLAGS="$CPPFLAGS -DOPTIND_MIN=$gl_optind_min"
|
||||
AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#if !HAVE_DECL_OPTRESET && !HAVE_DECL_GETOPT_CLIP
|
||||
# define OPTIND_MIN 0
|
||||
#else
|
||||
# define OPTIND_MIN 1
|
||||
#endif
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
@ -201,6 +203,7 @@ main ()
|
||||
*) gl_cv_func_getopt_posix="guessing yes";;
|
||||
esac
|
||||
])
|
||||
CPPFLAGS=$gl_save_CPPFLAGS
|
||||
])
|
||||
case "$gl_cv_func_getopt_posix" in
|
||||
*no) gl_replace_getopt=yes ;;
|
||||
|
@ -1,4 +1,4 @@
|
||||
# gnulib-common.m4 serial 22
|
||||
# gnulib-common.m4 serial 23
|
||||
dnl Copyright (C) 2007-2011 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
@ -102,6 +102,16 @@ AC_DEFUN([gl_MODULE_INDICATOR_FOR_TESTS],
|
||||
[Define to 1 when the gnulib module $1 should be tested.])
|
||||
])
|
||||
|
||||
# gl_ASSERT_NO_GNULIB_POSIXCHECK
|
||||
# asserts that there will never be a need to #define GNULIB_POSIXCHECK.
|
||||
# and thereby enables an optimization of configure and config.h.
|
||||
# Used by Emacs.
|
||||
AC_DEFUN([gl_ASSERT_NO_GNULIB_POSIXCHECK],
|
||||
[
|
||||
dnl Override gl_WARN_ON_USE_PREPARE.
|
||||
AC_DEFUN([gl_WARN_ON_USE_PREPARE], [])
|
||||
])
|
||||
|
||||
# gl_ASSERT_NO_GNULIB_TESTS
|
||||
# asserts that there will be no gnulib tests in the scope of the configure.ac
|
||||
# and thereby enables an optimization of config.h.
|
||||
|
@ -1,45 +0,0 @@
|
||||
# warn-on-use.m4 serial 2
|
||||
dnl Copyright (C) 2010-2011 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# gl_WARN_ON_USE_PREPARE(INCLUDES, NAMES)
|
||||
# ---------------------------------------
|
||||
# For each whitespace-separated element in the list of NAMES, define
|
||||
# HAVE_RAW_DECL_name if the function has a declaration among INCLUDES
|
||||
# even after being undefined as a macro.
|
||||
#
|
||||
# See warn-on-use.h for some hints on how to poison function names, as
|
||||
# well as ideas on poisoning global variables and macros. NAMES may
|
||||
# include global variables, but remember that only functions work with
|
||||
# _GL_WARN_ON_USE. Typically, INCLUDES only needs to list a single
|
||||
# header, but if the replacement header pulls in other headers because
|
||||
# some systems declare functions in the wrong header, then INCLUDES
|
||||
# should do likewise.
|
||||
#
|
||||
# If you assume C89, then it is generally safe to assume declarations
|
||||
# for functions declared in that standard (such as gets) without
|
||||
# needing gl_WARN_ON_USE_PREPARE.
|
||||
AC_DEFUN([gl_WARN_ON_USE_PREPARE],
|
||||
[
|
||||
m4_foreach_w([gl_decl], [$2],
|
||||
[AH_TEMPLATE([HAVE_RAW_DECL_]AS_TR_CPP(m4_defn([gl_decl])),
|
||||
[Define to 1 if ]m4_defn([gl_decl])[ is declared even after
|
||||
undefining macros.])])dnl
|
||||
for gl_func in m4_flatten([$2]); do
|
||||
AS_VAR_PUSHDEF([gl_Symbol], [gl_cv_have_raw_decl_$gl_func])dnl
|
||||
AC_CACHE_CHECK([whether $gl_func is declared without a macro],
|
||||
gl_Symbol,
|
||||
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([$1],
|
||||
[@%:@undef $gl_func
|
||||
(void) $gl_func;])],
|
||||
[AS_VAR_SET(gl_Symbol, [yes])], [AS_VAR_SET(gl_Symbol, [no])])])
|
||||
AS_VAR_IF(gl_Symbol, [yes],
|
||||
[AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_RAW_DECL_$gl_func]), [1])
|
||||
dnl shortcut - if the raw declaration exists, then set a cache
|
||||
dnl variable to allow skipping any later AC_CHECK_DECL efforts
|
||||
eval ac_cv_have_decl_$gl_func=yes])
|
||||
AS_VAR_POPDEF([gl_Symbol])dnl
|
||||
done
|
||||
])
|
125
src/config.in
125
src/config.in
@ -139,18 +139,10 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
|
||||
*/
|
||||
#undef HAVE_DECL_GETENV
|
||||
|
||||
/* Define to 1 if you have the declaration of `getopt_clip', and to 0 if you
|
||||
don't. */
|
||||
#undef HAVE_DECL_GETOPT_CLIP
|
||||
|
||||
/* Define to 1 if you have the declaration of `localtime_r', and to 0 if you
|
||||
don't. */
|
||||
#undef HAVE_DECL_LOCALTIME_R
|
||||
|
||||
/* Define to 1 if you have the declaration of `optreset', and to 0 if you
|
||||
don't. */
|
||||
#undef HAVE_DECL_OPTRESET
|
||||
|
||||
/* Define to 1 if you have the declaration of `sys_siglist', and to 0 if you
|
||||
don't. */
|
||||
#undef HAVE_DECL_SYS_SIGLIST
|
||||
@ -565,123 +557,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
|
||||
/* Define to 1 if you have the `random' function. */
|
||||
#undef HAVE_RANDOM
|
||||
|
||||
/* Define to 1 if chown is declared even after undefining macros. */
|
||||
#undef HAVE_RAW_DECL_CHOWN
|
||||
|
||||
/* Define to 1 if dup2 is declared even after undefining macros. */
|
||||
#undef HAVE_RAW_DECL_DUP2
|
||||
|
||||
/* Define to 1 if dup3 is declared even after undefining macros. */
|
||||
#undef HAVE_RAW_DECL_DUP3
|
||||
|
||||
/* Define to 1 if endusershell is declared even after undefining macros. */
|
||||
#undef HAVE_RAW_DECL_ENDUSERSHELL
|
||||
|
||||
/* Define to 1 if environ is declared even after undefining macros. */
|
||||
#undef HAVE_RAW_DECL_ENVIRON
|
||||
|
||||
/* Define to 1 if euidaccess is declared even after undefining macros. */
|
||||
#undef HAVE_RAW_DECL_EUIDACCESS
|
||||
|
||||
/* Define to 1 if faccessat is declared even after undefining macros. */
|
||||
#undef HAVE_RAW_DECL_FACCESSAT
|
||||
|
||||
/* Define to 1 if fchdir is declared even after undefining macros. */
|
||||
#undef HAVE_RAW_DECL_FCHDIR
|
||||
|
||||
/* Define to 1 if fchownat is declared even after undefining macros. */
|
||||
#undef HAVE_RAW_DECL_FCHOWNAT
|
||||
|
||||
/* Define to 1 if fsync is declared even after undefining macros. */
|
||||
#undef HAVE_RAW_DECL_FSYNC
|
||||
|
||||
/* Define to 1 if ftruncate is declared even after undefining macros. */
|
||||
#undef HAVE_RAW_DECL_FTRUNCATE
|
||||
|
||||
/* Define to 1 if getcwd is declared even after undefining macros. */
|
||||
#undef HAVE_RAW_DECL_GETCWD
|
||||
|
||||
/* Define to 1 if getdomainname is declared even after undefining macros. */
|
||||
#undef HAVE_RAW_DECL_GETDOMAINNAME
|
||||
|
||||
/* Define to 1 if getdtablesize is declared even after undefining macros. */
|
||||
#undef HAVE_RAW_DECL_GETDTABLESIZE
|
||||
|
||||
/* Define to 1 if getgroups is declared even after undefining macros. */
|
||||
#undef HAVE_RAW_DECL_GETGROUPS
|
||||
|
||||
/* Define to 1 if gethostname is declared even after undefining macros. */
|
||||
#undef HAVE_RAW_DECL_GETHOSTNAME
|
||||
|
||||
/* Define to 1 if getlogin is declared even after undefining macros. */
|
||||
#undef HAVE_RAW_DECL_GETLOGIN
|
||||
|
||||
/* Define to 1 if getlogin_r is declared even after undefining macros. */
|
||||
#undef HAVE_RAW_DECL_GETLOGIN_R
|
||||
|
||||
/* Define to 1 if getpagesize is declared even after undefining macros. */
|
||||
#undef HAVE_RAW_DECL_GETPAGESIZE
|
||||
|
||||
/* Define to 1 if getusershell is declared even after undefining macros. */
|
||||
#undef HAVE_RAW_DECL_GETUSERSHELL
|
||||
|
||||
/* Define to 1 if lchown is declared even after undefining macros. */
|
||||
#undef HAVE_RAW_DECL_LCHOWN
|
||||
|
||||
/* Define to 1 if link is declared even after undefining macros. */
|
||||
#undef HAVE_RAW_DECL_LINK
|
||||
|
||||
/* Define to 1 if linkat is declared even after undefining macros. */
|
||||
#undef HAVE_RAW_DECL_LINKAT
|
||||
|
||||
/* Define to 1 if lseek is declared even after undefining macros. */
|
||||
#undef HAVE_RAW_DECL_LSEEK
|
||||
|
||||
/* Define to 1 if pipe is declared even after undefining macros. */
|
||||
#undef HAVE_RAW_DECL_PIPE
|
||||
|
||||
/* Define to 1 if pipe2 is declared even after undefining macros. */
|
||||
#undef HAVE_RAW_DECL_PIPE2
|
||||
|
||||
/* Define to 1 if pread is declared even after undefining macros. */
|
||||
#undef HAVE_RAW_DECL_PREAD
|
||||
|
||||
/* Define to 1 if pwrite is declared even after undefining macros. */
|
||||
#undef HAVE_RAW_DECL_PWRITE
|
||||
|
||||
/* Define to 1 if readlink is declared even after undefining macros. */
|
||||
#undef HAVE_RAW_DECL_READLINK
|
||||
|
||||
/* Define to 1 if readlinkat is declared even after undefining macros. */
|
||||
#undef HAVE_RAW_DECL_READLINKAT
|
||||
|
||||
/* Define to 1 if rmdir is declared even after undefining macros. */
|
||||
#undef HAVE_RAW_DECL_RMDIR
|
||||
|
||||
/* Define to 1 if setusershell is declared even after undefining macros. */
|
||||
#undef HAVE_RAW_DECL_SETUSERSHELL
|
||||
|
||||
/* Define to 1 if sleep is declared even after undefining macros. */
|
||||
#undef HAVE_RAW_DECL_SLEEP
|
||||
|
||||
/* Define to 1 if symlink is declared even after undefining macros. */
|
||||
#undef HAVE_RAW_DECL_SYMLINK
|
||||
|
||||
/* Define to 1 if symlinkat is declared even after undefining macros. */
|
||||
#undef HAVE_RAW_DECL_SYMLINKAT
|
||||
|
||||
/* Define to 1 if ttyname_r is declared even after undefining macros. */
|
||||
#undef HAVE_RAW_DECL_TTYNAME_R
|
||||
|
||||
/* Define to 1 if unlink is declared even after undefining macros. */
|
||||
#undef HAVE_RAW_DECL_UNLINK
|
||||
|
||||
/* Define to 1 if unlinkat is declared even after undefining macros. */
|
||||
#undef HAVE_RAW_DECL_UNLINKAT
|
||||
|
||||
/* Define to 1 if usleep is declared even after undefining macros. */
|
||||
#undef HAVE_RAW_DECL_USLEEP
|
||||
|
||||
/* Define to 1 if you have the `recvfrom' function. */
|
||||
#undef HAVE_RECVFROM
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user