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 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 // DNS header files are not fully covered by X/Open specifications. 00053 // In particular nothing is said about res_* :/ 00054 // Header files <netinet/in.h> and <arpa/nameser.h> are not included 00055 // by <resolv.h> on older versions of the GNU C library. Note that 00056 // <arpa/nameser.h> must be included before <resolv.h>. 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