mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-07 06:43:00 +03:00
support: Preserve errno in write_message, TEST_VERIFY and other checks
These facilities could clobber errno, which makes it difficult to write certain checks because a specific order has to be used.
This commit is contained in:
@@ -18,14 +18,17 @@
|
||||
|
||||
#include <support/check.h>
|
||||
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
void
|
||||
support_test_verify_impl (const char *file, int line, const char *expr)
|
||||
{
|
||||
int saved_errno = errno;
|
||||
support_record_failure ();
|
||||
printf ("error: %s:%d: not true: %s\n", file, line, expr);
|
||||
errno = saved_errno;
|
||||
}
|
||||
|
||||
void
|
||||
|
Reference in New Issue
Block a user