xrootd
Loading...
Searching...
No Matches
XrdPosix.hh
Go to the documentation of this file.
1#ifndef __XRDPOSIX_H__
2#define __XRDPOSIX_H__
3/******************************************************************************/
4/* */
5/* X r d P o s i x . 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/* */
12/* This file is part of the XRootD software suite. */
13/* */
14/* XRootD is free software: you can redistribute it and/or modify it under */
15/* the terms of the GNU Lesser General Public License as published by the */
16/* Free Software Foundation, either version 3 of the License, or (at your */
17/* option) any later version. */
18/* */
19/* XRootD is distributed in the hope that it will be useful, but WITHOUT */
20/* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or */
21/* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public */
22/* License for more details. */
23/* */
24/* You should have received a copy of the GNU Lesser General Public License */
25/* along with XRootD in a file called COPYING.LESSER (LGPL license) and file */
26/* COPYING (GPL license). If not, see <http://www.gnu.org/licenses/>. */
27/* */
28/* The copyright holder's institutional names and contributor's names may not */
29/* be used to endorse or promote products derived from this software without */
30/* specific prior written permission of the institution or contributor. */
31/* Modified by Frank Winklmeier to add the full Posix file system definition. */
32/******************************************************************************/
33
34// The following defines substitute our names for the common system names. We
35// would have liked to use wrappers but each platform uses a different mechanism
36// to accomplish this. So, redefinition is the most portable way of doing this.
37//
38
39#define access(a,b) XrdPosix_Access(a,b)
40
41#define chdir(a) XrdPosix_Chdir(a)
42
43#define close(a) XrdPosix_Close(a)
44
45#define closedir(a) XrdPosix_Closedir(a)
46
47#define lseek(a,b,c) XrdPosix_Lseek(a,b,c)
48
49#define fopen(a,b) XrdPosix_Fopen(a,b)
50
51#define fread(b,s,n,f) XrdPosix_Fread(b,s,n,f)
52
53#define fseek(a,b,c) XrdPosix_Fseek(a,b,c)
54
55#define fseeko(a,b,c) XrdPosix_Fseeko(a,b,c)
56
57#define fstat(a,b) XrdPosix_Fstat(a,b)
58
59#define fsync(a) XrdPosix_Fsync(a)
60
61#define ftell(a) XrdPosix_Ftell(a)
62
63#define ftello(a) XrdPosix_Ftello(a)
64
65#define ftruncate(a,b) XrdPosix_Ftruncate(a,b)
66
67#define fwrite(b,s,n,f) XrdPosix_Fwrite(b,s,n,f)
68
69#define mkdir(a,b) XrdPosix_Mkdir(a,b)
70
71#define open XrdPosix_Open
72
73#define opendir(a) XrdPosix_Opendir(a)
74
75#define pread(a,b,c,d) XrdPosix_Pread(a,b,c,d)
76
77#define read(a,b,c) XrdPosix_Read(a,b,c)
78
79#define readv(a,b,c) XrdPosix_Readv(a,b,c)
80
81#define readdir(a) XrdPosix_Readdir(a)
82#define readdir64(a) XrdPosix_Readdir64(a)
83
84#define readdir_r(a,b,c) XrdPosix_Readdir_r(a,b,c)
85#define readdir64_r(a,b,c) XrdPosix_Readdir64_r(a,b,c)
86
87#define rename(a,b) XrdPosix_Rename(a,b)
88
89#undef rewinddir
90#define rewinddir(a) XrdPosix_Rewinddir(a)
91
92#define rmdir(a) XrdPosix_Rmdir(a)
93
94#define seekdir(a,b) XrdPosix_Seekdir(a,b)
95
96#define stat(a,b) XrdPosix_Stat(a,b)
97
98#define statfs(a,b) XrdPosix_Statfs(a,b)
99
100#define statvfs(a,b) XrdPosix_Statvfs(a,b)
101
102#define pwrite(a,b,c,d) XrdPosix_Pwrite(a,b,c,d)
103
104#define telldir(a) XrdPosix_Telldir(a)
105
106#define truncate(a,b) XrdPosix_Truncate(a,b)
107
108#define unlink(a) XrdPosix_Unlink(a)
109
110#define write(a,b,c) XrdPosix_Write(a,b,c)
111
112#define writev(a,b,c) XrdPosix_Writev(a,b,c)
113
114// Now define the external interfaces (not C++ but OS compatabile)
115//
117
118#endif