]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools: Added extern declaration for protocols/PPI/GUID in AutoGhen.h
authorYingke Liu <yingke.d.liu@intel.com>
Mon, 8 Jun 2015 08:08:58 +0000 (08:08 +0000)
committeryingke <yingke@Edk2>
Mon, 8 Jun 2015 08:08:58 +0000 (08:08 +0000)
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yingke Liu <yingke.d.liu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17573 6f19259b-4bc3-4df7-8a09-765794883524

BaseTools/Source/Python/AutoGen/GenC.py

index 9bdb0363b2c7d0891a89accb16612d3748f4cc7e..e73ba79e28137848106e8efafefafa0bf0ee9e50 100644 (file)
@@ -1319,11 +1319,13 @@ def CreateGuidDefinitionCode(Info, AutoGenC, AutoGenH):
 \r
     if Info.GuidList:\r
         AutoGenC.Append("\n// Guids\n")\r
+        AutoGenH.Append("\n// Guids\n")\r
     #\r
     # GUIDs\r
     #\r
     for Key in Info.GuidList:\r
         AutoGenC.Append('GLOBAL_REMOVE_IF_UNREFERENCED %s %s = %s;\n' % (GuidType, Key, Info.GuidList[Key]))\r
+        AutoGenH.Append('extern %s %s;\n' % (GuidType, Key))\r
 \r
 ## Create code for protocol\r
 #\r
@@ -1342,11 +1344,13 @@ def CreateProtocolDefinitionCode(Info, AutoGenC, AutoGenH):
 \r
     if Info.ProtocolList:\r
         AutoGenC.Append("\n// Protocols\n")\r
+        AutoGenH.Append("\n// Protocols\n")\r
     #\r
     # Protocol GUIDs\r
     #\r
     for Key in Info.ProtocolList:\r
         AutoGenC.Append('GLOBAL_REMOVE_IF_UNREFERENCED %s %s = %s;\n' % (GuidType, Key, Info.ProtocolList[Key]))\r
+        AutoGenH.Append('extern %s %s;\n' % (GuidType, Key))\r
 \r
 ## Create code for PPI\r
 #\r
@@ -1365,11 +1369,13 @@ def CreatePpiDefinitionCode(Info, AutoGenC, AutoGenH):
 \r
     if Info.PpiList:\r
         AutoGenC.Append("\n// PPIs\n")\r
+        AutoGenH.Append("\n// PPIs\n")\r
     #\r
     # PPI GUIDs\r
     #\r
     for Key in Info.PpiList:\r
         AutoGenC.Append('GLOBAL_REMOVE_IF_UNREFERENCED %s %s = %s;\n' % (GuidType, Key, Info.PpiList[Key]))\r
+        AutoGenH.Append('extern %s %s;\n' % (GuidType, Key))\r
 \r
 ## Create code for PCD\r
 #\r