diff options
| author | Kristian Evers <kristianevers@gmail.com> | 2018-04-14 16:47:53 +0200 |
|---|---|---|
| committer | Kristian Evers <kristianevers@gmail.com> | 2018-04-16 22:55:06 +0200 |
| commit | 327a8f8b5a850167901a92747767e14ffe77c03b (patch) | |
| tree | c1681555e256f97258b8624f2190b813c7fdd2c2 /src/projects.h | |
| parent | ee22447de347c78944af849b10e0c9fd10184c28 (diff) | |
| download | PROJ-327a8f8b5a850167901a92747767e14ffe77c03b.tar.gz PROJ-327a8f8b5a850167901a92747767e14ffe77c03b.zip | |
Collect custom C99 math functions in proj_math.h
We are relying more and more on C99 math functions. On C89 systems where
those functions are not available our own custom versions of those
functions are used instead. So far these has been spread across the code
base. This commit gathers them in the same file and introduces the
proj_math.h header. The build system checks for C99 math functions. If
not found the proj_math.h header make sure that C99 functions are
defined as their pj_ equivalent.
Ideally proj_math.h is included instead of math.h. This removes the need
for any checks against HAVE_C99_MATH in the code making it easier to
read.
For this commit the functions hypot, log1p and asinh has been taken care
of.
Diffstat (limited to 'src/projects.h')
| -rw-r--r-- | src/projects.h | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/src/projects.h b/src/projects.h index 5c8d1301..d6d6e23e 100644 --- a/src/projects.h +++ b/src/projects.h @@ -92,11 +92,6 @@ typedef long pj_int32; #define MAX_PATH_FILENAME 1024 #endif -/* prototype hypot for systems where absent */ -#if !(defined(HAVE_C99_MATH) && HAVE_C99_MATH) -extern double hypot(double, double); -#endif - /* If we still haven't got M_PI*, we rely on our own defines. * For example, this is necessary when compiling with gcc and * the -ansi flag. |
