mirror of https://github.com/acidanthera/audk.git
Fixed the issues which caused the gcc build on MacOs failed
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@552 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
2435723ad9
commit
3ce2b1a85f
|
@ -31,6 +31,7 @@ Abstract:
|
|||
#include <Common/FirmwareFileSystem.h>
|
||||
#include <Library/PeCoffLib.h>
|
||||
|
||||
#include "CommonLib.h"
|
||||
#include "ParseInf.h"
|
||||
#include "FvLib.h"
|
||||
#include "EfiUtilityMsgs.h"
|
||||
|
|
|
@ -20,6 +20,64 @@
|
|||
|
||||
#include "CommonLib.h"
|
||||
|
||||
/**
|
||||
Returns the length of a Null-terminated Unicode string.
|
||||
|
||||
This function returns the number of Unicode characters in the Null-terminated
|
||||
Unicode string specified by String.
|
||||
|
||||
If String is NULL, then ASSERT().
|
||||
|
||||
@param String Pointer to a Null-terminated Unicode string.
|
||||
|
||||
@return The length of String.
|
||||
|
||||
**/
|
||||
UINTN
|
||||
EFIAPI
|
||||
StrLen (
|
||||
IN CONST CHAR16 *String
|
||||
)
|
||||
{
|
||||
UINTN Length;
|
||||
|
||||
ASSERT (String != NULL);
|
||||
|
||||
for (Length = 0; *String != L'\0'; String++, Length++) {
|
||||
;
|
||||
}
|
||||
return Length;
|
||||
}
|
||||
|
||||
/**
|
||||
Returns the length of a Null-terminated ASCII string.
|
||||
|
||||
This function returns the number of ASCII characters in the Null-terminated
|
||||
ASCII string specified by String.
|
||||
|
||||
If String is NULL, then ASSERT().
|
||||
|
||||
@param String Pointer to a Null-terminated ASCII string.
|
||||
|
||||
@return The length of String.
|
||||
|
||||
**/
|
||||
UINTN
|
||||
EFIAPI
|
||||
AsciiStrLen (
|
||||
IN CONST CHAR8 *String
|
||||
)
|
||||
{
|
||||
UINTN Length;
|
||||
|
||||
ASSERT (String != NULL);
|
||||
|
||||
for (Length = 0; *String != '\0'; String++, Length++) {
|
||||
;
|
||||
}
|
||||
return Length;
|
||||
}
|
||||
|
||||
/**
|
||||
Copies one Null-terminated Unicode string to another Null-terminated Unicode
|
||||
string and returns the new Unicode string.
|
||||
|
@ -127,35 +185,6 @@ StrnCpy (
|
|||
return ReturnValue;
|
||||
}
|
||||
|
||||
/**
|
||||
Returns the length of a Null-terminated Unicode string.
|
||||
|
||||
This function returns the number of Unicode characters in the Null-terminated
|
||||
Unicode string specified by String.
|
||||
|
||||
If String is NULL, then ASSERT().
|
||||
|
||||
@param String Pointer to a Null-terminated Unicode string.
|
||||
|
||||
@return The length of String.
|
||||
|
||||
**/
|
||||
UINTN
|
||||
EFIAPI
|
||||
StrLen (
|
||||
IN CONST CHAR16 *String
|
||||
)
|
||||
{
|
||||
UINTN Length;
|
||||
|
||||
ASSERT (String != NULL);
|
||||
|
||||
for (Length = 0; *String != L'\0'; String++, Length++) {
|
||||
;
|
||||
}
|
||||
return Length;
|
||||
}
|
||||
|
||||
/**
|
||||
Returns the size of a Null-terminated Unicode string in bytes, including the
|
||||
Null terminator.
|
||||
|
@ -454,35 +483,6 @@ AsciiStrnCpy (
|
|||
return ReturnValue;
|
||||
}
|
||||
|
||||
/**
|
||||
Returns the length of a Null-terminated ASCII string.
|
||||
|
||||
This function returns the number of ASCII characters in the Null-terminated
|
||||
ASCII string specified by String.
|
||||
|
||||
If String is NULL, then ASSERT().
|
||||
|
||||
@param String Pointer to a Null-terminated ASCII string.
|
||||
|
||||
@return The length of String.
|
||||
|
||||
**/
|
||||
UINTN
|
||||
EFIAPI
|
||||
AsciiStrLen (
|
||||
IN CONST CHAR8 *String
|
||||
)
|
||||
{
|
||||
UINTN Length;
|
||||
|
||||
ASSERT (String != NULL);
|
||||
|
||||
for (Length = 0; *String != '\0'; String++, Length++) {
|
||||
;
|
||||
}
|
||||
return Length;
|
||||
}
|
||||
|
||||
/**
|
||||
Returns the size of a Null-terminated ASCII string in bytes, including the
|
||||
Null terminator.
|
||||
|
|
Loading…
Reference in New Issue