diff options
| author | Kristian Evers <kristianevers@gmail.com> | 2018-03-23 18:23:43 +0100 |
|---|---|---|
| committer | Kristian Evers <kristianevers@gmail.com> | 2018-03-23 18:23:43 +0100 |
| commit | 0962d1ecf116e2eeeccfa6ce5c9613407691f38c (patch) | |
| tree | 5b6b82e10117b2ca7136539f53e7c9eaa8a48867 | |
| parent | 445fdebcc29b909c8008ae8b4ff46c25aeba1e18 (diff) | |
| parent | 8f731933cc18515aeb20fe7224c3e4a7c02b315b (diff) | |
| download | PROJ-0962d1ecf116e2eeeccfa6ce5c9613407691f38c.tar.gz PROJ-0962d1ecf116e2eeeccfa6ce5c9613407691f38c.zip | |
Merge remote-tracking branch 'osgeo/master'
| -rw-r--r-- | CMakeLists.txt | 3 | ||||
| -rw-r--r-- | CONTRIBUTING.md | 12 | ||||
| -rw-r--r-- | configure.ac | 3 | ||||
| -rw-r--r-- | src/pj_internal.c | 4 | ||||
| -rw-r--r-- | src/proj_internal.h | 8 |
5 files changed, 22 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 02de6a81..e6f56788 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -100,7 +100,8 @@ int main() { int q; return (int)(hypot(3.0, 4.0) + atanh(0.8) + cbrt(8.0) + remquo(100.0, 90.0, &q) + - remainder(100.0, 90.0) + copysign(1.0, -0.0)); + remainder(100.0, 90.0) + copysign(1.0, -0.0)) + + isnan(0.0); }\n" C99_MATH) if (C99_MATH) add_definitions (-DHAVE_C99_MATH=1) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8eeca63a..61ba3772 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -82,15 +82,15 @@ If you intend to document one of PROJ.4's supported projections please use the See [Code Contributions](http://proj4.org/development/for_proj_contributors.html) #### Legalese -Commiters are the front line gatekeepers to keep the code base clear of improperly contributed code. +Committers are the front line gatekeepers to keep the code base clear of improperly contributed code. It is important to the PROJ.4 users, developers and the OSGeo foundation to avoid contributing any code to the project without it being clearly licensed under the project license. Generally speaking the key issues are that those providing code to be included in the repository understand that the code will be released under the MIT/X license, and that the person providing -the code has the right to contribute the code. For the commiter themselves understanding about -the license is hopefully clear. For other contributors, the commiter should verify the understanding -unless the commiter is very comfortable that the contributor understands the license (for +the code has the right to contribute the code. For the committer themselves understanding about +the license is hopefully clear. For other contributors, the committer should verify the understanding +unless the committer is very comfortable that the contributor understands the license (for instance frequent contributors). If the contribution was developed on behalf of an employer (on work time, as part of a work project, @@ -104,7 +104,7 @@ compatible license. All unusual situations need to be discussed and/or documented. -Commiters should adhere to the following guidelines, and may be personally legally liable for +Committer should adhere to the following guidelines, and may be personally legally liable for improperly contributing code to the source repository: * Make sure the contributor (and possibly employer) is aware of the contribution terms. @@ -132,4 +132,4 @@ improperly contributing code to the source repository: The _code contribution_ section of this CONTRIBUTING file is inspired by [PDAL's](https://github.com/PDAL/PDAL/blob/master/CONTRIBUTING.md) and the _legalese_ section is -modified from [GDAL commiter guidelines](https://trac.osgeo.org/gdal/wiki/rfc3_commiters) +modified from [GDAL committer guidelines](https://trac.osgeo.org/gdal/wiki/rfc3_commiters) diff --git a/configure.ac b/configure.ac index 66da9d13..99a764db 100644 --- a/configure.ac +++ b/configure.ac @@ -44,7 +44,8 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM( [int q; return (int)(hypot(3.0, 4.0) + atanh(0.8) + cbrt(8.0) + remquo(100.0, 90.0, &q) + - remainder(100.0, 90.0) + copysign(1.0, -0.0));])], + remainder(100.0, 90.0) + copysign(1.0, -0.0)) + + isnan(0.0);])], [AC_MSG_RESULT([yes]);C99_MATH="-DHAVE_C99_MATH=1"], [AC_MSG_RESULT([no]);C99_MATH="-DHAVE_C99_MATH=0"]) CFLAGS="$save_CFLAGS $C99_MATH" diff --git a/src/pj_internal.c b/src/pj_internal.c index 9cbbf20a..4da47051 100644 --- a/src/pj_internal.c +++ b/src/pj_internal.c @@ -445,6 +445,9 @@ void proj_log_func (PJ_CONTEXT *ctx, void *app_data, PJ_LOG_FUNCTION logf) { } +#if HAVE_C99_MATH +/* proj_internal.h defines pj_is_nan as isnan */ +#else /*****************************************************************************/ int pj_is_nan (double val) { /****************************************************************************** @@ -455,3 +458,4 @@ int pj_is_nan (double val) { /* cppcheck-suppress duplicateExpression */ return val != val; } +#endif diff --git a/src/proj_internal.h b/src/proj_internal.h index b3843a59..3f6ccde0 100644 --- a/src/proj_internal.h +++ b/src/proj_internal.h @@ -50,6 +50,10 @@ extern "C" { #define STATIC_ASSERT(COND) ((void)sizeof(char[(COND) ? 1 : -1])) +#if !defined(HAVE_C99_MATH) +#define HAVE_C99_MATH 0 +#endif + #ifndef PJ_TODEG #define PJ_TODEG(rad) ((rad)*180.0/M_PI) #endif @@ -130,7 +134,11 @@ void proj_fileapi_set (PJ *P, void *fileapi); const char * const *proj_get_searchpath(void); int proj_get_path_count(void); +#if HAVE_C99_MATH +#define pj_is_nan isnan +#else int pj_is_nan (double val); +#endif #ifdef __cplusplus } |
