Commit 2c948755 authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Use portable POSIX for formatting 64bits numbers in printf

parent f7415c67
Pipeline #2561 passed with stage
in 3 minutes and 4 seconds
......@@ -69,7 +69,7 @@ class Printer(RecursiveMapper):
def MapInteger(self, srcCVariable, prefix, _, __, ___):
lines = []
lines.append('#if WORD_SIZE==8')
lines.append('printf("%%s%s %%lld\\n", paramName, %s);' % (prefix, srcCVariable))
lines.append('printf("%%s%s %%"PRId64"\\n", paramName, %s);' % (prefix, srcCVariable))
lines.append('#else')
lines.append('printf("%%s%s %%d\\n", paramName, %s);' % (prefix, srcCVariable))
lines.append('#endif')
......
......@@ -67,7 +67,7 @@ class Printer(RecursiveMapper):
def MapInteger(self, srcCVariable, unused, _, __, ___):
lines = []
lines.append('#if WORD_SIZE==8')
lines.append('printf("%%lld", %s);' % srcCVariable)
lines.append('printf("%%"PRId64, %s);' % srcCVariable)
lines.append('#else')
lines.append('printf("%%d", %s);' % srcCVariable)
lines.append('#endif')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment