X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=tools%2Flttng-gen-tp;fp=tools%2Flttng-gen-tp;h=b560e535385e35105f0379bd5697bb78f17c10f2;hb=69f3425315c7b9485421499cc9e046a71b1126f3;hp=2075655559a582a214551a0b397ca609aaebc381;hpb=f1d29bdce822f8432965b2db23d46ef79d2691a9;p=lttng-ust.git diff --git a/tools/lttng-gen-tp b/tools/lttng-gen-tp index 20756555..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,