summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2015-02-20 09:47:44 +0100
committerAndreas Schneider <asn@cryptomilk.org>2015-02-20 15:06:39 +0100
commit5d5fb5afc3811f9f56e69ce5acb4614e32a7c969 (patch)
tree83ccac65f1acec64720dbc18c55218c5886a23a8 /include
parentbcad709cbac4fc67d922435eeeb20ab7f5286a81 (diff)
downloadcmocka-5d5fb5afc3811f9f56e69ce5acb4614e32a7c969.tar.gz
cmocka-5d5fb5afc3811f9f56e69ce5acb4614e32a7c969.tar.bz2
cmocka-5d5fb5afc3811f9f56e69ce5acb4614e32a7c969.zip
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 <asn@cryptomilk.org>
Diffstat (limited to 'include')
-rw-r--r--include/cmocka.h7
1 files changed, 2 insertions, 5 deletions
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__)