diff options
author | Travis Oliphant <oliphant@enthought.com> | 2006-01-22 07:40:50 +0000 |
---|---|---|
committer | Travis Oliphant <oliphant@enthought.com> | 2006-01-22 07:40:50 +0000 |
commit | 4eeb659b1ec21647c448d50803cc51a7a351666b (patch) | |
tree | a3402d79efe1e37c456530077550099be4c78f74 /numpy/core | |
parent | d297382e0024174d463d7b03ef57525bf687104c (diff) | |
download | numpy-4eeb659b1ec21647c448d50803cc51a7a351666b.tar.gz |
Fix 2.3 compatibility.
Diffstat (limited to 'numpy/core')
-rw-r--r-- | numpy/core/setup.py | 8 | ||||
-rw-r--r-- | numpy/core/src/arraytypes.inc.src | 4 |
2 files changed, 11 insertions, 1 deletions
diff --git a/numpy/core/setup.py b/numpy/core/setup.py index c2f0e39e0..78611b5e1 100644 --- a/numpy/core/setup.py +++ b/numpy/core/setup.py @@ -1,6 +1,7 @@ import imp import os +import sys from os.path import join from glob import glob from distutils.dep_util import newer,newer_group @@ -71,7 +72,12 @@ def configuration(parent_package='',top_path=None): moredefs.append('HAVE_ISNAN') if config_cmd.check_func('isinf', **kws_args): moredefs.append('HAVE_ISINF') - + + if sys.version[:3] < '2.4': + kws_args['headers'].append('stdlib.h') + if config_cmd.check_func('strtod', **kws_args): + moredefs.append(('PyOS_ascii_strtod', 'strtod')) + if moredefs: target_f = open(target,'a') for d in moredefs: diff --git a/numpy/core/src/arraytypes.inc.src b/numpy/core/src/arraytypes.inc.src index cde60003a..a973a9dac 100644 --- a/numpy/core/src/arraytypes.inc.src +++ b/numpy/core/src/arraytypes.inc.src @@ -775,6 +775,7 @@ static int #fname=FLOAT,DOUBLE,LONGDOUBLE# #type=float,double,longdouble# */ +#if (PY_VERSION_HEX >= 0x02040000) || defined(PyOS_ascii_strtod) static int @fname@_fromstr(char *str, @type@ *ip, char **endptr, void *ignore) { @@ -784,6 +785,9 @@ static int *ip = (@type@) result; return 0; } +#else +#define @fname@_fromstr NULL +#endif /**end repeat**/ |