]> andersk Git - libyaml.git/blobdiff - src/yaml_private.h
Compilation fix for Solaris
[libyaml.git] / src / yaml_private.h
index f0e10010242a59f6e9c2e7d8ceca0fd198786bd4..05123285d441a4624a48827e55d85e1fd8af1cc4 100644 (file)
@@ -1,4 +1,3 @@
-
 #if HAVE_CONFIG_H
 #include <config.h>
 #endif
@@ -10,7 +9,19 @@
 #include <stddef.h>
 
 #ifndef _MSC_VER
+#if defined(__sun) || defined(__sun__)
+#include <sys/inttypes.h>
+#define PTRDIFF_MAX INT_MAX
+#else
 #include <stdint.h>
+#ifndef PTRDIFF_MAX /* gcc on HP-UX */
+#ifdef _LP64
+#define PTRDIFF_MAX 0x7FFFFFFFFFFFFFFFLL
+#else
+#define PTRDIFF_MAX 0x7FFFFFFFL
+#endif
+#endif
+#endif
 #else
 #ifdef _WIN64
 #define PTRDIFF_MAX _I64_MAX
@@ -242,9 +253,9 @@ yaml_string_join(
         (string).pointer[offset] <= (yaml_char_t) 'f') ?                        \
        ((string).pointer[offset] - (yaml_char_t) 'a' + 10) :                    \
        ((string).pointer[offset] - (yaml_char_t) '0'))
+
 #define AS_HEX(string)  AS_HEX_AT((string),0)
+
 /*
  * Check if the character is ASCII.
  */
@@ -657,4 +668,3 @@ yaml_queue_extend(void **start, void **head, void **tail, void **end);
      (node).data.mapping.pairs.end = (node_pairs_end),                          \
      (node).data.mapping.pairs.top = (node_pairs_start),                        \
      (node).data.mapping.style = (node_style))
-
This page took 0.077267 seconds and 4 git commands to generate.