summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog37
-rw-r--r--ChangeLogs/ChangeLog-02a37
-rw-r--r--ChangeLogs/ChangeLog-03a37
-rw-r--r--THANKS1
-rw-r--r--ace/ACE.cpp40
-rw-r--r--ace/ACE.h19
-rw-r--r--ace/Event_Handler.h1
-rw-r--r--ace/FILE.h1
-rw-r--r--ace/FILE_IO.h5
-rw-r--r--ace/Hash_Map_Manager_T.h3
-rw-r--r--ace/Malloc_T.i4
-rw-r--r--ace/Memory_Pool.h8
-rw-r--r--ace/OS_Dirent.cpp20
-rw-r--r--ace/OS_Dirent.inl4
-rw-r--r--ace/Process_Mutex.h3
-rw-r--r--ace/SString.h1
-rw-r--r--tests/Conn_Test.cpp3
17 files changed, 186 insertions, 38 deletions
diff --git a/ChangeLog b/ChangeLog
index 896941b57bb..6e7ccd6b4c1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,28 @@
+Wed Jul 18 13:15:06 2001 Douglas C. Schmidt <schmidt@ace.cs.wustl.edu>
+
+ * ace/OS_Dirent.cpp (scandir_emulation): Removed the calls to the
+ ACE_ERROR_RETURN macros to avoid dependencies on ACE_Log_Msg
+ from within the ACE_OS layer. Thanks to Bala for pointing this
+ out!
+
+ * ace/ACE.{h,cpp}: Added a new wrapper method for ACE_OS::select()
+ that uses ACE_Handle_Set *'s rather than fd_set *'s. This is
+ motivated by work Steve Huston and I are doing on our new book
+ "C++ Network Programming: Resolving Complexity with ACE and
+ Patterns."
+
+ * ace/Malloc_T.i (release): Removed an unnecessary "else" to
+ make gcc 2.96 happy. Thanks to Frank Wolf <fwolf@gum.de> for
+ reporting this.
+
+ * Happy birthday to me!
+
+Tue Jul 17 00:34:40 2001 Douglas C. Schmidt <schmidt@ace.cs.wustl.edu>
+
+ * ace/SString.h (ACE_Tokenizer): Make sure that the data members
+ are protected, not private... Thanks to Martin Krumpolec for
+ reporting this (again)!
+
Wed Jul 18 16:40:56 2001 Irfan Pyarali <irfan@cs.wustl.edu>
* ace/Log_Msg.cpp (program_name): Undid the following changes:
@@ -12,7 +37,8 @@ Wed Jul 18 15:59:03 2001 Krishnakumar B <kitty@cs.wustl.edu>
* ace/config-tru64.h:
Removed _LIBC_POLLUTION_H. It seems that this macro is causing
- problems for some users.
+ problems for some users. Thanks to Pierre Oberson
+ <oberson@nagra-kudelski.ch> for prompting this fix.
Tue Jul 17 13:00:11 2001 Balachandran Natarajan <bala@cs.wustl.edu>
@@ -20,6 +46,15 @@ Tue Jul 17 13:00:11 2001 Balachandran Natarajan <bala@cs.wustl.edu>
Mon Jul 16 14:59:32 2001 Douglas C. Schmidt <schmidt@ace.cs.wustl.edu>
+ * ace/Memory_Pool.h (ACE_Shared_Memory_Pool): Added a comment
+ that discourages developer from using the ACE_Shared_Memory_Pool
+ and points them to the ACE_MMAP_Memory_Pool instead. Thanks to
+ Johnny Chen <jchen@huawei.com> for motivating this.
+
+ * ace/OS_Dirent.cpp (readdir_emulation): Fixed a handle leak
+ in the event that errors occur. Thanks to Kevin Burge
+ <kcburge@systemware-inc.com> for reporting this.
+
* ace/Log_Msg_UNIX_Syslog.cpp (open): Add an ACE_const_cast()
to the program name for platforms like LynxOS whose openlog()
method is char * rather than const char *. Thanks to Bala for
diff --git a/ChangeLogs/ChangeLog-02a b/ChangeLogs/ChangeLog-02a
index 896941b57bb..6e7ccd6b4c1 100644
--- a/ChangeLogs/ChangeLog-02a
+++ b/ChangeLogs/ChangeLog-02a
@@ -1,3 +1,28 @@
+Wed Jul 18 13:15:06 2001 Douglas C. Schmidt <schmidt@ace.cs.wustl.edu>
+
+ * ace/OS_Dirent.cpp (scandir_emulation): Removed the calls to the
+ ACE_ERROR_RETURN macros to avoid dependencies on ACE_Log_Msg
+ from within the ACE_OS layer. Thanks to Bala for pointing this
+ out!
+
+ * ace/ACE.{h,cpp}: Added a new wrapper method for ACE_OS::select()
+ that uses ACE_Handle_Set *'s rather than fd_set *'s. This is
+ motivated by work Steve Huston and I are doing on our new book
+ "C++ Network Programming: Resolving Complexity with ACE and
+ Patterns."
+
+ * ace/Malloc_T.i (release): Removed an unnecessary "else" to
+ make gcc 2.96 happy. Thanks to Frank Wolf <fwolf@gum.de> for
+ reporting this.
+
+ * Happy birthday to me!
+
+Tue Jul 17 00:34:40 2001 Douglas C. Schmidt <schmidt@ace.cs.wustl.edu>
+
+ * ace/SString.h (ACE_Tokenizer): Make sure that the data members
+ are protected, not private... Thanks to Martin Krumpolec for
+ reporting this (again)!
+
Wed Jul 18 16:40:56 2001 Irfan Pyarali <irfan@cs.wustl.edu>
* ace/Log_Msg.cpp (program_name): Undid the following changes:
@@ -12,7 +37,8 @@ Wed Jul 18 15:59:03 2001 Krishnakumar B <kitty@cs.wustl.edu>
* ace/config-tru64.h:
Removed _LIBC_POLLUTION_H. It seems that this macro is causing
- problems for some users.
+ problems for some users. Thanks to Pierre Oberson
+ <oberson@nagra-kudelski.ch> for prompting this fix.
Tue Jul 17 13:00:11 2001 Balachandran Natarajan <bala@cs.wustl.edu>
@@ -20,6 +46,15 @@ Tue Jul 17 13:00:11 2001 Balachandran Natarajan <bala@cs.wustl.edu>
Mon Jul 16 14:59:32 2001 Douglas C. Schmidt <schmidt@ace.cs.wustl.edu>
+ * ace/Memory_Pool.h (ACE_Shared_Memory_Pool): Added a comment
+ that discourages developer from using the ACE_Shared_Memory_Pool
+ and points them to the ACE_MMAP_Memory_Pool instead. Thanks to
+ Johnny Chen <jchen@huawei.com> for motivating this.
+
+ * ace/OS_Dirent.cpp (readdir_emulation): Fixed a handle leak
+ in the event that errors occur. Thanks to Kevin Burge
+ <kcburge@systemware-inc.com> for reporting this.
+
* ace/Log_Msg_UNIX_Syslog.cpp (open): Add an ACE_const_cast()
to the program name for platforms like LynxOS whose openlog()
method is char * rather than const char *. Thanks to Bala for
diff --git a/ChangeLogs/ChangeLog-03a b/ChangeLogs/ChangeLog-03a
index 896941b57bb..6e7ccd6b4c1 100644
--- a/ChangeLogs/ChangeLog-03a
+++ b/ChangeLogs/ChangeLog-03a
@@ -1,3 +1,28 @@
+Wed Jul 18 13:15:06 2001 Douglas C. Schmidt <schmidt@ace.cs.wustl.edu>
+
+ * ace/OS_Dirent.cpp (scandir_emulation): Removed the calls to the
+ ACE_ERROR_RETURN macros to avoid dependencies on ACE_Log_Msg
+ from within the ACE_OS layer. Thanks to Bala for pointing this
+ out!
+
+ * ace/ACE.{h,cpp}: Added a new wrapper method for ACE_OS::select()
+ that uses ACE_Handle_Set *'s rather than fd_set *'s. This is
+ motivated by work Steve Huston and I are doing on our new book
+ "C++ Network Programming: Resolving Complexity with ACE and
+ Patterns."
+
+ * ace/Malloc_T.i (release): Removed an unnecessary "else" to
+ make gcc 2.96 happy. Thanks to Frank Wolf <fwolf@gum.de> for
+ reporting this.
+
+ * Happy birthday to me!
+
+Tue Jul 17 00:34:40 2001 Douglas C. Schmidt <schmidt@ace.cs.wustl.edu>
+
+ * ace/SString.h (ACE_Tokenizer): Make sure that the data members
+ are protected, not private... Thanks to Martin Krumpolec for
+ reporting this (again)!
+
Wed Jul 18 16:40:56 2001 Irfan Pyarali <irfan@cs.wustl.edu>
* ace/Log_Msg.cpp (program_name): Undid the following changes:
@@ -12,7 +37,8 @@ Wed Jul 18 15:59:03 2001 Krishnakumar B <kitty@cs.wustl.edu>
* ace/config-tru64.h:
Removed _LIBC_POLLUTION_H. It seems that this macro is causing
- problems for some users.
+ problems for some users. Thanks to Pierre Oberson
+ <oberson@nagra-kudelski.ch> for prompting this fix.
Tue Jul 17 13:00:11 2001 Balachandran Natarajan <bala@cs.wustl.edu>
@@ -20,6 +46,15 @@ Tue Jul 17 13:00:11 2001 Balachandran Natarajan <bala@cs.wustl.edu>
Mon Jul 16 14:59:32 2001 Douglas C. Schmidt <schmidt@ace.cs.wustl.edu>
+ * ace/Memory_Pool.h (ACE_Shared_Memory_Pool): Added a comment
+ that discourages developer from using the ACE_Shared_Memory_Pool
+ and points them to the ACE_MMAP_Memory_Pool instead. Thanks to
+ Johnny Chen <jchen@huawei.com> for motivating this.
+
+ * ace/OS_Dirent.cpp (readdir_emulation): Fixed a handle leak
+ in the event that errors occur. Thanks to Kevin Burge
+ <kcburge@systemware-inc.com> for reporting this.
+
* ace/Log_Msg_UNIX_Syslog.cpp (open): Add an ACE_const_cast()
to the program name for platforms like LynxOS whose openlog()
method is char * rather than const char *. Thanks to Bala for
diff --git a/THANKS b/THANKS
index c91140cd1e1..34fabcfd101 100644
--- a/THANKS
+++ b/THANKS
@@ -1292,6 +1292,7 @@ Scott Plant <splant@softhome.net>
Wilfried Reinoehl <Wilfried.Reinoehl@WiredMinds.de>
Sangeetha Ramadurai <Sangeetha.Ramadurai@geind.ge.com>
Victor Chernenko <v_chernenko@hotmail.com>
+Frank Wolf <fwolf@gum.de>
I would particularly like to thank Paul Stephenson, who worked with me
at Ericsson in the early 1990's. Paul devised the recursive Makefile
diff --git a/ace/ACE.cpp b/ace/ACE.cpp
index 0fd4b87d46d..f026ba8ec28 100644
--- a/ace/ACE.cpp
+++ b/ace/ACE.cpp
@@ -126,6 +126,45 @@ ACE::compiler_beta_version (void)
}
int
+ACE::select (int width,
+ ACE_Handle_Set *readfds,
+ ACE_Handle_Set *writefds,
+ ACE_Handle_Set *exceptfds,
+ const ACE_Time_Value *timeout)
+{
+ int result = ACE_OS::select (width,
+ readfds ? readfds->fdset () : 0,
+ writefds ? writefds->fdset () : 0,
+ exceptfds ? exceptfds->fdset () : 0,
+ timeout);
+ if (result > 0)
+ {
+ if (readfds)
+ readfds->sync ((ACE_HANDLE) width);
+ if (writefds)
+ writefds->sync ((ACE_HANDLE) width);
+ if (exceptfds)
+ exceptfds->sync ((ACE_HANDLE) width);
+ }
+ return result;
+}
+
+int
+ACE::select (int width,
+ ACE_Handle_Set &readfds,
+ const ACE_Time_Value *timeout)
+{
+ int result = ACE_OS::select (width,
+ readfds.fdset (),
+ 0,
+ 0,
+ timeout);
+ if (result > 0)
+ readfds.sync ((ACE_HANDLE) width);
+ return result;
+}
+
+int
ACE::terminate_process (pid_t pid)
{
#if defined (ACE_HAS_PACE)
@@ -2217,7 +2256,6 @@ ACE::handle_ready (ACE_HANDLE handle,
int result = ACE_OS::poll (&fds, 1, timeout);
#else
-
ACE_Handle_Set handle_set;
handle_set.set_bit (handle);
diff --git a/ace/ACE.h b/ace/ACE.h
index 02343d31370..7f348596986 100644
--- a/ace/ACE.h
+++ b/ace/ACE.h
@@ -6,11 +6,10 @@
*
* $Id$
*
- * @author Doug Schmidt
+ * @author Douglas C. Schmidt <schmidt@cs.wustl.edu>
*/
//=============================================================================
-
#ifndef ACE_ACE_H
#define ACE_ACE_H
#include "ace/pre.h"
@@ -30,6 +29,7 @@
// Forward declarations.
class ACE_Time_Value;
class ACE_Message_Block;
+class ACE_Handle_Set;
/**
* @class ACE
@@ -401,8 +401,6 @@ public:
ACE_TCHAR delim =
ACE_DIRECTORY_SEPARATOR_CHAR);
-
-
/**
* Returns the current timestamp in the form
* "hour:minute:second:microsecond." The month, day, and year are
@@ -540,6 +538,19 @@ public:
static char debug (void);
static void debug (char d);
+ /// Wrapper facade for <select> that uses <ACE_Handle_Set>s.
+ static int select (int width,
+ ACE_Handle_Set *readfds,
+ ACE_Handle_Set *writefds = 0,
+ ACE_Handle_Set *exceptfds = 0,
+ const ACE_Time_Value *timeout = 0);
+
+ /// Wrapper facade for the most common use of <select> that uses
+ /// <ACE_Handle_Set>s.
+ static int select (int width,
+ ACE_Handle_Set &readfds,
+ const ACE_Time_Value *timeout = 0);
+
/// Timed wait for handle to get read ready.
static int handle_read_ready (ACE_HANDLE handle,
const ACE_Time_Value *timeout);
diff --git a/ace/Event_Handler.h b/ace/Event_Handler.h
index a1e65136c12..deb3f951b09 100644
--- a/ace/Event_Handler.h
+++ b/ace/Event_Handler.h
@@ -10,7 +10,6 @@
*/
//=============================================================================
-
#ifndef ACE_EVENT_HANDLER_H
#define ACE_EVENT_HANDLER_H
#include "ace/pre.h"
diff --git a/ace/FILE.h b/ace/FILE.h
index a06351b86d3..e9fbfc1d749 100644
--- a/ace/FILE.h
+++ b/ace/FILE.h
@@ -10,7 +10,6 @@
*/
//=============================================================================
-
#ifndef ACE_FILE_H
#define ACE_FILE_H
#include "ace/pre.h"
diff --git a/ace/FILE_IO.h b/ace/FILE_IO.h
index 155d1f9a0c4..512ace0fdba 100644
--- a/ace/FILE_IO.h
+++ b/ace/FILE_IO.h
@@ -6,11 +6,10 @@
*
* $Id$
*
- * @author Doug Schmidt
+ * @author Douglas C. Schmidt <schmidt@cs.wustl.edu>
*/
//=============================================================================
-
#ifndef ACE_FILE_IO_H
#define ACE_FILE_IO_H
#include "ace/pre.h"
@@ -145,7 +144,7 @@ public:
#if !defined (ACE_LACKS_INLINE_FUNCTIONS)
#include "ace/FILE_IO.i"
-#endif
+#endif /* !defined (ACE_LACKS_INLINE_FUNCTIONS) */
#include "ace/post.h"
#endif /* ACE_FILE_IO_H */
diff --git a/ace/Hash_Map_Manager_T.h b/ace/Hash_Map_Manager_T.h
index 7b721f3c365..4483dcb54ed 100644
--- a/ace/Hash_Map_Manager_T.h
+++ b/ace/Hash_Map_Manager_T.h
@@ -6,11 +6,10 @@
*
* $Id$
*
- * @author Doug Schmidt
+ * @author Douglas C. Schmidt <schmidt@cs.wustl.edu>
*/
//=============================================================================
-
#ifndef ACE_HASH_MAP_MANAGER_T_H
#define ACE_HASH_MAP_MANAGER_T_H
#include "ace/pre.h"
diff --git a/ace/Malloc_T.i b/ace/Malloc_T.i
index 31c5b403cdd..27e5f7ae4f8 100644
--- a/ace/Malloc_T.i
+++ b/ace/Malloc_T.i
@@ -186,8 +186,8 @@ ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::release (void)
ACE_GUARD_RETURN (ACE_LOCK, ace_mon, (ACE_LOCK &) this->lock_, -1);
if (this->cb_ptr_ != 0)
return --this->cb_ptr_->ref_counter_;
- else
- return -1;
+
+ return -1;
}
template <ACE_MEM_POOL_1, class ACE_LOCK, class ACE_CB> ACE_INLINE ACE_MEM_POOL &
diff --git a/ace/Memory_Pool.h b/ace/Memory_Pool.h
index 7b475311970..7c0c326eb5d 100644
--- a/ace/Memory_Pool.h
+++ b/ace/Memory_Pool.h
@@ -148,7 +148,13 @@ public:
*
* @brief Make a memory pool that is based on System V shared memory
* (shmget(2) etc.). This implementation allows memory to be
- * shared between processes.
+ * shared between processes. If your platform doesn't support
+ * System V shared memory (e.g., Win32 and many RTOS platforms
+ * do not) then you should use ACE_MMAP_Memory_Pool instead of this
+ * class. In fact, you should probably use ACE_MMAP_Memory_Pool on
+ * platforms that *do* support System V shared memory since it
+ * provides more powerful features, such as persistent backing store
+ * and greatly scalability.
*/
class ACE_Export ACE_Shared_Memory_Pool : public ACE_Event_Handler
{
diff --git a/ace/OS_Dirent.cpp b/ace/OS_Dirent.cpp
index 07c6c208f65..7da84d715b5 100644
--- a/ace/OS_Dirent.cpp
+++ b/ace/OS_Dirent.cpp
@@ -94,12 +94,12 @@ ACE_OS_Dirent::readdir_emulation (ACE_DIR *d)
while (*d->fdata_.cFileName == '.'
&& retval
&& d->fdata_.dwFileAttributes == FILE_ATTRIBUTE_DIRECTORY)
+ retval = ACE_TEXT_FindNextFile (d->current_handle_, &d->fdata_);
+ if (retval == 0)
{
- retval = ACE_TEXT_FindNextFile (d->current_handle_,
- &(d->fdata_));
+ ::FindClose (d->current_handle_);
+ d->current_handle_ = INVALID_HANDLE_VALUE;
}
- if (retval == 0)
- d->current_handle_ = INVALID_HANDLE_VALUE;
}
d->started_reading_ = 1;
@@ -147,16 +147,10 @@ ACE_OS_Dirent::scandir_emulation (const ACE_TCHAR *dirname,
ACE_DIR *dirp = ACE_OS_Dirent::opendir (dirname);
if (dirp == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_LIB_TEXT ("scandir_emulation cannot open directory %s"),
- dirname),
- -1);
-
+ return -1;
// A sanity check here. "namelist" had better not be zero.
- if (namelist == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_LIB_TEXT ("scandir_emulation namelist == 0!")),
- -1);
+ else if (namelist == 0)
+ return -1;
dirent **vector = 0;
dirent *dp;
diff --git a/ace/OS_Dirent.inl b/ace/OS_Dirent.inl
index d6b0c4e7def..f9e0e7bceda 100644
--- a/ace/OS_Dirent.inl
+++ b/ace/OS_Dirent.inl
@@ -75,9 +75,9 @@ ACE_OS_Dirent::readdir (ACE_DIR *d)
#elif defined (ACE_HAS_DIRENT)
# if defined (ACE_PSOS)
- u_long result = ::read_dir (&(d->xdir), &(d->dirent));
+ u_long result = ::read_dir (&d->xdir, &d->dirent);
if (0 == result)
- return &(d->dirent);
+ return &d->dirent;
else
{
errno = result;
diff --git a/ace/Process_Mutex.h b/ace/Process_Mutex.h
index 2c2d9ce17b1..3c61b63ca5c 100644
--- a/ace/Process_Mutex.h
+++ b/ace/Process_Mutex.h
@@ -11,11 +11,10 @@
* course.
*
*
- * @author Doug Schmidt
+ * @author Douglas C. Schmidt <schmidt@cs.wustl.edu>
*/
//=============================================================================
-
#ifndef ACE_PROCESS_MUTEX_H
#define ACE_PROCESS_MUTEX_H
#include "ace/pre.h"
diff --git a/ace/SString.h b/ace/SString.h
index 60c97e064ce..75e3d44f3c7 100644
--- a/ace/SString.h
+++ b/ace/SString.h
@@ -689,7 +689,6 @@ protected:
*/
int is_preserve_designator (ACE_TCHAR start, ACE_TCHAR &stop, int &strip);
-private:
ACE_TCHAR *buffer_;
int index_;
diff --git a/tests/Conn_Test.cpp b/tests/Conn_Test.cpp
index 687970b213b..34d0cc01b06 100644
--- a/tests/Conn_Test.cpp
+++ b/tests/Conn_Test.cpp
@@ -273,8 +273,7 @@ Svc_Handler::recv_data (void)
// Since we're in non-blocking mode we need to use <select> to
// avoid busy waiting.
if (ACE_OS::select (int (new_stream.get_handle ()) + 1,
- handle_set,
- 0, 0, 0) == -1)
+ handle_set) == -1)
ACE_ERROR ((LM_ERROR,
ACE_TEXT ("(%P|%t) %p\n"),
ACE_TEXT ("select")));