diff --git a/CMakeLists.txt b/CMakeLists.txt index e925a0b8df..afbc837828 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -788,7 +788,13 @@ set (_ALL_SOURCE 1) set (_GNU_SOURCE 1) set (_POSIX_PTHREAD_SEMANTICS 1) set (_TANDEM_SOURCE 1) -set (__EXTENSIONS__ 1) +endif() + +# Solaris header files limit the visibility of non-standard extensions +# unless __EXTENSIONS__ is defined. We need some of those +# non-standard interfaces. +if (CMAKE_SYSTEM_NAME MATCHES "SunOS") +add_compile_definitions(__EXTENSIONS__=1) endif() check_struct_has_member("struct tm" tm_gmtoff time.h have_struct_tm_gmtoff) diff --git a/common/config.h.cmake.in b/common/config.h.cmake.in index 77d555ccfa..e1ed479509 100644 --- a/common/config.h.cmake.in +++ b/common/config.h.cmake.in @@ -290,11 +290,6 @@ #ifndef _TANDEM_SOURCE #cmakedefine _TANDEM_SOURCE 1 #endif -/* Enable general extensions on Solaris. */ -#ifndef __EXTENSIONS__ -#cmakedefine __EXTENSIONS__ 1 -#endif - /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ diff --git a/libgnucash/backend/xml/sixtp-dom-generators.cpp b/libgnucash/backend/xml/sixtp-dom-generators.cpp index a949b65a52..98cba3bfeb 100644 --- a/libgnucash/backend/xml/sixtp-dom-generators.cpp +++ b/libgnucash/backend/xml/sixtp-dom-generators.cpp @@ -21,9 +21,6 @@ * * ********************************************************************/ #include - -#define __EXTENSIONS__ - #include #include diff --git a/libgnucash/backend/xml/sixtp-utils.cpp b/libgnucash/backend/xml/sixtp-utils.cpp index 4e3539ad3c..575ae60f24 100644 --- a/libgnucash/backend/xml/sixtp-utils.cpp +++ b/libgnucash/backend/xml/sixtp-utils.cpp @@ -21,7 +21,6 @@ * * ********************************************************************/ -#define __EXTENSIONS__ #include #include diff --git a/libgnucash/engine/gnc-date.cpp b/libgnucash/engine/gnc-date.cpp index f64863888d..2302ae6295 100644 --- a/libgnucash/engine/gnc-date.cpp +++ b/libgnucash/engine/gnc-date.cpp @@ -25,7 +25,6 @@ * * \********************************************************************/ -#define __EXTENSIONS__ #include #include