summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ACE-INSTALL.html21
-rw-r--r--ChangeLog-96b74
-rw-r--r--INSTALL20
-rw-r--r--ace/OS.cpp151
-rw-r--r--ace/OS.h15
-rw-r--r--ace/OS.i26
-rw-r--r--ace/README1
-rw-r--r--ace/SOCK_Dgram.cpp2
-rw-r--r--ace/Service_Config.cpp2
-rw-r--r--ace/Synch_T.cpp27
-rw-r--r--ace/config-osf1-4.0-g++.h12
-rw-r--r--ace/config-osf1-4.0.h8
-rw-r--r--include/makeinclude/platform_osf1_4.0_g++.GNU15
-rw-r--r--tests/TSS_Test.cpp6
14 files changed, 259 insertions, 121 deletions
diff --git a/ACE-INSTALL.html b/ACE-INSTALL.html
index 3670d9ac6fc..021f1ccf118 100644
--- a/ACE-INSTALL.html
+++ b/ACE-INSTALL.html
@@ -123,12 +123,19 @@ using the GNU G++
In the meantime, you might try using GNU GCC or SunC++
on HP/UX. <P>
-<DT> <B> OSF/1 3.2 </B> <P>
+<DT> <B> OSF/1 3.2 and 4.0 (a.k.a. Digital UNIX 4.0a) </B> <P>
-<DD> The current OSF/1 C++ 5.1 compiler is also rather poor and there
- seems to be no way to build shared libraries with templates
- on OSF/1. I've also heard that the new version of this
- compiler (5.3) is better. Again, you might try GNU GCC. <P>
+<DD> The current OSF/1 C++ 5.4 compiler still seems to have problems
+with ACE's templates. It compiles the lib and test programs, although
+giving warnings about template usage. Most tests run, some dump core.
+Hopefully newer compiler releases will alleviate these problems. <P>
+
+GNU gcc 2.7.2.1 compiles without problems. All tests run (besides
+minor problems). Thanks to Thilo Kielmann &lt<A
+HREF="mailto:kielmann@informatik.uni-siegen.de">
+kielmann@informatik.uni-siegen.de</A>&gt and David Trumble &lt<A
+HREF="mailto:trumble@cvg.enet.dec.com">trumble@cvg.enet.dec.com</A>&gt
+for help with this port. <P>
<DT><B> UnixWare 2.01 </B> <P>
<DD>
@@ -162,6 +169,10 @@ If you use the GNU GCC C++ compiler please note the following: <P>
this specifies whether your gcc install uses, for
example, Solaris's "/usr/ccs/bin" binary utils or
GNU binary utils. <P>
+
+ <LI> Make sure that the linker invoked by GCC produces code
+ that initializes static objects. Please see GCC's
+ documentation for using <CODE>collect2</CODE>.<P>
</UL>
<P><HR><P>
diff --git a/ChangeLog-96b b/ChangeLog-96b
index 803bf63ac30..0e8674642e4 100644
--- a/ChangeLog-96b
+++ b/ChangeLog-96b
@@ -1,9 +1,49 @@
+<<<<<<< ChangeLog-96b
+Thu Nov 21 00:05:11 1996 Douglas C. Schmidt <schmidt@tango.cs.wustl.edu>
+
+ * ace: Backed out all of Detlef's changes to ACE_OS and
+ ACE_TSS::ts_get(). It turns out that this is unnecessary since
+ he reimplemented ACE_TSS_Cleanup so that it no longer needs to
+ hold the lock when callbacks are made. Once again, Detlef
+ proves that he's a man, not a boy ;-)
+
+=======
Wed Nov 20 21:35:28 1996 David L. Levine <levine@cs.wustl.edu>
* ace/Svc_Conf_l.cpp: added #include of ace/config.h so that
conditions for include of ace/OS.h can be checked
+>>>>>>> 4.32
Wed Nov 20 02:38:40 1996 Douglas C. Schmidt <schmidt@tango.cs.wustl.edu>
+ * ace/Service_Config.cpp: Moved the definition of logger_key_ to
+ OS.h and changed it to a macro (ACE_LOGGER_KEY) so that it will
+ be portable to Win32 and UNIX. Thanks to Tilo for reporting
+ this.
+
+ * ace/OS: Changed the return value of ACE_OS::getgid() from uid_t
+ to gid_t to be POSIX compliant.
+
+ * ace/OS.cpp (thr_create): Fixed a typo where we were assigning
+ stacksize rather than size. Thanks Thilo.
+
+ * ace/OS.cpp (thr_create): Added a new piece of code for
+ ACE_NEEDS_HUGE_THREAD_STACKSIZE, which is necessary to create a
+ larger per-thread stack size in order to run ACE_Log_Msg::log.
+ Thanks to Thilo for this.
+
+ * tests/TSS_Test.cpp: Changed the name of the static variable
+ "lock" to "cout_lock" to avoid a potential namespace clash on
+ Digital UNIX. Thanks to Thilo Kielmann for reporting this.
+
+ * ace/SOCK_Dgram.cpp (recv): Added a cast (char *)
+ io_vec->iov_base so that this would work correctly on platforms
+ where iov_base is a void * (e.g., AIX and HP/UX). Thanks to
+ Alan Stewart for the change.
+
+ * ace/OS.h: Added a few new changes for Digital UNIX 4.0a. These
+ should fix problems with ctime_r() and asctime_r(). Thanks to
+ Dave Trumble for the fixes.
+
* tests/UPIPE_SAP_Test.cpp: Disabled this test if we don't have
threads and (STREAM Pipes or Win32). Thanks to Thilo Kielmann's
<kielmann@informatik.uni-siegen.de> for this info.
@@ -374,6 +414,23 @@ Sat Nov 9 11:23:13 1996 Douglas C. Schmidt <schmidt@tango.cs.wustl.edu>
Thanks to Alexander Smundak <sasha@migration.com> for reporting
this.
+Sat Nov 9 01:44:15 1996 Irfan Pyarali <irfan@flamenco.cs.wustl.edu>
+
+ * ace/Message_Queue: Added forward and reverse iterators to
+ Message_Queue. Also, added typedefs to Message_Queue for
+ ITERATOR, and REVERSE_ITERATOR. This makes the Queue like an STL
+ collection and also makes it easier to use since you don't have
+ to define types for the iterators. Please see
+ test/Message_Queue_Test.cpp for an example.
+
+ * ace/Map_Manager: Added reverse iterator to Map_Manager. Also,
+ added typedefs to Map_Manager for ENTRY, ITERATOR, and
+ REVERSE_ITERATOR. This makes the Map more like an STL collection
+ and also makes it easier to use since you don't have to define
+ types for the iterators and the entry. Please see
+ test/Map_Manager_Test.cpp for an example. Note that the new
+ typedefs does not break existing code.
+
Fri Nov 8 20:04:26 1996 Douglas C. Schmidt <schmidt@tango.cs.wustl.edu>
* ace/Malloc.h: Fixed a typo on line 176 that reads:
@@ -421,23 +478,6 @@ Tue Nov 5 03:09:44 1996 Douglas C. Schmidt <schmidt@tango.cs.wustl.edu>
I should have been doing a ::CloseHandle (handle) instead.
Thanks to Luca for finding this!
-Sat Nov 9 01:44:15 1996 Irfan Pyarali <irfan@flamenco.cs.wustl.edu>
-
- * ace/Message_Queue: Added forward and reverse iterators to
- Message_Queue. Also, added typedefs to Message_Queue for
- ITERATOR, and REVERSE_ITERATOR. This makes the Queue like an STL
- collection and also makes it easier to use since you don't have
- to define types for the iterators. Please see
- test/Message_Queue_Test.cpp for an example.
-
- * ace/Map_Manager: Added reverse iterator to Map_Manager. Also,
- added typedefs to Map_Manager for ENTRY, ITERATOR, and
- REVERSE_ITERATOR. This makes the Map more like an STL collection
- and also makes it easier to use since you don't have to define
- types for the iterators and the entry. Please see
- test/Map_Manager_Test.cpp for an example. Note that the new
- typedefs does not break existing code.
-
Tue Nov 5 14:26:32 1996 David Levine <levine@cs.wustl.edu>
* include/makeinclude/wrapper_macros.GNU: Changed LINK.{c,cc}
diff --git a/INSTALL b/INSTALL
index 3e285b5b7b3..ca53813483e 100644
--- a/INSTALL
+++ b/INSTALL
@@ -95,12 +95,18 @@ extensively on the following platforms and compilers:
In the meantime, you might try using GNU GCC or SunC++
on HP/UX.
-* OSF/1 3.2
+* OSF/1 3.2 and 4.0 (a.k.a. Digital UNIX 4.0a)
- . The current OSF/1 5.1 C++ compiler is also rather poor and there
- seems to be no way to build shared libraries with templates
- on OSF/1. I've also heard that the new version of this
- compiler (5.3) is better. Again, you might try GNU GCC.
+ . The current OSF/1 C++ 5.4 compiler still seems to have
+ problems with ACE's templates. It compiles the lib and test
+ programs, although giving warnings about template usage.
+ Most tests run, some dump core. Hopefully newer compiler
+ releases will alleviate these problems.
+
+ GNU gcc 2.7.2.1 compiles without problems. All tests run
+ (besides minor problems). Thanks to Thilo Kielmann
+ <kielmann@informatik.uni-siegen.de> and David Trumble
+ <trumble@cvg.enet.dec.com> for help with this port.
* UnixWare 2.01
@@ -131,6 +137,10 @@ If you use the GNU GCC C++ compiler please note the following:
example, Solaris's "/usr/ccs/bin" binary utils or
GNU binary utils.
+ . Make sure that the linker invoked by GCC produces code
+ that initializes static objects. Please see GCC's
+ documentation for using "collect2."
+
--------------------------------------------------
INSTALLATION PROCESS FOR UNIX
diff --git a/ace/OS.cpp b/ace/OS.cpp
index 1bb7b060fd1..2510d3da1cd 100644
--- a/ace/OS.cpp
+++ b/ace/OS.cpp
@@ -270,6 +270,15 @@ public:
// Mark a key as being used by this thread.
protected:
+ int mark_cleanup_i (void);
+ // Mark a thread for actually performing cleanup.
+
+ int check_cleanup_i (void);
+ // Check if given thread is performing cleanup.
+
+ int exit_cleanup_i (void);
+ // Indicate that a thread has finished cleanup.
+
void dump (void);
ACE_TSS_Cleanup (void);
@@ -279,6 +288,9 @@ private:
ACE_TSS_TABLE table_;
// Table of <ACE_TSS_Info>'s.
+ ACE_TSS_REF_TABLE ref_table_;
+ // Table of thread IDs that are performing cleanup activities.
+
// = Static data.
static ACE_TSS_Cleanup *instance_;
// Pointer to the singleton instance.
@@ -296,50 +308,102 @@ ACE_TSS_Cleanup *ACE_TSS_Cleanup::instance_ = 0;
// Serialize initialization of <key_>.
ACE_Recursive_Thread_Mutex ACE_TSS_Cleanup::lock_;
-void
-ACE_TSS_Cleanup::exit (void *status)
+int
+ACE_TSS_Cleanup::mark_cleanup_i (void)
{
- // ACE_TRACE ("ACE_TSS_Cleanup::exit");
+ return this->ref_table_.insert (ACE_TSS_Ref (ACE_OS::thr_self ()));
+}
+
+int
+ACE_TSS_Cleanup::check_cleanup_i (void)
+{
+ return this->ref_table_.find (ACE_TSS_Ref (ACE_OS::thr_self ()));
+}
- ACE_GUARD (ACE_Recursive_Thread_Mutex, ace_mon, ACE_TSS_Cleanup::lock_);
+int
+ACE_TSS_Cleanup::exit_cleanup_i (void)
+{
+ return this->ref_table_.remove (ACE_TSS_Ref (ACE_OS::thr_self ()));
+}
- // Prevent recursive deletions (note that when a recursive mutex
- // is first acquired it has a nesting level of 1...).
- if (ACE_TSS_Cleanup::lock_.get_nesting_level () > 1)
- return;
+void
+ACE_TSS_Cleanup::exit (void *status)
+{
+// ACE_TRACE ("ACE_TSS_Cleanup::exit");
ACE_thread_key_t key_arr[TLS_MINIMUM_AVAILABLE];
int index = 0;
ACE_TSS_Info *key_info = 0;
+ ACE_TSS_Info info_arr[TLS_MINIMUM_AVAILABLE];
+ int info_ix = 0;
- // Iterate through all the thread-specific items and free them all
- // up.
+ // While holding the lock, we only collect the ACE_TSS_Info objects
+ // in an array without invoking the according destructors.
- for (ACE_TSS_TABLE_ITERATOR iter (this->table_);
- iter.next (key_info) != 0;
- iter.advance ())
- {
- void *tss_info = 0;
+ {
+ ACE_GUARD (ACE_Recursive_Thread_Mutex, ace_mon, ACE_TSS_Cleanup::lock_);
- int val = key_info->ref_table_.remove (ACE_TSS_Ref (ACE_OS::thr_self ()));
+ // Prevent recursive deletions
- if ((ACE_OS::thr_getspecific (key_info->key_, &tss_info) == 0)
- && (key_info->destructor_)
- && tss_info)
- // Probably need to have an exception handler here...
- (*key_info->destructor_) (tss_info);
+ if (this->check_cleanup_i ()) // Are we already performing cleanup?
+ return;
- if (key_info->ref_table_.size () == 0
- && key_info->tss_obj_ == 0)
- key_arr[index++] = key_info->key_;
- }
+ // If we can't insert our thread_id into the list, we will not be
+ // able to detect recursive invocations for this thread. Therefore
+ // we better risk memory and key leakages, resulting also in
+ // missing close() calls as to be invoked recursively.
- for (int i = 0; i < index; i++)
- {
- ::TlsFree (key_arr[i]);
- this->table_.remove (ACE_TSS_Info (key_arr[i]));
- }
+ if (this->mark_cleanup_i () != 0) // Insert our thread_id in list
+ return;
+
+ // Iterate through all the thread-specific items and free them all
+ // up.
+
+ for (ACE_TSS_TABLE_ITERATOR iter (this->table_);
+ iter.next (key_info) != 0;
+ iter.advance ())
+ {
+ void *tss_info = 0;
+
+ int val = key_info->ref_table_.remove (ACE_TSS_Ref (ACE_OS::thr_self ()));
+
+ if ((ACE_OS::thr_getspecific (key_info->key_, &tss_info) == 0)
+ && (key_info->destructor_)
+ && tss_info)
+ info_arr[info_ix++] = *key_info; // copy this information into array
+
+ if (key_info->ref_table_.size () == 0
+ && key_info->tss_obj_ == 0)
+ key_arr[index++] = key_info->key_;
+ }
+ }
+
+ // Now we have given up the ACE_TSS_Cleanup::lock_ and we start
+ // invoking destructors.
+
+ for (int i = 0; i < info_ix; i++)
+ {
+ void *tss_info = 0;
+
+ ACE_OS::thr_getspecific (info_arr[i].key_, &tss_info);
+
+ (*info_arr[i].destructor_)(tss_info);
+ }
+
+ // Acquiring ACE_TSS_Cleanup::lock_ to free TLS keys and remove
+ // entries from ACE_TSS_Info table.
+ {
+ ACE_GUARD (ACE_Recursive_Thread_Mutex, ace_mon, ACE_TSS_Cleanup::lock_);
+
+ for (int i = 0; i < index; i++)
+ {
+ ::TlsFree (key_arr[i]);
+ this->table_.remove (ACE_TSS_Info (key_arr[i]));
+ }
+
+ this->exit_cleanup_i (); // remove thread id from reference list.
+ }
#if 0
::ExitThread ((DWORD) status);
@@ -586,13 +650,18 @@ ACE_OS::thr_create (ACE_THR_FUNC func,
#endif // ACE_HAS_FSU_PTHREADS
}
+#if defined (ACE_NEEDS_HUGE_THREAD_STACKSIZE)
+ if (stacksize < ACE_NEEDS_HUGE_THREAD_STACKSIZE)
+ stacksize = ACE_NEEDS_HUGE_THREAD_STACKSIZE;
+#endif /* ACE_NEEDS_HUGE_THREAD_STACKSIZE */
+
if (stacksize != 0)
{
size_t size = stacksize;
#if defined (PTHREAD_STACK_MIN)
if (size < PTHREAD_STACK_MIN)
- stacksize = PTHREAD_STACK_MIN;
+ size = PTHREAD_STACK_MIN;
#endif /* PTHREAD_STACK_MIN */
if (::pthread_attr_setstacksize (&attr, size) != 0)
@@ -963,26 +1032,6 @@ ACE_OS::thr_keyfree (ACE_thread_key_t key)
#endif /* ACE_HAS_THREADS */
}
-int
-ACE_OS::thr_win32_tls_table_lock (void)
-{
-#if defined (ACE_WIN32)
- return ACE_TSS_Cleanup::lock_.acquire ();
-#else
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_WIN32 */
-}
-
-int
-ACE_OS::thr_win32_tls_table_release (void)
-{
-#if defined (ACE_WIN32)
- return ACE_TSS_Cleanup::lock_.release ();
-#else
- ACE_NOTSUP_RETURN (-1);
-#endif /* ACE_WIN32 */
-}
-
int
ACE_OS::thr_keycreate (ACE_thread_key_t *key,
void (*dest) (void *),
diff --git a/ace/OS.h b/ace/OS.h
index fa268a0ba6b..48f74c9771c 100644
--- a/ace/OS.h
+++ b/ace/OS.h
@@ -989,7 +989,7 @@ typedef void (*ACE_SignalHandlerV)(...);
#define ACE_DIRECTORY_SEPARATOR_CHAR '\\'
#define ACE_LD_SEARCH_PATH "PATH"
#define ACE_LD_SEARCH_PATH_SEPARATOR_STR ";"
-
+#define ACE_LOGGER_KEY "\\temp\\server_daemon"
// This will help until we figure out everything:
#define NFDBITS 32 // only used in unused functions...
// These two may be used for internal flags soon:
@@ -1289,6 +1289,7 @@ typedef char TCHAR;
#define ACE_DIRECTORY_SEPARATOR_CHAR '/'
#define ACE_LD_SEARCH_PATH "LD_LIBRARY_PATH"
#define ACE_LD_SEARCH_PATH_SEPARATOR_STR ":"
+#define ACE_LOGGER_KEY "/tmp/server_daemon"
// Wrapper for NT events on UNIX.
struct ACE_event_t
@@ -1798,7 +1799,7 @@ typedef int ucontext_t;
#endif /* ACE_HAS_TIMOD_H */
#if defined (ACE_HAS_BROKEN_T_ERRNO)
-undef t_errno
+#undef t_errno
#endif /* ACE_HAS_BROKEN_T_ERRNO */
// Type of the extended signal handler.
@@ -1931,7 +1932,7 @@ public:
static pid_t fork_exec (char *argv[]);
// Forks and exec's a process in a manner that works on Solaris and
// NT. argv[0] must be the full path name to the executable.
- static uid_t getgid (void);
+ static gid_t getgid (void);
static pid_t getpid (void);
static uid_t getuid (void);
static pid_t setsid (void);
@@ -1949,6 +1950,12 @@ public:
static int sleep (u_int seconds);
static int sleep (const ACE_Time_Value &tv);
+#if defined (ACE_HAS_BROKEN_R_ROUTINES)
+#undef ctime_r
+#undef asctime_r
+#undef rand_r
+#endif /* ACE_HAS_BROKEN_R_ROUTINES */
+
// = A set of wrappers for operations on time.
static time_t time (time_t *tloc);
static struct tm *localtime (const time_t *clock);
@@ -2264,8 +2271,6 @@ public:
static int thr_join (ACE_thread_t waiter_id, ACE_thread_t *thr_id, void **status);
static int thr_keyfree (ACE_thread_key_t key);
static int thr_key_detach (void *inst);
- static int thr_win32_tls_table_lock(void);
- static int thr_win32_tls_table_release(void);
static int thr_keycreate (ACE_thread_key_t *key, void (*dest)(void *), void *inst = 0);
static int thr_key_used (ACE_thread_key_t key);
static int thr_kill (ACE_thread_t thr_id, int signum);
diff --git a/ace/OS.i b/ace/OS.i
index 3e5012c621b..b380aa2d652 100644
--- a/ace/OS.i
+++ b/ace/OS.i
@@ -210,7 +210,7 @@ ACE_OS::fstat (ACE_HANDLE handle, struct stat *stp)
ACE_OSCALL_RETURN (::fstat (handle, stp), int, -1);
}
-ACE_INLINE uid_t
+ACE_INLINE gid_t
ACE_OS::getgid (void)
{
// ACE_TRACE ("ACE_OS::getgid");
@@ -218,7 +218,7 @@ ACE_OS::getgid (void)
// getgid() is not supported: just one group anyways
return 0;
#else
- ACE_OSCALL_RETURN (::getgid (), uid_t, -1);
+ ACE_OSCALL_RETURN (::getgid (), gid_t, (gid_t) -1);
#endif /* VXWORKS */
}
@@ -243,7 +243,7 @@ ACE_OS::getuid (void)
// getuid() is not supported: just one user anyways
return 0;
#else
- ACE_OSCALL_RETURN (::getuid (), uid_t, -1);
+ ACE_OSCALL_RETURN (::getuid (), uid_t, (uid_t) -1);
#endif /* VXWORKS */
}
@@ -4589,6 +4589,14 @@ ACE_OS::ctime (const time_t *t)
#endif // ACE_HAS_BROKEN_CTIME)
}
+#if defined (DIGITAL_UNIX)
+extern "C" {
+ extern char *_Pctime_r (const time_t *, char *);
+ extern struct tm *_Plocaltime_r (const time_t *, struct tm *);
+ extern char *_Pasctime_r (const struct tm *, char *);
+}
+#endif /* DIGITAL_UNIX */
+
ACE_INLINE char *
ACE_OS::ctime_r (const time_t *t, char *buf, int buflen)
{
@@ -4596,7 +4604,11 @@ ACE_OS::ctime_r (const time_t *t, char *buf, int buflen)
#if defined (ACE_HAS_REENTRANT_FUNCTIONS) && defined (ACE_MT_SAFE)
#if defined (ACE_HAS_ONLY_TWO_PARAMS_FOR_ASCTIME_R_AND_CTIME_R)
char *result;
+#if defined (DIGITAL_UNIX)
+ ACE_OSCALL (::_Pctime_r (t, buf), char *, 0, result);
+#else
ACE_OSCALL (::ctime_r (t, buf), char *, 0, result);
+#endif /* DIGITAL_UNIX */
::strncpy (buf, result, buflen);
return buf;
#else
@@ -4622,7 +4634,11 @@ ACE_OS::localtime_r (const time_t *t, struct tm *res)
{
// ACE_TRACE ("ACE_OS::localtime_r");
#if defined (ACE_HAS_REENTRANT_FUNCTIONS) && defined (ACE_MT_SAFE)
+#if defined (DIGITAL_UNIX)
+ ACE_OSCALL_RETURN (::_Plocaltime_r(t, res), struct tm *, 0);
+#else
ACE_OSCALL_RETURN (::localtime_r (t, res), struct tm *, 0);
+#endif /* DIGITAL_UNIX */
#else
ACE_OSCALL_RETURN (::localtime (t), struct tm *, 0);
#endif
@@ -4642,7 +4658,11 @@ ACE_OS::asctime_r (const struct tm *t, char *buf, int buflen)
#if defined (ACE_HAS_REENTRANT_FUNCTIONS) && defined (ACE_MT_SAFE)
#if defined (ACE_HAS_ONLY_TWO_PARAMS_FOR_ASCTIME_R_AND_CTIME_R)
char *result;
+#if defined (DIGITAL_UNIX)
+ ACE_OSCALL (::_Pasctime_r(t, buf), char *, 0, result);
+#else
ACE_OSCALL (::asctime_r (t, buf), char *, 0, result);
+#endif /* DIGITAL_UNIX */
::strncpy (buf, result, buflen);
return buf;
#else
diff --git a/ace/README b/ace/README
index d28d88ab180..db72c29959d 100644
--- a/ace/README
+++ b/ace/README
@@ -155,6 +155,7 @@ ACE_LACKS_UNIX_DOMAIN_SOCKETS ACE platform has no UNIX domain sockets
ACE_LACKS_UTSNAME_T Platform lacks struct utsname (e.g., Win32 and VxWorks)
ACE_MT_SAFE Compile using multi-thread libraries
ACE_NDEBUG Turns off debugging features
+ACE_NEEDS_HUGE_THREAD_STACKSIZE Required by platforms with small default stacks.
ACE_NEEDS_READV Platform doesn't define readv, so use our own
ACE_NEEDS_SYSTIME_H <time.h> doesn't automatically #include <sys/time.h>
ACE_NEEDS_WRITEV Platform doesn't define writev, so use our own
diff --git a/ace/SOCK_Dgram.cpp b/ace/SOCK_Dgram.cpp
index 201f8759a72..5005738a653 100644
--- a/ace/SOCK_Dgram.cpp
+++ b/ace/SOCK_Dgram.cpp
@@ -37,7 +37,7 @@ ACE_SOCK_Dgram::recv (iovec *io_vec, ACE_Addr &addr, int flags) const
ACE_NEW_RETURN (io_vec->iov_base, char[inlen], -1);
io_vec->iov_len = ACE_OS::recvfrom (this->get_handle (),
- io_vec->iov_base,
+ (char *) io_vec->iov_base,
inlen,
flags,
(sockaddr *) saddr,
diff --git a/ace/Service_Config.cpp b/ace/Service_Config.cpp
index a8caa32b165..9e32df1d7e1 100644
--- a/ace/Service_Config.cpp
+++ b/ace/Service_Config.cpp
@@ -114,7 +114,7 @@ int ACE_Service_Config::signum_ = SIGHUP;
const char *ACE_Service_Config::service_config_file_ = ACE_DEFAULT_SVC_CONF;
// Name of file used to store messages.
-const char *ACE_Service_Config::logger_key_ = "/tmp/server_daemon";
+const char *ACE_Service_Config::logger_key_ = ACE_LOGGER_KEY;
// Define the object that describes the service statically.
ACE_STATIC_SVC_DEFINE (ACE_Service_Manager,
diff --git a/ace/Synch_T.cpp b/ace/Synch_T.cpp
index 6eef0942755..fd89d2e26d5 100644
--- a/ace/Synch_T.cpp
+++ b/ace/Synch_T.cpp
@@ -309,31 +309,22 @@ ACE_TSS<TYPE>::ts_get (void) const
// Create and initialize thread-specific ts_obj.
if (this->once_ == 0)
{
- // We need the lock for ACE_TSS_Cleanup as well since the
- // ACE_Thread::keycreate() method requires access to internal
- // tables. This is to avoid deadlocks when using ACE_TSS from
- // the close() hook of an ACE_Task.
- ACE_OS::thr_win32_tls_table_lock ();
-
// Insure that we are serialized!
ACE_GUARD_RETURN (ACE_Mutex, ace_mon_2, (ACE_Mutex &) this->keylock_, 0);
- int result;
-
// Use the Double-Check pattern to make sure we only create the
// key once!
if (this->once_ == 0)
- result = ACE_Thread::keycreate ((ACE_thread_key_t *) &this->key_,
+ {
+ if (ACE_Thread::keycreate ((ACE_thread_key_t *) &this->key_,
&ACE_TSS<TYPE>::cleanup,
- (void *) this);
- ACE_OS::thr_win32_tls_table_release ();
-
- if (result != 0)
- return 0; // Major problems, this should *never* happen!
- else
- // This *must* come last to avoid race conditions! Note
- // that we need to "cast away const..."
- *(int *) &this->once_ = 1;
+ (void *) this) != 0)
+ return 0; // Major problems, this should *never* happen!
+ else
+ // This *must* come last to avoid race conditions! Note
+ // that we need to "cast away const..."
+ *(int *) &this->once_ = 1;
+ }
}
TYPE *ts_obj = 0;
diff --git a/ace/config-osf1-4.0-g++.h b/ace/config-osf1-4.0-g++.h
index 31e468181b4..f60a6e2577b 100644
--- a/ace/config-osf1-4.0-g++.h
+++ b/ace/config-osf1-4.0-g++.h
@@ -1,7 +1,7 @@
/* -*- C++ -*- */
// $Id$
-// Digital UNIX V4.0a platforms with the G+C+compiler. It is
+// Digital UNIX V4.0a platforms with the G++ C++ compiler. It is
// configured to use the IEEE Std 1003.1c-1995, POSIX System
// Application Program Interface. By 4.0a the version is meant that
// is called "V4.0 464" by uname -a.
@@ -10,7 +10,7 @@
#define ACE_CONFIG_H
/////////////////////////////////////////////////////////////////////////////
-/
+//
//
// The following lines are copied from the sunos5.5-g+configuration.
// (This is the GNU-specific part.)
@@ -30,7 +30,7 @@
#define ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES
/////////////////////////////////////////////////////////////////////////////
-/
+//
// DJT removed this due to some minor issues related to the
// definitions of timestruc_t and tid_t in procfs.h not sure what
@@ -76,7 +76,7 @@
// Compiler/platform has thread-specific storage
#define ACE_HAS_THREAD_SPECIFIC_STORAGE
-// Platform supports C+headers
+// Platform supports C++ headers
#define ACE_HAS_CPLUSPLUS_HEADERS
// Compiler/platform has the getrusage() system call.
@@ -202,5 +202,9 @@
#define DIGITAL_UNIX
#define ACE_LACKS_T_ERRNO
#define ACE_HAS_BROKEN_T_ERRNO
+#define ACE_HAS_BROKEN_R_ROUTINES
+// We need a larger per-thread stack size in order to run ACE_Log_Msg::log
+// TK, 11 Nov 96
+#define ACE_NEEDS_HUGE_THREAD_STACKSIZE 65536
#endif /* ACE_CONFIG_H */
diff --git a/ace/config-osf1-4.0.h b/ace/config-osf1-4.0.h
index 73c60fd46b9..5a8f4a565a0 100644
--- a/ace/config-osf1-4.0.h
+++ b/ace/config-osf1-4.0.h
@@ -171,6 +171,8 @@
// DJT modified 6/5/96
// Defines the page size of the system.
//#define ACE_PAGE_SIZE 4096
+// This should really be set with the getpagesize() function since
+// this is machine configurable on Digital UNIX, etc..
#define ACE_PAGE_SIZE 8192
// DJT added 6/6/96
@@ -178,8 +180,12 @@
#define ACE_HAS_ONLY_TWO_PARAMS_FOR_ASCTIME_R_AND_CTIME_R
#define ACE_HAS_BROKEN_IF_HEADER
-#define ACE_HAS_REENTRANT_FUNCTIONS
+//#define ACE_HAS_REENTRANT_FUNCTIONS
#define DIGITAL_UNIX
#define ACE_LACKS_T_ERRNO
#define ACE_HAS_BROKEN_T_ERRNO
+#define ACE_HAS_BROKEN_R_ROUTINES
+// We need a larger per-thread stack size in order to run ACE_Log_Msg::log
+// TK, 11 Nov 96
+#define ACE_NEEDS_HUGE_THREAD_STACKSIZE 65536
#endif /* ACE_CONFIG_H */
diff --git a/include/makeinclude/platform_osf1_4.0_g++.GNU b/include/makeinclude/platform_osf1_4.0_g++.GNU
index 5b95b222ba0..ea269dff15e 100644
--- a/include/makeinclude/platform_osf1_4.0_g++.GNU
+++ b/include/makeinclude/platform_osf1_4.0_g++.GNU
@@ -1,4 +1,5 @@
-# This platform macros file is intended to work with Digital UNIX 4.0 (OSF/1 4.0).
+# This platform macros file is intended to work with Digital UNIX 4.0
+# (OSF/1 4.0) and GCC in version 2.7.2.1 (or newer).
CC = gcc -g -D_REENTRANT
CXX = gcc -g -D_REENTRANT -fno-strict-prototypes -D__ACE_INLINE__
@@ -9,10 +10,10 @@ ARFLAGS = ruvZ
# When libraries are archived, a hash index is automatically created so there
# is no need for ranlib
RANLIB = /usr/bin/true
-SOFLAGS = -G $(CPPFLAGS)
-SOBUILD = $(COMPILE.cc) $(PIC) -o $(VSHDIR)$*.so $<
-PRELIB = (echo "main() { }" > gcctemp.c && \
- $(COMPILE.cc) -o gcctemp.o gcctemp.c && \
- $(LINK.cc) -o gcctemp gcctemp.o $^ $(LDFLAGS) $(LIBS); \
- status=$$?; rm -f gcctemp*; exit $$status)
+SOFLAGS = -shared $(CPPFLAGS)
+SOBUILD = $(COMPILE.cc) $(PIC) -o $(VSHDIR)$*.so $<
+PRELIB = (echo "main() { }" > gcctemp.c && \
+ $(COMPILE.cc) -o gcctemp.o gcctemp.c && \
+ $(LINK.cc) -o gcctemp gcctemp.o $^ $(LDFLAGS) $(LIBS); \
+ status=$$?; rm -f gcctemp*; exit $$status)
diff --git a/tests/TSS_Test.cpp b/tests/TSS_Test.cpp
index a73aef5e9ef..46d7eebd55c 100644
--- a/tests/TSS_Test.cpp
+++ b/tests/TSS_Test.cpp
@@ -75,12 +75,12 @@ static ACE_TSS<Errno> TSS_Error;
#if defined (ACE_HAS_THREADS)
// Serializes output via cout.
-static ACE_Thread_Mutex lock;
+static ACE_Thread_Mutex cout_lock;
typedef ACE_TSS_Guard<ACE_Thread_Mutex> GUARD;
#else
// Serializes output via cout.
-static ACE_Null_Mutex lock;
+static ACE_Null_Mutex cout_lock;
typedef ACE_Guard<ACE_Null_Mutex> GUARD;
#endif /* ACE_HAS_THREADS */
@@ -153,7 +153,7 @@ worker (void *c)
{
// Use the guard to serialize access
- ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, lock, 0));
+ ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, cout_lock, 0));
ACE_ASSERT (TSS_Error->flags () == ITERATIONS);
}
key = 0;