[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:
@@ -1548,7 +1548,7 @@
|
|||||||
#define SIZEOF_SIGNED_CHAR 1
|
#define SIZEOF_SIGNED_CHAR 1
|
||||||
|
|
||||||
/* The size of `time_t', as computed by sizeof. */
|
/* The size of `time_t', as computed by sizeof. */
|
||||||
#if defined(__i386__) || defined(__powerpc__)
|
#if defined(__i386__)
|
||||||
#define SIZEOF_TIME_T 4
|
#define SIZEOF_TIME_T 4
|
||||||
#else
|
#else
|
||||||
#define SIZEOF_TIME_T 8
|
#define SIZEOF_TIME_T 8
|
||||||
@@ -1580,6 +1580,8 @@
|
|||||||
/* canonical system (cpu-vendor-os) of where we should run */
|
/* canonical system (cpu-vendor-os) of where we should run */
|
||||||
#if defined(__amd64__)
|
#if defined(__amd64__)
|
||||||
#define STR_SYSTEM "amd64-undermydesk-freebsd"
|
#define STR_SYSTEM "amd64-undermydesk-freebsd"
|
||||||
|
#elif defined(__powerpc64__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||||
|
#define STR_SYSTEM "powerpc64le-undermydesk-freebsd"
|
||||||
#elif defined(__powerpc64__)
|
#elif defined(__powerpc64__)
|
||||||
#define STR_SYSTEM "powerpc64-undermydesk-freebsd"
|
#define STR_SYSTEM "powerpc64-undermydesk-freebsd"
|
||||||
#elif defined(__powerpc__)
|
#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
|
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
|
||||||
significant byte first (like Motorola and SPARC, unlike Intel). */
|
significant byte first (like Motorola and SPARC, unlike Intel). */
|
||||||
#if defined(__ARMEB__) || defined(__MIPSEB__) || defined(__powerpc__) || \
|
#if defined(__ARMEB__) || defined(__MIPSEB__) || \
|
||||||
defined(__powerpc64__)
|
(defined(__powerpc__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
|
||||||
#define WORDS_BIGENDIAN 1
|
#define WORDS_BIGENDIAN 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user