From ad571f166ffa0a255d18feaa8e8fc7115de30aa5 Mon Sep 17 00:00:00 2001 From: Mike Toews Date: Fri, 23 Mar 2018 10:11:17 +1300 Subject: Correct typo: commiter -> committer --- CONTRIBUTING.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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) -- cgit v1.2.3 From 667a3fc73240015effa4c5892366e9c6a6bc6bfe Mon Sep 17 00:00:00 2001 From: Charles Karney Date: Fri, 23 Mar 2018 06:26:26 -0400 Subject: If HAVE_C99_MATH, then pj_is_nan is defined as isnan. This required extending the HAVE_C99_MATH checks in CMakeLists.txt and configure.ac to include a test for the C99 function isnan. --- CMakeLists.txt | 3 ++- configure.ac | 3 ++- src/pj_internal.c | 4 ++++ src/proj_internal.h | 8 ++++++++ 4 files changed, 16 insertions(+), 2 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/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 } -- cgit v1.2.3 From 607a0116ce790f34c2ddb6c83990b21068bf7c6e Mon Sep 17 00:00:00 2001 From: Charles Karney Date: Fri, 23 Mar 2018 06:29:23 -0400 Subject: Undo mistaken push to master. --- CMakeLists.txt | 3 +-- configure.ac | 3 +-- src/pj_internal.c | 4 ---- src/proj_internal.h | 8 -------- 4 files changed, 2 insertions(+), 16 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e6f56788..02de6a81 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -100,8 +100,7 @@ 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)) + - isnan(0.0); + remainder(100.0, 90.0) + copysign(1.0, -0.0)); }\n" C99_MATH) if (C99_MATH) add_definitions (-DHAVE_C99_MATH=1) diff --git a/configure.ac b/configure.ac index 99a764db..66da9d13 100644 --- a/configure.ac +++ b/configure.ac @@ -44,8 +44,7 @@ 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)) + - isnan(0.0);])], + remainder(100.0, 90.0) + copysign(1.0, -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 4da47051..9cbbf20a 100644 --- a/src/pj_internal.c +++ b/src/pj_internal.c @@ -445,9 +445,6 @@ 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) { /****************************************************************************** @@ -458,4 +455,3 @@ 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 3f6ccde0..b3843a59 100644 --- a/src/proj_internal.h +++ b/src/proj_internal.h @@ -50,10 +50,6 @@ 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 @@ -134,11 +130,7 @@ 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 } -- cgit v1.2.3 From b04abee685f38db9d1be15f8406ca79dabde7ee1 Mon Sep 17 00:00:00 2001 From: Charles Karney Date: Fri, 23 Mar 2018 06:34:48 -0400 Subject: If HAVE_C99_MATH, define pj_is_nan as isnan. Extend HAVE_C99_MATH checks in CMakeLists.txt and configure.ac to include test for C99 function isnan. --- CMakeLists.txt | 3 ++- configure.ac | 3 ++- src/pj_internal.c | 4 ++++ src/proj_internal.h | 8 ++++++++ 4 files changed, 16 insertions(+), 2 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/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 } -- cgit v1.2.3