Skip to content

Commit 106a045

Browse files
authored
Align better with upstreamed fixes for clar (#776)
When upstreaming this patch to clar, the missing `localtime_r` symbol was addressed in a different way. For details, see clar-test/clar@ca0b519a. Let's use that version instead.
2 parents afff6fb + aafa75b commit 106a045

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

t/unit-tests/clar/clar.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@
7979
# else
8080
# define p_snprintf snprintf
8181
# endif
82+
83+
# define localtime_r(timer, buf) (localtime_s(buf, timer) == 0 ? buf : NULL)
8284
#else
8385
# include <sys/wait.h> /* waitpid(2) */
8486
# include <unistd.h>

t/unit-tests/clar/clar/summary.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,6 @@ static int clar_summary_testsuites(struct clar_summary *summary)
1919
return fprintf(summary->fp, "<testsuites>\n");
2020
}
2121

22-
#ifdef _WIN32
23-
static struct tm *localtime_r(const time_t *timep, struct tm *result)
24-
{
25-
if (localtime_s(result, timep) == 0)
26-
return result;
27-
return NULL;
28-
}
29-
#endif
30-
3122
static int clar_summary_testsuite(struct clar_summary *summary,
3223
int idn, const char *name, time_t timestamp,
3324
int test_count, int fail_count, int error_count)

0 commit comments

Comments
 (0)