aboutsummaryrefslogtreecommitdiff
path: root/source/include/platform
diff options
context:
space:
mode:
authorJung-uk Kim <jkim@FreeBSD.org>2014-03-27 23:50:54 +0000
committerJung-uk Kim <jkim@FreeBSD.org>2014-03-27 23:50:54 +0000
commit7c6f304a2eb855cf2d71ca0638d4f3c72f436fcd (patch)
treed3e9e38245f10de28c87606c945c7fdd4bed0d76 /source/include/platform
parent526d99544ba42a5a2155021975b3b97da425819e (diff)
Notes
Diffstat (limited to 'source/include/platform')
-rw-r--r--source/include/platform/acgcc.h11
-rw-r--r--source/include/platform/aclinux.h13
2 files changed, 23 insertions, 1 deletions
diff --git a/source/include/platform/acgcc.h b/source/include/platform/acgcc.h
index 501bf2bf1379..23db3248f520 100644
--- a/source/include/platform/acgcc.h
+++ b/source/include/platform/acgcc.h
@@ -64,4 +64,15 @@
*/
#define ACPI_UNUSED_VAR __attribute__ ((unused))
+/*
+ * Some versions of gcc implement strchr() with a buggy macro. So,
+ * undef it here. Prevents error messages of this form (usually from the
+ * file getopt.c):
+ *
+ * error: logical '&&' with non-zero constant will always evaluate as true
+ */
+#ifdef strchr
+#undef strchr
+#endif
+
#endif /* __ACGCC_H__ */
diff --git a/source/include/platform/aclinux.h b/source/include/platform/aclinux.h
index 097ba3e6254e..994c9415a42d 100644
--- a/source/include/platform/aclinux.h
+++ b/source/include/platform/aclinux.h
@@ -84,12 +84,23 @@
#include <ctype.h>
#include <unistd.h>
+/* Define/disable kernel-specific declarators */
+
+#ifndef __init
+#define __init
+#endif
+
+#ifndef __iomem
+#define __iomem
+#endif
+
/* Host-dependent types and defines for user-space ACPICA */
#define ACPI_FLUSH_CPU_CACHE()
#define ACPI_CAST_PTHREAD_T(Pthread) ((ACPI_THREAD_ID) (Pthread))
-#if defined(__ia64__) || defined(__x86_64__) || defined(__aarch64__)
+#if defined(__ia64__) || defined(__x86_64__) ||\
+ defined(__aarch64__) || defined(__PPC64__)
#define ACPI_MACHINE_WIDTH 64
#define COMPILER_DEPENDENT_INT64 long
#define COMPILER_DEPENDENT_UINT64 unsigned long