Eneboo - Documentación para desarrolladores
|
00001 #ifndef QPLATFORMDEFS_H 00002 #define QPLATFORMDEFS_H 00003 00004 // Get Qt defines/settings 00005 00006 #include "qglobal.h" 00007 00008 // Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs 00009 00010 // DNS system header files are a mess! 00011 // <resolv.h> includes <arpa/nameser.h>. <arpa/nameser.h> is using 00012 // 'u_char' and includes <sys/types.h>. Now the problem is that 00013 // <sys/types.h> defines 'u_char' only if __USE_BSD is defined. 00014 // __USE_BSD is defined in <features.h> if _BSD_SOURCE is defined. 00015 #ifndef _BSD_SOURCE 00016 # define _BSD_SOURCE 00017 #endif 00018 00019 // 1) need to reset default environment if _BSD_SOURCE is defined 00020 // 2) need to specify POSIX thread interfaces explicitly in glibc 2.0 00021 // 3) it seems older glibc need this to include the X/Open stuff 00022 #ifndef _GNU_SOURCE 00023 # define _GNU_SOURCE 00024 #endif 00025 00026 #include <unistd.h> 00027 00028 00029 // We are hot - unistd.h should have turned on the specific APIs we requested 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 // KAI C++ has at the moment problems with unloading the Qt plugins. 00043 // So don't unload them as a workaround for now. 00044 #define QT_NO_LIBRARY_UNLOAD 00045 00046 #include <sys/types.h> 00047 #include <sys/ioctl.h> 00048 #include <sys/ipc.h> 00049 #include <sys/time.h> 00050 #include <sys/shm.h> 00051 #include <sys/socket.h> 00052 #include <sys/stat.h> 00053 #include <sys/wait.h> 00054 00055 // DNS header files are not fully covered by X/Open specifications. 00056 // In particular nothing is said about res_* :/ 00057 // Header files <netinet/in.h> and <arpa/nameser.h> are not included 00058 // by <resolv.h> on older versions of the GNU C library. Note that 00059 // <arpa/nameser.h> must be included before <resolv.h>. 00060 #include <netinet/in.h> 00061 #include <arpa/nameser.h> 00062 #include <resolv.h> 00063 00064 00065 #if !defined(QT_NO_COMPAT) 00066 #define QT_STATBUF struct stat 00067 #define QT_STATBUF4TSTAT struct stat 00068 #define QT_STAT ::stat 00069 #define QT_FSTAT ::fstat 00070 #define QT_STAT_REG S_IFREG 00071 #define QT_STAT_DIR S_IFDIR 00072 #define QT_STAT_MASK S_IFMT 00073 #define QT_STAT_LNK S_IFLNK 00074 #define QT_FILENO fileno 00075 #define QT_OPEN ::open 00076 #define QT_CLOSE ::close 00077 #define QT_LSEEK ::lseek 00078 #define QT_READ ::read 00079 #define QT_WRITE ::write 00080 #define QT_ACCESS ::access 00081 #define QT_GETCWD ::getcwd 00082 #define QT_CHDIR ::chdir 00083 #define QT_MKDIR ::mkdir 00084 #define QT_RMDIR ::rmdir 00085 #define QT_OPEN_RDONLY O_RDONLY 00086 #define QT_OPEN_WRONLY O_WRONLY 00087 #define QT_OPEN_RDWR O_RDWR 00088 #define QT_OPEN_CREAT O_CREAT 00089 #define QT_OPEN_TRUNC O_TRUNC 00090 #define QT_OPEN_APPEND O_APPEND 00091 #endif 00092 00093 #define QT_SIGNAL_RETTYPE void 00094 #define QT_SIGNAL_ARGS int 00095 #define QT_SIGNAL_IGNORE SIG_IGN 00096 00097 #if defined(__GLIBC__) && (__GLIBC__ >= 2) 00098 #define QT_SOCKLEN_T socklen_t 00099 #else 00100 #define QT_SOCKLEN_T int 00101 #endif 00102 00103 #if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500) 00104 #define QT_SNPRINTF ::snprintf 00105 #define QT_VSNPRINTF ::vsnprintf 00106 #endif 00107 00108 00109 #endif // QPLATFORMDEFS_H