diff options
author | Liang Qi <liang.qi@qt.io> | 2016-06-13 09:01:02 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2016-06-13 12:46:46 +0200 |
commit | 511790fd1af1e2886a0e2e8dd4308099705cd815 (patch) | |
tree | b42aee537a6103cd064f9f41ae2889b09b79fd23 /src/3rdparty | |
parent | 1542d8881fc5ccbc5918cd4acbe4091ebbd24508 (diff) | |
parent | cbe332405aa22257d432f1797b325f5e57007c20 (diff) |
Merge remote-tracking branch 'origin/5.7' into dev
Conflicts:
config_help.txt
configure
mkspecs/features/uikit/sdk.prf
src/corelib/global/qhooks.cpp
src/corelib/io/qfilesystemwatcher.cpp
src/corelib/io/qlockfile_unix.cpp
src/corelib/tools/qalgorithms.h
src/gui/kernel/qwindowsysteminterface.h
src/gui/text/qtextdocument_p.cpp
src/network/access/access.pri
src/network/access/qnetworkaccessmanager.cpp
src/network/access/qnetworkreplynsurlconnectionimpl.mm
src/src.pro
src/testlib/qtestcase.cpp
src/widgets/kernel/qwidgetbackingstore_p.h
src/widgets/styles/qwindowscestyle.cpp
src/widgets/styles/qwindowsmobilestyle.cpp
tests/auto/corelib/io/qdiriterator/qdiriterator.pro
tests/auto/corelib/io/qfileinfo/qfileinfo.pro
tests/auto/gui/kernel/qwindow/BLACKLIST
tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp
tools/configure/configureapp.cpp
Change-Id: Ibf7fb9c8cf263a810ade82f821345d0725c57c67
Diffstat (limited to 'src/3rdparty')
-rw-r--r-- | src/3rdparty/forkfd/forkfd.c | 46 | ||||
-rw-r--r-- | src/3rdparty/freetype/freetype.pro | 9 | ||||
-rw-r--r-- | src/3rdparty/libpng.pri | 21 | ||||
-rw-r--r-- | src/3rdparty/libpng/libpng.pro | 31 | ||||
-rw-r--r-- | src/3rdparty/png_dependency.pri | 3 |
5 files changed, 78 insertions, 32 deletions
diff --git a/src/3rdparty/forkfd/forkfd.c b/src/3rdparty/forkfd/forkfd.c index ad05ab1a01..7b711e197b 100644 --- a/src/3rdparty/forkfd/forkfd.c +++ b/src/3rdparty/forkfd/forkfd.c @@ -30,6 +30,9 @@ #include "forkfd.h" #include <sys/types.h> +#if defined(__OpenBSD__) || defined(__NetBSD__) +# include <sys/param.h> +#endif #include <sys/time.h> #include <sys/resource.h> #include <sys/wait.h> @@ -65,7 +68,9 @@ # undef HAVE_WAITID #endif -#if defined(__FreeBSD__) && defined(__FreeBSD_version) && __FreeBSD_version >= 1000032 +#if (defined(__FreeBSD__) && defined(__FreeBSD_version) && __FreeBSD_version >= 1000032) || \ + (defined(__OpenBSD__) && OpenBSD >= 201505) || \ + (defined(__NetBSD__) && __NetBSD_Version__ >= 600000000) # define HAVE_PIPE2 1 #endif #if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__FreeBSD_kernel__) || \ @@ -410,6 +415,26 @@ chain_handler: old_sigaction.sa_handler(signum); } +static void ignore_sigpipe() +{ +#ifdef O_NOSIGPIPE + static ffd_atomic_int done = FFD_ATOMIC_INIT(0); + if (ffd_atomic_load(&done, FFD_ATOMIC_RELAXED)) + return; +#endif + + struct sigaction action; + memset(&action, 0, sizeof action); + sigemptyset(&action.sa_mask); + action.sa_handler = SIG_IGN; + action.sa_flags = 0; + sigaction(SIGPIPE, &action, NULL); + +#ifdef O_NOSIGPIPE + ffd_atomic_store(&done, 1, FFD_ATOMIC_RELAXED); +#endif +} + static void forkfd_initialize() { #if defined(HAVE_BROKEN_WAITID) @@ -446,6 +471,11 @@ static void forkfd_initialize() */ sigaction(SIGCHLD, &action, &old_sigaction); +#ifndef O_NOSIGPIPE + /* disable SIGPIPE too */ + ignore_sigpipe(); +#endif + #ifndef __GNUC__ atexit(cleanup); #endif @@ -486,13 +516,23 @@ static void cleanup() static int create_pipe(int filedes[], int flags) { - int ret; + int ret = -1; #ifdef HAVE_PIPE2 /* use pipe2(2) whenever possible, since it can thread-safely create a * cloexec pair of pipes. Without it, we have a race condition setting * FD_CLOEXEC */ - ret = pipe2(filedes, O_CLOEXEC); + +# ifdef O_NOSIGPIPE + /* try first with O_NOSIGPIPE */ + ret = pipe2(filedes, O_CLOEXEC | O_NOSIGPIPE); + if (ret == -1) { + /* O_NOSIGPIPE not supported, ignore SIGPIPE */ + ignore_sigpipe(); + } +# endif + if (ret == -1) + ret = pipe2(filedes, O_CLOEXEC); if (ret == -1) return ret; diff --git a/src/3rdparty/freetype/freetype.pro b/src/3rdparty/freetype/freetype.pro index e85ed1699b..41ca469576 100644 --- a/src/3rdparty/freetype/freetype.pro +++ b/src/3rdparty/freetype/freetype.pro @@ -68,12 +68,7 @@ DEFINES += FT2_BUILD_LIBRARY DEFINES += FT_CONFIG_OPTION_SYSTEM_ZLIB include(../zlib_dependency.pri) -contains(QT_CONFIG, system-png) { - DEFINES += FT_CONFIG_OPTION_USE_PNG - include($$PWD/../png_dependency.pri) -} else:!contains(QT_CONFIG, no-png):!win32 { - DEFINES += FT_CONFIG_OPTION_USE_PNG - include($$PWD/../libpng.pri) -} +DEFINES += FT_CONFIG_OPTION_USE_PNG +include($$PWD/../png_dependency.pri) DEFINES += TT_CONFIG_OPTION_SUBPIXEL_HINTING diff --git a/src/3rdparty/libpng.pri b/src/3rdparty/libpng.pri deleted file mode 100644 index a5fe32f867..0000000000 --- a/src/3rdparty/libpng.pri +++ /dev/null @@ -1,21 +0,0 @@ -DEFINES += PNG_ARM_NEON_OPT=0 -INCLUDEPATH += $$PWD/libpng -SOURCES += $$PWD/libpng/png.c \ - $$PWD/libpng/pngerror.c \ - $$PWD/libpng/pngget.c \ - $$PWD/libpng/pngmem.c \ - $$PWD/libpng/pngpread.c \ - $$PWD/libpng/pngread.c \ - $$PWD/libpng/pngrio.c \ - $$PWD/libpng/pngrtran.c \ - $$PWD/libpng/pngrutil.c \ - $$PWD/libpng/pngset.c \ - $$PWD/libpng/pngtrans.c \ - $$PWD/libpng/pngwio.c \ - $$PWD/libpng/pngwrite.c \ - $$PWD/libpng/pngwtran.c \ - $$PWD/libpng/pngwutil.c - -TR_EXCLUDE += $$PWD/* - -include($$PWD/zlib_dependency.pri) diff --git a/src/3rdparty/libpng/libpng.pro b/src/3rdparty/libpng/libpng.pro new file mode 100644 index 0000000000..ab6dd51e2b --- /dev/null +++ b/src/3rdparty/libpng/libpng.pro @@ -0,0 +1,31 @@ +TARGET = qtpng + +CONFIG += \ + static \ + hide_symbols \ + exceptions_off rtti_off warn_off \ + installed + +load(qt_helper_lib) + +DEFINES += PNG_ARM_NEON_OPT=0 +SOURCES += \ + png.c \ + pngerror.c \ + pngget.c \ + pngmem.c \ + pngpread.c \ + pngread.c \ + pngrio.c \ + pngrtran.c \ + pngrutil.c \ + pngset.c \ + pngtrans.c \ + pngwio.c \ + pngwrite.c \ + pngwtran.c \ + pngwutil.c + +TR_EXCLUDE += $$PWD/* + +include(../zlib_dependency.pri) diff --git a/src/3rdparty/png_dependency.pri b/src/3rdparty/png_dependency.pri index 78da861f77..eb32432b49 100644 --- a/src/3rdparty/png_dependency.pri +++ b/src/3rdparty/png_dependency.pri @@ -2,5 +2,6 @@ contains(QT_CONFIG, system-png) { unix|mingw: LIBS_PRIVATE += -lpng else: LIBS += libpng.lib } else: contains(QT_CONFIG, png) { - include($$PWD/libpng.pri) + INCLUDEPATH += $$PWD/libpng + LIBS_PRIVATE += -L$$QT_BUILD_TREE/lib -lqtpng$$qtPlatformTargetSuffix() } |