]> git.saurik.com Git - apt.git/commitdiff
Test for timegm in configure.
authorArch Librarian <arch@canonical.com>
Mon, 20 Sep 2004 17:00:00 +0000 (17:00 +0000)
committerArch Librarian <arch@canonical.com>
Mon, 20 Sep 2004 17:00:00 +0000 (17:00 +0000)
Author: doogie
Date: 2002-11-22 07:15:23 GMT
Test for timegm in configure.

apt-pkg/contrib/strutl.cc
buildlib/config.h.in
buildlib/environment.mak.in
configure.in
debian/changelog

index f8fbf3212ace581fc6c43d9e5efefa6aa8c9a47e..b37cdd1bdedd2b3324ef09235e4d7b99827212bf 100644 (file)
@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // Description                                                         /*{{{*/
-// $Id: strutl.cc,v 1.45 2002/04/26 05:52:27 jgg Exp $
+// $Id: strutl.cc,v 1.46 2002/11/22 07:15:23 doogie Exp $
 /* ######################################################################
 
    String Util - Some useful string functions.
@@ -33,6 +33,8 @@
 #include <errno.h>
 #include <stdarg.h>
 
+#include "config.h"
+
 using namespace std;
                                                                        /*}}}*/
 
@@ -712,7 +714,11 @@ static int MonthConv(char *Month)
    
    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;
index 961dc4261308c389f52b0675bf78310ed73f5737..8a65a229a47065b1075fb2be80989c65b0cc08fe 100644 (file)
@@ -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
index bf676e6431986f58a8debf4158665d28b745c0c4..87f4336e203ff1bfcb230b6a2e1a914b4f137358 100644 (file)
@@ -55,6 +55,7 @@ DB2LIB = @DB2LIB@
 # 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
index 67c5f046a6c8da23a8b42f33fe2c25bd77c2ef05..a0ade1c2896ff1aa23741cc48af41cb3c7c8baf6 100644 (file)
@@ -92,6 +92,10 @@ if test x"$HAVE_STATVFS" != x"yes"; then
    ])
 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
index eecbc61281fef2af861b80dc0aee2acbfa2e12d6..570ad38ed82338214956e140f0a753027b32cb41 100644 (file)
@@ -70,6 +70,7 @@ apt (0.5.5) unstable; urgency=low
   * Change verbose logging output of apt-ftparchive to go to stderr,
     instead of stdout.  Also, errors that occur no longer go to stdout,
     but stderr.  Closes: #161592
+  * Test for timegm in configure.  Closes: #165516.
 
  -- Jason Gunthorpe <jgg@debian.org>  Sun, 15 Sep 2002 17:16:59 -0600