-rw-r--r-- | rsync/config_linux.h | 2 | ||||
-rw-r--r-- | rsync/trace.h | 40 |
2 files changed, 16 insertions, 26 deletions
diff --git a/rsync/config_linux.h b/rsync/config_linux.h index e5ff3e4..f488b78 100644 --- a/rsync/config_linux.h +++ b/rsync/config_linux.h | |||
@@ -25,3 +25,3 @@ | |||
25 | /* GNU extension of saving argv[0] to program_invocation_short_name */ | 25 | /* GNU extension of saving argv[0] to program_invocation_short_name */ |
26 | #define HAVE_PROGRAM_INVOCATION_NAME 1 | 26 | /* #define HAVE_PROGRAM_INVOCATION_NAME 1 */ |
27 | 27 | ||
diff --git a/rsync/trace.h b/rsync/trace.h index 60a6477..2bb8552 100644 --- a/rsync/trace.h +++ b/rsync/trace.h | |||
@@ -38,9 +38,11 @@ | |||
38 | 38 | ||
39 | void rs_fatal0(char const *s, ...); | 39 | #if defined(HAVE_VARARG_MACROS) && defined(__GNUC__) |
40 | void rs_error0(char const *s, ...); | 40 | /* |
41 | void rs_trace0(char const *s, ...); | 41 | * TODO: Don't assume this is a gcc thing; rather test in autoconf for |
42 | 42 | * support for __FUNCTION__. One simple way might just be to try compiling | |
43 | void rs_log0_nofn(int level, char const *fmt, ...); | 43 | * the definition of one of these functions! |
44 | 44 | * | |
45 | #ifdef __GNUC__ | 45 | * TODO: Also look for the C9X predefined identifier `_function', or |
46 | * whatever it's called. | ||
47 | */ | ||
46 | 48 | ||
@@ -54,14 +56,5 @@ void rs_log0(int level, char const *fn, char const *fmt, ...) | |||
54 | #else | 56 | #else |
55 | # define rs_trace(s, str...) | 57 | # define rs_trace(fmt, arg...) |
56 | #endif/* !DO_RS_TRACE */ | 58 | #endif/* !DO_RS_TRACE */ |
57 | 59 | ||
58 | /* | ||
59 | * TODO: Don't assume this is a gcc thing; rather test in autoconf for | ||
60 | * support for __FUNCTION__ and varargs macros. One simple way might | ||
61 | * just be to try compiling the definition of one of these functions! | ||
62 | * | ||
63 | * TODO: Also look for the C9X predefined identifier `_function', or | ||
64 | * whatever it's called. | ||
65 | */ | ||
66 | |||
67 | #define rs_log(l, s, str...) do { \ | 60 | #define rs_log(l, s, str...) do { \ |
@@ -84,3 +77,3 @@ void rs_log0(int level, char const *fn, char const *fmt, ...) | |||
84 | #else /************************* ! __GNUC__ */ | 77 | #else /************************* ! __GNUC__ */ |
85 | 78 | # define rs_trace rs_trace0 | |
86 | # define rs_fatal rs_fatal0 | 79 | # define rs_fatal rs_fatal0 |
@@ -88,11 +81,9 @@ void rs_log0(int level, char const *fn, char const *fmt, ...) | |||
88 | # define rs_log rs_log0_nofn | 81 | # define rs_log rs_log0_nofn |
89 | |||
90 | # ifdef DO_RS_TRACE | ||
91 | # define rs_trace rs_trace0 | ||
92 | # endif /* DO_RS_TRACE */ | ||
93 | #endif /* ! __GNUC__ */ | 82 | #endif /* ! __GNUC__ */ |
94 | 83 | ||
95 | 84 | void rs_trace0(char const *s, ...); | |
85 | void rs_fatal0(char const *s, ...); | ||
86 | void rs_error0(char const *s, ...); | ||
96 | void rs_log0(int level, char const *fn, char const *fmt, ...); | 87 | void rs_log0(int level, char const *fn, char const *fmt, ...); |
97 | 88 | void rs_log0_nofn(int level, char const *fmt, ...); | |
98 | 89 | ||
@@ -107,3 +98,2 @@ enum { | |||
107 | 98 | ||
108 | |||
109 | /** | 99 | /** |