XRootD
XrdPosixPreload.cc
Go to the documentation of this file.
1 /******************************************************************************/
2 /* */
3 /* X r d P o s i x P r e l o a d . c c */
4 /* */
5 /* (c) 2005 by the Board of Trustees of the Leland Stanford, Jr., University */
6 /* All Rights Reserved */
7 /* Produced by Andrew Hanushevsky for Stanford University under contract */
8 /* DE-AC02-76-SFO0515 with the Department of Energy */
9 /* */
10 /* This file is part of the XRootD software suite. */
11 /* */
12 /* XRootD is free software: you can redistribute it and/or modify it under */
13 /* the terms of the GNU Lesser General Public License as published by the */
14 /* Free Software Foundation, either version 3 of the License, or (at your */
15 /* option) any later version. */
16 /* */
17 /* XRootD is distributed in the hope that it will be useful, but WITHOUT */
18 /* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or */
19 /* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public */
20 /* License for more details. */
21 /* */
22 /* You should have received a copy of the GNU Lesser General Public License */
23 /* along with XRootD in a file called COPYING.LESSER (LGPL license) and file */
24 /* COPYING (GPL license). If not, see <http://www.gnu.org/licenses/>. */
25 /* */
26 /* The copyright holder's institutional names and contributor's names may not */
27 /* be used to endorse or promote products derived from this software without */
28 /* specific prior written permission of the institution or contributor. */
29 /******************************************************************************/
30 
31 #if defined(__clang__) && defined(_FORTIFY_SOURCE)
32 #undef _FORTIFY_SOURCE
33 #endif
34 
35 #include <sys/types.h>
36 #include <cstdarg>
37 #include <unistd.h>
38 #include <cstdlib>
39 
42 
43 /******************************************************************************/
44 /* P r e - D e c l a r a t i o n s */
45 /******************************************************************************/
46 
48 
49 #ifdef MUSL
50 #undef creat64
51 #undef fseeko64
52 #undef ftello64
53 #undef ftruncate64
54 #undef lseek64
55 #undef open64
56 #undef pread64
57 #undef pwrite64
58 #undef readdir64
59 #undef readdir64_r
60 #undef statfs64
61 #undef statvfs64
62 #undef truncate64
63 #endif
64 
65 /******************************************************************************/
66 /* G l o b a l D e c l a r a t i o n s */
67 /******************************************************************************/
68 
69 extern XrdPosixLinkage Xunix;
70 
71 namespace {bool isLite = (getenv("XRD_POSIX_PRELOAD_LITE") != 0);}
72 
73 /******************************************************************************/
74 /* a c c e s s */
75 /******************************************************************************/
76 
77 extern "C"
78 {
79 int access(const char *path, int amode)
80 {
81  static int Init = Xunix.Init(&Init);
82 
83  return XrdPosix_Access(path, amode);
84 }
85 }
86 
87 /******************************************************************************/
88 /* a c l */
89 /******************************************************************************/
90 
91 // This is a required addition for Solaris 10+ systems
92 
93 extern "C"
94 {
95 int acl(const char *path, int cmd, int nentries, void *aclbufp)
96 {
97  static int Init = Xunix.Init(&Init);
98 
99  return XrdPosix_Acl(path, cmd, nentries, aclbufp);
100 }
101 }
102 
103 /******************************************************************************/
104 /* c h d i r */
105 /******************************************************************************/
106 
107 extern "C"
108 {
109 int chdir(const char *path)
110 {
111  static int Init = Xunix.Init(&Init);
112 
113  return (isLite ? Xunix.Chdir(path) : XrdPosix_Chdir(path));
114 }
115 }
116 
117 /******************************************************************************/
118 /* c l o s e */
119 /******************************************************************************/
120 
121 extern "C"
122 {
123 int close(int fildes)
124 {
125  static int Init = Xunix.Init(&Init);
126 
127  return XrdPosix_Close(fildes);
128 }
129 }
130 
131 /******************************************************************************/
132 /* c l o s e d i r */
133 /******************************************************************************/
134 
135 extern "C"
136 {
137 int closedir(DIR *dirp)
138 {
139  static int Init = Xunix.Init(&Init);
140 
141  return (isLite ? Xunix.Closedir(dirp) : XrdPosix_Closedir(dirp));
142 }
143 }
144 
145 /******************************************************************************/
146 /* c r e a t */
147 /******************************************************************************/
148 
149 extern "C"
150 {
151 int creat64(const char *path, mode_t mode)
152 {
153  static int Init = Xunix.Init(&Init);
154 
155  return XrdPosix_Creat(path, mode);
156 }
157 }
158 
159 /******************************************************************************/
160 /* f c l o s e */
161 /******************************************************************************/
162 
163 extern "C"
164 {
165 int fclose(FILE *stream)
166 {
167  static int Init = Xunix.Init(&Init);
168 
169  return XrdPosix_Fclose(stream);
170 }
171 }
172 
173 /******************************************************************************/
174 /* f c n t l 6 4 */
175 /******************************************************************************/
176 
177 extern "C"
178 {
179 int fcntl64(int fd, int cmd, ...)
180 {
181  static int Init = Xunix.Init(&Init);
182  va_list ap;
183  void *theArg;
184 
185  va_start(ap, cmd);
186  theArg = va_arg(ap, void *);
187  va_end(ap);
188  return XrdPosix_Fcntl(fd, cmd, theArg);
189 }
190 }
191 
192 /******************************************************************************/
193 /* f d a t a s y n c */
194 /******************************************************************************/
195 // On Mac it is the same as fsync
196 #if !defined(__APPLE__)
197 extern "C"
198 {
199 int fdatasync(int fildes)
200 {
201  static int Init = Xunix.Init(&Init);
202 
203  return XrdPosix_Fdatasync(fildes);
204 }
205 }
206 #endif
207 
208 /******************************************************************************/
209 /* f f l u s h */
210 /******************************************************************************/
211 
212 extern "C"
213 {
214 int fflush(FILE *stream)
215 {
216  static int Init = Xunix.Init(&Init);
217 
218  return XrdPosix_Fflush(stream);
219 }
220 }
221 
222 /******************************************************************************/
223 /* f o p e n */
224 /******************************************************************************/
225 
226 extern "C"
227 {
228 FILE *fopen64(const char *path, const char *mode)
229 {
230  static int Init = Xunix.Init(&Init);
231 
232  return XrdPosix_Fopen(path, mode);
233 }
234 }
235 
236 /******************************************************************************/
237 /* f r e a d */
238 /******************************************************************************/
239 
240 extern "C"
241 {
242 size_t fread(void *ptr, size_t size, size_t nitems, FILE *stream)
243 {
244  static int Init = Xunix.Init(&Init);
245 
246  return XrdPosix_Fread(ptr, size, nitems, stream);
247 }
248 }
249 
250 /******************************************************************************/
251 /* f s e e k */
252 /******************************************************************************/
253 
254 extern "C"
255 {
256 int fseek(FILE *stream, long offset, int whence)
257 {
258  static int Init = Xunix.Init(&Init);
259 
260  return XrdPosix_Fseek(stream, offset, whence);
261 }
262 }
263 
264 /******************************************************************************/
265 /* f s e e k o */
266 /******************************************************************************/
267 
268 extern "C"
269 {
270 int fseeko64(FILE *stream, off64_t offset, int whence)
271 {
272  static int Init = Xunix.Init(&Init);
273 
274  return XrdPosix_Fseeko(stream, offset, whence);
275 }
276 }
277 
278 /******************************************************************************/
279 /* f s t a t */
280 /******************************************************************************/
281 
282 extern "C"
283 {
284 #if defined(__linux__) and defined(_STAT_VER) and __GNUC__ and __GNUC__ >= 2
285 int __fxstat64(int ver, int fildes, struct stat64 *buf)
286 #else
287 int fstat64( int fildes, struct stat64 *buf)
288 #endif
289 {
290  static int Init = Xunix.Init(&Init);
291 
292 #if defined(__linux__) and defined(_STAT_VER)
293  return XrdPosix_FstatV(ver, fildes, (struct stat *)buf);
294 #else
295  return XrdPosix_Fstat ( fildes, (struct stat *)buf);
296 #endif
297 }
298 }
299 
300 /******************************************************************************/
301 /* f s y n c */
302 /******************************************************************************/
303 
304 extern "C"
305 {
306 int fsync(int fildes)
307 {
308  static int Init = Xunix.Init(&Init);
309 
310  return XrdPosix_Fsync(fildes);
311 }
312 }
313 
314 /******************************************************************************/
315 /* f t e l l */
316 /******************************************************************************/
317 
318 extern "C"
319 {
320 long ftell(FILE *stream)
321 {
322  static int Init = Xunix.Init(&Init);
323 
324  return XrdPosix_Ftell(stream);
325 }
326 }
327 
328 /******************************************************************************/
329 /* f t e l l o */
330 /******************************************************************************/
331 
332 extern "C"
333 {
334 off64_t ftello64(FILE *stream)
335 {
336  static int Init = Xunix.Init(&Init);
337 
338  return XrdPosix_Ftello(stream);
339 }
340 }
341 
342 /******************************************************************************/
343 /* f t r u n c a t e */
344 /******************************************************************************/
345 
346 extern "C"
347 {
348 int ftruncate64(int fildes, off_t offset)
349 {
350  static int Init = Xunix.Init(&Init);
351 
352  return XrdPosix_Ftruncate(fildes, offset);
353 }
354 }
355 
356 /******************************************************************************/
357 /* f w r i t e */
358 /******************************************************************************/
359 
360 extern "C"
361 {
362 size_t fwrite(const void *ptr, size_t size, size_t nitems, FILE *stream)
363 {
364  static int Init = Xunix.Init(&Init);
365 
366  return XrdPosix_Fwrite(ptr, size, nitems, stream);
367 }
368 }
369 
370 /******************************************************************************/
371 /* f g e t x a t t r */
372 /******************************************************************************/
373 
374 #if defined(__linux__) || defined(__GNU__) || (defined(__FreeBSD_kernel__) && defined(__GLIBC__))
375 extern "C"
376 {
377 ssize_t fgetxattr (int fd, const char *name, void *value, size_t size)
378 {
379  static int Init = Xunix.Init(&Init);
380 
381  return XrdPosix_Fgetxattr(fd, name, value, size);
382 }
383 }
384 #endif
385 
386 /******************************************************************************/
387 /* g e t x a t t r */
388 /******************************************************************************/
389 
390 #if defined(__linux__) || defined(__GNU__) || (defined(__FreeBSD_kernel__) && defined(__GLIBC__))
391 extern "C"
392 {
393 ssize_t getxattr (const char *path, const char *name, void *value, size_t size)
394 {
395  static int Init = Xunix.Init(&Init);
396 
397  return XrdPosix_Getxattr(path, name, value, size);
398 }
399 }
400 #endif
401 
402 /******************************************************************************/
403 /* l g e t x a t t r */
404 /******************************************************************************/
405 
406 #if defined(__linux__) || defined(__GNU__) || (defined(__FreeBSD_kernel__) && defined(__GLIBC__))
407 extern "C"
408 {
409 ssize_t lgetxattr (const char *path, const char *name, void *value, size_t size)
410 {
411  static int Init = Xunix.Init(&Init);
412 
413  return XrdPosix_Lgetxattr(path, name, value, size);
414 }
415 }
416 #endif
417 
418 /******************************************************************************/
419 /* l s e e k */
420 /******************************************************************************/
421 
422 extern "C"
423 {
424 off64_t lseek64(int fildes, off64_t offset, int whence)
425 {
426  static int Init = Xunix.Init(&Init);
427 
428  return XrdPosix_Lseek(fildes, offset, whence);
429 }
430 }
431 
432 /******************************************************************************/
433 /* l l s e e k */
434 /******************************************************************************/
435 
436 extern "C"
437 {
438 #if defined(__linux__) || defined(__APPLE__)
439 off_t llseek(int fildes, off_t offset, int whence)
440 #else
441 offset_t llseek(int fildes, offset_t offset, int whence)
442 #endif
443 {
444  static int Init = Xunix.Init(&Init);
445 
446  return XrdPosix_Lseek(fildes, offset, whence);
447 }
448 }
449 
450 /******************************************************************************/
451 /* l s t a t */
452 /******************************************************************************/
453 
454 extern "C"
455 {
456 #if defined __linux__ && __GNUC__ && __GNUC__ >= 2
457 int __lxstat64(int ver, const char *path, struct stat64 *buf)
458 #else
459 int lstat64( const char *path, struct stat64 *buf)
460 #endif
461 {
462  static int Init = Xunix.Init(&Init);
463 
464  return XrdPosix_Lstat(path, (struct stat *)buf);
465 }
466 }
467 
468 /******************************************************************************/
469 /* m k d i r */
470 /******************************************************************************/
471 
472 extern "C"
473 {
474 int mkdir(const char *path, mode_t mode)
475 {
476  static int Init = Xunix.Init(&Init);
477 
478  return (isLite ? Xunix.Mkdir(path, mode) : XrdPosix_Mkdir(path, mode));
479 }
480 }
481 
482 /******************************************************************************/
483 /* o p e n */
484 /******************************************************************************/
485 
486 extern "C"
487 {
488 int open64(const char *path, int oflag, ...)
489 {
490  static int Init = Xunix.Init(&Init);
491  va_list ap;
492  int mode;
493 
494  va_start(ap, oflag);
495  mode = va_arg(ap, int);
496  va_end(ap);
497  return XrdPosix_Open(path, oflag, mode);
498 }
499 }
500 
501 /******************************************************************************/
502 /* o p e n d i r */
503 /******************************************************************************/
504 
505 extern "C"
506 {
507 DIR* opendir(const char *path)
508 {
509  static int Init = Xunix.Init(&Init);
510 
511  return (isLite ? Xunix.Opendir(path) : XrdPosix_Opendir(path));
512 }
513 }
514 
515 /******************************************************************************/
516 /* p a t h c o n f */
517 /******************************************************************************/
518 
519 // This is a required addition for Solaris 10+ systems
520 
521 extern "C"
522 {
523 long pathconf(const char *path, int name)
524 {
525  static int Init = Xunix.Init(&Init);
526 
527  return XrdPosix_Pathconf(path, name);
528 }
529 }
530 
531 /******************************************************************************/
532 /* p r e a d */
533 /******************************************************************************/
534 
535 extern "C"
536 {
537 ssize_t pread64(int fildes, void *buf, size_t nbyte, off_t offset)
538 {
539  static int Init = Xunix.Init(&Init);
540 
541  return XrdPosix_Pread (fildes, buf, nbyte, offset);
542 }
543 }
544 
545 /******************************************************************************/
546 /* p w r i t e */
547 /******************************************************************************/
548 
549 extern "C"
550 {
551 ssize_t pwrite64(int fildes, const void *buf, size_t nbyte, off_t offset)
552 {
553  static int Init = Xunix.Init(&Init);
554 
555  return XrdPosix_Pwrite(fildes, buf, nbyte, offset);
556 }
557 }
558 
559 /******************************************************************************/
560 /* r e a d */
561 /******************************************************************************/
562 
563 extern "C"
564 {
565 ssize_t read(int fildes, void *buf, size_t nbyte)
566 {
567  static int Init = Xunix.Init(&Init);
568 
569  return XrdPosix_Read(fildes, buf, nbyte);
570 }
571 }
572 
573 /******************************************************************************/
574 /* r e a d v */
575 /******************************************************************************/
576 
577 extern "C"
578 {
579 ssize_t readv(int fildes, const struct iovec *iov, int iovcnt)
580 {
581  static int Init = Xunix.Init(&Init);
582 
583  return XrdPosix_Readv(fildes, iov, iovcnt);
584 }
585 }
586 
587 /******************************************************************************/
588 /* r e a d d i r */
589 /******************************************************************************/
590 
591 extern "C"
592 {
593 struct dirent64* readdir64(DIR *dirp)
594 {
595  static int Init = Xunix.Init(&Init);
596 
597  return (isLite ? Xunix.Readdir64(dirp) : XrdPosix_Readdir64(dirp));
598 }
599 }
600 
601 /******************************************************************************/
602 /* r e a d d i r _ r */
603 /******************************************************************************/
604 
605 extern "C"
606 {
607 int readdir64_r(DIR *dirp, struct dirent64 *entry, struct dirent64 **result)
608 {
609  static int Init = Xunix.Init(&Init);
610 
611  return (isLite ? Xunix.Readdir64_r(dirp, entry, result) :
612  XrdPosix_Readdir64_r(dirp, entry, result));
613 }
614 }
615 
616 /******************************************************************************/
617 /* r e n a m e */
618 /******************************************************************************/
619 
620 extern "C"
621 {
622 int rename(const char *oldpath, const char *newpath)
623 {
624  static int Init = Xunix.Init(&Init);
625 
626  return (isLite ? Xunix.Rename(oldpath, newpath) : XrdPosix_Rename(oldpath, newpath));
627 }
628 }
629 
630 /******************************************************************************/
631 /* r e w i n d d i r */
632 /******************************************************************************/
633 
634 #ifndef rewinddir
635 extern "C"
636 {
637 void rewinddir(DIR *dirp)
638 {
639  static int Init = Xunix.Init(&Init);
640 
641  (isLite ? Xunix.Rewinddir(dirp) : XrdPosix_Rewinddir(dirp));
642 }
643 }
644 #endif
645 
646 /******************************************************************************/
647 /* r m d i r */
648 /******************************************************************************/
649 
650 extern "C"
651 {
652 int rmdir(const char *path)
653 {
654  static int Init = Xunix.Init(&Init);
655 
656  return (isLite ? Xunix.Rmdir(path) : XrdPosix_Rmdir(path));
657 }
658 }
659 
660 /******************************************************************************/
661 /* s e e k d i r */
662 /******************************************************************************/
663 
664 extern "C"
665 {
666 void seekdir(DIR *dirp, long loc)
667 {
668  static int Init = Xunix.Init(&Init);
669 
670  (isLite ? Xunix.Seekdir(dirp, loc) : XrdPosix_Seekdir(dirp, loc));
671 }
672 }
673 
674 /******************************************************************************/
675 /* s t a t */
676 /******************************************************************************/
677 
678 extern "C"
679 {
680 #if defined __linux__ && __GNUC__ && __GNUC__ >= 2
681 int __xstat64(int ver, const char *path, struct stat64 *buf)
682 #else
683 int stat64( const char *path, struct stat64 *buf)
684 #endif
685 {
686  static int Init = Xunix.Init(&Init);
687 
688  return XrdPosix_Stat(path, (struct stat *)buf);
689 }
690 }
691 
692 /******************************************************************************/
693 /* s t a t f s */
694 /******************************************************************************/
695 
696 #if !defined(__solaris__)
697 extern "C"
698 {
699 int statfs64( const char *path, struct statfs64 *buf)
700 {
701  static int Init = Xunix.Init(&Init);
702 
703  return XrdPosix_Statfs(path, (struct statfs *)buf);
704 }
705 }
706 #endif
707 
708 /******************************************************************************/
709 /* s t a t v f s */
710 /******************************************************************************/
711 
712 extern "C"
713 {
714 int statvfs64( const char *path, struct statvfs64 *buf)
715 {
716  static int Init = Xunix.Init(&Init);
717 
718  return XrdPosix_Statvfs(path, (struct statvfs *)buf);
719 }
720 }
721 
722 /******************************************************************************/
723 /* t e l l d i r */
724 /******************************************************************************/
725 
726 extern "C"
727 {
728 long telldir(DIR *dirp)
729 {
730  static int Init = Xunix.Init(&Init);
731 
732  return (isLite ? Xunix.Telldir(dirp) : XrdPosix_Telldir(dirp));
733 }
734 }
735 
736 /******************************************************************************/
737 /* t r u n c a t e */
738 /******************************************************************************/
739 
740 extern "C"
741 {
742 int truncate64(const char *path, off_t offset)
743 {
744  static int Init = Xunix.Init(&Init);
745 
746  return XrdPosix_Truncate(path, offset);
747 }
748 }
749 
750 /******************************************************************************/
751 /* u n l i n k */
752 /******************************************************************************/
753 
754 extern "C"
755 {
756 int unlink(const char *path)
757 {
758  static int Init = Xunix.Init(&Init);
759 
760  return (isLite ? Xunix.Unlink(path) : XrdPosix_Unlink(path));
761 }
762 }
763 
764 /******************************************************************************/
765 /* w r i t e */
766 /******************************************************************************/
767 
768 extern "C"
769 {
770 ssize_t write(int fildes, const void *buf, size_t nbyte)
771 {
772  static int Init = Xunix.Init(&Init);
773 
774  return XrdPosix_Write(fildes, buf, nbyte);
775 }
776 }
777 
778 /******************************************************************************/
779 /* w r i t e v */
780 /******************************************************************************/
781 
782 extern "C"
783 {
784 ssize_t writev(int fildes, const struct iovec *iov, int iovcnt)
785 {
786  static int Init = Xunix.Init(&Init);
787 
788  return XrdPosix_Writev(fildes, iov, iovcnt);
789 }
790 }
int stat(const char *path, struct stat *buf)
int statvfs(const char *path, struct statvfs *buf)
int statfs(const char *path, struct statfs *buf)
int chdir(const char *path)
ssize_t pwrite64(int fildes, const void *buf, size_t nbyte, off_t offset)
off64_t lseek64(int fildes, off64_t offset, int whence)
offset_t llseek(int fildes, offset_t offset, int whence)
int fseeko64(FILE *stream, off64_t offset, int whence)
int statvfs64(const char *path, struct statvfs64 *buf)
int acl(const char *path, int cmd, int nentries, void *aclbufp)
int unlink(const char *path)
off64_t ftello64(FILE *stream)
ssize_t pread64(int fildes, void *buf, size_t nbyte, off_t offset)
size_t fwrite(const void *ptr, size_t size, size_t nitems, FILE *stream)
int truncate64(const char *path, off_t offset)
size_t fread(void *ptr, size_t size, size_t nitems, FILE *stream)
long telldir(DIR *dirp)
int rename(const char *oldpath, const char *newpath)
int fcntl64(int fd, int cmd,...)
FILE * fopen64(const char *path, const char *mode)
int mkdir(const char *path, mode_t mode)
long ftell(FILE *stream)
int fseek(FILE *stream, long offset, int whence)
int statfs64(const char *path, struct statfs64 *buf)
int fsync(int fildes)
ssize_t readv(int fildes, const struct iovec *iov, int iovcnt)
void seekdir(DIR *dirp, long loc)
int fclose(FILE *stream)
int readdir64_r(DIR *dirp, struct dirent64 *entry, struct dirent64 **result)
int fstat64(int fildes, struct stat64 *buf)
struct dirent64 * readdir64(DIR *dirp)
int ftruncate64(int fildes, off_t offset)
ssize_t write(int fildes, const void *buf, size_t nbyte)
long pathconf(const char *path, int name)
int access(const char *path, int amode)
int close(int fildes)
int closedir(DIR *dirp)
int rmdir(const char *path)
ssize_t writev(int fildes, const struct iovec *iov, int iovcnt)
XrdPosixLinkage Xunix
int creat64(const char *path, mode_t mode)
int lstat64(const char *path, struct stat64 *buf)
int open64(const char *path, int oflag,...)
int fflush(FILE *stream)
ssize_t read(int fildes, void *buf, size_t nbyte)
int fdatasync(int fildes)
int stat64(const char *path, struct stat64 *buf)
DIR * opendir(const char *path)
int XrdPosix_Statfs(const char *path, struct statfs *buf)
Definition: XrdPosix.cc:943
long long XrdPosix_Pread(int fildes, void *buf, unsigned long long nbyte, long long offset)
Definition: XrdPosix.cc:716
long long XrdPosix_Write(int fildes, const void *buf, unsigned long long nbyte)
Definition: XrdPosix.cc:1053
long long XrdPosix_Lseek(int fildes, long long offset, int whence)
Definition: XrdPosix.cc:573
long long XrdPosix_Writev(int fildes, const struct iovec *iov, int iovcnt)
Definition: XrdPosix.cc:1069
int XrdPosix_Closedir(DIR *dirp)
Definition: XrdPosix.cc:187
int XrdPosix_Fsync(int fildes)
Definition: XrdPosix.cc:447
long long XrdPosix_Ftello(FILE *stream)
Definition: XrdPosix.cc:480
int XrdPosix_Open(const char *path, int oflag,...)
Definition: XrdPosix.cc:640
void XrdPosix_Rewinddir(DIR *dirp)
Definition: XrdPosix.cc:860
long long XrdPosix_Readv(int fildes, const struct iovec *iov, int iovcnt)
Definition: XrdPosix.cc:766
int XrdPosix_Readdir64_r(DIR *dirp, struct dirent64 *entry, struct dirent64 **result)
Definition: XrdPosix.cc:818
int XrdPosix_Close(int fildes)
Definition: XrdPosix.cc:172
void XrdPosix_Seekdir(DIR *dirp, long loc)
Definition: XrdPosix.cc:901
int XrdPosix_Rmdir(const char *path)
Definition: XrdPosix.cc:876
int XrdPosix_Chdir(const char *path)
Definition: XrdPosix.cc:155
FILE * XrdPosix_Fopen(const char *path, const char *mode)
Definition: XrdPosix.cc:306
int XrdPosix_Stat(const char *path, struct stat *buf)
Definition: XrdPosix.cc:917
int XrdPosix_Rename(const char *oldpath, const char *newpath)
Definition: XrdPosix.cc:834
int XrdPosix_Fcntl(int fd, int cmd,...)
Definition: XrdPosix.cc:235
int XrdPosix_Fseek(FILE *stream, long offset, int whence)
Definition: XrdPosix.cc:377
long XrdPosix_Ftell(FILE *stream)
Definition: XrdPosix.cc:463
long long XrdPosix_Pwrite(int fildes, const void *buf, unsigned long long nbyte, long long offset)
Definition: XrdPosix.cc:733
int XrdPosix_Mkdir(const char *path, mode_t mode)
Definition: XrdPosix.cc:615
long long XrdPosix_Read(int fildes, void *buf, unsigned long long nbyte)
Definition: XrdPosix.cc:750
int XrdPosix_Fflush(FILE *stream)
Definition: XrdPosix.cc:286
DIR * XrdPosix_Opendir(const char *path)
Definition: XrdPosix.cc:676
long XrdPosix_Telldir(DIR *dirp)
Definition: XrdPosix.cc:987
int XrdPosix_Lstat(const char *path, struct stat *buf)
Definition: XrdPosix.cc:589
int XrdPosix_Creat(const char *path, mode_t mode)
Definition: XrdPosix.cc:201
int XrdPosix_Statvfs(const char *path, struct statvfs *buf)
Definition: XrdPosix.cc:965
int XrdPosix_Acl(const char *path, int cmd, int nentries, void *aclbufp)
Definition: XrdPosix.cc:141
int XrdPosix_Fstat(int fildes, struct stat *buf)
Definition: XrdPosix.cc:413
size_t XrdPosix_Fwrite(const void *ptr, size_t size, size_t nitems, FILE *stream)
Definition: XrdPosix.cc:513
int XrdPosix_Fclose(FILE *stream)
Definition: XrdPosix.cc:215
int XrdPosix_Fdatasync(int fildes)
Definition: XrdPosix.cc:254
int XrdPosix_Ftruncate(int fildes, long long offset)
Definition: XrdPosix.cc:497
struct dirent64 * XrdPosix_Readdir64(DIR *dirp)
Definition: XrdPosix.cc:793
long XrdPosix_Pathconf(const char *path, int name)
Definition: XrdPosix.cc:703
int XrdPosix_Truncate(const char *path, long long offset)
Definition: XrdPosix.cc:1003
int XrdPosix_Unlink(const char *path)
Definition: XrdPosix.cc:1028
size_t XrdPosix_Fread(void *ptr, size_t size, size_t nitems, FILE *stream)
Definition: XrdPosix.cc:351
int XrdPosix_Fseeko(FILE *stream, long long offset, int whence)
Definition: XrdPosix.cc:395
int XrdPosix_Access(const char *path, int amode)
Definition: XrdPosix.cc:114
#define rewinddir(a)
Definition: XrdPosix.hh:90
Retv_Opendir(* Opendir)(Args_Opendir)
Retv_Mkdir(* Mkdir)(Args_Mkdir)
int Init(int *X=0)
Retv_Readdir64(* Readdir64)(Args_Readdir64)
Retv_Rename(* Rename)(Args_Rename)
Retv_Rewinddir(* Rewinddir)(Args_Rewinddir)
Retv_Telldir(* Telldir)(Args_Telldir)
Retv_Readdir64_r(* Readdir64_r)(Args_Readdir64_r)
Retv_Seekdir(* Seekdir)(Args_Seekdir)
Retv_Chdir(* Chdir)(Args_Chdir)
Retv_Closedir(* Closedir)(Args_Closedir)
Retv_Rmdir(* Rmdir)(Args_Rmdir)
Retv_Unlink(* Unlink)(Args_Unlink)