Update to 20130908

* Fix build with libnbcompat-20120702, PR pkg/42142's side effect is fixed.
  Tested on Solaris 10, OpenBSD, FreeBSD etc.
  Detect system's sha2.h and SHA2 functions, and include nbcompat/sha2.h
  conditionally.
This commit is contained in:
ryoon 2013-09-08 16:20:10 +00:00
parent 1d27fe3722
commit 81ef462337
6 changed files with 3384 additions and 4083 deletions

View file

@ -1,7 +1,7 @@
# $NetBSD: Makefile,v 1.26 2012/09/11 23:19:35 asau Exp $
# $NetBSD: Makefile,v 1.27 2013/09/08 16:20:10 ryoon Exp $
#
DISTNAME= mtree-20120308
DISTNAME= mtree-20130908
CATEGORIES= pkgtools sysutils
MASTER_SITES= # empty
DISTFILES= # empty

View file

@ -1,4 +1,4 @@
/* $NetBSD: compare.c,v 1.6 2010/03/21 16:30:17 joerg Exp $ */
/* $NetBSD: compare.c,v 1.7 2013/09/08 16:20:10 ryoon Exp $ */
/*-
* Copyright (c) 1989, 1993
@ -44,7 +44,7 @@
#if 0
static char sccsid[] = "@(#)compare.c 8.1 (Berkeley) 6/6/93";
#else
__RCSID("$NetBSD: compare.c,v 1.6 2010/03/21 16:30:17 joerg Exp $");
__RCSID("$NetBSD: compare.c,v 1.7 2013/09/08 16:20:10 ryoon Exp $");
#endif
#endif /* not lint */
@ -87,11 +87,14 @@ __RCSID("$NetBSD: compare.c,v 1.6 2010/03/21 16:30:17 joerg Exp $");
#endif
#endif
#ifndef NO_SHA2
#if HAVE_SHA2_H
#if HAVE_SHA2_H && HAVE_SHA512_FILE
#include <sha2.h>
#else
#include <nbcompat/sha2.h>
#endif
#endif
#include "extern.h"
#define INDENTNAMELEN 8

View file

@ -108,6 +108,9 @@
/* Define to 1 if you have the <sha1.h> header file. */
#undef HAVE_SHA1_H
/* Define to 1 if you have the <sha2.h> header file. */
#undef HAVE_SHA2_H
/* Define to 1 if you have the <stdarg.h> header file. */
#undef HAVE_STDARG_H
@ -123,6 +126,9 @@
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define to 1 if you have the `SHA512_File' function. */
#undef HAVE_SHA512_FILE
/* Define to 1 if you have the `strchr' function. */
#undef HAVE_STRCHR

File diff suppressed because it is too large Load diff

View file

@ -16,7 +16,7 @@ AC_CHECK_LIB(util, fparseln)
# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([ctype.h dirent.h err.h errno.h fcntl.h fnmatch.h fts.h \
grp.h limits.h md5.h netdb.h pwd.h rmd160.h sha1.h \
grp.h limits.h md5.h netdb.h pwd.h rmd160.h sha1.h sha2.h \
stdarg.h stddef.h stdio.h stdlib.h string.h time.h unistd.h \
util.h vis.h])
AC_CHECK_HEADERS([sys/cdefs.h sys/param.h sys/queue.h sys/stat.h sys/types.h])
@ -39,7 +39,7 @@ AC_HEADER_TIME
# Checks for library functions.
AC_REPLACE_FNMATCH
AC_CHECK_FUNCS([endgrent endpwent getcwd gethostname mkdir strchr strpbrk strstr strtol strtoul])
AC_CHECK_FUNCS([endgrent endpwent getcwd gethostname mkdir SHA256_File strchr strpbrk strstr strtol strtoul])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT

View file

@ -1,4 +1,4 @@
/* $NetBSD: create.c,v 1.8 2010/03/21 16:32:06 joerg Exp $ */
/* $NetBSD: create.c,v 1.9 2013/09/08 16:20:10 ryoon Exp $ */
/*-
* Copyright (c) 1989, 1993
@ -44,7 +44,7 @@
#if 0
static char sccsid[] = "@(#)create.c 8.1 (Berkeley) 6/6/93";
#else
__RCSID("$NetBSD: create.c,v 1.8 2010/03/21 16:32:06 joerg Exp $");
__RCSID("$NetBSD: create.c,v 1.9 2013/09/08 16:20:10 ryoon Exp $");
#endif
#endif /* not lint */
@ -108,8 +108,10 @@ __RCSID("$NetBSD: create.c,v 1.8 2010/03/21 16:32:06 joerg Exp $");
#endif
#endif
#ifndef NO_SHA2
#if HAVE_SHA2_H
#if HAVE_SHA2_H && HAVE_SHA512_FILE
#include <sha2.h>
#else
#include <nbcompat/sha2.h>
#endif
#endif