00001 #ifndef QPLATFORMDEFS_H
00002 #define QPLATFORMDEFS_H
00003
00004
00005
00006 #include "qglobal.h"
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef _BSD_SOURCE
00016 # define _BSD_SOURCE
00017 #endif
00018
00019
00020
00021
00022 #ifndef _GNU_SOURCE
00023 # define _GNU_SOURCE
00024 #endif
00025
00026 #include <unistd.h>
00027
00028
00029
00030
00031
00032 #ifdef QT_THREAD_SUPPORT
00033 #include <pthread.h>
00034 #endif
00035
00036 #include <dirent.h>
00037 #include <fcntl.h>
00038 #include <grp.h>
00039 #include <pwd.h>
00040 #include <signal.h>
00041 #include <dlfcn.h>
00042
00043 #include <sys/types.h>
00044 #include <sys/ioctl.h>
00045 #include <sys/ipc.h>
00046 #include <sys/time.h>
00047 #include <sys/shm.h>
00048 #include <sys/socket.h>
00049 #include <sys/stat.h>
00050 #include <sys/wait.h>
00051
00052
00053
00054
00055
00056
00057 #include <netinet/in.h>
00058 #include <arpa/nameser.h>
00059 #include <resolv.h>
00060
00061
00062 #if !defined(QT_NO_COMPAT)
00063 #define QT_STATBUF struct stat
00064 #define QT_STATBUF4TSTAT struct stat
00065 #define QT_STAT ::stat
00066 #define QT_FSTAT ::fstat
00067 #define QT_STAT_REG S_IFREG
00068 #define QT_STAT_DIR S_IFDIR
00069 #define QT_STAT_MASK S_IFMT
00070 #define QT_STAT_LNK S_IFLNK
00071 #define QT_FILENO fileno
00072 #define QT_OPEN ::open
00073 #define QT_CLOSE ::close
00074 #define QT_LSEEK ::lseek
00075 #define QT_READ ::read
00076 #define QT_WRITE ::write
00077 #define QT_ACCESS ::access
00078 #define QT_GETCWD ::getcwd
00079 #define QT_CHDIR ::chdir
00080 #define QT_MKDIR ::mkdir
00081 #define QT_RMDIR ::rmdir
00082 #define QT_OPEN_RDONLY O_RDONLY
00083 #define QT_OPEN_WRONLY O_WRONLY
00084 #define QT_OPEN_RDWR O_RDWR
00085 #define QT_OPEN_CREAT O_CREAT
00086 #define QT_OPEN_TRUNC O_TRUNC
00087 #define QT_OPEN_APPEND O_APPEND
00088 #endif
00089
00090 #define QT_SIGNAL_RETTYPE void
00091 #define QT_SIGNAL_ARGS int
00092 #define QT_SIGNAL_IGNORE SIG_IGN
00093
00094 #if defined(__GLIBC__) && (__GLIBC__ >= 2)
00095 #define QT_SOCKLEN_T socklen_t
00096 #else
00097 #define QT_SOCKLEN_T int
00098 #endif
00099
00100 #if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
00101 #define QT_SNPRINTF ::snprintf
00102 #define QT_VSNPRINTF ::vsnprintf
00103 #endif
00104
00105
00106 #endif // QPLATFORMDEFS_H