]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
conform: Do not use __SIG_ATOMIC_TYPE__
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Tue, 31 Dec 2024 18:26:12 +0000 (15:26 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Fri, 3 Jan 2025 12:53:53 +0000 (09:53 -0300)
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>
conform/conformtest.py
conform/data/stdint.h-data

index 531c73a75003c81b15b8dc121347657d6dafbfe3..a14ffb86dda2efd91885ee42c9b68eac492d6454 100644 (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)
index 4e84e17fb87eea17bd0dd3d9d1294ffbaeb4c50c..5d65d4ecd5e5dced27c294edc4ea14a4d7028a83 100644 (file)
@@ -88,8 +88,8 @@ macro-int-constant UINTMAX_MAX {promoted:uintmax_t} >= 18446744073709551615ULL
 macro-int-constant PTRDIFF_MIN {promoted:__PTRDIFF_TYPE__} <= -65535
 macro-int-constant PTRDIFF_MAX {promoted:__PTRDIFF_TYPE__} >= 65535
 
-macro-int-constant SIG_ATOMIC_MIN {promoted:__SIG_ATOMIC_TYPE__}
-macro-int-constant SIG_ATOMIC_MAX {promoted:__SIG_ATOMIC_TYPE__} >= 127
+macro-int-constant SIG_ATOMIC_MIN {size:__SIG_ATOMIC_WIDTH__}
+macro-int-constant SIG_ATOMIC_MAX {size:__SIG_ATOMIC_WIDTH__} >= 127
 
 macro-int-constant SIZE_MAX {promoted:__SIZE_TYPE__} >= 65535