summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2012-07-30 10:12:32 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2012-07-30 10:12:32 +0000
commitde9112a07b48ab6a6f1560d39d8eb5e7df58cda1 (patch)
treed132a3bd09d3c786e794d91b6726a5eb72b2eebf
parente4977c19af306056bb5ecf8f7d8eabba8a0a6ef7 (diff)
obsdcompat: Drop asprintf() -- no longer used by pdfTeX and luaTeX
git-svn-id: svn://tug.org/texlive/trunk@27247 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Build/source/libs/obsdcompat/ChangeLog11
-rw-r--r--Build/source/libs/obsdcompat/Makefile.am19
-rw-r--r--Build/source/libs/obsdcompat/Makefile.in23
-rw-r--r--Build/source/libs/obsdcompat/bsd-asprintf.c101
-rwxr-xr-xBuild/source/libs/obsdcompat/configure214
-rw-r--r--Build/source/libs/obsdcompat/configure.ac53
-rw-r--r--Build/source/libs/obsdcompat/defines.h22
-rw-r--r--Build/source/libs/obsdcompat/obsdcompat/config.h.in24
-rw-r--r--Build/source/libs/obsdcompat/openbsd-compat.h26
-rw-r--r--Build/source/libs/obsdcompat/strlcpy.c10
10 files changed, 47 insertions, 456 deletions
diff --git a/Build/source/libs/obsdcompat/ChangeLog b/Build/source/libs/obsdcompat/ChangeLog
index e877183cfe2..62937b61eb5 100644
--- a/Build/source/libs/obsdcompat/ChangeLog
+++ b/Build/source/libs/obsdcompat/ChangeLog
@@ -1,3 +1,14 @@
+2012-07-29 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * bsd-asprintf.c (removed): We no longer use asprintf().
+ * Makefile.am (libopenbsd_compat_a_SOURCES): Drop bsd-asprintf.c.
+ * configure.ac: Drop tests for (v)asprintf, getrusage,
+ __progname, __FUNCTION__, __func__, va_copy, and __va_copy.
+ * defines.h: Drop STD{IN,OUT,ERR}_FILENO, roundup, and __P.
+ * openbsd-compat.h: Drop asprintf() and vasprintf() prototypes.
+
+ * strlcpy.c: Update from openbsd-compat of openssh 6.0p1.
+
2012-02-29 Peter Breitenlohner <peb@mppmu.mpg.de>
* configure.ac: Drop test for `optreset' (result is not used).
diff --git a/Build/source/libs/obsdcompat/Makefile.am b/Build/source/libs/obsdcompat/Makefile.am
index a06e666e153..51043bd2801 100644
--- a/Build/source/libs/obsdcompat/Makefile.am
+++ b/Build/source/libs/obsdcompat/Makefile.am
@@ -1,6 +1,6 @@
## Makefile.am for the TeX Live subdirectory libs/obsdcompat/
##
-## Copyright (C) 2009 Peter Breitenlohner <tex-live@tug.org>
+## Copyright (C) 2009, 2012 Peter Breitenlohner <tex-live@tug.org>
## You may freely use, modify and/or distribute this file.
##
ACLOCAL_AMFLAGS = -I ../../m4
@@ -11,11 +11,11 @@ rebuild: all
noinst_LIBRARIES = libopenbsd-compat.a
-compat_sources = \
- bsd-asprintf.c \
- bsd-snprintf.c
-
-openbsd_sources = \
+libopenbsd_compat_a_SOURCES = \
+ bsd-snprintf.c \
+ defines.h \
+ includes.h \
+ openbsd-compat.h \
strlcat.c \
strlcpy.c \
strsep.c \
@@ -23,10 +23,3 @@ openbsd_sources = \
strtonum.c \
strtoul.c
-libopenbsd_compat_a_SOURCES = \
- $(compat_sources) \
- $(openbsd_sources) \
- defines.h \
- includes.h \
- openbsd-compat.h
-
diff --git a/Build/source/libs/obsdcompat/Makefile.in b/Build/source/libs/obsdcompat/Makefile.in
index 15a65669bed..de5411a73f0 100644
--- a/Build/source/libs/obsdcompat/Makefile.in
+++ b/Build/source/libs/obsdcompat/Makefile.in
@@ -77,10 +77,9 @@ LIBRARIES = $(noinst_LIBRARIES)
ARFLAGS = cru
libopenbsd_compat_a_AR = $(AR) $(ARFLAGS)
libopenbsd_compat_a_LIBADD =
-am__objects_1 = bsd-asprintf.$(OBJEXT) bsd-snprintf.$(OBJEXT)
-am__objects_2 = strlcat.$(OBJEXT) strlcpy.$(OBJEXT) strsep.$(OBJEXT) \
+am_libopenbsd_compat_a_OBJECTS = bsd-snprintf.$(OBJEXT) \
+ strlcat.$(OBJEXT) strlcpy.$(OBJEXT) strsep.$(OBJEXT) \
strtoll.$(OBJEXT) strtonum.$(OBJEXT) strtoul.$(OBJEXT)
-am_libopenbsd_compat_a_OBJECTS = $(am__objects_1) $(am__objects_2)
libopenbsd_compat_a_OBJECTS = $(am_libopenbsd_compat_a_OBJECTS)
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/obsdcompat
depcomp = $(SHELL) $(top_srcdir)/../../build-aux/depcomp
@@ -223,11 +222,11 @@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
ACLOCAL_AMFLAGS = -I ../../m4
noinst_LIBRARIES = libopenbsd-compat.a
-compat_sources = \
- bsd-asprintf.c \
- bsd-snprintf.c
-
-openbsd_sources = \
+libopenbsd_compat_a_SOURCES = \
+ bsd-snprintf.c \
+ defines.h \
+ includes.h \
+ openbsd-compat.h \
strlcat.c \
strlcpy.c \
strsep.c \
@@ -235,13 +234,6 @@ openbsd_sources = \
strtonum.c \
strtoul.c
-libopenbsd_compat_a_SOURCES = \
- $(compat_sources) \
- $(openbsd_sources) \
- defines.h \
- includes.h \
- openbsd-compat.h
-
all: all-am
.SUFFIXES:
@@ -309,7 +301,6 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bsd-asprintf.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bsd-snprintf.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strlcat.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strlcpy.Po@am__quote@
diff --git a/Build/source/libs/obsdcompat/bsd-asprintf.c b/Build/source/libs/obsdcompat/bsd-asprintf.c
deleted file mode 100644
index 3368195d443..00000000000
--- a/Build/source/libs/obsdcompat/bsd-asprintf.c
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Copyright (c) 2004 Darren Tucker.
- *
- * Based originally on asprintf.c from OpenBSD:
- * Copyright (c) 1997 Todd C. Miller <Todd.Miller@courtesan.com>
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-#include "includes.h"
-
-#ifndef HAVE_VASPRINTF
-
-#include <errno.h>
-#include <stdarg.h>
-#include <stdlib.h>
-
-#ifndef VA_COPY
-# ifdef HAVE_VA_COPY
-# define VA_COPY(dest, src) va_copy(dest, src)
-# else
-# ifdef HAVE___VA_COPY
-# define VA_COPY(dest, src) __va_copy(dest, src)
-# else
-# define VA_COPY(dest, src) (dest) = (src)
-# endif
-# endif
-#endif
-
-#define INIT_SZ 128
-
-int
-vasprintf(char **str, const char *fmt, va_list ap)
-{
- int ret = -1;
- va_list ap2;
- char *string, *newstr;
- size_t len;
-
- VA_COPY(ap2, ap);
- if ((string = malloc(INIT_SZ)) == NULL)
- goto fail;
-
- ret = vsnprintf(string, INIT_SZ, fmt, ap2);
- if (ret >= 0 && ret < INIT_SZ) { /* succeeded with initial alloc */
- *str = string;
- } else if (ret == INT_MAX || ret < 0) { /* Bad length */
- free(string);
- goto fail;
- } else { /* bigger than initial, realloc allowing for nul */
- len = (size_t)ret + 1;
- if ((newstr = realloc(string, len)) == NULL) {
- free(string);
- goto fail;
- } else {
- va_end(ap2);
- VA_COPY(ap2, ap);
- ret = vsnprintf(newstr, len, fmt, ap2);
- if (ret >= 0 && (size_t)ret < len) {
- *str = newstr;
- } else { /* failed with realloc'ed string, give up */
- free(newstr);
- goto fail;
- }
- }
- }
- va_end(ap2);
- return (ret);
-
-fail:
- *str = NULL;
- errno = ENOMEM;
- va_end(ap2);
- return (-1);
-}
-#endif
-
-#ifndef HAVE_ASPRINTF
-int asprintf(char **str, const char *fmt, ...)
-{
- va_list ap;
- int ret;
-
- *str = NULL;
- va_start(ap, fmt);
- ret = vasprintf(str, fmt, ap);
- va_end(ap);
-
- return ret;
-}
-#endif
diff --git a/Build/source/libs/obsdcompat/configure b/Build/source/libs/obsdcompat/configure
index 9aecd3730f0..1b01fe01d8c 100755
--- a/Build/source/libs/obsdcompat/configure
+++ b/Build/source/libs/obsdcompat/configure
@@ -3,7 +3,7 @@
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for OpenBSD-Compat Portable.
#
-# Report bugs to <martin@pdftex.org>.
+# Report bugs to <tex-k@tug.org>.
#
#
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -267,7 +267,7 @@ fi
$as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
$as_echo "$0: be upgraded to zsh 4.3.4 or later."
else
- $as_echo "$0: Please tell bug-autoconf@gnu.org and martin@pdftex.org
+ $as_echo "$0: Please tell bug-autoconf@gnu.org and tex-k@tug.org
$0: about your system, including any error possibly output
$0: before this message. Then install a modern shell, or
$0: manually run the script under such a shell if you do
@@ -583,7 +583,7 @@ PACKAGE_NAME='OpenBSD-Compat'
PACKAGE_TARNAME='openbsd-compat'
PACKAGE_VERSION='Portable'
PACKAGE_STRING='OpenBSD-Compat Portable'
-PACKAGE_BUGREPORT='martin@pdftex.org'
+PACKAGE_BUGREPORT='tex-k@tug.org'
PACKAGE_URL=''
ac_unique_file="openbsd-compat.h"
@@ -1401,7 +1401,7 @@ Some influential environment variables:
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
-Report bugs to <martin@pdftex.org>.
+Report bugs to <tex-k@tug.org>.
_ACEOF
ac_status=$?
fi
@@ -1788,9 +1788,9 @@ $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
-( $as_echo "## -------------------------------- ##
-## Report this to martin@pdftex.org ##
-## -------------------------------- ##"
+( $as_echo "## ---------------------------- ##
+## Report this to tex-k@tug.org ##
+## ---------------------------- ##"
) | sed "s/^/$as_me: WARNING: /" >&2
;;
esac
@@ -5847,7 +5847,6 @@ done
for ac_func in \
- asprintf \
bcopy \
snprintf \
strdup \
@@ -5858,7 +5857,6 @@ for ac_func in \
strtoll \
strtoul \
sysconf \
- vasprintf \
vsnprintf \
do :
@@ -5873,21 +5871,6 @@ fi
done
-ac_fn_c_check_decl "$LINENO" "getrusage" "ac_cv_have_decl_getrusage" "$ac_includes_default"
-if test "x$ac_cv_have_decl_getrusage" = xyes; then :
- for ac_func in getrusage
-do :
- ac_fn_c_check_func "$LINENO" "getrusage" "ac_cv_func_getrusage"
-if test "x$ac_cv_func_getrusage" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_GETRUSAGE 1
-_ACEOF
-
-fi
-done
-
-fi
-
ac_fn_c_check_decl "$LINENO" "strsep" "ac_cv_have_decl_strsep" "
#ifdef HAVE_STRING_H
# include <string.h>
@@ -6867,187 +6850,6 @@ fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if libc defines __progname" >&5
-$as_echo_n "checking if libc defines __progname... " >&6; }
-if ${ac_cv_libc_defines___progname+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
- extern char *__progname; printf("%s", __progname);
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_libc_defines___progname="yes"
-else
- ac_cv_libc_defines___progname="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libc_defines___progname" >&5
-$as_echo "$ac_cv_libc_defines___progname" >&6; }
-if test "x$ac_cv_libc_defines___progname" = "xyes" ; then
-
-$as_echo "#define HAVE___PROGNAME 1" >>confdefs.h
-
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC implements __FUNCTION__" >&5
-$as_echo_n "checking whether $CC implements __FUNCTION__... " >&6; }
-if ${ac_cv_cc_implements___FUNCTION__+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-#include <stdio.h>
-
-int
-main ()
-{
- printf("%s", __FUNCTION__);
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_cc_implements___FUNCTION__="yes"
-else
- ac_cv_cc_implements___FUNCTION__="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_implements___FUNCTION__" >&5
-$as_echo "$ac_cv_cc_implements___FUNCTION__" >&6; }
-if test "x$ac_cv_cc_implements___FUNCTION__" = "xyes" ; then
-
-$as_echo "#define HAVE___FUNCTION__ 1" >>confdefs.h
-
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC implements __func__" >&5
-$as_echo_n "checking whether $CC implements __func__... " >&6; }
-if ${ac_cv_cc_implements___func__+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-#include <stdio.h>
-
-int
-main ()
-{
- printf("%s", __func__);
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_cc_implements___func__="yes"
-else
- ac_cv_cc_implements___func__="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_implements___func__" >&5
-$as_echo "$ac_cv_cc_implements___func__" >&6; }
-if test "x$ac_cv_cc_implements___func__" = "xyes" ; then
-
-$as_echo "#define HAVE___func__ 1" >>confdefs.h
-
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_copy exists" >&5
-$as_echo_n "checking whether va_copy exists... " >&6; }
-if ${ac_cv_have_va_copy+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <stdarg.h>
- va_list x,y;
-int
-main ()
-{
-va_copy(x,y);
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_have_va_copy="yes"
-else
- ac_cv_have_va_copy="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_va_copy" >&5
-$as_echo "$ac_cv_have_va_copy" >&6; }
-if test "x$ac_cv_have_va_copy" = "xyes" ; then
-
-$as_echo "#define HAVE_VA_COPY 1" >>confdefs.h
-
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __va_copy exists" >&5
-$as_echo_n "checking whether __va_copy exists... " >&6; }
-if ${ac_cv_have___va_copy+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <stdarg.h>
- va_list x,y;
-int
-main ()
-{
-__va_copy(x,y);
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_have___va_copy="yes"
-else
- ac_cv_have___va_copy="no"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have___va_copy" >&5
-$as_echo "$ac_cv_have___va_copy" >&6; }
-if test "x$ac_cv_have___va_copy" = "xyes" ; then
-
-$as_echo "#define HAVE___VA_COPY 1" >>confdefs.h
-
-fi
-
CFLAGS="$CFLAGS $werror_flags"
@@ -7652,7 +7454,7 @@ $config_headers
Configuration commands:
$config_commands
-Report bugs to <martin@pdftex.org>."
+Report bugs to <tex-k@tug.org>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
diff --git a/Build/source/libs/obsdcompat/configure.ac b/Build/source/libs/obsdcompat/configure.ac
index a891c5b4fe6..0475fe1c979 100644
--- a/Build/source/libs/obsdcompat/configure.ac
+++ b/Build/source/libs/obsdcompat/configure.ac
@@ -1,6 +1,7 @@
# $Id: configure.ac,v 1.322.2.6 2006/02/08 11:11:06 dtucker Exp $
#
# Copyright (c) 1999-2004 Damien Miller
+# Copyright (C) 2009-2012 Peter Breitenlohner <tex-live@tug.org>
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
@@ -19,7 +20,7 @@
# Modified (butchered) 2006 by Martin Schröder for pdfTeX
# Modified 2009 by Peter Breitenlohner for new TeX Live build system
-AC_INIT([OpenBSD-Compat],[Portable],[martin@pdftex.org])
+AC_INIT([OpenBSD-Compat], [Portable], [tex-k@tug.org])
AC_REVISION($Revision: 1.322.2.6 $)
AC_CONFIG_SRCDIR([openbsd-compat.h])
AC_CONFIG_AUX_DIR([../../build-aux])
@@ -300,7 +301,6 @@ AC_FUNC_STRFTIME
dnl Checks for library functions. Please keep in alphabetical order
AC_CHECK_FUNCS( \
- asprintf \
bcopy \
snprintf \
strdup \
@@ -311,12 +311,10 @@ AC_CHECK_FUNCS( \
strtoll \
strtoul \
sysconf \
- vasprintf \
vsnprintf \
)
dnl Make sure prototypes are defined for these before using them.
-AC_CHECK_DECL(getrusage, [AC_CHECK_FUNCS(getrusage)])
AC_CHECK_DECL(strsep,
[AC_CHECK_FUNCS(strsep)],
[],
@@ -680,53 +678,6 @@ main() { exit(0); }
)
fi
-AC_CACHE_CHECK([if libc defines __progname], ac_cv_libc_defines___progname, [
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ extern char *__progname; printf("%s", __progname); ]])],[ ac_cv_libc_defines___progname="yes" ],[ ac_cv_libc_defines___progname="no"
- ])
-])
-if test "x$ac_cv_libc_defines___progname" = "xyes" ; then
- AC_DEFINE(HAVE___PROGNAME, 1, [Define if libc defines __progname])
-fi
-
-AC_CACHE_CHECK([whether $CC implements __FUNCTION__], ac_cv_cc_implements___FUNCTION__, [
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[
-#include <stdio.h>
-]], [[ printf("%s", __FUNCTION__); ]])],[ ac_cv_cc_implements___FUNCTION__="yes" ],[ ac_cv_cc_implements___FUNCTION__="no"
- ])
-])
-if test "x$ac_cv_cc_implements___FUNCTION__" = "xyes" ; then
- AC_DEFINE(HAVE___FUNCTION__, 1,
- [Define if compiler implements __FUNCTION__])
-fi
-
-AC_CACHE_CHECK([whether $CC implements __func__], ac_cv_cc_implements___func__, [
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[
-#include <stdio.h>
-]], [[ printf("%s", __func__); ]])],[ ac_cv_cc_implements___func__="yes" ],[ ac_cv_cc_implements___func__="no"
- ])
-])
-if test "x$ac_cv_cc_implements___func__" = "xyes" ; then
- AC_DEFINE(HAVE___func__, 1, [Define if compiler implements __func__])
-fi
-
-AC_CACHE_CHECK([whether va_copy exists], ac_cv_have_va_copy, [
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdarg.h>
- va_list x,y;]], [[va_copy(x,y);]])],[ ac_cv_have_va_copy="yes" ],[ ac_cv_have_va_copy="no"
- ])
-])
-if test "x$ac_cv_have_va_copy" = "xyes" ; then
- AC_DEFINE(HAVE_VA_COPY, 1, [Define if va_copy exists])
-fi
-
-AC_CACHE_CHECK([whether __va_copy exists], ac_cv_have___va_copy, [
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdarg.h>
- va_list x,y;]], [[__va_copy(x,y);]])],[ ac_cv_have___va_copy="yes" ],[ ac_cv_have___va_copy="no"
- ])
-])
-if test "x$ac_cv_have___va_copy" = "xyes" ; then
- AC_DEFINE(HAVE___VA_COPY, 1, [Define if __va_copy exists])
-fi
-
dnl Adding -Werror to CFLAGS early prevents configure tests from running.
dnl Add now.
CFLAGS="$CFLAGS $werror_flags"
diff --git a/Build/source/libs/obsdcompat/defines.h b/Build/source/libs/obsdcompat/defines.h
index 324622e6fd5..71e90193ca7 100644
--- a/Build/source/libs/obsdcompat/defines.h
+++ b/Build/source/libs/obsdcompat/defines.h
@@ -24,7 +24,7 @@
* ---------------------------------------------------------------------------
*
* Modified (butchered) 2006 by Martin Schröder for pdfTeX
- *
+ * Modified 2009 by Peter Breitenlohner for new TeX Live build system
*/
#ifndef _DEFINES_H
@@ -33,18 +33,6 @@
/* $Id: defines.h,v 1.130 2005/12/17 11:04:09 dtucker Exp $ */
-/* Constants */
-
-#ifndef STDIN_FILENO
-# define STDIN_FILENO 0
-#endif
-#ifndef STDOUT_FILENO
-# define STDOUT_FILENO 1
-#endif
-#ifndef STDERR_FILENO
-# define STDERR_FILENO 2
-#endif
-
/* Types */
/* If sys/types.h does not supply intXX_t, supply them ourselves */
@@ -171,14 +159,6 @@ typedef int ssize_t;
# define MIN(a,b) (((a)<(b))?(a):(b))
#endif
-#ifndef roundup
-# define roundup(x, y) ((((x)+((y)-1))/(y))*(y))
-#endif
-
-#ifndef __P
-# define __P(x) x
-#endif
-
#if !defined(__GNUC__) || (__GNUC__ < 2)
# define __attribute__(x)
#endif /* !defined(__GNUC__) || (__GNUC__ < 2) */
diff --git a/Build/source/libs/obsdcompat/obsdcompat/config.h.in b/Build/source/libs/obsdcompat/obsdcompat/config.h.in
index cc65fc90834..ddb06c66741 100644
--- a/Build/source/libs/obsdcompat/obsdcompat/config.h.in
+++ b/Build/source/libs/obsdcompat/obsdcompat/config.h.in
@@ -6,9 +6,6 @@
/* Define if your snprintf is busted */
#undef BROKEN_SNPRINTF
-/* Define to 1 if you have the `asprintf' function. */
-#undef HAVE_ASPRINTF
-
/* OpenBSD's gcc has bounded */
#undef HAVE_ATTRIBUTE__BOUNDED__
@@ -30,9 +27,6 @@
/* Define to 1 if you have the <floatingpoint.h> header file. */
#undef HAVE_FLOATINGPOINT_H
-/* Define to 1 if you have the `getrusage' function. */
-#undef HAVE_GETRUSAGE
-
/* define if you have int64_t data type */
#undef HAVE_INT64_T
@@ -150,27 +144,9 @@
/* define if you have u_intxx_t data type */
#undef HAVE_U_INTXX_T
-/* Define to 1 if you have the `vasprintf' function. */
-#undef HAVE_VASPRINTF
-
-/* Define if va_copy exists */
-#undef HAVE_VA_COPY
-
/* Define to 1 if you have the `vsnprintf' function. */
#undef HAVE_VSNPRINTF
-/* Define if compiler implements __FUNCTION__ */
-#undef HAVE___FUNCTION__
-
-/* Define if libc defines __progname */
-#undef HAVE___PROGNAME
-
-/* Define if __va_copy exists */
-#undef HAVE___VA_COPY
-
-/* Define if compiler implements __func__ */
-#undef HAVE___func__
-
/* max value of long long calculated by configure */
#undef LLONG_MAX
diff --git a/Build/source/libs/obsdcompat/openbsd-compat.h b/Build/source/libs/obsdcompat/openbsd-compat.h
index 869d37e3db8..a3cbd285eb4 100644
--- a/Build/source/libs/obsdcompat/openbsd-compat.h
+++ b/Build/source/libs/obsdcompat/openbsd-compat.h
@@ -28,7 +28,7 @@
* ---------------------------------------------------------------------------
*
* Modified (butchered) 2006 by Martin Schröder for pdfTeX
- *
+ * Modified 2009 by Peter Breitenlohner for new TeX Live build system
*/
#ifndef _OPENBSD_COMPAT_H
@@ -40,30 +40,23 @@
#define OBSDLIB_VERNUM 0x4310
/* OpenBSD function replacements */
-#ifndef HAVE_STRLCPY
-/* #include <sys/types.h> XXX Still needed? */
-/* see http://www.openbsd.org/cgi-bin/man.cgi?query=strlcpy */
-size_t strlcpy(char *dst, const char *src, size_t siz);
-#endif
-
#ifndef HAVE_STRLCAT
/* #include <sys/types.h> XXX Still needed? */
/* see http://www.openbsd.org/cgi-bin/man.cgi?query=strlcat */
size_t strlcat(char *dst, const char *src, size_t siz);
#endif
+#ifndef HAVE_STRLCPY
+/* #include <sys/types.h> XXX Still needed? */
+/* see http://www.openbsd.org/cgi-bin/man.cgi?query=strlcpy */
+size_t strlcpy(char *dst, const char *src, size_t siz);
+#endif
+
#ifndef HAVE_STRSEP
/* see http://www.openbsd.org/cgi-bin/man.cgi?query=strsep */
char *strsep(char **stringp, const char *delim);
#endif
-/*#include <sys/types.h> XXX Still needed? * For uid_t, gid_t * */
-
-#ifndef HAVE_ASPRINTF
-/* see http://www.openbsd.org/cgi-bin/man.cgi?query=asprintf */
-int asprintf(char **, const char *, ...);
-#endif
-
/* #include <sys/types.h> XXX needed? For size_t */
#ifndef HAVE_SNPRINTF
@@ -81,11 +74,6 @@ long long strtoll(const char *, char **, int);
long long strtonum(const char *, long long, long long, const char **);
#endif
-#ifndef HAVE_VASPRINTF
-/* see http://www.openbsd.org/cgi-bin/man.cgi?query=vasprintf */
-int vasprintf(char **, const char *, va_list);
-#endif
-
#ifndef HAVE_VSNPRINTF
/* see http://www.openbsd.org/cgi-bin/man.cgi?query=vsnprintf */
int vsnprintf(char *, size_t, const char *, va_list);
diff --git a/Build/source/libs/obsdcompat/strlcpy.c b/Build/source/libs/obsdcompat/strlcpy.c
index 679a5b291f5..b4b1b6015a2 100644
--- a/Build/source/libs/obsdcompat/strlcpy.c
+++ b/Build/source/libs/obsdcompat/strlcpy.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: strlcpy.c,v 1.10 2005/08/08 08:05:37 espie Exp $ */
+/* $OpenBSD: strlcpy.c,v 1.11 2006/05/05 15:27:38 millert Exp $ */
/*
* Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com>
@@ -37,11 +37,11 @@ strlcpy(char *dst, const char *src, size_t siz)
size_t n = siz;
/* Copy as many bytes as will fit */
- if (n != 0 && --n != 0) {
- do {
- if ((*d++ = *s++) == 0)
+ if (n != 0) {
+ while (--n != 0) {
+ if ((*d++ = *s++) == '\0')
break;
- } while (--n != 0);
+ }
}
/* Not enough room in dst, add NUL and traverse rest of src */