Print this page
5051 import mdocml-1.12.3
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
Approved by: TBD

@@ -5,14 +5,16 @@
 # define _GNU_SOURCE /* strptime(), getsubopt() */
 #endif
 
 #include <stdio.h>
 
+#define VERSION "1.12.3"
 #define HAVE_STRPTIME
 #define HAVE_GETSUBOPT
 #define HAVE_STRLCAT
 #define HAVE_STRLCPY
+#define HAVE_MMAP
 
 #include <sys/types.h>
 
 #if !defined(__BEGIN_DECLS)
 #  ifdef __cplusplus

@@ -27,18 +29,20 @@
 #  else
 #  define       __END_DECLS
 #  endif
 #endif
 
-#if defined(__APPLE__)
-# define htobe32(x) OSSwapHostToBigInt32(x)
-# define betoh32(x) OSSwapBigToHostInt32(x)
-# define htobe64(x) OSSwapHostToBigInt64(x)
+#ifndef HAVE_BETOH64
+#  if defined(__APPLE__)
 # define betoh64(x) OSSwapBigToHostInt64(x)
-#elif defined(__linux__)
-# define betoh32(x) be32toh(x)
+#    define htobe64(x) OSSwapHostToBigInt64(x)
+#  elif defined(__sun)
+#    define betoh64(x) BE_64(x)
+#    define htobe64(x) BE_64(x)
+#  else
 # define betoh64(x) be64toh(x)
+#  endif
 #endif
 
 #ifndef HAVE_STRLCAT
 extern  size_t    strlcat(char *, const char *, size_t);
 #endif