summaryrefslogtreecommitdiff
path: root/flexdef.h
diff options
context:
space:
mode:
authorWill Estes <wlestes@users.sourceforge.net>2002-09-09 15:52:11 +0000
committerWill Estes <wlestes@users.sourceforge.net>2002-09-09 15:52:11 +0000
commit8522b4b6ddceb0486653316b1cc5ee10b084b91e (patch)
treea7cd4aab4adf474c05632200656b6bdef17f19b1 /flexdef.h
parente02c3d27eeb6b53ec82532ab080c23ce26813fd4 (diff)
test for presence of __func__ and compensate if absent
Diffstat (limited to 'flexdef.h')
-rw-r--r--flexdef.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/flexdef.h b/flexdef.h
index db0024c..c3f35e4 100644
--- a/flexdef.h
+++ b/flexdef.h
@@ -915,6 +915,7 @@ extern void flexerror PROTO ((const char *));
extern void flexfatal PROTO ((const char *));
/* Report a fatal error with a pinpoint, and terminate */
+#if HAVE_DECL___FUNC__
#define flex_die(msg) \
do{ \
fprintf (stderr,\
@@ -923,6 +924,16 @@ extern void flexfatal PROTO ((const char *));
__func__,msg);\
FLEX_EXIT(1);\
}while(0)
+#else /* ! HAVE_DECL___FUNC__ */
+#define flex_die(msg) \
+ do{ \
+ fprintf (stderr,\
+ _("%s: fatal internal error at %s:%d %s\n"),\
+ program_name, __FILE__, (int)__LINE__,\
+ msg);\
+ FLEX_EXIT(1);\
+ }while(0)
+#endif /* ! HAVE_DECL___func__ */
/* Convert a hexadecimal digit string to an integer value. */
extern int htoi PROTO ((Char[]));