summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortedu <tedu@openbsd.org>2015-02-09 13:46:22 +0000
committertedu <tedu@openbsd.org>2015-02-09 13:46:22 +0000
commitb011d5e21339a343745947e73e52c53a6dad2baf (patch)
tree874120cb7ca26518c5ffc3131ab2697c1afc119d
parentunifdef the rest of the HAVEs and HAVE nots (diff)
downloadwireguard-openbsd-b011d5e21339a343745947e73e52c53a6dad2baf.tar.xz
wireguard-openbsd-b011d5e21339a343745947e73e52c53a6dad2baf.zip
remove INITIALIZE macro and do it the hard way.
-rw-r--r--lib/libc/time/localtime.c6
-rw-r--r--lib/libc/time/private.h34
-rw-r--r--usr.sbin/zdump/zdump.c32
-rw-r--r--usr.sbin/zic/zic.c8
4 files changed, 11 insertions, 69 deletions
diff --git a/lib/libc/time/localtime.c b/lib/libc/time/localtime.c
index a2d0997a4e4..9398e8b967c 100644
--- a/lib/libc/time/localtime.c
+++ b/lib/libc/time/localtime.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: localtime.c,v 1.41 2015/02/09 13:32:51 tedu Exp $ */
+/* $OpenBSD: localtime.c,v 1.42 2015/02/09 13:46:22 tedu Exp $ */
/*
** This file is in the public domain, so clarified as of
** 1996-06-05 by Arthur David Olson.
@@ -824,7 +824,7 @@ const long offset;
register int i;
int d, m1, yy0, yy1, yy2, dow;
- INITIALIZE(value);
+ value = 0;
leapyear = isleap(year);
switch (rulep->r_type) {
@@ -925,7 +925,7 @@ const int lastditch;
register int load_result;
static struct ttinfo zttinfo;
- INITIALIZE(dstname);
+ dstname = NULL;
stdname = name;
if (lastditch) {
stdlen = strlen(name); /* length of standard zone name */
diff --git a/lib/libc/time/private.h b/lib/libc/time/private.h
index 950b6bf0cc1..647a998ab41 100644
--- a/lib/libc/time/private.h
+++ b/lib/libc/time/private.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: private.h,v 1.32 2015/02/09 13:42:03 tedu Exp $ */
+/* $OpenBSD: private.h,v 1.33 2015/02/09 13:46:22 tedu Exp $ */
#ifndef PRIVATE_H
#define PRIVATE_H
@@ -91,39 +91,7 @@ const char * scheck(const char * string, const char * format);
1 + TYPE_SIGNED(type))
#endif /* !defined INT_STRLEN_MAXIMUM */
-/*
-** INITIALIZE(x)
-*/
-
-#ifndef GNUC_or_lint
-#ifdef lint
-#define GNUC_or_lint
-#endif /* defined lint */
-#ifndef lint
-#ifdef __GNUC__
-#define GNUC_or_lint
-#endif /* defined __GNUC__ */
-#endif /* !defined lint */
-#endif /* !defined GNUC_or_lint */
-
-#ifndef INITIALIZE
-#ifdef GNUC_or_lint
-#define INITIALIZE(x) ((x) = 0)
-#endif /* defined GNUC_or_lint */
-#ifndef GNUC_or_lint
-#define INITIALIZE(x)
-#endif /* !defined GNUC_or_lint */
-#endif /* !defined INITIALIZE */
-
-/*
-** For the benefit of GNU folk...
-** `_(MSGID)' uses the current locale's message library string for MSGID.
-** The default is to use gettext if available, and use MSGID otherwise.
-*/
-
-#ifndef _
#define _(msgid) msgid
-#endif /* !defined _ */
#ifndef TZ_DOMAIN
#define TZ_DOMAIN "tz"
diff --git a/usr.sbin/zdump/zdump.c b/usr.sbin/zdump/zdump.c
index c6c81187043..1395f6ec993 100644
--- a/usr.sbin/zdump/zdump.c
+++ b/usr.sbin/zdump/zdump.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: zdump.c,v 1.4 2015/02/09 13:39:16 tedu Exp $ */
+/* $OpenBSD: zdump.c,v 1.5 2015/02/09 13:46:22 tedu Exp $ */
/*
** This file is in the public domain, so clarified as of
** 2009-05-17 by Arthur David Olson.
@@ -80,33 +80,7 @@
#define SECSPERNYEAR (SECSPERDAY * DAYSPERNYEAR)
#define SECSPERLYEAR (SECSPERNYEAR + SECSPERDAY)
-#ifndef GNUC_or_lint
-#ifdef lint
-#define GNUC_or_lint
-#else /* !defined lint */
-#ifdef __GNUC__
-#define GNUC_or_lint
-#endif /* defined __GNUC__ */
-#endif /* !defined lint */
-#endif /* !defined GNUC_or_lint */
-
-#ifndef INITIALIZE
-#ifdef GNUC_or_lint
-#define INITIALIZE(x) ((x) = 0)
-#else /* !defined GNUC_or_lint */
-#define INITIALIZE(x)
-#endif /* !defined GNUC_or_lint */
-#endif /* !defined INITIALIZE */
-
-/*
-** For the benefit of GNU folk...
-** `_(MSGID)' uses the current locale's message library string for MSGID.
-** The default is to use gettext if available, and use MSGID otherwise.
-*/
-
-#ifndef _
#define _(msgid) msgid
-#endif /* !defined _ */
#ifndef TZ_DOMAIN
#define TZ_DOMAIN "tz"
@@ -242,8 +216,8 @@ char * argv[];
struct tm * tmp;
struct tm * newtmp;
- INITIALIZE(cutlotime);
- INITIALIZE(cuthitime);
+ cutlotime = 0;
+ cuthitime = 0;
progname = argv[0];
vflag = 0;
cutarg = NULL;
diff --git a/usr.sbin/zic/zic.c b/usr.sbin/zic/zic.c
index 7fb9d07a62e..3b11e794f89 100644
--- a/usr.sbin/zic/zic.c
+++ b/usr.sbin/zic/zic.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: zic.c,v 1.6 2015/02/09 13:42:03 tedu Exp $ */
+/* $OpenBSD: zic.c,v 1.7 2015/02/09 13:46:22 tedu Exp $ */
/*
** This file is in the public domain, so clarified as of
** 2006-07-17 by Arthur David Olson.
@@ -1998,8 +1998,8 @@ const int zonecount;
startbuf = emalloc(max_abbr_len + 1);
ab = emalloc(max_abbr_len + 1);
envvar = emalloc(max_envvar_len + 1);
- INITIALIZE(untiltime);
- INITIALIZE(starttime);
+ untiltime = 0;
+ starttime = 0;
/*
** Now. . .finally. . .generate some useful data!
*/
@@ -2119,7 +2119,7 @@ wp = ecpyalloc(_("no POSIX environment variable for zone"));
zic_t jtime, ktime;
long offset;
- INITIALIZE(ktime);
+ ktime = 0;
if (useuntil) {
/*
** Turn untiltime into UTC