Commit 5a839220 authored by Niels Möller's avatar Niels Möller
Browse files

* src/lsh_types.h: Use HAVE_GCC_ATTRIBUTE.

(FUNCTION_NAME): New define.

Rev: src/lsh_types.h:1.34
parent 123ec8f5
......@@ -48,7 +48,7 @@
#define UINT8 unsigned char
#if __GNUC__ && HAVE_ATTRIBUTE
#if __GNUC__ && HAVE_GCC_ATTRIBUTE
#define NORETURN __attribute__ ((noreturn))
#define PRINTF_STYLE(f, a) __attribute__ ((format(printf, f, a)))
#define UNUSED __attribute__ ((unused))
......@@ -58,6 +58,17 @@
#define UNUSED
#endif
#if HAVE_GCC_FUNCTION
#define FUNCTION_NAME __FUNCTION__
#else
#define FUNCTION_NAME "Unknown"
#endif
/* Stringizing macros */
#define STRINGIZE1(x) #x
#define STRINGIZE(x) STRINGIZE1(x)
#define STRING_LINE STRINGIZE(__LINE__)
#if HAVE_STRERROR
#define STRERROR strerror
#else
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment