|
From: <sv...@va...> - 2009-01-16 13:25:21
|
Author: bart
Date: 2009-01-16 12:07:52 +0000 (Fri, 16 Jan 2009)
New Revision: 8969
Log:
Make sure that sigalrm.c compiles correctly on systems that do not have the header file <asm/unistd.h>.
Modified:
trunk/drd/tests/sigalrm.c
Modified: trunk/drd/tests/sigalrm.c
===================================================================
--- trunk/drd/tests/sigalrm.c 2009-01-16 12:06:54 UTC (rev 8968)
+++ trunk/drd/tests/sigalrm.c 2009-01-16 12:07:52 UTC (rev 8969)
@@ -1,4 +1,4 @@
-#if !defined(_AIX)
+#include "../../config.h"
#include <assert.h>
#include <errno.h>
#include <pthread.h>
@@ -8,7 +8,9 @@
#include <string.h>
#include <time.h>
#include <unistd.h>
-#include <asm/unistd.h>
+#ifdef HAVE_ASM_UNISTD_H
+#include <asm/unistd.h> // __NR_gettid
+#endif
#include "../drd.h"
@@ -84,11 +86,3 @@
return 0;
}
-
-#else /* !defined(_AIX) */
-#include <stdio.h>
-int main ( void ) {
- fprintf(stderr, "This test does not compile on AIX5.\n");
- return 0;
-}
-#endif /* !defined(_AIX) */
|