[PowerPC] Fix multiple ntp configuration issues

* powerpc time_t is 64 bit, not 32 bit.

* Add definition for powerpc64le.

With this, powerpc64le ntpd and ntpdate operate correctly instead of
corrupting the clock and exiting.

Tested on powerpc64, powerpc64le, and powerpc.

No feedback from cy@.

I am a bit confused as to how SIZEOF_TIME_T being wrong ever worked on
powerpc, it being big endian and all.

Sponsored by:	Tag1 Consulting, Inc.
Differential Revision:	https://reviews.freebsd.org/D26379
This commit is contained in:
Brandon Bergren 2020-09-23 02:37:27 +00:00
parent 93a5341930
commit ab2032371e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=366058

View file

@ -1548,7 +1548,7 @@
#define SIZEOF_SIGNED_CHAR 1
/* The size of `time_t', as computed by sizeof. */
#if defined(__i386__) || defined(__powerpc__)
#if defined(__i386__)
#define SIZEOF_TIME_T 4
#else
#define SIZEOF_TIME_T 8
@ -1580,6 +1580,8 @@
/* canonical system (cpu-vendor-os) of where we should run */
#if defined(__amd64__)
#define STR_SYSTEM "amd64-undermydesk-freebsd"
#elif defined(__powerpc64__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
#define STR_SYSTEM "powerpc64le-undermydesk-freebsd"
#elif defined(__powerpc64__)
#define STR_SYSTEM "powerpc64-undermydesk-freebsd"
#elif defined(__powerpc__)
@ -1660,8 +1662,8 @@ typedef unsigned int uintptr_t;
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
significant byte first (like Motorola and SPARC, unlike Intel). */
#if defined(__ARMEB__) || defined(__MIPSEB__) || defined(__powerpc__) || \
defined(__powerpc64__)
#if defined(__ARMEB__) || defined(__MIPSEB__) || \
(defined(__powerpc__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
#define WORDS_BIGENDIAN 1
#endif