Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/bsd/ntp/include adjust for non-amd64 build



details:   https://anonhg.NetBSD.org/src/rev/35fd5ebb0d8b
branches:  trunk
changeset: 325537:35fd5ebb0d8b
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Dec 28 03:51:52 2013 +0000

description:
adjust for non-amd64 build

diffstat:

 external/bsd/ntp/include/config.h |  21 ++++++++++++++++++++-
 1 files changed, 20 insertions(+), 1 deletions(-)

diffs (65 lines):

diff -r f217548a1575 -r 35fd5ebb0d8b external/bsd/ntp/include/config.h
--- a/external/bsd/ntp/include/config.h Sat Dec 28 03:39:07 2013 +0000
+++ b/external/bsd/ntp/include/config.h Sat Dec 28 03:51:52 2013 +0000
@@ -1458,19 +1458,31 @@
 /* #undef SCO5_CLOCK */
 
 /* The size of `char*', as computed by sizeof. */
+#ifdef _LP64
 #define SIZEOF_CHARP 8
+#else
+#define SIZEOF_CHARP 4
+#endif
 
 /* The size of `int', as computed by sizeof. */
 #define SIZEOF_INT 4
 
 /* The size of `long', as computed by sizeof. */
+#ifdef _LP64
 #define SIZEOF_LONG 8
+#else
+#define SIZEOF_LONG 4
+#endif
 
 /* The size of `long long', as computed by sizeof. */
 #define SIZEOF_LONG_LONG 8
 
 /* The size of `pthread_t', as computed by sizeof. */
+#ifdef _LP64
 #define SIZEOF_PTHREAD_T 8
+#else
+#define SIZEOF_PTHREAD_T 4
+#endif
 
 /* The size of `short', as computed by sizeof. */
 #define SIZEOF_SHORT 2
@@ -1505,7 +1517,7 @@
 /* #undef STRERROR_R_CHAR_P */
 
 /* canonical system (cpu-vendor-os) of where we should run */
-#define STR_SYSTEM "x86_64-unknown-netbsd6.99.28"
+#define STR_SYSTEM  "NetBSD"
 
 /* Does Xettimeofday take 1 arg? */
 /* #undef SYSV_TIMEOFDAY */
@@ -1564,6 +1576,7 @@
 #define WANT_IPV6 1
 #endif
 
+#ifndef __NetBSD__
 /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
    significant byte first (like Motorola and SPARC, unlike Intel). */
 #if defined AC_APPLE_UNIVERSAL_BUILD
@@ -1575,6 +1588,12 @@
 /* #  undef WORDS_BIGENDIAN */
 # endif
 #endif
+#else
+# include <sys/endian.h>
+# if _BYTE_ORDER == _BIG_ENDIAN
+#  define WORDS_BIGENDIAN 1
+# endif
+#endif
 
 /* routine worker child proc uses to exit. */
 #define WORKER_CHILD_EXIT _exit



Home | Main Index | Thread Index | Old Index