X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=BaseTools%2FSource%2FC%2FCommon%2FCommonLib.h;h=0f05d88db206ad7405ee1c552a8db4a0642ef60a;hb=HEAD;hp=9da16e8cd30156958de599de5cb62fcb7438cfac;hpb=7dbc50bd244d95fdc1741b9cfc561f0bfd724de1;p=mirror_edk2.git
diff --git a/BaseTools/Source/C/Common/CommonLib.h b/BaseTools/Source/C/Common/CommonLib.h
index 9da16e8cd3..0f05d88db2 100644
--- a/BaseTools/Source/C/Common/CommonLib.h
+++ b/BaseTools/Source/C/Common/CommonLib.h
@@ -1,14 +1,8 @@
/** @file
Common library assistance routines.
-Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.
-This program and the accompanying materials
-are licensed and made available under the terms and conditions of the BSD License
-which accompanies this distribution. The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent
**/
@@ -18,19 +12,26 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include
#include
#include
+#ifndef _WIN32
+#include
+#endif
+
#define PRINTED_GUID_BUFFER_SIZE 37 // including null-termination
+#ifdef PATH_MAX
+#define MAX_LONG_FILE_PATH PATH_MAX
+#else
#define MAX_LONG_FILE_PATH 500
+#endif
-#define MAX_UINTN MAX_ADDRESS
#define MAX_UINT64 ((UINT64)0xFFFFFFFFFFFFFFFFULL)
+#define MAX_UINT32 ((UINT32)0xFFFFFFFF)
#define MAX_UINT16 ((UINT16)0xFFFF)
#define MAX_UINT8 ((UINT8)0xFF)
#define ARRAY_SIZE(Array) (sizeof (Array) / sizeof ((Array)[0]))
#define ASCII_RSIZE_MAX 1000000
-#ifndef RSIZE_MAX
+#undef RSIZE_MAX
#define RSIZE_MAX 1000000
-#endif
#define IS_COMMA(a) ((a) == L',')
#define IS_HYPHEN(a) ((a) == L'-')
@@ -251,16 +252,6 @@ StrSize (
CONST CHAR16 *String
);
-UINTN
-StrHexToUintn (
- CONST CHAR16 *String
- );
-
-UINTN
-StrDecimalToUintn (
- CONST CHAR16 *String
- );
-
UINT64
StrHexToUint64 (
CONST CHAR16 *String
@@ -278,13 +269,6 @@ StrHexToUint64S (
UINT64 *Data
);
-RETURN_STATUS
-StrHexToUintnS (
- CONST CHAR16 *String,
- CHAR16 **EndPointer, OPTIONAL
- UINTN *Data
- );
-
RETURN_STATUS
StrDecimalToUint64S (
CONST CHAR16 *String,
@@ -292,13 +276,6 @@ StrDecimalToUint64S (
UINT64 *Data
);
-RETURN_STATUS
-StrDecimalToUintnS (
- CONST CHAR16 *String,
- CHAR16 **EndPointer, OPTIONAL
- UINTN *Data
- );
-
VOID *
ReallocatePool (
UINTN OldSize,
@@ -452,14 +429,14 @@ SplitStr (
/*++
Routine Description:
- Convert FileName to the long file path, which can support larger than 260 length.
+ Convert FileName to the long file path, which can support larger than 260 length.
Arguments:
- FileName - FileName.
+ FileName - FileName.
Returns:
LongFilePath A pointer to the converted long file path.
-
+
--*/
#ifdef __cplusplus