Fix compilation failure on Interix: add autoconf check for sync(2).

This commit is contained in:
tv 2005-03-07 12:04:41 +00:00
parent 398d17537e
commit fb767aabcf
5 changed files with 59 additions and 1 deletions

View file

@ -1,5 +1,9 @@
$NetBSD: distinfo,v 1.4 2005/02/24 12:19:55 agc Exp $
$NetBSD: distinfo,v 1.5 2005/03/07 12:04:41 tv Exp $
SHA1 (nntpcache-3.0.1.tar.gz) = 68ced9471a1e2a2dd7d1bf37477690a5b80bcf7d
RMD160 (nntpcache-3.0.1.tar.gz) = 3ca0fc079532bae0eb4c6f903286d604e266a985
Size (nntpcache-3.0.1.tar.gz) = 1085258 bytes
SHA1 (patch-aa) = f397f4fe5ec2b1eec62981fba9b9a9922b14ef76
SHA1 (patch-ab) = 4789544bba3f246713b1f8f74c0450811516edf9
SHA1 (patch-ac) = aab64da73cce565642aeb4eb3024e57f388c5a19
SHA1 (patch-ad) = 060112715712bcdbcd052cd9d7557a558518c305

View file

@ -0,0 +1,13 @@
$NetBSD: patch-aa,v 1.6 2005/03/07 12:04:41 tv Exp $
--- configure.in.orig 2002-04-05 11:53:09.000000000 -0500
+++ configure.in
@@ -206,7 +206,7 @@ AC_CHECK_LIB(crypt, crypt)
AC_CHECK_LIB(wrap, request_init)
dnl aix
AC_CHECK_LIB(flock, bsd)
-AC_CHECK_FUNCS(getdtablesize usleep utime waitpid wait3 chroot strdup vsnprintf daemon setenv putenv mmap getpagesize setproctitle snprintf strerror setpriority getspnam statfs statvfs strcasecmp)
+AC_CHECK_FUNCS(getdtablesize usleep utime waitpid wait3 chroot strdup vsnprintf daemon setenv putenv mmap getpagesize setproctitle snprintf strerror setpriority getspnam statfs statvfs strcasecmp sync)
AC_MSG_CHECKING(for passwd authinfo support)
AC_ARG_WITH(authinfo-passwd,

View file

@ -0,0 +1,13 @@
$NetBSD: patch-ab,v 1.1 2005/03/07 12:04:41 tv Exp $
--- configure.orig 2002-04-05 13:26:27.000000000 -0500
+++ configure
@@ -7795,7 +7795,7 @@ EOF
fi
-for ac_func in getdtablesize usleep utime waitpid wait3 chroot strdup vsnprintf daemon setenv putenv mmap getpagesize setproctitle snprintf strerror setpriority getspnam statfs statvfs strcasecmp
+for ac_func in getdtablesize usleep utime waitpid wait3 chroot strdup vsnprintf daemon setenv putenv mmap getpagesize setproctitle snprintf strerror setpriority getspnam statfs statvfs strcasecmp sync
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:7801: checking for $ac_func" >&5

View file

@ -0,0 +1,14 @@
$NetBSD: patch-ac,v 1.1 2005/03/07 12:04:41 tv Exp $
--- config.h.in.orig 2002-04-05 10:22:45.000000000 -0500
+++ config.h.in
@@ -164,6 +164,9 @@
/* Define if you have the <string.h> header file. */
#undef HAVE_STRING_H
+/* Define if you have the `sync' function. */
+#undef HAVE_SYNC
+
/* Define if you have the <syslog.h> header file. */
#undef HAVE_SYSLOG_H

View file

@ -0,0 +1,14 @@
$NetBSD: patch-ad,v 1.1 2005/03/07 12:04:41 tv Exp $
--- src/nntpcache.c.orig 2002-04-05 13:29:58.000000000 -0500
+++ src/nntpcache.c
@@ -404,7 +404,9 @@ EXPORT void ncExit (int code)
if (Stats)
saveStats (con->statsFile);
unlink (PidFile);
+#ifdef HAVE_SYNC
sync ();
+#endif
} else
{
if (Task->ti_state == nc_client)