aboutsummaryrefslogtreecommitdiffstats
path: root/src/libtracelog/libtracelog.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libtracelog/libtracelog.c')
-rw-r--r--src/libtracelog/libtracelog.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/libtracelog/libtracelog.c b/src/libtracelog/libtracelog.c
index 760ac7612..fc2eba638 100644
--- a/src/libtracelog/libtracelog.c
+++ b/src/libtracelog/libtracelog.c
@@ -39,8 +39,6 @@
39// break recursivity on fopen call 39// break recursivity on fopen call
40typedef FILE *(*orig_fopen_t)(const char *pathname, const char *mode); 40typedef FILE *(*orig_fopen_t)(const char *pathname, const char *mode);
41static orig_fopen_t orig_fopen = NULL; 41static orig_fopen_t orig_fopen = NULL;
42typedef FILE *(*orig_fopen64_t)(const char *pathname, const char *mode);
43static orig_fopen64_t orig_fopen64 = NULL;
44 42
45// 43//
46// blacklist storage 44// blacklist storage
@@ -405,7 +403,9 @@ FILE *fopen(const char *pathname, const char *mode) {
405 return rv; 403 return rv;
406} 404}
407 405
408#ifdef __GLIBC__ 406#ifndef fopen64
407typedef FILE *(*orig_fopen64_t)(const char *pathname, const char *mode);
408static orig_fopen64_t orig_fopen64 = NULL;
409FILE *fopen64(const char *pathname, const char *mode) { 409FILE *fopen64(const char *pathname, const char *mode) {
410#ifdef DEBUG 410#ifdef DEBUG
411 printf("%s %s\n", __FUNCTION__, pathname); 411 printf("%s %s\n", __FUNCTION__, pathname);
@@ -420,7 +420,7 @@ FILE *fopen64(const char *pathname, const char *mode) {
420 FILE *rv = orig_fopen64(pathname, mode); 420 FILE *rv = orig_fopen64(pathname, mode);
421 return rv; 421 return rv;
422} 422}
423#endif /* __GLIBC__ */ 423#endif
424 424
425 425
426// freopen 426// freopen
@@ -441,7 +441,7 @@ FILE *freopen(const char *pathname, const char *mode, FILE *stream) {
441 return rv; 441 return rv;
442} 442}
443 443
444#ifdef __GLIBC__ 444#ifndef freopen64
445typedef FILE *(*orig_freopen64_t)(const char *pathname, const char *mode, FILE *stream); 445typedef FILE *(*orig_freopen64_t)(const char *pathname, const char *mode, FILE *stream);
446static orig_freopen64_t orig_freopen64 = NULL; 446static orig_freopen64_t orig_freopen64 = NULL;
447FILE *freopen64(const char *pathname, const char *mode, FILE *stream) { 447FILE *freopen64(const char *pathname, const char *mode, FILE *stream) {
@@ -458,7 +458,7 @@ FILE *freopen64(const char *pathname, const char *mode, FILE *stream) {
458 FILE *rv = orig_freopen64(pathname, mode, stream); 458 FILE *rv = orig_freopen64(pathname, mode, stream);
459 return rv; 459 return rv;
460} 460}
461#endif /* __GLIBC__ */ 461#endif
462 462
463// unlink 463// unlink
464typedef int (*orig_unlink_t)(const char *pathname); 464typedef int (*orig_unlink_t)(const char *pathname);
@@ -565,7 +565,7 @@ int stat(const char *pathname, struct stat *buf) {
565 return rv; 565 return rv;
566} 566}
567 567
568#ifdef __GLIBC__ 568#ifndef stat64
569typedef int (*orig_stat64_t)(const char *pathname, struct stat64 *buf); 569typedef int (*orig_stat64_t)(const char *pathname, struct stat64 *buf);
570static orig_stat64_t orig_stat64 = NULL; 570static orig_stat64_t orig_stat64 = NULL;
571int stat64(const char *pathname, struct stat64 *buf) { 571int stat64(const char *pathname, struct stat64 *buf) {
@@ -582,7 +582,7 @@ int stat64(const char *pathname, struct stat64 *buf) {
582 int rv = orig_stat64(pathname, buf); 582 int rv = orig_stat64(pathname, buf);
583 return rv; 583 return rv;
584} 584}
585#endif /* __GLIBC__ */ 585#endif
586 586
587typedef int (*orig_lstat_t)(const char *pathname, struct stat *buf); 587typedef int (*orig_lstat_t)(const char *pathname, struct stat *buf);
588static orig_lstat_t orig_lstat = NULL; 588static orig_lstat_t orig_lstat = NULL;
@@ -601,7 +601,7 @@ int lstat(const char *pathname, struct stat *buf) {
601 return rv; 601 return rv;
602} 602}
603 603
604#ifdef __GLIBC__ 604#ifndef lstat64
605typedef int (*orig_lstat64_t)(const char *pathname, struct stat64 *buf); 605typedef int (*orig_lstat64_t)(const char *pathname, struct stat64 *buf);
606static orig_lstat64_t orig_lstat64 = NULL; 606static orig_lstat64_t orig_lstat64 = NULL;
607int lstat64(const char *pathname, struct stat64 *buf) { 607int lstat64(const char *pathname, struct stat64 *buf) {
@@ -618,7 +618,7 @@ int lstat64(const char *pathname, struct stat64 *buf) {
618 int rv = orig_lstat64(pathname, buf); 618 int rv = orig_lstat64(pathname, buf);
619 return rv; 619 return rv;
620} 620}
621#endif /* __GLIBC__ */ 621#endif
622 622
623// access 623// access
624typedef int (*orig_access_t)(const char *pathname, int mode); 624typedef int (*orig_access_t)(const char *pathname, int mode);