X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=tools%2Flttng-gen-tp;fp=tools%2Flttng-gen-tp;h=5937dfdfe1793f61b46c43e544d41f2b109d0674;hb=77f39b96000a6702f85da7c9e97053dee4eed935;hp=2f468cbb79abde4fbf580208cc4728df91af548a;hpb=75ecf151e7571c682bb302e8d2206e22bdaa62b2;p=lttng-ust.git diff --git a/tools/lttng-gen-tp b/tools/lttng-gen-tp index 2f468cbb..5937dfdf 100755 --- a/tools/lttng-gen-tp +++ b/tools/lttng-gen-tp @@ -61,7 +61,9 @@ extern "C"{{ def write(self): outputFile = open(self.outputFilename,"w") - includeGuard = self.outputFilename.upper().replace(".","_") + # Include guard macro will be created by uppercasing the filename and + # replacing all non alphanumeric characters with '_' + includeGuard = re.sub('[^0-9a-zA-Z]', '_', self.outputFilename.upper()) outputFile.write(HeaderFile.HEADER_TPL.format(providerName=self.template.domain, includeGuard = includeGuard,