summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2005-02-23 15:13:35 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2005-02-23 15:13:35 +0000
commit195dcbcca00a2c07ea18cf707261246d20c44c42 (patch)
treecd15d18951fbf819faece15aef0d75811fca1342
parent2db5c7115e5b37734993603c0381aab7e62c4be9 (diff)
downloadmailutils-195dcbcca00a2c07ea18cf707261246d20c44c42.tar.gz
mailutils-195dcbcca00a2c07ea18cf707261246d20c44c42.tar.bz2
Added to the repository by gnulib-sync
-rw-r--r--lib/xstrtoul.c6
-rw-r--r--m4/alloca.m442
-rw-r--r--m4/allocsa.m415
-rw-r--r--m4/argp.m417
-rw-r--r--m4/eealloc.m432
-rw-r--r--m4/eoverflow.m464
-rw-r--r--m4/error.m422
-rw-r--r--m4/exitfail.m411
-rw-r--r--m4/extensions.m426
-rw-r--r--m4/fnmatch.m4102
-rw-r--r--m4/getline.m474
-rw-r--r--m4/getndelim2.m425
-rw-r--r--m4/getpass.m437
-rw-r--r--m4/gettext_gl.m4487
-rw-r--r--m4/glibc21_gl.m430
-rw-r--r--m4/iconv.m4103
-rw-r--r--m4/intmax.m432
-rw-r--r--m4/intmax_t.m461
-rw-r--r--m4/inttypes.m427
-rw-r--r--m4/inttypes_h_gl.m426
-rw-r--r--m4/lib-ld_gl.m4110
-rw-r--r--m4/lib-prefix_gl.m4153
-rw-r--r--m4/longdouble.m430
-rw-r--r--m4/longlong_gl.m423
-rw-r--r--m4/mailbox-link.m4549
-rw-r--r--m4/mbstate_t.m430
-rw-r--r--m4/md5.m415
-rw-r--r--m4/mempcpy.m423
-rw-r--r--m4/nls.m449
-rw-r--r--m4/obstack.m423
-rw-r--r--m4/onceonly.m486
-rw-r--r--m4/po_gl.m4426
-rw-r--r--m4/printf-posix.m446
-rw-r--r--m4/progtest.m491
-rw-r--r--m4/restrict.m438
-rw-r--r--m4/setenv.m470
-rw-r--r--m4/signed.m419
-rw-r--r--m4/size_max.m461
-rw-r--r--m4/snprintf.m415
-rw-r--r--m4/ssize_t.m420
-rw-r--r--m4/stdbool.m483
-rw-r--r--m4/stdint_h_gl.m426
-rw-r--r--m4/strcase.m437
-rw-r--r--m4/strchrnul.m419
-rw-r--r--m4/strerror_r.m449
-rw-r--r--m4/strndup.m421
-rw-r--r--m4/strnlen.m425
-rw-r--r--m4/strtok_r.m417
-rw-r--r--m4/sysexits.m413
-rw-r--r--m4/uint32_t.m453
-rw-r--r--m4/uintmax_t_gl.m430
-rw-r--r--m4/ulonglong_gl.m423
-rw-r--r--m4/vasnprintf.m458
-rw-r--r--m4/vasprintf.m425
-rw-r--r--m4/vsnprintf.m415
-rw-r--r--m4/wchar_t.m422
-rw-r--r--m4/wint_t.m422
-rw-r--r--m4/xalloc.m422
-rw-r--r--m4/xsize.m414
-rw-r--r--m4/xstrtol.m433
-rw-r--r--mailbox/alloca.c491
-rw-r--r--mailbox/alloca_.h52
-rw-r--r--mailbox/asnprintf.c37
-rw-r--r--mailbox/getndelim2.c155
-rw-r--r--mailbox/getndelim2.h43
-rw-r--r--mailbox/getopt_.h227
-rw-r--r--mailbox/getopt_int.h131
-rw-r--r--mailbox/gettext.h68
-rw-r--r--mailbox/mempcpy.c29
-rw-r--r--mailbox/mempcpy.h36
-rw-r--r--mailbox/minmax.h53
-rw-r--r--mailbox/printf-args.c118
-rw-r--r--mailbox/printf-args.h136
-rw-r--r--mailbox/printf-parse.c536
-rw-r--r--mailbox/printf-parse.h74
-rw-r--r--mailbox/regex.h556
-rw-r--r--mailbox/strcase.h47
-rw-r--r--mailbox/strcasecmp.c66
-rw-r--r--mailbox/strchrnul.h28
-rw-r--r--mailbox/strncasecmp.c2
-rw-r--r--mailbox/strndup.h30
-rw-r--r--mailbox/strtok_r.h53
-rw-r--r--mailbox/sysexit_.h39
-rw-r--r--mailbox/vasnprintf.c896
-rw-r--r--mailbox/vasnprintf.h77
-rw-r--r--mailbox/vsnprintf.c58
-rw-r--r--mailbox/vsnprintf.h31
-rw-r--r--mailbox/xsize.h108
-rwxr-xr-xscripts/config.rpath548
89 files changed, 8448 insertions, 0 deletions
diff --git a/lib/xstrtoul.c b/lib/xstrtoul.c
new file mode 100644
index 000000000..285f7b96f
--- /dev/null
+++ b/lib/xstrtoul.c
@@ -0,0 +1,6 @@
+#define __strtol strtoul
+#define __strtol_t unsigned long int
+#define __xstrtol xstrtoul
+#define STRTOL_T_MINIMUM 0
+#define STRTOL_T_MAXIMUM ULONG_MAX
+#include "xstrtol.c"
diff --git a/m4/alloca.m4 b/m4/alloca.m4
new file mode 100644
index 000000000..a9e3f452c
--- /dev/null
+++ b/m4/alloca.m4
@@ -0,0 +1,42 @@
+# alloca.m4 serial 5
+dnl Copyright (C) 2002, 2003, 2004 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_ALLOCA],
+[
+ dnl Work around a bug of AC_EGREP_CPP in autoconf-2.57.
+ AC_REQUIRE([AC_PROG_CPP])
+ AC_REQUIRE([AC_PROG_EGREP])
+
+ AC_REQUIRE([AC_FUNC_ALLOCA])
+ if test $ac_cv_func_alloca_works = no; then
+ gl_PREREQ_ALLOCA
+ fi
+
+ # Define an additional variable used in the Makefile substitution.
+ if test $ac_cv_working_alloca_h = yes; then
+ AC_EGREP_CPP([Need own alloca], [
+#if defined __GNUC__ || defined _AIX || defined _MSC_VER
+ Need own alloca
+#endif
+ ],
+ [AC_DEFINE(HAVE_ALLOCA, 1,
+ [Define to 1 if you have `alloca' after including <alloca.h>,
+ a header that may be supplied by this distribution.])
+ ALLOCA_H=alloca.h],
+ [ALLOCA_H=])
+ else
+ ALLOCA_H=alloca.h
+ fi
+ AC_SUBST([ALLOCA_H])
+
+ AC_DEFINE(HAVE_ALLOCA_H, 1,
+ [Define HAVE_ALLOCA_H for backward compatibility with older code
+ that includes <alloca.h> only if HAVE_ALLOCA_H is defined.])
+])
+
+# Prerequisites of lib/alloca.c.
+# STACK_DIRECTION is already handled by AC_FUNC_ALLOCA.
+AC_DEFUN([gl_PREREQ_ALLOCA], [:])
diff --git a/m4/allocsa.m4 b/m4/allocsa.m4
new file mode 100644
index 000000000..474862fe3
--- /dev/null
+++ b/m4/allocsa.m4
@@ -0,0 +1,15 @@
+# allocsa.m4 serial 3
+dnl Copyright (C) 2003-2004 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_ALLOCSA],
+[
+ dnl Use the autoconf tests for alloca(), but not the AC_SUBSTed variables
+ dnl @ALLOCA@ and @LTALLOCA@.
+ AC_REQUIRE([gl_FUNC_ALLOCA])
+ AC_REQUIRE([gl_EEMALLOC])
+ AC_REQUIRE([gl_AC_TYPE_LONG_LONG])
+ AC_REQUIRE([gt_TYPE_LONGDOUBLE])
+])
diff --git a/m4/argp.m4 b/m4/argp.m4
new file mode 100644
index 000000000..c14f80994
--- /dev/null
+++ b/m4/argp.m4
@@ -0,0 +1,17 @@
+# argp.m4 serial 4
+dnl Copyright (C) 2003, 2004 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_ARGP],
+[
+ AC_REQUIRE([AC_C_INLINE])
+ dnl AC_REQUIRE([gl_FUNC_GLIBC_UNLOCKED_IO])
+ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+ AC_REQUIRE([gl_GETOPT_SUBSTITUTE])
+ AC_CHECK_DECLS([program_invocation_name, program_invocation_short_name],,,
+ [#include <errno.h>])
+ AC_CHECK_FUNCS_ONCE([flockfile funlockfile])
+ AC_CHECK_HEADERS_ONCE([features.h linewrap.h])
+])
diff --git a/m4/eealloc.m4 b/m4/eealloc.m4
new file mode 100644
index 000000000..adcfd06c9
--- /dev/null
+++ b/m4/eealloc.m4
@@ -0,0 +1,32 @@
+# eealloc.m4 serial 1
+dnl Copyright (C) 2003 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_EEALLOC],
+[
+ AC_REQUIRE([gl_EEMALLOC])
+ AC_REQUIRE([gl_EEREALLOC])
+ AC_REQUIRE([AC_C_INLINE])
+])
+
+AC_DEFUN([gl_EEMALLOC],
+[
+ _AC_FUNC_MALLOC_IF(
+ [gl_cv_func_malloc_0_nonnull=1],
+ [gl_cv_func_malloc_0_nonnull=0])
+ AC_DEFINE_UNQUOTED([MALLOC_0_IS_NONNULL], $gl_cv_func_malloc_0_nonnull,
+ [If malloc(0) is != NULL, define this to 1. Otherwise define this
+ to 0.])
+])
+
+AC_DEFUN([gl_EEREALLOC],
+[
+ _AC_FUNC_REALLOC_IF(
+ [gl_cv_func_realloc_0_nonnull=1],
+ [gl_cv_func_realloc_0_nonnull=0])
+ AC_DEFINE_UNQUOTED([REALLOC_0_IS_NONNULL], $gl_cv_func_realloc_0_nonnull,
+ [If realloc(NULL,0) is != NULL, define this to 1. Otherwise define this
+ to 0.])
+])
diff --git a/m4/eoverflow.m4 b/m4/eoverflow.m4
new file mode 100644
index 000000000..8c28ca305
--- /dev/null
+++ b/m4/eoverflow.m4
@@ -0,0 +1,64 @@
+# eoverflow.m4 serial 1
+dnl Copyright (C) 2004 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 From Bruno Haible.
+
+# The EOVERFLOW errno value ought to be defined in <errno.h>, according to
+# POSIX. But some systems (like AIX 3) don't define it, and some systems
+# (like OSF/1) define it when _XOPEN_SOURCE_EXTENDED is defined.
+
+# Define EOVERFLOW as a C macro and as a substituted macro in such a way that
+# 1. on all systems, after inclusion of <errno.h>, EOVERFLOW is usable,
+# 2. on systems where EOVERFLOW is defined elsewhere, we use the same numeric
+# value.
+
+AC_DEFUN([gl_EOVERFLOW],
+[
+ AC_REQUIRE([AC_PROG_CC])dnl
+
+ AC_CACHE_CHECK([for EOVERFLOW], ac_cv_decl_EOVERFLOW, [
+ AC_EGREP_CPP(yes,[
+#include <errno.h>
+#ifdef EOVERFLOW
+yes
+#endif
+ ], have_eoverflow=1)
+ if test -n "$have_eoverflow"; then
+ dnl EOVERFLOW exists in <errno.h>. Don't need to define EOVERFLOW ourselves.
+ ac_cv_decl_EOVERFLOW=yes
+ else
+ AC_EGREP_CPP(yes,[
+#define _XOPEN_SOURCE_EXTENDED 1
+#include <errno.h>
+#ifdef EOVERFLOW
+yes
+#endif
+ ], have_eoverflow=1)
+ if test -n "$have_eoverflow"; then
+ dnl EOVERFLOW exists but is hidden.
+ dnl Define it to the same value.
+ _AC_COMPUTE_INT([EOVERFLOW], ac_cv_decl_EOVERFLOW, [
+#define _XOPEN_SOURCE_EXTENDED 1
+#include <errno.h>
+/* The following two lines are a workaround against an autoconf-2.52 bug. */
+#include <stdio.h>
+#include <stdlib.h>
+])
+ else
+ dnl EOVERFLOW isn't defined by the system. Define EOVERFLOW ourselves, but
+ dnl don't define it as EINVAL, because snprintf() callers want to
+ dnl distinguish EINVAL and EOVERFLOW.
+ ac_cv_decl_EOVERFLOW=E2BIG
+ fi
+ fi
+ ])
+ if test "$ac_cv_decl_EOVERFLOW" != yes; then
+ AC_DEFINE_UNQUOTED([EOVERFLOW], [$ac_cv_decl_EOVERFLOW],
+ [Define as good substitute value for EOVERFLOW.])
+ EOVERFLOW="$ac_cv_decl_EOVERFLOW"
+ AC_SUBST(EOVERFLOW)
+ fi
+])
diff --git a/m4/error.m4 b/m4/error.m4
new file mode 100644
index 000000000..7c7746e2c
--- /dev/null
+++ b/m4/error.m4
@@ -0,0 +1,22 @@
+#serial 11
+
+# Copyright (C) 1996, 1997, 1998, 2001, 2002, 2003, 2004 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.
+
+AC_DEFUN([gl_ERROR],
+[
+ AC_FUNC_ERROR_AT_LINE
+ dnl Note: AC_FUNC_ERROR_AT_LINE does AC_LIBSOURCES([error.h, error.c]).
+ gl_PREREQ_ERROR
+])
+
+# Prerequisites of lib/error.c.
+AC_DEFUN([gl_PREREQ_ERROR],
+[
+ AC_REQUIRE([AC_FUNC_STRERROR_R])
+ :
+])
diff --git a/m4/exitfail.m4 b/m4/exitfail.m4
new file mode 100644
index 000000000..f25c64df8
--- /dev/null
+++ b/m4/exitfail.m4
@@ -0,0 +1,11 @@
+# exitfail.m4 serial 4
+dnl Copyright (C) 2002, 2003 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_EXITFAIL],
+[
+ dnl No prerequisites of lib/exitfail.c.
+ :
+])
diff --git a/m4/extensions.m4 b/m4/extensions.m4
new file mode 100644
index 000000000..6f34a8d35
--- /dev/null
+++ b/m4/extensions.m4
@@ -0,0 +1,26 @@
+# Enable extensions on systems that normally disable them.
+
+# Copyright (C) 2003 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.
+
+# gl_USE_SYSTEM_EXTENSIONS
+# ------------------------
+# Enable extensions on systems that normally disable them,
+# typically due to standards-conformance issues.
+AC_DEFUN([gl_USE_SYSTEM_EXTENSIONS], [
+ AC_BEFORE([$0], [AC_COMPILE_IFELSE])
+ AC_BEFORE([$0], [AC_RUN_IFELSE])
+
+ AC_REQUIRE([AC_GNU_SOURCE])
+ AC_REQUIRE([AC_AIX])
+ AC_REQUIRE([AC_MINIX])
+
+ AH_VERBATIM([__EXTENSIONS__],
+[/* Enable extensions on Solaris. */
+#ifndef __EXTENSIONS__
+# undef __EXTENSIONS__
+#endif])
+ AC_DEFINE([__EXTENSIONS__])
+])
diff --git a/m4/fnmatch.m4 b/m4/fnmatch.m4
new file mode 100644
index 000000000..bca15add1
--- /dev/null
+++ b/m4/fnmatch.m4
@@ -0,0 +1,102 @@
+# Check for fnmatch.
+
+# This is a modified version of autoconf's AC_FUNC_FNMATCH.
+# This file should be simplified after Autoconf 2.57 is required.
+
+# Copyright (C) 2000, 2001, 2002, 2003, 2004 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.
+
+# _AC_FUNC_FNMATCH_IF(STANDARD = GNU | POSIX, CACHE_VAR, IF-TRUE, IF-FALSE)
+# -------------------------------------------------------------------------
+# If a STANDARD compliant fnmatch is found, run IF-TRUE, otherwise
+# IF-FALSE. Use CACHE_VAR.
+AC_DEFUN([_AC_FUNC_FNMATCH_IF],
+[AC_CACHE_CHECK(
+ [for working $1 fnmatch],
+ [$2],
+ [dnl Some versions of Solaris, SCO, and the GNU C Library
+ dnl have a broken or incompatible fnmatch.
+ dnl So we run a test program. If we are cross-compiling, take no chance.
+ dnl Thanks to John Oleynick, François Pinard, and Paul Eggert for this test.
+ AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(
+ [
+# include <stdlib.h>
+# include <fnmatch.h>
+# define y(a, b, c) (fnmatch (a, b, c) == 0)
+# define n(a, b, c) (fnmatch (a, b, c) == FNM_NOMATCH)
+ ],
+ [exit
+ (!(y ("a*", "abc", 0)
+ && n ("d*/*1", "d/s/1", FNM_PATHNAME)
+ && y ("a\\\\bc", "abc", 0)
+ && n ("a\\\\bc", "abc", FNM_NOESCAPE)
+ && y ("*x", ".x", 0)
+ && n ("*x", ".x", FNM_PERIOD)
+ && m4_if([$1], [GNU],
+ [y ("xxXX", "xXxX", FNM_CASEFOLD)
+ && y ("a++(x|yy)b", "a+xyyyyxb", FNM_EXTMATCH)
+ && n ("d*/*1", "d/s/1", FNM_FILE_NAME)
+ && y ("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR)
+ && y ("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR)
+ && y ("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR)],
+ 1)));])],
+ [$2=yes],
+ [$2=no],
+ [$2=cross])])
+AS_IF([test $$2 = yes], [$3], [$4])
+])# _AC_FUNC_FNMATCH_IF
+
+
+# _AC_LIBOBJ_FNMATCH
+# ------------------
+# Prepare the replacement of fnmatch.
+AC_DEFUN([_AC_LIBOBJ_FNMATCH],
+[AC_REQUIRE([AC_C_CONST])dnl
+AC_REQUIRE([AC_FUNC_ALLOCA])dnl
+AC_REQUIRE([AC_TYPE_MBSTATE_T])dnl
+AC_CHECK_DECLS([getenv])
+AC_CHECK_FUNCS([btowc mbsrtowcs mempcpy wmemchr wmemcpy wmempcpy])
+AC_CHECK_HEADERS([wchar.h wctype.h])
+AC_LIBOBJ([fnmatch])
+FNMATCH_H=fnmatch.h
+])# _AC_LIBOBJ_FNMATCH
+
+
+AC_DEFUN([gl_FUNC_FNMATCH_POSIX],
+[
+ FNMATCH_H=
+ _AC_FUNC_FNMATCH_IF([POSIX], [ac_cv_func_fnmatch_posix],
+ [rm -f lib/fnmatch.h],
+ [_AC_LIBOBJ_FNMATCH])
+ if test $ac_cv_func_fnmatch_posix != yes; then
+ dnl We must choose a different name for our function, since on ELF systems
+ dnl a broken fnmatch() in libc.so would override our fnmatch() if it is
+ dnl compiled into a shared library.
+ AC_DEFINE([fnmatch], [posix_fnmatch],
+ [Define to a replacement function name for fnmatch().])
+ fi
+ AC_SUBST([FNMATCH_H])
+])
+
+
+AC_DEFUN([gl_FUNC_FNMATCH_GNU],
+[
+ dnl Persuade glibc <fnmatch.h> to declare FNM_CASEFOLD etc.
+ AC_REQUIRE([AC_GNU_SOURCE])
+
+ FNMATCH_H=
+ _AC_FUNC_FNMATCH_IF([GNU], [ac_cv_func_fnmatch_gnu],
+ [rm -f lib/fnmatch.h],
+ [_AC_LIBOBJ_FNMATCH])
+ if test $ac_cv_func_fnmatch_gnu != yes; then
+ dnl We must choose a different name for our function, since on ELF systems
+ dnl a broken fnmatch() in libc.so would override our fnmatch() if it is
+ dnl compiled into a shared library.
+ AC_DEFINE([fnmatch], [gnu_fnmatch],
+ [Define to a replacement function name for fnmatch().])
+ fi
+ AC_SUBST([FNMATCH_H])
+])
diff --git a/m4/getline.m4 b/m4/getline.m4
new file mode 100644
index 000000000..28dd0d247
--- /dev/null
+++ b/m4/getline.m4
@@ -0,0 +1,74 @@
+# getline.m4 serial 11
+
+dnl Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Free Software
+dnl Foundation, Inc.
+dnl
+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_PREREQ(2.52)
+
+dnl See if there's a working, system-supplied version of the getline function.
+dnl We can't just do MU_REPLACE_FUNCS(getline) because some systems
+dnl have a function by that name in -linet that doesn't have anything
+dnl to do with the function we need.
+AC_DEFUN([AM_FUNC_GETLINE],
+[
+ dnl Persuade glibc <stdio.h> to declare getline() and getdelim().
+ AC_REQUIRE([AC_GNU_SOURCE])
+
+ am_getline_needs_run_time_check=no
+ AC_CHECK_FUNC(getline,
+ dnl Found it in some library. Verify that it works.
+ am_getline_needs_run_time_check=yes,
+ am_cv_func_working_getline=no)
+ if test $am_getline_needs_run_time_check = yes; then
+ AC_CACHE_CHECK([for working getline fu