Chameleon

Chameleon Svn Source Tree

Root/branches/xZenu/src/util/doxygen/qtools/qfiledefs_p.h

Source at commit 1322 created 12 years 8 months ago.
By meklort, Add doxygen to utils folder
1/****************************************************************************
2**
3**
4** Common macros and system include files for QFile, QFileInfo and QDir.
5**
6** Created : 930812
7**
8** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
9**
10** This file is part of the tools module of the Qt GUI Toolkit.
11**
12** This file may be distributed under the terms of the Q Public License
13** as defined by Trolltech AS of Norway and appearing in the file
14** LICENSE.QPL included in the packaging of this file.
15**
16** This file may be distributed and/or modified under the terms of the
17** GNU General Public License version 2 as published by the Free Software
18** Foundation and appearing in the file LICENSE.GPL included in the
19** packaging of this file.
20**
21** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
22** licenses may use this file in accordance with the Qt Commercial License
23** Agreement provided with the Software.
24**
25** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
26** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
27**
28** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
29** information about Qt Commercial License Agreements.
30** See http://www.trolltech.com/qpl/ for QPL licensing information.
31** See http://www.trolltech.com/gpl/ for GPL licensing information.
32**
33** Contact info@trolltech.com if any conditions of this licensing are
34** not clear to you.
35**
36**********************************************************************/
37
38#ifndef QFILEDEFS_P_H
39#define QFILEDEFS_P_H
40
41
42//
43// W A R N I N G
44// -------------
45//
46// This file is not part of the Qt API. It exists for the convenience
47// of qfile.cpp, qfileinfo.cpp and qdir.cpp.
48// This header file may change from version to version without notice,
49// or even be removed.
50//
51//
52#if defined(_CC_MWERKS_)
53# include <stdlib.h>
54# include <stat.h>
55#elif !defined(_OS_MAC_)
56# include <sys/types.h>
57# include <sys/stat.h>
58#elif defined(_OS_MAC_)
59# include <sys/types.h>
60# include <sys/stat.h>
61# define _OS_UNIX_
62#endif
63#include <fcntl.h>
64#include <errno.h>
65#if defined(_OS_UNIX_)
66# include <dirent.h>
67# include <unistd.h>
68#endif
69#if defined(_OS_MSDOS_) || defined(_OS_WIN32_) || defined(_OS_OS2_)
70# define _OS_FATFS_
71# if defined(__CYGWIN32__)
72# include <dirent.h>
73# include <unistd.h>
74# if !defined(_OS_UNIX_)
75# define _OS_UNIX_
76# endif
77# else
78# include <io.h>
79# if !defined(_CC_MWERKS_)
80# include <dos.h>
81# endif
82# include <direct.h>
83# endif
84#endif
85#include <limits.h>
86
87
88#if !defined(PATH_MAX)
89#if defined( MAXPATHLEN )
90#define PATH_MAX MAXPATHLEN
91#else
92#define PATH_MAX 1024
93#endif
94#endif
95
96
97#undef STATBUF
98#undef STAT
99#undef STAT_REG
100#undef STAT_DIR
101#undef STAT_LNK
102#undef STAT_MASK
103#undef FILENO
104#undef OPEN
105#undef CLOSE
106#undef LSEEK
107#undef READ
108#undef WRITE
109#undef ACCESS
110#undef GETCWD
111#undef CHDIR
112#undef MKDIR
113#undef RMDIR
114#undef OPEN_RDONLY
115#undef OPEN_WRONLY
116#undef OPEN_CREAT
117#undef OPEN_TRUNC
118#undef OPEN_APPEND
119#undef OPEN_TEXT
120#undef OPEN_BINARY
121
122
123#if defined(_CC_MSVC_) || defined(_CC_SYM_)
124
125# define STATBUFstruct _stat// non-ANSI defs
126# define STATBUF4TSTATstruct _stat// non-ANSI defs
127# define STAT::_stat
128# define FSTAT::_fstat
129# define STAT_REG_S_IFREG
130# define STAT_DIR_S_IFDIR
131# define STAT_MASK_S_IFMT
132# if defined(_S_IFLNK)
133# define STAT_LNK_S_IFLNK
134# endif
135# define FILENO_fileno
136# define OPEN::_open
137# define CLOSE::_close
138# define LSEEK::_lseek
139# define READ::_read
140# define WRITE::_write
141# define ACCESS::_access
142# define GETCWD::_getcwd
143# define CHDIR::_chdir
144# define MKDIR::_mkdir
145# define RMDIR::_rmdir
146# define OPEN_RDONLY_O_RDONLY
147# define OPEN_WRONLY_O_WRONLY
148# define OPEN_RDWR_O_RDWR
149# define OPEN_CREAT_O_CREAT
150# define OPEN_TRUNC_O_TRUNC
151# define OPEN_APPEND_O_APPEND
152# if defined(O_TEXT)
153# define OPEN_TEXT_O_TEXT
154# define OPEN_BINARY_O_BINARY
155# endif
156
157#elif defined(_CC_BOR_) && __BORLANDC__ >= 0x550
158
159# define STATBUFstruct stat// non-ANSI defs
160# define STATBUF4TSTATstruct _stat// non-ANSI defs
161# define STAT::stat
162# define FSTAT::fstat
163# define STAT_REG_S_IFREG
164# define STAT_DIR_S_IFDIR
165# define STAT_MASK_S_IFMT
166# if defined(_S_IFLNK)
167# define STAT_LNK_S_IFLNK
168# endif
169# define FILENO_fileno
170# define OPEN::open
171# define CLOSE::_close
172# define LSEEK::_lseek
173# define READ::_read
174# define WRITE::_write
175# define ACCESS::_access
176# define GETCWD::_getcwd
177# define CHDIR::chdir
178# define MKDIR::_mkdir
179# define RMDIR::_rmdir
180# define OPEN_RDONLY_O_RDONLY
181# define OPEN_WRONLY_O_WRONLY
182# define OPEN_RDWR_O_RDWR
183# define OPEN_CREAT_O_CREAT
184# define OPEN_TRUNC_O_TRUNC
185# define OPEN_APPEND_O_APPEND
186# if defined(O_TEXT)
187# define OPEN_TEXT_O_TEXT
188# define OPEN_BINARY_O_BINARY
189# endif
190
191#else// all other systems
192
193# define STATBUFstruct stat
194# define STATBUF4TSTATstruct stat
195# define STAT::stat
196# define FSTAT::fstat
197# define STAT_REGS_IFREG
198# define STAT_DIRS_IFDIR
199# define STAT_MASKS_IFMT
200# if defined(S_IFLNK)
201# define STAT_LNKS_IFLNK
202# endif
203# define FILENOfileno
204# define OPEN::open
205# define CLOSE::close
206# define LSEEK::lseek
207# define READ::read
208# define WRITE::write
209# define ACCESS::access
210# if defined(_OS_OS2EMX_)
211# define GETCWD::_getcwd2
212# define CHDIR::_chdir2
213# else
214# define GETCWD::getcwd
215# define CHDIR::chdir
216# endif
217# define MKDIR::mkdir
218# define RMDIR::rmdir
219# define OPEN_RDONLYO_RDONLY
220# define OPEN_WRONLYO_WRONLY
221# define OPEN_RDWRO_RDWR
222# define OPEN_CREATO_CREAT
223# define OPEN_TRUNCO_TRUNC
224# define OPEN_APPENDO_APPEND
225# if defined(O_TEXT)
226# define OPEN_TEXTO_TEXT
227# define OPEN_BINARYO_BINARY
228# endif
229#endif
230
231#if defined(_CC_MWERKS_)
232#undef mkdir
233#undef MKDIR
234#define MKDIR _mkdir
235#undef rmdir
236#undef RMDIR
237#define RMDIR _rmdir
238#endif
239
240
241#if defined(_OS_FATFS_)
242# define F_OK0
243# define X_OK1
244# define W_OK2
245# define R_OK4
246#endif
247
248#if defined(_OS_MAC_) && !defined(_OS_UNIX_)
249# define F_OK0
250# define X_OK1
251# define W_OK2
252# define R_OK4
253#endif
254
255struct QFileInfoCache
256{
257 STATBUF st;
258 bool isSymLink;
259};
260
261#endif
262

Archive Download this file

Revision: 1322