Revision: 16521
          http://sourceforge.net/p/edk2/code/16521
Author:   ydong10
Date:     2014-12-15 10:05:42 +0000 (Mon, 15 Dec 2014)
Log Message:
-----------
MdePkg: Add deprecate flag for the functions which has a replace function in 
safe c library.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <[email protected]>
Reviewed-by: Liming Gao <[email protected]>

Modified Paths:
--------------
    trunk/edk2/MdePkg/Include/Library/BaseLib.h
    trunk/edk2/MdePkg/Library/BaseLib/String.c

Modified: trunk/edk2/MdePkg/Include/Library/BaseLib.h
===================================================================
--- trunk/edk2/MdePkg/Include/Library/BaseLib.h 2014-12-15 09:36:46 UTC (rev 
16520)
+++ trunk/edk2/MdePkg/Include/Library/BaseLib.h 2014-12-15 10:05:42 UTC (rev 
16521)
@@ -481,7 +481,11 @@
   );
 
 
+#ifndef DISABLE_NEW_DEPRECATED_INTERFACES
+
 /**
+  [ATTENTION] This function will be deprecated for security reason.
+
   Copies one Null-terminated Unicode string to another Null-terminated Unicode
   string and returns the new Unicode string.
 
@@ -513,6 +517,8 @@
 
 
 /**
+  [ATTENTION] This function will be deprecated for security reason.
+
   Copies up to a specified length from one Null-terminated Unicode string to 
   another Null-terminated Unicode string and returns the new Unicode string.
 
@@ -549,8 +555,8 @@
   IN      CONST CHAR16              *Source,
   IN      UINTN                     Length
   );
+#endif
 
-
 /**
   Returns the length of a Null-terminated Unicode string.
 
@@ -677,7 +683,11 @@
   );
 
 
+#ifndef DISABLE_NEW_DEPRECATED_INTERFACES
+
 /**
+  [ATTENTION] This function will be deprecated for security reason.
+
   Concatenates one Null-terminated Unicode string to another Null-terminated
   Unicode string, and returns the concatenated Unicode string.
 
@@ -718,6 +728,8 @@
 
 
 /**
+  [ATTENTION] This function will be deprecated for security reason.
+
   Concatenates up to a specified length one Null-terminated Unicode to the end 
   of another Null-terminated Unicode string, and returns the concatenated 
   Unicode string.
@@ -762,6 +774,7 @@
   IN      CONST CHAR16              *Source,
   IN      UINTN                     Length
   );
+#endif
 
 /**
   Returns the first occurrence of a Null-terminated Unicode sub-string
@@ -1000,7 +1013,11 @@
   );
 
 
+#ifndef DISABLE_NEW_DEPRECATED_INTERFACES
+
 /**
+  [ATTENTION] This function will be deprecated for security reason.
+
   Copies one Null-terminated ASCII string to another Null-terminated ASCII
   string and returns the new ASCII string.
 
@@ -1030,6 +1047,8 @@
 
 
 /**
+  [ATTENTION] This function will be deprecated for security reason.
+
   Copies up to a specified length one Null-terminated ASCII string to another 
   Null-terminated ASCII string and returns the new ASCII string.
 
@@ -1063,8 +1082,8 @@
   IN      CONST CHAR8               *Source,
   IN      UINTN                     Length
   );
+#endif
 
-
 /**
   Returns the length of a Null-terminated ASCII string.
 
@@ -1223,7 +1242,11 @@
   );
 
 
+#ifndef DISABLE_NEW_DEPRECATED_INTERFACES
+
 /**
+  [ATTENTION] This function will be deprecated for security reason.
+
   Concatenates one Null-terminated ASCII string to another Null-terminated
   ASCII string, and returns the concatenated ASCII string.
 
@@ -1259,6 +1282,8 @@
 
 
 /**
+  [ATTENTION] This function will be deprecated for security reason.
+
   Concatenates up to a specified length one Null-terminated ASCII string to 
   the end of another Null-terminated ASCII string, and returns the 
   concatenated ASCII string.
@@ -1301,8 +1326,8 @@
   IN      CONST CHAR8               *Source,
   IN      UINTN                     Length
   );
+#endif
 
-
 /**
   Returns the first occurrence of a Null-terminated ASCII sub-string
   in a Null-terminated ASCII string.

Modified: trunk/edk2/MdePkg/Library/BaseLib/String.c
===================================================================
--- trunk/edk2/MdePkg/Library/BaseLib/String.c  2014-12-15 09:36:46 UTC (rev 
16520)
+++ trunk/edk2/MdePkg/Library/BaseLib/String.c  2014-12-15 10:05:42 UTC (rev 
16521)
@@ -14,8 +14,11 @@
 
 #include "BaseLibInternals.h"
 
+#ifndef DISABLE_NEW_DEPRECATED_INTERFACES
 
 /**
+  [ATTENTION] This function will be deprecated for security reason.
+
   Copies one Null-terminated Unicode string to another Null-terminated Unicode
   string and returns the new Unicode string.
 
@@ -68,6 +71,8 @@
 }
 
 /**
+  [ATTENTION] This function will be deprecated for security reason.
+
   Copies up to a specified length from one Null-terminated Unicode string  to 
   another Null-terminated Unicode string and returns the new Unicode string.
 
@@ -137,6 +142,7 @@
   ZeroMem (Destination, Length * sizeof (*Destination));
   return ReturnValue;
 }
+#endif
 
 /**
   Returns the length of a Null-terminated Unicode string.
@@ -319,7 +325,11 @@
   return *FirstString - *SecondString;
 }
 
+#ifndef DISABLE_NEW_DEPRECATED_INTERFACES
+
 /**
+  [ATTENTION] This function will be deprecated for security reason.
+
   Concatenates one Null-terminated Unicode string to another Null-terminated
   Unicode string, and returns the concatenated Unicode string.
 
@@ -369,6 +379,8 @@
 }
 
 /**
+  [ATTENTION] This function will be deprecated for security reason.
+
   Concatenates up to a specified length one Null-terminated Unicode to the end 
   of another Null-terminated Unicode string, and returns the concatenated 
   Unicode string.
@@ -427,6 +439,7 @@
   ASSERT (StrSize (Destination) != 0);
   return Destination;
 }
+#endif
 
 /**
   Returns the first occurrence of a Null-terminated Unicode sub-string
@@ -1065,8 +1078,11 @@
   return ReturnValue;
 }
 
+#ifndef DISABLE_NEW_DEPRECATED_INTERFACES
 
 /**
+  [ATTENTION] This function will be deprecated for security reason.
+
   Copies one Null-terminated ASCII string to another Null-terminated ASCII
   string and returns the new ASCII string.
 
@@ -1116,6 +1132,8 @@
 }
 
 /**
+  [ATTENTION] This function will be deprecated for security reason.
+
   Copies up to a specified length one Null-terminated ASCII string to another 
   Null-terminated ASCII string and returns the new ASCII string.
 
@@ -1181,6 +1199,7 @@
   ZeroMem (Destination, Length * sizeof (*Destination));
   return ReturnValue;
 }
+#endif
 
 /**
   Returns the length of a Null-terminated ASCII string.
@@ -1462,7 +1481,11 @@
   return *FirstString - *SecondString;
 }
 
+#ifndef DISABLE_NEW_DEPRECATED_INTERFACES
+
 /**
+  [ATTENTION] This function will be deprecated for security reason.
+
   Concatenates one Null-terminated ASCII string to another Null-terminated
   ASCII string, and returns the concatenated ASCII string.
 
@@ -1507,6 +1530,8 @@
 }
 
 /**
+  [ATTENTION] This function will be deprecated for security reason.
+
   Concatenates up to a specified length one Null-terminated ASCII string to 
   the end of another Null-terminated ASCII string, and returns the 
   concatenated ASCII string.
@@ -1563,6 +1588,7 @@
   ASSERT (AsciiStrSize (Destination) != 0);
   return Destination;
 }
+#endif
 
 /**
   Returns the first occurrence of a Null-terminated ASCII sub-string


------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to