It really helps if I remember to actually attach the patch for the problem, yes? Yes. -- Joel Baker fenton@debian.org
diff -ur apt-0.5.4.orig/apt-pkg/contrib/strutl.cc apt-0.5.4/apt-pkg/contrib/strutl.cc
--- apt-0.5.4.orig/apt-pkg/contrib/strutl.cc 2002-09-23 02:01:56.000000000 +0000
+++ apt-0.5.4/apt-pkg/contrib/strutl.cc 2002-09-23 02:02:53.000000000 +0000
@@ -33,6 +33,8 @@
#include <errno.h>
#include <stdarg.h>
+#include "config.h"
+
using namespace std;
/*}}}*/
@@ -712,7 +714,11 @@
Contributed by Roger Beeman <beeman@cisco.com>, with the help of
Mark Baushke <mdb@cisco.com> and the rest of the Gurus at CISCO. */
-#ifndef __USE_MISC // glib sets this
+
+/* Turned it into an autoconf check, because GNU is not the only thing which
+ can provide timegm. -- 2002-09-22, Joel Baker */
+
+#ifndef HAVE_TIMEGM // Now with autoconf!
static time_t timegm(struct tm *t)
{
time_t tl, tb;
diff -ur apt-0.5.4.orig/buildlib/config.h.in apt-0.5.4/buildlib/config.h.in
--- apt-0.5.4.orig/buildlib/config.h.in 2001-02-20 07:03:17.000000000 +0000
+++ apt-0.5.4/buildlib/config.h.in 2002-09-23 01:21:48.000000000 +0000
@@ -16,6 +16,9 @@
/* The number of bytes in a unsigned short. */
#undef SIZEOF_SHORT
+/* Define if we have the timegm() function */
+#undef HAVE_TIMEGM
+
/* These two are used by the statvfs shim for glibc2.0 and bsd */
/* Define if we have sys/vfs.h */
#undef HAVE_VFS_H
diff -ur apt-0.5.4.orig/buildlib/environment.mak.in apt-0.5.4/buildlib/environment.mak.in
--- apt-0.5.4.orig/buildlib/environment.mak.in 2001-05-29 05:11:03.000000000 +0000
+++ apt-0.5.4/buildlib/environment.mak.in 2002-09-23 01:10:04.000000000 +0000
@@ -43,6 +43,7 @@
# Shim Headerfile control
HAVE_C9X = @HAVE_C9X@
HAVE_STATVFS = @HAVE_STATVFS@
+HAVE_TIMEGM = @HAVE_TIMEGM@
NEED_SOCKLEN_T_DEFINE = @NEED_SOCKLEN_T_DEFINE@
# Shared library things
diff -ur apt-0.5.4.orig/configure.in apt-0.5.4/configure.in
--- apt-0.5.4.orig/configure.in 2001-06-18 05:56:32.000000000 +0000
+++ apt-0.5.4/configure.in 2002-09-23 01:21:02.000000000 +0000
@@ -90,6 +90,10 @@
])
fi
+dnl We should use the real timegm function if we have it.
+AC_CHECK_FUNC(timegm,AC_DEFINE(HAVE_TIMEGM))
+AC_SUBST(HAVE_TIMEGM)
+
dnl Check the sizes etc. of the architecture
dnl This is stupid, it should just use the AC macros like it does below
dnl Cross compilers can either get a real C library or preload the cache
diff -ur apt-0.5.4.orig/configure.in apt-0.5.4/configure.in
--- apt-0.5.4.orig/apt-build/configure.in 2001-06-18 05:56:32.000000000 +0000
+++ apt-0.5.4/apt-build/configure.in 2002-09-23 01:21:02.000000000 +0000
@@ -90,6 +90,10 @@
])
fi
+dnl We should use the real timegm function if we have it.
+AC_CHECK_FUNC(timegm,AC_DEFINE(HAVE_TIMEGM))
+AC_SUBST(HAVE_TIMEGM)
+
dnl Check the sizes etc. of the architecture
dnl This is stupid, it should just use the AC macros like it does below
dnl Cross compilers can either get a real C library or preload the cache
Attachment:
pgpusJGjo5dvl.pgp
Description: PGP signature