summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mkspecs/cygwin-g++/qplatformdefs.h18
-rw-r--r--mkspecs/hurd-g++/qplatformdefs.h18
-rw-r--r--mkspecs/linux-clang/qplatformdefs.h18
-rw-r--r--mkspecs/linux-cxx/qplatformdefs.h18
-rw-r--r--mkspecs/linux-ecc-64/qplatformdefs.h18
-rw-r--r--mkspecs/linux-g++-32/qplatformdefs.h25
-rw-r--r--mkspecs/linux-g++-64/qplatformdefs.h18
-rw-r--r--mkspecs/linux-g++-sparc/qplatformdefs.h18
-rw-r--r--mkspecs/linux-g++/qplatformdefs.h18
-rw-r--r--mkspecs/linux-icc/qplatformdefs.h18
-rw-r--r--mkspecs/linux-kcc/qplatformdefs.h18
-rw-r--r--mkspecs/linux-kylix/qplatformdefs.h18
-rw-r--r--mkspecs/linux-pgcc/qplatformdefs.h18
-rw-r--r--src/3rdparty/libpng/pngconf.h22
-rw-r--r--src/moc/moc_yacc.cpp2
15 files changed, 27 insertions, 238 deletions
diff --git a/mkspecs/cygwin-g++/qplatformdefs.h b/mkspecs/cygwin-g++/qplatformdefs.h
index 181876a7e..fcf57cbe8 100644
--- a/mkspecs/cygwin-g++/qplatformdefs.h
+++ b/mkspecs/cygwin-g++/qplatformdefs.h
@@ -5,22 +5,8 @@
#include "ntqglobal.h"
-// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
-
-// DNS system header files are a mess!
-// <resolv.h> includes <arpa/nameser.h>. <arpa/nameser.h> is using
-// 'u_char' and includes <sys/types.h>. Now the problem is that
-// <sys/types.h> defines 'u_char' only if __USE_BSD is defined.
-// __USE_BSD is defined in <features.h> if _BSD_SOURCE is defined.
-#ifndef _BSD_SOURCE
-# define _BSD_SOURCE
-#endif
-
-// 1) need to reset default environment if _BSD_SOURCE is defined
-// 2) need to specify POSIX thread interfaces explicitly in glibc 2.0
-// 3) it seems older glibc need this to include the X/Open stuff
-#ifndef _GNU_SOURCE
-# define _GNU_SOURCE
+#ifndef _DEFAULT_SOURCE
+# define _DEFAULT_SOURCE
#endif
#include <unistd.h>
diff --git a/mkspecs/hurd-g++/qplatformdefs.h b/mkspecs/hurd-g++/qplatformdefs.h
index e2ea4c304..849cf7fa9 100644
--- a/mkspecs/hurd-g++/qplatformdefs.h
+++ b/mkspecs/hurd-g++/qplatformdefs.h
@@ -5,22 +5,8 @@
#include "ntqglobal.h"
-// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
-
-// DNS system header files are a mess!
-// <resolv.h> includes <arpa/nameser.h>. <arpa/nameser.h> is using
-// 'u_char' and includes <sys/types.h>. Now the problem is that
-// <sys/types.h> defines 'u_char' only if __USE_BSD is defined.
-// __USE_BSD is defined in <features.h> if _BSD_SOURCE is defined.
-#ifndef _BSD_SOURCE
-# define _BSD_SOURCE
-#endif
-
-// 1) need to reset default environment if _BSD_SOURCE is defined
-// 2) need to specify POSIX thread interfaces explicitly in glibc 2.0
-// 3) it seems older glibc need this to include the X/Open stuff
-#ifndef _GNU_SOURCE
-# define _GNU_SOURCE
+#ifndef _DEFAULT_SOURCE
+# define _DEFAULT_SOURCE
#endif
diff --git a/mkspecs/linux-clang/qplatformdefs.h b/mkspecs/linux-clang/qplatformdefs.h
index 9e071fd52..01e1544ee 100644
--- a/mkspecs/linux-clang/qplatformdefs.h
+++ b/mkspecs/linux-clang/qplatformdefs.h
@@ -5,22 +5,8 @@
#include "ntqglobal.h"
-// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
-
-// DNS system header files are a mess!
-// <resolv.h> includes <arpa/nameser.h>. <arpa/nameser.h> is using
-// 'u_char' and includes <sys/types.h>. Now the problem is that
-// <sys/types.h> defines 'u_char' only if __USE_BSD is defined.
-// __USE_BSD is defined in <features.h> if _BSD_SOURCE is defined.
-#ifndef _BSD_SOURCE
-# define _BSD_SOURCE
-#endif
-
-// 1) need to reset default environment if _BSD_SOURCE is defined
-// 2) need to specify POSIX thread interfaces explicitly in glibc 2.0
-// 3) it seems older glibc need this to include the X/Open stuff
-#ifndef _GNU_SOURCE
-# define _GNU_SOURCE
+#ifndef _DEFAULT_SOURCE
+# define _DEFAULT_SOURCE
#endif
#include <unistd.h>
diff --git a/mkspecs/linux-cxx/qplatformdefs.h b/mkspecs/linux-cxx/qplatformdefs.h
index 2a5b12f5b..3ac682c6b 100644
--- a/mkspecs/linux-cxx/qplatformdefs.h
+++ b/mkspecs/linux-cxx/qplatformdefs.h
@@ -5,22 +5,8 @@
#include "ntqglobal.h"
-// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
-
-// DNS system header files are a mess!
-// <resolv.h> includes <arpa/nameser.h>. <arpa/nameser.h> is using
-// 'u_char' and includes <sys/types.h>. Now the problem is that
-// <sys/types.h> defines 'u_char' only if __USE_BSD is defined.
-// __USE_BSD is defined in <features.h> if _BSD_SOURCE is defined.
-#ifndef _BSD_SOURCE
-# define _BSD_SOURCE
-#endif
-
-// 1) need to reset default environment if _BSD_SOURCE is defined
-// 2) need to specify POSIX thread interfaces explicitly in glibc 2.0
-// 3) it seems older glibc need this to include the X/Open stuff
-#ifndef _GNU_SOURCE
-# define _GNU_SOURCE
+#ifndef _DEFAULT_SOURCE
+# define _DEFAULT_SOURCE
#endif
#include <unistd.h>
diff --git a/mkspecs/linux-ecc-64/qplatformdefs.h b/mkspecs/linux-ecc-64/qplatformdefs.h
index 2a5b12f5b..3ac682c6b 100644
--- a/mkspecs/linux-ecc-64/qplatformdefs.h
+++ b/mkspecs/linux-ecc-64/qplatformdefs.h
@@ -5,22 +5,8 @@
#include "ntqglobal.h"
-// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
-
-// DNS system header files are a mess!
-// <resolv.h> includes <arpa/nameser.h>. <arpa/nameser.h> is using
-// 'u_char' and includes <sys/types.h>. Now the problem is that
-// <sys/types.h> defines 'u_char' only if __USE_BSD is defined.
-// __USE_BSD is defined in <features.h> if _BSD_SOURCE is defined.
-#ifndef _BSD_SOURCE
-# define _BSD_SOURCE
-#endif
-
-// 1) need to reset default environment if _BSD_SOURCE is defined
-// 2) need to specify POSIX thread interfaces explicitly in glibc 2.0
-// 3) it seems older glibc need this to include the X/Open stuff
-#ifndef _GNU_SOURCE
-# define _GNU_SOURCE
+#ifndef _DEFAULT_SOURCE
+# define _DEFAULT_SOURCE
#endif
#include <unistd.h>
diff --git a/mkspecs/linux-g++-32/qplatformdefs.h b/mkspecs/linux-g++-32/qplatformdefs.h
index 2a5b12f5b..eb160779c 100644
--- a/mkspecs/linux-g++-32/qplatformdefs.h
+++ b/mkspecs/linux-g++-32/qplatformdefs.h
@@ -1,26 +1,5 @@
-#ifndef TQPLATFORMDEFS_H
-#define TQPLATFORMDEFS_H
-
-// Get TQt defines/settings
-
-#include "ntqglobal.h"
-
-// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
-
-// DNS system header files are a mess!
-// <resolv.h> includes <arpa/nameser.h>. <arpa/nameser.h> is using
-// 'u_char' and includes <sys/types.h>. Now the problem is that
-// <sys/types.h> defines 'u_char' only if __USE_BSD is defined.
-// __USE_BSD is defined in <features.h> if _BSD_SOURCE is defined.
-#ifndef _BSD_SOURCE
-# define _BSD_SOURCE
-#endif
-
-// 1) need to reset default environment if _BSD_SOURCE is defined
-// 2) need to specify POSIX thread interfaces explicitly in glibc 2.0
-// 3) it seems older glibc need this to include the X/Open stuff
-#ifndef _GNU_SOURCE
-# define _GNU_SOURCE
+#ifndef _DEFAULT_SOURCE
+# define _DEFAULT_SOURCE
#endif
#include <unistd.h>
diff --git a/mkspecs/linux-g++-64/qplatformdefs.h b/mkspecs/linux-g++-64/qplatformdefs.h
index 2a5b12f5b..3ac682c6b 100644
--- a/mkspecs/linux-g++-64/qplatformdefs.h
+++ b/mkspecs/linux-g++-64/qplatformdefs.h
@@ -5,22 +5,8 @@
#include "ntqglobal.h"
-// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
-
-// DNS system header files are a mess!
-// <resolv.h> includes <arpa/nameser.h>. <arpa/nameser.h> is using
-// 'u_char' and includes <sys/types.h>. Now the problem is that
-// <sys/types.h> defines 'u_char' only if __USE_BSD is defined.
-// __USE_BSD is defined in <features.h> if _BSD_SOURCE is defined.
-#ifndef _BSD_SOURCE
-# define _BSD_SOURCE
-#endif
-
-// 1) need to reset default environment if _BSD_SOURCE is defined
-// 2) need to specify POSIX thread interfaces explicitly in glibc 2.0
-// 3) it seems older glibc need this to include the X/Open stuff
-#ifndef _GNU_SOURCE
-# define _GNU_SOURCE
+#ifndef _DEFAULT_SOURCE
+# define _DEFAULT_SOURCE
#endif
#include <unistd.h>
diff --git a/mkspecs/linux-g++-sparc/qplatformdefs.h b/mkspecs/linux-g++-sparc/qplatformdefs.h
index 9e071fd52..01e1544ee 100644
--- a/mkspecs/linux-g++-sparc/qplatformdefs.h
+++ b/mkspecs/linux-g++-sparc/qplatformdefs.h
@@ -5,22 +5,8 @@
#include "ntqglobal.h"
-// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
-
-// DNS system header files are a mess!
-// <resolv.h> includes <arpa/nameser.h>. <arpa/nameser.h> is using
-// 'u_char' and includes <sys/types.h>. Now the problem is that
-// <sys/types.h> defines 'u_char' only if __USE_BSD is defined.
-// __USE_BSD is defined in <features.h> if _BSD_SOURCE is defined.
-#ifndef _BSD_SOURCE
-# define _BSD_SOURCE
-#endif
-
-// 1) need to reset default environment if _BSD_SOURCE is defined
-// 2) need to specify POSIX thread interfaces explicitly in glibc 2.0
-// 3) it seems older glibc need this to include the X/Open stuff
-#ifndef _GNU_SOURCE
-# define _GNU_SOURCE
+#ifndef _DEFAULT_SOURCE
+# define _DEFAULT_SOURCE
#endif
#include <unistd.h>
diff --git a/mkspecs/linux-g++/qplatformdefs.h b/mkspecs/linux-g++/qplatformdefs.h
index 9e071fd52..01e1544ee 100644
--- a/mkspecs/linux-g++/qplatformdefs.h
+++ b/mkspecs/linux-g++/qplatformdefs.h
@@ -5,22 +5,8 @@
#include "ntqglobal.h"
-// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
-
-// DNS system header files are a mess!
-// <resolv.h> includes <arpa/nameser.h>. <arpa/nameser.h> is using
-// 'u_char' and includes <sys/types.h>. Now the problem is that
-// <sys/types.h> defines 'u_char' only if __USE_BSD is defined.
-// __USE_BSD is defined in <features.h> if _BSD_SOURCE is defined.
-#ifndef _BSD_SOURCE
-# define _BSD_SOURCE
-#endif
-
-// 1) need to reset default environment if _BSD_SOURCE is defined
-// 2) need to specify POSIX thread interfaces explicitly in glibc 2.0
-// 3) it seems older glibc need this to include the X/Open stuff
-#ifndef _GNU_SOURCE
-# define _GNU_SOURCE
+#ifndef _DEFAULT_SOURCE
+# define _DEFAULT_SOURCE
#endif
#include <unistd.h>
diff --git a/mkspecs/linux-icc/qplatformdefs.h b/mkspecs/linux-icc/qplatformdefs.h
index 2a5b12f5b..3ac682c6b 100644
--- a/mkspecs/linux-icc/qplatformdefs.h
+++ b/mkspecs/linux-icc/qplatformdefs.h
@@ -5,22 +5,8 @@
#include "ntqglobal.h"
-// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
-
-// DNS system header files are a mess!
-// <resolv.h> includes <arpa/nameser.h>. <arpa/nameser.h> is using
-// 'u_char' and includes <sys/types.h>. Now the problem is that
-// <sys/types.h> defines 'u_char' only if __USE_BSD is defined.
-// __USE_BSD is defined in <features.h> if _BSD_SOURCE is defined.
-#ifndef _BSD_SOURCE
-# define _BSD_SOURCE
-#endif
-
-// 1) need to reset default environment if _BSD_SOURCE is defined
-// 2) need to specify POSIX thread interfaces explicitly in glibc 2.0
-// 3) it seems older glibc need this to include the X/Open stuff
-#ifndef _GNU_SOURCE
-# define _GNU_SOURCE
+#ifndef _DEFAULT_SOURCE
+# define _DEFAULT_SOURCE
#endif
#include <unistd.h>
diff --git a/mkspecs/linux-kcc/qplatformdefs.h b/mkspecs/linux-kcc/qplatformdefs.h
index a922042e8..33b44f963 100644
--- a/mkspecs/linux-kcc/qplatformdefs.h
+++ b/mkspecs/linux-kcc/qplatformdefs.h
@@ -5,22 +5,8 @@
#include "ntqglobal.h"
-// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
-
-// DNS system header files are a mess!
-// <resolv.h> includes <arpa/nameser.h>. <arpa/nameser.h> is using
-// 'u_char' and includes <sys/types.h>. Now the problem is that
-// <sys/types.h> defines 'u_char' only if __USE_BSD is defined.
-// __USE_BSD is defined in <features.h> if _BSD_SOURCE is defined.
-#ifndef _BSD_SOURCE
-# define _BSD_SOURCE
-#endif
-
-// 1) need to reset default environment if _BSD_SOURCE is defined
-// 2) need to specify POSIX thread interfaces explicitly in glibc 2.0
-// 3) it seems older glibc need this to include the X/Open stuff
-#ifndef _GNU_SOURCE
-# define _GNU_SOURCE
+#ifndef _DEFAULT_SOURCE
+# define _DEFAULT_SOURCE
#endif
#include <unistd.h>
diff --git a/mkspecs/linux-kylix/qplatformdefs.h b/mkspecs/linux-kylix/qplatformdefs.h
index 2a5b12f5b..3ac682c6b 100644
--- a/mkspecs/linux-kylix/qplatformdefs.h
+++ b/mkspecs/linux-kylix/qplatformdefs.h
@@ -5,22 +5,8 @@
#include "ntqglobal.h"
-// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
-
-// DNS system header files are a mess!
-// <resolv.h> includes <arpa/nameser.h>. <arpa/nameser.h> is using
-// 'u_char' and includes <sys/types.h>. Now the problem is that
-// <sys/types.h> defines 'u_char' only if __USE_BSD is defined.
-// __USE_BSD is defined in <features.h> if _BSD_SOURCE is defined.
-#ifndef _BSD_SOURCE
-# define _BSD_SOURCE
-#endif
-
-// 1) need to reset default environment if _BSD_SOURCE is defined
-// 2) need to specify POSIX thread interfaces explicitly in glibc 2.0
-// 3) it seems older glibc need this to include the X/Open stuff
-#ifndef _GNU_SOURCE
-# define _GNU_SOURCE
+#ifndef _DEFAULT_SOURCE
+# define _DEFAULT_SOURCE
#endif
#include <unistd.h>
diff --git a/mkspecs/linux-pgcc/qplatformdefs.h b/mkspecs/linux-pgcc/qplatformdefs.h
index 2a5b12f5b..3ac682c6b 100644
--- a/mkspecs/linux-pgcc/qplatformdefs.h
+++ b/mkspecs/linux-pgcc/qplatformdefs.h
@@ -5,22 +5,8 @@
#include "ntqglobal.h"
-// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
-
-// DNS system header files are a mess!
-// <resolv.h> includes <arpa/nameser.h>. <arpa/nameser.h> is using
-// 'u_char' and includes <sys/types.h>. Now the problem is that
-// <sys/types.h> defines 'u_char' only if __USE_BSD is defined.
-// __USE_BSD is defined in <features.h> if _BSD_SOURCE is defined.
-#ifndef _BSD_SOURCE
-# define _BSD_SOURCE
-#endif
-
-// 1) need to reset default environment if _BSD_SOURCE is defined
-// 2) need to specify POSIX thread interfaces explicitly in glibc 2.0
-// 3) it seems older glibc need this to include the X/Open stuff
-#ifndef _GNU_SOURCE
-# define _GNU_SOURCE
+#ifndef _DEFAULT_SOURCE
+# define _DEFAULT_SOURCE
#endif
#include <unistd.h>
diff --git a/src/3rdparty/libpng/pngconf.h b/src/3rdparty/libpng/pngconf.h
index bd5d1c430..19ccaf1e0 100644
--- a/src/3rdparty/libpng/pngconf.h
+++ b/src/3rdparty/libpng/pngconf.h
@@ -246,30 +246,8 @@
#endif
#ifdef PNG_SETJMP_SUPPORTED
-/* This is an attempt to force a single setjmp behaviour on Linux. If
- * the X config stuff didn't define _BSD_SOURCE we wouldn't need this.
- */
-
-# ifdef __linux__
-# ifdef _BSD_SOURCE
-# define PNG_SAVE_BSD_SOURCE
-# undef _BSD_SOURCE
-# endif
-# ifdef _SETJMP_H
- __png.h__ already includes setjmp.h;
- __dont__ include it again.;
-# endif
-# endif /* __linux__ */
-
/* include setjmp.h for error handling */
# include <setjmp.h>
-
-# ifdef __linux__
-# ifdef PNG_SAVE_BSD_SOURCE
-# define _BSD_SOURCE
-# undef PNG_SAVE_BSD_SOURCE
-# endif
-# endif /* __linux__ */
#endif /* PNG_SETJMP_SUPPORTED */
#ifdef BSD
diff --git a/src/moc/moc_yacc.cpp b/src/moc/moc_yacc.cpp
index 8ae53116a..d384e0baa 100644
--- a/src/moc/moc_yacc.cpp
+++ b/src/moc/moc_yacc.cpp
@@ -2117,7 +2117,7 @@ yystrlen (yystr)
# endif
# ifndef yystpcpy
-# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
+# if defined __GLIBC__ && defined _STRING_H && defined _DEFAULT_SOURCE
# define yystpcpy stpcpy
# else
/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in