mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 01:39:16 -04:00
parent
d6ba1deb74
commit
b51bf217f7
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=545346
4 changed files with 4 additions and 96 deletions
|
@ -2,8 +2,7 @@
|
|||
# $FreeBSD$
|
||||
|
||||
PORTNAME= check
|
||||
PORTVERSION= 0.15.1
|
||||
PORTREVISION= 1
|
||||
PORTVERSION= 0.15.2
|
||||
CATEGORIES= devel
|
||||
|
||||
MAINTAINER= sunpoet@FreeBSD.org
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
TIMESTAMP = 1595578454
|
||||
SHA256 (libcheck-check-0.15.1_GH0.tar.gz) = a67b4972e2fb4bce14e19425d12850c2c0f232f2be93da0a2324767ee6c2995b
|
||||
SIZE (libcheck-check-0.15.1_GH0.tar.gz) = 305925
|
||||
TIMESTAMP = 1597569921
|
||||
SHA256 (libcheck-check-0.15.2_GH0.tar.gz) = 998d355294bb94072f40584272cf4424571c396c631620ce463f6ea97aa67d2e
|
||||
SIZE (libcheck-check-0.15.2_GH0.tar.gz) = 306136
|
||||
|
|
|
@ -1,43 +0,0 @@
|
|||
Revert: https://github.com/libcheck/check/commit/7ac1fcbcefe8813e2a75388ec61e20a184ddc8c8
|
||||
|
||||
--- src/check.c.orig 2020-07-22 14:19:48 UTC
|
||||
+++ src/check.c
|
||||
@@ -362,24 +362,25 @@ void _mark_point(const char *file, int line)
|
||||
send_loc_info(file, line);
|
||||
}
|
||||
|
||||
-void _ck_assert_failed(const char *file, int line, const char *expr,
|
||||
- const char *msg, ...)
|
||||
+void _ck_assert_failed(const char *file, int line, const char *expr, ...)
|
||||
{
|
||||
+ const char *msg;
|
||||
+ va_list ap;
|
||||
char buf[BUFSIZ];
|
||||
const char *to_send;
|
||||
|
||||
send_loc_info(file, line);
|
||||
|
||||
+ va_start(ap, expr);
|
||||
+ msg = (const char *)va_arg(ap, char *);
|
||||
+
|
||||
/*
|
||||
* If a message was passed, format it with vsnprintf.
|
||||
* Otherwise, print the expression as is.
|
||||
*/
|
||||
if(msg != NULL)
|
||||
{
|
||||
- va_list ap;
|
||||
- va_start(ap, msg);
|
||||
vsnprintf(buf, BUFSIZ, msg, ap);
|
||||
- va_end(ap);
|
||||
to_send = buf;
|
||||
}
|
||||
else
|
||||
@@ -387,6 +388,7 @@ void _ck_assert_failed(const char *file, int line, con
|
||||
to_send = expr;
|
||||
}
|
||||
|
||||
+ va_end(ap);
|
||||
send_failure_info(to_send);
|
||||
if(cur_fork_status() == CK_FORK)
|
||||
{
|
|
@ -1,48 +0,0 @@
|
|||
Revert: https://github.com/libcheck/check/commit/7ac1fcbcefe8813e2a75388ec61e20a184ddc8c8
|
||||
|
||||
--- src/check.h.in.orig 2020-07-22 14:19:48 UTC
|
||||
+++ src/check.h.in
|
||||
@@ -480,7 +480,7 @@ static void __testname ## _fn (int _i CK_ATTRIBUTE_UNU
|
||||
*/
|
||||
#define fail_if(expr, ...)\
|
||||
(expr) ? \
|
||||
- _ck_assert_failed(__FILE__, __LINE__, "Failure '"#expr"' occurred" , ## __VA_ARGS__) \
|
||||
+ _ck_assert_failed(__FILE__, __LINE__, "Failure '"#expr"' occurred" , ## __VA_ARGS__, NULL) \
|
||||
: _mark_point(__FILE__, __LINE__)
|
||||
|
||||
/*
|
||||
@@ -500,12 +500,12 @@ static void __testname ## _fn (int _i CK_ATTRIBUTE_UNU
|
||||
*/
|
||||
#if @HAVE_FORK@
|
||||
CK_DLL_EXP void CK_EXPORT _ck_assert_failed(const char *file, int line,
|
||||
- const char *expr, const char *msg,
|
||||
- ...) CK_ATTRIBUTE_NORETURN CK_ATTRIBUTE_FORMAT(printf, 4, 5);
|
||||
+ const char *expr,
|
||||
+ ...) CK_ATTRIBUTE_NORETURN CK_ATTRIBUTE_FORMAT(printf, 3, 4);
|
||||
#else
|
||||
CK_DLL_EXP void CK_EXPORT _ck_assert_failed(const char *file, int line,
|
||||
- const char *expr, const char *msg,
|
||||
- ...) CK_ATTRIBUTE_FORMAT(printf, 4, 5);
|
||||
+ const char *expr,
|
||||
+ ...) CK_ATTRIBUTE_FORMAT(printf, 3, 4);
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -535,7 +535,7 @@ CK_DLL_EXP void CK_EXPORT _ck_assert_failed(const char
|
||||
#define ck_assert_msg(expr, ...) \
|
||||
(expr) ? \
|
||||
_mark_point(__FILE__, __LINE__) : \
|
||||
- _ck_assert_failed(__FILE__, __LINE__, "Assertion '"#expr"' failed" , ## __VA_ARGS__)
|
||||
+ _ck_assert_failed(__FILE__, __LINE__, "Assertion '"#expr"' failed" , ## __VA_ARGS__, NULL)
|
||||
|
||||
/**
|
||||
* Unconditionally fail the test
|
||||
@@ -554,7 +554,7 @@ CK_DLL_EXP void CK_EXPORT _ck_assert_failed(const char
|
||||
*
|
||||
* @since 0.9.6
|
||||
*/
|
||||
-#define ck_abort_msg(...) _ck_assert_failed(__FILE__, __LINE__, "Failed" , ## __VA_ARGS__)
|
||||
+#define ck_abort_msg(...) _ck_assert_failed(__FILE__, __LINE__, "Failed" , ## __VA_ARGS__, NULL)
|
||||
|
||||
/* Signed and unsigned integer comparison macros with improved output compared to ck_assert(). */
|
||||
/* OP may be any comparison operator. */
|
Loading…
Add table
Reference in a new issue