Skip to content

Commit b6d52fc

Browse files
committed
remove duplicate C99 functions, ensure optional variant HAVE_ macros are generated
1 parent 704ca94 commit b6d52fc

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

numpy/core/setup_common.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -127,13 +127,9 @@ def set_sig(sig):
127127
"expm1", "log1p", "acosh", "asinh", "atanh",
128128
"rint", "trunc", "exp2",
129129
"copysign", "nextafter", "strtoll", "strtoull", "cbrt",
130-
# C99, mandatory
131-
"sin", "cos", "tan", "sinh", "cosh", "tanh", "fabs", "floor", "ceil",
132-
"rint", "trunc", "sqrt", "log10", "log", "log1p", "exp", "expm1",
133-
"asin", "acos", "atan", "asinh", "acosh", "atanh",
134130
]
135131

136-
OPTIONAL_STDFUNCS = [
132+
OPTIONAL_STDFUNCS_BASE = [
137133
# cygwin
138134
"log2",
139135
# macos for powl
@@ -144,6 +140,10 @@ def set_sig(sig):
144140
"atan2",
145141
]
146142

143+
OPTIONAL_STDFUNCS = OPTIONAL_STDFUNCS_BASE[:]
144+
OPTIONAL_STDFUNCS += [f + 'f' for f in OPTIONAL_STDFUNCS_BASE]
145+
OPTIONAL_STDFUNCS += [f + 'l' for f in OPTIONAL_STDFUNCS_BASE]
146+
147147
OPTIONAL_LOCALE_FUNCS = ["strtold_l"]
148148
OPTIONAL_FILE_FUNCS = ["ftello", "fseeko", "fallocate"]
149149
OPTIONAL_MISC_FUNCS = ["backtrace", "madvise"]

0 commit comments

Comments
 (0)