Add reallocarr(3) to tools/compat

This should unbreak libutil(3) creation on systems withot reallocarr(3).
This commit is contained in:
kamil 2015-07-26 14:01:53 +00:00
parent 69f3e6744c
commit c4c10ad1a1
5 changed files with 14 additions and 7 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.73 2015/01/18 18:09:10 christos Exp $
# $NetBSD: Makefile,v 1.74 2015/07/26 14:01:53 kamil Exp $
HOSTLIB= nbcompat
@ -13,7 +13,7 @@ SRCS= atoll.c basename.c cdbr.c cdbw.c dirname.c \
mi_vector_hash.c mkdtemp.c \
mkstemp.c pread.c putc_unlocked.c pwcache.c pwrite.c \
pw_scan.c \
raise_default_signal.c rmd160.c rmd160hl.c \
raise_default_signal.c reallocarr.c rmd160.c rmd160hl.c \
setenv.c setgroupent.c \
setpassent.c setprogname.c sha1.c sha1hl.c sha2.c \
sha256hl.c sha384hl.c sha512hl.c snprintb.c snprintf.c \

View File

@ -1,4 +1,4 @@
/* $NetBSD: compat_defs.h,v 1.101 2015/01/16 18:44:06 christos Exp $ */
/* $NetBSD: compat_defs.h,v 1.102 2015/07/26 14:01:53 kamil Exp $ */
#ifndef __NETBSD_COMPAT_DEFS_H__
#define __NETBSD_COMPAT_DEFS_H__
@ -469,6 +469,10 @@ ssize_t pwrite(int, const void *, size_t, off_t);
int raise_default_signal(int);
#endif
#if !HAVE_REALLOCARR
int reallocarr(void *, size_t, size_t);
#endif
#if !HAVE_SETENV
int setenv(const char *, const char *, int);
#endif

View File

@ -5044,7 +5044,7 @@ for ac_func in atoll asprintf asnprintf basename devname dirfd dirname \
getopt getopt_long group_from_gid gid_from_group \
heapsort isblank issetugid lchflags lchmod lchown lutimes mkstemp \
mkdtemp poll pread putc_unlocked pwcache_userdb pwcache_groupdb \
pwrite raise_default_signal random setenv \
pwrite raise_default_signal random reallocarr setenv \
setgroupent setprogname setpassent \
snprintb_m snprintf strlcat strlcpy strmode \
strndup strnlen strsep strsuftoll strtoi strtoll strtou \

View File

@ -1,4 +1,4 @@
# $NetBSD: configure.ac,v 1.83 2015/01/16 18:44:06 christos Exp $
# $NetBSD: configure.ac,v 1.84 2015/07/26 14:01:53 kamil Exp $
#
# Autoconf definition file for libnbcompat.
#
@ -157,7 +157,7 @@ AC_CHECK_FUNCS(atoll asprintf asnprintf basename devname dirfd dirname \
getopt getopt_long group_from_gid gid_from_group \
heapsort isblank issetugid lchflags lchmod lchown lutimes mkstemp \
mkdtemp poll pread putc_unlocked pwcache_userdb pwcache_groupdb \
pwrite raise_default_signal random setenv \
pwrite raise_default_signal random reallocarr setenv \
setgroupent setprogname setpassent \
snprintb_m snprintf strlcat strlcpy strmode \
strndup strnlen strsep strsuftoll strtoi strtoll strtou \

View File

@ -1,6 +1,6 @@
/* nbtool_config.h.in. Generated automatically from configure.ac by autoheader. */
/* $NetBSD: nbtool_config.h.in,v 1.36 2015/01/16 18:44:31 christos Exp $ */
/* $NetBSD: nbtool_config.h.in,v 1.37 2015/07/26 14:01:53 kamil Exp $ */
#ifndef __NETBSD_NBTOOL_CONFIG_H__
#define __NETBSD_NBTOOL_CONFIG_H__
@ -419,6 +419,9 @@
/* Define if you have the `random' function. */
#undef HAVE_RANDOM
/* Define if you have the `reallocarr' function. */
#undef HAVE_REALLOCARR
/* Define if you have the <resolv.h> header file. */
#undef HAVE_RESOLV_H