summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2018-10-08 20:42:42 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2018-10-08 20:42:42 +0900
commitc485764cd4d94f272538d7228373fb039f427265 (patch)
tree09553f478c1b2d73ab180db1e34751318c195923
parent230ed5e400ea4276d927570a7781cfcb5c7a534a (diff)
downloadqt3-c485764cd4d94f272538d7228373fb039f427265.tar.gz
qt3-c485764cd4d94f272538d7228373fb039f427265.zip
Replaced _BSD_SOURCE, _SVID_SOURCE, _GNU_SOURCE with _DEFAULT_SOURCE.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
-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 bc04a69..5a4f5e6 100644
--- a/mkspecs/cygwin-g++/qplatformdefs.h
+++ b/mkspecs/cygwin-g++/qplatformdefs.h
@@ -5,22 +5,8 @@
#include "qglobal.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 bf750e5..9f5b15f 100644
--- a/mkspecs/hurd-g++/qplatformdefs.h
+++ b/mkspecs/hurd-g++/qplatformdefs.h
@@ -5,22 +5,8 @@
#include "qglobal.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 42a0e47..15bb469 100644
--- a/mkspecs/linux-clang/qplatformdefs.h
+++ b/mkspecs/linux-clang/qplatformdefs.h
@@ -5,22 +5,8 @@
#include "qglobal.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 e25bc1e..2bf855b 100644
--- a/mkspecs/linux-cxx/qplatformdefs.h
+++ b/mkspecs/linux-cxx/qplatformdefs.h
@@ -5,22 +5,8 @@
#include "qglobal.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 e25bc1e..2bf855b 100644
--- a/mkspecs/linux-ecc-64/qplatformdefs.h
+++ b/mkspecs/linux-ecc-64/qplatformdefs.h
@@ -5,22 +5,8 @@
#include "qglobal.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 e25bc1e..fcf7631 100644
--- a/mkspecs/linux-g++-32/qplatformdefs.h
+++ b/mkspecs/linux-g++-32/qplatformdefs.h
@@ -1,26 +1,5 @@
-#ifndef QPLATFORMDEFS_H
-#define QPLATFORMDEFS_H
-
-// Get Qt defines/settings
-
-#include "qglobal.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 e25bc1e..2bf855b 100644
--- a/mkspecs/linux-g++-64/qplatformdefs.h
+++ b/mkspecs/linux-g++-64/qplatformdefs.h
@@ -5,22 +5,8 @@
#include "qglobal.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 42a0e47..15bb469 100644
--- a/mkspecs/linux-g++-sparc/qplatformdefs.h
+++ b/mkspecs/linux-g++-sparc/qplatformdefs.h
@@ -5,22 +5,8 @@
#include "qglobal.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 42a0e47..15bb469 100644
--- a/mkspecs/linux-g++/qplatformdefs.h
+++ b/mkspecs/linux-g++/qplatformdefs.h
@@ -5,22 +5,8 @@
#include "qglobal.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 e25bc1e..2bf855b 100644
--- a/mkspecs/linux-icc/qplatformdefs.h
+++ b/mkspecs/linux-icc/qplatformdefs.h
@@ -5,22 +5,8 @@
#include "qglobal.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 9df75e3..7811a12 100644
--- a/mkspecs/linux-kcc/qplatformdefs.h
+++ b/mkspecs/linux-kcc/qplatformdefs.h
@@ -5,22 +5,8 @@
#include "qglobal.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 e25bc1e..2bf855b 100644
--- a/mkspecs/linux-kylix/qplatformdefs.h
+++ b/mkspecs/linux-kylix/qplatformdefs.h
@@ -5,22 +5,8 @@
#include "qglobal.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 e25bc1e..2bf855b 100644
--- a/mkspecs/linux-pgcc/qplatformdefs.h
+++ b/mkspecs/linux-pgcc/qplatformdefs.h
@@ -5,22 +5,8 @@
#include "qglobal.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 bd5d1c4..19ccaf1 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 bf152b3..2ab0be7 100644
--- a/src/moc/moc_yacc.cpp
+++ b/src/moc/moc_yacc.cpp
@@ -2112,7 +2112,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