summaryrefslogtreecommitdiff
path: root/qmake
authorllornkcor <llornkcor>2003-11-05 09:59:39 (UTC)
committer llornkcor <llornkcor>2003-11-05 09:59:39 (UTC)
commitd0e7b4f9da3275e6d2fb4dcc8e1b38a2117443f5 (patch) (unidiff)
tree8438fc469c6a900f45837d414d92b127932011dc /qmake
parent20e79a13c41a6403e42fcf4af8be5b509e4047a8 (diff)
downloadopie-d0e7b4f9da3275e6d2fb4dcc8e1b38a2117443f5.zip
opie-d0e7b4f9da3275e6d2fb4dcc8e1b38a2117443f5.tar.gz
opie-d0e7b4f9da3275e6d2fb4dcc8e1b38a2117443f5.tar.bz2
dont care.... this doesn't compile correctly, so I am adding this here. too bad if its not the correct one. it compiles.
Diffstat (limited to 'qmake') (more/less context) (ignore whitespace changes)
-rw-r--r--qmake/qplatformdefs.h106
1 files changed, 106 insertions, 0 deletions
diff --git a/qmake/qplatformdefs.h b/qmake/qplatformdefs.h
new file mode 100644
index 0000000..e25bc1e
--- a/dev/null
+++ b/qmake/qplatformdefs.h
@@ -0,0 +1,106 @@
1#ifndef QPLATFORMDEFS_H
2#define QPLATFORMDEFS_H
3
4// Get Qt defines/settings
5
6#include "qglobal.h"
7
8// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
9
10// DNS system header files are a mess!
11// <resolv.h> includes <arpa/nameser.h>. <arpa/nameser.h> is using
12// 'u_char' and includes <sys/types.h>. Now the problem is that
13// <sys/types.h> defines 'u_char' only if __USE_BSD is defined.
14// __USE_BSD is defined in <features.h> if _BSD_SOURCE is defined.
15#ifndef _BSD_SOURCE
16# define _BSD_SOURCE
17#endif
18
19// 1) need to reset default environment if _BSD_SOURCE is defined
20// 2) need to specify POSIX thread interfaces explicitly in glibc 2.0
21// 3) it seems older glibc need this to include the X/Open stuff
22#ifndef _GNU_SOURCE
23# define _GNU_SOURCE
24#endif
25
26#include <unistd.h>
27
28
29// We are hot - unistd.h should have turned on the specific APIs we requested
30
31
32#ifdef QT_THREAD_SUPPORT
33#include <pthread.h>
34#endif
35
36#include <dirent.h>
37#include <fcntl.h>
38#include <grp.h>
39#include <pwd.h>
40#include <signal.h>
41#include <dlfcn.h>
42
43#include <sys/types.h>
44#include <sys/ioctl.h>
45#include <sys/ipc.h>
46#include <sys/time.h>
47#include <sys/shm.h>
48#include <sys/socket.h>
49#include <sys/stat.h>
50#include <sys/wait.h>
51
52// DNS header files are not fully covered by X/Open specifications.
53// In particular nothing is said about res_* :/
54// Header files <netinet/in.h> and <arpa/nameser.h> are not included
55// by <resolv.h> on older versions of the GNU C library. Note that
56// <arpa/nameser.h> must be included before <resolv.h>.
57#include <netinet/in.h>
58#include <arpa/nameser.h>
59#include <resolv.h>
60
61
62#if !defined(QT_NO_COMPAT)
63 #define QT_STATBUF struct stat
64 #define QT_STATBUF4TSTATstruct stat
65 #define QT_STAT ::stat
66 #define QT_FSTAT ::fstat
67 #define QT_STAT_REG S_IFREG
68 #define QT_STAT_DIR S_IFDIR
69 #define QT_STAT_MASK S_IFMT
70 #define QT_STAT_LNK S_IFLNK
71 #define QT_FILENO fileno
72 #define QT_OPEN ::open
73 #define QT_CLOSE ::close
74 #define QT_LSEEK ::lseek
75 #define QT_READ ::read
76 #define QT_WRITE ::write
77 #define QT_ACCESS ::access
78 #define QT_GETCWD ::getcwd
79 #define QT_CHDIR ::chdir
80 #define QT_MKDIR ::mkdir
81 #define QT_RMDIR ::rmdir
82 #define QT_OPEN_RDONLY O_RDONLY
83 #define QT_OPEN_WRONLY O_WRONLY
84 #define QT_OPEN_RDWR O_RDWR
85 #define QT_OPEN_CREAT O_CREAT
86 #define QT_OPEN_TRUNC O_TRUNC
87 #define QT_OPEN_APPEND O_APPEND
88#endif
89
90 #define QT_SIGNAL_RETTYPEvoid
91 #define QT_SIGNAL_ARGS int
92 #define QT_SIGNAL_IGNORESIG_IGN
93
94#if defined(__GLIBC__) && (__GLIBC__ >= 2)
95 #define QT_SOCKLEN_T socklen_t
96#else
97 #define QT_SOCKLEN_T int
98#endif
99
100#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
101 #define QT_SNPRINTF ::snprintf
102 #define QT_VSNPRINTF ::vsnprintf
103#endif
104
105
106#endif // QPLATFORMDEFS_H