From 7a680fb9f26af64738bddfca741dc48fd0be0bc3 Mon Sep 17 00:00:00 2001 From: andy Date: Mon, 2 Apr 2007 16:14:54 +0000 Subject: [PATCH] Use __FUNCTION__, which works on gcc and MSVC 7/8, instead of __func__, which while standardized works only with gcc. I'll wait for bug reports from VC6 before bothering with fallback code... --- simgear/nasal/lib.c | 4 ++-- simgear/nasal/mathlib.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/simgear/nasal/lib.c b/simgear/nasal/lib.c index 70206c65..fd8451be 100644 --- a/simgear/nasal/lib.c +++ b/simgear/nasal/lib.c @@ -16,9 +16,9 @@ #define NEWCSTR(c, s) NEWSTR(c, s, strlen(s)) // Generic argument error, assumes that the symbol "c" is a naContext, -// and that the __func__ string is of the form "f_NASALSYMBOL". +// and that the __FUNCTION__ string is of the form "f_NASALSYMBOL". #define ARGERR() \ - naRuntimeError(c, "bad/missing argument to %s()", (__func__ + 2)) + naRuntimeError(c, "bad/missing argument to %s()", (__FUNCTION__ + 2)) static naRef f_size(naContext c, naRef me, int argc, naRef* args) { diff --git a/simgear/nasal/mathlib.c b/simgear/nasal/mathlib.c index 367aa2d2..639cce32 100644 --- a/simgear/nasal/mathlib.c +++ b/simgear/nasal/mathlib.c @@ -5,7 +5,7 @@ // Toss a runtime error for any NaN or Inf values produced. Note that // this assumes an IEEE 754 format. -#define VALIDATE(r) (valid(r.num) ? (r) : die(c, __func__+2)) +#define VALIDATE(r) (valid(r.num) ? (r) : die(c, __FUNCTION__+2)) static int valid(double d) { -- 2.39.5