aboutsummaryrefslogtreecommitdiffstats
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.h70
1 files changed, 33 insertions, 37 deletions
diff --git a/include/acpi/platform/acenv.h b/include/acpi/platform/acenv.h
index adf969efa510..16609c1ab2eb 100644
--- a/include/acpi/platform/acenv.h
+++ b/include/acpi/platform/acenv.h
@@ -44,40 +44,42 @@
#ifndef __ACENV_H__
#define __ACENV_H__
-
/*
* Configuration for ACPI tools and utilities
*/
-#ifdef _ACPI_DUMP_APP
+#ifdef ACPI_LIBRARY
+#define ACPI_USE_LOCAL_CACHE
+#endif
+
+#ifdef ACPI_DUMP_APP
#ifndef MSDOS
#define ACPI_DEBUG_OUTPUT
#endif
#define ACPI_APPLICATION
#define ACPI_DISASSEMBLER
#define ACPI_NO_METHOD_EXECUTION
-#define ACPI_USE_SYSTEM_CLIBRARY
-#define ACPI_ENABLE_OBJECT_CACHE
#endif
-#ifdef _ACPI_EXEC_APP
+#ifdef ACPI_EXEC_APP
#undef DEBUGGER_THREADING
#define DEBUGGER_THREADING DEBUGGER_SINGLE_THREADED
#define ACPI_DEBUG_OUTPUT
#define ACPI_APPLICATION
#define ACPI_DEBUGGER
#define ACPI_DISASSEMBLER
-#define ACPI_USE_SYSTEM_CLIBRARY
-#define ACPI_ENABLE_OBJECT_CACHE
#endif
-#ifdef _ACPI_ASL_COMPILER
+#ifdef ACPI_ASL_COMPILER
#define ACPI_DEBUG_OUTPUT
#define ACPI_APPLICATION
#define ACPI_DISASSEMBLER
#define ACPI_CONSTANT_EVAL_ONLY
+#endif
+
+#ifdef ACPI_APPLICATION
#define ACPI_USE_SYSTEM_CLIBRARY
-#define ACPI_ENABLE_OBJECT_CACHE
+#define ACPI_USE_LOCAL_CACHE
#endif
/*
@@ -131,7 +133,7 @@
#elif defined(WIN64)
#include "acwin64.h"
-#elif defined(MSDOS) /* Must appear after WIN32 and WIN64 check */
+#elif defined(MSDOS) /* Must appear after WIN32 and WIN64 check */
#include "acdos16.h"
#elif defined(__FreeBSD__)
@@ -177,7 +179,6 @@
/*! [End] no source code translation !*/
-
/*
* Debugger threading model
* Use single threaded if the entire subsystem is contained in an application
@@ -196,8 +197,7 @@
#else
#define DEBUGGER_THREADING DEBUGGER_MULTI_THREADED
#endif
-#endif /* !DEBUGGER_THREADING */
-
+#endif /* !DEBUGGER_THREADING */
/******************************************************************************
*
@@ -219,7 +219,7 @@
#include <string.h>
#include <ctype.h>
-#endif /* ACPI_USE_STANDARD_HEADERS */
+#endif /* ACPI_USE_STANDARD_HEADERS */
/*
* We will be linking to the standard Clib functions
@@ -238,15 +238,15 @@
#define ACPI_MEMCPY(d,s,n) (void) memcpy((d), (s), (acpi_size)(n))
#define ACPI_MEMSET(d,s,n) (void) memset((d), (s), (acpi_size)(n))
-#define ACPI_TOUPPER toupper
-#define ACPI_TOLOWER tolower
-#define ACPI_IS_XDIGIT isxdigit
-#define ACPI_IS_DIGIT isdigit
-#define ACPI_IS_SPACE isspace
-#define ACPI_IS_UPPER isupper
-#define ACPI_IS_PRINT isprint
-#define ACPI_IS_ALPHA isalpha
-#define ACPI_IS_ASCII isascii
+#define ACPI_TOUPPER(i) toupper((int) (i))
+#define ACPI_TOLOWER(i) tolower((int) (i))
+#define ACPI_IS_XDIGIT(i) isxdigit((int) (i))
+#define ACPI_IS_DIGIT(i) isdigit((int) (i))
+#define ACPI_IS_SPACE(i) isspace((int) (i))
+#define ACPI_IS_UPPER(i) isupper((int) (i))
+#define ACPI_IS_PRINT(i) isprint((int) (i))
+#define ACPI_IS_ALPHA(i) isalpha((int) (i))
+#define ACPI_IS_ASCII(i) isascii((int) (i))
#else
@@ -257,18 +257,18 @@
*****************************************************************************/
/*
- * Use local definitions of C library macros and functions
- * NOTE: The function implementations may not be as efficient
- * as an inline or assembly code implementation provided by a
- * native C library.
- */
+ * Use local definitions of C library macros and functions
+ * NOTE: The function implementations may not be as efficient
+ * as an inline or assembly code implementation provided by a
+ * native C library.
+ */
#ifndef va_arg
#ifndef _VALIST
#define _VALIST
typedef char *va_list;
-#endif /* _VALIST */
+#endif /* _VALIST */
/*
* Storage alignment properties
@@ -284,8 +284,7 @@ typedef char *va_list;
#define va_end(ap) (void) 0
#define va_start(ap, A) (void) ((ap) = (((char *) &(A)) + (_bnd (A,_AUPBND))))
-#endif /* va_arg */
-
+#endif /* va_arg */
#define ACPI_STRSTR(s1,s2) acpi_ut_strstr ((s1), (s2))
#define ACPI_STRCHR(s1,c) acpi_ut_strchr ((s1), (c))
@@ -303,8 +302,7 @@ typedef char *va_list;
#define ACPI_TOUPPER acpi_ut_to_upper
#define ACPI_TOLOWER acpi_ut_to_lower
-#endif /* ACPI_USE_SYSTEM_CLIBRARY */
-
+#endif /* ACPI_USE_SYSTEM_CLIBRARY */
/******************************************************************************
*
@@ -345,8 +343,7 @@ typedef char *va_list;
#define ACPI_ACQUIRE_GLOBAL_LOCK(Glptr, acq)
#define ACPI_RELEASE_GLOBAL_LOCK(Glptr, acq)
-#endif /* ACPI_ASM_MACROS */
-
+#endif /* ACPI_ASM_MACROS */
#ifdef ACPI_APPLICATION
@@ -356,11 +353,10 @@ typedef char *va_list;
#define BREAKPOINT3
#endif
-
/******************************************************************************
*
* Compiler-specific information is contained in the compiler-specific
* headers.
*
*****************************************************************************/
-#endif /* __ACENV_H__ */
+#endif /* __ACENV_H__ */