pkgsrc/mail/deliver/patches/patch-ad
wiz 2705e5091e Initial import of deliver-2.1.14, provided by Jim Bernard in pkg/9317.
Extract from DESCR:
Deliver allows any user to write a shell script that processes all
incoming mail messages for that user.  The system administrator may
also install scripts that process all messages.
The output of a script is a list of mail addresses, files and programs
that should receive the message.  It has access to each message as it
is processed, so the action can be content dependent.  The script may
also generate automatic replies, like the "vacation" program, or pass
along a modified version of the original message.
2001-04-27 14:06:05 +00:00

52 lines
1.2 KiB
Text

$NetBSD: patch-ad,v 1.1.1.1 2001/04/27 14:06:05 wiz Exp $
--- unctime.y.orig Wed Dec 1 19:16:21 1999
+++ unctime.y Sun Jan 30 08:41:53 2000
@@ -80,6 +80,9 @@
# define USE_FTIME
# endif
#endif
+#ifdef HAS_MKTIME
+# define USE_MKTIME
+#endif
#ifdef USE_GETTOD
# include <sys/time.h>
@@ -331,6 +334,7 @@
/* Is y a leap year? */
#define leap(y) (((y) % 4 == 0 && (y) % 100 != 0) || (y) % 400 == 0)
+#ifndef USE_MKTIME
/* Number of leap years from 1970 to y (not including y itself) */
#define nleap(y) (((y) - 1969) / 4 - ((y) - 1901) / 100 + ((y) - 1601) / 400)
@@ -484,6 +488,7 @@
}
#endif /* not USE_GETTOD */
+#endif /* not USE_MKTIME */
static short monthlens[] =
{
@@ -563,6 +568,15 @@
return -1;
}
+#ifdef USE_MKTIME
+ tm->tm_year = year - 1900;
+ tm->tm_mon = month - 1;
+ tm->tm_mday = day;
+ tm->tm_hour = hour;
+ tm->tm_min = minute;
+ tm->tm_sec = second;
+ return mktime(tm);
+#else /* not USE_MKTIME */
/* Mostly for convenience in sunday() macro, we use zero-origin days. */
dayofyear = day - 1;
if (month > 2 && leap(year))
@@ -581,4 +595,5 @@
- correction()
#endif
;
+#endif /* not USE_MKTIME */
}