Commit e08cb58a authored by LRN's avatar LRN Committed by Tim-Philipp Müller
Browse files

check: patch internal check copy so it works with our build system

Fixes #604565.
parent dd77e42e
......@@ -18,7 +18,7 @@
* Boston, MA 02111-1307, USA.
*/
#include "../lib/libcompat.h"
#include "config.h"
#include <string.h>
#include <stdio.h>
......
......@@ -18,7 +18,7 @@
* Boston, MA 02111-1307, USA.
*/
#include "../lib/libcompat.h"
#include "config.h"
#include <stdarg.h>
#include <stdlib.h>
......
......@@ -18,7 +18,7 @@
* Boston, MA 02111-1307, USA.
*/
#include "../lib/libcompat.h"
#include "config.h"
#include <stdlib.h>
#include <string.h>
......
......@@ -18,10 +18,14 @@
* Boston, MA 02111-1307, USA.
*/
#include "../lib/libcompat.h"
#include "config.h"
#include <stdlib.h>
#include <stdio.h>
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#include <time.h>
#include <check.h>
#if HAVE_SUBUNIT_CHILD_H
#include <subunit/child.h>
......@@ -34,6 +38,20 @@
#include "check_print.h"
#include "check_str.h"
/* localtime_r is apparently not available on Windows */
#ifndef HAVE_LOCALTIME_R
static struct tm *
localtime_r (const time_t * clock, struct tm *result)
{
struct tm *now = localtime (clock);
if (now == NULL) {
return NULL;
} else {
*result = *now;
}
return result;
}
#endif /* HAVE_DECL_LOCALTIME_R */
static void srunner_send_evt (SRunner * sr, void *obj, enum cl_event evt);
......
......@@ -18,9 +18,12 @@
* Boston, MA 02111-1307, USA.
*/
#include "../lib/libcompat.h"
#include "config.h"
#include <sys/types.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <stdlib.h>
#include <fcntl.h>
#include <stdio.h>
......
......@@ -18,16 +18,18 @@
* Boston, MA 02111-1307, USA.
*/
#include "../lib/libcompat.h"
#include "config.h"
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#ifdef HAVE_STDINT_H
#include <stdint.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include "_stdint.h"
#include "check.h"
#include "check_error.h"
#include "check_list.h"
......@@ -35,6 +37,7 @@
#include "check_pack.h"
#ifdef HAVE_PTHREAD
#include <pthread.h>
pthread_mutex_t lock_mutex = PTHREAD_MUTEX_INITIALIZER;
#else
#define pthread_mutex_lock(arg)
......
......@@ -18,7 +18,7 @@
* Boston, MA 02111-1307, USA.
*/
#include "../lib/libcompat.h"
#include "config.h"
#include <stdio.h>
#include <string.h>
......
......@@ -18,9 +18,15 @@
* Boston, MA 02111-1307, USA.
*/
#include "../lib/libcompat.h"
#include "config.h"
#include <sys/types.h>
#ifdef HAVE_SYS_WAIT_H
#include <sys/wait.h>
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
......
......@@ -18,7 +18,7 @@
* Boston, MA 02111-1307, USA.
*/
#include "../lib/libcompat.h"
#include "config.h"
#include <stdio.h>
#include <stdarg.h>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment