Eneboo - Documentación para desarrolladores
src/qt/mkspecs/cygwin-g++/qplatformdefs.h
Ir a la documentación de este archivo.
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 // Cygwin does not provide <sys/ipc.h> and <sys/shm.h> because it
00046 // doesn't support SysV IPC or shared memory. See for example:
00047 //      http://afni.nimh.nih.gov/afni/afniboard/messages/1725.html
00048 #include <sys/time.h>
00049 #include <sys/socket.h>
00050 #include <sys/stat.h>
00051 #include <sys/wait.h>
00052 #include <windows.h>
00053 
00054 // Resolver functions are not implemented in Cygwin, headers
00055 // <arpa/nameser.h> and <resolv.h> are missing:
00056 //      http://cygwin.com//cgi-bin/cygwin-todo.cgi?20000426.105252
00057 // Maybe bindlib_w32
00058 //      http://www.php.net/extra/bindlib_w32.zip
00059 // or Don Berstein's djbdns:
00060 //      http://cr.yp.to/djbdns.html
00061 // provide this functionality, but not necessarily under the Cygwin license...
00062 #include <netinet/in.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 #define QT_SOCKLEN_T            socklen_t
00098 
00099 #if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
00100 #define QT_SNPRINTF             ::snprintf
00101 #define QT_VSNPRINTF            ::vsnprintf
00102 #endif
00103 
00104 
00105 #endif // QPLATFORMDEFS_H
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'