trawick 01/03/14 07:56:52
Modified: test testthread.c
Log:
Get testthread to build and run appropriately when APR has no thread
support.
Revision Changes Path
1.17 +11 -0 apr/test/testthread.c
Index: testthread.c
===================================================================
RCS file: /home/cvs/apr/test/testthread.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- testthread.c 2001/02/16 04:16:11 1.16
+++ testthread.c 2001/03/14 15:56:44 1.17
@@ -62,6 +62,15 @@
#include <unistd.h>
#endif
+#if !APR_HAS_THREADS
+int main(void)
+{
+ fprintf(stderr,
+ "This program won't work on this platform because there is no "
+ "support for threads.\n");
+ return 0;
+}
+#else /* !APR_HAS_THREADS */
void * APR_THREAD_FUNC thread_func1(void *data);
void * APR_THREAD_FUNC thread_func2(void *data);
@@ -175,3 +184,5 @@
#endif
return 1;
}
+
+#endif /* !APR_HAS_THREADS */