2022-05-10 10:06:48 +00:00
|
|
|
// Copyright (C) 2016 The Qt Company Ltd.
|
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
2011-04-27 10:05:43 +00:00
|
|
|
|
|
|
|
#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
|
|
|
|
// 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
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <unistd.h>
|
|
|
|
|
|
|
|
|
|
|
|
// We are hot - unistd.h should have turned on the specific APIs we requested
|
|
|
|
|
|
|
|
|
2019-01-27 12:54:06 +00:00
|
|
|
#include <features.h>
|
2011-04-27 10:05:43 +00:00
|
|
|
#include <pthread.h>
|
|
|
|
#include <dirent.h>
|
|
|
|
#include <fcntl.h>
|
|
|
|
#include <grp.h>
|
|
|
|
#include <pwd.h>
|
|
|
|
#include <signal.h>
|
|
|
|
#include <dlfcn.h>
|
|
|
|
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <sys/ioctl.h>
|
|
|
|
#include <sys/ipc.h>
|
|
|
|
#include <sys/time.h>
|
|
|
|
#include <sys/shm.h>
|
|
|
|
#include <sys/socket.h>
|
|
|
|
#include <sys/stat.h>
|
|
|
|
#include <sys/wait.h>
|
|
|
|
#include <netinet/in.h>
|
|
|
|
|
2022-01-31 20:36:59 +00:00
|
|
|
#define QT_USE_XOPEN_LFS_EXTENSIONS
|
2011-04-27 10:05:43 +00:00
|
|
|
#include "../common/posix/qplatformdefs.h"
|
|
|
|
|
|
|
|
#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
|
2014-01-13 14:48:44 +00:00
|
|
|
#define QT_SNPRINTF ::snprintf
|
|
|
|
#define QT_VSNPRINTF ::vsnprintf
|
2011-04-27 10:05:43 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif // QPLATFORMDEFS_H
|