From: Harlan Stenn Date: Sat, 6 Jan 2007 09:05:36 +0000 (-0500) Subject: [Bug 757] Lose ULONG_CONST() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dfb598eae05ca154f446e07c19f13237a1ecbf25;p=thirdparty%2Fntp.git [Bug 757] Lose ULONG_CONST() bk: 459f6660GFAvHe6r4MFroPm6OcZHhQ --- diff --git a/ChangeLog b/ChangeLog index 7b3d392123..ac905936ee 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,4 @@ +* [Bug 757] Lose ULONG_CONST(). * [Bug 756] Require ANSI C (function prototypes). * codec (audio) and ICOM changes from Dave Mills. diff --git a/configure.ac b/configure.ac index 5f44832e5f..5fe93001d2 100644 --- a/configure.ac +++ b/configure.ac @@ -311,8 +311,6 @@ AC_ISC_POSIX AC_PATH_PROG(PATH_SH, sh) AC_PATH_PROG(PATH_PERL, perl) -hs_ULONG_CONST - case "$host" in *-*-vxworks*) ac_link="$ac_link $VX_KERNEL" diff --git a/libparse/gpstolfp.c b/libparse/gpstolfp.c index fd7be31241..9f1a9bfd60 100644 --- a/libparse/gpstolfp.c +++ b/libparse/gpstolfp.c @@ -34,7 +34,7 @@ */ #include "ntp_fp.h" -#define GPSORIGIN ULONG_CONST(2524953600) /* NTP origin - GPS origin in seconds */ +#define GPSORIGIN 2524953600UL /* NTP origin - GPS origin in seconds */ #define SECSPERWEEK (unsigned)(604800) /* seconds per week - GPS tells us about weeks */ #define GPSWRAP 990 /* assume week count less than this in the previous epoch */ diff --git a/m4/hs_ulong_const.m4 b/m4/hs_ulong_const.m4 deleted file mode 100644 index c9aa653bc6..0000000000 --- a/m4/hs_ulong_const.m4 +++ /dev/null @@ -1,3 +0,0 @@ -AC_DEFUN([hs_ULONG_CONST], -[ AH_TEMPLATE(ULONG_CONST, [How do we create unsigned long constants?]) - AC_DEFINE([ULONG_CONST(a)], [a ## UL])]) diff --git a/ntpd/ntp_control.c b/ntpd/ntp_control.c index 58873776b3..a16811533d 100644 --- a/ntpd/ntp_control.c +++ b/ntpd/ntp_control.c @@ -1111,8 +1111,8 @@ ctl_putts( *cp++ = '='; (void) sprintf(cp, "0x%08lx.%08lx", - ts->l_ui & ULONG_CONST(0xffffffff), - ts->l_uf & ULONG_CONST(0xffffffff)); + ts->l_ui & 0xffffffffUL, + ts->l_uf & 0xffffffffUL); while (*cp != '\0') cp++; ctl_putdata(buffer, (unsigned)( cp - buffer ), 0); diff --git a/util/ntp-keygen.c b/util/ntp-keygen.c index 6f02eeb1a4..4ff04eedd2 100644 --- a/util/ntp-keygen.c +++ b/util/ntp-keygen.c @@ -121,7 +121,7 @@ extern int ntp_getopt (int, char **, const char *); * Cryptodefines */ #define MD5KEYS 16 /* number of MD5 keys generated */ -#define JAN_1970 ULONG_CONST(2208988800) /* NTP seconds */ +#define JAN_1970 2208988800UL /* NTP seconds */ #define YEAR ((long)60*60*24*365) /* one year in seconds */ #define MAXFILENAME 256 /* max file name length */ #define MAXHOSTNAME 256 /* max host name length */