diff options
author | jwang36 <jwang36@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-06-17 15:42:16 +0000 |
---|---|---|
committer | jwang36 <jwang36@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-06-17 15:42:16 +0000 |
commit | 3ce2b1a85f5b18cf53b3ccb80cb9018b98be0fc6 (patch) | |
tree | 4d465667a7518802f39506609d8a2b59946f0efd | |
parent | 2435723ad99a9068ec74a212ae00886d7bdfc58d (diff) | |
download | edk2-platforms-3ce2b1a85f5b18cf53b3ccb80cb9018b98be0fc6.tar.xz |
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
-rw-r--r-- | Tools/Source/TianoTools/PeiRebase/PeiRebaseExe.c | 1 | ||||
-rw-r--r-- | Tools/Source/TianoTools/String/String.c | 116 |
2 files changed, 59 insertions, 58 deletions
diff --git a/Tools/Source/TianoTools/PeiRebase/PeiRebaseExe.c b/Tools/Source/TianoTools/PeiRebase/PeiRebaseExe.c index 7b48b67d24..94c0ded3df 100644 --- a/Tools/Source/TianoTools/PeiRebase/PeiRebaseExe.c +++ b/Tools/Source/TianoTools/PeiRebase/PeiRebaseExe.c @@ -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"
diff --git a/Tools/Source/TianoTools/String/String.c b/Tools/Source/TianoTools/String/String.c index 0e4993a4be..1f09dab724 100644 --- a/Tools/Source/TianoTools/String/String.c +++ b/Tools/Source/TianoTools/String/String.c @@ -21,6 +21,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.
@@ -128,35 +186,6 @@ StrnCpy ( }
/**
- 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.
@@ -455,35 +484,6 @@ AsciiStrnCpy ( }
/**
- 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.
|