summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordhinton <dhinton@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-06-25 03:55:29 +0000
committerdhinton <dhinton@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-06-25 03:55:29 +0000
commita51902fff2d9f266bb6d03cbe04003605846aea8 (patch)
tree96d21bb87fac7d8ca5bb9557b63eaf881a129d98
parent2f5bb0e4e9ff9af3a36de1f6401fd1c25d6fee09 (diff)
downloadATCD-a51902fff2d9f266bb6d03cbe04003605846aea8.tar.gz
ChangeLogTag:Wed Jun 25 03:47:36 UTC 2003 Don Hinton <dhinton@dresystems.com>
-rw-r--r--ChangeLog13
-rw-r--r--ace/config-linux.h14
-rw-r--r--ace/os_include/os_pthread.h12
-rw-r--r--tests/Makefile.tests11
4 files changed, 36 insertions, 14 deletions
diff --git a/ChangeLog b/ChangeLog
index 0b6e396b9f8..499898f933a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+Wed Jun 25 03:47:36 UTC 2003 Don Hinton <dhinton@dresystems.com>
+
+ * ace/config-linux.h:
+ * ace/os_include/os_pthread.h:
+ Removed include of pthread.h from config-linux.h and moved the
+ pthread_mutex_timedlock() declaration to os_pthread.h.
+
+ * tests/Makefile.tests:
+ Added special build rule when on hpux that changes the link
+ order, i.e., main.o comes before x_Test.o. Hopefully this
+ will clear up linker errors on Hp with the gcc compiler that
+ started appearing after the tests directory was reorganized.
+
Tue Jun 24 18:38:33 2003 Pradeep Gore <pradeep@oomworks.com>
* bin/tao_other_tests.lst:
diff --git a/ace/config-linux.h b/ace/config-linux.h
index 6aa891c4335..624944217dc 100644
--- a/ace/config-linux.h
+++ b/ace/config-linux.h
@@ -51,20 +51,6 @@
#define ACE_HAS_2_PARAM_ASCTIME_R_AND_CTIME_R
#endif
-#include /**/ <pthread.h>
-
-#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)
- // glibc 2.2.x or better has pthread_mutex_timedlock()
-# define ACE_HAS_MUTEX_TIMEOUTS
-# if !defined (_XOPEN_SOURCE) \
- || (defined (_XOPEN_SOURCE) && (_XOPEN_SOURCE - 0) < 600)
-// pthread_mutex_timedlock() prototype is not visible if _XOPEN_SOURCE
-// is not >= 600 (i.e. for XPG6).
-extern "C" int pthread_mutex_timedlock (pthread_mutex_t *mutex,
- const struct timespec * abstime);
-# endif /* _XOPEN_SOURCE && _XOPEN_SOURCE < 600 */
-#endif /* (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) */
-
#endif /* ACE_MT_SAFE */
diff --git a/ace/os_include/os_pthread.h b/ace/os_include/os_pthread.h
index d982089d518..9f4e90940b4 100644
--- a/ace/os_include/os_pthread.h
+++ b/ace/os_include/os_pthread.h
@@ -395,6 +395,18 @@ protected:
typedef pthread_rwlock_t ACE_rwlock_t;
# endif /* ACE_HAS_PTHREADS_UNIX98_EXT */
+#if defined (linux) && ((__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2))
+ // glibc 2.2.x or better has pthread_mutex_timedlock()
+# define ACE_HAS_MUTEX_TIMEOUTS
+# if !defined (_XOPEN_SOURCE) \
+ || (defined (_XOPEN_SOURCE) && (_XOPEN_SOURCE - 0) < 600)
+// pthread_mutex_timedlock() prototype is not visible if _XOPEN_SOURCE
+// is not >= 600 (i.e. for XPG6).
+extern "C" int pthread_mutex_timedlock (pthread_mutex_t *mutex,
+ const struct timespec * abstime);
+# endif /* _XOPEN_SOURCE && _XOPEN_SOURCE < 600 */
+#endif /* linux && ((__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)) */
+
#endif /* ACE_HAS_PTHREADS */
#include "ace/post.h"
diff --git a/tests/Makefile.tests b/tests/Makefile.tests
index db7a345606a..22b8272c81f 100644
--- a/tests/Makefile.tests
+++ b/tests/Makefile.tests
@@ -189,7 +189,18 @@ endif # shared_libs
include $(ACE_ROOT)/include/makeinclude/rules.common.GNU
include $(ACE_ROOT)/include/makeinclude/rules.nested.GNU
+
+# The linker on hpux seems to have a problem if the objects aren't linked
+# in the right order. This is an attempt to fix that, i.e., main.o comes
+# before x_Test.o, which comes before libTest_Output, etc...
+ifeq ($(with_ld),hpux)
+VOBJS = $(addsuffix .$(OBJEXT),$(addprefix $(VDIR),$(basename $(notdir $(SRC)))))
+
+$(BIN): %: $(VOBJS) $(VDIR)%.$(OBJEXT)
+ $(LINK.cc) $(LDFLAGS) $(CC_OUTPUT_FLAG) $@ $^ $(VLDLIBS) $(POSTLINK)
+else
include $(ACE_ROOT)/include/makeinclude/rules.bin.GNU
+endif
ifdef purify
#### SIGINT is used by Thread_Manager_Test.