00001 #ifndef __XRDPOSIXEXTERN_H__
00002 #define __XRDPOSIXEXTERN_H__
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052 #if (!defined(_LARGEFILE_SOURCE) || !defined(_LARGEFILE64_SOURCE) || \
00053 _FILE_OFFSET_BITS!=64) && !defined(XRDPOSIXPRELOAD32)
00054 #error Compilation options are incompatible with XrdPosixExtern.hh; \
00055 Specify -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
00056 #endif
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066 struct iovec;
00067 struct stat;
00068 struct statfs;
00069 struct statvfs;
00070
00071 #include <dirent.h>
00072 #include <stdio.h>
00073 #include <unistd.h>
00074 #include <sys/types.h>
00075
00076 #include "XrdPosix/XrdPosixOsDep.hh"
00077
00078 #ifdef __cplusplus
00079 extern "C"
00080 {
00081 #endif
00082 extern int XrdPosix_Access(const char *path, int amode);
00083
00084 extern int XrdPosix_Acl(const char *path, int cmd, int nentries,
00085 void *aclbufp);
00086
00087 extern int XrdPosix_Chdir(const char *path);
00088
00089 extern int XrdPosix_Close(int fildes);
00090
00091 extern int XrdPosix_Closedir(DIR *dirp);
00092
00093 extern int XrdPosix_Creat(const char *path, mode_t mode);
00094
00095 extern int XrdPosix_Fclose(FILE *stream);
00096
00097 extern int XrdPosix_Fcntl(int fd, int cmd, ...);
00098
00099 extern int XrdPosix_Fdatasync(int fildes);
00100
00101 extern int XrdPosix_Fflush(FILE *stream);
00102
00103 #ifdef __linux__
00104 extern long long XrdPosix_Fgetxattr (int fd, const char *name,
00105 void *value, unsigned long long size);
00106 #endif
00107
00108 extern FILE *XrdPosix_Fopen(const char *path, const char *mode);
00109
00110 extern size_t XrdPosix_Fread(void *ptr, size_t size, size_t nitems, FILE *stream);
00111
00112 extern int XrdPosix_Fseek(FILE *stream, long offset, int whence);
00113
00114 extern int XrdPosix_Fseeko(FILE *stream, long long offset, int whence);
00115
00116 extern int XrdPosix_Fstat(int fildes, struct stat *buf);
00117
00118 #ifdef __linux__
00119 extern int XrdPosix_FstatV(int ver, int fildes, struct stat *buf);
00120 #endif
00121
00122 extern int XrdPosix_Fsync(int fildes);
00123
00124 extern long XrdPosix_Ftell(FILE *stream);
00125
00126 extern long long XrdPosix_Ftello(FILE *stream);
00127
00128 extern int XrdPosix_Ftruncate(int fildes, long long offset);
00129
00130 extern size_t XrdPosix_Fwrite(const void *ptr, size_t size, size_t nitems, FILE *stream);
00131
00132 #ifdef __linux__
00133 extern long long XrdPosix_Getxattr (const char *path, const char *name,
00134 void *value, unsigned long long size);
00135
00136 extern long long XrdPosix_Lgetxattr(const char *path, const char *name,
00137 void *value, unsigned long long size);
00138 #endif
00139
00140 extern long long XrdPosix_Lseek(int fildes, long long offset, int whence);
00141
00142 extern int XrdPosix_Lstat(const char *path, struct stat *buf);
00143
00144 extern int XrdPosix_Mkdir(const char *path, mode_t mode);
00145
00146 extern int XrdPosix_Open(const char *path, int oflag, ...);
00147
00148 extern DIR* XrdPosix_Opendir(const char *path);
00149
00150 extern long XrdPosix_Pathconf(const char *path, int name);
00151
00152 extern long long XrdPosix_Pread(int fildes, void *buf, unsigned long long nbyte,
00153 long long offset);
00154
00155 extern long long XrdPosix_Read(int fildes, void *buf, unsigned long long nbyte);
00156
00157 extern long long XrdPosix_Readv(int fildes, const struct iovec *iov, int iovcnt);
00158
00159 extern struct dirent* XrdPosix_Readdir (DIR *dirp);
00160 extern struct dirent64* XrdPosix_Readdir64(DIR *dirp);
00161
00162 extern int XrdPosix_Readdir_r (DIR *dirp, struct dirent *entry, struct dirent **result);
00163 extern int XrdPosix_Readdir64_r(DIR *dirp, struct dirent64 *entry, struct dirent64 **result);
00164
00165 extern int XrdPosix_Rename(const char *oname, const char *nname);
00166
00167 extern void XrdPosix_Rewinddir(DIR *dirp);
00168
00169 extern int XrdPosix_Rmdir(const char *path);
00170
00171 extern void XrdPosix_Seekdir(DIR *dirp, long loc);
00172
00173 extern int XrdPosix_Stat(const char *path, struct stat *buf);
00174
00175 #if !defined(__solaris__)
00176 extern int XrdPosix_Statfs(const char *path, struct statfs *buf);
00177 #endif
00178
00179 extern int XrdPosix_Statvfs(const char *path, struct statvfs *buf);
00180
00181 extern long long XrdPosix_Pwrite(int fildes, const void *buf,
00182 unsigned long long nbyte, long long offset);
00183
00184 extern long XrdPosix_Telldir(DIR *dirp);
00185
00186 extern int XrdPosix_Truncate(const char *path, long long offset);
00187
00188 extern int XrdPosix_Unlink(const char *path);
00189
00190 extern long long XrdPosix_Write(int fildes, const void *buf,
00191 unsigned long long nbyte);
00192
00193 extern long long XrdPosix_Writev(int fildes, const struct iovec *iov, int iovcnt);
00194
00195 #ifdef __cplusplus
00196 };
00197 #endif
00198
00199
00200
00201 extern int XrdPosix_isMyPath(const char *path);
00202
00203 extern char *XrdPosix_URL(const char *path, char *buff, int blen);
00204
00205 #endif