summaryrefslogtreecommitdiff
path: root/src/port/stdint.h
diff options
context:
space:
mode:
authorAndreas Baumann <abaumann@yahoo.com>2009-01-12 15:44:13 +0100
committerAndreas Baumann <abaumann@yahoo.com>2009-01-12 15:44:13 +0100
commit71004021851e99a7a431423915b751c02bd10929 (patch)
tree8799d251ea7e2d0a84d93a997fbdf76c2fe03977 /src/port/stdint.h
parent66d507d906fc51e06b6c134fadf9c4610b9b91c4 (diff)
downloadwolfbones-71004021851e99a7a431423915b751c02bd10929.tar.gz
wolfbones-71004021851e99a7a431423915b751c02bd10929.tar.bz2
fixes for Cygwin (snprintf), started cleaning up namespace prefixes
Diffstat (limited to 'src/port/stdint.h')
-rw-r--r--src/port/stdint.h30
1 files changed, 23 insertions, 7 deletions
diff --git a/src/port/stdint.h b/src/port/stdint.h
index 345ec7e..ec4f0ce 100644
--- a/src/port/stdint.h
+++ b/src/port/stdint.h
@@ -3,13 +3,29 @@
#include "port/sys.h"
-#if defined HAVE_STDINT_H
-#include <stdint.h>
-#endif /* defined HAVE_STDINT_H */
+/* for uintptr_t and snprintf placeholder PRIdPTR (FIXME:
+ * needs a lot of improvement!)
+ */
+#if defined SUNOS
+
+#if OS_MAJOR_VERSION == 5
-/* Solaris 8 weirdness */
-#if defined HAVE_LINK_H
-#include <link.h>
-#endif /* defined HAVE_LINK_H */
+#if OS_MINOR_VERSION == 8
+#include <sys/int_types.h>
+/* FIXME: this may depend on 32/64-bit version of Solaris 8! */
+#define PRIdPTR "d"
+typedef unsigned long long uint64_t;
+#else
+#include <inttypes.h>
+#include <stdint.h>
+#endif /* OS_MINOR_VERSION == 8 */
+#else
+#include <inttypes.h>
+#include <stdint.h>
+#endif /* OS_MAJOR_VERSION == 5 */
+#else
+#include <inttypes.h>
+#include <stdint.h>
+#endif /* defined SUNOS */
#endif /* ifndef __STDINT_H */