2020-12-24 15:48:40 +00:00
|
|
|
# gnulib-common.m4 serial 63
|
2021-01-01 09:13:56 +00:00
|
|
|
dnl Copyright (C) 2007-2021 Free Software Foundation, Inc.
|
Regenerate.
* aclocal.m4, compile, depcomp, lib/Makefile.in, lib/dummy.c:
* lib/gnulib.mk, m4/00gnulib.m4, m4/gnulib-cache.m4:
* m4/gnulib-common.m4, m4/gnulib-comp.m4, m4/gnulib-tool.m4, missing:
New files, generated automatically, with 'make sync-from-gnulib'
followed by 'make'.
* configure, lisp/dired.el, src/config.in: Regenerate.
2011-01-08 21:19:44 +00:00
|
|
|
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.
|
|
|
|
|
Update from Gnulib
This incorporates:
2018-11-03 nstrftime: simplify test for mktime failure
2018-11-02 gnulib-common.m4: port _Noreturn to C++
2018-10-22 std-gnu11: Support Autoconf versions < 2.64
2018-10-22 Assume Autoconf >= 2.63
2018-10-16 Remove support for Ultrix
2018-10-16 getloadavg: Remove support for ConvexOS
2018-10-16 getloadavg: Remove support for Sony NEWS
2018-10-16 Remove support for Dynix/ptx
2018-10-16 fsusage: Remove support for AIX 3
2018-10-16 fsusage, stat-size, getloadavg: Remove support for AIX PS/2
2018-10-16 getloadavg: Remove support for HP-UX on m68k
2018-10-16 fsusage, mountlist: Remove support for DolphinOS
2018-10-16 getloadavg: Remove support for Alliant FX/2800
2018-10-16 getloadavg: Remove support for tek4300
2018-10-16 getloadavg: Remove support for Ardent
* build-aux/config.guess, build-aux/config.sub, lib/_Noreturn.h:
* lib/fsusage.c, lib/getgroups.c, lib/getloadavg.c:
* lib/nstrftime.c, lib/time.in.h, m4/errno_h.m4:
* m4/fsusage.m4, m4/getgroups.m4, m4/gnulib-common.m4, m4/longlong.m4:
* m4/std-gnu11.m4, m4/stdint.m4:
Copy from Gnulib.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate:
2018-11-13 18:56:26 +00:00
|
|
|
AC_PREREQ([2.62])
|
|
|
|
|
Regenerate.
* aclocal.m4, compile, depcomp, lib/Makefile.in, lib/dummy.c:
* lib/gnulib.mk, m4/00gnulib.m4, m4/gnulib-cache.m4:
* m4/gnulib-common.m4, m4/gnulib-comp.m4, m4/gnulib-tool.m4, missing:
New files, generated automatically, with 'make sync-from-gnulib'
followed by 'make'.
* configure, lisp/dired.el, src/config.in: Regenerate.
2011-01-08 21:19:44 +00:00
|
|
|
# gl_COMMON
|
|
|
|
# is expanded unconditionally through gnulib-tool magic.
|
|
|
|
AC_DEFUN([gl_COMMON], [
|
|
|
|
dnl Use AC_REQUIRE here, so that the code is expanded once only.
|
|
|
|
AC_REQUIRE([gl_00GNULIB])
|
|
|
|
AC_REQUIRE([gl_COMMON_BODY])
|
2020-01-19 04:34:55 +00:00
|
|
|
AC_REQUIRE([gl_ZZGNULIB])
|
Regenerate.
* aclocal.m4, compile, depcomp, lib/Makefile.in, lib/dummy.c:
* lib/gnulib.mk, m4/00gnulib.m4, m4/gnulib-cache.m4:
* m4/gnulib-common.m4, m4/gnulib-comp.m4, m4/gnulib-tool.m4, missing:
New files, generated automatically, with 'make sync-from-gnulib'
followed by 'make'.
* configure, lisp/dired.el, src/config.in: Regenerate.
2011-01-08 21:19:44 +00:00
|
|
|
])
|
|
|
|
AC_DEFUN([gl_COMMON_BODY], [
|
2020-05-03 21:57:10 +00:00
|
|
|
AH_VERBATIM([_GL_GNUC_PREREQ],
|
|
|
|
[/* True if the compiler says it groks GNU C version MAJOR.MINOR. */
|
|
|
|
#if defined __GNUC__ && defined __GNUC_MINOR__
|
|
|
|
# define _GL_GNUC_PREREQ(major, minor) \
|
|
|
|
((major) < __GNUC__ + ((minor) <= __GNUC_MINOR__))
|
|
|
|
#else
|
|
|
|
# define _GL_GNUC_PREREQ(major, minor) 0
|
|
|
|
#endif
|
|
|
|
])
|
Merge from gnulib, using build-aux to remove clutter.
* m4/largefile.m4: New file, so that Emacs does not mess up when
accessing files with large inode numbers in MacOS X 10.5 and later.
* m4/nocrash.m4: New file, to avoid triggering background debugger
and/or create core dumps during 'configure'.
* build-aux/move-if-change: Renamed from move-if-change.
* build-aux/snippet/arg-nonnull.h: Renamed from arg-nonnull.h.
* build-aux/snippet/c++defs.h: Renamed from c++defs.h.
* build-aux/snippet/warn-on-use.h: Renamed from warn-on-use.h.
* build-aux/snippet/_Noreturn.h: New file, for draft C1X _Noreturn.
* .bzrignore: The autogenerated files compile, config.guess,
config.sub, depcomp, install-sh, and missing are now in build-aux.
* Makefile.in (epaths-force, sync-from-gnulib):
move-if-change is now in build-aux.
(GNULIB_TOOL_FLAGS): Avoid threadlib; this is now a prerequisite
of gnulib's pthread_sigmask module, but Emacs doesn't need it.
(mkdir): install-sh is now in build-aux.
* config.bat: c++defs.h is now in build-aux/snippets.
* configure.in: Specify AC_CONFIG_AUX_DIR with build-aux (the
usual parameter).
* lib/gnulib.mk, m4/gl-comp.m4: Regenerate.
* lib/makefile.w32-in (ARG_NONNULL_H): arg-nonnull.h moved
to build-aux/snippet.
* lib/pthread_sigmask.c, lib/stdlib.in.h, m4/extensions.m4:
* m4/getopt.m4, m4/gnulib-common.m4, m4/pthread_sigmask.m4:
Merge from gnuilib. This fixes porting bugs on Cygwin, Irix, and
Solaris, enables MacOS extensions, and enables nocrash during
'configure'.
* make-dist: Adjust to new build-aux and build-aux/snippit dirs.
* admin/notes/copyright: The files compile, config.guess, config.sub,
depcomp, install-sh, missing, and move-if-change are now in the
new build-aux subdirectory. The files arg-nonnull.h, c++defs.h,
and warn-on-use.h are now in build-aux/snippets. New file
build-aux/snippets/_Noreturn.h.
* leim/Makefile.in (install): install-sh is now in build-aux.
* lib-src/Makefile.in ($(DESTDIR)${archlibdir}): install-sh moved
to build-aux.
* msdos/sedlibmk.inp (CONFIG_CLEAN_VPATH_FILES): Adjust to snippet moves
from top level to build-aux/snippet.
* src/Makefile.in (gl-stamp): move-if-change is now in build-aux.
2011-07-24 22:15:47 +00:00
|
|
|
AH_VERBATIM([_Noreturn],
|
2012-05-26 23:14:36 +00:00
|
|
|
[/* The _Noreturn keyword of C11. */
|
Update from Gnulib
This incorporates:
2018-11-03 nstrftime: simplify test for mktime failure
2018-11-02 gnulib-common.m4: port _Noreturn to C++
2018-10-22 std-gnu11: Support Autoconf versions < 2.64
2018-10-22 Assume Autoconf >= 2.63
2018-10-16 Remove support for Ultrix
2018-10-16 getloadavg: Remove support for ConvexOS
2018-10-16 getloadavg: Remove support for Sony NEWS
2018-10-16 Remove support for Dynix/ptx
2018-10-16 fsusage: Remove support for AIX 3
2018-10-16 fsusage, stat-size, getloadavg: Remove support for AIX PS/2
2018-10-16 getloadavg: Remove support for HP-UX on m68k
2018-10-16 fsusage, mountlist: Remove support for DolphinOS
2018-10-16 getloadavg: Remove support for Alliant FX/2800
2018-10-16 getloadavg: Remove support for tek4300
2018-10-16 getloadavg: Remove support for Ardent
* build-aux/config.guess, build-aux/config.sub, lib/_Noreturn.h:
* lib/fsusage.c, lib/getgroups.c, lib/getloadavg.c:
* lib/nstrftime.c, lib/time.in.h, m4/errno_h.m4:
* m4/fsusage.m4, m4/getgroups.m4, m4/gnulib-common.m4, m4/longlong.m4:
* m4/std-gnu11.m4, m4/stdint.m4:
Copy from Gnulib.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate:
2018-11-13 18:56:26 +00:00
|
|
|
#ifndef _Noreturn
|
Update from Gnulib.
This incorporates:
2019-03-23 Support cross-compilation to musl libc
2019-03-23 noreturn: In C++ mode with clang, use _Noreturn as fallback
2019-03-22 _Noreturn: beware of C's _Noreturn in C++ pre C++11
2019-03-19 Help making signal handlers more reliable
2019-03-18 _Noreturn: clang and MSVC do support [[noreturn]] in C++11
2019-03-17 _Noreturn: GCC 4.7 does not support [[noreturn]] in C++11
2019-03-14 all: Update URLs to msdn.microsoft.com
* doc/misc/texinfo.tex, lib/_Noreturn.h, lib/gettimeofday.c:
* lib/mktime.c, lib/regcomp.c, lib/regexec.c, lib/stat-time.h:
* lib/utimens.c, m4/fdopendir.m4, m4/getgroups.m4:
* m4/gettimeofday.m4, m4/gnulib-common.m4, m4/putenv.m4, m4/utimes.m4:
Update from gnulib.
2019-03-25 21:53:56 +00:00
|
|
|
# if (defined __cplusplus \
|
|
|
|
&& ((201103 <= __cplusplus && !(__GNUC__ == 4 && __GNUC_MINOR__ == 7)) \
|
2019-12-06 23:16:15 +00:00
|
|
|
|| (defined _MSC_VER && 1900 <= _MSC_VER)) \
|
|
|
|
&& 0)
|
|
|
|
/* [[noreturn]] is not practically usable, because with it the syntax
|
|
|
|
extern _Noreturn void func (...);
|
|
|
|
would not be valid; such a declaration would only be valid with 'extern'
|
|
|
|
and '_Noreturn' swapped, or without the 'extern' keyword. However, some
|
|
|
|
AIX system header files and several gnulib header files use precisely
|
|
|
|
this syntax with 'extern'. */
|
Update from Gnulib
This incorporates:
2018-11-03 nstrftime: simplify test for mktime failure
2018-11-02 gnulib-common.m4: port _Noreturn to C++
2018-10-22 std-gnu11: Support Autoconf versions < 2.64
2018-10-22 Assume Autoconf >= 2.63
2018-10-16 Remove support for Ultrix
2018-10-16 getloadavg: Remove support for ConvexOS
2018-10-16 getloadavg: Remove support for Sony NEWS
2018-10-16 Remove support for Dynix/ptx
2018-10-16 fsusage: Remove support for AIX 3
2018-10-16 fsusage, stat-size, getloadavg: Remove support for AIX PS/2
2018-10-16 getloadavg: Remove support for HP-UX on m68k
2018-10-16 fsusage, mountlist: Remove support for DolphinOS
2018-10-16 getloadavg: Remove support for Alliant FX/2800
2018-10-16 getloadavg: Remove support for tek4300
2018-10-16 getloadavg: Remove support for Ardent
* build-aux/config.guess, build-aux/config.sub, lib/_Noreturn.h:
* lib/fsusage.c, lib/getgroups.c, lib/getloadavg.c:
* lib/nstrftime.c, lib/time.in.h, m4/errno_h.m4:
* m4/fsusage.m4, m4/getgroups.m4, m4/gnulib-common.m4, m4/longlong.m4:
* m4/std-gnu11.m4, m4/stdint.m4:
Copy from Gnulib.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate:
2018-11-13 18:56:26 +00:00
|
|
|
# define _Noreturn [[noreturn]]
|
Update from Gnulib.
This incorporates:
2019-03-23 Support cross-compilation to musl libc
2019-03-23 noreturn: In C++ mode with clang, use _Noreturn as fallback
2019-03-22 _Noreturn: beware of C's _Noreturn in C++ pre C++11
2019-03-19 Help making signal handlers more reliable
2019-03-18 _Noreturn: clang and MSVC do support [[noreturn]] in C++11
2019-03-17 _Noreturn: GCC 4.7 does not support [[noreturn]] in C++11
2019-03-14 all: Update URLs to msdn.microsoft.com
* doc/misc/texinfo.tex, lib/_Noreturn.h, lib/gettimeofday.c:
* lib/mktime.c, lib/regcomp.c, lib/regexec.c, lib/stat-time.h:
* lib/utimens.c, m4/fdopendir.m4, m4/getgroups.m4:
* m4/gettimeofday.m4, m4/gnulib-common.m4, m4/putenv.m4, m4/utimes.m4:
Update from gnulib.
2019-03-25 21:53:56 +00:00
|
|
|
# elif ((!defined __cplusplus || defined __clang__) \
|
2021-01-22 19:45:38 +00:00
|
|
|
&& (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \
|
|
|
|
|| (!defined __STRICT_ANSI__ \
|
|
|
|
&& (_GL_GNUC_PREREQ (4, 7) \
|
|
|
|
|| (defined __apple_build_version__ \
|
|
|
|
? 6000000 <= __apple_build_version__ \
|
|
|
|
: 3 < __clang_major__ + (5 <= __clang_minor__))))))
|
Update from Gnulib
This incorporates:
2018-11-03 nstrftime: simplify test for mktime failure
2018-11-02 gnulib-common.m4: port _Noreturn to C++
2018-10-22 std-gnu11: Support Autoconf versions < 2.64
2018-10-22 Assume Autoconf >= 2.63
2018-10-16 Remove support for Ultrix
2018-10-16 getloadavg: Remove support for ConvexOS
2018-10-16 getloadavg: Remove support for Sony NEWS
2018-10-16 Remove support for Dynix/ptx
2018-10-16 fsusage: Remove support for AIX 3
2018-10-16 fsusage, stat-size, getloadavg: Remove support for AIX PS/2
2018-10-16 getloadavg: Remove support for HP-UX on m68k
2018-10-16 fsusage, mountlist: Remove support for DolphinOS
2018-10-16 getloadavg: Remove support for Alliant FX/2800
2018-10-16 getloadavg: Remove support for tek4300
2018-10-16 getloadavg: Remove support for Ardent
* build-aux/config.guess, build-aux/config.sub, lib/_Noreturn.h:
* lib/fsusage.c, lib/getgroups.c, lib/getloadavg.c:
* lib/nstrftime.c, lib/time.in.h, m4/errno_h.m4:
* m4/fsusage.m4, m4/getgroups.m4, m4/gnulib-common.m4, m4/longlong.m4:
* m4/std-gnu11.m4, m4/stdint.m4:
Copy from Gnulib.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate:
2018-11-13 18:56:26 +00:00
|
|
|
/* _Noreturn works as-is. */
|
Update from Gnulib
This incorporates:
2020-08-11 Use expression statements also on clang
2020-08-10 Use many __attribute__s with clang
2020-08-09 Use attribute __aligned__ with clang
2020-08-09 Use __alignof__ with clang
2020-08-09 ignore-value: Simplify on clang
2020-08-09 Use __typeof__ with clang
2020-08-09 intprops: Fix typo in comment
2020-08-09 Silence warnings from clang 10 with -Wimplicit-fallthrough
2020-08-09 count-one-bits: Use __builtin_popcount{,l,ll} on clang
2020-08-09 string: Fix build error in C++ mode with clang
2020-08-09 Add ability to emit user-defined diagnostics with clang
2020-08-07 alloca: No need to compile alloca.c with clang
2020-08-06 Use __builtin_assume with clang
* lib/alloca.in.h, lib/arg-nonnull.h, lib/c++defs.h, lib/cdefs.h:
* lib/count-one-bits.h, lib/dirent.in.h, lib/ignore-value.h:
* lib/intprops.h, lib/malloca.h, lib/regex_internal.h:
* lib/stdalign.in.h, lib/stddef.in.h, lib/stdio.in.h:
* lib/stdlib.in.h, lib/string.in.h, lib/verify.h, lib/warn-on-use.h:
* m4/gnulib-common.m4, m4/stddef_h.m4, m4/stdint.m4:
Copy from Gnulib.
2020-08-11 17:58:35 +00:00
|
|
|
# elif _GL_GNUC_PREREQ (2, 8) || defined __clang__ || 0x5110 <= __SUNPRO_C
|
Merge from gnulib, using build-aux to remove clutter.
* m4/largefile.m4: New file, so that Emacs does not mess up when
accessing files with large inode numbers in MacOS X 10.5 and later.
* m4/nocrash.m4: New file, to avoid triggering background debugger
and/or create core dumps during 'configure'.
* build-aux/move-if-change: Renamed from move-if-change.
* build-aux/snippet/arg-nonnull.h: Renamed from arg-nonnull.h.
* build-aux/snippet/c++defs.h: Renamed from c++defs.h.
* build-aux/snippet/warn-on-use.h: Renamed from warn-on-use.h.
* build-aux/snippet/_Noreturn.h: New file, for draft C1X _Noreturn.
* .bzrignore: The autogenerated files compile, config.guess,
config.sub, depcomp, install-sh, and missing are now in build-aux.
* Makefile.in (epaths-force, sync-from-gnulib):
move-if-change is now in build-aux.
(GNULIB_TOOL_FLAGS): Avoid threadlib; this is now a prerequisite
of gnulib's pthread_sigmask module, but Emacs doesn't need it.
(mkdir): install-sh is now in build-aux.
* config.bat: c++defs.h is now in build-aux/snippets.
* configure.in: Specify AC_CONFIG_AUX_DIR with build-aux (the
usual parameter).
* lib/gnulib.mk, m4/gl-comp.m4: Regenerate.
* lib/makefile.w32-in (ARG_NONNULL_H): arg-nonnull.h moved
to build-aux/snippet.
* lib/pthread_sigmask.c, lib/stdlib.in.h, m4/extensions.m4:
* m4/getopt.m4, m4/gnulib-common.m4, m4/pthread_sigmask.m4:
Merge from gnuilib. This fixes porting bugs on Cygwin, Irix, and
Solaris, enables MacOS extensions, and enables nocrash during
'configure'.
* make-dist: Adjust to new build-aux and build-aux/snippit dirs.
* admin/notes/copyright: The files compile, config.guess, config.sub,
depcomp, install-sh, missing, and move-if-change are now in the
new build-aux subdirectory. The files arg-nonnull.h, c++defs.h,
and warn-on-use.h are now in build-aux/snippets. New file
build-aux/snippets/_Noreturn.h.
* leim/Makefile.in (install): install-sh is now in build-aux.
* lib-src/Makefile.in ($(DESTDIR)${archlibdir}): install-sh moved
to build-aux.
* msdos/sedlibmk.inp (CONFIG_CLEAN_VPATH_FILES): Adjust to snippet moves
from top level to build-aux/snippet.
* src/Makefile.in (gl-stamp): move-if-change is now in build-aux.
2011-07-24 22:15:47 +00:00
|
|
|
# define _Noreturn __attribute__ ((__noreturn__))
|
Update from Gnulib
This incorporates:
2018-11-03 nstrftime: simplify test for mktime failure
2018-11-02 gnulib-common.m4: port _Noreturn to C++
2018-10-22 std-gnu11: Support Autoconf versions < 2.64
2018-10-22 Assume Autoconf >= 2.63
2018-10-16 Remove support for Ultrix
2018-10-16 getloadavg: Remove support for ConvexOS
2018-10-16 getloadavg: Remove support for Sony NEWS
2018-10-16 Remove support for Dynix/ptx
2018-10-16 fsusage: Remove support for AIX 3
2018-10-16 fsusage, stat-size, getloadavg: Remove support for AIX PS/2
2018-10-16 getloadavg: Remove support for HP-UX on m68k
2018-10-16 fsusage, mountlist: Remove support for DolphinOS
2018-10-16 getloadavg: Remove support for Alliant FX/2800
2018-10-16 getloadavg: Remove support for tek4300
2018-10-16 getloadavg: Remove support for Ardent
* build-aux/config.guess, build-aux/config.sub, lib/_Noreturn.h:
* lib/fsusage.c, lib/getgroups.c, lib/getloadavg.c:
* lib/nstrftime.c, lib/time.in.h, m4/errno_h.m4:
* m4/fsusage.m4, m4/getgroups.m4, m4/gnulib-common.m4, m4/longlong.m4:
* m4/std-gnu11.m4, m4/stdint.m4:
Copy from Gnulib.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate:
2018-11-13 18:56:26 +00:00
|
|
|
# elif 1200 <= (defined _MSC_VER ? _MSC_VER : 0)
|
Merge from gnulib, using build-aux to remove clutter.
* m4/largefile.m4: New file, so that Emacs does not mess up when
accessing files with large inode numbers in MacOS X 10.5 and later.
* m4/nocrash.m4: New file, to avoid triggering background debugger
and/or create core dumps during 'configure'.
* build-aux/move-if-change: Renamed from move-if-change.
* build-aux/snippet/arg-nonnull.h: Renamed from arg-nonnull.h.
* build-aux/snippet/c++defs.h: Renamed from c++defs.h.
* build-aux/snippet/warn-on-use.h: Renamed from warn-on-use.h.
* build-aux/snippet/_Noreturn.h: New file, for draft C1X _Noreturn.
* .bzrignore: The autogenerated files compile, config.guess,
config.sub, depcomp, install-sh, and missing are now in build-aux.
* Makefile.in (epaths-force, sync-from-gnulib):
move-if-change is now in build-aux.
(GNULIB_TOOL_FLAGS): Avoid threadlib; this is now a prerequisite
of gnulib's pthread_sigmask module, but Emacs doesn't need it.
(mkdir): install-sh is now in build-aux.
* config.bat: c++defs.h is now in build-aux/snippets.
* configure.in: Specify AC_CONFIG_AUX_DIR with build-aux (the
usual parameter).
* lib/gnulib.mk, m4/gl-comp.m4: Regenerate.
* lib/makefile.w32-in (ARG_NONNULL_H): arg-nonnull.h moved
to build-aux/snippet.
* lib/pthread_sigmask.c, lib/stdlib.in.h, m4/extensions.m4:
* m4/getopt.m4, m4/gnulib-common.m4, m4/pthread_sigmask.m4:
Merge from gnuilib. This fixes porting bugs on Cygwin, Irix, and
Solaris, enables MacOS extensions, and enables nocrash during
'configure'.
* make-dist: Adjust to new build-aux and build-aux/snippit dirs.
* admin/notes/copyright: The files compile, config.guess, config.sub,
depcomp, install-sh, missing, and move-if-change are now in the
new build-aux subdirectory. The files arg-nonnull.h, c++defs.h,
and warn-on-use.h are now in build-aux/snippets. New file
build-aux/snippets/_Noreturn.h.
* leim/Makefile.in (install): install-sh is now in build-aux.
* lib-src/Makefile.in ($(DESTDIR)${archlibdir}): install-sh moved
to build-aux.
* msdos/sedlibmk.inp (CONFIG_CLEAN_VPATH_FILES): Adjust to snippet moves
from top level to build-aux/snippet.
* src/Makefile.in (gl-stamp): move-if-change is now in build-aux.
2011-07-24 22:15:47 +00:00
|
|
|
# define _Noreturn __declspec (noreturn)
|
|
|
|
# else
|
|
|
|
# define _Noreturn
|
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
])
|
Regenerate.
* aclocal.m4, compile, depcomp, lib/Makefile.in, lib/dummy.c:
* lib/gnulib.mk, m4/00gnulib.m4, m4/gnulib-cache.m4:
* m4/gnulib-common.m4, m4/gnulib-comp.m4, m4/gnulib-tool.m4, missing:
New files, generated automatically, with 'make sync-from-gnulib'
followed by 'make'.
* configure, lisp/dired.el, src/config.in: Regenerate.
2011-01-08 21:19:44 +00:00
|
|
|
AH_VERBATIM([isoc99_inline],
|
|
|
|
[/* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports
|
|
|
|
the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics of
|
|
|
|
earlier versions), but does not display it by setting __GNUC_STDC_INLINE__.
|
Merge from gnulib.
* lib/filemode.h, lib/signal.in.h, lib/stat.c, lib/stdint.in.h:
* lib/stdlib.in.h, lib/unistd.in.h, m4/extensions.m4, m4/getloadavg.m4:
* m4/getopt.m4, m4/gnulib-common.m4, m4/largefile.m4, m4/mktime.m4:
* m4/multiarch.m4, m4/nocrash.m4, m4/stdio_h.m4, m4/time_r.m4:
Copy new versions from gnulib, incorporating the following changes:
2012-06-22 time_r: fix typo that always overrode localtime_r decl
2012-06-22 Write "Mac OS X" instead of "MacOS X".
2012-06-21 mktime: fix integer overflow in 'configure'-time test
2012-06-21 nonblocking: Avoid compilation error on mingw64.
2012-06-19 stat, fstat: Avoid warnings on mingw64.
2012-06-19 getopt-gnu: Fix exit code overflow in autoconf test.
2012-06-22 17:20:00 +00:00
|
|
|
__APPLE__ && __MACH__ test for Mac OS X.
|
Regenerate.
* aclocal.m4, compile, depcomp, lib/Makefile.in, lib/dummy.c:
* lib/gnulib.mk, m4/00gnulib.m4, m4/gnulib-cache.m4:
* m4/gnulib-common.m4, m4/gnulib-comp.m4, m4/gnulib-tool.m4, missing:
New files, generated automatically, with 'make sync-from-gnulib'
followed by 'make'.
* configure, lisp/dired.el, src/config.in: Regenerate.
2011-01-08 21:19:44 +00:00
|
|
|
__APPLE_CC__ tests for the Apple compiler and its version.
|
|
|
|
__STDC_VERSION__ tests for the C99 mode. */
|
|
|
|
#if defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && !defined __cplusplus && __STDC_VERSION__ >= 199901L && !defined __GNUC_STDC_INLINE__
|
|
|
|
# define __GNUC_STDC_INLINE__ 1
|
|
|
|
#endif])
|
2020-05-03 21:57:10 +00:00
|
|
|
AH_VERBATIM([attribute],
|
|
|
|
[/* Attributes. */
|
2021-01-22 19:45:38 +00:00
|
|
|
#if (defined __has_attribute \
|
|
|
|
&& (!defined __clang_minor__ \
|
|
|
|
|| 3 < __clang_major__ + (5 <= __clang_minor__)))
|
2020-05-03 21:57:10 +00:00
|
|
|
# define _GL_HAS_ATTRIBUTE(attr) __has_attribute (__##attr##__)
|
2014-06-01 23:58:38 +00:00
|
|
|
#else
|
2020-05-03 21:57:10 +00:00
|
|
|
# define _GL_HAS_ATTRIBUTE(attr) _GL_ATTR_##attr
|
|
|
|
# define _GL_ATTR_alloc_size _GL_GNUC_PREREQ (4, 3)
|
|
|
|
# define _GL_ATTR_always_inline _GL_GNUC_PREREQ (3, 2)
|
|
|
|
# define _GL_ATTR_artificial _GL_GNUC_PREREQ (4, 3)
|
|
|
|
# define _GL_ATTR_cold _GL_GNUC_PREREQ (4, 3)
|
|
|
|
# define _GL_ATTR_const _GL_GNUC_PREREQ (2, 95)
|
|
|
|
# define _GL_ATTR_deprecated _GL_GNUC_PREREQ (3, 1)
|
Update from Gnulib
This incorporates:
2020-08-11 Use expression statements also on clang
2020-08-10 Use many __attribute__s with clang
2020-08-09 Use attribute __aligned__ with clang
2020-08-09 Use __alignof__ with clang
2020-08-09 ignore-value: Simplify on clang
2020-08-09 Use __typeof__ with clang
2020-08-09 intprops: Fix typo in comment
2020-08-09 Silence warnings from clang 10 with -Wimplicit-fallthrough
2020-08-09 count-one-bits: Use __builtin_popcount{,l,ll} on clang
2020-08-09 string: Fix build error in C++ mode with clang
2020-08-09 Add ability to emit user-defined diagnostics with clang
2020-08-07 alloca: No need to compile alloca.c with clang
2020-08-06 Use __builtin_assume with clang
* lib/alloca.in.h, lib/arg-nonnull.h, lib/c++defs.h, lib/cdefs.h:
* lib/count-one-bits.h, lib/dirent.in.h, lib/ignore-value.h:
* lib/intprops.h, lib/malloca.h, lib/regex_internal.h:
* lib/stdalign.in.h, lib/stddef.in.h, lib/stdio.in.h:
* lib/stdlib.in.h, lib/string.in.h, lib/verify.h, lib/warn-on-use.h:
* m4/gnulib-common.m4, m4/stddef_h.m4, m4/stdint.m4:
Copy from Gnulib.
2020-08-11 17:58:35 +00:00
|
|
|
# define _GL_ATTR_diagnose_if 0
|
2020-05-03 21:57:10 +00:00
|
|
|
# define _GL_ATTR_error _GL_GNUC_PREREQ (4, 3)
|
|
|
|
# define _GL_ATTR_externally_visible _GL_GNUC_PREREQ (4, 1)
|
|
|
|
# define _GL_ATTR_fallthrough _GL_GNUC_PREREQ (7, 0)
|
|
|
|
# define _GL_ATTR_format _GL_GNUC_PREREQ (2, 7)
|
|
|
|
# define _GL_ATTR_leaf _GL_GNUC_PREREQ (4, 6)
|
|
|
|
# ifdef _ICC
|
|
|
|
# define _GL_ATTR_may_alias 0
|
|
|
|
# else
|
|
|
|
# define _GL_ATTR_may_alias _GL_GNUC_PREREQ (3, 3)
|
|
|
|
# endif
|
|
|
|
# define _GL_ATTR_malloc _GL_GNUC_PREREQ (3, 0)
|
|
|
|
# define _GL_ATTR_noinline _GL_GNUC_PREREQ (3, 1)
|
|
|
|
# define _GL_ATTR_nonnull _GL_GNUC_PREREQ (3, 3)
|
|
|
|
# define _GL_ATTR_nonstring _GL_GNUC_PREREQ (8, 0)
|
|
|
|
# define _GL_ATTR_nothrow _GL_GNUC_PREREQ (3, 3)
|
|
|
|
# define _GL_ATTR_packed _GL_GNUC_PREREQ (2, 7)
|
|
|
|
# define _GL_ATTR_pure _GL_GNUC_PREREQ (2, 96)
|
|
|
|
# define _GL_ATTR_returns_nonnull _GL_GNUC_PREREQ (4, 9)
|
|
|
|
# define _GL_ATTR_sentinel _GL_GNUC_PREREQ (4, 0)
|
|
|
|
# define _GL_ATTR_unused _GL_GNUC_PREREQ (2, 7)
|
2020-05-09 15:47:05 +00:00
|
|
|
# define _GL_ATTR_warn_unused_result _GL_GNUC_PREREQ (3, 4)
|
2014-06-01 23:58:38 +00:00
|
|
|
#endif
|
|
|
|
|
2020-05-03 21:57:10 +00:00
|
|
|
]dnl There is no _GL_ATTRIBUTE_ALIGNED; use stdalign's _Alignas instead.
|
|
|
|
[
|
|
|
|
#if _GL_HAS_ATTRIBUTE (alloc_size)
|
|
|
|
# define _GL_ATTRIBUTE_ALLOC_SIZE(args) __attribute__ ((__alloc_size__ args))
|
|
|
|
#else
|
|
|
|
# define _GL_ATTRIBUTE_ALLOC_SIZE(args)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if _GL_HAS_ATTRIBUTE (always_inline)
|
|
|
|
# define _GL_ATTRIBUTE_ALWAYS_INLINE __attribute__ ((__always_inline__))
|
2011-06-06 19:53:44 +00:00
|
|
|
#else
|
2020-05-03 21:57:10 +00:00
|
|
|
# define _GL_ATTRIBUTE_ALWAYS_INLINE
|
2011-06-06 19:53:44 +00:00
|
|
|
#endif
|
|
|
|
|
2020-05-03 21:57:10 +00:00
|
|
|
#if _GL_HAS_ATTRIBUTE (artificial)
|
|
|
|
# define _GL_ATTRIBUTE_ARTIFICIAL __attribute__ ((__artificial__))
|
|
|
|
#else
|
|
|
|
# define _GL_ATTRIBUTE_ARTIFICIAL
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Avoid __attribute__ ((cold)) on MinGW; see thread starting at
|
Update from Gnulib
This incorporates:
2020-07-30 work around some Oracle Studio attribute bugs
2020-07-29 fsusage, regex, stat-size: remove Cray support
2020-07-26 inttypes: remove support for AIX 4
2020-07-26 gettimeofday: remove workaround for Mac OS X 10.0
2020-07-26 don't require gl_LOCALTIME_BUFFER_DEFAULTS
2020-07-26 alloca: remove Cray-2 and Cray Y-MP support
2020-07-26 libgmp: remove dependency on havelib
2020-07-26 libgmp: remove HAVE_GMP, LIB_GMP
2020-07-25 multiarch: prepare for x86_64+arm64 universal in macOS 11
2020-07-25 sigprocmask: small autoconf macro improvement
2020-07-25 small autoconf macro improvements
2020-07-24 timespec: remove dependence on ‘verify’
2020-07-24 optimize a few more three-valued comparisons
2020-07-24 fix _GL_CMP parenthesization typo
2020-07-23 optimize three-valued comparison between integers
2020-07-24 doc: update for Mac OS X 10.13
2020-07-23 fchmodat, lchmod: use /proc on Cygwin
2020-07-21 inttypes: fix PRI*PTR and SCN*PTR on 64-bit native Windows
2020-07-12 libgmp: avoid warning when --without-libgmp is used
2020-07-12 libgmp: link to the correct shared library
* lib/mini-gmp-gnulib.c: Ignore -Wsuggest-attribute=malloc only for
* build-aux/config.guess, build-aux/config.sub:
* build-aux/install-sh, doc/misc/texinfo.tex, lib/c-strcasecmp.c:
* lib/c-strncasecmp.c, lib/fchmodat.c, lib/fsusage.c:
* lib/gettimeofday.c, lib/inttypes.in.h, lib/lchmod.c:
* lib/mini-gmp-gnulib.c, lib/nstrftime.c, lib/regex.h, lib/timespec.h:
* m4/alloca.m4, m4/getgroups.m4, m4/gettimeofday.m4:
* m4/gnulib-common.m4, m4/inttypes.m4, m4/libgmp.m4, m4/mktime.m4:
* m4/multiarch.m4:
Copy from Gnulib.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* src/Makefile.in, test/Makefile.in (LIBGMP):
Rename from LIB_GMP for compatibility with Gnulib.
All uses changed.
2020-07-30 20:58:58 +00:00
|
|
|
<https://lists.gnu.org/r/emacs-devel/2019-04/msg01152.html>.
|
|
|
|
Also, Oracle Studio 12.6 requires 'cold' not '__cold__'. */
|
2020-05-03 21:57:10 +00:00
|
|
|
#if _GL_HAS_ATTRIBUTE (cold) && !defined __MINGW32__
|
Update from Gnulib
This incorporates:
2020-07-30 work around some Oracle Studio attribute bugs
2020-07-29 fsusage, regex, stat-size: remove Cray support
2020-07-26 inttypes: remove support for AIX 4
2020-07-26 gettimeofday: remove workaround for Mac OS X 10.0
2020-07-26 don't require gl_LOCALTIME_BUFFER_DEFAULTS
2020-07-26 alloca: remove Cray-2 and Cray Y-MP support
2020-07-26 libgmp: remove dependency on havelib
2020-07-26 libgmp: remove HAVE_GMP, LIB_GMP
2020-07-25 multiarch: prepare for x86_64+arm64 universal in macOS 11
2020-07-25 sigprocmask: small autoconf macro improvement
2020-07-25 small autoconf macro improvements
2020-07-24 timespec: remove dependence on ‘verify’
2020-07-24 optimize a few more three-valued comparisons
2020-07-24 fix _GL_CMP parenthesization typo
2020-07-23 optimize three-valued comparison between integers
2020-07-24 doc: update for Mac OS X 10.13
2020-07-23 fchmodat, lchmod: use /proc on Cygwin
2020-07-21 inttypes: fix PRI*PTR and SCN*PTR on 64-bit native Windows
2020-07-12 libgmp: avoid warning when --without-libgmp is used
2020-07-12 libgmp: link to the correct shared library
* lib/mini-gmp-gnulib.c: Ignore -Wsuggest-attribute=malloc only for
* build-aux/config.guess, build-aux/config.sub:
* build-aux/install-sh, doc/misc/texinfo.tex, lib/c-strcasecmp.c:
* lib/c-strncasecmp.c, lib/fchmodat.c, lib/fsusage.c:
* lib/gettimeofday.c, lib/inttypes.in.h, lib/lchmod.c:
* lib/mini-gmp-gnulib.c, lib/nstrftime.c, lib/regex.h, lib/timespec.h:
* m4/alloca.m4, m4/getgroups.m4, m4/gettimeofday.m4:
* m4/gnulib-common.m4, m4/inttypes.m4, m4/libgmp.m4, m4/mktime.m4:
* m4/multiarch.m4:
Copy from Gnulib.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* src/Makefile.in, test/Makefile.in (LIBGMP):
Rename from LIB_GMP for compatibility with Gnulib.
All uses changed.
2020-07-30 20:58:58 +00:00
|
|
|
# ifndef __SUNPRO_C
|
|
|
|
# define _GL_ATTRIBUTE_COLD __attribute__ ((__cold__))
|
|
|
|
# else
|
|
|
|
# define _GL_ATTRIBUTE_COLD __attribute__ ((cold))
|
|
|
|
# endif
|
2020-05-03 21:57:10 +00:00
|
|
|
#else
|
|
|
|
# define _GL_ATTRIBUTE_COLD
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if _GL_HAS_ATTRIBUTE (const)
|
2011-06-06 19:53:44 +00:00
|
|
|
# define _GL_ATTRIBUTE_CONST __attribute__ ((__const__))
|
|
|
|
#else
|
2020-05-03 21:57:10 +00:00
|
|
|
# define _GL_ATTRIBUTE_CONST
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if 201710L < __STDC_VERSION__
|
|
|
|
# define _GL_ATTRIBUTE_DEPRECATED [[__deprecated__]]
|
|
|
|
#elif _GL_HAS_ATTRIBUTE (deprecated)
|
|
|
|
# define _GL_ATTRIBUTE_DEPRECATED __attribute__ ((__deprecated__))
|
|
|
|
#else
|
|
|
|
# define _GL_ATTRIBUTE_DEPRECATED
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if _GL_HAS_ATTRIBUTE (error)
|
2020-05-09 15:47:05 +00:00
|
|
|
# define _GL_ATTRIBUTE_ERROR(msg) __attribute__ ((__error__ (msg)))
|
|
|
|
# define _GL_ATTRIBUTE_WARNING(msg) __attribute__ ((__warning__ (msg)))
|
Update from Gnulib
This incorporates:
2020-08-11 Use expression statements also on clang
2020-08-10 Use many __attribute__s with clang
2020-08-09 Use attribute __aligned__ with clang
2020-08-09 Use __alignof__ with clang
2020-08-09 ignore-value: Simplify on clang
2020-08-09 Use __typeof__ with clang
2020-08-09 intprops: Fix typo in comment
2020-08-09 Silence warnings from clang 10 with -Wimplicit-fallthrough
2020-08-09 count-one-bits: Use __builtin_popcount{,l,ll} on clang
2020-08-09 string: Fix build error in C++ mode with clang
2020-08-09 Add ability to emit user-defined diagnostics with clang
2020-08-07 alloca: No need to compile alloca.c with clang
2020-08-06 Use __builtin_assume with clang
* lib/alloca.in.h, lib/arg-nonnull.h, lib/c++defs.h, lib/cdefs.h:
* lib/count-one-bits.h, lib/dirent.in.h, lib/ignore-value.h:
* lib/intprops.h, lib/malloca.h, lib/regex_internal.h:
* lib/stdalign.in.h, lib/stddef.in.h, lib/stdio.in.h:
* lib/stdlib.in.h, lib/string.in.h, lib/verify.h, lib/warn-on-use.h:
* m4/gnulib-common.m4, m4/stddef_h.m4, m4/stdint.m4:
Copy from Gnulib.
2020-08-11 17:58:35 +00:00
|
|
|
#elif _GL_HAS_ATTRIBUTE (diagnose_if)
|
|
|
|
# define _GL_ATTRIBUTE_ERROR(msg) __attribute__ ((__diagnose_if__ (1, msg, "error")))
|
|
|
|
# define _GL_ATTRIBUTE_WARNING(msg) __attribute__ ((__diagnose_if__ (1, msg, "warning")))
|
2020-05-03 21:57:10 +00:00
|
|
|
#else
|
|
|
|
# define _GL_ATTRIBUTE_ERROR(msg)
|
|
|
|
# define _GL_ATTRIBUTE_WARNING(msg)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if _GL_HAS_ATTRIBUTE (externally_visible)
|
|
|
|
# define _GL_ATTRIBUTE_EXTERNALLY_VISIBLE __attribute__ ((externally_visible))
|
|
|
|
#else
|
|
|
|
# define _GL_ATTRIBUTE_EXTERNALLY_VISIBLE
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* FALLTHROUGH is special, because it always expands to something. */
|
|
|
|
#if 201710L < __STDC_VERSION__
|
|
|
|
# define _GL_ATTRIBUTE_FALLTHROUGH [[__fallthrough__]]
|
|
|
|
#elif _GL_HAS_ATTRIBUTE (fallthrough)
|
|
|
|
# define _GL_ATTRIBUTE_FALLTHROUGH __attribute__ ((__fallthrough__))
|
|
|
|
#else
|
|
|
|
# define _GL_ATTRIBUTE_FALLTHROUGH ((void) 0)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if _GL_HAS_ATTRIBUTE (format)
|
|
|
|
# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec))
|
|
|
|
#else
|
|
|
|
# define _GL_ATTRIBUTE_FORMAT(spec)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if _GL_HAS_ATTRIBUTE (leaf)
|
|
|
|
# define _GL_ATTRIBUTE_LEAF __attribute__ ((__leaf__))
|
|
|
|
#else
|
|
|
|
# define _GL_ATTRIBUTE_LEAF
|
|
|
|
#endif
|
|
|
|
|
Update from Gnulib
This incorporates:
2020-07-30 work around some Oracle Studio attribute bugs
2020-07-29 fsusage, regex, stat-size: remove Cray support
2020-07-26 inttypes: remove support for AIX 4
2020-07-26 gettimeofday: remove workaround for Mac OS X 10.0
2020-07-26 don't require gl_LOCALTIME_BUFFER_DEFAULTS
2020-07-26 alloca: remove Cray-2 and Cray Y-MP support
2020-07-26 libgmp: remove dependency on havelib
2020-07-26 libgmp: remove HAVE_GMP, LIB_GMP
2020-07-25 multiarch: prepare for x86_64+arm64 universal in macOS 11
2020-07-25 sigprocmask: small autoconf macro improvement
2020-07-25 small autoconf macro improvements
2020-07-24 timespec: remove dependence on ‘verify’
2020-07-24 optimize a few more three-valued comparisons
2020-07-24 fix _GL_CMP parenthesization typo
2020-07-23 optimize three-valued comparison between integers
2020-07-24 doc: update for Mac OS X 10.13
2020-07-23 fchmodat, lchmod: use /proc on Cygwin
2020-07-21 inttypes: fix PRI*PTR and SCN*PTR on 64-bit native Windows
2020-07-12 libgmp: avoid warning when --without-libgmp is used
2020-07-12 libgmp: link to the correct shared library
* lib/mini-gmp-gnulib.c: Ignore -Wsuggest-attribute=malloc only for
* build-aux/config.guess, build-aux/config.sub:
* build-aux/install-sh, doc/misc/texinfo.tex, lib/c-strcasecmp.c:
* lib/c-strncasecmp.c, lib/fchmodat.c, lib/fsusage.c:
* lib/gettimeofday.c, lib/inttypes.in.h, lib/lchmod.c:
* lib/mini-gmp-gnulib.c, lib/nstrftime.c, lib/regex.h, lib/timespec.h:
* m4/alloca.m4, m4/getgroups.m4, m4/gettimeofday.m4:
* m4/gnulib-common.m4, m4/inttypes.m4, m4/libgmp.m4, m4/mktime.m4:
* m4/multiarch.m4:
Copy from Gnulib.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* src/Makefile.in, test/Makefile.in (LIBGMP):
Rename from LIB_GMP for compatibility with Gnulib.
All uses changed.
2020-07-30 20:58:58 +00:00
|
|
|
/* Oracle Studio 12.6 mishandles may_alias despite __has_attribute OK. */
|
|
|
|
#if _GL_HAS_ATTRIBUTE (may_alias) && !defined __SUNPRO_C
|
2020-05-03 21:57:10 +00:00
|
|
|
# define _GL_ATTRIBUTE_MAY_ALIAS __attribute__ ((__may_alias__))
|
|
|
|
#else
|
|
|
|
# define _GL_ATTRIBUTE_MAY_ALIAS
|
2011-06-06 19:53:44 +00:00
|
|
|
#endif
|
Update from Gnulib
This incorporates:
2018-05-21 crypto: omit stream ops Emacs doesn’t need
2018-05-13 truncate: Fix compilation error on Android
2018-05-13 imaxdiv: Fix compilation error on Android
2018-05-13 Support selective inclusion of recent mingw.org headers
2018-05-13 Add cross-compilation guesses for Linux systems sans glibc
2018-05-13 stdioext: Fix compilation errors with newer Android headers
2018-05-07 af_alg: Pacify --enable-gcc-warnings
2018-05-06 af_alg: Fix bug with streams that are not at position 0
2018-05-06 Followup to 'af_alg: New module'
2018-05-05 crypto/{md5,sha1,sha256,sha512}: simplify
2018-05-05 af_alg: New module
2018-05-05 af_alg: Improve function signature
2018-04-28 md5sum: Use AF_ALG when available
2018-04-28 sha512sum: Use AF_ALG when available
2018-04-28 sha256sum: Use AF_ALG when available
2018-04-28 sha1sum: Use AF_ALG when available
2018-05-05 all: Replace more http URLs by https URLs
2018-05-03 maint: port more modules to GCC 8
2018-05-03 Simplify code; drop support for Borland C++ on Windows
* admin/merge-gnulib (GNULIB_MODULES): Use crypto/md5-buffer
rather than crypto/md5, since Emacs doesn’t use the stream
operations that in recent Gnulib pull in other stuff Emacs doesn’t
need. Similarly for crypto/sha1-buffer, crypto/sha256-buffer,
crypto/sha512-buffer.
* build-aux/config.guess, build-aux/config.sub, lib/dosname.h:
* lib/dup2.c, lib/errno.in.h, lib/euidaccess.c, lib/fcntl.c:
* lib/fcntl.in.h, lib/fpending.c, lib/fsync.c, lib/getdtablesize.c:
* lib/getopt.c, lib/gettimeofday.c, lib/inttypes.in.h, lib/md5.c:
* lib/md5.h, lib/open.c, lib/pipe2.c, lib/putenv.c, lib/sha1.c:
* lib/sha1.h, lib/sha256.c, lib/sha256.h, lib/sha512.c:
* lib/sha512.h, lib/stat-time.h, lib/stdio-impl.h, lib/stdio.in.h:
* lib/stdlib.in.h, lib/sys_stat.in.h, lib/sys_types.in.h:
* lib/timespec.h, lib/unistd.in.h, lib/utimens.c, m4/c-strtod.m4:
* m4/gnulib-common.m4, m4/inttypes.m4, m4/lstat.m4, m4/nocrash.m4:
* m4/pselect.m4, m4/readlink.m4, m4/stdio_h.m4, m4/symlink.m4:
* m4/unistd_h.m4, m4/utimens.m4:
Copy from Gnulib.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
2018-05-21 18:42:18 +00:00
|
|
|
|
2020-05-03 21:57:10 +00:00
|
|
|
#if 201710L < __STDC_VERSION__
|
|
|
|
# define _GL_ATTRIBUTE_MAYBE_UNUSED [[__maybe_unused__]]
|
|
|
|
#elif _GL_HAS_ATTRIBUTE (unused)
|
|
|
|
# define _GL_ATTRIBUTE_MAYBE_UNUSED __attribute__ ((__unused__))
|
|
|
|
#else
|
|
|
|
# define _GL_ATTRIBUTE_MAYBE_UNUSED
|
|
|
|
#endif
|
|
|
|
/* Earlier spellings of this macro. */
|
|
|
|
#define _GL_UNUSED _GL_ATTRIBUTE_MAYBE_UNUSED
|
|
|
|
#define _UNUSED_PARAMETER_ _GL_ATTRIBUTE_MAYBE_UNUSED
|
|
|
|
|
|
|
|
#if _GL_HAS_ATTRIBUTE (malloc)
|
Update from Gnulib
This incorporates:
2018-05-21 crypto: omit stream ops Emacs doesn’t need
2018-05-13 truncate: Fix compilation error on Android
2018-05-13 imaxdiv: Fix compilation error on Android
2018-05-13 Support selective inclusion of recent mingw.org headers
2018-05-13 Add cross-compilation guesses for Linux systems sans glibc
2018-05-13 stdioext: Fix compilation errors with newer Android headers
2018-05-07 af_alg: Pacify --enable-gcc-warnings
2018-05-06 af_alg: Fix bug with streams that are not at position 0
2018-05-06 Followup to 'af_alg: New module'
2018-05-05 crypto/{md5,sha1,sha256,sha512}: simplify
2018-05-05 af_alg: New module
2018-05-05 af_alg: Improve function signature
2018-04-28 md5sum: Use AF_ALG when available
2018-04-28 sha512sum: Use AF_ALG when available
2018-04-28 sha256sum: Use AF_ALG when available
2018-04-28 sha1sum: Use AF_ALG when available
2018-05-05 all: Replace more http URLs by https URLs
2018-05-03 maint: port more modules to GCC 8
2018-05-03 Simplify code; drop support for Borland C++ on Windows
* admin/merge-gnulib (GNULIB_MODULES): Use crypto/md5-buffer
rather than crypto/md5, since Emacs doesn’t use the stream
operations that in recent Gnulib pull in other stuff Emacs doesn’t
need. Similarly for crypto/sha1-buffer, crypto/sha256-buffer,
crypto/sha512-buffer.
* build-aux/config.guess, build-aux/config.sub, lib/dosname.h:
* lib/dup2.c, lib/errno.in.h, lib/euidaccess.c, lib/fcntl.c:
* lib/fcntl.in.h, lib/fpending.c, lib/fsync.c, lib/getdtablesize.c:
* lib/getopt.c, lib/gettimeofday.c, lib/inttypes.in.h, lib/md5.c:
* lib/md5.h, lib/open.c, lib/pipe2.c, lib/putenv.c, lib/sha1.c:
* lib/sha1.h, lib/sha256.c, lib/sha256.h, lib/sha512.c:
* lib/sha512.h, lib/stat-time.h, lib/stdio-impl.h, lib/stdio.in.h:
* lib/stdlib.in.h, lib/sys_stat.in.h, lib/sys_types.in.h:
* lib/timespec.h, lib/unistd.in.h, lib/utimens.c, m4/c-strtod.m4:
* m4/gnulib-common.m4, m4/inttypes.m4, m4/lstat.m4, m4/nocrash.m4:
* m4/pselect.m4, m4/readlink.m4, m4/stdio_h.m4, m4/symlink.m4:
* m4/unistd_h.m4, m4/utimens.m4:
Copy from Gnulib.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
2018-05-21 18:42:18 +00:00
|
|
|
# define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__))
|
|
|
|
#else
|
2020-05-03 21:57:10 +00:00
|
|
|
# define _GL_ATTRIBUTE_MALLOC
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if 201710L < __STDC_VERSION__
|
|
|
|
# define _GL_ATTRIBUTE_NODISCARD [[__nodiscard__]]
|
|
|
|
#elif _GL_HAS_ATTRIBUTE (warn_unused_result)
|
|
|
|
# define _GL_ATTRIBUTE_NODISCARD __attribute__ ((__warn_unused_result__))
|
|
|
|
#else
|
|
|
|
# define _GL_ATTRIBUTE_NODISCARD
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if _GL_HAS_ATTRIBUTE (noinline)
|
|
|
|
# define _GL_ATTRIBUTE_NOINLINE __attribute__ ((__noinline__))
|
|
|
|
#else
|
|
|
|
# define _GL_ATTRIBUTE_NOINLINE
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if _GL_HAS_ATTRIBUTE (nonnull)
|
|
|
|
# define _GL_ATTRIBUTE_NONNULL(args) __attribute__ ((__nonnull__ args))
|
|
|
|
#else
|
|
|
|
# define _GL_ATTRIBUTE_NONNULL(args)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if _GL_HAS_ATTRIBUTE (nonstring)
|
|
|
|
# define _GL_ATTRIBUTE_NONSTRING __attribute__ ((__nonstring__))
|
|
|
|
#else
|
|
|
|
# define _GL_ATTRIBUTE_NONSTRING
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* There is no _GL_ATTRIBUTE_NORETURN; use _Noreturn instead. */
|
|
|
|
|
|
|
|
#if _GL_HAS_ATTRIBUTE (nothrow) && !defined __cplusplus
|
|
|
|
# define _GL_ATTRIBUTE_NOTHROW __attribute__ ((__nothrow__))
|
|
|
|
#else
|
|
|
|
# define _GL_ATTRIBUTE_NOTHROW
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if _GL_HAS_ATTRIBUTE (packed)
|
|
|
|
# define _GL_ATTRIBUTE_PACKED __attribute__ ((__packed__))
|
|
|
|
#else
|
|
|
|
# define _GL_ATTRIBUTE_PACKED
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if _GL_HAS_ATTRIBUTE (pure)
|
|
|
|
# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
|
|
|
|
#else
|
|
|
|
# define _GL_ATTRIBUTE_PURE
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if _GL_HAS_ATTRIBUTE (returns_nonnull)
|
|
|
|
# define _GL_ATTRIBUTE_RETURNS_NONNULL __attribute__ ((__returns_nonnull__))
|
|
|
|
#else
|
|
|
|
# define _GL_ATTRIBUTE_RETURNS_NONNULL
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if _GL_HAS_ATTRIBUTE (sentinel)
|
|
|
|
# define _GL_ATTRIBUTE_SENTINEL(pos) __attribute__ ((__sentinel__ pos))
|
|
|
|
#else
|
|
|
|
# define _GL_ATTRIBUTE_SENTINEL(pos)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
]dnl There is no _GL_ATTRIBUTE_VISIBILITY; see m4/visibility.m4 instead.
|
|
|
|
[
|
|
|
|
/* To support C++ as well as C, use _GL_UNUSED_LABEL with trailing ';'. */
|
|
|
|
#if !defined __cplusplus || _GL_GNUC_PREREQ (4, 5)
|
|
|
|
# define _GL_UNUSED_LABEL _GL_ATTRIBUTE_MAYBE_UNUSED
|
|
|
|
#else
|
|
|
|
# define _GL_UNUSED_LABEL
|
Update from Gnulib
This incorporates:
2018-05-21 crypto: omit stream ops Emacs doesn’t need
2018-05-13 truncate: Fix compilation error on Android
2018-05-13 imaxdiv: Fix compilation error on Android
2018-05-13 Support selective inclusion of recent mingw.org headers
2018-05-13 Add cross-compilation guesses for Linux systems sans glibc
2018-05-13 stdioext: Fix compilation errors with newer Android headers
2018-05-07 af_alg: Pacify --enable-gcc-warnings
2018-05-06 af_alg: Fix bug with streams that are not at position 0
2018-05-06 Followup to 'af_alg: New module'
2018-05-05 crypto/{md5,sha1,sha256,sha512}: simplify
2018-05-05 af_alg: New module
2018-05-05 af_alg: Improve function signature
2018-04-28 md5sum: Use AF_ALG when available
2018-04-28 sha512sum: Use AF_ALG when available
2018-04-28 sha256sum: Use AF_ALG when available
2018-04-28 sha1sum: Use AF_ALG when available
2018-05-05 all: Replace more http URLs by https URLs
2018-05-03 maint: port more modules to GCC 8
2018-05-03 Simplify code; drop support for Borland C++ on Windows
* admin/merge-gnulib (GNULIB_MODULES): Use crypto/md5-buffer
rather than crypto/md5, since Emacs doesn’t use the stream
operations that in recent Gnulib pull in other stuff Emacs doesn’t
need. Similarly for crypto/sha1-buffer, crypto/sha256-buffer,
crypto/sha512-buffer.
* build-aux/config.guess, build-aux/config.sub, lib/dosname.h:
* lib/dup2.c, lib/errno.in.h, lib/euidaccess.c, lib/fcntl.c:
* lib/fcntl.in.h, lib/fpending.c, lib/fsync.c, lib/getdtablesize.c:
* lib/getopt.c, lib/gettimeofday.c, lib/inttypes.in.h, lib/md5.c:
* lib/md5.h, lib/open.c, lib/pipe2.c, lib/putenv.c, lib/sha1.c:
* lib/sha1.h, lib/sha256.c, lib/sha256.h, lib/sha512.c:
* lib/sha512.h, lib/stat-time.h, lib/stdio-impl.h, lib/stdio.in.h:
* lib/stdlib.in.h, lib/sys_stat.in.h, lib/sys_types.in.h:
* lib/timespec.h, lib/unistd.in.h, lib/utimens.c, m4/c-strtod.m4:
* m4/gnulib-common.m4, m4/inttypes.m4, m4/lstat.m4, m4/nocrash.m4:
* m4/pselect.m4, m4/readlink.m4, m4/stdio_h.m4, m4/symlink.m4:
* m4/unistd_h.m4, m4/utimens.m4:
Copy from Gnulib.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
2018-05-21 18:42:18 +00:00
|
|
|
#endif
|
Update from Gnulib.
This incorporates:
2019-03-23 Support cross-compilation to musl libc
2019-03-23 noreturn: In C++ mode with clang, use _Noreturn as fallback
2019-03-22 _Noreturn: beware of C's _Noreturn in C++ pre C++11
2019-03-19 Help making signal handlers more reliable
2019-03-18 _Noreturn: clang and MSVC do support [[noreturn]] in C++11
2019-03-17 _Noreturn: GCC 4.7 does not support [[noreturn]] in C++11
2019-03-14 all: Update URLs to msdn.microsoft.com
* doc/misc/texinfo.tex, lib/_Noreturn.h, lib/gettimeofday.c:
* lib/mktime.c, lib/regcomp.c, lib/regexec.c, lib/stat-time.h:
* lib/utimens.c, m4/fdopendir.m4, m4/getgroups.m4:
* m4/gettimeofday.m4, m4/gnulib-common.m4, m4/putenv.m4, m4/utimes.m4:
Update from gnulib.
2019-03-25 21:53:56 +00:00
|
|
|
])
|
|
|
|
AH_VERBATIM([async_safe],
|
|
|
|
[/* The _GL_ASYNC_SAFE marker should be attached to functions that are
|
|
|
|
signal handlers (for signals other than SIGABRT, SIGPIPE) or can be
|
|
|
|
invoked from such signal handlers. Such functions have some restrictions:
|
|
|
|
* All functions that it calls should be marked _GL_ASYNC_SAFE as well,
|
|
|
|
or should be listed as async-signal-safe in POSIX
|
Update from Gnulib
This incorporates:
2019-09-22 Update some URLs
2019-09-15 fcntl-h: fix compilation error of creat.c on MSVC
2019-09-15 creat: new module
2019-09-15 access: new module
2019-09-09 Add option to assume best, not worst, when cross-compiling.
* build-aux/config.guess, build-aux/config.sub, doc/misc/texinfo.tex:
* lib/careadlinkat.c, lib/careadlinkat.h, lib/count-leading-zeros.h:
* lib/count-trailing-zeros.h, lib/diffseq.h, lib/fcntl.in.h:
* lib/ftoastr.c, lib/get-permissions.c:
* lib/ieee754.in.h, lib/inttypes.in.h, lib/mktime.c, lib/open.c:
* lib/pathmax.h, lib/pipe2.c, lib/stddef.in.h, lib/stdint.in.h:
* lib/stdlib.in.h, lib/str-two-way.h, lib/string.in.h, lib/time.in.h:
* lib/timegm.c, lib/unistd.in.h, m4/canonicalize.m4:
* m4/extern-inline.m4, m4/fcntl_h.m4, m4/fdopendir.m4:
* m4/getgroups.m4, m4/getopt.m4, m4/gettimeofday.m4:
* m4/gnulib-common.m4, m4/largefile.m4:
* m4/lstat.m4, m4/memmem.m4, m4/mktime.m4, m4/nocrash.m4, m4/open.m4:
* m4/pselect.m4, m4/putenv.m4, m4/readlink.m4, m4/regex.m4:
* m4/symlink.m4, m4/unistd_h.m4, m4/utimens.m4, m4/utimes.m4:
Copy from Gnulib.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* m4/open-slash.m4: New file, copied from Gnulib.
2019-09-23 06:50:59 +00:00
|
|
|
<https://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html#tag_15_04>
|
Update from Gnulib.
This incorporates:
2019-03-23 Support cross-compilation to musl libc
2019-03-23 noreturn: In C++ mode with clang, use _Noreturn as fallback
2019-03-22 _Noreturn: beware of C's _Noreturn in C++ pre C++11
2019-03-19 Help making signal handlers more reliable
2019-03-18 _Noreturn: clang and MSVC do support [[noreturn]] in C++11
2019-03-17 _Noreturn: GCC 4.7 does not support [[noreturn]] in C++11
2019-03-14 all: Update URLs to msdn.microsoft.com
* doc/misc/texinfo.tex, lib/_Noreturn.h, lib/gettimeofday.c:
* lib/mktime.c, lib/regcomp.c, lib/regexec.c, lib/stat-time.h:
* lib/utimens.c, m4/fdopendir.m4, m4/getgroups.m4:
* m4/gettimeofday.m4, m4/gnulib-common.m4, m4/putenv.m4, m4/utimes.m4:
Update from gnulib.
2019-03-25 21:53:56 +00:00
|
|
|
section 2.4.3. Note that malloc(), sprintf(), and fwrite(), in
|
|
|
|
particular, are NOT async-signal-safe.
|
|
|
|
* All memory locations (variables and struct fields) that these functions
|
|
|
|
access must be marked 'volatile'. This holds for both read and write
|
|
|
|
accesses. Otherwise the compiler might optimize away stores to and
|
|
|
|
reads from such locations that occur in the program, depending on its
|
|
|
|
data flow analysis. For example, when the program contains a loop
|
|
|
|
that is intended to inspect a variable set from within a signal handler
|
|
|
|
while (!signal_occurred)
|
|
|
|
;
|
|
|
|
the compiler is allowed to transform this into an endless loop if the
|
|
|
|
variable 'signal_occurred' is not declared 'volatile'.
|
|
|
|
Additionally, recall that:
|
|
|
|
* A signal handler should not modify errno (except if it is a handler
|
|
|
|
for a fatal signal and ends by raising the same signal again, thus
|
|
|
|
provoking the termination of the process). If it invokes a function
|
|
|
|
that may clobber errno, it needs to save and restore the value of
|
|
|
|
errno. */
|
|
|
|
#define _GL_ASYNC_SAFE
|
Update from Gnulib
This incorporates:
2020-07-30 work around some Oracle Studio attribute bugs
2020-07-29 fsusage, regex, stat-size: remove Cray support
2020-07-26 inttypes: remove support for AIX 4
2020-07-26 gettimeofday: remove workaround for Mac OS X 10.0
2020-07-26 don't require gl_LOCALTIME_BUFFER_DEFAULTS
2020-07-26 alloca: remove Cray-2 and Cray Y-MP support
2020-07-26 libgmp: remove dependency on havelib
2020-07-26 libgmp: remove HAVE_GMP, LIB_GMP
2020-07-25 multiarch: prepare for x86_64+arm64 universal in macOS 11
2020-07-25 sigprocmask: small autoconf macro improvement
2020-07-25 small autoconf macro improvements
2020-07-24 timespec: remove dependence on ‘verify’
2020-07-24 optimize a few more three-valued comparisons
2020-07-24 fix _GL_CMP parenthesization typo
2020-07-23 optimize three-valued comparison between integers
2020-07-24 doc: update for Mac OS X 10.13
2020-07-23 fchmodat, lchmod: use /proc on Cygwin
2020-07-21 inttypes: fix PRI*PTR and SCN*PTR on 64-bit native Windows
2020-07-12 libgmp: avoid warning when --without-libgmp is used
2020-07-12 libgmp: link to the correct shared library
* lib/mini-gmp-gnulib.c: Ignore -Wsuggest-attribute=malloc only for
* build-aux/config.guess, build-aux/config.sub:
* build-aux/install-sh, doc/misc/texinfo.tex, lib/c-strcasecmp.c:
* lib/c-strncasecmp.c, lib/fchmodat.c, lib/fsusage.c:
* lib/gettimeofday.c, lib/inttypes.in.h, lib/lchmod.c:
* lib/mini-gmp-gnulib.c, lib/nstrftime.c, lib/regex.h, lib/timespec.h:
* m4/alloca.m4, m4/getgroups.m4, m4/gettimeofday.m4:
* m4/gnulib-common.m4, m4/inttypes.m4, m4/libgmp.m4, m4/mktime.m4:
* m4/multiarch.m4:
Copy from Gnulib.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* src/Makefile.in, test/Makefile.in (LIBGMP):
Rename from LIB_GMP for compatibility with Gnulib.
All uses changed.
2020-07-30 20:58:58 +00:00
|
|
|
])
|
|
|
|
AH_VERBATIM([micro_optimizations],
|
Update from Gnulib
This incorporates:
2020-08-06 libgmp: add <gmp/gmp.h> support
2020-08-06 Consider that clang defines __OPTIMIZE__ like GCC does
2020-08-06 Use __builtin_expect with clang everywhere
2020-08-05 Use __builtin_clz{,l,ll} with clang, also on Windows
2020-08-05 Use __builtin_ctz{,l,ll} and __builtin_ffs{,l,ll} with clang
2020-07-31 _GL_CMP: Improve documentation
2020-07-30 alloca, largefile: sync with Autoconf master
* lib/c++defs.h, lib/cdefs.h, lib/count-leading-zeros.h:
* lib/count-trailing-zeros.h, m4/alloca.m4, m4/gnulib-common.m4:
* m4/largefile.m4, m4/libgmp.m4:
Copy from Gnulib.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
2020-08-06 22:24:47 +00:00
|
|
|
[/* _GL_CMP (n1, n2) performs a three-valued comparison on n1 vs. n2, where
|
|
|
|
n1 and n2 are expressions without side effects, that evaluate to real
|
|
|
|
numbers (excluding NaN).
|
Update from Gnulib
This incorporates:
2020-07-30 work around some Oracle Studio attribute bugs
2020-07-29 fsusage, regex, stat-size: remove Cray support
2020-07-26 inttypes: remove support for AIX 4
2020-07-26 gettimeofday: remove workaround for Mac OS X 10.0
2020-07-26 don't require gl_LOCALTIME_BUFFER_DEFAULTS
2020-07-26 alloca: remove Cray-2 and Cray Y-MP support
2020-07-26 libgmp: remove dependency on havelib
2020-07-26 libgmp: remove HAVE_GMP, LIB_GMP
2020-07-25 multiarch: prepare for x86_64+arm64 universal in macOS 11
2020-07-25 sigprocmask: small autoconf macro improvement
2020-07-25 small autoconf macro improvements
2020-07-24 timespec: remove dependence on ‘verify’
2020-07-24 optimize a few more three-valued comparisons
2020-07-24 fix _GL_CMP parenthesization typo
2020-07-23 optimize three-valued comparison between integers
2020-07-24 doc: update for Mac OS X 10.13
2020-07-23 fchmodat, lchmod: use /proc on Cygwin
2020-07-21 inttypes: fix PRI*PTR and SCN*PTR on 64-bit native Windows
2020-07-12 libgmp: avoid warning when --without-libgmp is used
2020-07-12 libgmp: link to the correct shared library
* lib/mini-gmp-gnulib.c: Ignore -Wsuggest-attribute=malloc only for
* build-aux/config.guess, build-aux/config.sub:
* build-aux/install-sh, doc/misc/texinfo.tex, lib/c-strcasecmp.c:
* lib/c-strncasecmp.c, lib/fchmodat.c, lib/fsusage.c:
* lib/gettimeofday.c, lib/inttypes.in.h, lib/lchmod.c:
* lib/mini-gmp-gnulib.c, lib/nstrftime.c, lib/regex.h, lib/timespec.h:
* m4/alloca.m4, m4/getgroups.m4, m4/gettimeofday.m4:
* m4/gnulib-common.m4, m4/inttypes.m4, m4/libgmp.m4, m4/mktime.m4:
* m4/multiarch.m4:
Copy from Gnulib.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* src/Makefile.in, test/Makefile.in (LIBGMP):
Rename from LIB_GMP for compatibility with Gnulib.
All uses changed.
2020-07-30 20:58:58 +00:00
|
|
|
It returns
|
|
|
|
1 if n1 > n2
|
|
|
|
0 if n1 == n2
|
|
|
|
-1 if n1 < n2
|
|
|
|
The naïve code (n1 > n2 ? 1 : n1 < n2 ? -1 : 0) produces a conditional
|
|
|
|
jump with nearly all GCC versions up to GCC 10.
|
|
|
|
This variant (n1 < n2 ? -1 : n1 > n2) produces a conditional with many
|
|
|
|
GCC versions up to GCC 9.
|
|
|
|
The better code (n1 > n2) - (n1 < n2) from Hacker's Delight § 2-9
|
|
|
|
avoids conditional jumps in all GCC versions >= 3.4. */
|
|
|
|
#define _GL_CMP(n1, n2) (((n1) > (n2)) - ((n1) < (n2)))
|
Regenerate.
* aclocal.m4, compile, depcomp, lib/Makefile.in, lib/dummy.c:
* lib/gnulib.mk, m4/00gnulib.m4, m4/gnulib-cache.m4:
* m4/gnulib-common.m4, m4/gnulib-comp.m4, m4/gnulib-tool.m4, missing:
New files, generated automatically, with 'make sync-from-gnulib'
followed by 'make'.
* configure, lisp/dired.el, src/config.in: Regenerate.
2011-01-08 21:19:44 +00:00
|
|
|
])
|
Update from Gnulib
This incorporates:
2019-09-22 Update some URLs
2019-09-15 fcntl-h: fix compilation error of creat.c on MSVC
2019-09-15 creat: new module
2019-09-15 access: new module
2019-09-09 Add option to assume best, not worst, when cross-compiling.
* build-aux/config.guess, build-aux/config.sub, doc/misc/texinfo.tex:
* lib/careadlinkat.c, lib/careadlinkat.h, lib/count-leading-zeros.h:
* lib/count-trailing-zeros.h, lib/diffseq.h, lib/fcntl.in.h:
* lib/ftoastr.c, lib/get-permissions.c:
* lib/ieee754.in.h, lib/inttypes.in.h, lib/mktime.c, lib/open.c:
* lib/pathmax.h, lib/pipe2.c, lib/stddef.in.h, lib/stdint.in.h:
* lib/stdlib.in.h, lib/str-two-way.h, lib/string.in.h, lib/time.in.h:
* lib/timegm.c, lib/unistd.in.h, m4/canonicalize.m4:
* m4/extern-inline.m4, m4/fcntl_h.m4, m4/fdopendir.m4:
* m4/getgroups.m4, m4/getopt.m4, m4/gettimeofday.m4:
* m4/gnulib-common.m4, m4/largefile.m4:
* m4/lstat.m4, m4/memmem.m4, m4/mktime.m4, m4/nocrash.m4, m4/open.m4:
* m4/pselect.m4, m4/putenv.m4, m4/readlink.m4, m4/regex.m4:
* m4/symlink.m4, m4/unistd_h.m4, m4/utimens.m4, m4/utimes.m4:
Copy from Gnulib.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* m4/open-slash.m4: New file, copied from Gnulib.
2019-09-23 06:50:59 +00:00
|
|
|
dnl Hint which direction to take regarding cross-compilation guesses:
|
|
|
|
dnl When a user installs a program on a platform they are not intimately
|
|
|
|
dnl familiar with, --enable-cross-guesses=conservative is the appropriate
|
|
|
|
dnl choice. It implements the "If we don't know, assume the worst" principle.
|
|
|
|
dnl However, when an operating system developer (on a platform which is not
|
|
|
|
dnl yet known to gnulib) builds packages for their platform, they want to
|
|
|
|
dnl expose, not hide, possible platform bugs; in this case,
|
|
|
|
dnl --enable-cross-guesses=risky is the appropriate choice.
|
|
|
|
dnl Sets the variables
|
|
|
|
dnl gl_cross_guess_normal (to be used when 'yes' is good and 'no' is bad),
|
|
|
|
dnl gl_cross_guess_inverted (to be used when 'no' is good and 'yes' is bad).
|
|
|
|
AC_ARG_ENABLE([cross-guesses],
|
|
|
|
[AS_HELP_STRING([--enable-cross-guesses={conservative|risky}],
|
|
|
|
[specify policy for cross-compilation guesses])],
|
|
|
|
[if test "x$enableval" != xconservative && test "x$enableval" != xrisky; then
|
|
|
|
AC_MSG_WARN([invalid argument supplied to --enable-cross-guesses])
|
|
|
|
enableval=conservative
|
|
|
|
fi
|
|
|
|
gl_cross_guesses="$enableval"],
|
|
|
|
[gl_cross_guesses=conservative])
|
|
|
|
if test $gl_cross_guesses = risky; then
|
|
|
|
gl_cross_guess_normal="guessing yes"
|
|
|
|
gl_cross_guess_inverted="guessing no"
|
|
|
|
else
|
|
|
|
gl_cross_guess_normal="guessing no"
|
|
|
|
gl_cross_guess_inverted="guessing yes"
|
|
|
|
fi
|
Regenerate.
* aclocal.m4, compile, depcomp, lib/Makefile.in, lib/dummy.c:
* lib/gnulib.mk, m4/00gnulib.m4, m4/gnulib-cache.m4:
* m4/gnulib-common.m4, m4/gnulib-comp.m4, m4/gnulib-tool.m4, missing:
New files, generated automatically, with 'make sync-from-gnulib'
followed by 'make'.
* configure, lisp/dired.el, src/config.in: Regenerate.
2011-01-08 21:19:44 +00:00
|
|
|
dnl Preparation for running test programs:
|
|
|
|
dnl Tell glibc to write diagnostics from -D_FORTIFY_SOURCE=2 to stderr, not
|
|
|
|
dnl to /dev/tty, so they can be redirected to log files. Such diagnostics
|
|
|
|
dnl arise e.g., in the macros gl_PRINTF_DIRECTIVE_N, gl_SNPRINTF_DIRECTIVE_N.
|
|
|
|
LIBC_FATAL_STDERR_=1
|
|
|
|
export LIBC_FATAL_STDERR_
|
|
|
|
])
|
|
|
|
|
|
|
|
# gl_MODULE_INDICATOR_CONDITION
|
|
|
|
# expands to a C preprocessor expression that evaluates to 1 or 0, depending
|
|
|
|
# whether a gnulib module that has been requested shall be considered present
|
|
|
|
# or not.
|
2011-06-08 16:26:45 +00:00
|
|
|
m4_define([gl_MODULE_INDICATOR_CONDITION], [1])
|
Regenerate.
* aclocal.m4, compile, depcomp, lib/Makefile.in, lib/dummy.c:
* lib/gnulib.mk, m4/00gnulib.m4, m4/gnulib-cache.m4:
* m4/gnulib-common.m4, m4/gnulib-comp.m4, m4/gnulib-tool.m4, missing:
New files, generated automatically, with 'make sync-from-gnulib'
followed by 'make'.
* configure, lisp/dired.el, src/config.in: Regenerate.
2011-01-08 21:19:44 +00:00
|
|
|
|
|
|
|
# gl_MODULE_INDICATOR_SET_VARIABLE([modulename])
|
|
|
|
# sets the shell variable that indicates the presence of the given module to
|
|
|
|
# a C preprocessor expression that will evaluate to 1.
|
|
|
|
AC_DEFUN([gl_MODULE_INDICATOR_SET_VARIABLE],
|
|
|
|
[
|
2011-06-08 16:26:45 +00:00
|
|
|
gl_MODULE_INDICATOR_SET_VARIABLE_AUX(
|
|
|
|
[GNULIB_[]m4_translit([[$1]],
|
|
|
|
[abcdefghijklmnopqrstuvwxyz./-],
|
|
|
|
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])],
|
|
|
|
[gl_MODULE_INDICATOR_CONDITION])
|
|
|
|
])
|
|
|
|
|
|
|
|
# gl_MODULE_INDICATOR_SET_VARIABLE_AUX([variable])
|
|
|
|
# modifies the shell variable to include the gl_MODULE_INDICATOR_CONDITION.
|
|
|
|
# The shell variable's value is a C preprocessor expression that evaluates
|
|
|
|
# to 0 or 1.
|
|
|
|
AC_DEFUN([gl_MODULE_INDICATOR_SET_VARIABLE_AUX],
|
|
|
|
[
|
|
|
|
m4_if(m4_defn([gl_MODULE_INDICATOR_CONDITION]), [1],
|
|
|
|
[
|
|
|
|
dnl Simplify the expression VALUE || 1 to 1.
|
|
|
|
$1=1
|
|
|
|
],
|
|
|
|
[gl_MODULE_INDICATOR_SET_VARIABLE_AUX_OR([$1],
|
|
|
|
[gl_MODULE_INDICATOR_CONDITION])])
|
|
|
|
])
|
|
|
|
|
|
|
|
# gl_MODULE_INDICATOR_SET_VARIABLE_AUX_OR([variable], [condition])
|
|
|
|
# modifies the shell variable to include the given condition. The shell
|
|
|
|
# variable's value is a C preprocessor expression that evaluates to 0 or 1.
|
|
|
|
AC_DEFUN([gl_MODULE_INDICATOR_SET_VARIABLE_AUX_OR],
|
|
|
|
[
|
|
|
|
dnl Simplify the expression 1 || CONDITION to 1.
|
|
|
|
if test "$[]$1" != 1; then
|
|
|
|
dnl Simplify the expression 0 || CONDITION to CONDITION.
|
|
|
|
if test "$[]$1" = 0; then
|
|
|
|
$1=$2
|
|
|
|
else
|
|
|
|
$1="($[]$1 || $2)"
|
|
|
|
fi
|
|
|
|
fi
|
Regenerate.
* aclocal.m4, compile, depcomp, lib/Makefile.in, lib/dummy.c:
* lib/gnulib.mk, m4/00gnulib.m4, m4/gnulib-cache.m4:
* m4/gnulib-common.m4, m4/gnulib-comp.m4, m4/gnulib-tool.m4, missing:
New files, generated automatically, with 'make sync-from-gnulib'
followed by 'make'.
* configure, lisp/dired.el, src/config.in: Regenerate.
2011-01-08 21:19:44 +00:00
|
|
|
])
|
|
|
|
|
|
|
|
# gl_MODULE_INDICATOR([modulename])
|
|
|
|
# defines a C macro indicating the presence of the given module
|
|
|
|
# in a location where it can be used.
|
|
|
|
# | Value | Value |
|
|
|
|
# | in lib/ | in tests/ |
|
|
|
|
# --------------------------------------------+---------+-----------+
|
|
|
|
# Module present among main modules: | 1 | 1 |
|
|
|
|
# --------------------------------------------+---------+-----------+
|
|
|
|
# Module present among tests-related modules: | 0 | 1 |
|
|
|
|
# --------------------------------------------+---------+-----------+
|
|
|
|
# Module not present at all: | 0 | 0 |
|
|
|
|
# --------------------------------------------+---------+-----------+
|
|
|
|
AC_DEFUN([gl_MODULE_INDICATOR],
|
|
|
|
[
|
|
|
|
AC_DEFINE_UNQUOTED([GNULIB_]m4_translit([[$1]],
|
|
|
|
[abcdefghijklmnopqrstuvwxyz./-],
|
|
|
|
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___]),
|
|
|
|
[gl_MODULE_INDICATOR_CONDITION],
|
|
|
|
[Define to a C preprocessor expression that evaluates to 1 or 0,
|
|
|
|
depending whether the gnulib module $1 shall be considered present.])
|
|
|
|
])
|
|
|
|
|
|
|
|
# gl_MODULE_INDICATOR_FOR_TESTS([modulename])
|
|
|
|
# defines a C macro indicating the presence of the given module
|
|
|
|
# in lib or tests. This is useful to determine whether the module
|
|
|
|
# should be tested.
|
|
|
|
# | Value | Value |
|
|
|
|
# | in lib/ | in tests/ |
|
|
|
|
# --------------------------------------------+---------+-----------+
|
|
|
|
# Module present among main modules: | 1 | 1 |
|
|
|
|
# --------------------------------------------+---------+-----------+
|
|
|
|
# Module present among tests-related modules: | 1 | 1 |
|
|
|
|
# --------------------------------------------+---------+-----------+
|
|
|
|
# Module not present at all: | 0 | 0 |
|
|
|
|
# --------------------------------------------+---------+-----------+
|
|
|
|
AC_DEFUN([gl_MODULE_INDICATOR_FOR_TESTS],
|
|
|
|
[
|
|
|
|
AC_DEFINE([GNULIB_TEST_]m4_translit([[$1]],
|
|
|
|
[abcdefghijklmnopqrstuvwxyz./-],
|
|
|
|
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___]), [1],
|
|
|
|
[Define to 1 when the gnulib module $1 should be tested.])
|
|
|
|
])
|
|
|
|
|
2011-01-24 04:53:39 +00:00
|
|
|
# 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.
|
2011-04-01 06:07:33 +00:00
|
|
|
dnl But hide this definition from 'aclocal'.
|
|
|
|
AC_DEFUN([gl_W][ARN_ON_USE_PREPARE], [])
|
2011-01-24 04:53:39 +00:00
|
|
|
])
|
|
|
|
|
2011-01-22 00:12:10 +00:00
|
|
|
# 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.
|
|
|
|
# Used by Emacs.
|
|
|
|
AC_DEFUN([gl_ASSERT_NO_GNULIB_TESTS],
|
|
|
|
[
|
|
|
|
dnl Override gl_MODULE_INDICATOR_FOR_TESTS.
|
|
|
|
AC_DEFUN([gl_MODULE_INDICATOR_FOR_TESTS], [])
|
|
|
|
])
|
|
|
|
|
Regenerate.
* aclocal.m4, compile, depcomp, lib/Makefile.in, lib/dummy.c:
* lib/gnulib.mk, m4/00gnulib.m4, m4/gnulib-cache.m4:
* m4/gnulib-common.m4, m4/gnulib-comp.m4, m4/gnulib-tool.m4, missing:
New files, generated automatically, with 'make sync-from-gnulib'
followed by 'make'.
* configure, lisp/dired.el, src/config.in: Regenerate.
2011-01-08 21:19:44 +00:00
|
|
|
# Test whether <features.h> exists.
|
|
|
|
# Set HAVE_FEATURES_H.
|
|
|
|
AC_DEFUN([gl_FEATURES_H],
|
|
|
|
[
|
|
|
|
AC_CHECK_HEADERS_ONCE([features.h])
|
|
|
|
if test $ac_cv_header_features_h = yes; then
|
|
|
|
HAVE_FEATURES_H=1
|
|
|
|
else
|
|
|
|
HAVE_FEATURES_H=0
|
|
|
|
fi
|
|
|
|
AC_SUBST([HAVE_FEATURES_H])
|
|
|
|
])
|
|
|
|
|
2011-10-07 21:15:00 +00:00
|
|
|
# gl_PROG_CC_C99
|
|
|
|
# Modifies the value of the shell variable CC in an attempt to make $CC
|
|
|
|
# understand ISO C99 source code.
|
|
|
|
AC_DEFUN([gl_PROG_CC_C99],
|
|
|
|
[
|
2020-12-24 15:48:40 +00:00
|
|
|
dnl Just use AC_PROG_CC_C99.
|
|
|
|
dnl When AC_PROG_CC_C99 and AC_PROG_CC_STDC are used together, the substituted
|
|
|
|
dnl value of CC will contain the C99 enabling options twice. But this is only
|
|
|
|
dnl a cosmetic problem.
|
|
|
|
dnl With Autoconf >= 2.70, use AC_PROG_CC since it implies AC_PROG_CC_C99;
|
|
|
|
dnl this avoids a "warning: The macro `AC_PROG_CC_C99' is obsolete."
|
|
|
|
m4_version_prereq([2.70],
|
|
|
|
[AC_REQUIRE([AC_PROG_CC])],
|
|
|
|
[AC_REQUIRE([AC_PROG_CC_C99])])
|
2011-10-07 21:15:00 +00:00
|
|
|
])
|
|
|
|
|
2011-09-03 23:08:32 +00:00
|
|
|
# gl_PROG_AR_RANLIB
|
|
|
|
# Determines the values for AR, ARFLAGS, RANLIB that fit with the compiler.
|
|
|
|
# The user can set the variables AR, ARFLAGS, RANLIB if he wants to override
|
|
|
|
# the values.
|
|
|
|
AC_DEFUN([gl_PROG_AR_RANLIB],
|
|
|
|
[
|
|
|
|
dnl Minix 3 comes with two toolchains: The Amsterdam Compiler Kit compiler
|
|
|
|
dnl as "cc", and GCC as "gcc". They have different object file formats and
|
2015-10-14 06:34:16 +00:00
|
|
|
dnl library formats. In particular, the GNU binutils programs ar and ranlib
|
2011-09-03 23:08:32 +00:00
|
|
|
dnl produce libraries that work only with gcc, not with cc.
|
|
|
|
AC_REQUIRE([AC_PROG_CC])
|
2017-03-12 07:53:02 +00:00
|
|
|
dnl The '][' hides this use from 'aclocal'.
|
|
|
|
AC_BEFORE([$0], [A][M_PROG_AR])
|
2011-09-03 23:08:32 +00:00
|
|
|
AC_CACHE_CHECK([for Minix Amsterdam compiler], [gl_cv_c_amsterdam_compiler],
|
|
|
|
[
|
|
|
|
AC_EGREP_CPP([Amsterdam],
|
|
|
|
[
|
|
|
|
#ifdef __ACK__
|
|
|
|
Amsterdam
|
|
|
|
#endif
|
|
|
|
],
|
|
|
|
[gl_cv_c_amsterdam_compiler=yes],
|
|
|
|
[gl_cv_c_amsterdam_compiler=no])
|
|
|
|
])
|
2015-10-14 06:34:16 +00:00
|
|
|
|
|
|
|
dnl Don't compete with AM_PROG_AR's decision about AR/ARFLAGS if we are not
|
|
|
|
dnl building with __ACK__.
|
|
|
|
if test $gl_cv_c_amsterdam_compiler = yes; then
|
|
|
|
if test -z "$AR"; then
|
2011-09-03 23:08:32 +00:00
|
|
|
AR='cc -c.a'
|
|
|
|
fi
|
|
|
|
if test -z "$ARFLAGS"; then
|
2015-10-14 06:34:16 +00:00
|
|
|
ARFLAGS='-o'
|
2011-09-03 23:08:32 +00:00
|
|
|
fi
|
2015-10-14 06:34:16 +00:00
|
|
|
else
|
|
|
|
dnl AM_PROG_AR was added in automake v1.11.2. AM_PROG_AR does not AC_SUBST
|
|
|
|
dnl ARFLAGS variable (it is filed into Makefile.in directly by automake
|
|
|
|
dnl script on-demand, if not specified by ./configure of course).
|
|
|
|
dnl Don't AC_REQUIRE the AM_PROG_AR otherwise the code for __ACK__ above
|
|
|
|
dnl will be ignored. Also, pay attention to call AM_PROG_AR in else block
|
|
|
|
dnl because AM_PROG_AR is written so it could re-set AR variable even for
|
|
|
|
dnl __ACK__. It may seem like its easier to avoid calling the macro here,
|
|
|
|
dnl but we need to AC_SUBST both AR/ARFLAGS (thus those must have some good
|
|
|
|
dnl default value and automake should usually know them).
|
2017-03-12 07:53:02 +00:00
|
|
|
dnl
|
|
|
|
dnl The '][' hides this use from 'aclocal'.
|
|
|
|
m4_ifdef([A][M_PROG_AR], [A][M_PROG_AR], [:])
|
2015-10-14 06:34:16 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
dnl In case the code above has not helped with setting AR/ARFLAGS, use
|
|
|
|
dnl Automake-documented default values for AR and ARFLAGS, but prefer
|
|
|
|
dnl ${host}-ar over ar (useful for cross-compiling).
|
|
|
|
AC_CHECK_TOOL([AR], [ar], [ar])
|
|
|
|
if test -z "$ARFLAGS"; then
|
|
|
|
ARFLAGS='cr'
|
2011-09-03 23:08:32 +00:00
|
|
|
fi
|
2015-10-14 06:34:16 +00:00
|
|
|
|
2011-09-03 23:08:32 +00:00
|
|
|
AC_SUBST([AR])
|
|
|
|
AC_SUBST([ARFLAGS])
|
|
|
|
if test -z "$RANLIB"; then
|
|
|
|
if test $gl_cv_c_amsterdam_compiler = yes; then
|
|
|
|
RANLIB=':'
|
|
|
|
else
|
|
|
|
dnl Use the ranlib program if it is available.
|
|
|
|
AC_PROG_RANLIB
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
AC_SUBST([RANLIB])
|
|
|
|
])
|
|
|
|
|
Regenerate.
* aclocal.m4, compile, depcomp, lib/Makefile.in, lib/dummy.c:
* lib/gnulib.mk, m4/00gnulib.m4, m4/gnulib-cache.m4:
* m4/gnulib-common.m4, m4/gnulib-comp.m4, m4/gnulib-tool.m4, missing:
New files, generated automatically, with 'make sync-from-gnulib'
followed by 'make'.
* configure, lisp/dired.el, src/config.in: Regenerate.
2011-01-08 21:19:44 +00:00
|
|
|
# AC_C_RESTRICT
|
2020-12-24 15:48:40 +00:00
|
|
|
# This definition is copied from post-2.70 Autoconf and overrides the
|
|
|
|
# AC_C_RESTRICT macro from autoconf 2.60..2.70.
|
|
|
|
m4_version_prereq([2.70.1], [], [
|
Regenerate.
* aclocal.m4, compile, depcomp, lib/Makefile.in, lib/dummy.c:
* lib/gnulib.mk, m4/00gnulib.m4, m4/gnulib-cache.m4:
* m4/gnulib-common.m4, m4/gnulib-comp.m4, m4/gnulib-tool.m4, missing:
New files, generated automatically, with 'make sync-from-gnulib'
followed by 'make'.
* configure, lisp/dired.el, src/config.in: Regenerate.
2011-01-08 21:19:44 +00:00
|
|
|
AC_DEFUN([AC_C_RESTRICT],
|
|
|
|
[AC_CACHE_CHECK([for C/C++ restrict keyword], [ac_cv_c_restrict],
|
|
|
|
[ac_cv_c_restrict=no
|
2020-12-24 15:48:40 +00:00
|
|
|
# Put '__restrict__' first, to avoid problems with glibc and non-GCC; see:
|
|
|
|
# https://lists.gnu.org/archive/html/bug-autoconf/2016-02/msg00006.html
|
|
|
|
# Put 'restrict' last, because C++ lacks it.
|
|
|
|
for ac_kw in __restrict__ __restrict _Restrict restrict; do
|
2014-09-02 19:17:23 +00:00
|
|
|
AC_COMPILE_IFELSE(
|
|
|
|
[AC_LANG_PROGRAM(
|
Update from Gnulib
This incorporates:
2018-06-29 regex: glibc does not use intprops.h
2018-06-28 regex: port to recently proposed glibc regex merge
2018-06-25 Continue to use spaces for indentation, not tabs
2018-06-25 manywarnings: Don't enable -Wjump-misses-init by default
2018-06-25 acl-internal.h: remove _GL_ATTRIBUTE_CONST on void function
2018-06-24 manywarnings: accommodate GCC 9: remove -Wchkp and -Wabi
2018-06-24 maint: clarify comments about sticky EOF
2018-06-24 af_alg: avoid hangs when reading from streams
2018-06-17 crypto: use byteswap
2018-06-17 getloadavg: Return 0 on MS-Windows without Cygwi
2018-06-17 getloadavg: Allow building on MS-Windows without Cygwin
* build-aux/config.guess, build-aux/config.sub, doc/misc/texinfo.tex:
* lib/acl-internal.c, lib/acl-internal.h, lib/get-permissions.c:
* lib/getloadavg.c, lib/gettimeofday.c, lib/md5.c, lib/pselect.c:
* lib/set-permissions.c, lib/sha1.c, lib/sha256.c, lib/sha512.c:
* lib/time.in.h, m4/getloadavg.m4, m4/gnulib-common.m4:
* m4/manywarnings.m4, m4/pthread_sigmask.m4, m4/vararrays.m4:
Copy from Gnulib.
2018-06-30 00:31:04 +00:00
|
|
|
[[typedef int *int_ptr;
|
|
|
|
int foo (int_ptr $ac_kw ip) { return ip[0]; }
|
|
|
|
int bar (int [$ac_kw]); /* Catch GCC bug 14050. */
|
|
|
|
int bar (int ip[$ac_kw]) { return ip[0]; }
|
|
|
|
]],
|
|
|
|
[[int s[1];
|
|
|
|
int *$ac_kw t = s;
|
|
|
|
t[0] = 0;
|
|
|
|
return foo (t) + bar (t);
|
|
|
|
]])],
|
Regenerate.
* aclocal.m4, compile, depcomp, lib/Makefile.in, lib/dummy.c:
* lib/gnulib.mk, m4/00gnulib.m4, m4/gnulib-cache.m4:
* m4/gnulib-common.m4, m4/gnulib-comp.m4, m4/gnulib-tool.m4, missing:
New files, generated automatically, with 'make sync-from-gnulib'
followed by 'make'.
* configure, lisp/dired.el, src/config.in: Regenerate.
2011-01-08 21:19:44 +00:00
|
|
|
[ac_cv_c_restrict=$ac_kw])
|
|
|
|
test "$ac_cv_c_restrict" != no && break
|
|
|
|
done
|
|
|
|
])
|
|
|
|
AH_VERBATIM([restrict],
|
|
|
|
[/* Define to the equivalent of the C99 'restrict' keyword, or to
|
|
|
|
nothing if this is not supported. Do not define if restrict is
|
2020-12-24 15:48:40 +00:00
|
|
|
supported only directly. */
|
Regenerate.
* aclocal.m4, compile, depcomp, lib/Makefile.in, lib/dummy.c:
* lib/gnulib.mk, m4/00gnulib.m4, m4/gnulib-cache.m4:
* m4/gnulib-common.m4, m4/gnulib-comp.m4, m4/gnulib-tool.m4, missing:
New files, generated automatically, with 'make sync-from-gnulib'
followed by 'make'.
* configure, lisp/dired.el, src/config.in: Regenerate.
2011-01-08 21:19:44 +00:00
|
|
|
#undef restrict
|
Update from gnulib
This incorporates:
2019-12-23 mktime, nstrftime: tweak division performance
2019-12-22 count-leading-zeros: assume 'long long'
2019-12-22 count-one-bits: assume 'long long'
2019-12-22 count-trailing-zeros: assume 'long long'
2019-12-12 inttypes-incomplete: assume 'long long'
2019-12-22 malloca: assume 'long long'
2019-12-22 stdint: assume 'long long'
2019-12-22 strtoll, strtoimax, strtoumax: assume 'long long'
2019-12-22 prefer lib_SOURCES to unconditional AC_LIBOBJ
2019-12-19 nstrftime: avoid a shadowing warning
2019-12-18 improve port of AC_C_RESTRICT to Oracle C++
2019-12-12 stdalign: port to xlclang 16.01
2019-12-11 stddef, unistd: fix compilation error in C++ mode on MSVC
2019-12-08 fix compilation errors in C++ mode on Haiku
2019-12-08 fix compilation errors in 32-bit C++ mode on HP-UX 11/ia64
2019-12-08 fix compilation error in C++ mode on OpenBSD
* build-aux/config.guess, doc/misc/texinfo.tex:
* lib/count-leading-zeros.h, lib/count-one-bits.h:
* lib/count-trailing-zeros.h, lib/inttypes.in.h, lib/malloca.h:
* lib/mktime.c, lib/nstrftime.c, lib/signal.in.h, lib/stdalign.in.h:
* lib/stddef.in.h, lib/stdint.in.h, lib/stdio.in.h, lib/stdlib.in.h:
* lib/strtoimax.c, lib/unistd.in.h, m4/gnulib-common.m4:
* m4/inttypes.m4, m4/largefile.m4, m4/malloca.m4, m4/strtoimax.m4:
* m4/strtoll.m4:
Copy from Gnulib. Also, change copyright notices in some other
Gnulib-copied files to exactly match Gnulib, as Gnulib updated
them in a trivially different way.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
2020-01-01 03:11:22 +00:00
|
|
|
/* Work around a bug in older versions of Sun C++, which did not
|
|
|
|
#define __restrict__ or support _Restrict or __restrict__
|
|
|
|
even though the corresponding Sun C compiler ended up with
|
|
|
|
"#define restrict _Restrict" or "#define restrict __restrict__"
|
|
|
|
in the previous line. This workaround can be removed once
|
|
|
|
we assume Oracle Developer Studio 12.5 (2016) or later. */
|
|
|
|
#if defined __SUNPRO_CC && !defined __RESTRICT && !defined __restrict__
|
Regenerate.
* aclocal.m4, compile, depcomp, lib/Makefile.in, lib/dummy.c:
* lib/gnulib.mk, m4/00gnulib.m4, m4/gnulib-cache.m4:
* m4/gnulib-common.m4, m4/gnulib-comp.m4, m4/gnulib-tool.m4, missing:
New files, generated automatically, with 'make sync-from-gnulib'
followed by 'make'.
* configure, lisp/dired.el, src/config.in: Regenerate.
2011-01-08 21:19:44 +00:00
|
|
|
# define _Restrict
|
2014-09-02 19:17:23 +00:00
|
|
|
# define __restrict__
|
Regenerate.
* aclocal.m4, compile, depcomp, lib/Makefile.in, lib/dummy.c:
* lib/gnulib.mk, m4/00gnulib.m4, m4/gnulib-cache.m4:
* m4/gnulib-common.m4, m4/gnulib-comp.m4, m4/gnulib-tool.m4, missing:
New files, generated automatically, with 'make sync-from-gnulib'
followed by 'make'.
* configure, lisp/dired.el, src/config.in: Regenerate.
2011-01-08 21:19:44 +00:00
|
|
|
#endif])
|
|
|
|
case $ac_cv_c_restrict in
|
|
|
|
restrict) ;;
|
|
|
|
no) AC_DEFINE([restrict], []) ;;
|
|
|
|
*) AC_DEFINE_UNQUOTED([restrict], [$ac_cv_c_restrict]) ;;
|
|
|
|
esac
|
2014-09-02 19:17:23 +00:00
|
|
|
])# AC_C_RESTRICT
|
2020-12-24 15:48:40 +00:00
|
|
|
])
|
Regenerate.
* aclocal.m4, compile, depcomp, lib/Makefile.in, lib/dummy.c:
* lib/gnulib.mk, m4/00gnulib.m4, m4/gnulib-cache.m4:
* m4/gnulib-common.m4, m4/gnulib-comp.m4, m4/gnulib-tool.m4, missing:
New files, generated automatically, with 'make sync-from-gnulib'
followed by 'make'.
* configure, lisp/dired.el, src/config.in: Regenerate.
2011-01-08 21:19:44 +00:00
|
|
|
|
|
|
|
# gl_BIGENDIAN
|
|
|
|
# is like AC_C_BIGENDIAN, except that it can be AC_REQUIREd.
|
|
|
|
# Note that AC_REQUIRE([AC_C_BIGENDIAN]) does not work reliably because some
|
|
|
|
# macros invoke AC_C_BIGENDIAN with arguments.
|
|
|
|
AC_DEFUN([gl_BIGENDIAN],
|
|
|
|
[
|
|
|
|
AC_C_BIGENDIAN
|
|
|
|
])
|
|
|
|
|
2020-12-24 15:48:40 +00:00
|
|
|
# A temporary file descriptor.
|
|
|
|
# Must be less than 10, because dash 0.5.8 does not support redirections
|
|
|
|
# with multi-digit file descriptors.
|
|
|
|
m4_define([GL_TMP_FD], 9)
|
|
|
|
|
Update from Gnulib
This incorporates:
2020-07-30 work around some Oracle Studio attribute bugs
2020-07-29 fsusage, regex, stat-size: remove Cray support
2020-07-26 inttypes: remove support for AIX 4
2020-07-26 gettimeofday: remove workaround for Mac OS X 10.0
2020-07-26 don't require gl_LOCALTIME_BUFFER_DEFAULTS
2020-07-26 alloca: remove Cray-2 and Cray Y-MP support
2020-07-26 libgmp: remove dependency on havelib
2020-07-26 libgmp: remove HAVE_GMP, LIB_GMP
2020-07-25 multiarch: prepare for x86_64+arm64 universal in macOS 11
2020-07-25 sigprocmask: small autoconf macro improvement
2020-07-25 small autoconf macro improvements
2020-07-24 timespec: remove dependence on ‘verify’
2020-07-24 optimize a few more three-valued comparisons
2020-07-24 fix _GL_CMP parenthesization typo
2020-07-23 optimize three-valued comparison between integers
2020-07-24 doc: update for Mac OS X 10.13
2020-07-23 fchmodat, lchmod: use /proc on Cygwin
2020-07-21 inttypes: fix PRI*PTR and SCN*PTR on 64-bit native Windows
2020-07-12 libgmp: avoid warning when --without-libgmp is used
2020-07-12 libgmp: link to the correct shared library
* lib/mini-gmp-gnulib.c: Ignore -Wsuggest-attribute=malloc only for
* build-aux/config.guess, build-aux/config.sub:
* build-aux/install-sh, doc/misc/texinfo.tex, lib/c-strcasecmp.c:
* lib/c-strncasecmp.c, lib/fchmodat.c, lib/fsusage.c:
* lib/gettimeofday.c, lib/inttypes.in.h, lib/lchmod.c:
* lib/mini-gmp-gnulib.c, lib/nstrftime.c, lib/regex.h, lib/timespec.h:
* m4/alloca.m4, m4/getgroups.m4, m4/gettimeofday.m4:
* m4/gnulib-common.m4, m4/inttypes.m4, m4/libgmp.m4, m4/mktime.m4:
* m4/multiarch.m4:
Copy from Gnulib.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* src/Makefile.in, test/Makefile.in (LIBGMP):
Rename from LIB_GMP for compatibility with Gnulib.
All uses changed.
2020-07-30 20:58:58 +00:00
|
|
|
# gl_SILENT(command)
|
|
|
|
# executes command, but without the normal configure output.
|
2020-12-24 15:48:40 +00:00
|
|
|
# This is useful when you want to invoke AC_CACHE_CHECK (or AC_CHECK_FUNC etc.)
|
|
|
|
# inside another AC_CACHE_CHECK.
|
Update from Gnulib
This incorporates:
2020-07-30 work around some Oracle Studio attribute bugs
2020-07-29 fsusage, regex, stat-size: remove Cray support
2020-07-26 inttypes: remove support for AIX 4
2020-07-26 gettimeofday: remove workaround for Mac OS X 10.0
2020-07-26 don't require gl_LOCALTIME_BUFFER_DEFAULTS
2020-07-26 alloca: remove Cray-2 and Cray Y-MP support
2020-07-26 libgmp: remove dependency on havelib
2020-07-26 libgmp: remove HAVE_GMP, LIB_GMP
2020-07-25 multiarch: prepare for x86_64+arm64 universal in macOS 11
2020-07-25 sigprocmask: small autoconf macro improvement
2020-07-25 small autoconf macro improvements
2020-07-24 timespec: remove dependence on ‘verify’
2020-07-24 optimize a few more three-valued comparisons
2020-07-24 fix _GL_CMP parenthesization typo
2020-07-23 optimize three-valued comparison between integers
2020-07-24 doc: update for Mac OS X 10.13
2020-07-23 fchmodat, lchmod: use /proc on Cygwin
2020-07-21 inttypes: fix PRI*PTR and SCN*PTR on 64-bit native Windows
2020-07-12 libgmp: avoid warning when --without-libgmp is used
2020-07-12 libgmp: link to the correct shared library
* lib/mini-gmp-gnulib.c: Ignore -Wsuggest-attribute=malloc only for
* build-aux/config.guess, build-aux/config.sub:
* build-aux/install-sh, doc/misc/texinfo.tex, lib/c-strcasecmp.c:
* lib/c-strncasecmp.c, lib/fchmodat.c, lib/fsusage.c:
* lib/gettimeofday.c, lib/inttypes.in.h, lib/lchmod.c:
* lib/mini-gmp-gnulib.c, lib/nstrftime.c, lib/regex.h, lib/timespec.h:
* m4/alloca.m4, m4/getgroups.m4, m4/gettimeofday.m4:
* m4/gnulib-common.m4, m4/inttypes.m4, m4/libgmp.m4, m4/mktime.m4:
* m4/multiarch.m4:
Copy from Gnulib.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* src/Makefile.in, test/Makefile.in (LIBGMP):
Rename from LIB_GMP for compatibility with Gnulib.
All uses changed.
2020-07-30 20:58:58 +00:00
|
|
|
AC_DEFUN([gl_SILENT],
|
|
|
|
[
|
2020-12-24 15:48:40 +00:00
|
|
|
exec GL_TMP_FD>&AS_MESSAGE_FD AS_MESSAGE_FD>/dev/null
|
|
|
|
$1
|
|
|
|
exec AS_MESSAGE_FD>&GL_TMP_FD GL_TMP_FD>&-
|
Update from Gnulib
This incorporates:
2020-07-30 work around some Oracle Studio attribute bugs
2020-07-29 fsusage, regex, stat-size: remove Cray support
2020-07-26 inttypes: remove support for AIX 4
2020-07-26 gettimeofday: remove workaround for Mac OS X 10.0
2020-07-26 don't require gl_LOCALTIME_BUFFER_DEFAULTS
2020-07-26 alloca: remove Cray-2 and Cray Y-MP support
2020-07-26 libgmp: remove dependency on havelib
2020-07-26 libgmp: remove HAVE_GMP, LIB_GMP
2020-07-25 multiarch: prepare for x86_64+arm64 universal in macOS 11
2020-07-25 sigprocmask: small autoconf macro improvement
2020-07-25 small autoconf macro improvements
2020-07-24 timespec: remove dependence on ‘verify’
2020-07-24 optimize a few more three-valued comparisons
2020-07-24 fix _GL_CMP parenthesization typo
2020-07-23 optimize three-valued comparison between integers
2020-07-24 doc: update for Mac OS X 10.13
2020-07-23 fchmodat, lchmod: use /proc on Cygwin
2020-07-21 inttypes: fix PRI*PTR and SCN*PTR on 64-bit native Windows
2020-07-12 libgmp: avoid warning when --without-libgmp is used
2020-07-12 libgmp: link to the correct shared library
* lib/mini-gmp-gnulib.c: Ignore -Wsuggest-attribute=malloc only for
* build-aux/config.guess, build-aux/config.sub:
* build-aux/install-sh, doc/misc/texinfo.tex, lib/c-strcasecmp.c:
* lib/c-strncasecmp.c, lib/fchmodat.c, lib/fsusage.c:
* lib/gettimeofday.c, lib/inttypes.in.h, lib/lchmod.c:
* lib/mini-gmp-gnulib.c, lib/nstrftime.c, lib/regex.h, lib/timespec.h:
* m4/alloca.m4, m4/getgroups.m4, m4/gettimeofday.m4:
* m4/gnulib-common.m4, m4/inttypes.m4, m4/libgmp.m4, m4/mktime.m4:
* m4/multiarch.m4:
Copy from Gnulib.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* src/Makefile.in, test/Makefile.in (LIBGMP):
Rename from LIB_GMP for compatibility with Gnulib.
All uses changed.
2020-07-30 20:58:58 +00:00
|
|
|
])
|
|
|
|
|
Regenerate.
* aclocal.m4, compile, depcomp, lib/Makefile.in, lib/dummy.c:
* lib/gnulib.mk, m4/00gnulib.m4, m4/gnulib-cache.m4:
* m4/gnulib-common.m4, m4/gnulib-comp.m4, m4/gnulib-tool.m4, missing:
New files, generated automatically, with 'make sync-from-gnulib'
followed by 'make'.
* configure, lisp/dired.el, src/config.in: Regenerate.
2011-01-08 21:19:44 +00:00
|
|
|
# gl_CACHE_VAL_SILENT(cache-id, command-to-set-it)
|
|
|
|
# is like AC_CACHE_VAL(cache-id, command-to-set-it), except that it does not
|
|
|
|
# output a spurious "(cached)" mark in the midst of other configure output.
|
|
|
|
# This macro should be used instead of AC_CACHE_VAL when it is not surrounded
|
|
|
|
# by an AC_MSG_CHECKING/AC_MSG_RESULT pair.
|
|
|
|
AC_DEFUN([gl_CACHE_VAL_SILENT],
|
|
|
|
[
|
2020-12-24 15:48:40 +00:00
|
|
|
gl_SILENT([
|
|
|
|
AC_CACHE_VAL([$1], [$2])
|
|
|
|
])
|
Regenerate.
* aclocal.m4, compile, depcomp, lib/Makefile.in, lib/dummy.c:
* lib/gnulib.mk, m4/00gnulib.m4, m4/gnulib-cache.m4:
* m4/gnulib-common.m4, m4/gnulib-comp.m4, m4/gnulib-tool.m4, missing:
New files, generated automatically, with 'make sync-from-gnulib'
followed by 'make'.
* configure, lisp/dired.el, src/config.in: Regenerate.
2011-01-08 21:19:44 +00:00
|
|
|
])
|
2014-01-11 07:01:30 +00:00
|
|
|
|
Update from Gnulib
This incorporates:
2020-08-16 time_rz: remove unused functions
2020-08-16 time_rz: fix issues with mktime_z failures
2020-08-16 nstrftime: Guide inlining also on clang
2020-08-16 intprops: Avoid bogus warning on clang
2020-08-16 libc-config: Enable __REDIRECT macro also on clang
2020-08-16 regex: Use initializer shorthand syntax also with clang
2020-08-16 regex: Use space optimization also with clang
2020-08-16 Use _Static_assert and static_assert when present on clang
2020-08-16 Use 'throw ()' for optimization in C++ mode also on clang
2020-08-16 stdio: Don't break attribute 'scanf' on clang
2020-08-16 Fix "warning: 'format' attribute ...: rpl_printf"
2020-08-16 Fix "warning: attribute declaration must precede definition"
2020-08-16 Fix undesired warnings
2020-08-16 Don't use Autoconf quadrigraphsxo
2020-08-16 Fix quoting of AC_LANG_PROGRAM arguments
2020-08-16 Assume autoconf >= 2.64
2020-08-15 nstrftime: be more predictable about errno
2020-08-15 canonicalize: Fix autoconf test on MSVC/clang
2020-08-15 Support compiling without -loldnames on native Windows
2020-08-14 mktime, mktime-internal: Remove obsolete code
2020-08-14 Assume tzset exists
* lib/c++defs.h, lib/canonicalize-lgpl.c, lib/cdefs.h, lib/dup2.c:
* lib/fcntl.in.h, lib/getopt-cdefs.in.h, lib/intprops.h, lib/md5.h:
* lib/mktime.c, lib/nstrftime.c, lib/open.c, lib/regcomp.c:
* lib/regex_internal.h, lib/stdio.in.h, lib/stdlib.in.h:
* lib/strftime.h, lib/string.in.h, lib/sys_select.in.h:
* lib/sys_stat.in.h, lib/sys_time.in.h, lib/time.in.h, lib/time_rz.c:
* lib/unistd.in.h, lib/verify.h, m4/00gnulib.m4:
* m4/absolute-header.m4, m4/alloca.m4, m4/canonicalize.m4, m4/dup2.m4:
* m4/fchmodat.m4, m4/fcntl.m4, m4/fdopendir.m4, m4/fpending.m4:
* m4/futimens.m4, m4/getdtablesize.m4, m4/getloadavg.m4:
* m4/gnulib-common.m4, m4/include_next.m4, m4/largefile.m4:
* m4/manywarnings.m4, m4/mktime.m4, m4/nstrftime.m4, m4/open-slash.m4:
* m4/pselect.m4, m4/pthread_sigmask.m4, m4/time_h.m4, m4/utimens.m4:
* m4/utimensat.m4, m4/utimes.m4, m4/warnings.m4:
Copy from Gnulib.
* lib/gnulib.mk.in: Regenerate.
2020-08-16 21:22:56 +00:00
|
|
|
dnl Expands to some code for use in .c programs that, on native Windows, defines
|
|
|
|
dnl the Microsoft deprecated alias function names to the underscore-prefixed
|
|
|
|
dnl actual function names. With this macro, these function names are available
|
|
|
|
dnl without linking with '-loldnames' and without generating warnings.
|
|
|
|
dnl Usage: Use it after all system header files are included.
|
|
|
|
dnl #include <...>
|
|
|
|
dnl #include <...>
|
|
|
|
dnl ]GL_MDA_DEFINES[
|
|
|
|
dnl ...
|
|
|
|
AC_DEFUN([GL_MDA_DEFINES],[
|
|
|
|
AC_REQUIRE([_GL_MDA_DEFINES])
|
|
|
|
[$gl_mda_defines]
|
|
|
|
])
|
|
|
|
AC_DEFUN([_GL_MDA_DEFINES],
|
|
|
|
[gl_mda_defines='
|
|
|
|
#if defined _WIN32 && !defined __CYGWIN__
|
|
|
|
#define access _access
|
|
|
|
#define chdir _chdir
|
|
|
|
#define chmod _chmod
|
|
|
|
#define close _close
|
|
|
|
#define creat _creat
|
|
|
|
#define dup _dup
|
|
|
|
#define dup2 _dup2
|
|
|
|
#define ecvt _ecvt
|
|
|
|
#define execl _execl
|
|
|
|
#define execle _execle
|
|
|
|
#define execlp _execlp
|
|
|
|
#define execv _execv
|
|
|
|
#define execve _execve
|
|
|
|
#define execvp _execvp
|
|
|
|
#define execvpe _execvpe
|
|
|
|
#define fcloseall _fcloseall
|
|
|
|
#define fcvt _fcvt
|
|
|
|
#define fdopen _fdopen
|
|
|
|
#define fileno _fileno
|
|
|
|
#define gcvt _gcvt
|
|
|
|
#define getcwd _getcwd
|
|
|
|
#define getpid _getpid
|
|
|
|
#define getw _getw
|
|
|
|
#define isatty _isatty
|
|
|
|
#define j0 _j0
|
|
|
|
#define j1 _j1
|
|
|
|
#define jn _jn
|
|
|
|
#define lfind _lfind
|
|
|
|
#define lsearch _lsearch
|
|
|
|
#define lseek _lseek
|
|
|
|
#define memccpy _memccpy
|
|
|
|
#define mkdir _mkdir
|
|
|
|
#define mktemp _mktemp
|
|
|
|
#define open _open
|
|
|
|
#define putenv _putenv
|
|
|
|
#define putw _putw
|
|
|
|
#define read _read
|
|
|
|
#define rmdir _rmdir
|
|
|
|
#define strdup _strdup
|
|
|
|
#define swab _swab
|
|
|
|
#define tempnam _tempnam
|
|
|
|
#define tzset _tzset
|
|
|
|
#define umask _umask
|
|
|
|
#define unlink _unlink
|
|
|
|
#define utime _utime
|
|
|
|
#define wcsdup _wcsdup
|
|
|
|
#define write _write
|
|
|
|
#define y0 _y0
|
|
|
|
#define y1 _y1
|
|
|
|
#define yn _yn
|
|
|
|
#endif
|
|
|
|
'
|
|
|
|
])
|