xrootd
XrdPosixOsDep.hh
Go to the documentation of this file.
1 #ifndef __XRDPOSIXOSDEP_H__
2 #define __XRDPOSIXOSDEP_H__
3 /******************************************************************************/
4 /* */
5 /* X r d P o s i x O s D e p . h h */
6 /* */
7 /* (c) 2005 by the Board of Trustees of the Leland Stanford, Jr., University */
8 /* All Rights Reserved */
9 /* Produced by Andrew Hanushevsky for Stanford University under contract */
10 /* DE-AC02-76-SFO0515 with the Department of Energy */
11 /* Modified by Frank Winklmeier to add the full Posix file system definition. */
12 /******************************************************************************/
13 
14 // $Id$
15 
16 // Solaris does not have a statfs64 structure. So all interfaces use statfs.
17 //
18 #ifdef __solaris__
19 #define statfs64 statfs
20 #endif
21 
22 // We need to avoid using dirent64 for MacOS platforms. We would normally
23 // include XrdSysPlatform.hh for this but this include file needs to be
24 // standalone. So, we replicate the dirent64 redefinition here, Additionally,
25 // off64_t, normally defined in Solaris and Linux, is cast as long long (the
26 // appropriate type for the next 25 years). The Posix interface only supports
27 // 64-bit offsets.
28 //
29 #if defined(__macos__)
30 #if !defined(dirent64)
31 #define dirent64 dirent
32 #endif
33 #if !defined(off64_t)
34 #define off64_t long long
35 #endif
36 
37 #if defined(__DARWIN_VERS_1050) && !__DARWIN_VERS_1050
38 #if !defined(stat64)
39 #define stat64 stat
40 #endif
41 #if !defined(statfs64)
42 #define statfs64 statfs
43 #endif
44 #endif
45 
46 #if !defined(statvfs64)
47 #define statvfs64 statvfs
48 #endif
49 #define ELIBACC ESHLIBVERS
50 #endif
51 
52 #ifdef __FreeBSD__
53 #define dirent64 dirent
54 #define ELIBACC EFTYPE
55 #endif
56 
57 #endif