@@ -107,6 +107,7 @@ def check_api_version(apiversion, codegen_dir):
107107# sse headers only enabled automatically on amd64/x32 builds
108108 "xmmintrin.h" , # SSE
109109 "emmintrin.h" , # SSE2
110+ "features.h" , # for glibc version linux
110111]
111112
112113# optional gcc compiler builtins and their call arguments and optional a
@@ -138,23 +139,29 @@ def check_api_version(apiversion, codegen_dir):
138139OPTIONAL_VARIABLE_ATTRIBUTES = ["__thread" , "__declspec(thread)" ]
139140
140141# Subset of OPTIONAL_STDFUNCS which may alreay have HAVE_* defined by Python.h
141- OPTIONAL_STDFUNCS_MAYBE = ["expm1" , "log1p" , "acosh" , "atanh" , "asinh" , "hypot" ,
142- "copysign" , "ftello" , "fseeko" ]
142+ OPTIONAL_STDFUNCS_MAYBE = [
143+ "expm1" , "log1p" , "acosh" , "atanh" , "asinh" , "hypot" , "copysign" ,
144+ "ftello" , "fseeko"
145+ ]
143146
144147# C99 functions: float and long double versions
145- C99_FUNCS = ["sin" , "cos" , "tan" , "sinh" , "cosh" , "tanh" , "fabs" , "floor" ,
146- "ceil" , "rint" , "trunc" , "sqrt" , "log10" , "log" , "log1p" , "exp" ,
147- "expm1" , "asin" , "acos" , "atan" , "asinh" , "acosh" , "atanh" ,
148- "hypot" , "atan2" , "pow" , "fmod" , "modf" , 'frexp' , 'ldexp' ,
149- "exp2" , "log2" , "copysign" , "nextafter" , "cbrt" ]
150-
148+ C99_FUNCS = [
149+ "sin" , "cos" , "tan" , "sinh" , "cosh" , "tanh" , "fabs" , "floor" , "ceil" ,
150+ "rint" , "trunc" , "sqrt" , "log10" , "log" , "log1p" , "exp" , "expm1" ,
151+ "asin" , "acos" , "atan" , "asinh" , "acosh" , "atanh" , "hypot" , "atan2" ,
152+ "pow" , "fmod" , "modf" , 'frexp' , 'ldexp' , "exp2" , "log2" , "copysign" ,
153+ "nextafter" , "cbrt"
154+ ]
151155C99_FUNCS_SINGLE = [f + 'f' for f in C99_FUNCS ]
152156C99_FUNCS_EXTENDED = [f + 'l' for f in C99_FUNCS ]
153-
154- C99_COMPLEX_TYPES = ['complex double' , 'complex float' , 'complex long double' ]
155-
156- C99_COMPLEX_FUNCS = ['creal' , 'cimag' , 'cabs' , 'carg' , 'cexp' , 'csqrt' , 'clog' ,
157- 'ccos' , 'csin' , 'cpow' ]
157+ C99_COMPLEX_TYPES = [
158+ 'complex double' , 'complex float' , 'complex long double'
159+ ]
160+ C99_COMPLEX_FUNCS = [
161+ "cabs" , "cacos" , "cacosh" , "carg" , "casin" , "casinh" , "catan" ,
162+ "catanh" , "ccos" , "ccosh" , "cexp" , "cimag" , "clog" , "conj" , "cpow" ,
163+ "cproj" , "creal" , "csin" , "csinh" , "csqrt" , "ctan" , "ctanh"
164+ ]
158165
159166def fname2def (name ):
160167 return "HAVE_%s" % name .upper ()
0 commit comments