X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=tools%2Flttng-gen-tp;h=b560e535385e35105f0379bd5697bb78f17c10f2;hb=refs%2Fheads%2Fstable-2.0;hp=d54559a0405444d5184d3dbe8bdfa154db5c597b;hpb=a4a9916ec83b43bd2ba0fb025706bcedc1deaaf4;p=lttng-ust.git diff --git a/tools/lttng-gen-tp b/tools/lttng-gen-tp index d54559a0..b560e535 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,