ERR: Remove ERR_put_func_error() and reimplement ERR_put_error() as a macro
Also, deprecate ERR_put_error()
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/9452)
diff --git a/test/errtest.c b/test/errtest.c
index 88ff860..1a18335 100644
--- a/test/errtest.c
+++ b/test/errtest.c
@@ -47,12 +47,14 @@
/* Test that setting a platform error sets the right values. */
static int platform_error(void)
{
- const char *file = __FILE__, *f, *data;
- const int line = __LINE__;
+ const char *file, *f, *data;
+ int line;
int l;
unsigned long e;
- ERR_put_func_error(ERR_LIB_SYS, "exit", ERR_R_INTERNAL_ERROR, file, line);
+ file = __FILE__;
+ line = __LINE__ + 1; /* The error is generated on the next line */
+ FUNCerr("exit", ERR_R_INTERNAL_ERROR);
if (!TEST_ulong_ne(e = ERR_get_error_line_data(&f, &l, &data, NULL), 0)
|| !TEST_int_eq(ERR_GET_REASON(e), ERR_R_INTERNAL_ERROR)
|| !TEST_int_eq(l, line)