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

Fixes #604565.
This commit is contained in:
Руслан Ижбулатов 2009-12-18 21:28:35 +00:00 committed by Tim-Philipp Müller
parent dd77e42e91
commit e08cb58aa8
9 changed files with 41 additions and 11 deletions

View file

@ -18,7 +18,7 @@
* Boston, MA 02111-1307, USA. * Boston, MA 02111-1307, USA.
*/ */
#include "../lib/libcompat.h" #include "config.h"
#include <string.h> #include <string.h>
#include <stdio.h> #include <stdio.h>

View file

@ -18,7 +18,7 @@
* Boston, MA 02111-1307, USA. * Boston, MA 02111-1307, USA.
*/ */
#include "../lib/libcompat.h" #include "config.h"
#include <stdarg.h> #include <stdarg.h>
#include <stdlib.h> #include <stdlib.h>

View file

@ -18,7 +18,7 @@
* Boston, MA 02111-1307, USA. * Boston, MA 02111-1307, USA.
*/ */
#include "../lib/libcompat.h" #include "config.h"
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>

View file

@ -18,10 +18,14 @@
* Boston, MA 02111-1307, USA. * Boston, MA 02111-1307, USA.
*/ */
#include "../lib/libcompat.h" #include "config.h"
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#include <time.h>
#include <check.h> #include <check.h>
#if HAVE_SUBUNIT_CHILD_H #if HAVE_SUBUNIT_CHILD_H
#include <subunit/child.h> #include <subunit/child.h>
@ -34,6 +38,20 @@
#include "check_print.h" #include "check_print.h"
#include "check_str.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); static void srunner_send_evt (SRunner * sr, void *obj, enum cl_event evt);

View file

@ -18,9 +18,12 @@
* Boston, MA 02111-1307, USA. * Boston, MA 02111-1307, USA.
*/ */
#include "../lib/libcompat.h" #include "config.h"
#include <sys/types.h> #include <sys/types.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <stdlib.h> #include <stdlib.h>
#include <fcntl.h> #include <fcntl.h>
#include <stdio.h> #include <stdio.h>

View file

@ -18,16 +18,18 @@
* Boston, MA 02111-1307, USA. * Boston, MA 02111-1307, USA.
*/ */
#include "../lib/libcompat.h" #include "config.h"
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <stdio.h> #include <stdio.h>
#ifdef HAVE_STDINT_H #ifdef HAVE_UNISTD_H
#include <stdint.h> #include <unistd.h>
#endif #endif
#include "_stdint.h"
#include "check.h" #include "check.h"
#include "check_error.h" #include "check_error.h"
#include "check_list.h" #include "check_list.h"
@ -35,6 +37,7 @@
#include "check_pack.h" #include "check_pack.h"
#ifdef HAVE_PTHREAD #ifdef HAVE_PTHREAD
#include <pthread.h>
pthread_mutex_t lock_mutex = PTHREAD_MUTEX_INITIALIZER; pthread_mutex_t lock_mutex = PTHREAD_MUTEX_INITIALIZER;
#else #else
#define pthread_mutex_lock(arg) #define pthread_mutex_lock(arg)

View file

@ -18,7 +18,7 @@
* Boston, MA 02111-1307, USA. * Boston, MA 02111-1307, USA.
*/ */
#include "../lib/libcompat.h" #include "config.h"
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>

View file

@ -18,9 +18,15 @@
* Boston, MA 02111-1307, USA. * Boston, MA 02111-1307, USA.
*/ */
#include "../lib/libcompat.h" #include "config.h"
#include <sys/types.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 <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>

View file

@ -18,7 +18,7 @@
* Boston, MA 02111-1307, USA. * Boston, MA 02111-1307, USA.
*/ */
#include "../lib/libcompat.h" #include "config.h"
#include <stdio.h> #include <stdio.h>
#include <stdarg.h> #include <stdarg.h>