If a template is located in a subdirectory as is common in large
software projects then the include guard will contain forward slash
characters which are not allowed.  This replaces those characters with
an underscore.  Additional the include guards previously started with
an underscore and capital letter which is reserved thus this
additionally removes the leading underscore.

Fixes: #298

Signed-off-by: Shawn Bohrer <[email protected]>
---
 tools/lttng-gen-tp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tools/lttng-gen-tp b/tools/lttng-gen-tp
index d54559a..8cd3191 100755
--- a/tools/lttng-gen-tp
+++ b/tools/lttng-gen-tp
@@ -61,7 +61,7 @@ extern "C"{{
 
     def write(self):
         outputFile = open(self.outputFilename,"w")
-        includeGuard = "_"+self.outputFilename.upper().replace(".","_")
+        includeGuard = 
self.outputFilename.upper().replace(".","_").replace("/","_")
 
         
outputFile.write(HeaderFile.HEADER_TPL.format(providerName=self.template.domain,
                                            includeGuard = includeGuard,
-- 
1.7.7.6


-- 

---------------------------------------------------------------
This email, along with any attachments, is confidential. If you 
believe you received this message in error, please contact the 
sender immediately and delete all copies of the message.  
Thank you.

_______________________________________________
lttng-dev mailing list
[email protected]
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

Reply via email to