Skip to content

Commit

Permalink
ACPICA: Cleanup use of all non-ANSI local C library functions
Browse files Browse the repository at this point in the history
ACPICA commit 7c490c28a18b435c543c6b410e7e7c2131fccc78

ACPICA implements all non-ANSI functions locally. However, there
are sometimes two or more versions of the same function throughout
the ACPICA code. This change fixes this.

Adds a new file, utilities/utnonansi.c

Link: https://github.com/acpica/acpica/commit/7c490c28
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>
  • Loading branch information
Bob Moore authored and Rafael J. Wysocki committed Jul 23, 2015
1 parent 5a4f069 commit 2762919
Show file tree
Hide file tree
Showing 5 changed files with 396 additions and 354 deletions.
1 change: 1 addition & 0 deletions drivers/acpi/acpica/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ acpi-y += \
utmath.o \
utmisc.o \
utmutex.o \
utnonansi.o \
utobject.o \
utosi.o \
utownerid.o \
Expand Down
4 changes: 4 additions & 0 deletions drivers/acpi/acpica/acmacros.h
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,10 @@
#define ACPI_MUL_32(a) _ACPI_MUL(a, 5)
#define ACPI_MOD_32(a) _ACPI_MOD(a, 32)

/* Test for ASCII character */

#define ACPI_IS_ASCII(c) ((c) < 0x80)

/*
* Rounding macros (Power of two boundaries only)
*/
Expand Down
23 changes: 11 additions & 12 deletions drivers/acpi/acpica/acutils.h
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,17 @@ struct acpi_pkg_info {
#define DB_DWORD_DISPLAY 4
#define DB_QWORD_DISPLAY 8

/*
* utnonansi - Non-ANSI C library functions
*/
void acpi_ut_strupr(char *src_string);

void acpi_ut_strlwr(char *src_string);

int acpi_ut_stricmp(char *string1, char *string2);

acpi_status acpi_ut_strtoul64(char *string, u32 base, u64 *ret_integer);

/*
* utglobal - Global data structures and procedures
*/
Expand Down Expand Up @@ -205,8 +216,6 @@ acpi_status acpi_ut_hardware_initialize(void);

void acpi_ut_subsystem_shutdown(void);

#define ACPI_IS_ASCII(c) ((c) < 0x80)

/*
* utcopy - Object construction and conversion interfaces
*/
Expand Down Expand Up @@ -567,16 +576,6 @@ acpi_ut_get_resource_end_tag(union acpi_operand_object *obj_desc, u8 **end_tag);
/*
* utstring - String and character utilities
*/
void acpi_ut_strupr(char *src_string);

#ifdef ACPI_ASL_COMPILER
void acpi_ut_strlwr(char *src_string);

int acpi_ut_stricmp(char *string1, char *string2);
#endif

acpi_status acpi_ut_strtoul64(char *string, u32 base, u64 *ret_integer);

void acpi_ut_print_string(char *string, u16 max_length);

#if defined ACPI_ASL_COMPILER || defined ACPI_EXEC_APP
Expand Down
Loading

0 comments on commit 2762919

Please sign in to comment.