summaryrefslogtreecommitdiff
path: root/gl/m4
diff options
context:
space:
mode:
Diffstat (limited to 'gl/m4')
-rw-r--r--gl/m4/clock_time.m431
-rw-r--r--gl/m4/frexp.m410
-rw-r--r--gl/m4/gettime.m413
-rw-r--r--gl/m4/gnulib-cache.m46
-rw-r--r--gl/m4/gnulib-comp.m419
-rw-r--r--gl/m4/intl.m48
-rw-r--r--gl/m4/po.m48
-rw-r--r--gl/m4/putenv.m44
-rw-r--r--gl/m4/stdalign.m45
-rw-r--r--gl/m4/sys_types_h.m44
-rw-r--r--gl/m4/timer_time.m439
-rw-r--r--gl/m4/timespec.m411
12 files changed, 25 insertions, 133 deletions
diff --git a/gl/m4/clock_time.m4 b/gl/m4/clock_time.m4
deleted file mode 100644
index 6597fb63a0..0000000000
--- a/gl/m4/clock_time.m4
+++ /dev/null
@@ -1,31 +0,0 @@
-# clock_time.m4 serial 10
-dnl Copyright (C) 2002-2006, 2009-2013 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.
-
-# Check for clock_gettime and clock_settime, and set LIB_CLOCK_GETTIME.
-# For a program named, say foo, you should add a line like the following
-# in the corresponding Makefile.am file:
-# foo_LDADD = $(LDADD) $(LIB_CLOCK_GETTIME)
-
-AC_DEFUN([gl_CLOCK_TIME],
-[
- dnl Persuade glibc and Solaris <time.h> to declare these functions.
- AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
-
- # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
- # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
-
- # Save and restore LIBS so e.g., -lrt, isn't added to it. Otherwise, *all*
- # programs in the package would end up linked with that potentially-shared
- # library, inducing unnecessary run-time overhead.
- LIB_CLOCK_GETTIME=
- AC_SUBST([LIB_CLOCK_GETTIME])
- gl_saved_libs=$LIBS
- AC_SEARCH_LIBS([clock_gettime], [rt posix4],
- [test "$ac_cv_search_clock_gettime" = "none required" ||
- LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime])
- AC_CHECK_FUNCS([clock_gettime clock_settime])
- LIBS=$gl_saved_libs
-])
diff --git a/gl/m4/frexp.m4 b/gl/m4/frexp.m4
index 39097923e4..2eb98a1dcd 100644
--- a/gl/m4/frexp.m4
+++ b/gl/m4/frexp.m4
@@ -1,4 +1,4 @@
-# frexp.m4 serial 14
+# frexp.m4 serial 15
dnl Copyright (C) 2007-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -93,7 +93,7 @@ AC_DEFUN([gl_FUNC_FREXP_WORKS],
[
AC_REQUIRE([AC_PROG_CC])
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
- AC_CHECK_FUNCS_ONCE([alarm])
+ AC_CHECK_DECLS_ONCE([alarm])
AC_CACHE_CHECK([whether frexp works], [gl_cv_func_frexp_works],
[
AC_RUN_IFELSE(
@@ -101,7 +101,8 @@ AC_DEFUN([gl_FUNC_FREXP_WORKS],
#include <float.h>
#include <math.h>
#include <string.h>
-#if HAVE_ALARM
+#if HAVE_DECL_ALARM
+# include <signal.h>
# include <unistd.h>
#endif
/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
@@ -124,9 +125,10 @@ int main()
int i;
volatile double x;
double zero = 0.0;
-#if HAVE_ALARM
+#if HAVE_DECL_ALARM
/* NeXTstep 3.3 frexp() runs into an endless loop when called on an infinite
number. Let the test fail in this case. */
+ signal (SIGALRM, SIG_DFL);
alarm (5);
#endif
/* Test on denormalized numbers. */
diff --git a/gl/m4/gettime.m4 b/gl/m4/gettime.m4
deleted file mode 100644
index dc100de5e4..0000000000
--- a/gl/m4/gettime.m4
+++ /dev/null
@@ -1,13 +0,0 @@
-# gettime.m4 serial 8
-dnl Copyright (C) 2002, 2004-2006, 2009-2013 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.
-
-AC_DEFUN([gl_GETTIME],
-[
- dnl Prerequisites of lib/gettime.c.
- AC_REQUIRE([gl_CLOCK_TIME])
- AC_REQUIRE([gl_TIMESPEC])
- AC_CHECK_FUNCS_ONCE([gettimeofday nanotime])
-])
diff --git a/gl/m4/gnulib-cache.m4 b/gl/m4/gnulib-cache.m4
index f73ef221f2..02ab1c2443 100644
--- a/gl/m4/gnulib-cache.m4
+++ b/gl/m4/gnulib-cache.m4
@@ -27,7 +27,7 @@
# Specification in the form of a command-line invocation:
-# gnulib-tool --import --dir=. --local-dir=gl/override --lib=libgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=gl/tests --aux-dir=build-aux --with-tests --avoid=alignof-tests --avoid=lock-tests --avoid=lseek-tests --no-conditional-dependencies --libtool --macro-prefix=gl --no-vc-files accept alloca alphasort argp base64 bind byteswap c-ctype close connect error extensions func gendocs getaddrinfo getpass getsubopt gettext gettime hash-pjw-bare havelib iconv iconv_open-utf inet_ntop inet_pton lib-msvc-compat lib-symbol-versions listen maintainer-makefile manywarnings memmem-simple minmax netdb netinet_in pmccabe2html progname read-file recv recvfrom scandir select send sendto servent setsockopt shutdown snprintf socket sockets socklen stdint strcase strndup strtok_r strverscmp sys_socket sys_stat time_r timer-time timespec u64 unistd valgrind-tests vasprintf version-etc version-etc-fsf vfprintf-posix vprintf-posix vsnprintf warnings
+# gnulib-tool --import --dir=. --local-dir=gl/override --lib=libgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=gl/tests --aux-dir=build-aux --with-tests --avoid=alignof-tests --avoid=lock-tests --avoid=lseek-tests --no-conditional-dependencies --libtool --macro-prefix=gl --no-vc-files accept alloca alphasort argp base64 bind byteswap c-ctype close connect error extensions func gendocs getaddrinfo getpass getsubopt gettext gettimeofday hash-pjw-bare havelib iconv iconv_open-utf inet_ntop inet_pton lib-msvc-compat lib-symbol-versions listen maintainer-makefile manywarnings memmem-simple minmax netdb netinet_in pmccabe2html progname read-file recv recvfrom scandir select send sendto servent setsockopt shutdown snprintf socket sockets socklen stdint strcase strndup strtok_r strverscmp sys_socket sys_stat time_r u64 unistd valgrind-tests vasprintf version-etc version-etc-fsf vfprintf-posix vprintf-posix vsnprintf warnings
# Specification in the form of a few gnulib-tool.m4 macro invocations:
gl_LOCAL_DIR([gl/override])
@@ -50,7 +50,7 @@ gl_MODULES([
getpass
getsubopt
gettext
- gettime
+ gettimeofday
hash-pjw-bare
havelib
iconv
@@ -90,8 +90,6 @@ gl_MODULES([
sys_socket
sys_stat
time_r
- timer-time
- timespec
u64
unistd
valgrind-tests
diff --git a/gl/m4/gnulib-comp.m4 b/gl/m4/gnulib-comp.m4
index c92e5ac104..4d6a3a42d4 100644
--- a/gl/m4/gnulib-comp.m4
+++ b/gl/m4/gnulib-comp.m4
@@ -61,7 +61,6 @@ AC_DEFUN([gl_EARLY],
# Code from module c-ctype-tests:
# Code from module c-strcase:
# Code from module c-strcase-tests:
- # Code from module clock-time:
# Code from module close:
# Code from module close-tests:
# Code from module closedir:
@@ -138,7 +137,6 @@ AC_DEFUN([gl_EARLY],
# Code from module getsubopt:
# Code from module gettext:
# Code from module gettext-h:
- # Code from module gettime:
# Code from module gettimeofday:
# Code from module gettimeofday-tests:
# Code from module gnumakefile:
@@ -338,8 +336,6 @@ AC_DEFUN([gl_EARLY],
# Code from module time:
# Code from module time-tests:
# Code from module time_r:
- # Code from module timer-time:
- # Code from module timespec:
# Code from module u64:
# Code from module u64-tests:
# Code from module unistd:
@@ -420,7 +416,6 @@ AC_SUBST([LTALLOCA])
fi
gl_SYS_SOCKET_MODULE_INDICATOR([bind])
gl_BYTESWAP
- gl_CLOCK_TIME
gl_FUNC_CLOSE
if test $REPLACE_CLOSE = 1; then
AC_LIBOBJ([close])
@@ -564,7 +559,6 @@ AC_SUBST([LTALLOCA])
AM_GNU_GETTEXT_VERSION([0.18.1])
AC_SUBST([LIBINTL])
AC_SUBST([LTLIBINTL])
- gl_GETTIME
gl_FUNC_GETTIMEOFDAY
if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
AC_LIBOBJ([gettimeofday])
@@ -862,7 +856,6 @@ AC_SUBST([LTALLOCA])
gl_HEADER_SYS_UIO
AC_PROG_MKDIR_P
gl_SYSEXITS
- gl_THREADLIB
gl_HEADER_TIME_H
gl_TIME_R
if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then
@@ -870,8 +863,6 @@ AC_SUBST([LTALLOCA])
gl_PREREQ_TIME_R
fi
gl_TIME_MODULE_INDICATOR([time_r])
- gl_TIMER_TIME
- gl_TIMESPEC
gl_UNISTD_H
gl_LIBUNISTRING_LIBHEADER([0.9.2], [unistr.h])
gl_MODULE_INDICATOR([unistr/u8-mbtoucr])
@@ -1074,6 +1065,7 @@ changequote([, ])dnl
gl_SYS_IOCTL_H
AC_PROG_MKDIR_P
AC_CHECK_FUNCS_ONCE([shutdown])
+ gl_THREADLIB
gl_FUNC_UNSETENV
if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
AC_LIBOBJ([unsetenv])
@@ -1258,9 +1250,7 @@ AC_DEFUN([gl_FILE_LIST], [
lib/getpeername.c
lib/getsubopt.c
lib/gettext.h
- lib/gettime.c
lib/gettimeofday.c
- lib/glthread/threadlib.c
lib/hash-pjw-bare.c
lib/hash-pjw-bare.h
lib/iconv.c
@@ -1368,8 +1358,6 @@ AC_DEFUN([gl_FILE_LIST], [
lib/sysexits.in.h
lib/time.in.h
lib/time_r.c
- lib/timespec.c
- lib/timespec.h
lib/u64.c
lib/u64.h
lib/unistd.c
@@ -1400,7 +1388,6 @@ AC_DEFUN([gl_FILE_LIST], [
m4/arpa_inet_h.m4
m4/base64.m4
m4/byteswap.m4
- m4/clock_time.m4
m4/close.m4
m4/closedir.m4
m4/codeset.m4
@@ -1441,7 +1428,6 @@ AC_DEFUN([gl_FILE_LIST], [
m4/getpass.m4
m4/getsubopt.m4
m4/gettext.m4
- m4/gettime.m4
m4/gettimeofday.m4
m4/glibc2.m4
m4/glibc21.m4
@@ -1568,8 +1554,6 @@ AC_DEFUN([gl_FILE_LIST], [
m4/threadlib.m4
m4/time_h.m4
m4/time_r.m4
- m4/timer_time.m4
- m4/timespec.m4
m4/uintmax_t.m4
m4/ungetc.m4
m4/unistd_h.m4
@@ -1778,6 +1762,7 @@ AC_DEFUN([gl_FILE_LIST], [
tests=lib/getpagesize.c
tests=lib/glthread/lock.c
tests=lib/glthread/lock.h
+ tests=lib/glthread/threadlib.c
tests=lib/ignore-value.h
tests=lib/inttypes.in.h
tests=lib/ioctl.c
diff --git a/gl/m4/intl.m4 b/gl/m4/intl.m4
index b8cc79f8a3..486b5cc64e 100644
--- a/gl/m4/intl.m4
+++ b/gl/m4/intl.m4
@@ -1,4 +1,4 @@
-# intl.m4 serial 17d
+# intl.m4 serial 22 (gettext-0.18.2)
dnl Copyright (C) 1995-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -17,7 +17,7 @@ dnl Authors:
dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
dnl Bruno Haible <haible@clisp.cons.org>, 2000-2009.
-AC_PREREQ([2.53])
+AC_PREREQ([2.60])
dnl Checks for all prerequisites of the intl subdirectory,
dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS,
@@ -55,7 +55,7 @@ AC_DEFUN([AM_INTL_SUBDIR],
[AC_DEFINE([ptrdiff_t], [long],
[Define as the type of the result of subtracting two pointers, if the system doesn't define it.])
])
- AC_CHECK_HEADERS([stddef.h stdlib.h string.h])
+ AC_CHECK_HEADERS([features.h stddef.h stdlib.h string.h])
AC_CHECK_FUNCS([asprintf fwprintf newlocale putenv setenv setlocale \
snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb])
@@ -295,6 +295,6 @@ AC_DEFUN([gt_CHECK_DECL],
else
gt_value=0
fi
- AC_DEFINE_UNQUOTED([HAVE_DECL_]translit($1, [a-z], [A-Z]), [$gt_value],
+ AC_DEFINE_UNQUOTED([HAVE_DECL_]m4_translit($1, [a-z], [A-Z]), [$gt_value],
[Define to 1 if you have the declaration of '$1', and to 0 if you don't.])
])
diff --git a/gl/m4/po.m4 b/gl/m4/po.m4
index 5fde6f292e..f395723435 100644
--- a/gl/m4/po.m4
+++ b/gl/m4/po.m4
@@ -1,4 +1,4 @@
-# po.m4 serial 17c
+# po.m4 serial 20 (gettext-0.18.2)
dnl Copyright (C) 1995-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -17,7 +17,7 @@ dnl Authors:
dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
-AC_PREREQ([2.50])
+AC_PREREQ([2.60])
dnl Checks for all prerequisites of the po subdirectory.
AC_DEFUN([AM_PO_SUBDIRS],
@@ -102,7 +102,7 @@ changequote([,])dnl
case "$ac_file" in */Makefile.in)
# Adjust a relative srcdir.
ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
- ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
+ ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
# In autoconf-2.13 it is called $ac_given_srcdir.
# In autoconf-2.50 it is called $srcdir.
@@ -227,7 +227,7 @@ AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE],
changequote(,)dnl
# Adjust a relative srcdir.
ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
- ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
+ ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
# In autoconf-2.13 it is called $ac_given_srcdir.
# In autoconf-2.50 it is called $srcdir.
diff --git a/gl/m4/putenv.m4 b/gl/m4/putenv.m4
index 03ed4f97db..c33b5b5170 100644
--- a/gl/m4/putenv.m4
+++ b/gl/m4/putenv.m4
@@ -1,4 +1,4 @@
-# putenv.m4 serial 19
+# putenv.m4 serial 20
dnl Copyright (C) 2002-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -52,5 +52,5 @@ AC_DEFUN([gl_FUNC_PUTENV],
# Prerequisites of lib/putenv.c.
AC_DEFUN([gl_PREREQ_PUTENV],
[
- AC_CHECK_FUNCS([_putenv])
+ AC_CHECK_DECLS([_putenv])
])
diff --git a/gl/m4/stdalign.m4 b/gl/m4/stdalign.m4
index 3d7993dbec..a866ff670b 100644
--- a/gl/m4/stdalign.m4
+++ b/gl/m4/stdalign.m4
@@ -33,8 +33,9 @@ AC_DEFUN([gl_STDALIGN_H],
#if \
(__GNUC__ || __IBMC__ || __IBMCPP__ \
|| 0x5110 <= __SUNPRO_C || 1300 <= _MSC_VER)
- int alignas (8) alignas_int = 1;
- char test_alignas[_Alignof (alignas_int) == 8 ? 1 : -1];
+ struct alignas_test { char c; char alignas (8) alignas_8; };
+ char test_alignas[offsetof (struct alignas_test, alignas_8) == 8
+ ? 1 : -1];
#endif
]])],
[gl_cv_header_working_stdalign_h=yes],
diff --git a/gl/m4/sys_types_h.m4 b/gl/m4/sys_types_h.m4
index 6132727f87..d15c1b3709 100644
--- a/gl/m4/sys_types_h.m4
+++ b/gl/m4/sys_types_h.m4
@@ -1,10 +1,10 @@
-# sys_types_h.m4 serial 4
+# sys_types_h.m4 serial 5
dnl Copyright (C) 2011-2013 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.
-AC_DEFUN([gl_SYS_TYPES_H],
+AC_DEFUN_ONCE([gl_SYS_TYPES_H],
[
AC_REQUIRE([gl_SYS_TYPES_H_DEFAULTS])
gl_NEXT_HEADERS([sys/types.h])
diff --git a/gl/m4/timer_time.m4 b/gl/m4/timer_time.m4
deleted file mode 100644
index ea018f9a01..0000000000
--- a/gl/m4/timer_time.m4
+++ /dev/null
@@ -1,39 +0,0 @@
-# timer_time.m4 serial 2
-dnl Copyright (C) 2011-2013 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.
-
-# Check for timer_settime, and set LIB_TIMER_TIME.
-
-AC_DEFUN([gl_TIMER_TIME],
-[
- dnl Based on clock_time.m4. See details there.
-
- AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
- AC_REQUIRE([gl_THREADLIB])
-
- LIB_TIMER_TIME=
- AC_SUBST([LIB_TIMER_TIME])
- gl_saved_libs=$LIBS
- AC_SEARCH_LIBS([timer_settime], [rt posix4],
- [test "$ac_cv_search_timer_settime" = "none required" ||
- LIB_TIMER_TIME=$ac_cv_search_timer_settime])
- dnl GLIBC uses threads to emulate posix timers when kernel support
- dnl is not available (like Linux < 2.6 or when used with kFreeBSD)
- dnl Now the pthread lib is linked automatically in the normal case,
- dnl but when linking statically, it needs to be explicitly specified.
- AC_EGREP_CPP([Thread],
- [
-#include <features.h>
-#ifdef __GNU_LIBRARY__
- #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || (__GLIBC__ > 2)) \
- && !defined __UCLIBC__
- Thread emulation available
- #endif
-#endif
- ],
- [LIB_TIMER_TIME="$LIB_TIMER_TIME $LIBMULTITHREAD"])
- AC_CHECK_FUNCS([timer_settime])
- LIBS=$gl_saved_libs
-])
diff --git a/gl/m4/timespec.m4 b/gl/m4/timespec.m4
deleted file mode 100644
index 399404b59b..0000000000
--- a/gl/m4/timespec.m4
+++ /dev/null
@@ -1,11 +0,0 @@
-#serial 15
-
-# Copyright (C) 2000-2001, 2003-2007, 2009-2013 Free Software Foundation, Inc.
-
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-dnl From Jim Meyering
-
-AC_DEFUN([gl_TIMESPEC], [:])