Skip to content

Commit 0407466

Browse files
Drop the definition of __EXTENSIONS__ from three files and instead
move it to compiler options if on a platform that needs it.
1 parent 2f53578 commit 0407466

File tree

5 files changed

+7
-11
lines changed

5 files changed

+7
-11
lines changed

CMakeLists.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -788,7 +788,13 @@ set (_ALL_SOURCE 1)
788788
set (_GNU_SOURCE 1)
789789
set (_POSIX_PTHREAD_SEMANTICS 1)
790790
set (_TANDEM_SOURCE 1)
791-
set (__EXTENSIONS__ 1)
791+
endif()
792+
793+
# Solaris header files limit the visibility of non-standard extensions
794+
# unless __EXTENSIONS__ is defined. We need some of those
795+
# non-standard interfaces.
796+
if (CMAKE_SYSTEM_NAME MATCHES "SunOS")
797+
add_compile_definitions(__EXTENSIONS__=1)
792798
endif()
793799

794800
check_struct_has_member("struct tm" tm_gmtoff time.h have_struct_tm_gmtoff)

common/config.h.cmake.in

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -290,11 +290,6 @@
290290
#ifndef _TANDEM_SOURCE
291291
#cmakedefine _TANDEM_SOURCE 1
292292
#endif
293-
/* Enable general extensions on Solaris. */
294-
#ifndef __EXTENSIONS__
295-
#cmakedefine __EXTENSIONS__ 1
296-
#endif
297-
298293

299294
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
300295
significant byte first (like Motorola and SPARC, unlike Intel). */

libgnucash/backend/xml/sixtp-dom-generators.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@
2121
* *
2222
********************************************************************/
2323
#include <glib.h>
24-
25-
#define __EXTENSIONS__
26-
2724
#include <config.h>
2825

2926
#include <gnc-date.h>

libgnucash/backend/xml/sixtp-utils.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
* *
2222
********************************************************************/
2323

24-
#define __EXTENSIONS__
2524
#include <guid.hpp>
2625
#include <config.h>
2726

libgnucash/engine/gnc-date.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
* *
2626
\********************************************************************/
2727

28-
#define __EXTENSIONS__
2928
#include <glib.h>
3029

3130
#include <config.h>

0 commit comments

Comments
 (0)