summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2015-07-01 02:45:18 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2015-07-01 17:17:56 -0400
commit747ef1b1ce32b824a25ce1e70934b58733dfa6f9 (patch)
tree566031987e6b5d25c26d0a0dcc8fab34b3b5edb7
parent4fa4616e279df89baeb36287bbee83ab272edaed (diff)
ACPICA: Split C library prototypes to new header
ACPICA commit f51bf8497889a94046820639537165bbd7ccdee6 Adds acclib.h This patch doesn't affect the Linux kernel. Link: https://github.com/acpica/acpica/commit/f51bf849 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r--drivers/acpi/acpica/accommon.h3
-rw-r--r--drivers/acpi/acpica/acutils.h58
2 files changed, 3 insertions, 58 deletions
diff --git a/drivers/acpi/acpica/accommon.h b/drivers/acpi/acpica/accommon.h
index 853aa2dbdb61..a8d8092ee391 100644
--- a/drivers/acpi/acpica/accommon.h
+++ b/drivers/acpi/acpica/accommon.h
@@ -59,5 +59,8 @@
59#include "acglobal.h" /* All global variables */ 59#include "acglobal.h" /* All global variables */
60#include "achware.h" /* Hardware defines and interfaces */ 60#include "achware.h" /* Hardware defines and interfaces */
61#include "acutils.h" /* Utility interfaces */ 61#include "acutils.h" /* Utility interfaces */
62#ifndef ACPI_USE_SYSTEM_CLIBRARY
63#include "acclib.h" /* C library interfaces */
64#endif /* !ACPI_USE_SYSTEM_CLIBRARY */
62 65
63#endif /* __ACCOMMON_H__ */ 66#endif /* __ACCOMMON_H__ */
diff --git a/drivers/acpi/acpica/acutils.h b/drivers/acpi/acpica/acutils.h
index ef1e51d0f038..6de0d3573037 100644
--- a/drivers/acpi/acpica/acutils.h
+++ b/drivers/acpi/acpica/acutils.h
@@ -205,64 +205,6 @@ acpi_status acpi_ut_hardware_initialize(void);
205 205
206void acpi_ut_subsystem_shutdown(void); 206void acpi_ut_subsystem_shutdown(void);
207 207
208/*
209 * utclib - Local implementations of C library functions
210 */
211#ifndef ACPI_USE_SYSTEM_CLIBRARY
212
213acpi_size strlen(const char *string);
214
215char *strchr(const char *string, int ch);
216
217char *strcpy(char *dst_string, const char *src_string);
218
219char *strncpy(char *dst_string, const char *src_string, acpi_size count);
220
221int strncmp(const char *string1, const char *string2, acpi_size count);
222
223int strcmp(const char *string1, const char *string2);
224
225char *strcat(char *dst_string, const char *src_string);
226
227char *strncat(char *dst_string, const char *src_string, acpi_size count);
228
229u32 strtoul(const char *string, char **terminator, u32 base);
230
231char *strstr(char *string1, char *string2);
232
233int memcmp(void *buffer1, void *buffer2, acpi_size count);
234
235void *memcpy(void *dest, const void *src, acpi_size count);
236
237void *memset(void *dest, int value, acpi_size count);
238
239int toupper(int c);
240
241int tolower(int c);
242
243extern const u8 _acpi_ctype[];
244
245#define _ACPI_XA 0x00 /* extra alphabetic - not supported */
246#define _ACPI_XS 0x40 /* extra space */
247#define _ACPI_BB 0x00 /* BEL, BS, etc. - not supported */
248#define _ACPI_CN 0x20 /* CR, FF, HT, NL, VT */
249#define _ACPI_DI 0x04 /* '0'-'9' */
250#define _ACPI_LO 0x02 /* 'a'-'z' */
251#define _ACPI_PU 0x10 /* punctuation */
252#define _ACPI_SP 0x08 /* space, tab, CR, LF, VT, FF */
253#define _ACPI_UP 0x01 /* 'A'-'Z' */
254#define _ACPI_XD 0x80 /* '0'-'9', 'A'-'F', 'a'-'f' */
255
256#define isdigit(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_DI))
257#define isspace(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_SP))
258#define isxdigit(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_XD))
259#define isupper(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_UP))
260#define islower(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO))
261#define isprint(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO | _ACPI_UP | _ACPI_DI | _ACPI_XS | _ACPI_PU))
262#define isalpha(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO | _ACPI_UP))
263
264#endif /* !ACPI_USE_SYSTEM_CLIBRARY */
265
266#define ACPI_IS_ASCII(c) ((c) < 0x80) 208#define ACPI_IS_ASCII(c) ((c) < 0x80)
267 209
268/* 210/*