]> andersk Git - libyaml.git/commitdiff
Compilation fix for Solaris
authorAndy Grundman <andyg@activestate.com>
Tue, 11 Aug 2015 16:40:34 +0000 (09:40 -0700)
committerIngy döt Net <ingy@ingy.net>
Mon, 8 Jan 2018 18:37:15 +0000 (10:37 -0800)
From https://github.com/ingydotnet/yaml-libyaml-pm/issues/24

src/yaml_private.h

index ac1295b7d3331b8c95fe640d41cab9214d887784..05123285d441a4624a48827e55d85e1fd8af1cc4 100644 (file)
@@ -9,14 +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 sucks */
+#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
This page took 0.182001 seconds and 5 git commands to generate.