update from gnulib; use its time_r module for localtime_r on mingw

* bootstrap (modules): Add time_r.
* gnulib/m4/time_h.m4: New file.
* gnulib/m4/time_r.m4: New file.
* gnulib/lib/time_r.c: New file.
* gnulib/tests/test-time.c: New file.
* gnulib/lib/time.in.h: New file.
* gnulib/lib/Makefile.am: Update.
* gnulib/lib/fseeko.c: Likewise.
* gnulib/lib/lstat.c: Likewise.
* gnulib/lib/netdb.in.h: Likewise.
* gnulib/lib/stdint.in.h: Likewise.
* gnulib/lib/stdlib.in.h: Likewise.
* gnulib/lib/sys_select.in.h: Likewise.
* gnulib/lib/sys_stat.in.h: Likewise.
* gnulib/lib/sys_time.in.h: Likewise.
* gnulib/lib/unistd.in.h: Likewise.
* gnulib/lib/wchar.in.h: Likewise.
* gnulib/m4/codeset.m4: Likewise.
* gnulib/m4/errno_h.m4: Likewise.
* gnulib/m4/extensions.m4: Likewise.
* gnulib/m4/getaddrinfo.m4: Likewise.
* gnulib/m4/gettext.m4: Likewise.
* gnulib/m4/glibc2.m4: Likewise.
* gnulib/m4/glibc21.m4: Likewise.
* gnulib/m4/gnulib-cache.m4: Likewise.
* gnulib/m4/gnulib-comp.m4: Likewise.
* gnulib/m4/iconv.m4: Likewise.
* gnulib/m4/include_next.m4: Likewise.
* gnulib/m4/intdiv0.m4: Likewise.
* gnulib/m4/intlmacosx.m4: Likewise.
* gnulib/m4/intmax.m4: Likewise.
* gnulib/m4/inttypes-pri.m4: Likewise.
* gnulib/m4/inttypes_h.m4: Likewise.
* gnulib/m4/lcmessage.m4: Likewise.
* gnulib/m4/lib-link.m4: Likewise.
* gnulib/m4/lstat.m4: Likewise.
* gnulib/m4/netdb_h.m4: Likewise.
* gnulib/m4/nls.m4: Likewise.
* gnulib/m4/po.m4: Likewise.
* gnulib/m4/printf-posix.m4: Likewise.
* gnulib/m4/printf.m4: Likewise.
* gnulib/m4/progtest.m4: Likewise.
* gnulib/m4/size_max.m4: Likewise.
* gnulib/m4/sockets.m4: Likewise.
* gnulib/m4/stdint.m4: Likewise.
* gnulib/m4/stdint_h.m4: Likewise.
* gnulib/m4/sys_ioctl_h.m4: Likewise.
* gnulib/m4/threadlib.m4: Likewise.
* gnulib/m4/uintmax_t.m4: Likewise.
* gnulib/m4/visibility.m4: Likewise.
* gnulib/m4/wchar.m4: Likewise.
* gnulib/m4/wchar_t.m4: Likewise.
* gnulib/m4/wint_t.m4: Likewise.
* gnulib/m4/xsize.m4: Likewise.
* gnulib/tests/Makefile.am: Likewise.
* gnulib/tests/sockets.h: Likewise.
* gnulib/tests/.cvsignore: Likewise.
* gnulib/tests/.gitignore: Likewise.
* tests/.gitignore: Likewise.
* docs/examples/.gitignore: Likewise.
* gnulib/lib/.cvsignore: Likewise.
* gnulib/lib/.gitignore: Likewise.

remove files associated with obsolete strpbrk module
* gnulib/lib/strpbrk.c: Remove file.
* gnulib/m4/strpbrk.m4: Remove file.
This commit is contained in:
Jim Meyering 2009-01-06 20:12:50 +00:00
parent 37e72aa542
commit 6c996bfc8f
65 changed files with 1234 additions and 377 deletions

View File

@ -1,3 +1,73 @@
Tue Jan 6 20:38:23 +0100 2009 Jim Meyering <meyering@redhat.com>
update from gnulib; use its time_r module for localtime_r on mingw
* bootstrap (modules): Add time_r.
* gnulib/m4/time_h.m4: New file.
* gnulib/m4/time_r.m4: New file.
* gnulib/lib/time_r.c: New file.
* gnulib/tests/test-time.c: New file.
* gnulib/lib/time.in.h: New file.
* gnulib/lib/Makefile.am: Update.
* gnulib/lib/fseeko.c: Likewise.
* gnulib/lib/lstat.c: Likewise.
* gnulib/lib/netdb.in.h: Likewise.
* gnulib/lib/stdint.in.h: Likewise.
* gnulib/lib/stdlib.in.h: Likewise.
* gnulib/lib/sys_select.in.h: Likewise.
* gnulib/lib/sys_stat.in.h: Likewise.
* gnulib/lib/sys_time.in.h: Likewise.
* gnulib/lib/unistd.in.h: Likewise.
* gnulib/lib/wchar.in.h: Likewise.
* gnulib/m4/codeset.m4: Likewise.
* gnulib/m4/errno_h.m4: Likewise.
* gnulib/m4/extensions.m4: Likewise.
* gnulib/m4/getaddrinfo.m4: Likewise.
* gnulib/m4/gettext.m4: Likewise.
* gnulib/m4/glibc2.m4: Likewise.
* gnulib/m4/glibc21.m4: Likewise.
* gnulib/m4/gnulib-cache.m4: Likewise.
* gnulib/m4/gnulib-comp.m4: Likewise.
* gnulib/m4/iconv.m4: Likewise.
* gnulib/m4/include_next.m4: Likewise.
* gnulib/m4/intdiv0.m4: Likewise.
* gnulib/m4/intlmacosx.m4: Likewise.
* gnulib/m4/intmax.m4: Likewise.
* gnulib/m4/inttypes-pri.m4: Likewise.
* gnulib/m4/inttypes_h.m4: Likewise.
* gnulib/m4/lcmessage.m4: Likewise.
* gnulib/m4/lib-link.m4: Likewise.
* gnulib/m4/lstat.m4: Likewise.
* gnulib/m4/netdb_h.m4: Likewise.
* gnulib/m4/nls.m4: Likewise.
* gnulib/m4/po.m4: Likewise.
* gnulib/m4/printf-posix.m4: Likewise.
* gnulib/m4/printf.m4: Likewise.
* gnulib/m4/progtest.m4: Likewise.
* gnulib/m4/size_max.m4: Likewise.
* gnulib/m4/sockets.m4: Likewise.
* gnulib/m4/stdint.m4: Likewise.
* gnulib/m4/stdint_h.m4: Likewise.
* gnulib/m4/sys_ioctl_h.m4: Likewise.
* gnulib/m4/threadlib.m4: Likewise.
* gnulib/m4/uintmax_t.m4: Likewise.
* gnulib/m4/visibility.m4: Likewise.
* gnulib/m4/wchar.m4: Likewise.
* gnulib/m4/wchar_t.m4: Likewise.
* gnulib/m4/wint_t.m4: Likewise.
* gnulib/m4/xsize.m4: Likewise.
* gnulib/tests/Makefile.am: Likewise.
* gnulib/tests/sockets.h: Likewise.
* gnulib/tests/.cvsignore: Likewise.
* gnulib/tests/.gitignore: Likewise.
* tests/.gitignore: Likewise.
* docs/examples/.gitignore: Likewise.
* gnulib/lib/.cvsignore: Likewise.
* gnulib/lib/.gitignore: Likewise.
remove files associated with obsolete strpbrk module
* gnulib/lib/strpbrk.c: Remove file.
* gnulib/m4/strpbrk.m4: Remove file.
Tue Jan 6 17:52:22 GMT 2009 Daniel P. Berrange <berrange@redhat.com> Tue Jan 6 17:52:22 GMT 2009 Daniel P. Berrange <berrange@redhat.com>
Misc windows / mingw portability fixes Misc windows / mingw portability fixes

View File

@ -87,6 +87,7 @@ strndup
strerror strerror
strsep strsep
sys_stat sys_stat
time_r
useless-if-before-free useless-if-before-free
vasprintf vasprintf
verify verify

View File

@ -1,4 +1,3 @@
*.exe
.memdump .memdump
Makefile.in Makefile.in
Makefile Makefile

View File

@ -20,5 +20,6 @@ sys_select.h
sys_socket.h sys_socket.h
sys_stat.h sys_stat.h
sys_time.h sys_time.h
time.h
unistd.h unistd.h
wchar.h wchar.h

View File

@ -20,5 +20,6 @@ sys_select.h
sys_socket.h sys_socket.h
sys_stat.h sys_stat.h
sys_time.h sys_time.h
time.h
unistd.h unistd.h
wchar.h wchar.h

View File

@ -1,6 +1,6 @@
## DO NOT EDIT! GENERATED AUTOMATICALLY! ## DO NOT EDIT! GENERATED AUTOMATICALLY!
## Process this file with automake to produce Makefile.in. ## Process this file with automake to produce Makefile.in.
# Copyright (C) 2002-2008 Free Software Foundation, Inc. # Copyright (C) 2002-2009 Free Software Foundation, Inc.
# #
# This file is free software, distributed under the terms of the GNU # This file is free software, distributed under the terms of the GNU
# General Public License. As a special exception to the GNU General # General Public License. As a special exception to the GNU General
@ -9,7 +9,7 @@
# the same distribution terms as the rest of that program. # the same distribution terms as the rest of that program.
# #
# Generated by gnulib-tool. # Generated by gnulib-tool.
# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=gnulib/lib --m4-base=gnulib/m4 --doc-base=doc --tests-base=gnulib/tests --aux-dir=build-aux --with-tests --lgpl=2 --libtool --macro-prefix=gl c-ctype close connect getaddrinfo gethostname getpass gettext inet_pton mkstemp mktempd perror physmem poll posix-shell recv send setsockopt socket strerror strndup strsep sys_stat useless-if-before-free vasprintf vc-list-files verify # Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=gnulib/lib --m4-base=gnulib/m4 --doc-base=doc --tests-base=gnulib/tests --aux-dir=build-aux --with-tests --lgpl=2 --libtool --macro-prefix=gl c-ctype close connect getaddrinfo gethostname getpass gettext inet_pton mkstemp mktempd perror physmem poll posix-shell recv send setsockopt socket strerror strndup strsep sys_stat time_r useless-if-before-free vasprintf vc-list-files verify
AUTOMAKE_OPTIONS = 1.5 gnits AUTOMAKE_OPTIONS = 1.5 gnits
@ -102,7 +102,7 @@ libgnu_la_SOURCES += c-ctype.h c-ctype.c
## begin gnulib module close ## begin gnulib module close
EXTRA_DIST += close.c EXTRA_DIST += close.c w32sock.h
EXTRA_libgnu_la_SOURCES += close.c EXTRA_libgnu_la_SOURCES += close.c
@ -356,6 +356,11 @@ netdb.h: netdb.in.h
-e 's|@''NEXT_NETDB_H''@|$(NEXT_NETDB_H)|g' \ -e 's|@''NEXT_NETDB_H''@|$(NEXT_NETDB_H)|g' \
-e 's|@''HAVE_NETDB_H''@|$(HAVE_NETDB_H)|g' \ -e 's|@''HAVE_NETDB_H''@|$(HAVE_NETDB_H)|g' \
-e 's|@''GNULIB_GETADDRINFO''@|$(GNULIB_GETADDRINFO)|g' \ -e 's|@''GNULIB_GETADDRINFO''@|$(GNULIB_GETADDRINFO)|g' \
-e 's|@''HAVE_STRUCT_ADDRINFO''@|$(HAVE_STRUCT_ADDRINFO)|g' \
-e 's|@''HAVE_DECL_FREEADDRINFO''@|$(HAVE_DECL_FREEADDRINFO)|g' \
-e 's|@''HAVE_DECL_GAI_STRERROR''@|$(HAVE_DECL_GAI_STRERROR)|g' \
-e 's|@''HAVE_DECL_GETADDRINFO''@|$(HAVE_DECL_GETADDRINFO)|g' \
-e 's|@''HAVE_DECL_GETNAMEINFO''@|$(HAVE_DECL_GETNAMEINFO)|g' \
< $(srcdir)/netdb.in.h; \ < $(srcdir)/netdb.in.h; \
} > $@-t } > $@-t
mv $@-t $@ mv $@-t $@
@ -538,6 +543,7 @@ stdint.h: stdint.in.h
-e 's/@''HAVE_SYS_BITYPES_H''@/$(HAVE_SYS_BITYPES_H)/g' \ -e 's/@''HAVE_SYS_BITYPES_H''@/$(HAVE_SYS_BITYPES_H)/g' \
-e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \ -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \
-e 's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \ -e 's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \
-e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \
-e 's/@''BITSIZEOF_PTRDIFF_T''@/$(BITSIZEOF_PTRDIFF_T)/g' \ -e 's/@''BITSIZEOF_PTRDIFF_T''@/$(BITSIZEOF_PTRDIFF_T)/g' \
-e 's/@''PTRDIFF_T_SUFFIX''@/$(PTRDIFF_T_SUFFIX)/g' \ -e 's/@''PTRDIFF_T_SUFFIX''@/$(PTRDIFF_T_SUFFIX)/g' \
-e 's/@''BITSIZEOF_SIG_ATOMIC_T''@/$(BITSIZEOF_SIG_ATOMIC_T)/g' \ -e 's/@''BITSIZEOF_SIG_ATOMIC_T''@/$(BITSIZEOF_SIG_ATOMIC_T)/g' \
@ -816,15 +822,6 @@ EXTRA_libgnu_la_SOURCES += strnlen.c
## end gnulib module strnlen ## end gnulib module strnlen
## begin gnulib module strpbrk
EXTRA_DIST += strpbrk.c
EXTRA_libgnu_la_SOURCES += strpbrk.c
## end gnulib module strpbrk
## begin gnulib module strsep ## begin gnulib module strsep
@ -966,6 +963,42 @@ EXTRA_libgnu_la_SOURCES += tempname.c
## end gnulib module tempname ## end gnulib module tempname
## begin gnulib module time
BUILT_SOURCES += time.h
# We need the following in order to create <time.h> when the system
# doesn't have one that works with the given compiler.
time.h: time.in.h
rm -f $@-t $@
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@NEXT_TIME_H''@|$(NEXT_TIME_H)|g' \
-e 's|@REPLACE_LOCALTIME_R''@|$(REPLACE_LOCALTIME_R)|g' \
-e 's|@REPLACE_NANOSLEEP''@|$(REPLACE_NANOSLEEP)|g' \
-e 's|@REPLACE_STRPTIME''@|$(REPLACE_STRPTIME)|g' \
-e 's|@REPLACE_TIMEGM''@|$(REPLACE_TIMEGM)|g' \
-e 's|@SYS_TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(SYS_TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \
-e 's|@TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \
< $(srcdir)/time.in.h; \
} > $@-t
mv $@-t $@
MOSTLYCLEANFILES += time.h time.h-t
EXTRA_DIST += time.in.h
## end gnulib module time
## begin gnulib module time_r
EXTRA_DIST += time_r.c
EXTRA_libgnu_la_SOURCES += time_r.c
## end gnulib module time_r
## begin gnulib module unistd ## begin gnulib module unistd
BUILT_SOURCES += unistd.h BUILT_SOURCES += unistd.h
@ -1084,10 +1117,40 @@ wchar.h: wchar.in.h
sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''NEXT_WCHAR_H''@|$(NEXT_WCHAR_H)|g' \ -e 's|@''NEXT_WCHAR_H''@|$(NEXT_WCHAR_H)|g' \
-e 's/@''HAVE_WCHAR_H''@/$(HAVE_WCHAR_H)/g' \ -e 's|@''HAVE_WCHAR_H''@|$(HAVE_WCHAR_H)|g' \
-e 's|@''GNULIB_BTOWC''@|$(GNULIB_BTOWC)|g' \
-e 's|@''GNULIB_WCTOB''@|$(GNULIB_WCTOB)|g' \
-e 's|@''GNULIB_MBSINIT''@|$(GNULIB_MBSINIT)|g' \
-e 's|@''GNULIB_MBRTOWC''@|$(GNULIB_MBRTOWC)|g' \
-e 's|@''GNULIB_MBRLEN''@|$(GNULIB_MBRLEN)|g' \
-e 's|@''GNULIB_MBSRTOWCS''@|$(GNULIB_MBSRTOWCS)|g' \
-e 's|@''GNULIB_MBSNRTOWCS''@|$(GNULIB_MBSNRTOWCS)|g' \
-e 's|@''GNULIB_WCRTOMB''@|$(GNULIB_WCRTOMB)|g' \
-e 's|@''GNULIB_WCSRTOMBS''@|$(GNULIB_WCSRTOMBS)|g' \
-e 's|@''GNULIB_WCSNRTOMBS''@|$(GNULIB_WCSNRTOMBS)|g' \
-e 's|@''GNULIB_WCWIDTH''@|$(GNULIB_WCWIDTH)|g' \ -e 's|@''GNULIB_WCWIDTH''@|$(GNULIB_WCWIDTH)|g' \
-e 's/@''HAVE_WINT_T''@/$(HAVE_WINT_T)/g' \ -e 's|@''HAVE_WINT_T''@|$(HAVE_WINT_T)|g' \
-e 's|@''HAVE_BTOWC''@|$(HAVE_BTOWC)|g' \
-e 's|@''HAVE_MBSINIT''@|$(HAVE_MBSINIT)|g' \
-e 's|@''HAVE_MBRTOWC''@|$(HAVE_MBRTOWC)|g' \
-e 's|@''HAVE_MBRLEN''@|$(HAVE_MBRLEN)|g' \
-e 's|@''HAVE_MBSRTOWCS''@|$(HAVE_MBSRTOWCS)|g' \
-e 's|@''HAVE_MBSNRTOWCS''@|$(HAVE_MBSNRTOWCS)|g' \
-e 's|@''HAVE_WCRTOMB''@|$(HAVE_WCRTOMB)|g' \
-e 's|@''HAVE_WCSRTOMBS''@|$(HAVE_WCSRTOMBS)|g' \
-e 's|@''HAVE_WCSNRTOMBS''@|$(HAVE_WCSNRTOMBS)|g' \
-e 's|@''HAVE_DECL_WCTOB''@|$(HAVE_DECL_WCTOB)|g' \
-e 's|@''HAVE_DECL_WCWIDTH''@|$(HAVE_DECL_WCWIDTH)|g' \ -e 's|@''HAVE_DECL_WCWIDTH''@|$(HAVE_DECL_WCWIDTH)|g' \
-e 's|@''REPLACE_MBSTATE_T''@|$(REPLACE_MBSTATE_T)|g' \
-e 's|@''REPLACE_BTOWC''@|$(REPLACE_BTOWC)|g' \
-e 's|@''REPLACE_WCTOB''@|$(REPLACE_WCTOB)|g' \
-e 's|@''REPLACE_MBSINIT''@|$(REPLACE_MBSINIT)|g' \
-e 's|@''REPLACE_MBRTOWC''@|$(REPLACE_MBRTOWC)|g' \
-e 's|@''REPLACE_MBRLEN''@|$(REPLACE_MBRLEN)|g' \
-e 's|@''REPLACE_MBSRTOWCS''@|$(REPLACE_MBSRTOWCS)|g' \
-e 's|@''REPLACE_MBSNRTOWCS''@|$(REPLACE_MBSNRTOWCS)|g' \
-e 's|@''REPLACE_WCRTOMB''@|$(REPLACE_WCRTOMB)|g' \
-e 's|@''REPLACE_WCSRTOMBS''@|$(REPLACE_WCSRTOMBS)|g' \
-e 's|@''REPLACE_WCWIDTH''@|$(REPLACE_WCWIDTH)|g' \ -e 's|@''REPLACE_WCWIDTH''@|$(REPLACE_WCWIDTH)|g' \
-e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \ -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
< $(srcdir)/wchar.in.h; \ < $(srcdir)/wchar.in.h; \

View File

@ -41,7 +41,7 @@ rpl_fseeko (FILE *fp, off_t offset, int whence)
#endif #endif
/* These tests are based on fpurge.c. */ /* These tests are based on fpurge.c. */
#if defined _IO_ferror_unlocked || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Linux libc5 */ #if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
if (fp->_IO_read_end == fp->_IO_read_ptr if (fp->_IO_read_end == fp->_IO_read_ptr
&& fp->_IO_write_ptr == fp->_IO_write_base && fp->_IO_write_ptr == fp->_IO_write_base
&& fp->_IO_save_base == NULL) && fp->_IO_save_base == NULL)

View File

@ -25,15 +25,15 @@
#include <sys/stat.h> #include <sys/stat.h>
#undef __need_system_sys_stat_h #undef __need_system_sys_stat_h
/* Specification. */
#include <sys/stat.h>
static inline int static inline int
orig_lstat (const char *filename, struct stat *buf) orig_lstat (const char *filename, struct stat *buf)
{ {
return lstat (filename, buf); return lstat (filename, buf);
} }
/* Specification. */
#include <sys/stat.h>
#include <string.h> #include <string.h>
#include <errno.h> #include <errno.h>

View File

@ -36,12 +36,6 @@
#ifndef _GL_NETDB_H #ifndef _GL_NETDB_H
#define _GL_NETDB_H #define _GL_NETDB_H
#if @HAVE_NETDB_H@ && HAVE_STRUCT_ADDRINFO
/* Declarations for a platform that has <netdb.h>. */
#else
/* Get netdb.h definitions such as struct hostent for MinGW. */ /* Get netdb.h definitions such as struct hostent for MinGW. */
#include <sys/socket.h> #include <sys/socket.h>
@ -50,7 +44,7 @@
#if @GNULIB_GETADDRINFO@ #if @GNULIB_GETADDRINFO@
# ifndef HAVE_STRUCT_ADDRINFO # if !@HAVE_STRUCT_ADDRINFO@
/* Structure to contain information about address of a service provider. */ /* Structure to contain information about address of a service provider. */
struct addrinfo struct addrinfo
@ -112,7 +106,7 @@ struct addrinfo
# endif # endif
# ifndef EAI_OVERFLOW # ifndef EAI_OVERFLOW
/* Not defined on mingw32. */ /* Not defined on mingw32 and Haiku. */
# define EAI_OVERFLOW -12 /* Argument buffer overflow. */ # define EAI_OVERFLOW -12 /* Argument buffer overflow. */
# endif # endif
# ifndef EAI_ADDRFAMILY # ifndef EAI_ADDRFAMILY
@ -139,7 +133,7 @@ struct addrinfo
# endif # endif
# endif # endif
# if !HAVE_DECL_GETADDRINFO # if !@HAVE_DECL_GETADDRINFO@
/* Translate name of a service location and/or a service name to set of /* Translate name of a service location and/or a service name to set of
socket addresses. socket addresses.
For more details, see the POSIX:2001 specification For more details, see the POSIX:2001 specification
@ -150,21 +144,21 @@ extern int getaddrinfo (const char *restrict nodename,
struct addrinfo **restrict res); struct addrinfo **restrict res);
# endif # endif
# if !HAVE_DECL_FREEADDRINFO # if !@HAVE_DECL_FREEADDRINFO@
/* Free `addrinfo' structure AI including associated storage. /* Free `addrinfo' structure AI including associated storage.
For more details, see the POSIX:2001 specification For more details, see the POSIX:2001 specification
<http://www.opengroup.org/susv3xsh/getaddrinfo.html>. */ <http://www.opengroup.org/susv3xsh/getaddrinfo.html>. */
extern void freeaddrinfo (struct addrinfo *ai); extern void freeaddrinfo (struct addrinfo *ai);
# endif # endif
# if !HAVE_DECL_GAI_STRERROR # if !@HAVE_DECL_GAI_STRERROR@
/* Convert error return from getaddrinfo() to a string. /* Convert error return from getaddrinfo() to a string.
For more details, see the POSIX:2001 specification For more details, see the POSIX:2001 specification
<http://www.opengroup.org/susv3xsh/gai_strerror.html>. */ <http://www.opengroup.org/susv3xsh/gai_strerror.html>. */
extern const char *gai_strerror (int ecode); extern const char *gai_strerror (int ecode);
# endif # endif
# if !HAVE_DECL_GETNAMEINFO # if !@HAVE_DECL_GETNAMEINFO@
/* Convert socket address to printable node and service names. /* Convert socket address to printable node and service names.
For more details, see the POSIX:2001 specification For more details, see the POSIX:2001 specification
<http://www.opengroup.org/susv3xsh/getnameinfo.html>. */ <http://www.opengroup.org/susv3xsh/getnameinfo.html>. */
@ -184,7 +178,5 @@ extern int getnameinfo(const struct sockaddr *restrict sa, socklen_t salen,
#endif /* @GNULIB_GETADDRINFO@ */ #endif /* @GNULIB_GETADDRINFO@ */
#endif /* HAVE_NETDB_H */
#endif /* _GL_NETDB_H */ #endif /* _GL_NETDB_H */
#endif /* _GL_NETDB_H */ #endif /* _GL_NETDB_H */

View File

@ -89,15 +89,6 @@
# include <sys/bitypes.h> # include <sys/bitypes.h>
#endif #endif
#if ! defined __cplusplus || defined __STDC_CONSTANT_MACROS
/* Get WCHAR_MIN, WCHAR_MAX. */
# if ! (defined WCHAR_MIN && defined WCHAR_MAX)
# include <wchar.h>
# endif
#endif
#undef _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H #undef _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H
/* Minimum and maximum values for a integer type under the usual assumption. /* Minimum and maximum values for a integer type under the usual assumption.
@ -122,46 +113,58 @@
#undef int8_t #undef int8_t
#undef uint8_t #undef uint8_t
#define int8_t signed char typedef signed char gl_int8_t;
#define uint8_t unsigned char typedef unsigned char gl_uint8_t;
#define int8_t gl_int8_t
#define uint8_t gl_uint8_t
#undef int16_t #undef int16_t
#undef uint16_t #undef uint16_t
#define int16_t short int typedef short int gl_int16_t;
#define uint16_t unsigned short int typedef unsigned short int gl_uint16_t;
#define int16_t gl_int16_t
#define uint16_t gl_uint16_t
#undef int32_t #undef int32_t
#undef uint32_t #undef uint32_t
#define int32_t int typedef int gl_int32_t;
#define uint32_t unsigned int typedef unsigned int gl_uint32_t;
#define int32_t gl_int32_t
#define uint32_t gl_uint32_t
/* Do not undefine int64_t if gnulib is not being used with 64-bit /* Do not undefine int64_t if gnulib is not being used with 64-bit
types, since otherwise it breaks platforms like Tandem/NSK. */ types, since otherwise it breaks platforms like Tandem/NSK. */
#if LONG_MAX >> 31 >> 31 == 1 #if LONG_MAX >> 31 >> 31 == 1
# undef int64_t # undef int64_t
# define int64_t long int typedef long int gl_int64_t;
# define int64_t gl_int64_t
# define GL_INT64_T # define GL_INT64_T
#elif defined _MSC_VER #elif defined _MSC_VER
# undef int64_t # undef int64_t
# define int64_t __int64 typedef __int64 gl_int64_t;
# define int64_t gl_int64_t
# define GL_INT64_T # define GL_INT64_T
#elif @HAVE_LONG_LONG_INT@ #elif @HAVE_LONG_LONG_INT@
# undef int64_t # undef int64_t
# define int64_t long long int typedef long long int gl_int64_t;
# define int64_t gl_int64_t
# define GL_INT64_T # define GL_INT64_T
#endif #endif
#if ULONG_MAX >> 31 >> 31 >> 1 == 1 #if ULONG_MAX >> 31 >> 31 >> 1 == 1
# undef uint64_t # undef uint64_t
# define uint64_t unsigned long int typedef unsigned long int gl_uint64_t;
# define uint64_t gl_uint64_t
# define GL_UINT64_T # define GL_UINT64_T
#elif defined _MSC_VER #elif defined _MSC_VER
# undef uint64_t # undef uint64_t
# define uint64_t unsigned __int64 typedef unsigned __int64 gl_uint64_t;
# define uint64_t gl_uint64_t
# define GL_UINT64_T # define GL_UINT64_T
#elif @HAVE_UNSIGNED_LONG_LONG_INT@ #elif @HAVE_UNSIGNED_LONG_LONG_INT@
# undef uint64_t # undef uint64_t
# define uint64_t unsigned long long int typedef unsigned long long int gl_uint64_t;
# define uint64_t gl_uint64_t
# define GL_UINT64_T # define GL_UINT64_T
#endif #endif
@ -216,12 +219,18 @@
#undef uint_fast32_t #undef uint_fast32_t
#undef int_fast64_t #undef int_fast64_t
#undef uint_fast64_t #undef uint_fast64_t
#define int_fast8_t long int typedef long int gl_int_fast8_t;
#define uint_fast8_t unsigned int_fast8_t typedef unsigned long int gl_uint_fast8_t;
#define int_fast16_t long int typedef long int gl_int_fast16_t;
#define uint_fast16_t unsigned int_fast16_t typedef unsigned long int gl_uint_fast16_t;
#define int_fast32_t long int typedef long int gl_int_fast32_t;
#define uint_fast32_t unsigned int_fast32_t typedef unsigned long int gl_uint_fast32_t;
#define int_fast8_t gl_int_fast8_t
#define uint_fast8_t gl_uint_fast8_t
#define int_fast16_t gl_int_fast16_t
#define uint_fast16_t gl_uint_fast16_t
#define int_fast32_t gl_int_fast32_t
#define uint_fast32_t gl_uint_fast32_t
#ifdef GL_INT64_T #ifdef GL_INT64_T
# define int_fast64_t int64_t # define int_fast64_t int64_t
#endif #endif
@ -233,8 +242,10 @@
#undef intptr_t #undef intptr_t
#undef uintptr_t #undef uintptr_t
#define intptr_t long int typedef long int gl_intptr_t;
#define uintptr_t unsigned long int typedef unsigned long int gl_uintptr_t;
#define intptr_t gl_intptr_t
#define uintptr_t gl_uintptr_t
/* 7.18.1.5. Greatest-width integer types */ /* 7.18.1.5. Greatest-width integer types */
@ -243,20 +254,24 @@
#undef intmax_t #undef intmax_t
#if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1 #if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
# define intmax_t long long int typedef long long int gl_intmax_t;
# define intmax_t gl_intmax_t
#elif defined GL_INT64_T #elif defined GL_INT64_T
# define intmax_t int64_t # define intmax_t int64_t
#else #else
# define intmax_t long int typedef long int gl_intmax_t;
# define intmax_t gl_intmax_t
#endif #endif
#undef uintmax_t #undef uintmax_t
#if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1 #if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
# define uintmax_t unsigned long long int typedef unsigned long long int gl_uintmax_t;
# define uintmax_t gl_uintmax_t
#elif defined GL_UINT64_T #elif defined GL_UINT64_T
# define uintmax_t uint64_t # define uintmax_t uint64_t
#else #else
# define uintmax_t unsigned long int typedef unsigned long int gl_uintmax_t;
# define uintmax_t gl_uintmax_t
#endif #endif
/* Verify that intmax_t and uintmax_t have the same size. Too much code /* Verify that intmax_t and uintmax_t have the same size. Too much code
@ -419,10 +434,20 @@ typedef int _verify_intmax_size[2 * (sizeof (intmax_t) == sizeof (uintmax_t)) -
/* ptrdiff_t limits */ /* ptrdiff_t limits */
#undef PTRDIFF_MIN #undef PTRDIFF_MIN
#undef PTRDIFF_MAX #undef PTRDIFF_MAX
#define PTRDIFF_MIN \ #if @APPLE_UNIVERSAL_BUILD@
_STDINT_MIN (1, @BITSIZEOF_PTRDIFF_T@, 0@PTRDIFF_T_SUFFIX@) # if _LP64
#define PTRDIFF_MAX \ # define PTRDIFF_MIN _STDINT_MIN (1, 64, 0l)
_STDINT_MAX (1, @BITSIZEOF_PTRDIFF_T@, 0@PTRDIFF_T_SUFFIX@) # define PTRDIFF_MAX _STDINT_MAX (1, 64, 0l)
# else
# define PTRDIFF_MIN _STDINT_MIN (1, 32, 0)
# define PTRDIFF_MAX _STDINT_MAX (1, 32, 0)
# endif
#else
# define PTRDIFF_MIN \
_STDINT_MIN (1, @BITSIZEOF_PTRDIFF_T@, 0@PTRDIFF_T_SUFFIX@)
# define PTRDIFF_MAX \
_STDINT_MAX (1, @BITSIZEOF_PTRDIFF_T@, 0@PTRDIFF_T_SUFFIX@)
#endif
/* sig_atomic_t limits */ /* sig_atomic_t limits */
#undef SIG_ATOMIC_MIN #undef SIG_ATOMIC_MIN
@ -437,9 +462,24 @@ typedef int _verify_intmax_size[2 * (sizeof (intmax_t) == sizeof (uintmax_t)) -
/* size_t limit */ /* size_t limit */
#undef SIZE_MAX #undef SIZE_MAX
#define SIZE_MAX _STDINT_MAX (0, @BITSIZEOF_SIZE_T@, 0@SIZE_T_SUFFIX@) #if @APPLE_UNIVERSAL_BUILD@
# if _LP64
# define SIZE_MAX _STDINT_MAX (0, 64, 0ul)
# else
# define SIZE_MAX _STDINT_MAX (0, 32, 0ul)
# endif
#else
# define SIZE_MAX _STDINT_MAX (0, @BITSIZEOF_SIZE_T@, 0@SIZE_T_SUFFIX@)
#endif
/* wchar_t limits */ /* wchar_t limits */
/* Get WCHAR_MIN, WCHAR_MAX.
This include is not on the top, above, because on OSF/1 4.0 we have a sequence of nested
includes <wchar.h> -> <stdio.h> -> <getopt.h> -> <stdlib.h>, and the latter includes
<stdint.h> and assumes its types are already defined. */
#if ! (defined WCHAR_MIN && defined WCHAR_MAX)
# include <wchar.h>
#endif
#undef WCHAR_MIN #undef WCHAR_MIN
#undef WCHAR_MAX #undef WCHAR_MAX
#define WCHAR_MIN \ #define WCHAR_MIN \

View File

@ -52,8 +52,8 @@ struct random_data
int32_t *rptr; /* Rear pointer. */ int32_t *rptr; /* Rear pointer. */
int32_t *state; /* Array of state values. */ int32_t *state; /* Array of state values. */
int rand_type; /* Type of random number generator. */ int rand_type; /* Type of random number generator. */
int rand_deg; /* Degree of random number generator. */ int rand_deg; /* Degree of random number generator. */
int rand_sep; /* Distance between front and rear. */ int rand_sep; /* Distance between front and rear. */
int32_t *end_ptr; /* Pointer behind state table. */ int32_t *end_ptr; /* Pointer behind state table. */
}; };
#endif #endif

View File

@ -1,42 +0,0 @@
/* Copyright (C) 1991, 1994, 2000, 2002-2003, 2006 Free Software
Foundation, Inc.
NOTE: The canonical source of this file is maintained with the GNU C Library.
Bugs can be reported to bug-glibc@prep.ai.mit.edu.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published by the
Free Software Foundation; either version 2.1, or (at your option) any
later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#include <config.h>
#include <stddef.h>
#include <string.h>
#undef strpbrk
/* Find the first occurrence in S of any character in ACCEPT. */
char *
strpbrk (const char *s, const char *accept)
{
while (*s != '\0')
{
const char *a = accept;
while (*a != '\0')
if (*a++ == *s)
return (char *) s;
++s;
}
return NULL;
}

View File

@ -15,14 +15,28 @@
along with this program; if not, write to the Free Software Foundation, along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef _GL_SYS_SELECT_H
#if @HAVE_SYS_SELECT_H@
# if __GNUC__ >= 3 # if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@ @PRAGMA_SYSTEM_HEADER@
# endif # endif
/* On OSF/1, <sys/types.h> and <sys/time.h> include <sys/select.h>.
Simply delegate to the system's header in this case. */
#if @HAVE_SYS_SELECT_H@ && defined __osf__ && (defined _SYS_TYPES_H_ && !defined _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TYPES_H) && defined _OSF_SOURCE
# define _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TYPES_H
# @INCLUDE_NEXT@ @NEXT_SYS_SELECT_H@
#elif @HAVE_SYS_SELECT_H@ && defined __osf__ && (defined _SYS_TIME_H_ && !defined _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TIME_H) && defined _OSF_SOURCE
# define _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TIME_H
# @INCLUDE_NEXT@ @NEXT_SYS_SELECT_H@
#else
#ifndef _GL_SYS_SELECT_H
#if @HAVE_SYS_SELECT_H@
/* On many platforms, <sys/select.h> assumes prior inclusion of /* On many platforms, <sys/select.h> assumes prior inclusion of
<sys/types.h>. */ <sys/types.h>. */
# include <sys/types.h> # include <sys/types.h>
@ -76,3 +90,4 @@ extern int rpl_select (int, fd_set *, fd_set *, fd_set *, struct timeval *);
#endif /* _GL_SYS_SELECT_H */ #endif /* _GL_SYS_SELECT_H */
#endif /* _GL_SYS_SELECT_H */ #endif /* _GL_SYS_SELECT_H */
#endif /* OSF/1 */

View File

@ -275,6 +275,12 @@
# define S_IRWXUGO (S_IRWXU | S_IRWXG | S_IRWXO) # define S_IRWXUGO (S_IRWXU | S_IRWXG | S_IRWXO)
#endif #endif
#ifdef __cplusplus
extern "C" {
#endif
#if @GNULIB_LSTAT@ #if @GNULIB_LSTAT@
# if ! @HAVE_LSTAT@ # if ! @HAVE_LSTAT@
/* mingw does not support symlinks, therefore it does not have lstat. But /* mingw does not support symlinks, therefore it does not have lstat. But
@ -341,6 +347,12 @@ extern int lchmod (const char *filename, mode_t mode);
lchmod (f, m)) lchmod (f, m))
#endif #endif
#ifdef __cplusplus
}
#endif
#endif /* _GL_SYS_STAT_H */ #endif /* _GL_SYS_STAT_H */
#endif /* _GL_SYS_STAT_H */ #endif /* _GL_SYS_STAT_H */
#endif #endif

View File

@ -39,6 +39,10 @@
# include <time.h> # include <time.h>
# endif # endif
#ifdef __cplusplus
extern "C" {
#endif
# if ! @HAVE_STRUCT_TIMEVAL@ # if ! @HAVE_STRUCT_TIMEVAL@
struct timeval struct timeval
{ {
@ -53,4 +57,8 @@ struct timeval
int gettimeofday (struct timeval *restrict, void *restrict); int gettimeofday (struct timeval *restrict, void *restrict);
# endif # endif
#ifdef __cplusplus
}
#endif
#endif /* _GL_SYS_TIME_H */ #endif /* _GL_SYS_TIME_H */

118
gnulib/lib/time.in.h Normal file
View File

@ -0,0 +1,118 @@
/* A more-standard <time.h>.
Copyright (C) 2007-2008 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
#endif
/* Don't get in the way of glibc when it includes time.h merely to
declare a few standard symbols, rather than to declare all the
symbols. Also, Solaris 8 <time.h> eventually includes itself
recursively; if that is happening, just include the system <time.h>
without adding our own declarations. */
#if (defined __need_time_t || defined __need_clock_t \
|| defined __need_timespec \
|| defined _GL_TIME_H)
# @INCLUDE_NEXT@ @NEXT_TIME_H@
#else
# define _GL_TIME_H
# @INCLUDE_NEXT@ @NEXT_TIME_H@
# ifdef __cplusplus
extern "C" {
# endif
/* Some systems don't define struct timespec (e.g., AIX 4.1, Ultrix 4.3).
Or they define it with the wrong member names or define it in <sys/time.h>
(e.g., FreeBSD circa 1997). */
# if ! @TIME_H_DEFINES_STRUCT_TIMESPEC@
# if @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@
# include <sys/time.h>
# else
# undef timespec
# define timespec rpl_timespec
struct timespec
{
time_t tv_sec;
long int tv_nsec;
};
# endif
# endif
/* Sleep for at least RQTP seconds unless interrupted, If interrupted,
return -1 and store the remaining time into RMTP. See
<http://www.opengroup.org/susv3xsh/nanosleep.html>. */
# if @REPLACE_NANOSLEEP@
# define nanosleep rpl_nanosleep
int nanosleep (struct timespec const *__rqtp, struct timespec *__rmtp);
# endif
/* Convert TIMER to RESULT, assuming local time and UTC respectively. See
<http://www.opengroup.org/susv3xsh/localtime_r.html> and
<http://www.opengroup.org/susv3xsh/gmtime_r.html>. */
# if @REPLACE_LOCALTIME_R@
# undef localtime_r
# define localtime_r rpl_localtime_r
# undef gmtime_r
# define gmtime_r rpl_gmtime_r
struct tm *localtime_r (time_t const *restrict __timer,
struct tm *restrict __result);
struct tm *gmtime_r (time_t const *restrict __timer,
struct tm *restrict __result);
# endif
/* Parse BUF as a time stamp, assuming FORMAT specifies its layout, and store
the resulting broken-down time into TM. See
<http://www.opengroup.org/susv3xsh/strptime.html>. */
# if @REPLACE_STRPTIME@
# undef strptime
# define strptime rpl_strptime
char *strptime (char const *restrict __buf, char const *restrict __format,
struct tm *restrict __tm);
# endif
/* Convert TM to a time_t value, assuming UTC. */
# if @REPLACE_TIMEGM@
# undef timegm
# define timegm rpl_timegm
time_t timegm (struct tm *__tm);
# endif
/* Encourage applications to avoid unsafe functions that can overrun
buffers when given outlandish struct tm values. Portable
applications should use strftime (or even sprintf) instead. */
# if GNULIB_PORTCHECK
# undef asctime
# define asctime eschew_asctime
# undef asctime_r
# define asctime_r eschew_asctime_r
# undef ctime
# define ctime eschew_ctime
# undef ctime_r
# define ctime_r eschew_ctime_r
# endif
# ifdef __cplusplus
}
# endif
#endif

47
gnulib/lib/time_r.c Normal file
View File

@ -0,0 +1,47 @@
/* Reentrant time functions like localtime_r.
Copyright (C) 2003, 2006, 2007 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along
with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
/* Written by Paul Eggert. */
#include <config.h>
#include <time.h>
#include <string.h>
static struct tm *
copy_tm_result (struct tm *dest, struct tm const *src)
{
if (! src)
return 0;
*dest = *src;
return dest;
}
struct tm *
gmtime_r (time_t const * restrict t, struct tm * restrict tp)
{
return copy_tm_result (tp, gmtime (t));
}
struct tm *
localtime_r (time_t const * restrict t, struct tm * restrict tp)
{
return copy_tm_result (tp, localtime (t));
}

View File

@ -35,6 +35,7 @@
#endif #endif
/* mingw fails to declare _exit in <unistd.h>. */ /* mingw fails to declare _exit in <unistd.h>. */
/* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>. */
#include <stdlib.h> #include <stdlib.h>
#if @GNULIB_WRITE@ && @REPLACE_WRITE@ && @GNULIB_UNISTD_H_SIGPIPE@ #if @GNULIB_WRITE@ && @REPLACE_WRITE@ && @GNULIB_UNISTD_H_SIGPIPE@

View File

@ -68,6 +68,197 @@ extern "C" {
/* Define wint_t. (Also done in wctype.in.h.) */ /* Define wint_t. (Also done in wctype.in.h.) */
#if !@HAVE_WINT_T@ && !defined wint_t #if !@HAVE_WINT_T@ && !defined wint_t
# define wint_t int # define wint_t int
# ifndef WEOF
# define WEOF -1
# endif
#endif
/* Override mbstate_t if it is too small.
On IRIX 6.5, sizeof (mbstate_t) == 1, which is not sufficient for
implementing mbrtowc for encodings like UTF-8. */
#if !(@HAVE_MBSINIT@ && @HAVE_MBRTOWC@) || @REPLACE_MBSTATE_T@
typedef int rpl_mbstate_t;
# undef mbstate_t
# define mbstate_t rpl_mbstate_t
# define GNULIB_defined_mbstate_t 1
#endif
/* Convert a single-byte character to a wide character. */
#if @GNULIB_BTOWC@
# if @REPLACE_BTOWC@
# undef btowc
# define btowc rpl_btowc
# endif
# if !@HAVE_BTOWC@ || @REPLACE_BTOWC@
extern wint_t btowc (int c);
# endif
#elif defined GNULIB_POSIXCHECK
# undef btowc
# define btowc(c) \
(GL_LINK_WARNING ("btowc is unportable - " \
"use gnulib module btowc for portability"), \
btowc (c))
#endif
/* Convert a wide character to a single-byte character. */
#if @GNULIB_WCTOB@
# if @REPLACE_WCTOB@
# undef wctob
# define wctob rpl_wctob
# endif
# if (!defined wctob && !@HAVE_DECL_WCTOB@) || @REPLACE_WCTOB@
/* wctob is provided by gnulib, or wctob exists but is not declared. */
extern int wctob (wint_t wc);
# endif
#elif defined GNULIB_POSIXCHECK
# undef wctob
# define wctob(w) \
(GL_LINK_WARNING ("wctob is unportable - " \
"use gnulib module wctob for portability"), \
wctob (w))
#endif
/* Test whether *PS is in the initial state. */
#if @GNULIB_MBSINIT@
# if @REPLACE_MBSINIT@
# undef mbsinit
# define mbsinit rpl_mbsinit
# endif
# if !@HAVE_MBSINIT@ || @REPLACE_MBSINIT@
extern int mbsinit (const mbstate_t *ps);
# endif
#elif defined GNULIB_POSIXCHECK
# undef mbsinit
# define mbsinit(p) \
(GL_LINK_WARNING ("mbsinit is unportable - " \
"use gnulib module mbsinit for portability"), \
mbsinit (p))
#endif
/* Convert a multibyte character to a wide character. */
#if @GNULIB_MBRTOWC@
# if @REPLACE_MBRTOWC@
# undef mbrtowc
# define mbrtowc rpl_mbrtowc
# endif
# if !@HAVE_MBRTOWC@ || @REPLACE_MBRTOWC@
extern size_t mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps);
# endif
#elif defined GNULIB_POSIXCHECK
# undef mbrtowc
# define mbrtowc(w,s,n,p) \
(GL_LINK_WARNING ("mbrtowc is unportable - " \
"use gnulib module mbrtowc for portability"), \
mbrtowc (w, s, n, p))
#endif
/* Recognize a multibyte character. */
#if @GNULIB_MBRLEN@
# if @REPLACE_MBRLEN@
# undef mbrlen
# define mbrlen rpl_mbrlen
# endif
# if !@HAVE_MBRLEN@ || @REPLACE_MBRLEN@
extern size_t mbrlen (const char *s, size_t n, mbstate_t *ps);
# endif
#elif defined GNULIB_POSIXCHECK
# undef mbrlen
# define mbrlen(s,n,p) \
(GL_LINK_WARNING ("mbrlen is unportable - " \
"use gnulib module mbrlen for portability"), \
mbrlen (s, n, p))
#endif
/* Convert a string to a wide string. */
#if @GNULIB_MBSRTOWCS@
# if @REPLACE_MBSRTOWCS@
# undef mbsrtowcs
# define mbsrtowcs rpl_mbsrtowcs
# endif
# if !@HAVE_MBSRTOWCS@ || @REPLACE_MBSRTOWCS@
extern size_t mbsrtowcs (wchar_t *dest, const char **srcp, size_t len, mbstate_t *ps);
# endif
#elif defined GNULIB_POSIXCHECK
# undef mbsrtowcs
# define mbsrtowcs(d,s,l,p) \
(GL_LINK_WARNING ("mbsrtowcs is unportable - " \
"use gnulib module mbsrtowcs for portability"), \
mbsrtowcs (d, s, l, p))
#endif
/* Convert a string to a wide string. */
#if @GNULIB_MBSNRTOWCS@
# if @REPLACE_MBSNRTOWCS@
# undef mbsnrtowcs
# define mbsnrtowcs rpl_mbsnrtowcs
# endif
# if !@HAVE_MBSNRTOWCS@ || @REPLACE_MBSNRTOWCS@
extern size_t mbsnrtowcs (wchar_t *dest, const char **srcp, size_t srclen, size_t len, mbstate_t *ps);
# endif
#elif defined GNULIB_POSIXCHECK
# undef mbsnrtowcs
# define mbsnrtowcs(d,s,n,l,p) \
(GL_LINK_WARNING ("mbsnrtowcs is unportable - " \
"use gnulib module mbsnrtowcs for portability"), \
mbsnrtowcs (d, s, n, l, p))
#endif
/* Convert a wide character to a multibyte character. */
#if @GNULIB_WCRTOMB@
# if @REPLACE_WCRTOMB@
# undef wcrtomb
# define wcrtomb rpl_wcrtomb
# endif
# if !@HAVE_WCRTOMB@ || @REPLACE_WCRTOMB@
extern size_t wcrtomb (char *s, wchar_t wc, mbstate_t *ps);
# endif
#elif defined GNULIB_POSIXCHECK
# undef wcrtomb
# define wcrtomb(s,w,p) \
(GL_LINK_WARNING ("wcrtomb is unportable - " \
"use gnulib module wcrtomb for portability"), \
wcrtomb (s, w, p))
#endif
/* Convert a wide string to a string. */
#if @GNULIB_WCSRTOMBS@
# if @REPLACE_WCSRTOMBS@
# undef wcsrtombs
# define wcsrtombs rpl_wcsrtombs
# endif
# if !@HAVE_WCSRTOMBS@ || @REPLACE_WCSRTOMBS@
extern size_t wcsrtombs (char *dest, const wchar_t **srcp, size_t len, mbstate_t *ps);
# endif
#elif defined GNULIB_POSIXCHECK
# undef wcsrtombs
# define wcsrtombs(d,s,l,p) \
(GL_LINK_WARNING ("wcsrtombs is unportable - " \
"use gnulib module wcsrtombs for portability"), \
wcsrtombs (d, s, l, p))
#endif
/* Convert a wide string to a string. */
#if @GNULIB_WCSNRTOMBS@
# if !@HAVE_WCSNRTOMBS@
extern size_t wcsnrtombs (char *dest, const wchar_t **srcp, size_t srclen, size_t len, mbstate_t *ps);
# endif
#elif defined GNULIB_POSIXCHECK
# undef wcsnrtombs
# define wcsnrtombs(d,s,n,l,p) \
(GL_LINK_WARNING ("wcsnrtombs is unportable - " \
"use gnulib module wcsnrtombs for portability"), \
wcsnrtombs (d, s, n, l, p))
#endif #endif

View File

@ -1,5 +1,5 @@
# codeset.m4 serial 2 (gettext-0.16) # codeset.m4 serial 3 (gettext-0.18)
dnl Copyright (C) 2000-2002, 2006 Free Software Foundation, Inc. dnl Copyright (C) 2000-2002, 2006, 2008 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it, dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved. dnl with or without modifications, as long as this notice is preserved.
@ -8,14 +8,14 @@ dnl From Bruno Haible.
AC_DEFUN([AM_LANGINFO_CODESET], AC_DEFUN([AM_LANGINFO_CODESET],
[ [
AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset, AC_CACHE_CHECK([for nl_langinfo and CODESET], [am_cv_langinfo_codeset],
[AC_TRY_LINK([#include <langinfo.h>], [AC_TRY_LINK([#include <langinfo.h>],
[char* cs = nl_langinfo(CODESET); return !cs;], [char* cs = nl_langinfo(CODESET); return !cs;],
am_cv_langinfo_codeset=yes, [am_cv_langinfo_codeset=yes],
am_cv_langinfo_codeset=no) [am_cv_langinfo_codeset=no])
]) ])
if test $am_cv_langinfo_codeset = yes; then if test $am_cv_langinfo_codeset = yes; then
AC_DEFINE(HAVE_LANGINFO_CODESET, 1, AC_DEFINE([HAVE_LANGINFO_CODESET], 1,
[Define if you have <langinfo.h> and nl_langinfo(CODESET).]) [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
fi fi
]) ])

View File

@ -1,4 +1,4 @@
# errno_h.m4 serial 1 # errno_h.m4 serial 2
dnl Copyright (C) 2004, 2006, 2008 Free Software Foundation, Inc. dnl Copyright (C) 2004, 2006, 2008 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it, dnl gives unlimited permission to copy and/or distribute it,
@ -111,3 +111,9 @@ yes
AC_SUBST($1[_VALUE]) AC_SUBST($1[_VALUE])
fi fi
]) ])
dnl Autoconf >= 2.61 has AC_COMPUTE_INT built-in.
dnl Remove this when we can assume autoconf >= 2.61.
m4_ifdef([AC_COMPUTE_INT], [], [
AC_DEFUN([AC_COMPUTE_INT], [_AC_COMPUTE_INT([$2],[$1],[$3],[$4])])
])

View File

@ -1,4 +1,4 @@
# serial 5 -*- Autoconf -*- # serial 6 -*- Autoconf -*-
# Enable extensions on systems that normally disable them. # Enable extensions on systems that normally disable them.
# Copyright (C) 2003, 2006-2008 Free Software Foundation, Inc. # Copyright (C) 2003, 2006-2008 Free Software Foundation, Inc.
@ -24,6 +24,8 @@ AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS],
[AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl [AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl
AC_BEFORE([$0], [AC_RUN_IFELSE])dnl AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
AC_REQUIRE([AC_CANONICAL_HOST])
AC_CHECK_HEADER([minix/config.h], [MINIX=yes], [MINIX=]) AC_CHECK_HEADER([minix/config.h], [MINIX=yes], [MINIX=])
if test "$MINIX" = yes; then if test "$MINIX" = yes; then
AC_DEFINE([_POSIX_SOURCE], [1], AC_DEFINE([_POSIX_SOURCE], [1],
@ -36,6 +38,16 @@ AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
[Define to 1 if on MINIX.]) [Define to 1 if on MINIX.])
fi fi
dnl HP-UX 11.11 defines mbstate_t only if _XOPEN_SOURCE is defined to 500,
dnl regardless of whether the flags -Ae or _D_HPUX_SOURCE=1 are already
dnl provided.
case "$host_os" in
hpux*)
AC_DEFINE([_XOPEN_SOURCE], [500],
[Define to 500 only on HP-UX.])
;;
esac
AH_VERBATIM([__EXTENSIONS__], AH_VERBATIM([__EXTENSIONS__],
[/* Enable extensions on AIX 3, Interix. */ [/* Enable extensions on AIX 3, Interix. */
#ifndef _ALL_SOURCE #ifndef _ALL_SOURCE

View File

@ -1,4 +1,4 @@
# getaddrinfo.m4 serial 16 # getaddrinfo.m4 serial 19
dnl Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. dnl Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it, dnl gives unlimited permission to copy and/or distribute it,
@ -9,8 +9,21 @@ AC_DEFUN([gl_GETADDRINFO],
AC_REQUIRE([gl_HEADER_SYS_SOCKET])dnl for HAVE_SYS_SOCKET_H, HAVE_WINSOCK2_H AC_REQUIRE([gl_HEADER_SYS_SOCKET])dnl for HAVE_SYS_SOCKET_H, HAVE_WINSOCK2_H
AC_REQUIRE([gl_HEADER_NETDB])dnl for HAVE_NETDB_H AC_REQUIRE([gl_HEADER_NETDB])dnl for HAVE_NETDB_H
AC_MSG_NOTICE([checking how to do getaddrinfo, freeaddrinfo and getnameinfo]) AC_MSG_NOTICE([checking how to do getaddrinfo, freeaddrinfo and getnameinfo])
GETADDRINFO_LIB=
gai_saved_LIBS="$LIBS"
dnl Where is getaddrinfo()?
dnl - On Solaris, it is in libsocket.
dnl - On Haiku, it is in libnetwork.
dnl - On BeOS, it is in libnet.
dnl - On native Windows, it is in ws2_32.dll.
dnl - Otherwise it is in libc.
AC_SEARCH_LIBS(getaddrinfo, [socket network net],
[if test "$ac_cv_search_getaddrinfo" != "none required"; then
GETADDRINFO_LIB="$ac_cv_search_getaddrinfo"
fi])
LIBS="$gai_saved_LIBS $GETADDRINFO_LIB"
AC_SEARCH_LIBS(getaddrinfo, [nsl socket])
AC_CACHE_CHECK([for getaddrinfo], [gl_cv_func_getaddrinfo], [ AC_CACHE_CHECK([for getaddrinfo], [gl_cv_func_getaddrinfo], [
AC_TRY_LINK([ AC_TRY_LINK([
#include <sys/types.h> #include <sys/types.h>
@ -36,9 +49,11 @@ AC_DEFUN([gl_GETADDRINFO],
#endif #endif
#include <stddef.h> #include <stddef.h>
], [getaddrinfo(NULL, NULL, NULL, NULL);], gl_cv_w32_getaddrinfo=yes) ], [getaddrinfo(NULL, NULL, NULL, NULL);], gl_cv_w32_getaddrinfo=yes)
LIBS="$am_save_LIBS"]) LIBS="$am_save_LIBS"
])
if test "$gl_cv_w32_getaddrinfo" = "yes"; then if test "$gl_cv_w32_getaddrinfo" = "yes"; then
LIBS="$LIBS -lws2_32" GETADDRINFO_LIB="-lws2_32"
LIBS="$gai_saved_LIBS $GETADDRINFO_LIB"
else else
AC_LIBOBJ(getaddrinfo) AC_LIBOBJ(getaddrinfo)
fi fi
@ -68,31 +83,19 @@ AC_DEFUN([gl_GETADDRINFO],
AC_LIBOBJ(gai_strerror) AC_LIBOBJ(gai_strerror)
fi fi
LIBS="$gai_saved_LIBS"
gl_PREREQ_GETADDRINFO gl_PREREQ_GETADDRINFO
AC_SUBST([GETADDRINFO_LIB])
]) ])
# Prerequisites of lib/getaddrinfo.c. # Prerequisites of lib/netdb.in.h and lib/getaddrinfo.c.
AC_DEFUN([gl_PREREQ_GETADDRINFO], [ AC_DEFUN([gl_PREREQ_GETADDRINFO], [
AC_REQUIRE([gl_NETDB_H_DEFAULTS])
AC_REQUIRE([gl_HEADER_SYS_SOCKET])dnl for HAVE_SYS_SOCKET_H, HAVE_WINSOCK2_H AC_REQUIRE([gl_HEADER_SYS_SOCKET])dnl for HAVE_SYS_SOCKET_H, HAVE_WINSOCK2_H
AC_SEARCH_LIBS(gethostbyname, [inet nsl]) AC_REQUIRE([gl_HOSTENT]) dnl for HOSTENT_LIB
AC_SEARCH_LIBS(getservbyname, [inet nsl socket xnet]) AC_REQUIRE([gl_SERVENT]) dnl for SERVENT_LIB
AC_CHECK_FUNCS(gethostbyname,, [
AC_CACHE_CHECK(for gethostbyname in winsock2.h and -lws2_32,
gl_cv_w32_gethostbyname, [
gl_cv_w32_gethostbyname=no
am_save_LIBS="$LIBS"
LIBS="$LIBS -lws2_32"
AC_TRY_LINK([
#ifdef HAVE_WINSOCK2_H
#include <winsock2.h>
#endif
#include <stddef.h>
], [gethostbyname(NULL);], gl_cv_w32_gethostbyname=yes)
LIBS="$am_save_LIBS"])
if test "$gl_cv_w32_gethostbyname" = "yes"; then
LIBS="$LIBS -lws2_32"
fi
])
AC_REQUIRE([AC_C_RESTRICT]) AC_REQUIRE([AC_C_RESTRICT])
AC_REQUIRE([gl_SOCKET_FAMILIES]) AC_REQUIRE([gl_SOCKET_FAMILIES])
AC_REQUIRE([gl_HEADER_SYS_SOCKET]) AC_REQUIRE([gl_HEADER_SYS_SOCKET])
@ -104,6 +107,7 @@ AC_DEFUN([gl_PREREQ_GETADDRINFO], [
AC_CHECK_MEMBERS([struct sockaddr.sa_len], , , [#include <sys/socket.h>]) AC_CHECK_MEMBERS([struct sockaddr.sa_len], , , [#include <sys/socket.h>])
AC_CHECK_HEADERS_ONCE(netinet/in.h) AC_CHECK_HEADERS_ONCE(netinet/in.h)
AC_CHECK_DECLS([getaddrinfo, freeaddrinfo, gai_strerror, getnameinfo],,,[ AC_CHECK_DECLS([getaddrinfo, freeaddrinfo, gai_strerror, getnameinfo],,,[
/* sys/types.h is not needed according to POSIX, but the /* sys/types.h is not needed according to POSIX, but the
sys/socket.h in i386-unknown-freebsd4.10 and sys/socket.h in i386-unknown-freebsd4.10 and
@ -119,6 +123,19 @@ AC_DEFUN([gl_PREREQ_GETADDRINFO], [
#include <ws2tcpip.h> #include <ws2tcpip.h>
#endif #endif
]) ])
if test $ac_cv_have_decl_getaddrinfo = no; then
HAVE_DECL_GETADDRINFO=0
fi
if test $ac_cv_have_decl_freeaddrinfo = no; then
HAVE_DECL_FREEADDRINFO=0
fi
if test $ac_cv_have_decl_gai_strerror = no; then
HAVE_DECL_GAI_STRERROR=0
fi
if test $ac_cv_have_decl_getnameinfo = no; then
HAVE_DECL_GETNAMEINFO=0
fi
AC_CHECK_TYPES([struct addrinfo],,,[ AC_CHECK_TYPES([struct addrinfo],,,[
#include <sys/types.h> #include <sys/types.h>
#ifdef HAVE_SYS_SOCKET_H #ifdef HAVE_SYS_SOCKET_H
@ -131,4 +148,19 @@ AC_DEFUN([gl_PREREQ_GETADDRINFO], [
#include <ws2tcpip.h> #include <ws2tcpip.h>
#endif #endif
]) ])
if test $ac_cv_type_struct_addrinfo = no; then
HAVE_STRUCT_ADDRINFO=0
fi
dnl Append $HOSTENT_LIB to GETADDRINFO_LIB, avoiding gratuitous duplicates.
case " $GETADDRINFO_LIB " in
*" $HOSTENT_LIB "*) ;;
*) GETADDRINFO_LIB="$GETADDRINFO_LIB $HOSTENT_LIB" ;;
esac
dnl Append $SERVENT_LIB to GETADDRINFO_LIB, avoiding gratuitous duplicates.
case " $GETADDRINFO_LIB " in
*" $SERVENT_LIB "*) ;;
*) GETADDRINFO_LIB="$GETADDRINFO_LIB $SERVENT_LIB" ;;
esac
]) ])

View File

@ -1,5 +1,5 @@
# gettext.m4 serial 60 (gettext-0.17) # gettext.m4 serial 61 (gettext-0.18)
dnl Copyright (C) 1995-2007 Free Software Foundation, Inc. dnl Copyright (C) 1995-2008 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it, dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved. dnl with or without modifications, as long as this notice is preserved.
@ -127,7 +127,7 @@ AC_DEFUN([AM_GNU_GETTEXT],
[ --with-included-gettext use the GNU gettext library included here], [ --with-included-gettext use the GNU gettext library included here],
nls_cv_force_use_gnu_gettext=$withval, nls_cv_force_use_gnu_gettext=$withval,
nls_cv_force_use_gnu_gettext=no) nls_cv_force_use_gnu_gettext=no)
AC_MSG_RESULT($nls_cv_force_use_gnu_gettext) AC_MSG_RESULT([$nls_cv_force_use_gnu_gettext])
nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
if test "$nls_cv_force_use_gnu_gettext" != "yes"; then if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
@ -267,7 +267,7 @@ return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_a
if test "$gt_use_preinstalled_gnugettext" = "yes" \ if test "$gt_use_preinstalled_gnugettext" = "yes" \
|| test "$nls_cv_use_gnu_gettext" = "yes"; then || test "$nls_cv_use_gnu_gettext" = "yes"; then
AC_DEFINE(ENABLE_NLS, 1, AC_DEFINE([ENABLE_NLS], 1,
[Define to 1 if translation of program messages to the user's native language [Define to 1 if translation of program messages to the user's native language
is requested.]) is requested.])
else else
@ -301,9 +301,9 @@ return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_a
fi fi
dnl For backward compatibility. Some packages may be using this. dnl For backward compatibility. Some packages may be using this.
AC_DEFINE(HAVE_GETTEXT, 1, AC_DEFINE([HAVE_GETTEXT], 1,
[Define if the GNU gettext() function is already present or preinstalled.]) [Define if the GNU gettext() function is already present or preinstalled.])
AC_DEFINE(HAVE_DCGETTEXT, 1, AC_DEFINE([HAVE_DCGETTEXT], 1,
[Define if the GNU dcgettext() function is already present or preinstalled.]) [Define if the GNU dcgettext() function is already present or preinstalled.])
fi fi
@ -319,9 +319,9 @@ return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_a
fi fi
dnl Make all variables we use known to autoconf. dnl Make all variables we use known to autoconf.
AC_SUBST(BUILD_INCLUDED_LIBINTL) AC_SUBST([BUILD_INCLUDED_LIBINTL])
AC_SUBST(USE_INCLUDED_LIBINTL) AC_SUBST([USE_INCLUDED_LIBINTL])
AC_SUBST(CATOBJEXT) AC_SUBST([CATOBJEXT])
dnl For backward compatibility. Some configure.ins may be using this. dnl For backward compatibility. Some configure.ins may be using this.
nls_cv_header_intl= nls_cv_header_intl=
@ -329,36 +329,36 @@ return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_a
dnl For backward compatibility. Some Makefiles may be using this. dnl For backward compatibility. Some Makefiles may be using this.
DATADIRNAME=share DATADIRNAME=share
AC_SUBST(DATADIRNAME) AC_SUBST([DATADIRNAME])
dnl For backward compatibility. Some Makefiles may be using this. dnl For backward compatibility. Some Makefiles may be using this.
INSTOBJEXT=.mo INSTOBJEXT=.mo
AC_SUBST(INSTOBJEXT) AC_SUBST([INSTOBJEXT])
dnl For backward compatibility. Some Makefiles may be using this. dnl For backward compatibility. Some Makefiles may be using this.
GENCAT=gencat GENCAT=gencat
AC_SUBST(GENCAT) AC_SUBST([GENCAT])
dnl For backward compatibility. Some Makefiles may be using this. dnl For backward compatibility. Some Makefiles may be using this.
INTLOBJS= INTLOBJS=
if test "$USE_INCLUDED_LIBINTL" = yes; then if test "$USE_INCLUDED_LIBINTL" = yes; then
INTLOBJS="\$(GETTOBJS)" INTLOBJS="\$(GETTOBJS)"
fi fi
AC_SUBST(INTLOBJS) AC_SUBST([INTLOBJS])
dnl Enable libtool support if the surrounding package wishes it. dnl Enable libtool support if the surrounding package wishes it.
INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX) AC_SUBST([INTL_LIBTOOL_SUFFIX_PREFIX])
]) ])
dnl For backward compatibility. Some Makefiles may be using this. dnl For backward compatibility. Some Makefiles may be using this.
INTLLIBS="$LIBINTL" INTLLIBS="$LIBINTL"
AC_SUBST(INTLLIBS) AC_SUBST([INTLLIBS])
dnl Make all documented variables known to autoconf. dnl Make all documented variables known to autoconf.
AC_SUBST(LIBINTL) AC_SUBST([LIBINTL])
AC_SUBST(LTLIBINTL) AC_SUBST([LTLIBINTL])
AC_SUBST(POSUB) AC_SUBST([POSUB])
]) ])

View File

@ -1,5 +1,5 @@
# glibc2.m4 serial 1 # glibc2.m4 serial 2
dnl Copyright (C) 2000-2002, 2004 Free Software Foundation, Inc. dnl Copyright (C) 2000-2002, 2004, 2008 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it, dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved. dnl with or without modifications, as long as this notice is preserved.
@ -9,8 +9,8 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gt_GLIBC2], AC_DEFUN([gt_GLIBC2],
[ [
AC_CACHE_CHECK(whether we are using the GNU C Library 2 or newer, AC_CACHE_CHECK([whether we are using the GNU C Library 2 or newer],
ac_cv_gnu_library_2, [ac_cv_gnu_library_2],
[AC_EGREP_CPP([Lucky GNU user], [AC_EGREP_CPP([Lucky GNU user],
[ [
#include <features.h> #include <features.h>
@ -20,11 +20,11 @@ AC_DEFUN([gt_GLIBC2],
#endif #endif
#endif #endif
], ],
ac_cv_gnu_library_2=yes, [ac_cv_gnu_library_2=yes],
ac_cv_gnu_library_2=no) [ac_cv_gnu_library_2=no])
] ]
) )
AC_SUBST(GLIBC2) AC_SUBST([GLIBC2])
GLIBC2="$ac_cv_gnu_library_2" GLIBC2="$ac_cv_gnu_library_2"
] ]
) )

View File

@ -1,5 +1,5 @@
# glibc21.m4 serial 3 # glibc21.m4 serial 4
dnl Copyright (C) 2000-2002, 2004 Free Software Foundation, Inc. dnl Copyright (C) 2000-2002, 2004, 2008 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it, dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved. dnl with or without modifications, as long as this notice is preserved.
@ -9,8 +9,8 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_GLIBC21], AC_DEFUN([gl_GLIBC21],
[ [
AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer, AC_CACHE_CHECK([whether we are using the GNU C Library 2.1 or newer],
ac_cv_gnu_library_2_1, [ac_cv_gnu_library_2_1],
[AC_EGREP_CPP([Lucky GNU user], [AC_EGREP_CPP([Lucky GNU user],
[ [
#include <features.h> #include <features.h>
@ -20,11 +20,11 @@ AC_DEFUN([gl_GLIBC21],
#endif #endif
#endif #endif
], ],
ac_cv_gnu_library_2_1=yes, [ac_cv_gnu_library_2_1=yes],
ac_cv_gnu_library_2_1=no) [ac_cv_gnu_library_2_1=no])
] ]
) )
AC_SUBST(GLIBC21) AC_SUBST([GLIBC21])
GLIBC21="$ac_cv_gnu_library_2_1" GLIBC21="$ac_cv_gnu_library_2_1"
] ]
) )

View File

@ -1,4 +1,4 @@
# Copyright (C) 2002-2008 Free Software Foundation, Inc. # Copyright (C) 2002-2009 Free Software Foundation, Inc.
# #
# This file is free software, distributed under the terms of the GNU # This file is free software, distributed under the terms of the GNU
# General Public License. As a special exception to the GNU General # General Public License. As a special exception to the GNU General
@ -15,7 +15,7 @@
# Specification in the form of a command-line invocation: # Specification in the form of a command-line invocation:
# gnulib-tool --import --dir=. --lib=libgnu --source-base=gnulib/lib --m4-base=gnulib/m4 --doc-base=doc --tests-base=gnulib/tests --aux-dir=build-aux --with-tests --lgpl=2 --libtool --macro-prefix=gl c-ctype close connect getaddrinfo gethostname getpass gettext inet_pton mkstemp mktempd perror physmem poll posix-shell recv send setsockopt socket strerror strndup strsep sys_stat useless-if-before-free vasprintf vc-list-files verify # gnulib-tool --import --dir=. --lib=libgnu --source-base=gnulib/lib --m4-base=gnulib/m4 --doc-base=doc --tests-base=gnulib/tests --aux-dir=build-aux --with-tests --lgpl=2 --libtool --macro-prefix=gl c-ctype close connect getaddrinfo gethostname getpass gettext inet_pton mkstemp mktempd perror physmem poll posix-shell recv send setsockopt socket strerror strndup strsep sys_stat time_r useless-if-before-free vasprintf vc-list-files verify
# Specification in the form of a few gnulib-tool.m4 macro invocations: # Specification in the form of a few gnulib-tool.m4 macro invocations:
gl_LOCAL_DIR([]) gl_LOCAL_DIR([])
@ -42,6 +42,7 @@ gl_MODULES([
strndup strndup
strsep strsep
sys_stat sys_stat
time_r
useless-if-before-free useless-if-before-free
vasprintf vasprintf
vc-list-files vc-list-files

View File

@ -1,5 +1,5 @@
# DO NOT EDIT! GENERATED AUTOMATICALLY! # DO NOT EDIT! GENERATED AUTOMATICALLY!
# Copyright (C) 2002-2008 Free Software Foundation, Inc. # Copyright (C) 2002-2009 Free Software Foundation, Inc.
# #
# This file is free software, distributed under the terms of the GNU # This file is free software, distributed under the terms of the GNU
# General Public License. As a special exception to the GNU General # General Public License. As a special exception to the GNU General
@ -77,6 +77,7 @@ AC_SUBST([LTALLOCA])
AC_SUBST([LIBINTL]) AC_SUBST([LIBINTL])
AC_SUBST([LTLIBINTL]) AC_SUBST([LTLIBINTL])
gl_FUNC_GETTIMEOFDAY gl_FUNC_GETTIMEOFDAY
gl_HOSTENT
gl_INET_NTOP gl_INET_NTOP
gl_ARPA_INET_MODULE_INDICATOR([inet_ntop]) gl_ARPA_INET_MODULE_INDICATOR([inet_ntop])
gl_INET_PTON gl_INET_PTON
@ -89,6 +90,7 @@ AC_SUBST([LTALLOCA])
gl_STDLIB_MODULE_INDICATOR([malloc-posix]) gl_STDLIB_MODULE_INDICATOR([malloc-posix])
gl_FUNC_MKSTEMP gl_FUNC_MKSTEMP
gl_STDLIB_MODULE_INDICATOR([mkstemp]) gl_STDLIB_MODULE_INDICATOR([mkstemp])
gl_MULTIARCH
gl_HEADER_NETDB gl_HEADER_NETDB
gl_HEADER_NETINET_IN gl_HEADER_NETINET_IN
AC_PROG_MKDIR_P AC_PROG_MKDIR_P
@ -109,6 +111,7 @@ AC_SUBST([LTALLOCA])
AC_LIBOBJ([send]) AC_LIBOBJ([send])
fi fi
gl_SYS_SOCKET_MODULE_INDICATOR([send]) gl_SYS_SOCKET_MODULE_INDICATOR([send])
gl_SERVENT
AC_REQUIRE([gl_HEADER_SYS_SOCKET]) AC_REQUIRE([gl_HEADER_SYS_SOCKET])
if test "$ac_cv_header_winsock2_h" = yes; then if test "$ac_cv_header_winsock2_h" = yes; then
AC_LIBOBJ([setsockopt]) AC_LIBOBJ([setsockopt])
@ -136,8 +139,6 @@ AC_SUBST([LTALLOCA])
gl_STRING_MODULE_INDICATOR([strndup]) gl_STRING_MODULE_INDICATOR([strndup])
gl_FUNC_STRNLEN gl_FUNC_STRNLEN
gl_STRING_MODULE_INDICATOR([strnlen]) gl_STRING_MODULE_INDICATOR([strnlen])
gl_FUNC_STRPBRK
gl_STRING_MODULE_INDICATOR([strpbrk])
gl_FUNC_STRSEP gl_FUNC_STRSEP
gl_STRING_MODULE_INDICATOR([strsep]) gl_STRING_MODULE_INDICATOR([strsep])
gl_HEADER_SYS_SELECT gl_HEADER_SYS_SELECT
@ -150,6 +151,8 @@ AC_SUBST([LTALLOCA])
gl_HEADER_SYS_TIME_H gl_HEADER_SYS_TIME_H
AC_PROG_MKDIR_P AC_PROG_MKDIR_P
gl_FUNC_GEN_TEMPNAME gl_FUNC_GEN_TEMPNAME
gl_HEADER_TIME_H
gl_TIME_R
gl_UNISTD_H gl_UNISTD_H
gl_FUNC_VASNPRINTF gl_FUNC_VASNPRINTF
gl_FUNC_VASPRINTF gl_FUNC_VASPRINTF
@ -384,7 +387,6 @@ AC_DEFUN([gl_FILE_LIST], [
lib/string.in.h lib/string.in.h
lib/strndup.c lib/strndup.c
lib/strnlen.c lib/strnlen.c
lib/strpbrk.c
lib/strsep.c lib/strsep.c
lib/sys_select.in.h lib/sys_select.in.h
lib/sys_socket.in.h lib/sys_socket.in.h
@ -392,6 +394,8 @@ AC_DEFUN([gl_FILE_LIST], [
lib/sys_time.in.h lib/sys_time.in.h
lib/tempname.c lib/tempname.c
lib/tempname.h lib/tempname.h
lib/time.in.h
lib/time_r.c
lib/unistd.in.h lib/unistd.in.h
lib/vasnprintf.c lib/vasnprintf.c
lib/vasnprintf.h lib/vasnprintf.h
@ -419,6 +423,7 @@ AC_DEFUN([gl_FILE_LIST], [
m4/glibc2.m4 m4/glibc2.m4
m4/glibc21.m4 m4/glibc21.m4
m4/gnulib-common.m4 m4/gnulib-common.m4
m4/hostent.m4
m4/iconv.m4 m4/iconv.m4
m4/include_next.m4 m4/include_next.m4
m4/inet_ntop.m4 m4/inet_ntop.m4
@ -441,6 +446,7 @@ AC_DEFUN([gl_FILE_LIST], [
m4/lstat.m4 m4/lstat.m4
m4/malloc.m4 m4/malloc.m4
m4/mkstemp.m4 m4/mkstemp.m4
m4/multiarch.m4
m4/netdb_h.m4 m4/netdb_h.m4
m4/netinet_in_h.m4 m4/netinet_in_h.m4
m4/nls.m4 m4/nls.m4
@ -454,6 +460,7 @@ AC_DEFUN([gl_FILE_LIST], [
m4/printf.m4 m4/printf.m4
m4/progtest.m4 m4/progtest.m4
m4/realloc.m4 m4/realloc.m4
m4/servent.m4
m4/size_max.m4 m4/size_max.m4
m4/snprintf.m4 m4/snprintf.m4
m4/sockets.m4 m4/sockets.m4
@ -469,7 +476,6 @@ AC_DEFUN([gl_FILE_LIST], [
m4/string_h.m4 m4/string_h.m4
m4/strndup.m4 m4/strndup.m4
m4/strnlen.m4 m4/strnlen.m4
m4/strpbrk.m4
m4/strsep.m4 m4/strsep.m4
m4/sys_ioctl_h.m4 m4/sys_ioctl_h.m4
m4/sys_select_h.m4 m4/sys_select_h.m4
@ -478,6 +484,8 @@ AC_DEFUN([gl_FILE_LIST], [
m4/sys_time_h.m4 m4/sys_time_h.m4
m4/tempname.m4 m4/tempname.m4
m4/threadlib.m4 m4/threadlib.m4
m4/time_h.m4
m4/time_r.m4
m4/uintmax_t.m4 m4/uintmax_t.m4
m4/unistd_h.m4 m4/unistd_h.m4
m4/vasnprintf.m4 m4/vasnprintf.m4
@ -518,6 +526,7 @@ AC_DEFUN([gl_FILE_LIST], [
tests/test-sys_socket.c tests/test-sys_socket.c
tests/test-sys_stat.c tests/test-sys_stat.c
tests/test-sys_time.c tests/test-sys_time.c
tests/test-time.c
tests/test-unistd.c tests/test-unistd.c
tests/test-vasnprintf.c tests/test-vasnprintf.c
tests/test-vasprintf.c tests/test-vasprintf.c

View File

@ -1,5 +1,5 @@
# iconv.m4 serial AM6 (gettext-0.17) # iconv.m4 serial AM6 (gettext-0.18)
dnl Copyright (C) 2000-2002, 2007 Free Software Foundation, Inc. dnl Copyright (C) 2000-2002, 2007-2008 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it, dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved. dnl with or without modifications, as long as this notice is preserved.
@ -34,7 +34,7 @@ AC_DEFUN([AM_ICONV_LINK],
am_save_CPPFLAGS="$CPPFLAGS" am_save_CPPFLAGS="$CPPFLAGS"
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV]) AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
AC_CACHE_CHECK([for iconv], am_cv_func_iconv, [ AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [
am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_func_iconv="no, consider installing GNU libiconv"
am_cv_lib_iconv=no am_cv_lib_iconv=no
AC_TRY_LINK([#include <stdlib.h> AC_TRY_LINK([#include <stdlib.h>
@ -42,7 +42,7 @@ AC_DEFUN([AM_ICONV_LINK],
[iconv_t cd = iconv_open("",""); [iconv_t cd = iconv_open("","");
iconv(cd,NULL,NULL,NULL,NULL); iconv(cd,NULL,NULL,NULL,NULL);
iconv_close(cd);], iconv_close(cd);],
am_cv_func_iconv=yes) [am_cv_func_iconv=yes])
if test "$am_cv_func_iconv" != yes; then if test "$am_cv_func_iconv" != yes; then
am_save_LIBS="$LIBS" am_save_LIBS="$LIBS"
LIBS="$LIBS $LIBICONV" LIBS="$LIBS $LIBICONV"
@ -51,13 +51,13 @@ AC_DEFUN([AM_ICONV_LINK],
[iconv_t cd = iconv_open("",""); [iconv_t cd = iconv_open("","");
iconv(cd,NULL,NULL,NULL,NULL); iconv(cd,NULL,NULL,NULL,NULL);
iconv_close(cd);], iconv_close(cd);],
am_cv_lib_iconv=yes [am_cv_lib_iconv=yes]
am_cv_func_iconv=yes) [am_cv_func_iconv=yes])
LIBS="$am_save_LIBS" LIBS="$am_save_LIBS"
fi fi
]) ])
if test "$am_cv_func_iconv" = yes; then if test "$am_cv_func_iconv" = yes; then
AC_CACHE_CHECK([for working iconv], am_cv_func_iconv_works, [ AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [
dnl This tests against bugs in AIX 5.1 and HP-UX 11.11. dnl This tests against bugs in AIX 5.1 and HP-UX 11.11.
am_save_LIBS="$LIBS" am_save_LIBS="$LIBS"
if test $am_cv_lib_iconv = yes; then if test $am_cv_lib_iconv = yes; then
@ -134,7 +134,7 @@ int main ()
am_func_iconv=no am_cv_lib_iconv=no am_func_iconv=no am_cv_lib_iconv=no
fi fi
if test "$am_func_iconv" = yes; then if test "$am_func_iconv" = yes; then
AC_DEFINE(HAVE_ICONV, 1, AC_DEFINE([HAVE_ICONV], 1,
[Define if you have the iconv() function and it works.]) [Define if you have the iconv() function and it works.])
fi fi
if test "$am_cv_lib_iconv" = yes; then if test "$am_cv_lib_iconv" = yes; then
@ -147,8 +147,8 @@ int main ()
LIBICONV= LIBICONV=
LTLIBICONV= LTLIBICONV=
fi fi
AC_SUBST(LIBICONV) AC_SUBST([LIBICONV])
AC_SUBST(LTLIBICONV) AC_SUBST([LTLIBICONV])
]) ])
AC_DEFUN([AM_ICONV], AC_DEFUN([AM_ICONV],
@ -156,7 +156,7 @@ AC_DEFUN([AM_ICONV],
AM_ICONV_LINK AM_ICONV_LINK
if test "$am_cv_func_iconv" = yes; then if test "$am_cv_func_iconv" = yes; then
AC_MSG_CHECKING([for iconv declaration]) AC_MSG_CHECKING([for iconv declaration])
AC_CACHE_VAL(am_cv_proto_iconv, [ AC_CACHE_VAL([am_cv_proto_iconv], [
AC_TRY_COMPILE([ AC_TRY_COMPILE([
#include <stdlib.h> #include <stdlib.h>
#include <iconv.h> #include <iconv.h>
@ -169,12 +169,12 @@ size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, si
#else #else
size_t iconv(); size_t iconv();
#endif #endif
], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const") ], [], [am_cv_proto_iconv_arg1=""], [am_cv_proto_iconv_arg1="const"])
am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"]) am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
AC_MSG_RESULT([$]{ac_t:- AC_MSG_RESULT([${ac_t:-
}[$]am_cv_proto_iconv) }$am_cv_proto_iconv])
AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1, AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1],
[Define as const if the declaration of iconv() needs const.]) [Define as const if the declaration of iconv() needs const.])
fi fi
]) ])

View File

@ -1,4 +1,4 @@
# include_next.m4 serial 8 # include_next.m4 serial 10
dnl Copyright (C) 2006-2008 Free Software Foundation, Inc. dnl Copyright (C) 2006-2008 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it, dnl gives unlimited permission to copy and/or distribute it,
@ -11,6 +11,10 @@ dnl
dnl INCLUDE_NEXT expands to 'include_next' if the compiler supports it, or to dnl INCLUDE_NEXT expands to 'include_next' if the compiler supports it, or to
dnl 'include' otherwise. dnl 'include' otherwise.
dnl dnl
dnl INCLUDE_NEXT_AS_FIRST_DIRECTIVE expands to 'include_next' if the compiler
dnl supports it in the special case that it is the first include directive in
dnl the given file, or to 'include' otherwise.
dnl
dnl PRAGMA_SYSTEM_HEADER can be used in files that contain #include_next, dnl PRAGMA_SYSTEM_HEADER can be used in files that contain #include_next,
dnl so as to avoid GCC warnings when the gcc option -pedantic is used. dnl so as to avoid GCC warnings when the gcc option -pedantic is used.
dnl '#pragma GCC system_header' has the same effect as if the file was found dnl '#pragma GCC system_header' has the same effect as if the file was found
@ -26,12 +30,26 @@ AC_DEFUN([gl_INCLUDE_NEXT],
AC_LANG_PREPROC_REQUIRE() AC_LANG_PREPROC_REQUIRE()
AC_CACHE_CHECK([whether the preprocessor supports include_next], AC_CACHE_CHECK([whether the preprocessor supports include_next],
[gl_cv_have_include_next], [gl_cv_have_include_next],
[rm -rf conftestd1 conftestd2 [rm -rf conftestd1a conftestd1b conftestd2
mkdir conftestd1 conftestd2 mkdir conftestd1a conftestd1b conftestd2
dnl The include of <stdio.h> is because IBM C 9.0 on AIX 6.1 supports dnl The include of <stdio.h> is because IBM C 9.0 on AIX 6.1 supports
dnl include_next when used as first preprocessor directive in a file, dnl include_next when used as first preprocessor directive in a file,
dnl but not when preceded by another include directive. dnl but not when preceded by another include directive. Additionally,
cat <<EOF > conftestd1/conftest.h dnl with this same compiler, include_next is a no-op when used in a
dnl header file that was included by specifying its absolute file name.
dnl Despite these two bugs, include_next is used in the compiler's
dnl <math.h>. By virtue of the second bug, we need to use include_next
dnl as well in this case.
cat <<EOF > conftestd1a/conftest.h
#define DEFINED_IN_CONFTESTD1
#include_next <conftest.h>
#ifdef DEFINED_IN_CONFTESTD2
int foo;
#else
#error "include_next doesn't work"
#endif
EOF
cat <<EOF > conftestd1b/conftest.h
#define DEFINED_IN_CONFTESTD1 #define DEFINED_IN_CONFTESTD1
#include <stdio.h> #include <stdio.h>
#include_next <conftest.h> #include_next <conftest.h>
@ -47,24 +65,36 @@ EOF
#endif #endif
#define DEFINED_IN_CONFTESTD2 #define DEFINED_IN_CONFTESTD2
EOF EOF
save_CPPFLAGS="$CPPFLAGS" gl_save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS -Iconftestd1 -Iconftestd2" CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
AC_COMPILE_IFELSE([#include <conftest.h>], AC_COMPILE_IFELSE([#include <conftest.h>],
[gl_cv_have_include_next=yes], [gl_cv_have_include_next=yes],
[gl_cv_have_include_next=no]) [CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
CPPFLAGS="$save_CPPFLAGS" AC_COMPILE_IFELSE([#include <conftest.h>],
rm -rf conftestd1 conftestd2 [gl_cv_have_include_next=buggy],
[gl_cv_have_include_next=no])
])
CPPFLAGS="$gl_save_CPPFLAGS"
rm -rf conftestd1a conftestd1b conftestd2
]) ])
PRAGMA_SYSTEM_HEADER= PRAGMA_SYSTEM_HEADER=
if test $gl_cv_have_include_next = yes; then if test $gl_cv_have_include_next = yes; then
INCLUDE_NEXT=include_next INCLUDE_NEXT=include_next
INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
if test -n "$GCC"; then if test -n "$GCC"; then
PRAGMA_SYSTEM_HEADER='#pragma GCC system_header' PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
fi fi
else else
INCLUDE_NEXT=include if test $gl_cv_have_include_next = buggy; then
INCLUDE_NEXT=include
INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
else
INCLUDE_NEXT=include
INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
fi
fi fi
AC_SUBST([INCLUDE_NEXT]) AC_SUBST([INCLUDE_NEXT])
AC_SUBST([INCLUDE_NEXT_AS_FIRST_DIRECTIVE])
AC_SUBST([PRAGMA_SYSTEM_HEADER]) AC_SUBST([PRAGMA_SYSTEM_HEADER])
]) ])
@ -87,6 +117,7 @@ EOF
AC_DEFUN([gl_CHECK_NEXT_HEADERS], AC_DEFUN([gl_CHECK_NEXT_HEADERS],
[ [
AC_REQUIRE([gl_INCLUDE_NEXT]) AC_REQUIRE([gl_INCLUDE_NEXT])
AC_REQUIRE([AC_CANONICAL_HOST])
AC_CHECK_HEADERS_ONCE([$1]) AC_CHECK_HEADERS_ONCE([$1])
m4_foreach_w([gl_HEADER_NAME], [$1], m4_foreach_w([gl_HEADER_NAME], [$1],
@ -105,11 +136,22 @@ AC_DEFUN([gl_CHECK_NEXT_HEADERS],
[AC_LANG_SOURCE( [AC_LANG_SOURCE(
[[#include <]]m4_dquote(m4_defn([gl_HEADER_NAME]))[[>]] [[#include <]]m4_dquote(m4_defn([gl_HEADER_NAME]))[[>]]
)]) )])
dnl eval is necessary to expand ac_cpp. dnl AIX "xlc -E" and "cc -E" omit #line directives for header files
dnl that contain only a #include of other header files and no
dnl non-comment tokens of their own. This leads to a failure to
dnl detect the absolute name of <dirent.h>, <signal.h>, <poll.h>
dnl and others. The workaround is to force preservation of comments
dnl through option -C. This ensures all necessary #line directives
dnl are present. GCC supports option -C as well.
case "$host_os" in
aix*) gl_absname_cpp="$ac_cpp -C" ;;
*) gl_absname_cpp="$ac_cpp" ;;
esac
dnl eval is necessary to expand gl_absname_cpp.
dnl Ultrix and Pyramid sh refuse to redirect output of eval, dnl Ultrix and Pyramid sh refuse to redirect output of eval,
dnl so use subshell. dnl so use subshell.
AS_VAR_SET([gl_next_header], AS_VAR_SET([gl_next_header],
['"'`(eval "$ac_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD | ['"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD |
sed -n '\#/]m4_quote(m4_defn([gl_HEADER_NAME]))[#{ sed -n '\#/]m4_quote(m4_defn([gl_HEADER_NAME]))[#{
s#.*"\(.*/]m4_quote(m4_defn([gl_HEADER_NAME]))[\)".*#\1# s#.*"\(.*/]m4_quote(m4_defn([gl_HEADER_NAME]))[\)".*#\1#
s#^/[^/]#//&# s#^/[^/]#//&#

View File

@ -1,5 +1,5 @@
# intdiv0.m4 serial 2 (gettext-0.17) # intdiv0.m4 serial 3 (gettext-0.18)
dnl Copyright (C) 2002, 2007 Free Software Foundation, Inc. dnl Copyright (C) 2002, 2007-2008 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it, dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved. dnl with or without modifications, as long as this notice is preserved.
@ -61,7 +61,7 @@ int main ()
nan = y / y; nan = y / y;
exit (1); exit (1);
} }
], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no, ], [gt_cv_int_divbyzero_sigfpe=yes], [gt_cv_int_divbyzero_sigfpe=no],
[ [
# Guess based on the CPU. # Guess based on the CPU.
changequote(,)dnl changequote(,)dnl
@ -79,6 +79,6 @@ changequote([,])dnl
*yes) value=1;; *yes) value=1;;
*) value=0;; *) value=0;;
esac esac
AC_DEFINE_UNQUOTED(INTDIV0_RAISES_SIGFPE, $value, AC_DEFINE_UNQUOTED([INTDIV0_RAISES_SIGFPE], [$value],
[Define if integer division by zero raises signal SIGFPE.]) [Define if integer division by zero raises signal SIGFPE.])
]) ])

View File

@ -1,5 +1,5 @@
# intlmacosx.m4 serial 1 (gettext-0.17) # intlmacosx.m4 serial 2 (gettext-0.18)
dnl Copyright (C) 2004-2007 Free Software Foundation, Inc. dnl Copyright (C) 2004-2008 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it, dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved. dnl with or without modifications, as long as this notice is preserved.
@ -19,7 +19,7 @@ AC_DEFUN([gt_INTL_MACOSX],
[ [
dnl Check for API introduced in MacOS X 10.2. dnl Check for API introduced in MacOS X 10.2.
AC_CACHE_CHECK([for CFPreferencesCopyAppValue], AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
gt_cv_func_CFPreferencesCopyAppValue, [gt_cv_func_CFPreferencesCopyAppValue],
[gt_save_LIBS="$LIBS" [gt_save_LIBS="$LIBS"
LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
AC_TRY_LINK([#include <CoreFoundation/CFPreferences.h>], AC_TRY_LINK([#include <CoreFoundation/CFPreferences.h>],
@ -32,7 +32,7 @@ AC_DEFUN([gt_INTL_MACOSX],
[Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.]) [Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.])
fi fi
dnl Check for API introduced in MacOS X 10.3. dnl Check for API introduced in MacOS X 10.3.
AC_CACHE_CHECK([for CFLocaleCopyCurrent], gt_cv_func_CFLocaleCopyCurrent, AC_CACHE_CHECK([for CFLocaleCopyCurrent], [gt_cv_func_CFLocaleCopyCurrent],
[gt_save_LIBS="$LIBS" [gt_save_LIBS="$LIBS"
LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
AC_TRY_LINK([#include <CoreFoundation/CFLocale.h>], [CFLocaleCopyCurrent();], AC_TRY_LINK([#include <CoreFoundation/CFLocale.h>], [CFLocaleCopyCurrent();],

View File

@ -1,5 +1,5 @@
# intmax.m4 serial 3 (gettext-0.16) # intmax.m4 serial 4 (gettext-0.18)
dnl Copyright (C) 2002-2005 Free Software Foundation, Inc. dnl Copyright (C) 2002-2005, 2008 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it, dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved. dnl with or without modifications, as long as this notice is preserved.
@ -12,7 +12,7 @@ AC_DEFUN([gt_TYPE_INTMAX_T],
[ [
AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
AC_REQUIRE([gl_AC_HEADER_STDINT_H]) AC_REQUIRE([gl_AC_HEADER_STDINT_H])
AC_CACHE_CHECK(for intmax_t, gt_cv_c_intmax_t, AC_CACHE_CHECK([for intmax_t], [gt_cv_c_intmax_t],
[AC_TRY_COMPILE([ [AC_TRY_COMPILE([
#include <stddef.h> #include <stddef.h>
#include <stdlib.h> #include <stdlib.h>
@ -24,10 +24,10 @@ AC_DEFUN([gt_TYPE_INTMAX_T],
#endif #endif
], [intmax_t x = -1; ], [intmax_t x = -1;
return !x;], return !x;],
gt_cv_c_intmax_t=yes, [gt_cv_c_intmax_t=yes],
gt_cv_c_intmax_t=no)]) [gt_cv_c_intmax_t=no])])
if test $gt_cv_c_intmax_t = yes; then if test $gt_cv_c_intmax_t = yes; then
AC_DEFINE(HAVE_INTMAX_T, 1, AC_DEFINE([HAVE_INTMAX_T], 1,
[Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>.]) [Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>.])
fi fi
]) ])

View File

@ -1,5 +1,5 @@
# inttypes-pri.m4 serial 4 (gettext-0.16) # inttypes-pri.m4 serial 5 (gettext-0.18)
dnl Copyright (C) 1997-2002, 2006 Free Software Foundation, Inc. dnl Copyright (C) 1997-2002, 2006, 2008 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it, dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved. dnl with or without modifications, as long as this notice is preserved.
@ -16,17 +16,17 @@ AC_DEFUN([gt_INTTYPES_PRI],
AC_CHECK_HEADERS([inttypes.h]) AC_CHECK_HEADERS([inttypes.h])
if test $ac_cv_header_inttypes_h = yes; then if test $ac_cv_header_inttypes_h = yes; then
AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken], AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken],
gt_cv_inttypes_pri_broken, [gt_cv_inttypes_pri_broken],
[ [
AC_TRY_COMPILE([#include <inttypes.h> AC_TRY_COMPILE([#include <inttypes.h>
#ifdef PRId32 #ifdef PRId32
char *p = PRId32; char *p = PRId32;
#endif #endif
], [], gt_cv_inttypes_pri_broken=no, gt_cv_inttypes_pri_broken=yes) ], [], [gt_cv_inttypes_pri_broken=no], [gt_cv_inttypes_pri_broken=yes])
]) ])
fi fi
if test "$gt_cv_inttypes_pri_broken" = yes; then if test "$gt_cv_inttypes_pri_broken" = yes; then
AC_DEFINE_UNQUOTED(PRI_MACROS_BROKEN, 1, AC_DEFINE_UNQUOTED([PRI_MACROS_BROKEN], 1,
[Define if <inttypes.h> exists and defines unusable PRI* macros.]) [Define if <inttypes.h> exists and defines unusable PRI* macros.])
PRI_MACROS_BROKEN=1 PRI_MACROS_BROKEN=1
else else

View File

@ -1,5 +1,5 @@
# inttypes_h.m4 serial 7 # inttypes_h.m4 serial 8
dnl Copyright (C) 1997-2004, 2006 Free Software Foundation, Inc. dnl Copyright (C) 1997-2004, 2006, 2008 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it, dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved. dnl with or without modifications, as long as this notice is preserved.
@ -11,15 +11,15 @@ dnl From Paul Eggert.
AC_DEFUN([gl_AC_HEADER_INTTYPES_H], AC_DEFUN([gl_AC_HEADER_INTTYPES_H],
[ [
AC_CACHE_CHECK([for inttypes.h], gl_cv_header_inttypes_h, AC_CACHE_CHECK([for inttypes.h], [gl_cv_header_inttypes_h],
[AC_TRY_COMPILE( [AC_TRY_COMPILE(
[#include <sys/types.h> [#include <sys/types.h>
#include <inttypes.h>], #include <inttypes.h>],
[uintmax_t i = (uintmax_t) -1; return !i;], [uintmax_t i = (uintmax_t) -1; return !i;],
gl_cv_header_inttypes_h=yes, [gl_cv_header_inttypes_h=yes],
gl_cv_header_inttypes_h=no)]) [gl_cv_header_inttypes_h=no])])
if test $gl_cv_header_inttypes_h = yes; then if test $gl_cv_header_inttypes_h = yes; then
AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1, AC_DEFINE_UNQUOTED([HAVE_INTTYPES_H_WITH_UINTMAX], 1,
[Define if <inttypes.h> exists, doesn't clash with <sys/types.h>, [Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
and declares uintmax_t. ]) and declares uintmax_t. ])
fi fi

View File

@ -1,5 +1,5 @@
# lcmessage.m4 serial 4 (gettext-0.14.2) # lcmessage.m4 serial 5 (gettext-0.18)
dnl Copyright (C) 1995-2002, 2004-2005 Free Software Foundation, Inc. dnl Copyright (C) 1995-2002, 2004-2005, 2008 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it, dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved. dnl with or without modifications, as long as this notice is preserved.
@ -20,11 +20,11 @@ dnl Ulrich Drepper <drepper@cygnus.com>, 1995.
AC_DEFUN([gt_LC_MESSAGES], AC_DEFUN([gt_LC_MESSAGES],
[ [
AC_CACHE_CHECK([for LC_MESSAGES], gt_cv_val_LC_MESSAGES, AC_CACHE_CHECK([for LC_MESSAGES], [gt_cv_val_LC_MESSAGES],
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES], [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
gt_cv_val_LC_MESSAGES=yes, gt_cv_val_LC_MESSAGES=no)]) [gt_cv_val_LC_MESSAGES=yes], [gt_cv_val_LC_MESSAGES=no])])
if test $gt_cv_val_LC_MESSAGES = yes; then if test $gt_cv_val_LC_MESSAGES = yes; then
AC_DEFINE(HAVE_LC_MESSAGES, 1, AC_DEFINE([HAVE_LC_MESSAGES], 1,
[Define if your <locale.h> file defines LC_MESSAGES.]) [Define if your <locale.h> file defines LC_MESSAGES.])
fi fi
]) ])

View File

@ -1,4 +1,4 @@
# lib-link.m4 serial 16 (gettext-0.18) # lib-link.m4 serial 17 (gettext-0.18)
dnl Copyright (C) 2001-2008 Free Software Foundation, Inc. dnl Copyright (C) 2001-2008 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it, dnl gives unlimited permission to copy and/or distribute it,
@ -446,12 +446,16 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
case "$found_dir" in case "$found_dir" in
*/$acl_libdirstem | */$acl_libdirstem/) */$acl_libdirstem | */$acl_libdirstem/)
basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
LIB[]NAME[]_PREFIX="$basedir" if test "$name" = '$1'; then
LIB[]NAME[]_PREFIX="$basedir"
fi
additional_includedir="$basedir/include" additional_includedir="$basedir/include"
;; ;;
*/$acl_libdirstem2 | */$acl_libdirstem2/) */$acl_libdirstem2 | */$acl_libdirstem2/)
basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
LIB[]NAME[]_PREFIX="$basedir" if test "$name" = '$1'; then
LIB[]NAME[]_PREFIX="$basedir"
fi
additional_includedir="$basedir/include" additional_includedir="$basedir/include"
;; ;;
esac esac

View File

@ -1,4 +1,4 @@
#serial 17 #serial 18
# Copyright (C) 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007, 2008 # Copyright (C) 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007, 2008
# Free Software Foundation, Inc. # Free Software Foundation, Inc.
@ -12,12 +12,16 @@ dnl From Jim Meyering.
AC_DEFUN([gl_FUNC_LSTAT], AC_DEFUN([gl_FUNC_LSTAT],
[ [
AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS]) AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS])
AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK dnl If lstat does not exist, the replacement <sys/stat.h> does
dnl Note: AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK does AC_LIBOBJ(lstat). dnl "#define lstat stat", and lstat.c does not need to be compiled.
if test $ac_cv_func_lstat_dereferences_slashed_symlink = no; then AC_CHECK_FUNCS_ONCE([lstat])
REPLACE_LSTAT=1 if test $ac_cv_func_lstat = yes; then
AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
dnl Note: AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK does AC_LIBOBJ(lstat).
if test $ac_cv_func_lstat_dereferences_slashed_symlink = no; then
REPLACE_LSTAT=1
fi
# Prerequisites of lib/lstat.c.
AC_REQUIRE([AC_C_INLINE])
fi fi
# Prerequisites of lib/lstat.c.
AC_REQUIRE([AC_C_INLINE])
:
]) ])

View File

@ -1,4 +1,4 @@
# netdb_h.m4 serial 3 # netdb_h.m4 serial 5
dnl Copyright (C) 2008 Free Software Foundation, Inc. dnl Copyright (C) 2008 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it, dnl gives unlimited permission to copy and/or distribute it,
@ -9,8 +9,14 @@ AC_DEFUN([gl_HEADER_NETDB],
AC_REQUIRE([gl_NETDB_H_DEFAULTS]) AC_REQUIRE([gl_NETDB_H_DEFAULTS])
gl_CHECK_NEXT_HEADERS([netdb.h]) gl_CHECK_NEXT_HEADERS([netdb.h])
if test $ac_cv_header_netdb_h = yes; then if test $ac_cv_header_netdb_h = yes; then
AC_CHECK_TYPES([struct addrinfo], [NETDB_H=''], [NETDB_H='netdb.h'], AC_COMPILE_IFELSE(
[[#include <netdb.h>]]) [AC_LANG_PROGRAM([[
#include <netdb.h>
struct addrinfo a;
int b = EAI_OVERFLOW;
int c = AI_NUMERICSERV;
]])],
[NETDB_H=''], [NETDB_H='netdb.h'])
HAVE_NETDB_H=1 HAVE_NETDB_H=1
else else
NETDB_H='netdb.h' NETDB_H='netdb.h'
@ -30,4 +36,10 @@ AC_DEFUN([gl_NETDB_MODULE_INDICATOR],
AC_DEFUN([gl_NETDB_H_DEFAULTS], AC_DEFUN([gl_NETDB_H_DEFAULTS],
[ [
GNULIB_GETADDRINFO=0; AC_SUBST([GNULIB_GETADDRINFO]) GNULIB_GETADDRINFO=0; AC_SUBST([GNULIB_GETADDRINFO])
dnl Assume proper GNU behavior unless another module says otherwise.
HAVE_STRUCT_ADDRINFO=1; AC_SUBST([HAVE_STRUCT_ADDRINFO])
HAVE_DECL_FREEADDRINFO=1; AC_SUBST([HAVE_DECL_FREEADDRINFO])
HAVE_DECL_GAI_STRERROR=1; AC_SUBST([HAVE_DECL_GAI_STRERROR])
HAVE_DECL_GETADDRINFO=1; AC_SUBST([HAVE_DECL_GETADDRINFO])
HAVE_DECL_GETNAMEINFO=1; AC_SUBST([HAVE_DECL_GETNAMEINFO])
]) ])

View File

@ -1,5 +1,5 @@
# nls.m4 serial 3 (gettext-0.15) # nls.m4 serial 4 (gettext-0.18)
dnl Copyright (C) 1995-2003, 2005-2006 Free Software Foundation, Inc. dnl Copyright (C) 1995-2003, 2005-2006, 2008 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it, dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved. dnl with or without modifications, as long as this notice is preserved.
@ -27,5 +27,5 @@ AC_DEFUN([AM_NLS],
[ --disable-nls do not use Native Language Support], [ --disable-nls do not use Native Language Support],
USE_NLS=$enableval, USE_NLS=yes) USE_NLS=$enableval, USE_NLS=yes)
AC_MSG_RESULT($USE_NLS) AC_MSG_RESULT($USE_NLS)
AC_SUBST(USE_NLS) AC_SUBST([USE_NLS])
]) ])

View File

@ -1,5 +1,5 @@
# po.m4 serial 15 (gettext-0.17) # po.m4 serial 16 (gettext-0.18)
dnl Copyright (C) 1995-2007 Free Software Foundation, Inc. dnl Copyright (C) 1995-2008 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it, dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved. dnl with or without modifications, as long as this notice is preserved.
@ -41,7 +41,7 @@ AC_DEFUN([AM_PO_SUBDIRS],
[$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 && [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
(if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
:) :)
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) AC_PATH_PROG([GMSGFMT], [gmsgfmt], [$MSGFMT])
dnl Test whether it is GNU msgfmt >= 0.15. dnl Test whether it is GNU msgfmt >= 0.15.
changequote(,)dnl changequote(,)dnl

View File

@ -1,4 +1,4 @@
# printf-posix.m4 serial 3 (gettext-0.17) # printf-posix.m4 serial 4 (gettext-0.18)
dnl Copyright (C) 2003, 2007 Free Software Foundation, Inc. dnl Copyright (C) 2003, 2007 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it, dnl gives unlimited permission to copy and/or distribute it,
@ -31,13 +31,14 @@ int main ()
#if defined __NetBSD__ || defined __BEOS__ || defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__ #if defined __NetBSD__ || defined __BEOS__ || defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__
notposix notposix
#endif #endif
], gt_cv_func_printf_posix="guessing no", ],
gt_cv_func_printf_posix="guessing yes") [gt_cv_func_printf_posix="guessing no"],
[gt_cv_func_printf_posix="guessing yes"])
]) ])
]) ])
case $gt_cv_func_printf_posix in case $gt_cv_func_printf_posix in
*yes) *yes)
AC_DEFINE(HAVE_POSIX_PRINTF, 1, AC_DEFINE([HAVE_POSIX_PRINTF], 1,
[Define if your printf() function supports format strings with positions.]) [Define if your printf() function supports format strings with positions.])
;; ;;
esac esac

View File

@ -1,4 +1,4 @@
# printf.m4 serial 23 # printf.m4 serial 25
dnl Copyright (C) 2003, 2007-2008 Free Software Foundation, Inc. dnl Copyright (C) 2003, 2007-2008 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it, dnl gives unlimited permission to copy and/or distribute it,
@ -811,12 +811,15 @@ dnl Result is gl_cv_func_printf_enomem.
AC_DEFUN([gl_PRINTF_ENOMEM], AC_DEFUN([gl_PRINTF_ENOMEM],
[ [
AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_PROG_CC])
AC_REQUIRE([gl_MULTIARCH])
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CACHE_CHECK([whether printf survives out-of-memory conditions], AC_CACHE_CHECK([whether printf survives out-of-memory conditions],
[gl_cv_func_printf_enomem], [gl_cv_func_printf_enomem],
[ [
gl_cv_func_printf_enomem="guessing no"
if test "$cross_compiling" = no; then if test "$cross_compiling" = no; then
AC_LANG_CONFTEST([AC_LANG_SOURCE([ if test $APPLE_UNIVERSAL_BUILD = 0; then
AC_LANG_CONFTEST([AC_LANG_SOURCE([
]GL_NOCRASH[ ]GL_NOCRASH[
changequote(,)dnl changequote(,)dnl
#include <stdio.h> #include <stdio.h>
@ -865,22 +868,29 @@ int main()
} }
changequote([,])dnl changequote([,])dnl
])]) ])])
if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then
(./conftest (./conftest
result=$? result=$?
if test $result != 0 && test $result != 77; then result=1; fi if test $result != 0 && test $result != 77; then result=1; fi
exit $result exit $result
) >/dev/null 2>/dev/null ) >/dev/null 2>/dev/null
case $? in case $? in
0) gl_cv_func_printf_enomem="yes" ;; 0) gl_cv_func_printf_enomem="yes" ;;
77) gl_cv_func_printf_enomem="guessing no" ;; 77) gl_cv_func_printf_enomem="guessing no" ;;
*) gl_cv_func_printf_enomem="no" ;; *) gl_cv_func_printf_enomem="no" ;;
esac esac
else
gl_cv_func_printf_enomem="guessing no"
fi
rm -fr conftest*
else else
dnl A universal build on Apple MacOS X platforms.
dnl The result would be 'no' in 32-bit mode and 'yes' in 64-bit mode.
dnl But we need a configuration result that is valid in both modes.
gl_cv_func_printf_enomem="guessing no" gl_cv_func_printf_enomem="guessing no"
fi fi
rm -fr conftest* fi
else if test "$gl_cv_func_printf_enomem" = "guessing no"; then
changequote(,)dnl changequote(,)dnl
case "$host_os" in case "$host_os" in
# Guess yes on glibc systems. # Guess yes on glibc systems.
@ -901,6 +911,8 @@ changequote(,)dnl
osf*) gl_cv_func_printf_enomem="guessing yes";; osf*) gl_cv_func_printf_enomem="guessing yes";;
# Guess yes on BeOS. # Guess yes on BeOS.
beos*) gl_cv_func_printf_enomem="guessing yes";; beos*) gl_cv_func_printf_enomem="guessing yes";;
# Guess yes on Haiku.
haiku*) gl_cv_func_printf_enomem="guessing yes";;
# If we don't know, assume the worst. # If we don't know, assume the worst.
*) gl_cv_func_printf_enomem="guessing no";; *) gl_cv_func_printf_enomem="guessing no";;
esac esac
@ -1305,5 +1317,6 @@ dnl OSF/1 5.1 # . # # # # . . . . # . . . .
dnl OSF/1 4.0d # . # # # # . . . . # . . # # # # # # dnl OSF/1 4.0d # . # # # # . . . . # . . # # # # # #
dnl NetBSD 4.0 . ? ? ? ? ? . . ? ? ? ? ? . . . ? ? ? dnl NetBSD 4.0 . ? ? ? ? ? . . ? ? ? ? ? . . . ? ? ?
dnl NetBSD 3.0 . . . . # # . # # ? # . # . . . . . . dnl NetBSD 3.0 . . . . # # . # # ? # . # . . . . . .
dnl Haiku . . . # # # . . . . . . ? . . . . . .
dnl BeOS # # . # # # . # . ? . # ? . . . . . . dnl BeOS # # . # # # . # . ? . # ? . . . . . .
dnl mingw # # # # # # . # # . # # ? . # # # . . dnl mingw # # # # # # . # # . # # ? . # # # . .

View File

@ -1,5 +1,5 @@
# progtest.m4 serial 4 (gettext-0.14.2) # progtest.m4 serial 5 (gettext-0.18)
dnl Copyright (C) 1996-2003, 2005 Free Software Foundation, Inc. dnl Copyright (C) 1996-2003, 2005, 2008 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it, dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved. dnl with or without modifications, as long as this notice is preserved.
@ -55,7 +55,7 @@ rm -f conf$$.file
# Extract the first word of "$2", so it can be a program name with args. # Extract the first word of "$2", so it can be a program name with args.
set dummy $2; ac_word=[$]2 set dummy $2; ac_word=[$]2
AC_MSG_CHECKING([for $ac_word]) AC_MSG_CHECKING([for $ac_word])
AC_CACHE_VAL(ac_cv_path_$1, AC_CACHE_VAL([ac_cv_path_$1],
[case "[$]$1" in [case "[$]$1" in
[[\\/]]* | ?:[[\\/]]*) [[\\/]]* | ?:[[\\/]]*)
ac_cv_path_$1="[$]$1" # Let the user override the test with a path. ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
@ -84,9 +84,9 @@ ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
esac])dnl esac])dnl
$1="$ac_cv_path_$1" $1="$ac_cv_path_$1"
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
AC_MSG_RESULT([$]$1) AC_MSG_RESULT([$][$1])
else else
AC_MSG_RESULT(no) AC_MSG_RESULT([no])
fi fi
AC_SUBST($1)dnl AC_SUBST($1)dnl
]) ])

View File

@ -1,5 +1,5 @@
# size_max.m4 serial 6 # size_max.m4 serial 7
dnl Copyright (C) 2003, 2005-2006 Free Software Foundation, Inc. dnl Copyright (C) 2003, 2005-2006, 2008 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it, dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved. dnl with or without modifications, as long as this notice is preserved.
@ -8,7 +8,7 @@ dnl From Bruno Haible.
AC_DEFUN([gl_SIZE_MAX], AC_DEFUN([gl_SIZE_MAX],
[ [
AC_CHECK_HEADERS(stdint.h) AC_CHECK_HEADERS([stdint.h])
dnl First test whether the system already has SIZE_MAX. dnl First test whether the system already has SIZE_MAX.
AC_MSG_CHECKING([for SIZE_MAX]) AC_MSG_CHECKING([for SIZE_MAX])
AC_CACHE_VAL([gl_cv_size_max], [ AC_CACHE_VAL([gl_cv_size_max], [
@ -21,16 +21,16 @@ AC_DEFUN([gl_SIZE_MAX],
#ifdef SIZE_MAX #ifdef SIZE_MAX
Found it Found it
#endif #endif
], gl_cv_size_max=yes) ], [gl_cv_size_max=yes])
if test -z "$gl_cv_size_max"; then if test -z "$gl_cv_size_max"; then
dnl Define it ourselves. Here we assume that the type 'size_t' is not wider dnl Define it ourselves. Here we assume that the type 'size_t' is not wider
dnl than the type 'unsigned long'. Try hard to find a definition that can dnl than the type 'unsigned long'. Try hard to find a definition that can
dnl be used in a preprocessor #if, i.e. doesn't contain a cast. dnl be used in a preprocessor #if, i.e. doesn't contain a cast.
AC_COMPUTE_INT([size_t_bits_minus_1], [sizeof (size_t) * CHAR_BIT - 1], AC_COMPUTE_INT([size_t_bits_minus_1], [sizeof (size_t) * CHAR_BIT - 1],
[#include <stddef.h> [#include <stddef.h>
#include <limits.h>], size_t_bits_minus_1=) #include <limits.h>], [size_t_bits_minus_1=])
AC_COMPUTE_INT([fits_in_uint], [sizeof (size_t) <= sizeof (unsigned int)], AC_COMPUTE_INT([fits_in_uint], [sizeof (size_t) <= sizeof (unsigned int)],
[#include <stddef.h>], fits_in_uint=) [#include <stddef.h>], [fits_in_uint=])
if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then
if test $fits_in_uint = 1; then if test $fits_in_uint = 1; then
dnl Even though SIZE_MAX fits in an unsigned int, it must be of type dnl Even though SIZE_MAX fits in an unsigned int, it must be of type
@ -38,7 +38,7 @@ Found it
AC_TRY_COMPILE([#include <stddef.h> AC_TRY_COMPILE([#include <stddef.h>
extern size_t foo; extern size_t foo;
extern unsigned long foo; extern unsigned long foo;
], [], fits_in_uint=0) ], [], [fits_in_uint=0])
fi fi
dnl We cannot use 'expr' to simplify this expression, because 'expr' dnl We cannot use 'expr' to simplify this expression, because 'expr'
dnl works only with 'long' integers in the host environment, while we dnl works only with 'long' integers in the host environment, while we

View File

@ -1,4 +1,4 @@
# sockets.m4 serial 2 # sockets.m4 serial 3
dnl Copyright (C) 2008 Free Software Foundation, Inc. dnl Copyright (C) 2008 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it, dnl gives unlimited permission to copy and/or distribute it,
@ -32,8 +32,10 @@ AC_DEFUN([gl_SOCKETS],
else else
dnl Unix API. dnl Unix API.
dnl Solaris has most socket functions in libsocket. dnl Solaris has most socket functions in libsocket.
AC_CACHE_CHECK([whether setsockopt requires -lsocket], [gl_cv_lib_socket], [ dnl Haiku has most socket functions in libnetwork.
gl_cv_lib_socket=no dnl BeOS has most socket functions in libnet.
AC_CACHE_CHECK([for library containing setsockopt], [gl_cv_lib_socket], [
gl_cv_lib_socket=
AC_TRY_LINK([extern AC_TRY_LINK([extern
#ifdef __cplusplus #ifdef __cplusplus
"C" "C"
@ -41,18 +43,39 @@ AC_DEFUN([gl_SOCKETS],
char setsockopt();], [setsockopt();], char setsockopt();], [setsockopt();],
[], [],
[gl_save_LIBS="$LIBS" [gl_save_LIBS="$LIBS"
LIBS="$LIBS -lsocket" LIBS="$gl_save_LIBS -lsocket"
AC_TRY_LINK([extern AC_TRY_LINK([extern
#ifdef __cplusplus #ifdef __cplusplus
"C" "C"
#endif #endif
char setsockopt();], [setsockopt();], char setsockopt();], [setsockopt();],
[gl_cv_lib_socket=yes]) [gl_cv_lib_socket="-lsocket"])
if test -z "$gl_cv_lib_socket"; then
LIBS="$gl_save_LIBS -lnetwork"
AC_TRY_LINK([extern
#ifdef __cplusplus
"C"
#endif
char setsockopt();], [setsockopt();],
[gl_cv_lib_socket="-lnetwork"])
if test -z "$gl_cv_lib_socket"; then
LIBS="$gl_save_LIBS -lnet"
AC_TRY_LINK([extern
#ifdef __cplusplus
"C"
#endif
char setsockopt();], [setsockopt();],
[gl_cv_lib_socket="-lnet"])
fi
fi
LIBS="$gl_save_LIBS" LIBS="$gl_save_LIBS"
]) ])
if test -z "$gl_cv_lib_socket"; then
gl_cv_lib_socket="none needed"
fi
]) ])
if test $gl_cv_lib_socket = yes; then if test "$gl_cv_lib_socket" != "none needed"; then
LIBSOCKET='-lsocket' LIBSOCKET="$gl_cv_lib_socket"
fi fi
fi fi
AC_SUBST([LIBSOCKET]) AC_SUBST([LIBSOCKET])

View File

@ -1,4 +1,4 @@
# stdint.m4 serial 31 # stdint.m4 serial 32
dnl Copyright (C) 2001-2008 Free Software Foundation, Inc. dnl Copyright (C) 2001-2008 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it, dnl gives unlimited permission to copy and/or distribute it,
@ -373,13 +373,22 @@ dnl Compute HAVE_SIGNED_t, BITSIZEOF_t and t_SUFFIX, for all the types t
dnl of interest to stdint.in.h. dnl of interest to stdint.in.h.
AC_DEFUN([gl_STDINT_TYPE_PROPERTIES], AC_DEFUN([gl_STDINT_TYPE_PROPERTIES],
[ [
gl_STDINT_BITSIZEOF([ptrdiff_t sig_atomic_t size_t wchar_t wint_t], AC_REQUIRE([gl_MULTIARCH])
if test $APPLE_UNIVERSAL_BUILD = 0; then
gl_STDINT_BITSIZEOF([ptrdiff_t size_t],
[gl_STDINT_INCLUDES])
fi
gl_STDINT_BITSIZEOF([sig_atomic_t wchar_t wint_t],
[gl_STDINT_INCLUDES]) [gl_STDINT_INCLUDES])
gl_CHECK_TYPES_SIGNED([sig_atomic_t wchar_t wint_t], gl_CHECK_TYPES_SIGNED([sig_atomic_t wchar_t wint_t],
[gl_STDINT_INCLUDES]) [gl_STDINT_INCLUDES])
gl_cv_type_ptrdiff_t_signed=yes gl_cv_type_ptrdiff_t_signed=yes
gl_cv_type_size_t_signed=no gl_cv_type_size_t_signed=no
gl_INTEGER_TYPE_SUFFIX([ptrdiff_t sig_atomic_t size_t wchar_t wint_t], if test $APPLE_UNIVERSAL_BUILD = 0; then
gl_INTEGER_TYPE_SUFFIX([ptrdiff_t size_t],
[gl_STDINT_INCLUDES])
fi
gl_INTEGER_TYPE_SUFFIX([sig_atomic_t wchar_t wint_t],
[gl_STDINT_INCLUDES]) [gl_STDINT_INCLUDES])
]) ])

View File

@ -1,5 +1,5 @@
# stdint_h.m4 serial 6 # stdint_h.m4 serial 7
dnl Copyright (C) 1997-2004, 2006 Free Software Foundation, Inc. dnl Copyright (C) 1997-2004, 2006, 2008 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it, dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved. dnl with or without modifications, as long as this notice is preserved.
@ -11,15 +11,15 @@ dnl From Paul Eggert.
AC_DEFUN([gl_AC_HEADER_STDINT_H], AC_DEFUN([gl_AC_HEADER_STDINT_H],
[ [
AC_CACHE_CHECK([for stdint.h], gl_cv_header_stdint_h, AC_CACHE_CHECK([for stdint.h], [gl_cv_header_stdint_h],
[AC_TRY_COMPILE( [AC_TRY_COMPILE(
[#include <sys/types.h> [#include <sys/types.h>
#include <stdint.h>], #include <stdint.h>],
[uintmax_t i = (uintmax_t) -1; return !i;], [uintmax_t i = (uintmax_t) -1; return !i;],
gl_cv_header_stdint_h=yes, [gl_cv_header_stdint_h=yes],
gl_cv_header_stdint_h=no)]) [gl_cv_header_stdint_h=no])])
if test $gl_cv_header_stdint_h = yes; then if test $gl_cv_header_stdint_h = yes; then
AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1, AC_DEFINE_UNQUOTED([HAVE_STDINT_H_WITH_UINTMAX], 1,
[Define if <stdint.h> exists, doesn't clash with <sys/types.h>, [Define if <stdint.h> exists, doesn't clash with <sys/types.h>,
and declares uintmax_t. ]) and declares uintmax_t. ])
fi fi

View File

@ -1,18 +0,0 @@
# strpbrk.m4 serial 4
dnl Copyright (C) 2002-2003, 2007 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_FUNC_STRPBRK],
[
AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
AC_REPLACE_FUNCS(strpbrk)
if test $ac_cv_func_strpbrk = no; then
HAVE_STRPBRK=0
gl_PREREQ_STRPBRK
fi
])
# Prerequisites of lib/strpbrk.c.
AC_DEFUN([gl_PREREQ_STRPBRK], [:])

View File

@ -1,4 +1,4 @@
# sys_ioctl_h.m4 serial 1 # sys_ioctl_h.m4 serial 2
dnl Copyright (C) 2008 Free Software Foundation, Inc. dnl Copyright (C) 2008 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it, dnl gives unlimited permission to copy and/or distribute it,
@ -19,10 +19,13 @@ AC_DEFUN([gl_SYS_IOCTL_H],
dnl header file, such as <unistd.h> or <stropts.h>, is needed for that. dnl header file, such as <unistd.h> or <stropts.h>, is needed for that.
AC_CACHE_CHECK([whether <sys/ioctl.h> declares ioctl], AC_CACHE_CHECK([whether <sys/ioctl.h> declares ioctl],
[gl_cv_decl_ioctl_in_sys_ioctl_h], [gl_cv_decl_ioctl_in_sys_ioctl_h],
[AC_CHECK_DECL([ioctl], [dnl We cannot use AC_CHECK_DECL because it produces its own messages.
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[AC_INCLUDES_DEFAULT([#include <sys/ioctl.h>])],
[(void) ioctl;])],
[gl_cv_decl_ioctl_in_sys_ioctl_h=yes], [gl_cv_decl_ioctl_in_sys_ioctl_h=yes],
[gl_cv_decl_ioctl_in_sys_ioctl_h=no], [gl_cv_decl_ioctl_in_sys_ioctl_h=no])
[#include <sys/ioctl.h>])
]) ])
if test $gl_cv_decl_ioctl_in_sys_ioctl_h != yes; then if test $gl_cv_decl_ioctl_in_sys_ioctl_h != yes; then
SYS_IOCTL_H='sys/ioctl.h' SYS_IOCTL_H='sys/ioctl.h'

View File

@ -1,4 +1,4 @@
# threadlib.m4 serial 1 (gettext-0.18) # threadlib.m4 serial 2 (gettext-0.18)
dnl Copyright (C) 2005-2008 Free Software Foundation, Inc. dnl Copyright (C) 2005-2008 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it, dnl gives unlimited permission to copy and/or distribute it,
@ -104,7 +104,8 @@ AC_DEFUN([gl_THREADLIB_BODY],
if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
# On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
# it groks <pthread.h>. It's added above, in gl_THREADLIB_EARLY_BODY. # it groks <pthread.h>. It's added above, in gl_THREADLIB_EARLY_BODY.
AC_CHECK_HEADER(pthread.h, gl_have_pthread_h=yes, gl_have_pthread_h=no) AC_CHECK_HEADER([pthread.h],
[gl_have_pthread_h=yes], [gl_have_pthread_h=no])
if test "$gl_have_pthread_h" = yes; then if test "$gl_have_pthread_h" = yes; then
# Other possible tests: # Other possible tests:
# -lpthreads (FSU threads, PCthreads) # -lpthreads (FSU threads, PCthreads)
@ -122,7 +123,7 @@ AC_DEFUN([gl_THREADLIB_BODY],
if test -n "$gl_have_pthread"; then if test -n "$gl_have_pthread"; then
# The program links fine without libpthread. But it may actually # The program links fine without libpthread. But it may actually
# need to link with libpthread in order to create multiple threads. # need to link with libpthread in order to create multiple threads.
AC_CHECK_LIB(pthread, pthread_kill, AC_CHECK_LIB([pthread], [pthread_kill],
[LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread [LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread
# On Solaris and HP-UX, most pthread functions exist also in libc. # On Solaris and HP-UX, most pthread functions exist also in libc.
# Therefore pthread_in_use() needs to actually try to create a # Therefore pthread_in_use() needs to actually try to create a
@ -136,13 +137,13 @@ AC_DEFUN([gl_THREADLIB_BODY],
]) ])
else else
# Some library is needed. Try libpthread and libc_r. # Some library is needed. Try libpthread and libc_r.
AC_CHECK_LIB(pthread, pthread_kill, AC_CHECK_LIB([pthread], [pthread_kill],
[gl_have_pthread=yes [gl_have_pthread=yes
LIBTHREAD=-lpthread LTLIBTHREAD=-lpthread LIBTHREAD=-lpthread LTLIBTHREAD=-lpthread
LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread]) LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread])
if test -z "$gl_have_pthread"; then if test -z "$gl_have_pthread"; then
# For FreeBSD 4. # For FreeBSD 4.
AC_CHECK_LIB(c_r, pthread_kill, AC_CHECK_LIB([c_r], [pthread_kill],
[gl_have_pthread=yes [gl_have_pthread=yes
LIBTHREAD=-lc_r LTLIBTHREAD=-lc_r LIBTHREAD=-lc_r LTLIBTHREAD=-lc_r
LIBMULTITHREAD=-lc_r LTLIBMULTITHREAD=-lc_r]) LIBMULTITHREAD=-lc_r LTLIBMULTITHREAD=-lc_r])
@ -192,11 +193,11 @@ AC_DEFUN([gl_THREADLIB_BODY],
fi fi
if test "$gl_use_threads" = pth; then if test "$gl_use_threads" = pth; then
gl_save_CPPFLAGS="$CPPFLAGS" gl_save_CPPFLAGS="$CPPFLAGS"
AC_LIB_LINKFLAGS(pth) AC_LIB_LINKFLAGS([pth])
gl_have_pth= gl_have_pth=
gl_save_LIBS="$LIBS" gl_save_LIBS="$LIBS"
LIBS="$LIBS -lpth" LIBS="$LIBS -lpth"
AC_TRY_LINK([#include <pth.h>], [pth_self();], gl_have_pth=yes) AC_TRY_LINK([#include <pth.h>], [pth_self();], [gl_have_pth=yes])
LIBS="$gl_save_LIBS" LIBS="$gl_save_LIBS"
if test -n "$gl_have_pth"; then if test -n "$gl_have_pth"; then
gl_threads_api=pth gl_threads_api=pth
@ -234,10 +235,10 @@ AC_DEFUN([gl_THREADLIB_BODY],
fi fi
AC_MSG_CHECKING([for multithread API to use]) AC_MSG_CHECKING([for multithread API to use])
AC_MSG_RESULT([$gl_threads_api]) AC_MSG_RESULT([$gl_threads_api])
AC_SUBST(LIBTHREAD) AC_SUBST([LIBTHREAD])
AC_SUBST(LTLIBTHREAD) AC_SUBST([LTLIBTHREAD])
AC_SUBST(LIBMULTITHREAD) AC_SUBST([LIBMULTITHREAD])
AC_SUBST(LTLIBMULTITHREAD) AC_SUBST([LTLIBMULTITHREAD])
]) ])
AC_DEFUN([gl_THREADLIB], AC_DEFUN([gl_THREADLIB],

74
gnulib/m4/time_h.m4 Normal file
View File

@ -0,0 +1,74 @@
# Configure a more-standard replacement for <time.h>.
# Copyright (C) 2000, 2001, 2003, 2004, 2005, 2006, 2007 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.
# Written by Paul Eggert and Jim Meyering.
AC_DEFUN([gl_HEADER_TIME_H],
[
dnl Use AC_REQUIRE here, so that the default behavior below is expanded
dnl once only, before all statements that occur in other macros.
AC_REQUIRE([gl_HEADER_TIME_H_BODY])
])
AC_DEFUN([gl_HEADER_TIME_H_BODY],
[
AC_REQUIRE([AC_C_RESTRICT])
AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS])
gl_CHECK_NEXT_HEADERS([time.h])
AC_REQUIRE([gl_CHECK_TYPE_STRUCT_TIMESPEC])
])
AC_DEFUN([gl_HEADER_TIME_H_DEFAULTS],
[
dnl If another module says to replace or to not replace, do that.
dnl Otherwise, replace only if someone compiles with -DGNULIB_PORTCHECK;
dnl this lets maintainers check for portability.
REPLACE_LOCALTIME_R=GNULIB_PORTCHECK; AC_SUBST([REPLACE_LOCALTIME_R])
REPLACE_NANOSLEEP=GNULIB_PORTCHECK; AC_SUBST([REPLACE_NANOSLEEP])
REPLACE_STRPTIME=GNULIB_PORTCHECK; AC_SUBST([REPLACE_STRPTIME])
REPLACE_TIMEGM=GNULIB_PORTCHECK; AC_SUBST([REPLACE_TIMEGM])
])
dnl Define HAVE_STRUCT_TIMESPEC if `struct timespec' is declared
dnl in time.h or sys/time.h.
AC_DEFUN([gl_CHECK_TYPE_STRUCT_TIMESPEC],
[
AC_CHECK_HEADERS_ONCE([sys/time.h])
AC_CACHE_CHECK([for struct timespec in <time.h>],
[gl_cv_sys_struct_timespec_in_time_h],
[AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[[#include <time.h>
]],
[[static struct timespec x; x.tv_sec = x.tv_nsec;]])],
[gl_cv_sys_struct_timespec_in_time_h=yes],
[gl_cv_sys_struct_timespec_in_time_h=no])])
TIME_H_DEFINES_STRUCT_TIMESPEC=0
SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
TIME_H_DEFINES_STRUCT_TIMESPEC=1
else
AC_CACHE_CHECK([for struct timespec in <sys/time.h>],
[gl_cv_sys_struct_timespec_in_sys_time_h],
[AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[[#include <sys/time.h>
]],
[[static struct timespec x; x.tv_sec = x.tv_nsec;]])],
[gl_cv_sys_struct_timespec_in_sys_time_h=yes],
[gl_cv_sys_struct_timespec_in_sys_time_h=no])])
if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
fi
fi
AC_SUBST([TIME_H_DEFINES_STRUCT_TIMESPEC])
AC_SUBST([SYS_TIME_H_DEFINES_STRUCT_TIMESPEC])
])

43
gnulib/m4/time_r.m4 Normal file
View File

@ -0,0 +1,43 @@
dnl Reentrant time functions like localtime_r.
dnl Copyright (C) 2003, 2006, 2007, 2008 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.
dnl Written by Paul Eggert.
AC_DEFUN([gl_TIME_R],
[
dnl Persuade glibc and Solaris <time.h> to declare localtime_r.
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS])
AC_REQUIRE([AC_C_RESTRICT])
AC_CACHE_CHECK([whether localtime_r is compatible with its POSIX signature],
[gl_cv_time_r_posix],
[AC_TRY_COMPILE(
[#include <time.h>],
[/* We don't need to append 'restrict's to the argument types,
even though the POSIX signature has the 'restrict's,
since C99 says they can't affect type compatibility. */
struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r;
if (ptr) return 0;
/* Check the return type is a pointer. On HP-UX 10 it is 'int'. */
*localtime_r (0, 0);],
[gl_cv_time_r_posix=yes],
[gl_cv_time_r_posix=no])])
if test $gl_cv_time_r_posix = yes; then
REPLACE_LOCALTIME_R=0
else
REPLACE_LOCALTIME_R=1
AC_LIBOBJ([time_r])
gl_PREREQ_TIME_R
fi
])
# Prerequisites of lib/time_r.c.
AC_DEFUN([gl_PREREQ_TIME_R], [
:
])

View File

@ -1,5 +1,5 @@
# uintmax_t.m4 serial 10 # uintmax_t.m4 serial 11
dnl Copyright (C) 1997-2004, 2007 Free Software Foundation, Inc. dnl Copyright (C) 1997-2004, 2007-2008 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it, dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved. dnl with or without modifications, as long as this notice is preserved.
@ -20,11 +20,11 @@ AC_DEFUN([gl_AC_TYPE_UINTMAX_T],
test $ac_cv_type_unsigned_long_long_int = yes \ test $ac_cv_type_unsigned_long_long_int = yes \
&& ac_type='unsigned long long' \ && ac_type='unsigned long long' \
|| ac_type='unsigned long' || ac_type='unsigned long'
AC_DEFINE_UNQUOTED(uintmax_t, $ac_type, AC_DEFINE_UNQUOTED([uintmax_t], [$ac_type],
[Define to unsigned long or unsigned long long [Define to unsigned long or unsigned long long
if <stdint.h> and <inttypes.h> don't define.]) if <stdint.h> and <inttypes.h> don't define.])
else else
AC_DEFINE(HAVE_UINTMAX_T, 1, AC_DEFINE([HAVE_UINTMAX_T], 1,
[Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>.]) [Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>.])
fi fi
]) ])

View File

@ -1,5 +1,5 @@
# visibility.m4 serial 1 (gettext-0.15) # visibility.m4 serial 2 (gettext-0.18)
dnl Copyright (C) 2005 Free Software Foundation, Inc. dnl Copyright (C) 2005, 2008 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it, dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved. dnl with or without modifications, as long as this notice is preserved.
@ -27,7 +27,7 @@ AC_DEFUN([gl_VISIBILITY],
HAVE_VISIBILITY=0 HAVE_VISIBILITY=0
if test -n "$GCC"; then if test -n "$GCC"; then
AC_MSG_CHECKING([for simple visibility declarations]) AC_MSG_CHECKING([for simple visibility declarations])
AC_CACHE_VAL(gl_cv_cc_visibility, [ AC_CACHE_VAL([gl_cv_cc_visibility], [
gl_save_CFLAGS="$CFLAGS" gl_save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -fvisibility=hidden" CFLAGS="$CFLAGS -fvisibility=hidden"
AC_TRY_COMPILE( AC_TRY_COMPILE(
@ -36,8 +36,8 @@ AC_DEFUN([gl_VISIBILITY],
extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void); extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
extern __attribute__((__visibility__("default"))) int exportedfunc (void);], extern __attribute__((__visibility__("default"))) int exportedfunc (void);],
[], [],
gl_cv_cc_visibility=yes, [gl_cv_cc_visibility=yes],
gl_cv_cc_visibility=no) [gl_cv_cc_visibility=no])
CFLAGS="$gl_save_CFLAGS"]) CFLAGS="$gl_save_CFLAGS"])
AC_MSG_RESULT([$gl_cv_cc_visibility]) AC_MSG_RESULT([$gl_cv_cc_visibility])
if test $gl_cv_cc_visibility = yes; then if test $gl_cv_cc_visibility = yes; then

View File

@ -7,7 +7,7 @@ dnl with or without modifications, as long as this notice is preserved.
dnl Written by Eric Blake. dnl Written by Eric Blake.
# wchar.m4 serial 6 # wchar.m4 serial 22
AC_DEFUN([gl_WCHAR_H], AC_DEFUN([gl_WCHAR_H],
[ [
@ -61,9 +61,39 @@ AC_DEFUN([gl_WCHAR_MODULE_INDICATOR],
AC_DEFUN([gl_WCHAR_H_DEFAULTS], AC_DEFUN([gl_WCHAR_H_DEFAULTS],
[ [
GNULIB_WCWIDTH=0; AC_SUBST([GNULIB_WCWIDTH]) GNULIB_BTOWC=0; AC_SUBST([GNULIB_BTOWC])
GNULIB_WCTOB=0; AC_SUBST([GNULIB_WCTOB])
GNULIB_MBSINIT=0; AC_SUBST([GNULIB_MBSINIT])
GNULIB_MBRTOWC=0; AC_SUBST([GNULIB_MBRTOWC])
GNULIB_MBRLEN=0; AC_SUBST([GNULIB_MBRLEN])
GNULIB_MBSRTOWCS=0; AC_SUBST([GNULIB_MBSRTOWCS])
GNULIB_MBSNRTOWCS=0; AC_SUBST([GNULIB_MBSNRTOWCS])
GNULIB_WCRTOMB=0; AC_SUBST([GNULIB_WCRTOMB])
GNULIB_WCSRTOMBS=0; AC_SUBST([GNULIB_WCSRTOMBS])
GNULIB_WCSNRTOMBS=0; AC_SUBST([GNULIB_WCSNRTOMBS])
GNULIB_WCWIDTH=0; AC_SUBST([GNULIB_WCWIDTH])
dnl Assume proper GNU behavior unless another module says otherwise. dnl Assume proper GNU behavior unless another module says otherwise.
HAVE_BTOWC=1; AC_SUBST([HAVE_BTOWC])
HAVE_MBSINIT=1; AC_SUBST([HAVE_MBSINIT])
HAVE_MBRTOWC=1; AC_SUBST([HAVE_MBRTOWC])
HAVE_MBRLEN=1; AC_SUBST([HAVE_MBRLEN])
HAVE_MBSRTOWCS=1; AC_SUBST([HAVE_MBSRTOWCS])
HAVE_MBSNRTOWCS=1; AC_SUBST([HAVE_MBSNRTOWCS])
HAVE_WCRTOMB=1; AC_SUBST([HAVE_WCRTOMB])
HAVE_WCSRTOMBS=1; AC_SUBST([HAVE_WCSRTOMBS])
HAVE_WCSNRTOMBS=1; AC_SUBST([HAVE_WCSNRTOMBS])
HAVE_DECL_WCTOB=1; AC_SUBST([HAVE_DECL_WCTOB])
HAVE_DECL_WCWIDTH=1; AC_SUBST([HAVE_DECL_WCWIDTH]) HAVE_DECL_WCWIDTH=1; AC_SUBST([HAVE_DECL_WCWIDTH])
REPLACE_MBSTATE_T=0; AC_SUBST([REPLACE_MBSTATE_T])
REPLACE_BTOWC=0; AC_SUBST([REPLACE_BTOWC])
REPLACE_WCTOB=0; AC_SUBST([REPLACE_WCTOB])
REPLACE_MBSINIT=0; AC_SUBST([REPLACE_MBSINIT])
REPLACE_MBRTOWC=0; AC_SUBST([REPLACE_MBRTOWC])
REPLACE_MBRLEN=0; AC_SUBST([REPLACE_MBRLEN])
REPLACE_MBSRTOWCS=0; AC_SUBST([REPLACE_MBSRTOWCS])
REPLACE_MBSNRTOWCS=0;AC_SUBST([REPLACE_MBSNRTOWCS])
REPLACE_WCRTOMB=0; AC_SUBST([REPLACE_WCRTOMB])
REPLACE_WCSRTOMBS=0; AC_SUBST([REPLACE_WCSRTOMBS])
REPLACE_WCWIDTH=0; AC_SUBST([REPLACE_WCWIDTH]) REPLACE_WCWIDTH=0; AC_SUBST([REPLACE_WCWIDTH])
WCHAR_H=''; AC_SUBST([WCHAR_H]) WCHAR_H=''; AC_SUBST([WCHAR_H])
]) ])

View File

@ -1,5 +1,5 @@
# wchar_t.m4 serial 1 (gettext-0.12) # wchar_t.m4 serial 2 (gettext-0.18)
dnl Copyright (C) 2002-2003 Free Software Foundation, Inc. dnl Copyright (C) 2002-2003, 2008 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it, dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved. dnl with or without modifications, as long as this notice is preserved.
@ -10,11 +10,11 @@ dnl Prerequisite: AC_PROG_CC
AC_DEFUN([gt_TYPE_WCHAR_T], AC_DEFUN([gt_TYPE_WCHAR_T],
[ [
AC_CACHE_CHECK([for wchar_t], gt_cv_c_wchar_t, AC_CACHE_CHECK([for wchar_t], [gt_cv_c_wchar_t],
[AC_TRY_COMPILE([#include <stddef.h> [AC_TRY_COMPILE([#include <stddef.h>
wchar_t foo = (wchar_t)'\0';], , wchar_t foo = (wchar_t)'\0';], ,
gt_cv_c_wchar_t=yes, gt_cv_c_wchar_t=no)]) [gt_cv_c_wchar_t=yes], [gt_cv_c_wchar_t=no])])
if test $gt_cv_c_wchar_t = yes; then if test $gt_cv_c_wchar_t = yes; then
AC_DEFINE(HAVE_WCHAR_T, 1, [Define if you have the 'wchar_t' type.]) AC_DEFINE([HAVE_WCHAR_T], 1, [Define if you have the 'wchar_t' type.])
fi fi
]) ])

View File

@ -1,5 +1,5 @@
# wint_t.m4 serial 2 (gettext-0.17) # wint_t.m4 serial 3 (gettext-0.18)
dnl Copyright (C) 2003, 2007 Free Software Foundation, Inc. dnl Copyright (C) 2003, 2007-2008 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it, dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved. dnl with or without modifications, as long as this notice is preserved.
@ -10,7 +10,7 @@ dnl Prerequisite: AC_PROG_CC
AC_DEFUN([gt_TYPE_WINT_T], AC_DEFUN([gt_TYPE_WINT_T],
[ [
AC_CACHE_CHECK([for wint_t], gt_cv_c_wint_t, AC_CACHE_CHECK([for wint_t], [gt_cv_c_wint_t],
[AC_TRY_COMPILE([ [AC_TRY_COMPILE([
/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
<wchar.h>. <wchar.h>.
@ -21,8 +21,8 @@ AC_DEFUN([gt_TYPE_WINT_T],
#include <time.h> #include <time.h>
#include <wchar.h> #include <wchar.h>
wint_t foo = (wchar_t)'\0';], , wint_t foo = (wchar_t)'\0';], ,
gt_cv_c_wint_t=yes, gt_cv_c_wint_t=no)]) [gt_cv_c_wint_t=yes], [gt_cv_c_wint_t=no])])
if test $gt_cv_c_wint_t = yes; then if test $gt_cv_c_wint_t = yes; then
AC_DEFINE(HAVE_WINT_T, 1, [Define if you have the 'wint_t' type.]) AC_DEFINE([HAVE_WINT_T], 1, [Define if you have the 'wint_t' type.])
fi fi
]) ])

View File

@ -1,5 +1,5 @@
# xsize.m4 serial 3 # xsize.m4 serial 4
dnl Copyright (C) 2003-2004 Free Software Foundation, Inc. dnl Copyright (C) 2003-2004, 2008 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it, dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved. dnl with or without modifications, as long as this notice is preserved.
@ -9,5 +9,5 @@ AC_DEFUN([gl_XSIZE],
dnl Prerequisites of lib/xsize.h. dnl Prerequisites of lib/xsize.h.
AC_REQUIRE([gl_SIZE_MAX]) AC_REQUIRE([gl_SIZE_MAX])
AC_REQUIRE([AC_C_INLINE]) AC_REQUIRE([AC_C_INLINE])
AC_CHECK_HEADERS(stdint.h) AC_CHECK_HEADERS([stdint.h])
]) ])

View File

@ -36,3 +36,4 @@ test-unistd
test-vasnprintf test-vasnprintf
test-vasprintf test-vasprintf
test-wchar test-wchar
test-time

View File

@ -36,3 +36,4 @@ test-unistd
test-vasnprintf test-vasnprintf
test-vasprintf test-vasprintf
test-wchar test-wchar
test-time

View File

@ -1,6 +1,6 @@
## DO NOT EDIT! GENERATED AUTOMATICALLY! ## DO NOT EDIT! GENERATED AUTOMATICALLY!
## Process this file with automake to produce Makefile.in. ## Process this file with automake to produce Makefile.in.
# Copyright (C) 2002-2008 Free Software Foundation, Inc. # Copyright (C) 2002-2009 Free Software Foundation, Inc.
# #
# This file is free software, distributed under the terms of the GNU # This file is free software, distributed under the terms of the GNU
# General Public License. As a special exception to the GNU General # General Public License. As a special exception to the GNU General
@ -109,7 +109,7 @@ EXTRA_DIST += test-fseeko.c test-fseeko.sh
TESTS += test-getaddrinfo TESTS += test-getaddrinfo
check_PROGRAMS += test-getaddrinfo check_PROGRAMS += test-getaddrinfo
test_getaddrinfo_LDADD = $(LDADD) @LIBINTL@ test_getaddrinfo_LDADD = $(LDADD) @GETADDRINFO_LIB@ @LIBINTL@
EXTRA_DIST += test-getaddrinfo.c EXTRA_DIST += test-getaddrinfo.c
@ -361,6 +361,15 @@ EXTRA_DIST += test-sys_time.c
## end gnulib module sys_time-tests ## end gnulib module sys_time-tests
## begin gnulib module time-tests
TESTS += test-time
check_PROGRAMS += test-time
EXTRA_DIST += test-time.c
## end gnulib module time-tests
## begin gnulib module unistd-tests ## begin gnulib module unistd-tests
TESTS += test-unistd TESTS += test-unistd

View File

@ -20,9 +20,9 @@
#ifndef SOCKETS_H #ifndef SOCKETS_H
# define SOCKETS_H 1 # define SOCKETS_H 1
#define SOCKETS_1_0 0x100 #define SOCKETS_1_0 0x100 /* don't use - does not work on Windows XP */
#define SOCKETS_1_1 0x101 #define SOCKETS_1_1 0x101
#define SOCKETS_2_0 0x200 #define SOCKETS_2_0 0x200 /* don't use - does not work on Windows XP */
#define SOCKETS_2_1 0x201 #define SOCKETS_2_1 0x201
#define SOCKETS_2_2 0x202 #define SOCKETS_2_2 0x202

29
gnulib/tests/test-time.c Normal file
View File

@ -0,0 +1,29 @@
/* Test of <time.h> substitute.
Copyright (C) 2007 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
#include <config.h>
#include <time.h>
struct timespec a;
int
main ()
{
return 0;
}

1
tests/.gitignore vendored
View File

@ -2,7 +2,6 @@ Makefile
Makefile.in Makefile.in
.deps .deps
.libs .libs
xmlrpctest
sexpr2xmltest sexpr2xmltest
xml2sexprtest xml2sexprtest
virshtest virshtest