From 32a8147621310ec0884890d9b45efa0cd5c28523 Mon Sep 17 00:00:00 2001 From: aystarik Date: Wed, 29 Jun 2005 20:26:07 +0000 Subject: [PATCH] Disable warning for UINT16_BIT date 2003.10.01.19.52.00; author rmoore1; state Exp; --- source/include/platform/acmsvc.h | 73 ++++++++++++++++++++++++++++++-- 1 file changed, 69 insertions(+), 4 deletions(-) diff --git a/source/include/platform/acmsvc.h b/source/include/platform/acmsvc.h index 239e0c0e2..90a73cd7c 100644 --- a/source/include/platform/acmsvc.h +++ b/source/include/platform/acmsvc.h @@ -1,7 +1,7 @@ /****************************************************************************** * * Name: acmsvc.h - VC specific defines, etc. - * $Revision: 1.2 $ + * $Revision: 1.17 $ * *****************************************************************************/ @@ -9,8 +9,8 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999, Intel Corp. All rights - * reserved. + * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp. + * All rights reserved. * * 2. License * @@ -117,7 +117,59 @@ #ifndef __ACMSVC_H__ #define __ACMSVC_H__ -#define COMPILER_DEPENDENT_UINT64 unsigned __int64 +#define COMPILER_DEPENDENT_INT64 __int64 +#define COMPILER_DEPENDENT_UINT64 unsigned __int64 + +/* + * Calling conventions: + * + * ACPI_SYSTEM_XFACE - Interfaces to host OS (handlers, threads) + * ACPI_EXTERNAL_XFACE - External ACPI interfaces + * ACPI_INTERNAL_XFACE - Internal ACPI interfaces + * ACPI_INTERNAL_VAR_XFACE - Internal variable-parameter list interfaces + */ +#define ACPI_SYSTEM_XFACE __cdecl +#define ACPI_EXTERNAL_XFACE +#define ACPI_INTERNAL_XFACE +#define ACPI_INTERNAL_VAR_XFACE __cdecl + +#ifndef _LINT +/* + * Math helper functions + */ +#define ACPI_DIV_64_BY_32(n_hi, n_lo, d32, q32, r32) \ +{ \ + __asm mov edx, n_hi \ + __asm mov eax, n_lo \ + __asm div d32 \ + __asm mov q32, eax \ + __asm mov r32, edx \ +} + +#define ACPI_SHIFT_RIGHT_64(n_hi, n_lo) \ +{ \ + __asm shr n_hi, 1 \ + __asm rcr n_lo, 1 \ +} +#else + +/* Fake versions to make lint happy */ + +#define ACPI_DIV_64_BY_32(n_hi, n_lo, d32, q32, r32) \ +{ \ + q32 = n_hi / d32; \ + r32 = n_lo / d32; \ +} + +#define ACPI_SHIFT_RIGHT_64(n_hi, n_lo) \ +{ \ + n_hi >>= 1; \ + n_lo >>= 1; \ +} +#endif + +/* warn C4214: nonstandard extension used : bit field types other than int */ +#pragma warning(disable:4214) /* warn C4100: unreferenced formal parameter */ #pragma warning(disable:4100) @@ -128,5 +180,18 @@ /* warn C4706: assignment within conditional expression */ #pragma warning(disable:4706) +/* This macro is used to tag functions as "printf-like" because + * some compilers can catch printf format string problems. MSVC + * doesn't, so this is proprocessed away. + */ +#define ACPI_PRINTF_LIKE_FUNC + +/* Some compilers complain about unused variables. Sometimes we don't want to + * use all the variables (most specifically for _THIS_MODULE). This allow us + * to to tell the compiler warning in a per-variable manner that a variable + * is unused. However, MSVC doesn't do this. + */ +#define ACPI_UNUSED_VAR + #endif /* __ACMSVC_H__ */