summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorРуслан Ижбулатов <lrn1986@gmail.com>2009-12-18 21:28:35 +0000
committerTim-Philipp Müller <tim.muller@collabora.co.uk>2009-12-19 14:12:09 +0000
commite08cb58aa8766470295c3d0bc429bdd6a0b4e8f2 (patch)
tree9e712c732b57b8320cfbda27e7621783ea78b4f8
parentdd77e42e91994af4f4f3afc8c049e9fe4ddc430d (diff)
check: patch internal check copy so it works with our build system
Fixes #604565.
-rw-r--r--libs/gst/check/libcheck/check.c2
-rw-r--r--libs/gst/check/libcheck/check_error.c2
-rw-r--r--libs/gst/check/libcheck/check_list.c2
-rw-r--r--libs/gst/check/libcheck/check_log.c20
-rw-r--r--libs/gst/check/libcheck/check_msg.c5
-rw-r--r--libs/gst/check/libcheck/check_pack.c9
-rw-r--r--libs/gst/check/libcheck/check_print.c2
-rw-r--r--libs/gst/check/libcheck/check_run.c8
-rw-r--r--libs/gst/check/libcheck/check_str.c2
9 files changed, 41 insertions, 11 deletions
diff --git a/libs/gst/check/libcheck/check.c b/libs/gst/check/libcheck/check.c
index 3073a1b53..fe4007a86 100644
--- a/libs/gst/check/libcheck/check.c
+++ b/libs/gst/check/libcheck/check.c
@@ -18,7 +18,7 @@
* Boston, MA 02111-1307, USA.
*/
-#include "../lib/libcompat.h"
+#include "config.h"
#include <string.h>
#include <stdio.h>
diff --git a/libs/gst/check/libcheck/check_error.c b/libs/gst/check/libcheck/check_error.c
index b0273f0cc..71add6d73 100644
--- a/libs/gst/check/libcheck/check_error.c
+++ b/libs/gst/check/libcheck/check_error.c
@@ -18,7 +18,7 @@
* Boston, MA 02111-1307, USA.
*/
-#include "../lib/libcompat.h"
+#include "config.h"
#include <stdarg.h>
#include <stdlib.h>
diff --git a/libs/gst/check/libcheck/check_list.c b/libs/gst/check/libcheck/check_list.c
index f8949a051..d73a22279 100644
--- a/libs/gst/check/libcheck/check_list.c
+++ b/libs/gst/check/libcheck/check_list.c
@@ -18,7 +18,7 @@
* Boston, MA 02111-1307, USA.
*/
-#include "../lib/libcompat.h"
+#include "config.h"
#include <stdlib.h>
#include <string.h>
diff --git a/libs/gst/check/libcheck/check_log.c b/libs/gst/check/libcheck/check_log.c
index e30258fac..8a0e3eb3f 100644
--- a/libs/gst/check/libcheck/check_log.c
+++ b/libs/gst/check/libcheck/check_log.c
@@ -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);
diff --git a/libs/gst/check/libcheck/check_msg.c b/libs/gst/check/libcheck/check_msg.c
index 6cc1b0c25..6fbff43c7 100644
--- a/libs/gst/check/libcheck/check_msg.c
+++ b/libs/gst/check/libcheck/check_msg.c
@@ -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>
diff --git a/libs/gst/check/libcheck/check_pack.c b/libs/gst/check/libcheck/check_pack.c
index 3d4aeab00..c25decea3 100644
--- a/libs/gst/check/libcheck/check_pack.c
+++ b/libs/gst/check/libcheck/check_pack.c
@@ -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)
diff --git a/libs/gst/check/libcheck/check_print.c b/libs/gst/check/libcheck/check_print.c
index 2b71b27d5..d4f7d7a23 100644
--- a/libs/gst/check/libcheck/check_print.c
+++ b/libs/gst/check/libcheck/check_print.c
@@ -18,7 +18,7 @@
* Boston, MA 02111-1307, USA.
*/
-#include "../lib/libcompat.h"
+#include "config.h"
#include <stdio.h>
#include <string.h>
diff --git a/libs/gst/check/libcheck/check_run.c b/libs/gst/check/libcheck/check_run.c
index 74e6de559..18a36a091 100644
--- a/libs/gst/check/libcheck/check_run.c
+++ b/libs/gst/check/libcheck/check_run.c
@@ -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>
diff --git a/libs/gst/check/libcheck/check_str.c b/libs/gst/check/libcheck/check_str.c
index 87131be8e..a194111f9 100644
--- a/libs/gst/check/libcheck/check_str.c
+++ b/libs/gst/check/libcheck/check_str.c
@@ -18,7 +18,7 @@
* Boston, MA 02111-1307, USA.
*/
-#include "../lib/libcompat.h"
+#include "config.h"
#include <stdio.h>
#include <stdarg.h>