summaryrefslogtreecommitdiffstats
path: root/include/acpi/platform/acenv.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/acpi/platform/acenv.h')
-rw-r--r--include/acpi/platform/acenv.h23
1 files changed, 14 insertions, 9 deletions
diff --git a/include/acpi/platform/acenv.h b/include/acpi/platform/acenv.h
index ee5c0b98e53a..1e2fe9501c16 100644
--- a/include/acpi/platform/acenv.h
+++ b/include/acpi/platform/acenv.h
@@ -209,18 +209,20 @@
#elif defined(__OS2__)
#include "acos2.h"
-#elif defined(_AED_EFI)
-#include "acefi.h"
-
-#elif defined(_GNU_EFI)
-#include "acefi.h"
-
#elif defined(__HAIKU__)
#include "achaiku.h"
#elif defined(__QNX__)
#include "acqnx.h"
+/*
+ * EFI applications can be built with -nostdlib, in this case, it must be
+ * included after including all other host environmental definitions, in
+ * order to override the definitions.
+ */
+#elif defined(_AED_EFI) || defined(_GNU_EFI)
+#include "acefi.h"
+
#else
/* Unknown environment */
@@ -344,12 +346,16 @@
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
+#ifdef ACPI_APPLICATION
+#include <stdio.h>
+#include <fcntl.h>
+#include <errno.h>
+#include <sys/stat.h>
+#endif
#endif /* ACPI_USE_STANDARD_HEADERS */
-#ifndef ACPI_FILE
#ifdef ACPI_APPLICATION
-#include <stdio.h>
#define ACPI_FILE FILE *
#define ACPI_FILE_OUT stdout
#define ACPI_FILE_ERR stderr
@@ -358,7 +364,6 @@
#define ACPI_FILE_OUT NULL
#define ACPI_FILE_ERR NULL
#endif /* ACPI_APPLICATION */
-#endif /* ACPI_FILE */
#ifndef ACPI_INIT_FUNCTION
#define ACPI_INIT_FUNCTION