summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog22
-rw-r--r--ChangeLogs/ChangeLog-02a22
-rw-r--r--ChangeLogs/ChangeLog-03a22
-rw-r--r--ace/ATM_Stream.cpp9
-rw-r--r--ace/Filecache.cpp2
-rw-r--r--ace/Log_Msg_UNIX_Syslog.cpp9
-rw-r--r--ace/Logging_Strategy.cpp20
-rw-r--r--ace/Synch.cpp7
-rw-r--r--ace/Synch.h2
9 files changed, 98 insertions, 17 deletions
diff --git a/ChangeLog b/ChangeLog
index 6a6bde555e0..bdb810ba95d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,25 @@
+Thu Jun 20 14:32:03 2002 Douglas C. Schmidt <schmidt@macarena.cs.wustl.edu>
+
+ * ace/Synch.cpp (ACE_recursive_mutex_state): Replaced the
+ ACE_OS::mutex_lock/unlock calls with
+ ACE_OS::thread_mutex_lock/unlock so things will work on NT.
+ Thanks to Jeff Parsons for reporting this.
+
+ * ace/Synch.{h,cpp}: Only compile the new
+ ACE_Condition<ACE_Recursive_Thread_Mutex> template
+ specialization if ACE_HAS_THREADS. Thanks to Craig Rodrigues
+ for motivating this.
+
+ * include/makeinclude/platform_sunos5_sunc++.GNU (CC_VERSION): Added
+ additional cases for SunC++ 5.2 and 5.3. Thanks to Carsten
+ Tonsberg Nielsen <ctn@maerskdatadefence.dk> for reporting this.
+
+ * ace/ATM_Stream.cpp (get_peer_name):
+ * ace/Log_Msg_UNIX_Syslog.cpp (log):
+ * ace/Logging_Strategy.cpp: Replaced the use of ACE_OS::strtok() with
+ ACE_OS::strtok_r(). Thanks to Eugene Alterman
+ <eugalt@myrealbox.com> for motivating this.
+
Thu Jun 20 16:02:22 2002 Steve Huston <shuston@riverace.com>
* ace/config-sunos5.5.h: Commented out the below addition for now.
diff --git a/ChangeLogs/ChangeLog-02a b/ChangeLogs/ChangeLog-02a
index 6a6bde555e0..bdb810ba95d 100644
--- a/ChangeLogs/ChangeLog-02a
+++ b/ChangeLogs/ChangeLog-02a
@@ -1,3 +1,25 @@
+Thu Jun 20 14:32:03 2002 Douglas C. Schmidt <schmidt@macarena.cs.wustl.edu>
+
+ * ace/Synch.cpp (ACE_recursive_mutex_state): Replaced the
+ ACE_OS::mutex_lock/unlock calls with
+ ACE_OS::thread_mutex_lock/unlock so things will work on NT.
+ Thanks to Jeff Parsons for reporting this.
+
+ * ace/Synch.{h,cpp}: Only compile the new
+ ACE_Condition<ACE_Recursive_Thread_Mutex> template
+ specialization if ACE_HAS_THREADS. Thanks to Craig Rodrigues
+ for motivating this.
+
+ * include/makeinclude/platform_sunos5_sunc++.GNU (CC_VERSION): Added
+ additional cases for SunC++ 5.2 and 5.3. Thanks to Carsten
+ Tonsberg Nielsen <ctn@maerskdatadefence.dk> for reporting this.
+
+ * ace/ATM_Stream.cpp (get_peer_name):
+ * ace/Log_Msg_UNIX_Syslog.cpp (log):
+ * ace/Logging_Strategy.cpp: Replaced the use of ACE_OS::strtok() with
+ ACE_OS::strtok_r(). Thanks to Eugene Alterman
+ <eugalt@myrealbox.com> for motivating this.
+
Thu Jun 20 16:02:22 2002 Steve Huston <shuston@riverace.com>
* ace/config-sunos5.5.h: Commented out the below addition for now.
diff --git a/ChangeLogs/ChangeLog-03a b/ChangeLogs/ChangeLog-03a
index 6a6bde555e0..bdb810ba95d 100644
--- a/ChangeLogs/ChangeLog-03a
+++ b/ChangeLogs/ChangeLog-03a
@@ -1,3 +1,25 @@
+Thu Jun 20 14:32:03 2002 Douglas C. Schmidt <schmidt@macarena.cs.wustl.edu>
+
+ * ace/Synch.cpp (ACE_recursive_mutex_state): Replaced the
+ ACE_OS::mutex_lock/unlock calls with
+ ACE_OS::thread_mutex_lock/unlock so things will work on NT.
+ Thanks to Jeff Parsons for reporting this.
+
+ * ace/Synch.{h,cpp}: Only compile the new
+ ACE_Condition<ACE_Recursive_Thread_Mutex> template
+ specialization if ACE_HAS_THREADS. Thanks to Craig Rodrigues
+ for motivating this.
+
+ * include/makeinclude/platform_sunos5_sunc++.GNU (CC_VERSION): Added
+ additional cases for SunC++ 5.2 and 5.3. Thanks to Carsten
+ Tonsberg Nielsen <ctn@maerskdatadefence.dk> for reporting this.
+
+ * ace/ATM_Stream.cpp (get_peer_name):
+ * ace/Log_Msg_UNIX_Syslog.cpp (log):
+ * ace/Logging_Strategy.cpp: Replaced the use of ACE_OS::strtok() with
+ ACE_OS::strtok_r(). Thanks to Eugene Alterman
+ <eugalt@myrealbox.com> for motivating this.
+
Thu Jun 20 16:02:22 2002 Steve Huston <shuston@riverace.com>
* ace/config-sunos5.5.h: Commented out the below addition for now.
diff --git a/ace/ATM_Stream.cpp b/ace/ATM_Stream.cpp
index 35be039b86e..0bd8c537eac 100644
--- a/ace/ATM_Stream.cpp
+++ b/ace/ATM_Stream.cpp
@@ -94,12 +94,13 @@ ACE_ATM_Stream::get_peer_name (void) const
// Convert the line to lower case to ease comparison
for (index = 0; index < ACE_OS::strlen (line); ++index)
line[index] = tolower (line[index]);
- if (strstr (line, buffer) != 0)
+ if (ACE_OS::strstr (line, buffer) != 0)
{
+ char *strtok_p;
// Grab the second token which is the host name
- strtok (line, " \t");
- host_ptr = strtok (0, " \t");
- strcpy (host_name, host_ptr);
+ ACE_OS::strtok_r (line, " \t", &strtok_p);
+ host_ptr = strtok (0, " \t", &strtok_p);
+ ACE_OS::strcpy (host_name, host_ptr);
break;
}
}
diff --git a/ace/Filecache.cpp b/ace/Filecache.cpp
index 475ee699bdd..1953252fd6a 100644
--- a/ace/Filecache.cpp
+++ b/ace/Filecache.cpp
@@ -140,7 +140,7 @@ ACE_Filecache_Handle::size (void) const
#define ACE_Filecache_Hash_Entry \
ACE_Hash_Map_Entry<const ACE_TCHAR *, ACE_Filecache_Object *>
-ACE_TEMPLATE_METHOD_SPECIALIZATION
+ACE_TEMPLATE_SPECIALIZATION
ACE_Filecache_Hash_Entry::ACE_Hash_Map_Entry (const ACE_TCHAR *const &ext_id,
ACE_Filecache_Object *const &int_id,
ACE_Filecache_Hash_Entry *next,
diff --git a/ace/Log_Msg_UNIX_Syslog.cpp b/ace/Log_Msg_UNIX_Syslog.cpp
index 3389849240b..7c7af9bbeb5 100644
--- a/ace/Log_Msg_UNIX_Syslog.cpp
+++ b/ace/Log_Msg_UNIX_Syslog.cpp
@@ -81,10 +81,15 @@ ACE_Log_Msg_UNIX_Syslog::log (ACE_Log_Record &log_record)
ACE_TCHAR message[ACE_Log_Record::MAXVERBOSELOGMSGLEN];
ACE_OS::strcpy (message, log_record.msg_data ());
+ ACE_TCHAR *strtokp;
- for (ACE_TCHAR *line = ACE_OS::strtok (message, ACE_LIB_TEXT ("\n"));
+ for (ACE_TCHAR *line = ACE_OS_String::strtok_r (message,
+ ACE_LIB_TEXT ("\n"),
+ &strtokp);
line != 0;
- line = ACE_OS::strtok (0, ACE_LIB_TEXT ("\n")))
+ line = ACE_OS_String::strtok_r (0,
+ ACE_LIB_TEXT ("\n"),
+ &strtokp))
{
// Format the message line. Note that the processing for
// VERBOSE is the same as for VERBOSE_LITE, since syslog()
diff --git a/ace/Logging_Strategy.cpp b/ace/Logging_Strategy.cpp
index a96000d7ffe..42acc11eafa 100644
--- a/ace/Logging_Strategy.cpp
+++ b/ace/Logging_Strategy.cpp
@@ -24,12 +24,17 @@ ACE_Logging_Strategy::priorities (ACE_TCHAR *priority_string,
else
priority_mask = thread_priority_mask_;
+ ACE_TCHAR *strtokp;
+
// Parse string and alternate priority mask.
- for (ACE_TCHAR *priority = ACE_OS::strtok (priority_string,
- ACE_LIB_TEXT ("|"));
+ for (ACE_TCHAR *priority = ACE_OS_String::strtok_r (priority_string,
+ ACE_LIB_TEXT ("|"),
+ &strtokp);
priority != 0;
- priority = ACE_OS::strtok (0, ACE_LIB_TEXT ("|")))
+ priority = ACE_OS_String::strtok_r (0,
+ ACE_LIB_TEXT ("|"),
+ &strtokp))
{
if (ACE_OS::strcmp (priority, ACE_LIB_TEXT ("TRACE")) == 0)
ACE_SET_BITS (priority_mask, LM_TRACE);
@@ -83,10 +88,13 @@ ACE_Logging_Strategy::priorities (ACE_TCHAR *priority_string,
void
ACE_Logging_Strategy::tokenize (ACE_TCHAR *flag_string)
{
- for (ACE_TCHAR *flag = ACE_OS::strtok (flag_string,
- ACE_LIB_TEXT ("|"));
+ ACE_TCHAR *strtokp;
+
+ for (ACE_TCHAR *flag = ACE_OS::strtok_r (flag_string,
+ ACE_LIB_TEXT ("|"),
+ &strtokp);
flag != 0;
- flag = ACE_OS::strtok (0, ACE_LIB_TEXT ("|")))
+ flag = ACE_OS::strtok_r (0, ACE_LIB_TEXT ("|"), &strtokp))
{
if (ACE_OS::strcmp (flag, ACE_LIB_TEXT ("STDERR")) == 0)
ACE_SET_BITS (this->flags_, ACE_Log_Msg::STDERR);
diff --git a/ace/Synch.cpp b/ace/Synch.cpp
index 799587e5810..bf2e9fa79c5 100644
--- a/ace/Synch.cpp
+++ b/ace/Synch.cpp
@@ -936,18 +936,17 @@ ACE_recursive_mutex_state::restore (ACE_recursive_thread_mutex_t &m)
ACE_recursive_mutex_state::ACE_recursive_mutex_state (ACE_Recursive_Thread_Mutex &m)
: mutex_ (m)
{
- if (ACE_OS::mutex_lock (&mutex_.get_nesting_mutex ()) == 0)
+ if (ACE_OS::thread_mutex_lock (&mutex_.get_nesting_mutex ()) == 0)
{
this->save (mutex_.mutex ());
this->reset (mutex_.mutex ());
}
}
-
ACE_recursive_mutex_state::~ACE_recursive_mutex_state (void)
{
this->restore (mutex_.mutex ());
- ACE_OS::mutex_unlock (&mutex_.get_nesting_mutex ());
+ ACE_OS::thread_mutex_unlock (&mutex_.get_nesting_mutex ());
}
ACE_TEMPLATE_METHOD_SPECIALIZATION int
@@ -977,7 +976,7 @@ ACE_Condition<ACE_Recursive_Thread_Mutex>::wait (const ACE_Time_Value *abstime)
ACE_TEMPLATE_METHOD_SPECIALIZATION int
ACE_Condition<ACE_Recursive_Thread_Mutex>::wait (ACE_Recursive_Thread_Mutex &mutex,
- const ACE_Time_Value *abstime)
+ const ACE_Time_Value *abstime)
{
ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex, guard, mutex, -1);
ACE_recursive_mutex_state mutex_state_holder (mutex);
diff --git a/ace/Synch.h b/ace/Synch.h
index 681c2a9443b..77df5983d43 100644
--- a/ace/Synch.h
+++ b/ace/Synch.h
@@ -1805,6 +1805,7 @@ private:
#endif /* ACE_HAS_RECURSIVE_MUTEXES */
};
+#if defined (ACE_HAS_THREADS)
template <class ACE_LOCK>
class ACE_Condition;
@@ -1880,6 +1881,7 @@ public:
ACE_Condition_Recursive_Thread_Mutex (ACE_Recursive_Thread_Mutex &m):
ACE_Condition<ACE_Recursive_Thread_Mutex> (m) {}
};
+#endif /* ACE_HAS_THREADS */
#if defined (ACE_LEGACY_MODE)
# include "ace/File_Lock.h"