Update to cmocka-1.1.1

This commit is contained in:
Andreas Schneider 2017-04-07 16:38:00 +02:00
parent 476112400a
commit b9d0124b85
5 changed files with 3 additions and 54 deletions

1
.gitignore vendored
View File

@ -7,3 +7,4 @@
/cmocka-1.0.0.tar.xz /cmocka-1.0.0.tar.xz
/cmocka-1.0.1.tar.xz /cmocka-1.0.1.tar.xz
/cmocka-1.1.0.tar.xz /cmocka-1.1.0.tar.xz
/cmocka-1.1.1.tar.xz

View File

@ -1,40 +0,0 @@
From ab0f3769a08de746e0aed60665dfa2638ae3e61d Mon Sep 17 00:00:00 2001
From: Andreas Schneider <asn@cryptomilk.org>
Date: Fri, 20 Feb 2015 09:47:44 +0100
Subject: [PATCH 1/2] 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>
---
include/cmocka.h | 7 ++-----
1 file 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__)
--
2.1.0

View File

@ -1,12 +0,0 @@
diff -up cmocka-1.1.0/cmake/Modules/DefineCompilerFlags.cmake.than cmocka-1.1.0/cmake/Modules/DefineCompilerFlags.cmake
--- cmocka-1.1.0/cmake/Modules/DefineCompilerFlags.cmake.than 2017-03-27 08:07:21.231279206 -0400
+++ cmocka-1.1.0/cmake/Modules/DefineCompilerFlags.cmake 2017-03-27 08:08:04.852048525 -0400
@@ -10,7 +10,7 @@ if (UNIX AND NOT WIN32)
if (${CMAKE_C_COMPILER_ID} MATCHES "(GNU|Clang)")
# add -Wconversion ?
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 -pedantic -pedantic-errors")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 -fno-builtin-strcmp -pedantic -pedantic-errors")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wshadow -Wmissing-prototypes -Wdeclaration-after-statement")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wunused -Wfloat-equal -Wpointer-arith -Wwrite-strings -Wformat-security")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wmissing-format-attribute -Wundef")

View File

@ -3,7 +3,7 @@ BuildRequires: doxygen
BuildRequires: glibc-devel BuildRequires: glibc-devel
Name: cmocka Name: cmocka
Version: 1.1.0 Version: 1.1.1
Release: 5%{?dist} Release: 5%{?dist}
License: ASL 2.0 License: ASL 2.0

View File

@ -1 +1 @@
59c9aa5735d9387fb591925ec53523ec cmocka-1.1.0.tar.xz SHA512 (cmocka-1.1.1.tar.xz) = 801c4a3e1bb9047241b1cb5a90c1cbdee1b0aff5e3d0a84ec8b2dbaee79274618c24fbe5e9fedbf0b3ee18c6c98b55d93e135d037ac33ab872edc7665af41577