Import of pkgsrc-2013Q2

This commit is contained in:
2013-09-26 17:14:40 +02:00
commit 785076ae39
74991 changed files with 4380255 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
This package attempts to resolve deficiencies in system headers by
providing missing types, definitions and prototypes in shadow headers.
When use of compat_headers has been enabled on a platform, this package will
become a compile-time dependency for every package. It will provide customized
header files that take preference over some system provided ones (that may
not even exist). This happens transparently through use of buildlink3.
To enable use of this package, set FIX_SYSTEM_HEADERS=yes in mk.conf.

View File

@@ -0,0 +1,23 @@
# $NetBSD: Makefile,v 1.8 2013/04/06 03:45:21 rodent Exp $
DISTNAME= compat_headers-0.2
CATEGORIES= pkgtools
MASTER_SITES= # empty
DISTFILES= # empty
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://www.pkgsrc.org/
COMMENT= Compatibility headers
PREV_PKGPATH= pkgtools/posix_headers
SUPERSEDES= posix_headers-[0-9]*
CHECK_PERMS= no
GNU_CONFIGURE= yes
PLIST_SRC+= ${WRKSRC}/PLIST
do-extract:
cp -R ${FILESDIR} ${WRKSRC}
.include "../../mk/bsd.pkg.mk"

View File

@@ -0,0 +1,13 @@
# $NetBSD: buildlink3.mk,v 1.3 2009/03/20 19:25:13 joerg Exp $
BUILDLINK_TREE+= compat_headers
.if !defined(COMPAT_HEADERS_BUILDLINK3_MK)
COMPAT_HEADERS_BUILDLINK3_MK:=
BUILDLINK_API_DEPENDS.compat_headers+= compat_headers>=0.2
BUILDLINK_PKGSRCDIR.compat_headers?= ../../pkgtools/compat_headers
BUILDLINK_DEPMETHOD.compat_headers?= build
.endif # COMPAT_HEADERS_BUILDLINK3_MK
BUILDLINK_TREE+= -compat_headers

View File

@@ -0,0 +1,69 @@
# $NetBSD: Makefile.in,v 1.3 2008/05/25 18:32:28 tnn Exp $
REPLACE_stdint= @REPLACE_stdint@
REPLACE_inttypes= @REPLACE_inttypes@
REPLACE_resolv= @REPLACE_resolv@
REPLACE_sys_select= @REPLACE_sys_select@
REPLACE_math= @REPLACE_math@
REPLACE_stdlib= @REPLACE_stdlib@
REPLACE_stdarg= @REPLACE_stdarg@
PREFIX= @prefix@
DESTDIR?=
INSTALL= @INSTALL@
all: .PHONY
.if ${REPLACE_stdint} == "yes"
./mkhdr.sh stdint.h < stdint.h.in > stdint.h
.endif
.if ${REPLACE_inttypes} == "yes"
./mkhdr.sh inttypes.h < inttypes.h.in > inttypes.h
.endif
.if ${REPLACE_resolv} == "yes"
./mkhdr.sh resolv.h < resolv.h.in > resolv.h
.endif
.if ${REPLACE_sys_select} == "yes"
./mkhdr.sh sys/select.h < select.h.in > select.h
.endif
.if ${REPLACE_math} == "yes"
./mkhdr.sh math.h < math.h.in > math.h
.endif
.if ${REPLACE_stdlib} == "yes"
./mkhdr.sh stdlib.h < stdlib.h.in > stdlib.h
.endif
.if ${REPLACE_stdarg} == "yes"
./mkhdr.sh stdarg.h < stdarg.h.in > stdarg.h
.endif
install: .PHONY
printf "" > PLIST
${INSTALL} -m 755 -d ${DESTDIR}${PREFIX}/include
.if ${REPLACE_stdint} == "yes"
${INSTALL} -m 644 -c stdint.h ${DESTDIR}${PREFIX}/include
echo include/stdint.h >> PLIST
.endif
.if ${REPLACE_inttypes} == "yes"
${INSTALL} -m 644 -c inttypes.h ${DESTDIR}${PREFIX}/include
echo include/inttypes.h >> PLIST
.endif
.if ${REPLACE_resolv} == "yes"
${INSTALL} -m 644 -c resolv.h ${DESTDIR}${PREFIX}/include
echo include/resolv.h >> PLIST
.endif
.if ${REPLACE_sys_select} == "yes"
${INSTALL} -m 755 -d ${DESTDIR}${PREFIX}/include/sys
${INSTALL} -m 644 select.h ${DESTDIR}${PREFIX}/include/sys
echo include/sys/select.h >> PLIST
.endif
.if ${REPLACE_math} == "yes"
${INSTALL} -m 644 math.h ${DESTDIR}${PREFIX}/include
echo include/math.h >> PLIST
.endif
.if ${REPLACE_stdlib} == "yes"
${INSTALL} -m 644 stdlib.h ${DESTDIR}${PREFIX}/include
echo include/stdlib.h >> PLIST
.endif
.if ${REPLACE_stdarg} == "yes"
${INSTALL} -m 644 stdarg.h ${DESTDIR}${PREFIX}/include
echo include/stdarg.h >> PLIST
.endif

1516
pkgtools/compat_headers/files/config.guess vendored Executable file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,271 @@
/* config.h.in. Generated from configure.in by autoheader. */
/* descr */
#undef CH_ACOSF
/* descr */
#undef CH_ASINF
/* descr */
#undef CH_ATAN2F
/* descr */
#undef CH_ATANF
/* descr */
#undef CH_CEILF
/* descr */
#undef CH_COSF
/* descr */
#undef CH_FLOORF
/* descr */
#undef CH_HAVE_VA_COPY
/* descr */
#undef CH_HPUX
/* descr */
#undef CH_HPUX_MISSING_RES_PROTO
/* descr */
#undef CH_HPUX___STRTOLL
/* descr */
#undef CH_INT16_MAX
/* descr */
#undef CH_INT16_MIN
/* descr */
#undef CH_INT16_T
/* descr */
#undef CH_INT32_MAX
/* descr */
#undef CH_INT32_MIN
/* descr */
#undef CH_INT32_T
/* descr */
#undef CH_INT64_MAX
/* descr */
#undef CH_INT64_MIN
/* descr */
#undef CH_INT64_T
/* descr */
#undef CH_INT8_MAX
/* descr */
#undef CH_INT8_MIN
/* descr */
#undef CH_INT8_T
/* descr */
#undef CH_INT_FAST16_MAX
/* descr */
#undef CH_INT_FAST16_MIN
/* descr */
#undef CH_INT_FAST16_T
/* descr */
#undef CH_INT_FAST32_MAX
/* descr */
#undef CH_INT_FAST32_MIN
/* descr */
#undef CH_INT_FAST32_T
/* descr */
#undef CH_INT_FAST64_MAX
/* descr */
#undef CH_INT_FAST64_MIN
/* descr */
#undef CH_INT_FAST64_T
/* descr */
#undef CH_INT_FAST8_MAX
/* descr */
#undef CH_INT_FAST8_MIN
/* descr */
#undef CH_INT_FAST8_T
/* descr */
#undef CH_INT_LEAST16_MAX
/* descr */
#undef CH_INT_LEAST16_MIN
/* descr */
#undef CH_INT_LEAST16_T
/* descr */
#undef CH_INT_LEAST32_MAX
/* descr */
#undef CH_INT_LEAST32_MIN
/* descr */
#undef CH_INT_LEAST32_T
/* descr */
#undef CH_INT_LEAST64_MAX
/* descr */
#undef CH_INT_LEAST64_MIN
/* descr */
#undef CH_INT_LEAST64_T
/* descr */
#undef CH_INT_LEAST8_MAX
/* descr */
#undef CH_INT_LEAST8_MIN
/* descr */
#undef CH_INT_LEAST8_T
/* descr */
#undef CH_LP64
/* descr */
#undef CH_SINF
/* descr */
#undef CH_SQRTF
/* descr */
#undef CH_TANF
/* descr */
#undef CH_UINT16_MAX
/* descr */
#undef CH_UINT16_T
/* descr */
#undef CH_UINT32_MAX
/* descr */
#undef CH_UINT32_T
/* descr */
#undef CH_UINT64_MAX
/* descr */
#undef CH_UINT64_T
/* descr */
#undef CH_UINT8_MAX
/* descr */
#undef CH_UINT8_T
/* descr */
#undef CH_UINT_FAST16_MAX
/* descr */
#undef CH_UINT_FAST16_T
/* descr */
#undef CH_UINT_FAST32_MAX
/* descr */
#undef CH_UINT_FAST32_T
/* descr */
#undef CH_UINT_FAST64_MAX
/* descr */
#undef CH_UINT_FAST64_T
/* descr */
#undef CH_UINT_FAST8_MAX
/* descr */
#undef CH_UINT_FAST8_T
/* descr */
#undef CH_UINT_LEAST16_MAX
/* descr */
#undef CH_UINT_LEAST16_T
/* descr */
#undef CH_UINT_LEAST32_MAX
/* descr */
#undef CH_UINT_LEAST32_T
/* descr */
#undef CH_UINT_LEAST64_MAX
/* descr */
#undef CH_UINT_LEAST64_T
/* descr */
#undef CH_UINT_LEAST8_MAX
/* descr */
#undef CH_UINT_LEAST8_T
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#undef PACKAGE_NAME
/* Define to the full name and version of this package. */
#undef PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS

1622
pkgtools/compat_headers/files/config.sub vendored Executable file

File diff suppressed because it is too large Load Diff

9367
pkgtools/compat_headers/files/configure vendored Executable file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,708 @@
dnl $NetBSD: configure.in,v 1.2 2008/05/25 18:32:28 tnn Exp $
AC_PREREQ(2.62)
AC_INIT([compat_headers],[20080523],[tnn@NetBSD.org])
AC_CONFIG_HEADER(config.h)
AC_ARG_PROGRAM
AC_PROG_CC
AC_PROG_INSTALL
AC_SUBST(prefix)
REPLACE_stdint=no
REPLACE_inttypes=no
REPLACE_resolv=no
REPLACE_sys_select=no
REPLACE_stdlib=no
REPLACE_math=no
REPLACE_stdarg=no
AC_SUBST(REPLACE_stdint)
AC_SUBST(REPLACE_inttypes)
AC_SUBST(REPLACE_resolv)
AC_SUBST(REPLACE_sys_select)
AC_SUBST(REPLACE_stdlib)
AC_SUBST(REPLACE_stdarg)
AC_SUBST(REPLACE_math)
AC_DEFINE([CH_LP64], [0], [descr])
AC_DEFINE([CH_HPUX], [0], [descr])
AC_DEFINE([CH_HPUX_MISSING_RES_PROTO], [0], [descr])
AC_DEFINE([CH_HPUX___STRTOLL], [0], [descr])
AC_DEFINE([CH_HAVE_VA_COPY], [0], [descr])
AC_DEFINE([CH_FLOORF], [0], [descr])
AC_DEFINE([CH_CEILF], [0], [descr])
AC_DEFINE([CH_SINF], [0], [descr])
AC_DEFINE([CH_COSF], [0], [descr])
AC_DEFINE([CH_TANF], [0], [descr])
AC_DEFINE([CH_ASINF], [0], [descr])
AC_DEFINE([CH_ACOSF], [0], [descr])
AC_DEFINE([CH_ATANF], [0], [descr])
AC_DEFINE([CH_ATAN2F], [0], [descr])
AC_DEFINE([CH_SQRTF], [0], [descr])
AC_DEFINE([CH_INT8_T], [0], [descr])
AC_DEFINE([CH_UINT8_T], [0], [descr])
AC_DEFINE([CH_INT16_T], [0], [descr])
AC_DEFINE([CH_UINT16_T], [0], [descr])
AC_DEFINE([CH_INT32_T], [0], [descr])
AC_DEFINE([CH_UINT32_T], [0], [descr])
AC_DEFINE([CH_INT64_T], [0], [descr])
AC_DEFINE([CH_UINT64_T], [0], [descr])
AC_DEFINE([CH_INT_LEAST8_T], [0], [descr])
AC_DEFINE([CH_UINT_LEAST8_T], [0], [descr])
AC_DEFINE([CH_INT_LEAST16_T], [0], [descr])
AC_DEFINE([CH_UINT_LEAST16_T], [0], [descr])
AC_DEFINE([CH_INT_LEAST32_T], [0], [descr])
AC_DEFINE([CH_UINT_LEAST32_T], [0], [descr])
AC_DEFINE([CH_INT_LEAST64_T], [0], [descr])
AC_DEFINE([CH_UINT_LEAST64_T], [0], [descr])
AC_DEFINE([CH_INT_FAST8_T], [0], [descr])
AC_DEFINE([CH_UINT_FAST8_T], [0], [descr])
AC_DEFINE([CH_INT_FAST16_T], [0], [descr])
AC_DEFINE([CH_UINT_FAST16_T], [0], [descr])
AC_DEFINE([CH_INT_FAST32_T], [0], [descr])
AC_DEFINE([CH_UINT_FAST32_T], [0], [descr])
AC_DEFINE([CH_INT_FAST64_T], [0], [descr])
AC_DEFINE([CH_UINT_FAST64_T], [0], [descr])
AC_DEFINE([CH_INT8_MIN], [0], [descr])
AC_DEFINE([CH_INT16_MIN], [0], [descr])
AC_DEFINE([CH_INT32_MIN], [0], [descr])
AC_DEFINE([CH_INT64_MIN], [0], [descr])
AC_DEFINE([CH_INT8_MAX], [0], [descr])
AC_DEFINE([CH_INT16_MAX], [0], [descr])
AC_DEFINE([CH_INT32_MAX], [0], [descr])
AC_DEFINE([CH_INT64_MAX], [0], [descr])
AC_DEFINE([CH_UINT8_MAX], [0], [descr])
AC_DEFINE([CH_UINT16_MAX], [0], [descr])
AC_DEFINE([CH_UINT32_MAX], [0], [descr])
AC_DEFINE([CH_UINT64_MAX], [0], [descr])
AC_DEFINE([CH_INT_LEAST8_MIN], [0], [descr])
AC_DEFINE([CH_INT_LEAST16_MIN], [0], [descr])
AC_DEFINE([CH_INT_LEAST32_MIN], [0], [descr])
AC_DEFINE([CH_INT_LEAST64_MIN], [0], [descr])
AC_DEFINE([CH_INT_LEAST8_MAX], [0], [descr])
AC_DEFINE([CH_INT_LEAST16_MAX], [0], [descr])
AC_DEFINE([CH_INT_LEAST32_MAX], [0], [descr])
AC_DEFINE([CH_INT_LEAST64_MAX], [0], [descr])
AC_DEFINE([CH_UINT_LEAST8_MAX], [0], [descr])
AC_DEFINE([CH_UINT_LEAST16_MAX], [0], [descr])
AC_DEFINE([CH_UINT_LEAST32_MAX], [0], [descr])
AC_DEFINE([CH_UINT_LEAST64_MAX], [0], [descr])
AC_DEFINE([CH_INT_FAST8_MIN], [0], [descr])
AC_DEFINE([CH_INT_FAST16_MIN], [0], [descr])
AC_DEFINE([CH_INT_FAST32_MIN], [0], [descr])
AC_DEFINE([CH_INT_FAST64_MIN], [0], [descr])
AC_DEFINE([CH_INT_FAST8_MAX], [0], [descr])
AC_DEFINE([CH_INT_FAST16_MAX], [0], [descr])
AC_DEFINE([CH_INT_FAST32_MAX], [0], [descr])
AC_DEFINE([CH_INT_FAST64_MAX], [0], [descr])
AC_DEFINE([CH_UINT_FAST8_MAX], [0], [descr])
AC_DEFINE([CH_UINT_FAST16_MAX], [0], [descr])
AC_DEFINE([CH_UINT_FAST32_MAX], [0], [descr])
AC_DEFINE([CH_UINT_FAST64_MAX], [0], [descr])
dnl ---
# Replace stdint.h if it doesn't exist
AC_CHECK_HEADER([stdint.h], [:],
REPLACE_stdint=yes
)
# Replace select.h if it doesn't exist
AC_CHECK_HEADER([sys/select.h], [:],
REPLACE_sys_select=yes
)
# Check if LP64
AC_MSG_CHECKING([for LP64])
AC_TRY_RUN([int main(void) {return (sizeof(long) != 8);}],
[AC_DEFINE(CH_LP64) AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no)])
#
# Workarounds for HPUX bugs
#
AC_MSG_CHECKING([for HPUX])
AC_TRY_COMPILE([], [#ifndef __hpux
#error
#endif],
[AC_DEFINE(CH_HPUX) AC_MSG_RESULT(yes)]
AC_MSG_CHECKING([for missing res_ prototypes on HPUX])
AC_TRY_COMPILE([#include <resolv.h>
void res_init(void *foo) {}], [],
[AC_DEFINE(CH_HPUX_MISSING_RES_PROTO) AC_MSG_RESULT(yes)
REPLACE_resolv=yes
]
, [AC_MSG_RESULT(no)])
AC_MSG_CHECKING([if __strtoll is needed on HPUX])
AC_TRY_COMPILE([#include <stdlib.h>
void foo(char *a, char **b, int c) {strtoll(a,b,c);}], [],
[AC_DEFINE(CH_HPUX___STRTOLL) AC_MSG_RESULT(yes)
REPLACE_stdlib=yes
]
, [AC_MSG_RESULT(no)])
, [AC_MSG_RESULT(no)])
#
# Check for va_copy
#
# XXX needs to be TRY_RUN
AC_MSG_CHECKING([if we have va_copy])
AC_TRY_RUN([#include <stdarg.h>
void foo(va_list x, va_list y) {va_copy(x, y);}
int main(void) {return 0;}],
[AC_DEFINE(CH_HAVE_VA_COPY) AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
REPLACE_stdarg=yes])
#
# Make sure we have float math functions, provide macros otherwise.
#
AC_MSG_CHECKING([for floorf prototype])
AC_TRY_COMPILE([#include <math.h>
void floorf(void *foo) {}], [],
[REPLACE_math=yes
AC_MSG_RESULT(no)],
[AC_DEFINE(CH_FLOORF) AC_MSG_RESULT(yes)])
AC_MSG_CHECKING([for ceilf prototype])
AC_TRY_COMPILE([#include <math.h>
void ceilf(void *foo) {}], [],
[REPLACE_math=yes
AC_MSG_RESULT(no)],
[AC_DEFINE(CH_CEILF) AC_MSG_RESULT(yes)])
AC_MSG_CHECKING([for sinf prototype])
AC_TRY_COMPILE([#include <math.h>
void sinf(void *foo) {}], [],
[REPLACE_math=yes
AC_MSG_RESULT(no)],
[AC_DEFINE(CH_SINF) AC_MSG_RESULT(yes)])
AC_MSG_CHECKING([for cosf prototype])
AC_TRY_COMPILE([#include <math.h>
void cosf(void *foo) {}], [],
[REPLACE_math=yes
AC_MSG_RESULT(no)],
[AC_DEFINE(CH_COSF) AC_MSG_RESULT(yes)])
AC_MSG_CHECKING([for tanf prototype])
AC_TRY_COMPILE([#include <math.h>
void tanf(void *foo) {}], [],
[REPLACE_math=yes
AC_MSG_RESULT(no)],
[AC_DEFINE(CH_TANF) AC_MSG_RESULT(yes)])
AC_MSG_CHECKING([for asinf prototype])
AC_TRY_COMPILE([#include <math.h>
void asinf(void *foo) {}], [],
[REPLACE_math=yes
AC_MSG_RESULT(no)],
[AC_DEFINE(CH_ASINF) AC_MSG_RESULT(yes)])
AC_MSG_CHECKING([for acosf prototype])
AC_TRY_COMPILE([#include <math.h>
void acosf(void *foo) {}], [],
[REPLACE_math=yes
AC_MSG_RESULT(no)],
[AC_DEFINE(CH_ACOSF) AC_MSG_RESULT(yes)])
AC_MSG_CHECKING([for atanf prototype])
AC_TRY_COMPILE([#include <math.h>
void atanf(void *foo) {}], [],
[REPLACE_math=yes
AC_MSG_RESULT(no)],
[AC_DEFINE(CH_ATANF) AC_MSG_RESULT(yes)])
AC_MSG_CHECKING([for atan2f prototype])
AC_TRY_COMPILE([#include <math.h>
void atan2f(void *foo) {}], [],
[REPLACE_math=yes
AC_MSG_RESULT(no)],
[AC_DEFINE(CH_ATAN2F) AC_MSG_RESULT(yes)])
AC_MSG_CHECKING([for sqrtf prototype])
AC_TRY_COMPILE([#include <math.h>
void sqrtf(void *foo) {}], [],
[REPLACE_math=yes
AC_MSG_RESULT(no)],
[AC_DEFINE(CH_SQRTF) AC_MSG_RESULT(yes)])
#
# Provide standard integer types and defs.
#
AC_MSG_CHECKING([for int8_t])
AC_TRY_COMPILE([#include <inttypes.h>], [int8_t x;],
[AC_DEFINE(CH_INT8_T) AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
REPLACE_inttypes=yes])
AC_MSG_CHECKING([for uint8_t])
AC_TRY_COMPILE([#include <inttypes.h>], [uint8_t x;],
[AC_DEFINE(CH_UINT8_T) AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
REPLACE_inttypes=yes])
AC_MSG_CHECKING([for int16_t])
AC_TRY_COMPILE([#include <inttypes.h>], [int16_t x;],
[AC_DEFINE(CH_INT16_T) AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
REPLACE_inttypes=yes])
AC_MSG_CHECKING([for uint16_t])
AC_TRY_COMPILE([#include <inttypes.h>], [uint16_t x;],
[AC_DEFINE(CH_UINT16_T) AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
REPLACE_inttypes=yes])
AC_MSG_CHECKING([for int32_t])
AC_TRY_COMPILE([#include <inttypes.h>], [int32_t x;],
[AC_DEFINE(CH_INT32_T) AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
REPLACE_inttypes=yes])
AC_MSG_CHECKING([for uint32_t])
AC_TRY_COMPILE([#include <inttypes.h>], [uint32_t x;],
[AC_DEFINE(CH_UINT32_T) AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
REPLACE_inttypes=yes])
AC_MSG_CHECKING([for int64_t])
AC_TRY_COMPILE([#include <inttypes.h>], [int64_t x;],
[AC_DEFINE(CH_INT64_T) AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
REPLACE_inttypes=yes])
AC_MSG_CHECKING([for uint64_t])
AC_TRY_COMPILE([#include <inttypes.h>], [uint64_t x;],
[AC_DEFINE(CH_UINT64_T) AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
REPLACE_inttypes=yes])
dnl ---
AC_MSG_CHECKING([for int_least8_t])
AC_TRY_COMPILE([#include <inttypes.h>], [int_least8_t x;],
[AC_DEFINE(CH_INT_LEAST8_T) AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
REPLACE_inttypes=yes])
AC_MSG_CHECKING([for uint_least8_t])
AC_TRY_COMPILE([#include <inttypes.h>], [uint_least8_t x;],
[AC_DEFINE(CH_UINT_LEAST8_T) AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
REPLACE_inttypes=yes])
AC_MSG_CHECKING([for int_least16_t])
AC_TRY_COMPILE([#include <inttypes.h>], [int_least16_t x;],
[AC_DEFINE(CH_INT_LEAST16_T) AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
REPLACE_inttypes=yes])
AC_MSG_CHECKING([for uint_least16_t])
AC_TRY_COMPILE([#include <inttypes.h>], [uint_least16_t x;],
[AC_DEFINE(CH_UINT_LEAST16_T) AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
REPLACE_inttypes=yes])
AC_MSG_CHECKING([for int_least32_t])
AC_TRY_COMPILE([#include <inttypes.h>], [int_least32_t x;],
[AC_DEFINE(CH_INT_LEAST32_T) AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
REPLACE_inttypes=yes])
AC_MSG_CHECKING([for uint_least32_t])
AC_TRY_COMPILE([#include <inttypes.h>], [uint_least32_t x;],
[AC_DEFINE(CH_UINT_LEAST32_T) AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
REPLACE_inttypes=yes])
AC_MSG_CHECKING([for int_least64_t])
AC_TRY_COMPILE([#include <inttypes.h>], [int_least64_t x;],
[AC_DEFINE(CH_INT_LEAST64_T) AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
REPLACE_inttypes=yes])
AC_MSG_CHECKING([for uint_least64_t])
AC_TRY_COMPILE([#include <inttypes.h>], [uint_least64_t x;],
[AC_DEFINE(CH_UINT_LEAST64_T) AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
REPLACE_inttypes=yes])
dnl ---
AC_MSG_CHECKING([for int_fast8_t])
AC_TRY_COMPILE([#include <inttypes.h>], [int_fast8_t x;],
[AC_DEFINE(CH_INT_FAST8_T) AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
REPLACE_inttypes=yes])
AC_MSG_CHECKING([for uint_fast8_t])
AC_TRY_COMPILE([#include <inttypes.h>], [uint_fast8_t x;],
[AC_DEFINE(CH_UINT_FAST8_T) AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
REPLACE_inttypes=yes])
AC_MSG_CHECKING([for int_fast16_t])
AC_TRY_COMPILE([#include <inttypes.h>], [int_fast16_t x;],
[AC_DEFINE(CH_INT_FAST16_T) AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
REPLACE_inttypes=yes])
AC_MSG_CHECKING([for uint_fast16_t])
AC_TRY_COMPILE([#include <inttypes.h>], [uint_fast16_t x;],
[AC_DEFINE(CH_UINT_FAST16_T) AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
REPLACE_inttypes=yes])
AC_MSG_CHECKING([for int_fast32_t])
AC_TRY_COMPILE([#include <inttypes.h>], [int_fast32_t x;],
[AC_DEFINE(CH_INT_FAST32_T) AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
REPLACE_inttypes=yes])
AC_MSG_CHECKING([for uint_fast32_t])
AC_TRY_COMPILE([#include <inttypes.h>], [uint_fast32_t x;],
[AC_DEFINE(CH_UINT_FAST32_T) AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
REPLACE_inttypes=yes])
AC_MSG_CHECKING([for int_fast64_t])
AC_TRY_COMPILE([#include <inttypes.h>], [int_fast64_t x;],
[AC_DEFINE(CH_INT_FAST64_T) AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
REPLACE_inttypes=yes])
AC_MSG_CHECKING([for uint_fast64_t])
AC_TRY_COMPILE([#include <inttypes.h>], [uint_fast64_t x;],
[AC_DEFINE(CH_UINT_FAST64_T) AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
REPLACE_inttypes=yes])
dnl ---
AC_MSG_CHECKING([for INT8_MIN])
AC_TRY_COMPILE([#include <inttypes.h>], [#ifndef INT8_MIN
#error
#endif],
[AC_DEFINE(CH_INT8_MIN) AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
REPLACE_inttypes=yes])
AC_MSG_CHECKING([for INT16_MIN])
AC_TRY_COMPILE([#include <inttypes.h>], [#ifndef INT16_MIN
#error
#endif],
[AC_DEFINE(CH_INT16_MIN) AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
REPLACE_inttypes=yes])
AC_MSG_CHECKING([for INT32_MIN])
AC_TRY_COMPILE([#include <inttypes.h>], [#ifndef INT32_MIN
#error
#endif],
[AC_DEFINE(CH_INT32_MIN) AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
REPLACE_inttypes=yes])
AC_MSG_CHECKING([for INT64_MIN])
AC_TRY_COMPILE([#include <inttypes.h>], [#ifndef INT64_MIN
#error
#endif],
[AC_DEFINE(CH_INT64_MIN) AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
REPLACE_inttypes=yes])
dnl ---
AC_MSG_CHECKING([for INT8_MAX])
AC_TRY_COMPILE([#include <inttypes.h>], [#ifndef INT8_MAX
#error
#endif],
[AC_DEFINE(CH_INT8_MAX) AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
REPLACE_inttypes=yes])
AC_MSG_CHECKING([for INT16_MAX])
AC_TRY_COMPILE([#include <inttypes.h>], [#ifndef INT16_MAX
#error
#endif],
[AC_DEFINE(CH_INT16_MAX) AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
REPLACE_inttypes=yes])
AC_MSG_CHECKING([for INT32_MAX])
AC_TRY_COMPILE([#include <inttypes.h>], [#ifndef INT32_MAX
#error
#endif],
[AC_DEFINE(CH_INT32_MAX) AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
REPLACE_inttypes=yes])
AC_MSG_CHECKING([for INT64_MAX])
AC_TRY_COMPILE([#include <inttypes.h>], [#ifndef INT64_MAX
#error
#endif],
[AC_DEFINE(CH_INT64_MAX) AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
REPLACE_inttypes=yes])
dnl ---
AC_MSG_CHECKING([for UINT8_MAX])
AC_TRY_COMPILE([#include <inttypes.h>], [#ifndef UINT8_MAX
#error
#endif],
[AC_DEFINE(CH_UINT8_MAX) AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
REPLACE_inttypes=yes])
AC_MSG_CHECKING([for UINT16_MAX])
AC_TRY_COMPILE([#include <inttypes.h>], [#ifndef UINT16_MAX
#error
#endif],
[AC_DEFINE(CH_UINT16_MAX) AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
REPLACE_inttypes=yes])
AC_MSG_CHECKING([for UINT32_MAX])
AC_TRY_COMPILE([#include <inttypes.h>], [#ifndef UINT32_MAX
#error
#endif],
[AC_DEFINE(CH_UINT32_MAX) AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
REPLACE_inttypes=yes])
AC_MSG_CHECKING([for UINT64_MAX])
AC_TRY_COMPILE([#include <inttypes.h>], [#ifndef UINT64_MAX
#error
#endif],
[AC_DEFINE(CH_UINT64_MAX) AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
REPLACE_inttypes=yes])
dnl ---
AC_MSG_CHECKING([for INT_LEAST8_MIN])
AC_TRY_COMPILE([#include <inttypes.h>], [#ifndef INT_LEAST8_MIN
#error
#endif],
[AC_DEFINE(CH_INT_LEAST8_MIN) AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
REPLACE_inttypes=yes])
AC_MSG_CHECKING([for INT_LEAST16_MIN])
AC_TRY_COMPILE([#include <inttypes.h>], [#ifndef INT_LEAST16_MIN
#error
#endif],
[AC_DEFINE(CH_INT_LEAST16_MIN) AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
REPLACE_inttypes=yes])
AC_MSG_CHECKING([for INT_LEAST32_MIN])
AC_TRY_COMPILE([#include <inttypes.h>], [#ifndef INT_LEAST32_MIN
#error
#endif],
[AC_DEFINE(CH_INT_LEAST32_MIN) AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
REPLACE_inttypes=yes])
AC_MSG_CHECKING([for INT_LEAST64_MIN])
AC_TRY_COMPILE([#include <inttypes.h>], [#ifndef INT_LEAST64_MIN
#error
#endif],
[AC_DEFINE(CH_INT_LEAST64_MIN) AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
REPLACE_inttypes=yes])
dnl ---
AC_MSG_CHECKING([for INT_LEAST8_MAX])
AC_TRY_COMPILE([#include <inttypes.h>], [#ifndef INT_LEAST8_MAX
#error
#endif],
[AC_DEFINE(CH_INT_LEAST8_MAX) AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
REPLACE_inttypes=yes])
AC_MSG_CHECKING([for INT_LEAST16_MAX])
AC_TRY_COMPILE([#include <inttypes.h>], [#ifndef INT_LEAST16_MAX
#error
#endif],
[AC_DEFINE(CH_INT_LEAST16_MAX) AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
REPLACE_inttypes=yes])
AC_MSG_CHECKING([for INT_LEAST32_MAX])
AC_TRY_COMPILE([#include <inttypes.h>], [#ifndef INT_LEAST32_MAX
#error
#endif],
[AC_DEFINE(CH_INT_LEAST32_MAX) AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
REPLACE_inttypes=yes])
AC_MSG_CHECKING([for INT_LEAST64_MAX])
AC_TRY_COMPILE([#include <inttypes.h>], [#ifndef INT_LEAST64_MAX
#error
#endif],
[AC_DEFINE(CH_INT_LEAST64_MAX) AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
REPLACE_inttypes=yes])
dnl ---
AC_MSG_CHECKING([for UINT_LEAST8_MAX])
AC_TRY_COMPILE([#include <inttypes.h>], [#ifndef UINT_LEAST8_MAX
#error
#endif],
[AC_DEFINE(CH_UINT_LEAST8_MAX) AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
REPLACE_inttypes=yes])
AC_MSG_CHECKING([for UINT_LEAST16_MAX])
AC_TRY_COMPILE([#include <inttypes.h>], [#ifndef UINT_LEAST16_MAX
#error
#endif],
[AC_DEFINE(CH_UINT_LEAST16_MAX) AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
REPLACE_inttypes=yes])
AC_MSG_CHECKING([for UINT_LEAST32_MAX])
AC_TRY_COMPILE([#include <inttypes.h>], [#ifndef UINT_LEAST32_MAX
#error
#endif],
[AC_DEFINE(CH_UINT_LEAST32_MAX) AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
REPLACE_inttypes=yes])
AC_MSG_CHECKING([for UINT_LEAST64_MAX])
AC_TRY_COMPILE([#include <inttypes.h>], [#ifndef UINT_LEAST64_MAX
#error
#endif],
[AC_DEFINE(CH_UINT_LEAST64_MAX) AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
REPLACE_inttypes=yes])
dnl ---
AC_MSG_CHECKING([for INT_FAST8_MIN])
AC_TRY_COMPILE([#include <inttypes.h>], [#ifndef INT_FAST8_MIN
#error
#endif],
[AC_DEFINE(CH_INT_FAST8_MIN) AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
REPLACE_inttypes=yes])
AC_MSG_CHECKING([for INT_FAST16_MIN])
AC_TRY_COMPILE([#include <inttypes.h>], [#ifndef INT_FAST16_MIN
#error
#endif],
[AC_DEFINE(CH_INT_FAST16_MIN) AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
REPLACE_inttypes=yes])
AC_MSG_CHECKING([for INT_FAST32_MIN])
AC_TRY_COMPILE([#include <inttypes.h>], [#ifndef INT_FAST32_MIN
#error
#endif],
[AC_DEFINE(CH_INT_FAST32_MIN) AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
REPLACE_inttypes=yes])
AC_MSG_CHECKING([for INT_FAST64_MIN])
AC_TRY_COMPILE([#include <inttypes.h>], [#ifndef INT_FAST64_MIN
#error
#endif],
[AC_DEFINE(CH_INT_FAST64_MIN) AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
REPLACE_inttypes=yes])
dnl ---
AC_MSG_CHECKING([for INT_FAST8_MAX])
AC_TRY_COMPILE([#include <inttypes.h>], [#ifndef INT_FAST8_MAX
#error
#endif],
[AC_DEFINE(CH_INT_FAST8_MAX) AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
REPLACE_inttypes=yes])
AC_MSG_CHECKING([for INT_FAST16_MAX])
AC_TRY_COMPILE([#include <inttypes.h>], [#ifndef INT_FAST16_MAX
#error
#endif],
[AC_DEFINE(CH_INT_FAST16_MAX) AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
REPLACE_inttypes=yes])
AC_MSG_CHECKING([for INT_FAST32_MAX])
AC_TRY_COMPILE([#include <inttypes.h>], [#ifndef INT_FAST32_MAX
#error
#endif],
[AC_DEFINE(CH_INT_FAST32_MAX) AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
REPLACE_inttypes=yes])
AC_MSG_CHECKING([for INT_FAST64_MAX])
AC_TRY_COMPILE([#include <inttypes.h>], [#ifndef INT_FAST64_MAX
#error
#endif],
[AC_DEFINE(CH_INT_FAST64_MAX) AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
REPLACE_inttypes=yes])
dnl ---
AC_MSG_CHECKING([for UINT_FAST8_MAX])
AC_TRY_COMPILE([#include <inttypes.h>], [#ifndef UINT_FAST8_MAX
#error
#endif],
[AC_DEFINE(CH_UINT_FAST8_MAX) AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
REPLACE_inttypes=yes])
AC_MSG_CHECKING([for UINT_FAST16_MAX])
AC_TRY_COMPILE([#include <inttypes.h>], [#ifndef UINT_FAST16_MAX
#error
#endif],
[AC_DEFINE(CH_UINT_FAST16_MAX) AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
REPLACE_inttypes=yes])
AC_MSG_CHECKING([for UINT_FAST32_MAX])
AC_TRY_COMPILE([#include <inttypes.h>], [#ifndef UINT_FAST32_MAX
#error
#endif],
[AC_DEFINE(CH_UINT_FAST32_MAX) AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
REPLACE_inttypes=yes])
AC_MSG_CHECKING([for UINT_FAST64_MAX])
AC_TRY_COMPILE([#include <inttypes.h>], [#ifndef UINT_FAST64_MAX
#error
#endif],
[AC_DEFINE(CH_UINT_FAST64_MAX) AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
REPLACE_inttypes=yes])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT

View File

@@ -0,0 +1,291 @@
#!/bin/sh
#
# $NetBSD: install-sh,v 1.1.1.1 2008/05/24 03:35:42 tnn Exp $
# This script now also installs multiple files, but might choke on installing
# multiple files with spaces in the file names.
#
# install - install a program, script, or datafile
# This comes from X11R5 (mit/util/scripts/install.sh).
#
# Copyright 1991 by the Massachusetts Institute of Technology
#
# Permission to use, copy, modify, distribute, and sell this software and its
# documentation for any purpose is hereby granted without fee, provided that
# the above copyright notice appear in all copies and that both that
# copyright notice and this permission notice appear in supporting
# documentation, and that the name of M.I.T. not be used in advertising or
# publicity pertaining to distribution of the software without specific,
# written prior permission. M.I.T. makes no representations about the
# suitability of this software for any purpose. It is provided "as is"
# without express or implied warranty.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# `make' implicit rules from creating a file called install from it
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
# from scratch.
# set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit="${DOITPROG-}"
# put in absolute paths if you don't have them in your path; or use env. vars.
awkprog="${AWKPROG-awk}"
mvprog="${MVPROG-mv}"
cpprog="${CPPROG-cp}"
chmodprog="${CHMODPROG-chmod}"
chownprog="${CHOWNPROG-chown}"
chgrpprog="${CHGRPPROG-chgrp}"
stripprog="${STRIPPROG-strip}"
rmprog="${RMPROG-rm}"
mkdirprog="${MKDIRPROG-mkdir}"
instcmd="$mvprog"
pathcompchmodcmd="$chmodprog 755"
chmodcmd="$chmodprog 755"
chowncmd=""
chgrpcmd=""
stripcmd=""
stripflags=""
rmcmd="$rmprog -f"
mvcmd="$mvprog"
src=""
msrc=""
dst=""
dir_arg=""
suffix=""
suffixfmt=""
while [ x"$1" != x ]; do
case $1 in
-b) suffix=".old"
shift
continue;;
-B) suffixfmt="$2"
shift
shift
continue;;
-c) instcmd="$cpprog"
shift
continue;;
-d) dir_arg=true
shift
continue;;
-m) chmodcmd="$chmodprog $2"
shift
shift
continue;;
-o) chowncmd="$chownprog $2"
shift
shift
continue;;
-g) chgrpcmd="$chgrpprog $2"
shift
shift
continue;;
-s) stripcmd="$stripprog"
shift
continue;;
-S) stripcmd="$stripprog"
stripflags="-S $2 $stripflags"
shift
shift
continue;;
*) if [ x"$msrc" = x ]
then
msrc="$dst"
else
msrc="$msrc $dst"
fi
src="$dst"
dst="$1"
shift
continue;;
esac
done
if [ x"$dir_arg" = x ]
then
dstisfile=""
if [ ! -d "$dst" ]
then
if [ x"$msrc" = x"$src" ]
then
dstisfile=true
else
echo "install: destination is not a directory"
exit 1
fi
fi
else
msrc="$msrc $dst"
fi
if [ x"$msrc" = x ]
then
echo "install: no destination specified"
exit 1
fi
for srcarg in $msrc; do
if [ x"$dir_arg" != x ]; then
dstarg="$srcarg"
else
dstarg="$dst"
# Waiting for this to be detected by the "$instcmd $srcarg $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if [ -f "$srcarg" ]
then
doinst="$instcmd"
elif [ -d "$srcarg" ]
then
echo "install: $srcarg: not a regular file"
exit 1
elif [ "$srcarg" = "/dev/null" ]
then
doinst="$cpprog"
else
echo "install: $srcarg does not exist"
exit 1
fi
# If destination is a directory, append the input filename; if your system
# does not like double slashes in filenames, you may need to add some logic
if [ -d "$dstarg" ]
then
dstarg="$dstarg"/`basename "$srcarg"`
fi
fi
## this sed command emulates the dirname command
dstdir=`echo "$dstarg" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
# Make sure that the destination directory exists.
# this part is taken from Noah Friedman's mkinstalldirs script
# Skip lots of stat calls in the usual case.
if [ ! -d "$dstdir" ]; then
defaultIFS='
'
IFS="${IFS-${defaultIFS}}"
oIFS="${IFS}"
# Some sh's can't handle IFS=/ for some reason.
IFS='%'
set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
IFS="${oIFS}"
pathcomp=''
while [ $# -ne 0 ] ; do
pathcomp="${pathcomp}${1}"
shift
if [ ! -d "${pathcomp}" ] ;
then
$doit $mkdirprog "${pathcomp}"
if [ x"$chowncmd" != x ]; then $doit $chowncmd "${pathcomp}"; else true ; fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "${pathcomp}"; else true ; fi &&
if [ x"$pathcompchmodcmd" != x ]; then $doit $pathcompchmodcmd "${pathcomp}"; else true ; fi
else
true
fi
pathcomp="${pathcomp}/"
done
fi
if [ x"$dir_arg" != x ]
then
if [ -d "$dstarg" ]; then
true
else
$doit $mkdirprog "$dstarg" &&
if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dstarg"; else true ; fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dstarg"; else true ; fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dstarg"; else true ; fi
fi
else
if [ x"$dstisfile" = x ]
then
file=$srcarg
else
file=$dst
fi
dstfile=`basename "$file"`
dstfinal="$dstdir/$dstfile"
# Make a temp file name in the proper directory.
dsttmp=$dstdir/#inst.$$#
# Make a backup file name in the proper directory.
case x$suffixfmt in
*%*) suffix=`echo x |
$awkprog -v bname="$dstfinal" -v fmt="$suffixfmt" '
{ cnt = 0;
do {
sfx = sprintf(fmt, cnt++);
name = bname sfx;
} while (system("test -f " name) == 0);
print sfx; }' -`;;
x) ;;
*) suffix="$suffixfmt";;
esac
dstbackup="$dstfinal$suffix"
# Move or copy the file name to the temp name
$doit $doinst $srcarg "$dsttmp" &&
trap "rm -f ${dsttmp}" 0 &&
# and set any options; do chmod last to preserve setuid bits
# If any of these fail, we abort the whole thing. If we want to
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $instcmd $src $dsttmp" command.
if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dsttmp"; else true;fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dsttmp"; else true;fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd $stripflags "$dsttmp"; else true;fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dsttmp"; else true;fi &&
# Now rename the file to the real destination.
if [ x"$suffix" != x ] && [ -f "$dstfinal" ]
then
$doit $mvcmd "$dstfinal" "$dstbackup"
else
$doit $rmcmd -f "$dstfinal"
fi &&
$doit $mvcmd "$dsttmp" "$dstfinal"
fi
done &&
exit 0

View File

@@ -0,0 +1,229 @@
#include "config.h"
@include "@real_header@"
@ifndef _COMPAT_INTTYPES_H_
@define _COMPAT_INTTYPES_H_
#if CH_INT8_T < 1
typedef char int8_t;
#endif
#if CH_UINT8_T < 1
typedef unsigned char uint8_t;
#endif
#if CH_INT16_T < 1
typedef short int16_t;
#endif
#if CH_UINT16_T < 1
typedef unsigned short uint16_t;
#endif
#if CH_INT32_T < 1
typedef int int32_t;
#endif
#if CH_UINT32_T < 1
typedef unsigned int uint32_t;
#endif
#if CH_INT64_T < 1
#if CH_LP64 > 0
typedef long int64_t;
#else
typedef long long int64_t;
#endif
#endif
#if CH_UINT64_T < 1
#if CH_LP64 > 0
typedef unsigned long uint64_t;
#else
typedef unsigned long long uint64_t;
#endif
#endif
#if CH_INT_LEAST8_T < 1
typedef int8_t int_least8_t;
#endif
#if CH_UINT_LEAST8_T < 1
typedef uint8_t uint_least8_t;
#endif
#if CH_INT_LEAST16_T < 1
typedef int16_t int_least16_t;
#endif
#if CH_UINT_LEAST16_T < 1
typedef uint16_t uint_least16_t;
#endif
#if CH_INT_LEAST32_T < 1
typedef int32_t int_least32_t;
#endif
#if CH_UINT_LEAST32_T < 1
typedef uint32_t uint_least32_t;
#endif
#if CH_INT_LEAST64_T < 1
typedef int64_t int_least64_t;
#endif
#if CH_UINT_LEAST64_T < 1
typedef uint64_t uint_least64_t;
#endif
#if CH_INT_FAST8_T < 1
typedef int8_t int_fast8_t;
#endif
#if CH_UINT_FAST8_T < 1
typedef uint8_t uint_fast8_t;
#endif
#if CH_INT_FAST16_T < 1
typedef int16_t int_fast16_t;
#endif
#if CH_UINT_FAST16_T < 1
typedef uint16_t uint_fast16_t;
#endif
#if CH_INT_FAST32_T < 1
typedef int32_t int_fast32_t;
#endif
#if CH_UINT_FAST32_T < 1
typedef uint32_t uint_fast32_t;
#endif
#if CH_INT_FAST64_T < 1
typedef int64_t int_fast64_t;
#endif
#if CH_UINT_FAST64_T < 1
typedef uint64_t uint_fast64_t;
#endif
#if CH_INT8_MIN < 1
@define INT8_MIN (-0x80)
#endif
#if CH_INT16_MIN < 1
@define INT16_MIN (-0x8000)
#endif
#if CH_INT32_MIN < 1
@define INT32_MIN (-0x80000000)
#endif
#if CH_INT64_MIN < 1
#if CH_LP64 > 0
@define INT64_MIN (-0x8000000000000000L)
#else
@define INT64_MIN (-0x8000000000000000LL)
#endif
#endif
#if CH_INT8_MAX < 1
@define INT8_MAX 0x7f
#endif
#if CH_INT16_MAX < 1
@define INT16_MAX 0x7fff
#endif
#if CH_INT32_MAX < 1
@define INT32_MAX 0x7fffffff
#endif
#if CH_INT64_MAX < 1
#if CH_LP64 > 0
@define INT64_MAX 0x7fffffffffffffffL
#else
@define INT64_MAX 0x7fffffffffffffffLL
#endif
#endif
#if CH_UINT8_MAX < 1
@define UINT8_MAX 0xff
#endif
#if CH_UINT16_MAX < 1
@define UINT16_MAX 0xffff
#endif
#if CH_UINT32_MAX < 1
@define UINT32_MAX 0xffffffffU
#endif
#if CH_UINT64_MAX < 1
#if CH_LP64 > 0
@define UINT64_MAX 0xffffffffffffffffUL
#else
@define UINT64_MAX 0xffffffffffffffffULL
#endif
#endif
#if CH_INT_LEAST8_MIN < 1
@define INT_LEAST8_MIN (-0x80)
#endif
#if CH_INT_LEAST16_MIN < 1
@define INT_LEAST16_MIN (-0x8000)
#endif
#if CH_INT_LEAST32_MIN < 1
@define INT_LEAST32_MIN (-0x80000000)
#endif
#if CH_INT_LEAST64_MIN < 1
#if CH_LP64 > 0
@define INT_LEAST64_MIN (-0x8000000000000000L)
#else
@define INT_LEAST64_MIN (-0x8000000000000000LL)
#endif
#endif
#if CH_INT_LEAST8_MAX < 1
@define INT_LEAST8_MAX 0x7f
#endif
#if CH_INT_LEAST16_MAX < 1
@define INT_LEAST16_MAX 0x7fff
#endif
#if CH_INT_LEAST32_MAX < 1
@define INT_LEAST32_MAX 0x7fffffff
#endif
#if CH_INT_LEAST64_MAX < 1
#if CH_LP64 > 0
@define INT_LEAST64_MAX 0x7fffffffffffffffL
#else
@define INT_LEAST64_MAX 0x7fffffffffffffffLL
#endif
#endif
#if CH_UINT_LEAST8_MAX < 1
@define UINT_LEAST8_MAX 0xff
#endif
#if CH_UINT_LEAST16_MAX < 1
@define UINT_LEAST16_MAX 0xffff
#endif
#if CH_UINT_LEAST32_MAX < 1
@define UINT_LEAST32_MAX 0xffffffffU
#endif
#if CH_UINT_LEAST64_MAX < 1
#if CH_LP64 > 0
@define UINT_LEAST64_MAX 0xffffffffffffffffUL
#else
@define UINT_LEAST64_MAX 0xffffffffffffffffULL
#endif
#endif
#if CH_INT_FAST8_MIN < 1
@define INT_FAST8_MIN (-0x80)
#endif
#if CH_INT_FAST16_MIN < 1
@define INT_FAST16_MIN (-0x8000)
#endif
#if CH_INT_FAST32_MIN < 1
@define INT_FAST32_MIN (-0x80000000)
#endif
#if CH_INT_FAST64_MIN < 1
#if CH_LP64 > 0
@define INT_FAST64_MIN (-0x8000000000000000L)
#else
@define INT_FAST64_MIN (-0x8000000000000000LL)
#endif
#endif
#if CH_INT_FAST8_MAX < 1
@define INT_FAST8_MAX 0x7f
#endif
#if CH_INT_FAST16_MAX < 1
@define INT_FAST16_MAX 0x7fff
#endif
#if CH_INT_FAST32_MAX < 1
@define INT_FAST32_MAX 0x7fffffff
#endif
#if CH_INT_FAST64_MAX < 1
#if CH_LP64 > 0
@define INT_FAST64_MAX 0x7fffffffffffffffL
#else
@define INT_FAST64_MAX 0x7fffffffffffffffLL
#endif
#endif
#if CH_UINT_FAST8_MAX < 1
@define UINT_FAST8_MAX 0xff
#endif
#if CH_UINT_FAST16_MAX < 1
@define UINT_FAST16_MAX 0xffff
#endif
#if CH_UINT_FAST32_MAX < 1
@define UINT_FAST32_MAX 0xffffffffU
#endif
#if CH_UINT_FAST64_MAX < 1
#if CH_LP64 > 0
@define UINT_FAST64_MAX 0xffffffffffffffffUL
#else
@define UINT_FAST64_MAX 0xffffffffffffffffULL
#endif
#endif
@endif /* _COMPAT_INTTYPES_H_ */

View File

@@ -0,0 +1,35 @@
#include "config.h"
@include "@real_header@"
@ifndef _COMPAT_MATH_H_
@define _COMPAT_MATH_H_
#if CH_FLOORF < 1
@define floorf(x) ((float)floor (x))
#endif
#if CH_CEILF < 1
@define ceilf(x) ((float)ceil (x))
#endif
#if CH_SINF < 1
@define sinf(x) ((float)sin (x))
#endif
#if CH_COSF < 1
@define cosf(x) ((float)cos (x))
#endif
#if CH_TANF < 1
@define tanf(x) ((float)tan (x))
#endif
#if CH_ASINF < 1
@define asinf(x) ((float)asin (x))
#endif
#if CH_ACOSF < 1
@define acosf(x) ((float)acos (x))
#endif
#if CH_ATANF < 1
@define atanf(x) ((float)atan (x))
#endif
#if CH_ATAN2F < 1
@define atan2f(x,y) ((float)atan2 (x, y))
#endif
#if CH_SQRTF < 1
@define sqrtf(x) ((float)sqrt (y))
#endif
@endif /* _COMPAT_MATH_H_ */

View File

@@ -0,0 +1,21 @@
#! /bin/sh
#
# $NetBSD: mkhdr.sh,v 1.2 2008/05/24 04:29:06 tnn Exp $
#
[ "${CC}" = "" ] && CC="cc"
CPP="${CC} -E"
# Prints the full absolute pathname to the file that is included by doing
# #include <file.h>.
real_header() {
echo "#include <$1>" | ${CPP} - 2> /dev/null |\
awk -F\" '/^\# 1 "\// {if (!done) {print $2; done=1; }}'
}
# Find the real header path
real_hdr="`real_header $1`"
[ "${real_hdr}" = "" ] && real_hdr="stdio.h"
# Preprocess the input header. Substitute the real header location and
# remove empty lines afterwards.
${CPP} - | sed -e "s,@real_header@,${real_hdr}," -e 's/^#.*//' -e 's/^@/#/' | grep -v '^$'

View File

@@ -0,0 +1,21 @@
#include "config.h"
@include "@real_header@"
@ifndef _COMPAT_RESOLV_H_
@define _COMPAT_RESOLV_H_
#if CH_HPUX_MISSING_RES_PROTO > 0
@ifdef __cplusplus
extern "C" {
@endif
ssize_t res_query(char*, int, int, u_char*, int);
ssize_t res_search(char*, int, int, u_char*, int);
ssize_t res_mkquery(int, const char*, int, int, const char*, int,\
const char*, char*, int);
ssize_t res_send(const char*, ssize_t, char*, int);
int res_init();
ssize_t dn_comp(const char*, u_char*, ssize_t, u_char**, u_char**);
ssize_t dn_expand(const u_char*, const u_char*, const u_char*, u_char*, int);
@ifdef __cplusplus
}
@endif
#endif
@endif /* _COMPAT_RESOLV_H_ */

View File

@@ -0,0 +1 @@
@include <sys/time.h>

View File

@@ -0,0 +1,8 @@
#include "config.h"
@include "@real_header@"
@ifndef _COMPAT_STDARG_H_
@define _COMPAT_STDARG_H_
#if CH_HAVE_VA_COPY < 1
@define va_copy(dst,src) (dst=(src))
#endif
@endif /* _COMPAT_STDARG_H_ */

View File

@@ -0,0 +1 @@
@include <inttypes.h>

View File

@@ -0,0 +1,10 @@
#include "config.h"
@include "@real_header@"
@ifndef _COMPAT_STDLIB_H_
@define _COMPAT_STDLIB_H_
#if CH_HPUX___STRTOLL > 0
@include <inttypes.h>
@define strtoll(nptr, endptr, base) __strtoll(nptr, endptr, base)
@define strtoull(nptr, endptr, base) __strtoull(nptr, endptr, base)
#endif
@endif /* _COMPAT_STDLIB_H_ */