1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-12-24 17:51:17 +03:00

conform: Do not use __SIG_ATOMIC_TYPE__

clang does not define __SIG_ATOMIC_TYPE__, instead add another
directive ('size:') which instruct to use an integer type of
defined minimum size.

Reviewed-by: Sam James <sam@gentoo.org>
This commit is contained in:
Adhemerval Zanella
2024-12-31 15:26:12 -03:00
parent e9eea05986
commit 8ed53717c4
2 changed files with 6 additions and 2 deletions

View File

@@ -172,6 +172,10 @@ class ConstantTest(object):
c_type = self.c_type[len('promoted:'):]
text = ('__typeof__ ((%s) 0 + (%s) 0) a2_%d;\n'
% (c_type, c_type, self.num))
elif self.c_type.startswith('size:'):
c_type = "int{}_t".format(self.c_type[len('size:'):])
text = ('__typeof__ ((%s) 0 + (%s) 0) a2_%d;\n'
% (c_type, c_type, self.num))
else:
text = '__typeof__ ((%s) 0) a2_%d;\n' % (self.c_type, self.num)
text += 'extern __typeof__ (%s) a2_%d;\n' % (self.symbol, self.num)