summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/os/macosx/osx_stdafx.h3
-rw-r--r--src/stdafx.h9
2 files changed, 7 insertions, 5 deletions
diff --git a/src/os/macosx/osx_stdafx.h b/src/os/macosx/osx_stdafx.h
index ee150dd8b..963783c21 100644
--- a/src/os/macosx/osx_stdafx.h
+++ b/src/os/macosx/osx_stdafx.h
@@ -5,6 +5,9 @@
#ifndef MACOS_STDAFX_H
#define MACOS_STDAFX_H
+#define __STDC_LIMIT_MACROS
+#include <stdint.h>
+
/* We need to include this first as that "depends" on the compiler's setting
* of __LP64__. So before we define __LP64__ so it can be used. */
#include <sys/cdefs.h>
diff --git a/src/stdafx.h b/src/stdafx.h
index ca6504091..bbb25639e 100644
--- a/src/stdafx.h
+++ b/src/stdafx.h
@@ -22,11 +22,10 @@
/* It seems that we need to include stdint.h before anything else
* We need INT64_MAX, which for most systems comes from stdint.h. However, MSVC
* does not have stdint.h and apparently neither does MorphOS, so define
- * INT64_MAX for them ourselves.
- * Sometimes OSX headers manages to include stdint.h before this but without
- * __STDC_LIMIT_MACROS so it will be without INT64_*. We need to define those
- * too if this is the case. */
-#if !defined(_MSC_VER) && !defined( __MORPHOS__) && !defined(_STDINT_H_)
+ * INT64_MAX for them ourselves. */
+#if defined(__APPLE__)
+ /* Already done in osx_stdafx.h */
+#elif !defined(_MSC_VER) && !defined( __MORPHOS__) && !defined(_STDINT_H_)
#if defined(SUNOS)
/* SunOS/Solaris does not have stdint.h, but inttypes.h defines everything
* stdint.h defines and we need. */