[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] portable to old compiler and kernel
From: |
J. Mayer |
Subject: |
Re: [Qemu-devel] portable to old compiler and kernel |
Date: |
Mon, 17 May 2004 13:17:35 +0200 |
On Mon, 2004-05-17 at 11:34, Vladimir N. Oleynik wrote:
> Hi.
>
Hello,
> 3) hw/fdc.c
> #define FLOPPY_ERROR(fmt, args...) \
> do { printf("FLOPPY ERROR: %s: " fmt, __func__ , ##args); } while (0)
> to
> #define FLOPPY_ERROR(fmt, args...) \
> do { printf("FLOPPY ERROR: %s: " fmt, __FUNCTION__ , ##args); } while (0)
Don't do that. __func__ is ISO C, __FUNCTION__ isn't.
You'd better add this somewhere:
#if __GNUC__ <= 2 && __GNUC_MINOR__ < 95
#define __func__ __FUNCTION__
#endif
which makes egcs happy and doesn't make gcc 3.xx warn about deprecated
features.
--
J. Mayer <address@hidden>
Never organized