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// First define the external interfaces (not C++ but OS compatabile)
40#include <dirent.h>
41#include "XrdPosixExtern.hh"
42
43// Then redefine them
44#define access(a,b) XrdPosix_Access(a,b)
45
46#define chdir(a) XrdPosix_Chdir(a)
47
48#define close(a) XrdPosix_Close(a)
49
50#define closedir(a) XrdPosix_Closedir(a)
51
52#define lseek(a,b,c) XrdPosix_Lseek(a,b,c)
53
54#define fopen(a,b) XrdPosix_Fopen(a,b)
55
56#define fread(b,s,n,f) XrdPosix_Fread(b,s,n,f)
57
58#define fseek(a,b,c) XrdPosix_Fseek(a,b,c)
59
60#define fseeko(a,b,c) XrdPosix_Fseeko(a,b,c)
61
62#define fstat(a,b) XrdPosix_Fstat(a,b)
63
64#define fsync(a) XrdPosix_Fsync(a)
65
66#define ftell(a) XrdPosix_Ftell(a)
67
68#define ftello(a) XrdPosix_Ftello(a)
69
70#define ftruncate(a,b) XrdPosix_Ftruncate(a,b)
71
72#define fwrite(b,s,n,f) XrdPosix_Fwrite(b,s,n,f)
73
74#define mkdir(a,b) XrdPosix_Mkdir(a,b)
75
76#define open XrdPosix_Open
77
78#define opendir(a) XrdPosix_Opendir(a)
79
80#define pread(a,b,c,d) XrdPosix_Pread(a,b,c,d)
81
82#define read(a,b,c) XrdPosix_Read(a,b,c)
83
84#define readv(a,b,c) XrdPosix_Readv(a,b,c)
85
86#define readdir(a) XrdPosix_Readdir(a)
87#define readdir64(a) XrdPosix_Readdir64(a)
88
89#define readdir_r(a,b,c) XrdPosix_Readdir_r(a,b,c)
90#define readdir64_r(a,b,c) XrdPosix_Readdir64_r(a,b,c)
91
92#define rename(a,b) XrdPosix_Rename(a,b)
93
94#undef rewinddir
95#define rewinddir(a) XrdPosix_Rewinddir(a)
96
97#define rmdir(a) XrdPosix_Rmdir(a)
98
99#define seekdir(a,b) XrdPosix_Seekdir(a,b)
100
101#define stat(a,b) XrdPosix_Stat(a,b)
102
103#define statfs(a,b) XrdPosix_Statfs(a,b)
104
105#define statvfs(a,b) XrdPosix_Statvfs(a,b)
106
107#define pwrite(a,b,c,d) XrdPosix_Pwrite(a,b,c,d)
108
109#define telldir(a) XrdPosix_Telldir(a)
110
111#define truncate(a,b) XrdPosix_Truncate(a,b)
112
113#define unlink(a) XrdPosix_Unlink(a)
114
115#define write(a,b,c) XrdPosix_Write(a,b,c)
116
117#define writev(a,b,c) XrdPosix_Writev(a,b,c)
118
119#endif