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