aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2022-04-03 09:46:45 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2024-04-17 16:12:41 -0300
commitfaae5301b6dfdea58593d4fa87cc8690b6bd3223 (patch)
treeb1011af5a244e35000cf819b4e4c301524b32584
parenta0606429223eab21c3211197a6f2550d72619b21 (diff)
downloadglibc-faae5301b6dfdea58593d4fa87cc8690b6bd3223.zip
glibc-faae5301b6dfdea58593d4fa87cc8690b6bd3223.tar.gz
glibc-faae5301b6dfdea58593d4fa87cc8690b6bd3223.tar.bz2
conform: Do not use __SIG_ATOMIC_TYPE__
clang does not define __SIG_ATOMIC_TYPE__, instead add another directive ('size:') which instruct to use an interger type of defined minimum size.
-rw-r--r--conform/conformtest.py4
-rw-r--r--conform/data/stdint.h-data4
2 files changed, 6 insertions, 2 deletions
diff --git a/conform/conformtest.py b/conform/conformtest.py
index a43ab05..b4fb6be 100644
--- a/conform/conformtest.py
+++ b/conform/conformtest.py
@@ -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)
diff --git a/conform/data/stdint.h-data b/conform/data/stdint.h-data
index 4e84e17..5d65d4e 100644
--- a/conform/data/stdint.h-data
+++ b/conform/data/stdint.h-data
@@ -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