aboutsummaryrefslogtreecommitdiffhomepage
path: root/contrib/notmuch-deliver
diff options
context:
space:
mode:
authorGravatar Thomas Schwinge <thomas@schwinge.name>2010-12-29 12:14:45 +0100
committerGravatar Ali Polatel <alip@exherbo.org>2011-11-05 01:12:35 +0200
commit47ddec50348e36563f10579a52e058b640a366b1 (patch)
tree3a05bf323662843a3a8aa887d86a47fc5ead2d6a /contrib/notmuch-deliver
parentf0c3f7a995c5f6a18f7598929b7f5723823f8038 (diff)
notmuch-deliver: Advance imported files to maildrop-2.5.2 release.
Diffstat (limited to 'contrib/notmuch-deliver')
-rw-r--r--contrib/notmuch-deliver/maildrop/numlib/configure.in11
-rw-r--r--contrib/notmuch-deliver/maildrop/numlib/numlib.h9
-rw-r--r--contrib/notmuch-deliver/maildrop/numlib/strofft.c32
3 files changed, 45 insertions, 7 deletions
diff --git a/contrib/notmuch-deliver/maildrop/numlib/configure.in b/contrib/notmuch-deliver/maildrop/numlib/configure.in
index 0c52a014..fc977aa9 100644
--- a/contrib/notmuch-deliver/maildrop/numlib/configure.in
+++ b/contrib/notmuch-deliver/maildrop/numlib/configure.in
@@ -1,7 +1,7 @@
dnl Process this file with autoconf to produce a configure script.
-dnl $Id: configure.in,v 1.6 2004/12/10 02:34:46 mrsam Exp $
+dnl $Id: configure.in,v 1.7 2010/03/19 01:09:26 mrsam Exp $
dnl
-dnl Copyright 1998 - 2004 Double Precision, Inc. See COPYING for
+dnl Copyright 1998 - 2010 Double Precision, Inc. See COPYING for
dnl distribution information.
AC_PREREQ(2.59)
@@ -29,7 +29,12 @@ dnl Checks for libraries.
dnl Checks for header files.
-AC_CHECK_HEADERS(unistd.h)
+AC_CHECK_HEADERS(unistd.h stdint.h)
+
+AC_CHECK_TYPE(int64_t, [ : ],
+ [
+ AC_DEFINE_UNQUOTED(int64_t,long long,[default definition of int64_t])
+ ])
dnl Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_UID_T
diff --git a/contrib/notmuch-deliver/maildrop/numlib/numlib.h b/contrib/notmuch-deliver/maildrop/numlib/numlib.h
index d356c6d3..7928aa7e 100644
--- a/contrib/notmuch-deliver/maildrop/numlib/numlib.h
+++ b/contrib/notmuch-deliver/maildrop/numlib/numlib.h
@@ -2,7 +2,7 @@
#define numlib_h
/*
-** Copyright 1998 - 2003 Double Precision, Inc.
+** Copyright 1998 - 2010 Double Precision, Inc.
** See COPYING for distribution information.
*/
@@ -10,12 +10,16 @@
extern "C" {
#endif
-static const char numlib_h_rcsid[]="$Id: numlib.h,v 1.10 2004/01/11 02:47:33 mrsam Exp $";
+static const char numlib_h_rcsid[]="$Id: numlib.h,v 1.11 2010/03/19 01:09:26 mrsam Exp $";
#if HAVE_CONFIG_H
#include "../numlib/config.h" /* VPATH build */
#endif
+#if HAVE_STDINT_H
+#include <stdint.h>
+#endif
+
#include <sys/types.h>
#include <time.h>
@@ -25,6 +29,7 @@ static const char numlib_h_rcsid[]="$Id: numlib.h,v 1.10 2004/01/11 02:47:33 mrs
char *libmail_str_time_t(time_t, char *);
char *libmail_str_off_t(off_t, char *);
+char *libmail_str_int64_t(int64_t, char *);
char *libmail_str_pid_t(pid_t, char *);
char *libmail_str_dev_t(dev_t, char *);
char *libmail_str_ino_t(ino_t, char *);
diff --git a/contrib/notmuch-deliver/maildrop/numlib/strofft.c b/contrib/notmuch-deliver/maildrop/numlib/strofft.c
index d93edcbe..3435148e 100644
--- a/contrib/notmuch-deliver/maildrop/numlib/strofft.c
+++ b/contrib/notmuch-deliver/maildrop/numlib/strofft.c
@@ -1,5 +1,5 @@
/*
-** Copyright 1998 - 2002 Double Precision, Inc.
+** Copyright 1998 - 2010 Double Precision, Inc.
** See COPYING for distribution information.
*/
@@ -9,7 +9,7 @@
#include "numlib.h"
#include <string.h>
-static const char rcsid[]="$Id: strofft.c,v 1.5 2003/01/05 04:01:17 mrsam Exp $";
+static const char rcsid[]="$Id: strofft.c,v 1.6 2010/03/19 01:09:26 mrsam Exp $";
char *libmail_str_off_t(off_t t, char *arg)
{
@@ -35,3 +35,31 @@ char *libmail_str_off_t(off_t t, char *arg)
return (strcpy(arg, p));
}
+
+char *libmail_str_int64_t(int64_t t, char *arg)
+{
+ char buf[NUMBUFSIZE];
+ char *p=buf+sizeof(buf)-1;
+ int isneg=0;
+
+ if (t < 0)
+ {
+ t= -t;
+ isneg=1;
+ }
+
+ *p=0;
+ do
+ {
+ *--p= '0' + (t % 10);
+ t=t / 10;
+ } while(t);
+
+ if (isneg)
+ *--p='-';
+
+ return (strcpy(arg, p));
+}
+
+
+