From: Andreas Schneider Date: Fri, 20 Feb 2015 08:47:44 +0000 (+0100) Subject: include: Fix building with newer gcc versions. X-Git-Tag: cmocka-1.1.1~55 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5d5fb5afc3811f9f56e69ce5acb4614e32a7c969;p=platform%2Fupstream%2Fcmocka.git include: Fix building with newer gcc versions. __func__ is not a macro. We just need to define it on Windows for now. Signed-off-by: Andreas Schneider --- diff --git a/include/cmocka.h b/include/cmocka.h index 303d0ae..43336e8 100644 --- a/include/cmocka.h +++ b/include/cmocka.h @@ -19,6 +19,8 @@ #ifdef _WIN32 # ifdef _MSC_VER +#define __func__ __FUNCTION__ + # ifndef inline #define inline __inline # endif /* inline */ @@ -52,11 +54,6 @@ int __stdcall IsDebuggerPresent(); * @{ */ -/* For those who are used to __func__ from gcc. */ -#ifndef __func__ -#define __func__ __FUNCTION__ -#endif - /* If __WORDSIZE is not set, try to figure it out and default to 32 bit. */ #ifndef __WORDSIZE # if defined(__x86_64__) && !defined(__ILP32__)