svn commit: r284519 - in vendor-sys/acpica/dist/source: compiler components/debugger components/disassembler components/namespace components/tables components/utilities include include/platform too...
Jung-uk Kim
jkim at FreeBSD.org
Wed Jun 17 17:11:48 UTC 2015
Author: jkim
Date: Wed Jun 17 17:11:44 2015
New Revision: 284519
URL: https://svnweb.freebsd.org/changeset/base/284519
Log:
Remove all internal macros and cast various invocations as necessary.
https://github.com/acpica/acpica/commit/47d22a7
Modified:
vendor-sys/acpica/dist/source/compiler/dtutils.c
vendor-sys/acpica/dist/source/components/debugger/dbinput.c
vendor-sys/acpica/dist/source/components/disassembler/dmopcode.c
vendor-sys/acpica/dist/source/components/namespace/nsdump.c
vendor-sys/acpica/dist/source/components/namespace/nsrepair2.c
vendor-sys/acpica/dist/source/components/tables/tbprint.c
vendor-sys/acpica/dist/source/components/utilities/utprint.c
vendor-sys/acpica/dist/source/components/utilities/utstring.c
vendor-sys/acpica/dist/source/include/acutils.h
vendor-sys/acpica/dist/source/include/platform/acenv.h
vendor-sys/acpica/dist/source/tools/acpidump/apfiles.c
vendor-sys/acpica/dist/source/tools/acpisrc/asutils.c
Modified: vendor-sys/acpica/dist/source/compiler/dtutils.c
==============================================================================
--- vendor-sys/acpica/dist/source/compiler/dtutils.c Wed Jun 17 16:39:12 2015 (r284518)
+++ vendor-sys/acpica/dist/source/compiler/dtutils.c Wed Jun 17 17:11:44 2015 (r284519)
@@ -241,7 +241,7 @@ DtStrtoul64 (
while (*ThisChar)
{
- if (isdigit (*ThisChar))
+ if (isdigit ((int) *ThisChar))
{
/* Convert ASCII 0-9 to Decimal value */
@@ -249,8 +249,8 @@ DtStrtoul64 (
}
else /* Letter */
{
- ThisDigit = (UINT32) toupper (*ThisChar);
- if (!isxdigit ((char) ThisDigit))
+ ThisDigit = (UINT32) toupper ((int) *ThisChar);
+ if (!isxdigit ((int) ThisDigit))
{
/* Not A-F */
Modified: vendor-sys/acpica/dist/source/components/debugger/dbinput.c
==============================================================================
--- vendor-sys/acpica/dist/source/components/debugger/dbinput.c Wed Jun 17 16:39:12 2015 (r284518)
+++ vendor-sys/acpica/dist/source/components/debugger/dbinput.c Wed Jun 17 17:11:44 2015 (r284519)
@@ -361,7 +361,7 @@ AcpiDbMatchCommandHelp (
while ((*Command) && (*Invocation) && (*Invocation != ' '))
{
- if (tolower (*Command) != tolower (*Invocation))
+ if (tolower ((int) *Command) != tolower ((int) *Invocation))
{
return (FALSE);
}
Modified: vendor-sys/acpica/dist/source/components/disassembler/dmopcode.c
==============================================================================
--- vendor-sys/acpica/dist/source/components/disassembler/dmopcode.c Wed Jun 17 16:39:12 2015 (r284518)
+++ vendor-sys/acpica/dist/source/components/disassembler/dmopcode.c Wed Jun 17 17:11:44 2015 (r284519)
@@ -269,10 +269,10 @@ AcpiDmPredefinedDescription (
* Note: NameString is guaranteed to be upper case here.
*/
LastCharIsDigit =
- (isdigit (NameString[3])); /* d */
+ (isdigit ((int) NameString[3])); /* d */
LastCharsAreHex =
- (isxdigit (NameString[2]) && /* xx */
- isxdigit (NameString[3]));
+ (isxdigit ((int) NameString[2]) && /* xx */
+ isxdigit ((int) NameString[3]));
switch (NameString[1])
{
Modified: vendor-sys/acpica/dist/source/components/namespace/nsdump.c
==============================================================================
--- vendor-sys/acpica/dist/source/components/namespace/nsdump.c Wed Jun 17 16:39:12 2015 (r284518)
+++ vendor-sys/acpica/dist/source/components/namespace/nsdump.c Wed Jun 17 17:11:44 2015 (r284519)
@@ -122,7 +122,7 @@ AcpiNsPrintPathname (
{
for (i = 0; i < 4; i++)
{
- isprint (Pathname[i]) ?
+ isprint ((int) Pathname[i]) ?
AcpiOsPrintf ("%c", Pathname[i]) :
AcpiOsPrintf ("?");
}
Modified: vendor-sys/acpica/dist/source/components/namespace/nsrepair2.c
==============================================================================
--- vendor-sys/acpica/dist/source/components/namespace/nsrepair2.c Wed Jun 17 16:39:12 2015 (r284518)
+++ vendor-sys/acpica/dist/source/components/namespace/nsrepair2.c Wed Jun 17 17:11:44 2015 (r284519)
@@ -637,7 +637,7 @@ AcpiNsRepair_HID (
*/
for (Dest = NewString->String.Pointer; *Source; Dest++, Source++)
{
- *Dest = (char) toupper (*Source);
+ *Dest = (char) toupper ((int) *Source);
}
AcpiUtRemoveReference (ReturnObject);
Modified: vendor-sys/acpica/dist/source/components/tables/tbprint.c
==============================================================================
--- vendor-sys/acpica/dist/source/components/tables/tbprint.c Wed Jun 17 16:39:12 2015 (r284518)
+++ vendor-sys/acpica/dist/source/components/tables/tbprint.c Wed Jun 17 17:11:44 2015 (r284519)
@@ -84,7 +84,7 @@ AcpiTbFixString (
while (Length && *String)
{
- if (!isprint (*String))
+ if (!isprint ((int) *String))
{
*String = '?';
}
Modified: vendor-sys/acpica/dist/source/components/utilities/utprint.c
==============================================================================
--- vendor-sys/acpica/dist/source/components/utilities/utprint.c Wed Jun 17 16:39:12 2015 (r284518)
+++ vendor-sys/acpica/dist/source/components/utilities/utprint.c Wed Jun 17 17:11:44 2015 (r284519)
@@ -227,7 +227,7 @@ AcpiUtScanNumber (
UINT64 Number = 0;
- while (isdigit (*String))
+ while (isdigit ((int) *String))
{
Number *= 10;
Number += *(String++) - '0';
@@ -505,7 +505,7 @@ AcpiUtVsnprintf (
/* Process width */
Width = -1;
- if (isdigit (*Format))
+ if (isdigit ((int) *Format))
{
Format = AcpiUtScanNumber (Format, &Number);
Width = (INT32) Number;
@@ -527,7 +527,7 @@ AcpiUtVsnprintf (
if (*Format == '.')
{
++Format;
- if (isdigit(*Format))
+ if (isdigit ((int) *Format))
{
Format = AcpiUtScanNumber (Format, &Number);
Precision = (INT32) Number;
Modified: vendor-sys/acpica/dist/source/components/utilities/utstring.c
==============================================================================
--- vendor-sys/acpica/dist/source/components/utilities/utstring.c Wed Jun 17 16:39:12 2015 (r284518)
+++ vendor-sys/acpica/dist/source/components/utilities/utstring.c Wed Jun 17 17:11:44 2015 (r284519)
@@ -89,7 +89,7 @@ AcpiUtStrlwr (
for (String = SrcString; *String; String++)
{
- *String = (char) tolower (*String);
+ *String = (char) tolower ((int) *String);
}
return;
@@ -168,7 +168,7 @@ AcpiUtStrupr (
for (String = SrcString; *String; String++)
{
- *String = (char) toupper (*String);
+ *String = (char) toupper ((int) *String);
}
return;
@@ -234,7 +234,7 @@ AcpiUtStrtoul64 (
/* Skip over any white space in the buffer */
- while ((*String) && (isspace (*String) || *String == '\t'))
+ while ((*String) && (isspace ((int) *String) || *String == '\t'))
{
String++;
}
@@ -245,7 +245,7 @@ AcpiUtStrtoul64 (
* Base equal to ACPI_ANY_BASE means 'ToInteger operation case'.
* We need to determine if it is decimal or hexadecimal.
*/
- if ((*String == '0') && (tolower (*(String + 1)) == 'x'))
+ if ((*String == '0') && (tolower ((int) *(String + 1)) == 'x'))
{
SignOf0x = 1;
Base = 16;
@@ -261,7 +261,7 @@ AcpiUtStrtoul64 (
/* Any string left? Check that '0x' is not followed by white space. */
- if (!(*String) || isspace (*String) || *String == '\t')
+ if (!(*String) || isspace ((int) *String) || *String == '\t')
{
if (ToIntegerOp)
{
@@ -283,7 +283,7 @@ AcpiUtStrtoul64 (
while (*String)
{
- if (isdigit (*String))
+ if (isdigit ((int) *String))
{
/* Convert ASCII 0-9 to Decimal value */
@@ -297,8 +297,8 @@ AcpiUtStrtoul64 (
}
else
{
- ThisDigit = (UINT8) toupper (*String);
- if (isxdigit ((char) ThisDigit))
+ ThisDigit = (UINT8) toupper ((int) *String);
+ if (isxdigit ((int) ThisDigit))
{
/* Convert ASCII Hex char to value */
@@ -469,7 +469,7 @@ AcpiUtPrintString (
/* Check for printable character or hex escape */
- if (isprint (String[i]))
+ if (isprint ((int) String[i]))
{
/* This is a normal character */
Modified: vendor-sys/acpica/dist/source/include/acutils.h
==============================================================================
--- vendor-sys/acpica/dist/source/include/acutils.h Wed Jun 17 16:39:12 2015 (r284518)
+++ vendor-sys/acpica/dist/source/include/acutils.h Wed Jun 17 17:11:44 2015 (r284519)
@@ -379,24 +379,6 @@ extern const UINT8 _acpi_ctype[];
#define isprint(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO | _ACPI_UP | _ACPI_DI | _ACPI_XS | _ACPI_PU))
#define isalpha(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO | _ACPI_UP))
-#ifndef ACPI_CLIBRARY
-#define strstr(s1,s2) strstr ((s1), (s2))
-#define strchr(s1,c) strchr ((s1), (c))
-#define strlen(s) (ACPI_SIZE) strlen ((s))
-#define strcpy(d,s) (void) strcpy ((d), (s))
-#define strncpy(d,s,n) (void) strncpy ((d), (s), (ACPI_SIZE)(n))
-#define strncmp(d,s,n) strncmp ((d), (s), (ACPI_SIZE)(n))
-#define strcmp(d,s) strcmp ((d), (s))
-#define strcat(d,s) (void) strcat ((d), (s))
-#define strncat(d,s,n) strncat ((d), (s), (ACPI_SIZE)(n))
-#define strtoul(d,s,n) strtoul ((d), (s), (ACPI_SIZE)(n))
-#define memcmp(s1,s2,n) memcmp((void *)(s1), (void *)(s2), (ACPI_SIZE)(n))
-#define memcpy(d,s,n) (void) memcpy ((d), (s), (ACPI_SIZE)(n))
-#define memset(d,v,n) (void) memset ((d), (v), (ACPI_SIZE)(n))
-#define toupper(c) toupper ((int) (c))
-#define tolower(c) tolower ((int) (c))
-#endif /* ACPI_CLIBRARY */
-
#endif /* !ACPI_USE_SYSTEM_CLIBRARY */
#define ACPI_IS_ASCII(c) ((c) < 0x80)
Modified: vendor-sys/acpica/dist/source/include/platform/acenv.h
==============================================================================
--- vendor-sys/acpica/dist/source/include/platform/acenv.h Wed Jun 17 16:39:12 2015 (r284518)
+++ vendor-sys/acpica/dist/source/include/platform/acenv.h Wed Jun 17 17:11:44 2015 (r284519)
@@ -349,50 +349,6 @@
/* We will be linking to the standard Clib functions */
-#undef strstr
-#undef strchr
-#undef strlen
-#undef strcpy
-#undef strncpy
-#undef strncmp
-#undef strcmp
-#undef strcat
-#undef strncat
-#undef strtoul
-#undef memcmp
-#undef memcpy
-#undef memset
-#undef toupper
-#undef tolower
-#undef isxdigit
-#undef isdigit
-#undef isspace
-#undef isupper
-#undef isprint
-#undef isalpha
-
-#define strstr(s1,s2) strstr((s1), (s2))
-#define strchr(s1,c) strchr((s1), (c))
-#define strlen(s) (ACPI_SIZE) strlen((s))
-#define strcpy(d,s) (void) strcpy((d), (s))
-#define strncpy(d,s,n) (void) strncpy((d), (s), (ACPI_SIZE)(n))
-#define strncmp(d,s,n) strncmp((d), (s), (ACPI_SIZE)(n))
-#define strcmp(d,s) strcmp((d), (s))
-#define strcat(d,s) (void) strcat((d), (s))
-#define strncat(d,s,n) strncat((d), (s), (ACPI_SIZE)(n))
-#define strtoul(d,s,n) strtoul((d), (s), (ACPI_SIZE)(n))
-#define memcmp(s1,s2,n) memcmp((const char *)(s1), (const char *)(s2), (ACPI_SIZE)(n))
-#define memcpy(d,s,n) (void) memcpy((d), (s), (ACPI_SIZE)(n))
-#define memset(d,s,n) (void) memset((d), (s), (ACPI_SIZE)(n))
-#define toupper(i) toupper((int) (i))
-#define tolower(i) tolower((int) (i))
-#define isxdigit(i) isxdigit((int) (i))
-#define isdigit(i) isdigit((int) (i))
-#define isspace(i) isspace((int) (i))
-#define isupper(i) isupper((int) (i))
-#define isprint(i) isprint((int) (i))
-#define isalpha(i) isalpha((int) (i))
-
#else
/******************************************************************************
Modified: vendor-sys/acpica/dist/source/tools/acpidump/apfiles.c
==============================================================================
--- vendor-sys/acpica/dist/source/tools/acpidump/apfiles.c Wed Jun 17 16:39:12 2015 (r284518)
+++ vendor-sys/acpica/dist/source/tools/acpidump/apfiles.c Wed Jun 17 17:11:44 2015 (r284519)
@@ -159,10 +159,10 @@ ApWriteToBinaryFile (
{
ACPI_MOVE_NAME (Filename, Table->Signature);
}
- Filename[0] = (char) tolower (Filename[0]);
- Filename[1] = (char) tolower (Filename[1]);
- Filename[2] = (char) tolower (Filename[2]);
- Filename[3] = (char) tolower (Filename[3]);
+ Filename[0] = (char) tolower ((int) Filename[0]);
+ Filename[1] = (char) tolower ((int) Filename[1]);
+ Filename[2] = (char) tolower ((int) Filename[2]);
+ Filename[3] = (char) tolower ((int) Filename[3]);
Filename[ACPI_NAME_SIZE] = 0;
/* Handle multiple SSDTs - create different filenames for each */
Modified: vendor-sys/acpica/dist/source/tools/acpisrc/asutils.c
==============================================================================
--- vendor-sys/acpica/dist/source/tools/acpisrc/asutils.c Wed Jun 17 16:39:12 2015 (r284518)
+++ vendor-sys/acpica/dist/source/tools/acpisrc/asutils.c Wed Jun 17 17:11:44 2015 (r284519)
@@ -72,7 +72,7 @@ AsStrlwr (
{
for (String = SrcString; *String; String++)
{
- *String = (char) tolower (*String);
+ *String = (char) tolower ((int) *String);
}
}
}
More information about the svn-src-all
mailing list