]> granicus.if.org Git - check/commitdiff
* move #include <unistd.h> and <pthread.h> to libcompat.h
authorcpickett <cpickett@64e312b2-a51f-0410-8e61-82d0ca0eb02a>
Wed, 31 Dec 2008 03:01:37 +0000 (03:01 +0000)
committercpickett <cpickett@64e312b2-a51f-0410-8e61-82d0ca0eb02a>
Wed, 31 Dec 2008 03:01:37 +0000 (03:01 +0000)
git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@501 64e312b2-a51f-0410-8e61-82d0ca0eb02a

lib/libcompat.h
src/check_msg.c
src/check_pack.c
src/check_run.c
tests/check_check_fork.c
tests/check_check_pack.c
tests/check_check_sub.c
tests/check_thread_stress.c

index f9d8ecd9529cf3e844b1b91b770c8241b967c44b..4f14c3e32437ba2e4bd21ecbea1f77fe78b287cf 100644 (file)
 /* defines FILE */
 #include <stdio.h>
 
+/* declares fork(), _POSIX_VERSION.  according to Autoconf.info,
+   unistd.h defines _POSIX_VERSION if the system is POSIX-compliant,
+   so we will use this as a test for all things uniquely provided by
+   POSIX like sigaction() and fork() */
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+/* declares pthread_create and friends */
+#ifdef HAVE_PTHREAD
+#include <pthread.h>
+#endif
+
 /* replacement functions for broken originals */
 #if !HAVE_MALLOC
 void *rpl_malloc (size_t n);
index c2214cc1b15114d3e521f1f90f4e1795f63f15e3..9ec44cd2e50c71fb5e0fbe2d6aab9604e4725bed 100644 (file)
@@ -22,7 +22,6 @@
 #include "../lib/libcompat.h"
 
 #include <sys/types.h>
-#include <unistd.h>
 #include <stdlib.h>
 #include <fcntl.h>
 #include <stdio.h>
index d2fd7570fe28d827a96c58f530b92d1d32f4489e..2c9acf56e37af1ddb01a06a34836e799e59292bf 100644 (file)
 #include <string.h>
 #include <stdio.h>
 
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
 #ifdef HAVE_STDINT_H
 #include <stdint.h>
 #endif
 
-#ifdef HAVE_PTHREAD
-#include <pthread.h>
-#endif
-
 #include "check.h"
 #include "check_error.h"
 #include "check_list.h"
index c1876cbec66b41f35a1496da348b542a0a6969de..27fb377584f5b1cb6e4401f67c43743335443a30 100644 (file)
 #ifdef HAVE_SYS_WAIT_H
 #include <sys/wait.h>
 #endif
-/* according to Autoconf.info, unistd.h defines _POSIX_VERSION if the
-   system is POSIX-compliant, so we will use this as a test for all
-   things provided by POSIX like sigaction() and fork(). */
-#include <unistd.h>
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
index 631f8be3bf61dcb362b556d3f5e888357068c08e..447e44d1572eec7342f21f0e9b76507f3790bdd9 100644 (file)
@@ -1,7 +1,6 @@
 #include "../lib/libcompat.h"
 
 #include <sys/types.h>
-#include <unistd.h>
 #include <stdlib.h>
 #include <check.h>
 #include "check_check.h"
index 21f06f0f16a1d6038bb7b2bcaa10b83ae29a485b..898ec298a077096c1e6e6044fbd2db8bfa904a33 100644 (file)
@@ -3,7 +3,6 @@
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
-#include <unistd.h>
 
 #include "check.h"
 #include "check_pack.h"
index f9b0b1bc61acb21e1ad8e5b562e4b163be6ddcee..8a6cca53d2aa0ae8dc0ae9f1f826ba646bfbc0b8 100644 (file)
@@ -4,7 +4,6 @@
 #if HAVE_SYS_WAIT_H
 #include <sys/wait.h>
 #endif /* HAVE_SYS_WAIT_H */
-#include <unistd.h>
 #include <stdlib.h>
 #include <signal.h>
 #include <check.h>
index b8ff6782cdecd64511f62578f03b0365c6292c73..80a53d597fc68999f16970bc58e344dd5fd6d678 100644 (file)
@@ -6,15 +6,6 @@
 #include <stdio.h>
 #include <check.h>
 
-/* fork() */
-#ifdef HAVE_UNISTD_H
-#include <unistd.h> 
-#endif
-
-#ifdef HAVE_PTHREAD
-#include <pthread.h>
-#endif
-
 Suite *s;
 TCase *tc;
 SRunner *sr;