summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorseibel_r <seibel_r@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2002-12-18 16:47:28 +0000
committerseibel_r <seibel_r@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2002-12-18 16:47:28 +0000
commit913a8e09721f35245b6be09cffcc191a5b9cd43d (patch)
tree4a8210818854c93bd79429f96e675af0d199e89e
parent6dd8b17b0380e0d78cf57c9700ad5d8b6435d746 (diff)
downloadATCD-913a8e09721f35245b6be09cffcc191a5b9cd43d.tar.gz
Wed Dec 18 08:29:04 2002 Rich Seibel <seibel_r@ociweb.com>
-rw-r--r--ChangeLog28
-rw-r--r--ChangeLogs/ChangeLog-03a28
-rw-r--r--ace/Lib_Find.cpp6
-rw-r--r--ace/OS.i5
-rw-r--r--ace/Sock_Connect.cpp4
-rw-r--r--ace/Synch.cpp11
-rw-r--r--ace/config-macosx.h6
-rw-r--r--tests/MM_Shared_Memory_Test.cpp3
-rw-r--r--tests/Priority_Task_Test.cpp9
9 files changed, 95 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 3c77f8db8a5..9fa92130c9d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -21,6 +21,34 @@ Mon Dec 16 16:34:23 2002 Nanbor Wang <nanbor@cs.wustl.edu>
Wed Dec 18 08:29:04 2002 Rich Seibel <seibel_r@ociweb.com>
+ * ace/Synch.cpp: Added code to generate a unique name if a
+ platform lacks unnamed semaphores (MACOSX 10.2).
+
+ * ace/Sock_Connect.cpp: Added a conditional include for
+ ifaddrs.h (MACOSX 10.2).
+
+ * tests/Priority_Task_Test.cpp: Changed test to notify
+ if platform does not implement getprio instead of fail.
+ (MACOSX 10.2)
+
+ * tests/MM_Shared_Memory_Test.cpp: Changed compile time test to
+ pick up the right implementation on platform that have
+ POSIX semaphores but not SYSV semaphores (MACOSX 10.2).
+
+ * ace/Lib_Find.cpp
+ ace/config-macosx.h:
+
+ Gave the builder a choice of where to get the dlcompat package.
+
+ * ace/OS.i
+ ace/config-macosx.h:
+
+ Added a switch to eliminate an error message since the dlcompat
+ provided APPLE dynamic linkage does not support unloading thus
+ complains on the use of dlclose.
+
+Wed Dec 18 08:29:04 2002 Rich Seibel <seibel_r@ociweb.com>
+
* ace/Timer_Wheel_T.cpp:
Changed types from int to long to match the return
diff --git a/ChangeLogs/ChangeLog-03a b/ChangeLogs/ChangeLog-03a
index 3c77f8db8a5..9fa92130c9d 100644
--- a/ChangeLogs/ChangeLog-03a
+++ b/ChangeLogs/ChangeLog-03a
@@ -21,6 +21,34 @@ Mon Dec 16 16:34:23 2002 Nanbor Wang <nanbor@cs.wustl.edu>
Wed Dec 18 08:29:04 2002 Rich Seibel <seibel_r@ociweb.com>
+ * ace/Synch.cpp: Added code to generate a unique name if a
+ platform lacks unnamed semaphores (MACOSX 10.2).
+
+ * ace/Sock_Connect.cpp: Added a conditional include for
+ ifaddrs.h (MACOSX 10.2).
+
+ * tests/Priority_Task_Test.cpp: Changed test to notify
+ if platform does not implement getprio instead of fail.
+ (MACOSX 10.2)
+
+ * tests/MM_Shared_Memory_Test.cpp: Changed compile time test to
+ pick up the right implementation on platform that have
+ POSIX semaphores but not SYSV semaphores (MACOSX 10.2).
+
+ * ace/Lib_Find.cpp
+ ace/config-macosx.h:
+
+ Gave the builder a choice of where to get the dlcompat package.
+
+ * ace/OS.i
+ ace/config-macosx.h:
+
+ Added a switch to eliminate an error message since the dlcompat
+ provided APPLE dynamic linkage does not support unloading thus
+ complains on the use of dlclose.
+
+Wed Dec 18 08:29:04 2002 Rich Seibel <seibel_r@ociweb.com>
+
* ace/Timer_Wheel_T.cpp:
Changed types from int to long to match the return
diff --git a/ace/Lib_Find.cpp b/ace/Lib_Find.cpp
index c681f75463a..9c1c52f1388 100644
--- a/ace/Lib_Find.cpp
+++ b/ace/Lib_Find.cpp
@@ -378,7 +378,7 @@ ACE_Lib_Find::ldname (const ACE_TCHAR *entry_point)
{
ACE_TRACE ("ACE_Lib_Find::ldname");
-#if defined (__BORLANDC__) || defined(__APPLE__)
+#if defined (__BORLANDC__) || defined(ACE_NEEDS_DL_UNDERSCORE)
size_t size =
1 // leading '_'
+ ACE_OS::strlen (entry_point)
@@ -393,7 +393,7 @@ ACE_Lib_Find::ldname (const ACE_TCHAR *entry_point)
ACE_OS::strcat (new_name, entry_point);
return new_name;
-#else /* __BORLANDC__ || __APPLE__ */
+#else /* __BORLANDC__ || ACE_NEEDS_DL_UNDERSCORE */
size_t size =
ACE_OS::strlen (entry_point)
+ 1;
@@ -406,7 +406,7 @@ ACE_Lib_Find::ldname (const ACE_TCHAR *entry_point)
ACE_OS::strcpy (new_name, entry_point);
return new_name;
-#endif /* __BORLANDC__ || __APPLE__ */
+#endif /* __BORLANDC__ || ACE_NEEDS_DL_UNDERSCORE */
}
int
diff --git a/ace/OS.i b/ace/OS.i
index 0feadb79ec6..67d262d0bb6 100644
--- a/ace/OS.i
+++ b/ace/OS.i
@@ -7919,7 +7919,10 @@ ACE_INLINE int
ACE_OS::dlclose (ACE_SHLIB_HANDLE handle)
{
ACE_OS_TRACE ("ACE_OS::dlclose");
-#if defined (ACE_HAS_SVR4_DYNAMIC_LINKING)
+#if defined (ACE_LACKS_DLCLOSE)
+ ACE_UNUSED_ARG (handle);
+ return 0;
+#elif defined (ACE_HAS_SVR4_DYNAMIC_LINKING)
# if !defined (ACE_HAS_AUTOMATIC_INIT_FINI)
// SunOS4 does not automatically call _fini()!
diff --git a/ace/Sock_Connect.cpp b/ace/Sock_Connect.cpp
index 08c5827ee4c..4c7caacee71 100644
--- a/ace/Sock_Connect.cpp
+++ b/ace/Sock_Connect.cpp
@@ -8,6 +8,10 @@
#include "ace/Auto_Ptr.h"
#include "ace/SString.h"
+# if defined (ACE_HAS_GETIFADDRS)
+# include /**/ <ifaddrs.h>
+# endif /* ACE_HAS_GETIFADDRS */
+
#if defined (VXWORKS)
#include /**/ <inetLib.h>
#include /**/ <netinet/in_var.h>
diff --git a/ace/Synch.cpp b/ace/Synch.cpp
index 0556f936fb7..b77a48d00af 100644
--- a/ace/Synch.cpp
+++ b/ace/Synch.cpp
@@ -2,6 +2,7 @@
#define ACE_SYNCH_C
#include "ace/Thread.h"
+#include "ace/ACE.h"
#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
@@ -144,8 +145,18 @@ ACE_Semaphore::ACE_Semaphore (u_int count,
: removed_ (0)
{
// ACE_TRACE ("ACE_Semaphore::ACE_Semaphore");
+#if defined(ACE_LACKS_UNNAMED_SEMAPHORE)
+// if the user does not provide a name, we generate a unique name here
+ ACE_TCHAR iname[ACE_UNIQUE_NAME_LEN];
+ if (name == 0)
+ ACE::unique_name (this, iname, ACE_UNIQUE_NAME_LEN);
+ if (ACE_OS::sema_init (&this->semaphore_, count, type,
+ name ? name : iname,
+ arg, max) != 0)
+#else
if (ACE_OS::sema_init (&this->semaphore_, count, type,
name, arg, max) != 0)
+#endif
ACE_ERROR ((LM_ERROR,
ACE_LIB_TEXT ("%p\n"),
ACE_LIB_TEXT ("ACE_Semaphore::ACE_Semaphore")));
diff --git a/ace/config-macosx.h b/ace/config-macosx.h
index 3acf5865f05..3176de9757d 100644
--- a/ace/config-macosx.h
+++ b/ace/config-macosx.h
@@ -164,16 +164,22 @@
#define ACE_LACKS_SIGINFO_H
#define ACE_HAS_UCONTEXT_T
#define ACE_HAS_GETIFADDRS
+#define ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES
+#define ACE_LACKS_UNNAMED_SEMAPHORE
// dlcompat package (not part of base Darwin) is needed for dlopen().
+// You may download directly from sourceforge and install or use fink
// Fink installer puts libraries in /sw/lib and headers in /sw/include
// In order to install dlcompat do the following:
// - download fink from http://fink.sf.net
// - type:
// fink install dlcompat
+// as of Dec 2002, if you use fink you will need to uncomment the next line
+//#define ACE_NEEDS_DL_UNDERSCORE
#define ACE_HAS_SVR4_DYNAMIC_LINKING
#define ACE_LD_SEARCH_PATH ACE_LIB_TEXT ("DYLD_LIBRARY_PATH")
#define ACE_DLL_SUFFIX ACE_LIB_TEXT (".dylib")
+#define ACE_LACKS_DLCLOSE
// gperf seems to need this
#define ACE_HAS_NONSTATIC_OBJECT_MANAGER
diff --git a/tests/MM_Shared_Memory_Test.cpp b/tests/MM_Shared_Memory_Test.cpp
index ad3f01890bd..9a6667a693c 100644
--- a/tests/MM_Shared_Memory_Test.cpp
+++ b/tests/MM_Shared_Memory_Test.cpp
@@ -38,7 +38,7 @@ static ACE_TCHAR *shm_key;
#if defined (ACE_LACKS_FORK)
typedef ACE_Thread_Semaphore SYNCHRONIZER;
-#elif defined (ACE_HAS_POSIX_SEM)
+#elif defined (ACE_HAS_POSIX_SEM) && defined(ACE_HAS_SYSV_IPC)
class SYNCHRONIZER : public ACE_SV_Semaphore_Simple
{
// = TITLE
@@ -112,6 +112,7 @@ parent (void * = 0)
// Allow the child to proceed.
result = synchronizer->release ();
+ ACE_DEBUG((LM_ERROR, "(%P|%t) %p\n", "release failed"));
ACE_ASSERT (result != -1);
// Perform a "busy wait" until the child sets the character to '*'.
diff --git a/tests/Priority_Task_Test.cpp b/tests/Priority_Task_Test.cpp
index 500f0aafd81..2af4365537e 100644
--- a/tests/Priority_Task_Test.cpp
+++ b/tests/Priority_Task_Test.cpp
@@ -134,10 +134,19 @@ Priority_Task::svc (void)
int prio;
if (ACE_Thread::getprio (thr_handle, prio) == -1)
+ {
+ if (errno == ENOTSUP)
+ {
+ ACE_DEBUG((LM_DEBUG,
+ ACE_TEXT ("getprior not supported on this platform\n")
+ ));
+ return 0;
+ }
ACE_ERROR_RETURN ((LM_ERROR,
ACE_TEXT ("%p\n"),
ACE_TEXT ("getprio failed")),
-1);
+ }
if (prio == this->priority_)
ACE_DEBUG ((LM_DEBUG,