Eneboo - Documentación para desarrolladores
src/qt/mkspecs/solaris-cc/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 #define _POSIX_PTHREAD_SEMANTICS
00010 
00011 #include <unistd.h>
00012 
00013 
00014 // We are hot - unistd.h should have turned on the specific APIs we requested
00015 
00016 
00017 #ifdef QT_THREAD_SUPPORT
00018 #include <pthread.h>
00019 #endif
00020 
00021 #include <dirent.h>
00022 #include <fcntl.h>
00023 #include <grp.h>
00024 #include <pwd.h>
00025 #include <signal.h>
00026 #include <dlfcn.h>
00027 
00028 #include <sys/types.h>
00029 #include <sys/ioctl.h>
00030 #include <sys/filio.h>
00031 #include <sys/ipc.h>
00032 #include <sys/time.h>
00033 #include <sys/shm.h>
00034 #include <sys/socket.h>
00035 #include <sys/stat.h>
00036 #include <sys/wait.h>
00037 
00038 // DNS header files are not fully covered by X/Open specifications.
00039 // In particular nothing is said about res_* :/
00040 // On Solaris header files <netinet/in.h> and <arpa/nameser.h> are not
00041 // included by <resolv.h>. Note that <arpa/nameser.h> must be included
00042 // before <resolv.h>.
00043 #include <netinet/in.h>
00044 #include <arpa/nameser.h>
00045 #include <resolv.h>
00046 
00047 
00048 #if !defined(QT_NO_COMPAT)
00049 #define QT_STATBUF              struct stat
00050 #define QT_STATBUF4TSTAT        struct stat
00051 #define QT_STAT                 ::stat
00052 #define QT_FSTAT                ::fstat
00053 #define QT_STAT_REG             S_IFREG
00054 #define QT_STAT_DIR             S_IFDIR
00055 #define QT_STAT_MASK            S_IFMT
00056 #define QT_STAT_LNK             S_IFLNK
00057 #define QT_FILENO               fileno
00058 #define QT_OPEN                 ::open
00059 #define QT_CLOSE                ::close
00060 #define QT_LSEEK                ::lseek
00061 #define QT_READ                 ::read
00062 #define QT_WRITE                ::write
00063 #define QT_ACCESS               ::access
00064 #define QT_GETCWD               ::getcwd
00065 #define QT_CHDIR                ::chdir
00066 #define QT_MKDIR                ::mkdir
00067 #define QT_RMDIR                ::rmdir
00068 #define QT_OPEN_RDONLY          O_RDONLY
00069 #define QT_OPEN_WRONLY          O_WRONLY
00070 #define QT_OPEN_RDWR            O_RDWR
00071 #define QT_OPEN_CREAT           O_CREAT
00072 #define QT_OPEN_TRUNC           O_TRUNC
00073 #define QT_OPEN_APPEND          O_APPEND
00074 #endif
00075 
00076 #define QT_SIGNAL_RETTYPE       void
00077 #define QT_SIGNAL_ARGS          int
00078 #define QT_SIGNAL_IGNORE        SIG_IGN
00079 
00080 #if !defined(_XOPEN_UNIX)
00081 // Function usleep() is defined in C library but not declared in header files
00082 // on Solaris 2.5.1. Not really a surprise, usleep() is specified by XPG4v2
00083 // and XPG4v2 is only supported by Solaris 2.6 and better.
00084 // Function gethostname() is defined in C library but not declared in <unistd.h>
00085 // on Solaris 2.5.1.
00086 // So we are trying to detect Solaris 2.5.1 using macro _XOPEN_UNIX which is
00087 // not defined by <unistd.h> when XPG4v2 is not supported.
00088 typedef unsigned int useconds_t;
00089 extern "C" int usleep(useconds_t);
00090 extern "C" int gethostname(char *, int);
00091 #endif
00092 
00093 #if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE-0 >= 500) && (_XOPEN_VERSION-0 >= 500)
00094 // on Solaris 7 and better with specific feature test macros
00095 #define QT_SOCKLEN_T            socklen_t
00096 #elif defined(_XOPEN_SOURCE_EXTENDED) && (_XOPEN_VERSION-0 >= 4)
00097 // on Solaris 2.6 and better with specific feature test macros
00098 #define QT_SOCKLEN_T            size_t
00099 #else
00100 // always this case in practice
00101 #define QT_SOCKLEN_T            int
00102 #endif
00103 
00104 #if defined(_XOPEN_UNIX)
00105 // Supported by Solaris 2.6 and better.  XPG4v2 and XPG4v2 is also supported
00106 // by Solaris 2.6 and better.  So we are trying to detect Solaris 2.6 using
00107 // macro _XOPEN_UNIX which is not defined by <unistd.h> when XPG4v2 is not
00108 // supported.
00109 #define QT_SNPRINTF             ::snprintf
00110 #define QT_VSNPRINTF            ::vsnprintf
00111 #endif
00112 
00113 
00114 #endif // QPLATFORMDEFS_H
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'