From 93c459d2f8b33c06bba861b3cf7933f384a4c73a Mon Sep 17 00:00:00 2001 From: jlam Date: Sat, 13 Sep 2003 03:50:12 +0000 Subject: Allow libnbcompat to be used without being installed. Also remove the unused header file util.h. --- pkgtools/libnbcompat/files/Makefile.in | 17 +- pkgtools/libnbcompat/files/bits.c | 8 +- pkgtools/libnbcompat/files/configure | 4 +- pkgtools/libnbcompat/files/configure.ac | 4 +- pkgtools/libnbcompat/files/nbcompat/config.h.in | 565 ++++++++++++++++++++++ pkgtools/libnbcompat/files/nbcompat/nbconfig.h.in | 565 ---------------------- pkgtools/libnbcompat/files/util.h | 119 ----- 7 files changed, 581 insertions(+), 701 deletions(-) create mode 100644 pkgtools/libnbcompat/files/nbcompat/config.h.in delete mode 100644 pkgtools/libnbcompat/files/nbcompat/nbconfig.h.in delete mode 100644 pkgtools/libnbcompat/files/util.h diff --git a/pkgtools/libnbcompat/files/Makefile.in b/pkgtools/libnbcompat/files/Makefile.in index 7d014a53011..d4a63bb75eb 100644 --- a/pkgtools/libnbcompat/files/Makefile.in +++ b/pkgtools/libnbcompat/files/Makefile.in @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.in,v 1.16 2003/09/06 01:37:17 jlam Exp $ +# $NetBSD: Makefile.in,v 1.17 2003/09/13 03:50:12 jlam Exp $ # srcdir= @srcdir@ @@ -20,9 +20,9 @@ RANLIB= @RANLIB@ LIB= libnbcompat.a INCS= nbcompat.h nbcompat/err.h nbcompat/fts.h nbcompat/getopt.h \ - nbcompat/glob.h nbcompat/md5.h nbcompat/nbtypes.h \ - nbcompat/poll.h nbcompat/rmd160.h nbcompat/sha1.h \ - nbcompat/statfs.h nbcompat/vis.h + nbcompat/glob.h nbcompat/md5.h nbcompat/nbconfig.h \ + nbcompat/nbtypes.h nbcompat/poll.h nbcompat/rmd160.h \ + nbcompat/sha1.h nbcompat/statfs.h nbcompat/vis.h OBJS= @LIBOBJS@ @@ -31,7 +31,7 @@ COMPILE= $(CC) $(CPPFLAGS) $(CFLAGS) .PHONY: all install clean distclean -all: nbcompat/nbtypes.h nbcompat/nbconfig.hi $(LIB) +all: nbcompat/nbtypes.h nbcompat/nbconfig.h $(LIB) .c.o: nbcompat/nbtypes.h $(COMPILE) $(DEFS) -c $< @@ -40,7 +40,7 @@ $(LIB): $(OBJS) $(AR) cr $@ $(OBJS) $(RANLIB) $@ -nbcompat/nbconfig.hi: nbcompat/nbconfig.h +nbcompat/nbconfig.h: nbcompat/config.h $(AWK) ' \ BEGIN { process = 1 } \ /NBCOMPAT template section follows\./ { process = 0 } \ @@ -57,7 +57,7 @@ nbcompat/nbconfig.hi: nbcompat/nbconfig.h } \ } \ { print } \ - ' nbcompat/nbconfig.h > $@ + ' nbcompat/config.h > $@ nbcompat/nbtypes.h: bits ./bits $@ @@ -75,10 +75,9 @@ install: echo "$(INSTALL) -m 444 $$file $(prefix)/include/$$file"; \ $(INSTALL) -m 444 $$file $(prefix)/include/$$file; \ done - $(INSTALL) -m 444 nbcompat/nbconfig.hi $(prefix)/include/nbcompat/nbconfig.h clean: - rm -f *.a *.o bits nbcompat/nbtypes.h nbcompat/nbcompat.hi + rm -f *.a *.o bits nbcompat/nbtypes.h nbcompat/nbcompat.h distclean: clean rm -f Makefile config.log config.status configure.lineno diff --git a/pkgtools/libnbcompat/files/bits.c b/pkgtools/libnbcompat/files/bits.c index fd24b4ec1ec..a0561e2c41f 100644 --- a/pkgtools/libnbcompat/files/bits.c +++ b/pkgtools/libnbcompat/files/bits.c @@ -1,4 +1,4 @@ -/* $NetBSD: bits.c,v 1.5 2003/09/06 23:03:01 grant Exp $ */ +/* $NetBSD: bits.c,v 1.6 2003/09/13 03:50:12 jlam Exp $ */ /* * Copyright (c) 1997 - 2000 Kungliga Tekniska Högskolan @@ -33,9 +33,9 @@ * SUCH DAMAGE. */ -#include "nbcompat/nbconfig.h" +#include "nbcompat/config.h" #if 0 -__RCSID("$NetBSD: bits.c,v 1.5 2003/09/06 23:03:01 grant Exp $"); +__RCSID("$NetBSD: bits.c,v 1.6 2003/09/13 03:50:12 jlam Exp $"); #endif #include #include @@ -129,7 +129,7 @@ int main(int argc, char **argv) } fprintf(f, "/* %s -- this file was generated by\n", fn); fprintf(f, " %*s %s */\n\n", (int)strlen(fn), "", - "$Id: bits.c,v 1.5 2003/09/06 23:03:01 grant Exp $"); + "$Id: bits.c,v 1.6 2003/09/13 03:50:12 jlam Exp $"); fprintf(f, "#ifndef %s\n", hb); fprintf(f, "#define %s\n", hb); fprintf(f, "\n"); diff --git a/pkgtools/libnbcompat/files/configure b/pkgtools/libnbcompat/files/configure index c0c858886d5..97bb418ab65 100755 --- a/pkgtools/libnbcompat/files/configure +++ b/pkgtools/libnbcompat/files/configure @@ -1274,7 +1274,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu - ac_config_headers="$ac_config_headers nbcompat/nbconfig.h" + ac_config_headers="$ac_config_headers nbcompat/config.h" test "$program_prefix" != NONE && program_transform_name="s,^,$program_prefix,;$program_transform_name" @@ -8653,7 +8653,7 @@ do case "$ac_config_target" in # Handling of arguments. "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "nbcompat/nbconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS nbcompat/nbconfig.h" ;; + "nbcompat/config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS nbcompat/config.h" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; diff --git a/pkgtools/libnbcompat/files/configure.ac b/pkgtools/libnbcompat/files/configure.ac index bfec381adbd..78b35817346 100644 --- a/pkgtools/libnbcompat/files/configure.ac +++ b/pkgtools/libnbcompat/files/configure.ac @@ -1,9 +1,9 @@ -dnl $NetBSD: configure.ac,v 1.26 2003/09/11 11:26:10 grant Exp $ +dnl $NetBSD: configure.ac,v 1.27 2003/09/13 03:50:13 jlam Exp $ dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.52) AC_INIT([libnbcompat], [20030830], [grant@NetBSD.org]) -AC_CONFIG_HEADER(nbcompat/nbconfig.h) +AC_CONFIG_HEADER(nbcompat/config.h) AC_ARG_PROGRAM AC_CANONICAL_HOST diff --git a/pkgtools/libnbcompat/files/nbcompat/config.h.in b/pkgtools/libnbcompat/files/nbcompat/config.h.in new file mode 100644 index 00000000000..dff1197e838 --- /dev/null +++ b/pkgtools/libnbcompat/files/nbcompat/config.h.in @@ -0,0 +1,565 @@ +/* nbcompat/config.h.in. Generated from configure.ac by autoheader. */ + +/* Define to 1 if the `getpgrp' function requires zero arguments. */ +#undef GETPGRP_VOID + +/* Define to 1 if you have the header file. */ +#undef HAVE_ARPA_NAMESER_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_ASSERT_H + +/* Define to 1 if you have the `bcopy' function. */ +#undef HAVE_BCOPY + +/* Define to 1 if you have the header file. */ +#undef HAVE_BIND_BITYPES_H + +/* Define to 1 if you have the `bzero' function. */ +#undef HAVE_BZERO + +/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you + don't. */ +#undef HAVE_DECL_STRERROR_R + +/* Define to 1 if you have the header file. */ +#undef HAVE_DIRENT_H + +/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ +#undef HAVE_DOPRNT + +/* Define to 1 if you have the `err' function. */ +#undef HAVE_ERR + +/* Define to 1 if you have the header file. */ +#undef HAVE_ERRNO_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_ERR_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_FCNTL_H + +/* Define to 1 if you have the `fgetln' function. */ +#undef HAVE_FGETLN + +/* Define to 1 if you have the `fparseln' function. */ +#undef HAVE_FPARSELN + +/* Define to 1 if you have the `fseeko' function. */ +#undef HAVE_FSEEKO + +/* Define to 1 if you have the header file. */ +#undef HAVE_FTS_H + +/* Define to 1 if you have the `getenv' function. */ +#undef HAVE_GETENV + +/* Define to 1 if you have the `getmode' function. */ +#undef HAVE_GETMODE + +/* Define to 1 if you have the header file. */ +#undef HAVE_GETOPT_H + +/* Define to 1 if you have the `getpassphrase' function. */ +#undef HAVE_GETPASSPHRASE + +/* Define to 1 if you have the `getpgrp' function. */ +#undef HAVE_GETPGRP + +/* Define to 1 if you have the `gid_from_group' function. */ +#undef HAVE_GID_FROM_GROUP + +/* Define to 1 if you have the `glob' function. */ +#undef HAVE_GLOB + +/* Define to 1 if you have the header file. */ +#undef HAVE_GLOB_H + +/* Define to 1 if you have the `group_from_gid' function. */ +#undef HAVE_GROUP_FROM_GID + +/* Define to 1 if you have the `inet_ntop' function. */ +#undef HAVE_INET_NTOP + +/* Define to 1 if you have the `inet_pton' function. */ +#undef HAVE_INET_PTON + +/* Define to 1 if the system has the type `int16_t'. */ +#undef HAVE_INT16_T + +/* Define to 1 if the system has the type `int32_t'. */ +#undef HAVE_INT32_T + +/* Define to 1 if the system has the type `int64_t'. */ +#undef HAVE_INT64_T + +/* Define to 1 if the system has the type `int8_t'. */ +#undef HAVE_INT8_T + +/* Define to 1 if you have the header file. */ +#undef HAVE_INTTYPES_H + +/* Define to 1 if you have the `isblank' function. */ +#undef HAVE_ISBLANK + +/* Define to 1 if you have the `lchflags' function. */ +#undef HAVE_LCHFLAGS + +/* Define to 1 if you have the `lchmod' function. */ +#undef HAVE_LCHMOD + +/* Define to 1 if you have the `lchown' function. */ +#undef HAVE_LCHOWN + +/* Define to 1 if you have the `util' library (-lutil). */ +#undef HAVE_LIBUTIL + +/* Define to 1 if you have the header file. */ +#undef HAVE_LIBUTIL_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_LIMITS_H + +/* Define to 1 if the system has the type `long long'. */ +#undef HAVE_LONG_LONG + +/* Define to 1 if you have the `lutimes' function. */ +#undef HAVE_LUTIMES + +/* Define to 1 if you have the header file. */ +#undef HAVE_MACHINE_ENDIAN_H + +/* Define to 1 if your system has a GNU libc compatible `malloc' function, and + to 0 otherwise. */ +#undef HAVE_MALLOC + +/* Define to 1 if you have the header file. */ +#undef HAVE_MD5_H + +/* Define to 1 if you have the `memcpy' function. */ +#undef HAVE_MEMCPY + +/* Define to 1 if you have the `memmove' function. */ +#undef HAVE_MEMMOVE + +/* Define to 1 if you have the header file. */ +#undef HAVE_MEMORY_H + +/* Define to 1 if you have the `memset' function. */ +#undef HAVE_MEMSET + +/* Define to 1 if you have the `mkdtemp' function. */ +#undef HAVE_MKDTEMP + +/* Define to 1 if you have the `mkstemp' function. */ +#undef HAVE_MKSTEMP + +/* Define to 1 if the `getopt_long' function is built into the library. */ +#undef HAVE_NBCOMPAT_GETOPT_LONG + +/* Define to 1 if the `statfs' function is built into the library. */ +#undef HAVE_NBCOMPAT_STATFS + +/* Define to 1 if the `vis' function is built into the library. */ +#undef HAVE_NBCOMPAT_VIS + +/* Define to 1 if you have the header file. */ +#undef HAVE_NDIR_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_NETDB_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_NETINET_IN6_MACHTYPES_H + +/* Define to 1 if optarg is declared in or */ +#undef HAVE_OPTARG_D + +/* Define to 1 if optind is declared in or */ +#undef HAVE_OPTIND_D + +/* Define to 1 if you have the header file. */ +#undef HAVE_PATHS_H + +/* Define to 1 if you have the `poll' function. */ +#undef HAVE_POLL + +/* Define to 1 if you have the header file. */ +#undef HAVE_POLL_H + +/* Define to 1 if *printf() uses %qd to print `long long' (otherwise uses + %lld). */ +#undef HAVE_PRINTF_QD + +/* Define to 1 if you have the `pwcache_groupdb' function. */ +#undef HAVE_PWCACHE_GROUPDB + +/* Define to 1 if you have the `pwcache_userdb' function. */ +#undef HAVE_PWCACHE_USERDB + +/* Define to 1 if you have the header file. */ +#undef HAVE_PWD_H + +/* Define to 1 if `long long' is supported and sizeof(off_t) >= 8. */ +#undef HAVE_QUAD_SUPPORT + +/* Define to 1 if you have the header file. */ +#undef HAVE_RMD160_H + +/* Define to 1 if you have the `select' function. */ +#undef HAVE_SELECT + +/* Define to 1 if you have the `setenv' function. */ +#undef HAVE_SETENV + +/* Define to 1 if you have the `setgrent' function. */ +#undef HAVE_SETGRENT + +/* Define to 1 if you have the `setgroupent' function. */ +#undef HAVE_SETGROUPENT + +/* Define to 1 if you have the `setlocale' function. */ +#undef HAVE_SETLOCALE + +/* Define to 1 if you have the `setmode' function. */ +#undef HAVE_SETMODE + +/* Define to 1 if you have the `setpassent' function. */ +#undef HAVE_SETPASSENT + +/* Define to 1 if you have the `setprogname' function. */ +#undef HAVE_SETPROGNAME + +/* Define to 1 if you have the `setpwent' function. */ +#undef HAVE_SETPWENT + +/* Define to 1 if you have the header file. */ +#undef HAVE_SHA1_H + +/* Define to 1 if you have the `snprintf' function. */ +#undef HAVE_SNPRINTF + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDINT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDLIB_H + +/* Define to 1 if you have the `strdup' function. */ +#undef HAVE_STRDUP + +/* Define to 1 if you have the `strerror' function. */ +#undef HAVE_STRERROR + +/* Define to 1 if you have the `strerror_r' function. */ +#undef HAVE_STRERROR_R + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRINGLIST_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRINGS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRING_H + +/* Define to 1 if you have the `strlcat' function. */ +#undef HAVE_STRLCAT + +/* Define to 1 if you have the `strlcpy' function. */ +#undef HAVE_STRLCPY + +/* Define to 1 if you have the `strmode' function. */ +#undef HAVE_STRMODE + +/* Define to 1 if you have the `strptime' function. */ +#undef HAVE_STRPTIME + +/* Define to 1 if you have the `strsep' function. */ +#undef HAVE_STRSEP + +/* Define to 1 if you have the `strsvis' function. */ +#undef HAVE_STRSVIS + +/* Define to 1 if you have the `strtoll' function. */ +#undef HAVE_STRTOLL + +/* Define to 1 if you have the `strunvis' function. */ +#undef HAVE_STRUNVIS + +/* Define to 1 if you have the `strvis' function. */ +#undef HAVE_STRVIS + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_BITYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_BYTEORDER_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_CDEFS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_DIR_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_ENDIAN_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_FILE_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_MKDEV_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_MOUNT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_NDIR_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_PARAM_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_POLL_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_QUEUE_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STATFS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STATVFS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STAT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TIME_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TTYCOM_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_VFS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_TERMCAP_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_TERMIOS_H + +/* Define to 1 if you have the `timegm' function. */ +#undef HAVE_TIMEGM + +/* Define to 1 if you have the header file. */ +#undef HAVE_TIME_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_TZFILE_H + +/* Define to 1 if you have the `uid_from_user' function. */ +#undef HAVE_UID_FROM_USER + +/* Define to 1 if the system has the type `uint16_t'. */ +#undef HAVE_UINT16_T + +/* Define to 1 if the system has the type `uint32_t'. */ +#undef HAVE_UINT32_T + +/* Define to 1 if the system has the type `uint64_t'. */ +#undef HAVE_UINT64_T + +/* Define to 1 if the system has the type `uint8_t'. */ +#undef HAVE_UINT8_T + +/* Define to 1 if you have the header file. */ +#undef HAVE_UNISTD_H + +/* Define to 1 if you have the `user_from_uid' function. */ +#undef HAVE_USER_FROM_UID + +/* Define to 1 if you have the `usleep' function. */ +#undef HAVE_USLEEP + +/* Define to 1 if you have the header file. */ +#undef HAVE_UTIL_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_UTMP_H + +/* Define to 1 if the system has the type `u_int16_t'. */ +#undef HAVE_U_INT16_T + +/* Define to 1 if the system has the type `u_int32_t'. */ +#undef HAVE_U_INT32_T + +/* Define to 1 if the system has the type `u_int64_t'. */ +#undef HAVE_U_INT64_T + +/* Define to 1 if the system has the type `u_int8_t'. */ +#undef HAVE_U_INT8_T + +/* Define to 1 if you have the header file. */ +#undef HAVE_VIS_H + +/* Define to 1 if you have the `vprintf' function. */ +#undef HAVE_VPRINTF + +/* define if your compiler has __attribute__ */ +#undef HAVE___ATTRIBUTE__ + +/* 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 + +/* The size of a `off_t', as computed by sizeof. */ +#undef SIZEOF_OFF_T + +/* Define to 1 if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Define to 1 if strerror_r returns char *. */ +#undef STRERROR_R_CHAR_P + +/* Define to 1 if you can safely include both and . */ +#undef TIME_WITH_SYS_TIME + +/* Define to 1 if your processor stores words with the most significant byte + first (like Motorola and SPARC, unlike Intel and VAX). */ +#undef WORDS_BIGENDIAN + +/* Define to rpl_malloc if the replacement function should be used. */ +#undef malloc + +/* Define to `unsigned' if does not define. */ +#undef size_t + + +/* NBCOMPAT template section follows. */ + +#ifndef HAVE___ATTRIBUTE__ +# define __attribute__(x) +#endif + +#if HAVE_SYS_CDEFS_H +#include +#endif + +#ifndef __IDSTRING +# define __IDSTRING(name,string) \ + static const char name[] __attribute__((__unused__)) = string +#endif + +#ifndef __RCSID +# define __RCSID(_s) __IDSTRING(rcsid,_s) +#endif + +#ifndef __COPYRIGHT +# define __COPYRIGHT(_s) __IDSTRING(copyright,_s) +#endif + +#ifndef __P +# if defined(__STDC__) || defined(__cplusplus) +# define __P(protos) protos /* full-blown ANSI C */ +# else +# define __P(protos) () /* traditional C preprocessor */ +# endif +#endif + +#ifndef __CONCAT +# if defined(__STDC__) || defined(__cplusplus) +# define __CONCAT(x,y) x ## y +# else +# define __CONCAT(x,y) x/**/y +# endif +#endif + +#ifndef __BEGIN_DECLS +# if defined(__cplusplus) +# define __BEGIN_DECLS extern "C" { +# else +# define __BEGIN_DECLS +# endif +#endif + +#ifndef __END_DECLS +# if defined(__cplusplus) +# define __END_DECLS }; +# else +# define __END_DECLS +# endif +#endif + +#if HAVE_SYS_PARAM_H +#include +#endif + +#if HAVE_SYS_ENDIAN_H +#include +#endif + +#if HAVE_MACHINE_ENDIAN_H +#include +#endif + +#if HAVE_SYS_BYTEORDER_H +#include +#endif + +#ifndef LITTLE_ENDIAN +# define LITTLE_ENDIAN 1234 +#endif + +#ifndef BIG_ENDIAN +# define BIG_ENDIAN 4321 +#endif + +#ifndef UINT_MAX +# define UINT_MAX 4294967295U +#endif + +#ifndef BYTE_ORDER +# if defined(_BIG_ENDIAN) +# define BYTE_ORDER BIG_ENDIAN +# elif defined(_LITTE_ENDIAN) +# define BYTE_ORDER LITTLE_ENDIAN +# elif defined(WORDS_BIGENDIAN) +# define BYTE_ORDER BIG_ENDIAN +# else +# define BYTE_ORDER LITTLE_ENDIAN +# endif +#endif + +#if defined(HAVE_MEMSET) +# define MEMSET_BZERO(p,l) memset((p), 0, (l)) +#elif defined(HAVE_BZERO) +# define MEMSET_BZERO(p,l) bzero((p), (l)) +#else +# error You need either memset or bzero +#endif + +#if defined(HAVE_MEMCPY) +# define MEMCPY_BCOPY(d,s,l) memcpy((d), (s), (l)) +#elif defined(HAVE_BCOPY) +# define MEMCPY_BCOPY(d,s,l) bcopy((s), (d), (l)) +#else +# error You need either memcpy or bcopy +#endif + diff --git a/pkgtools/libnbcompat/files/nbcompat/nbconfig.h.in b/pkgtools/libnbcompat/files/nbcompat/nbconfig.h.in deleted file mode 100644 index 65938b3bede..00000000000 --- a/pkgtools/libnbcompat/files/nbcompat/nbconfig.h.in +++ /dev/null @@ -1,565 +0,0 @@ -/* nbcompat/nbconfig.h.in. Generated from configure.ac by autoheader. */ - -/* Define to 1 if the `getpgrp' function requires zero arguments. */ -#undef GETPGRP_VOID - -/* Define to 1 if you have the header file. */ -#undef HAVE_ARPA_NAMESER_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_ASSERT_H - -/* Define to 1 if you have the `bcopy' function. */ -#undef HAVE_BCOPY - -/* Define to 1 if you have the header file. */ -#undef HAVE_BIND_BITYPES_H - -/* Define to 1 if you have the `bzero' function. */ -#undef HAVE_BZERO - -/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you - don't. */ -#undef HAVE_DECL_STRERROR_R - -/* Define to 1 if you have the header file. */ -#undef HAVE_DIRENT_H - -/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ -#undef HAVE_DOPRNT - -/* Define to 1 if you have the `err' function. */ -#undef HAVE_ERR - -/* Define to 1 if you have the header file. */ -#undef HAVE_ERRNO_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_ERR_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_FCNTL_H - -/* Define to 1 if you have the `fgetln' function. */ -#undef HAVE_FGETLN - -/* Define to 1 if you have the `fparseln' function. */ -#undef HAVE_FPARSELN - -/* Define to 1 if you have the `fseeko' function. */ -#undef HAVE_FSEEKO - -/* Define to 1 if you have the header file. */ -#undef HAVE_FTS_H - -/* Define to 1 if you have the `getenv' function. */ -#undef HAVE_GETENV - -/* Define to 1 if you have the `getmode' function. */ -#undef HAVE_GETMODE - -/* Define to 1 if you have the header file. */ -#undef HAVE_GETOPT_H - -/* Define to 1 if you have the `getpassphrase' function. */ -#undef HAVE_GETPASSPHRASE - -/* Define to 1 if you have the `getpgrp' function. */ -#undef HAVE_GETPGRP - -/* Define to 1 if you have the `gid_from_group' function. */ -#undef HAVE_GID_FROM_GROUP - -/* Define to 1 if you have the `glob' function. */ -#undef HAVE_GLOB - -/* Define to 1 if you have the header file. */ -#undef HAVE_GLOB_H - -/* Define to 1 if you have the `group_from_gid' function. */ -#undef HAVE_GROUP_FROM_GID - -/* Define to 1 if you have the `inet_ntop' function. */ -#undef HAVE_INET_NTOP - -/* Define to 1 if you have the `inet_pton' function. */ -#undef HAVE_INET_PTON - -/* Define to 1 if the system has the type `int16_t'. */ -#undef HAVE_INT16_T - -/* Define to 1 if the system has the type `int32_t'. */ -#undef HAVE_INT32_T - -/* Define to 1 if the system has the type `int64_t'. */ -#undef HAVE_INT64_T - -/* Define to 1 if the system has the type `int8_t'. */ -#undef HAVE_INT8_T - -/* Define to 1 if you have the header file. */ -#undef HAVE_INTTYPES_H - -/* Define to 1 if you have the `isblank' function. */ -#undef HAVE_ISBLANK - -/* Define to 1 if you have the `lchflags' function. */ -#undef HAVE_LCHFLAGS - -/* Define to 1 if you have the `lchmod' function. */ -#undef HAVE_LCHMOD - -/* Define to 1 if you have the `lchown' function. */ -#undef HAVE_LCHOWN - -/* Define to 1 if you have the `util' library (-lutil). */ -#undef HAVE_LIBUTIL - -/* Define to 1 if you have the header file. */ -#undef HAVE_LIBUTIL_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_LIMITS_H - -/* Define to 1 if the system has the type `long long'. */ -#undef HAVE_LONG_LONG - -/* Define to 1 if you have the `lutimes' function. */ -#undef HAVE_LUTIMES - -/* Define to 1 if you have the header file. */ -#undef HAVE_MACHINE_ENDIAN_H - -/* Define to 1 if your system has a GNU libc compatible `malloc' function, and - to 0 otherwise. */ -#undef HAVE_MALLOC - -/* Define to 1 if you have the header file. */ -#undef HAVE_MD5_H - -/* Define to 1 if you have the `memcpy' function. */ -#undef HAVE_MEMCPY - -/* Define to 1 if you have the `memmove' function. */ -#undef HAVE_MEMMOVE - -/* Define to 1 if you have the header file. */ -#undef HAVE_MEMORY_H - -/* Define to 1 if you have the `memset' function. */ -#undef HAVE_MEMSET - -/* Define to 1 if you have the `mkdtemp' function. */ -#undef HAVE_MKDTEMP - -/* Define to 1 if you have the `mkstemp' function. */ -#undef HAVE_MKSTEMP - -/* Define to 1 if the `getopt_long' function is built into the library. */ -#undef HAVE_NBCOMPAT_GETOPT_LONG - -/* Define to 1 if the `statfs' function is built into the library. */ -#undef HAVE_NBCOMPAT_STATFS - -/* Define to 1 if the `vis' function is built into the library. */ -#undef HAVE_NBCOMPAT_VIS - -/* Define to 1 if you have the header file. */ -#undef HAVE_NDIR_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_NETDB_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_NETINET_IN6_MACHTYPES_H - -/* Define to 1 if optarg is declared in or */ -#undef HAVE_OPTARG_D - -/* Define to 1 if optind is declared in or */ -#undef HAVE_OPTIND_D - -/* Define to 1 if you have the header file. */ -#undef HAVE_PATHS_H - -/* Define to 1 if you have the `poll' function. */ -#undef HAVE_POLL - -/* Define to 1 if you have the header file. */ -#undef HAVE_POLL_H - -/* Define to 1 if *printf() uses %qd to print `long long' (otherwise uses - %lld). */ -#undef HAVE_PRINTF_QD - -/* Define to 1 if you have the `pwcache_groupdb' function. */ -#undef HAVE_PWCACHE_GROUPDB - -/* Define to 1 if you have the `pwcache_userdb' function. */ -#undef HAVE_PWCACHE_USERDB - -/* Define to 1 if you have the header file. */ -#undef HAVE_PWD_H - -/* Define to 1 if `long long' is supported and sizeof(off_t) >= 8. */ -#undef HAVE_QUAD_SUPPORT - -/* Define to 1 if you have the header file. */ -#undef HAVE_RMD160_H - -/* Define to 1 if you have the `select' function. */ -#undef HAVE_SELECT - -/* Define to 1 if you have the `setenv' function. */ -#undef HAVE_SETENV - -/* Define to 1 if you have the `setgrent' function. */ -#undef HAVE_SETGRENT - -/* Define to 1 if you have the `setgroupent' function. */ -#undef HAVE_SETGROUPENT - -/* Define to 1 if you have the `setlocale' function. */ -#undef HAVE_SETLOCALE - -/* Define to 1 if you have the `setmode' function. */ -#undef HAVE_SETMODE - -/* Define to 1 if you have the `setpassent' function. */ -#undef HAVE_SETPASSENT - -/* Define to 1 if you have the `setprogname' function. */ -#undef HAVE_SETPROGNAME - -/* Define to 1 if you have the `setpwent' function. */ -#undef HAVE_SETPWENT - -/* Define to 1 if you have the header file. */ -#undef HAVE_SHA1_H - -/* Define to 1 if you have the `snprintf' function. */ -#undef HAVE_SNPRINTF - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDINT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDLIB_H - -/* Define to 1 if you have the `strdup' function. */ -#undef HAVE_STRDUP - -/* Define to 1 if you have the `strerror' function. */ -#undef HAVE_STRERROR - -/* Define to 1 if you have the `strerror_r' function. */ -#undef HAVE_STRERROR_R - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRINGLIST_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRINGS_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRING_H - -/* Define to 1 if you have the `strlcat' function. */ -#undef HAVE_STRLCAT - -/* Define to 1 if you have the `strlcpy' function. */ -#undef HAVE_STRLCPY - -/* Define to 1 if you have the `strmode' function. */ -#undef HAVE_STRMODE - -/* Define to 1 if you have the `strptime' function. */ -#undef HAVE_STRPTIME - -/* Define to 1 if you have the `strsep' function. */ -#undef HAVE_STRSEP - -/* Define to 1 if you have the `strsvis' function. */ -#undef HAVE_STRSVIS - -/* Define to 1 if you have the `strtoll' function. */ -#undef HAVE_STRTOLL - -/* Define to 1 if you have the `strunvis' function. */ -#undef HAVE_STRUNVIS - -/* Define to 1 if you have the `strvis' function. */ -#undef HAVE_STRVIS - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_BITYPES_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_BYTEORDER_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_CDEFS_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_DIR_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_ENDIAN_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_FILE_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_MKDEV_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_MOUNT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_NDIR_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_PARAM_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_POLL_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_QUEUE_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_STATFS_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_STATVFS_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_STAT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_TIME_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_TTYCOM_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_TYPES_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_VFS_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_TERMCAP_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_TERMIOS_H - -/* Define to 1 if you have the `timegm' function. */ -#undef HAVE_TIMEGM - -/* Define to 1 if you have the header file. */ -#undef HAVE_TIME_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_TZFILE_H - -/* Define to 1 if you have the `uid_from_user' function. */ -#undef HAVE_UID_FROM_USER - -/* Define to 1 if the system has the type `uint16_t'. */ -#undef HAVE_UINT16_T - -/* Define to 1 if the system has the type `uint32_t'. */ -#undef HAVE_UINT32_T - -/* Define to 1 if the system has the type `uint64_t'. */ -#undef HAVE_UINT64_T - -/* Define to 1 if the system has the type `uint8_t'. */ -#undef HAVE_UINT8_T - -/* Define to 1 if you have the header file. */ -#undef HAVE_UNISTD_H - -/* Define to 1 if you have the `user_from_uid' function. */ -#undef HAVE_USER_FROM_UID - -/* Define to 1 if you have the `usleep' function. */ -#undef HAVE_USLEEP - -/* Define to 1 if you have the header file. */ -#undef HAVE_UTIL_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_UTMP_H - -/* Define to 1 if the system has the type `u_int16_t'. */ -#undef HAVE_U_INT16_T - -/* Define to 1 if the system has the type `u_int32_t'. */ -#undef HAVE_U_INT32_T - -/* Define to 1 if the system has the type `u_int64_t'. */ -#undef HAVE_U_INT64_T - -/* Define to 1 if the system has the type `u_int8_t'. */ -#undef HAVE_U_INT8_T - -/* Define to 1 if you have the header file. */ -#undef HAVE_VIS_H - -/* Define to 1 if you have the `vprintf' function. */ -#undef HAVE_VPRINTF - -/* define if your compiler has __attribute__ */ -#undef HAVE___ATTRIBUTE__ - -/* 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 - -/* The size of a `off_t', as computed by sizeof. */ -#undef SIZEOF_OFF_T - -/* Define to 1 if you have the ANSI C header files. */ -#undef STDC_HEADERS - -/* Define to 1 if strerror_r returns char *. */ -#undef STRERROR_R_CHAR_P - -/* Define to 1 if you can safely include both and . */ -#undef TIME_WITH_SYS_TIME - -/* Define to 1 if your processor stores words with the most significant byte - first (like Motorola and SPARC, unlike Intel and VAX). */ -#undef WORDS_BIGENDIAN - -/* Define to rpl_malloc if the replacement function should be used. */ -#undef malloc - -/* Define to `unsigned' if does not define. */ -#undef size_t - - -/* NBCOMPAT template section follows. */ - -#ifndef HAVE___ATTRIBUTE__ -# define __attribute__(x) -#endif - -#if HAVE_SYS_CDEFS_H -#include -#endif - -#ifndef __IDSTRING -# define __IDSTRING(name,string) \ - static const char name[] __attribute__((__unused__)) = string -#endif - -#ifndef __RCSID -# define __RCSID(_s) __IDSTRING(rcsid,_s) -#endif - -#ifndef __COPYRIGHT -# define __COPYRIGHT(_s) __IDSTRING(copyright,_s) -#endif - -#ifndef __P -# if defined(__STDC__) || defined(__cplusplus) -# define __P(protos) protos /* full-blown ANSI C */ -# else -# define __P(protos) () /* traditional C preprocessor */ -# endif -#endif - -#ifndef __CONCAT -# if defined(__STDC__) || defined(__cplusplus) -# define __CONCAT(x,y) x ## y -# else -# define __CONCAT(x,y) x/**/y -# endif -#endif - -#ifndef __BEGIN_DECLS -# if defined(__cplusplus) -# define __BEGIN_DECLS extern "C" { -# else -# define __BEGIN_DECLS -# endif -#endif - -#ifndef __END_DECLS -# if defined(__cplusplus) -# define __END_DECLS }; -# else -# define __END_DECLS -# endif -#endif - -#if HAVE_SYS_PARAM_H -#include -#endif - -#if HAVE_SYS_ENDIAN_H -#include -#endif - -#if HAVE_MACHINE_ENDIAN_H -#include -#endif - -#if HAVE_SYS_BYTEORDER_H -#include -#endif - -#ifndef LITTLE_ENDIAN -# define LITTLE_ENDIAN 1234 -#endif - -#ifndef BIG_ENDIAN -# define BIG_ENDIAN 4321 -#endif - -#ifndef UINT_MAX -# define UINT_MAX 4294967295U -#endif - -#ifndef BYTE_ORDER -# if defined(_BIG_ENDIAN) -# define BYTE_ORDER BIG_ENDIAN -# elif defined(_LITTE_ENDIAN) -# define BYTE_ORDER LITTLE_ENDIAN -# elif defined(WORDS_BIGENDIAN) -# define BYTE_ORDER BIG_ENDIAN -# else -# define BYTE_ORDER LITTLE_ENDIAN -# endif -#endif - -#if defined(HAVE_MEMSET) -# define MEMSET_BZERO(p,l) memset((p), 0, (l)) -#elif defined(HAVE_BZERO) -# define MEMSET_BZERO(p,l) bzero((p), (l)) -#else -# error You need either memset or bzero -#endif - -#if defined(HAVE_MEMCPY) -# define MEMCPY_BCOPY(d,s,l) memcpy((d), (s), (l)) -#elif defined(HAVE_BCOPY) -# define MEMCPY_BCOPY(d,s,l) bcopy((s), (d), (l)) -#else -# error You need either memcpy or bcopy -#endif - diff --git a/pkgtools/libnbcompat/files/util.h b/pkgtools/libnbcompat/files/util.h deleted file mode 100644 index 86d1c6f36da..00000000000 --- a/pkgtools/libnbcompat/files/util.h +++ /dev/null @@ -1,119 +0,0 @@ -/* $NetBSD: util.h,v 1.4 2003/09/03 13:11:16 jlam Exp $ */ - -/*- - * Copyright (c) 1995 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#ifndef _UTIL_H_ -#define _UTIL_H_ - -#include - -#if HAVE_SYS_CDEFS_H -#include -#endif - -#if HAVE_SYS_TTYCOM_H -#include -#endif -#include -#include - -#if HAVE_PWD_H -#include -#endif - -#if HAVE_TERMIOS_H -#include -#endif - -#if HAVE_UTMP_H -#include -#endif - -#define PIDLOCK_NONBLOCK 1 -#define PIDLOCK_USEHOSTNAME 2 - -#define FPARSELN_UNESCESC 0x01 -#define FPARSELN_UNESCCONT 0x02 -#define FPARSELN_UNESCCOMM 0x04 -#define FPARSELN_UNESCREST 0x08 -#define FPARSELN_UNESCALL 0x0f - -__BEGIN_DECLS -struct iovec; -struct passwd; -struct termios; -struct utmp; -struct winsize; - -pid_t forkpty(int *, char *, struct termios *, struct winsize *); -const char *getbootfile(void); -int getmaxpartitions(void); -int getrawpartition(void); -void login(const struct utmp *); -int login_tty(int); -int logout(const char *); -void logwtmp(const char *, const char *, const char *); -int opendisk(const char *, int, char *, size_t, int); -int openpty(int *, int *, char *, struct termios *, - struct winsize *); -void pidfile(const char *); -int pidlock(const char *, int, pid_t *, const char *); -int pw_abort(void); -void pw_copy(int, int, struct passwd *, struct passwd *); -void pw_edit(int, const char *); -void pw_error(const char *, int, int); -void pw_getconf(char *, size_t, const char *, const char *); -const char *pw_getprefix(void); -void pw_init(void); -int pw_lock(int); -int pw_mkdb(const char *, int); -void pw_prompt(void); -int pw_setprefix(const char *); -int secure_path(const char *); -int ttyaction(const char *, const char *, const char *); -int ttylock(const char *, int, pid_t *); -char *ttymsg(struct iovec *, int, const char *, int); -int ttyunlock(const char *); - -#if !HAVE_STRSEP -char *strsep(char **, const char *); -#endif - -#if !HAVE_FGETLN -char *fgetln(FILE *, size_t *); -#endif - -__END_DECLS - -#endif /* !_UTIL_H_ */ -- cgit v1.2.3