From dd9ac87532a88f504da33b53a9d50b355ed90440 Mon Sep 17 00:00:00 2001 From: Carlo Bramini Date: Wed, 1 Jan 2025 16:11:47 +0100 Subject: [PATCH] Fix broken qplatformdefs.h for cygwin-g++ platform This patch corrects several bugs into qplatformdefs.h for cygwin-g++: - _GNU_SOURCE must be the very first macro to be checked on top of the file. - features.h must be the one to be included for activating the needed functions, so I moved unistd.h near all other standard headers. - nowadays, CYGWIN supports sys/ipc.h and sys/shm.h by long time. Change-Id: Ib32df1746f1b5579698921641408d278104ce128 Reviewed-by: Thiago Macieira --- mkspecs/cygwin-g++/qplatformdefs.h | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/mkspecs/cygwin-g++/qplatformdefs.h b/mkspecs/cygwin-g++/qplatformdefs.h index 0f2a54b47ff..9356f40833e 100644 --- a/mkspecs/cygwin-g++/qplatformdefs.h +++ b/mkspecs/cygwin-g++/qplatformdefs.h @@ -4,10 +4,6 @@ #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 // 1) need to reset default environment if _BSD_SOURCE is defined @@ -17,11 +13,11 @@ # define _GNU_SOURCE #endif -#include +#include +// Get Qt defines/settings -// We are hot - unistd.h should have turned on the specific APIs we requested - +#include "qglobal.h" #include #include @@ -30,17 +26,16 @@ #include #include #include +#include #include #include -// Cygwin does not provide and because it -// doesn't support SysV IPC or shared memory. See for example: -// http://afni.nimh.nih.gov/afni/afniboard/messages/1725.html +#include +#include #include #include #include #include -//#include #include #define QT_NO_USE_FSEEKO