On Fri, 22 Jun 2001 15:21:03 +0200 (CEST),
Adam Cioccarelli <alciocca@xxxxxxxxxx> wrote:
>I'm not sure if anyone is interested as I am sure there are bigger fish to
>fry at the moment, but the compilation of the xfs-progs fails when I try
>and use gcc-3.0 to compile them.
>
>gcc-3.0 -O1 -g -DDEBUG -funsigned-char -Wall -I../include
>'-DVERSION="1.2.7"' -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DXFS_BIG_FILES=1
>-DXFS_BIG_FILESYSTEMS=1 -c -o log_misc.o log_misc.c
>log_misc.c:225:1: directives may not be used inside a macro argument
>log_misc.c:225:1: unterminated argument list invoking macro "printf"
printf is allowed to be a macro and is in gcc 3.0, this change has
bitten quite a few projects. I will update the tree, in the meantime
apply this patch.
--- cmd/xfsprogs/logprint/log_misc.c.orig Fri Jun 22 23:34:12 2001
+++ cmd/xfsprogs/logprint/log_misc.c Fri Jun 22 23:34:51 2001
@@ -220,13 +220,15 @@
magic=*(__uint32_t*)cptr; /* XXX INT_GET soon */
- if (len >= 4)
- printf("%c%c%c%c:",
+ if (len >= 4) {
#if __BYTE_ORDER == __LITTLE_ENDIAN
+ printf("%c%c%c%c:",
magic_c[3], magic_c[2], magic_c[1], magic_c[0]);
#else
+ printf("%c%c%c%c:",
magic_c[0], magic_c[1], magic_c[2], magic_c[3]);
#endif
+ }
if (len != sizeof(xfs_trans_header_t)) {
printf(" Not enough data to decode further\n");
return 1;
|