mirror of https://github.com/getdnsapi/getdns.git
Detect if __func__ can be used with debugging
This commit is contained in:
parent
4453febf2d
commit
dadddb0d7b
|
@ -481,6 +481,11 @@ if (HAVE_STRPTIME)
|
|||
check_c_source_runs("${STRPTIME_TEST_SOURCE}" STRPTIME_WORKS)
|
||||
endif ()
|
||||
|
||||
try_compile(HAVE___FUNC__
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cmake/tests/test___func__.c
|
||||
)
|
||||
|
||||
# TCP Fast Open.
|
||||
if (NOT ENABLE_TCP_FAST_OPEN)
|
||||
message(WARNING "TCP Fast Open disabled.")
|
||||
|
|
|
@ -213,6 +213,8 @@
|
|||
#cmakedefine HAVE_TARGET_ENDIANNESS
|
||||
#cmakedefine TARGET_IS_BIG_ENDIAN
|
||||
|
||||
#cmakedefine HAVE___FUNC__ 1
|
||||
|
||||
#ifdef HAVE___FUNC__
|
||||
#define __FUNC__ __func__
|
||||
#else
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
int main (int ac, char *av[])
|
||||
{
|
||||
char *s = __func__;
|
||||
}
|
Loading…
Reference in New Issue