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