author | eilers <eilers> | 2003-11-03 16:52:18 (UTC) |
---|---|---|
committer | eilers <eilers> | 2003-11-03 16:52:18 (UTC) |
commit | d34dc773591a2d467c68875a68a671d6a809f861 (patch) (unidiff) | |
tree | b57e5ae15c51e3d87ca95d57aedfd1ca3db57bfe /rsync | |
parent | ce84f2d8bdd65c438821f0457cdad6bbbfa73380 (diff) | |
download | opie-d34dc773591a2d467c68875a68a671d6a809f861.zip opie-d34dc773591a2d467c68875a68a671d6a809f861.tar.gz opie-d34dc773591a2d467c68875a68a671d6a809f861.tar.bz2 |
Porting Opie to MacOS-X.
The base system and all platform independent applications and platforms
should work.
Please see $OPIEDIR/development/macosx for details
-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 | |||
@@ -23,7 +23,7 @@ | |||
23 | #define _GNU_SOURCE 1 | 23 | #define _GNU_SOURCE 1 |
24 | 24 | ||
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 | ||
28 | /* Define to a replacement type if intmax_t is not a builtin, or in | 28 | /* Define to a replacement type if intmax_t is not a builtin, or in |
29 | sys/types.h or stdlib.h or stddef.h */ | 29 | sys/types.h or stdlib.h or stddef.h */ |
diff --git a/rsync/trace.h b/rsync/trace.h index 60a6477..2bb8552 100644 --- a/rsync/trace.h +++ b/rsync/trace.h | |||
@@ -36,13 +36,15 @@ | |||
36 | * fatal terminates the whole process | 36 | * fatal terminates the whole process |
37 | */ | 37 | */ |
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 | ||
47 | void rs_log0(int level, char const *fn, char const *fmt, ...) | 49 | void rs_log0(int level, char const *fn, char const *fmt, ...) |
48 | __attribute__ ((format(printf, 3, 4))); | 50 | __attribute__ ((format(printf, 3, 4))); |
@@ -52,18 +54,9 @@ void rs_log0(int level, char const *fn, char const *fmt, ...) | |||
52 | do { rs_log0(RS_LOG_DEBUG, __FUNCTION__, fmt , ##arg); \ | 54 | do { rs_log0(RS_LOG_DEBUG, __FUNCTION__, fmt , ##arg); \ |
53 | } while (0) | 55 | } while (0) |
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 { \ |
68 | rs_log0((l), __FUNCTION__, (s) , ##str); \ | 61 | rs_log0((l), __FUNCTION__, (s) , ##str); \ |
69 | } while (0) | 62 | } while (0) |
@@ -82,19 +75,17 @@ void rs_log0(int level, char const *fn, char const *fmt, ...) | |||
82 | 75 | ||
83 | 76 | ||
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 |
87 | # define rs_error rs_error0 | 80 | # define rs_error rs_error0 |
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 | ||
99 | enum { | 90 | enum { |
100 | RS_LOG_PRIMASK = 7, /**< Mask to extract priority | 91 | RS_LOG_PRIMASK = 7, /**< Mask to extract priority |
@@ -105,7 +96,6 @@ enum { | |||
105 | }; | 96 | }; |
106 | 97 | ||
107 | 98 | ||
108 | |||
109 | /** | 99 | /** |
110 | * \macro rs_trace_enabled() | 100 | * \macro rs_trace_enabled() |
111 | * | 101 | * |