summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoakim Tjernlund <joakim.tjernlund@transmode.se>2005-05-20 22:04:11 +0000
committerJoakim Tjernlund <joakim.tjernlund@transmode.se>2005-05-20 22:04:11 +0000
commitbd22e54f65f260f5ea9591a1a60d1686e7dfd052 (patch)
tree6c5bf19b13e05d0140e3af379c821a531b0b25d1
parent602bd9701e5db47b68ae80feeb1a107483f2de5c (diff)
Fix debug macros.
-rw-r--r--ldso/include/dl-string.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/ldso/include/dl-string.h b/ldso/include/dl-string.h
index 0637a36e7..208bee977 100644
--- a/ldso/include/dl-string.h
+++ b/ldso/include/dl-string.h
@@ -272,7 +272,7 @@ static inline char *_dl_simple_ltoahex(char * local, unsigned long i)
#if defined(mc68000) || defined(__arm__) || defined(__mips__) \
|| defined(__sh__) || defined(__powerpc__)
# define CONSTANT_STRING_GOT_FIXUP(X) \
- if ((X) < (const char *) load_addr) (X) += load_addr;
+ if ((X) < (const char *) load_addr) (X) += load_addr
#else
# define CONSTANT_STRING_GOT_FIXUP(X)
#endif
@@ -280,13 +280,14 @@ static inline char *_dl_simple_ltoahex(char * local, unsigned long i)
#define SEND_STDERR(X) { \
const char *tmp1 = (X); \
- CONSTANT_STRING_GOT_FIXUP(tmp1) \
+ CONSTANT_STRING_GOT_FIXUP(tmp1); \
_dl_write (2, tmp1, _dl_strlen(tmp1)); \
};
-#define SEND_ADDRESS_STDERR(X, add_a_newline) { \
+#define SEND_ADDRESS_STDERR(ADR, add_a_newline) { \
char tmp[26], v, *tmp2, *tmp1 = tmp; \
- CONSTANT_STRING_GOT_FIXUP(tmp1) \
+ unsigned long X = (unsigned long)(ADR); \
+ CONSTANT_STRING_GOT_FIXUP(tmp1); \
tmp2 = tmp1 + sizeof(tmp); \
*--tmp2 = '\0'; \
if (add_a_newline) *--tmp2 = '\n'; \
@@ -305,7 +306,7 @@ static inline char *_dl_simple_ltoahex(char * local, unsigned long i)
#define SEND_NUMBER_STDERR(X, add_a_newline) { \
char tmp[26], v, *tmp2, *tmp1 = tmp; \
- CONSTANT_STRING_GOT_FIXUP(tmp1) \
+ CONSTANT_STRING_GOT_FIXUP(tmp1); \
tmp2 = tmp1 + sizeof(tmp); \
*--tmp2 = '\0'; \
if (add_a_newline) *--tmp2 = '\n'; \