summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog-97b16
-rw-r--r--TAO/ChangeLog-98c2
-rw-r--r--ace/IOStream.cpp219
-rw-r--r--ace/IOStream.h14
-rw-r--r--ace/IOStream_T.cpp2
-rw-r--r--ace/config-linux-kcc.h10
-rw-r--r--examples/IOStream/client/iostream_client.cpp4
-rw-r--r--examples/IOStream/server/iostream_server.cpp102
-rw-r--r--examples/System_V_IPC/SV_Semaphores/Semaphores_1.cpp8
-rw-r--r--include/makeinclude/platform_linux_kcc.GNU4
10 files changed, 211 insertions, 170 deletions
diff --git a/ChangeLog-97b b/ChangeLog-97b
index 06e7e6a791c..4e11ee12367 100644
--- a/ChangeLog-97b
+++ b/ChangeLog-97b
@@ -1,3 +1,19 @@
+Sun Nov 16 11:13:43 1997 Douglas C. Schmidt <schmidt@flamenco.cs.wustl.edu>
+
+ * include/makeinclude/platform_linux_kcc.GNU (SOFLAGS): Improved
+ this file a bit to work better with NULL pointers. Thanks to
+ Ben Eng <ben@jetpen.com> for reporting this.
+
+ * examples/System_V_IPC/SV_Semaphores/Semaphores_1.cpp (main):
+ Changed allocator to alloc to avoid conflicts with STL. Thanks
+ to Ben Eng <ben@jetpen.com> for reporting this.
+
+ * ace/config-linux-kcc.h: Added some fixes for the KCC compiler.
+ Thanks to Ben Eng <ben@jetpen.com> for reporting this.
+
+ * ace/IOStream: Added fixes for the standard C++ library. Thanks
+ to Ben Eng <ben@jetpen.com> for reporting this.
+
Sat Nov 15 17:31:58 1997 Douglas C. Schmidt <schmidt@cs.wustl.edu>
* Ran "make depend" on all of ACE.
diff --git a/TAO/ChangeLog-98c b/TAO/ChangeLog-98c
index aa27ff4cbff..4c51a13fff7 100644
--- a/TAO/ChangeLog-98c
+++ b/TAO/ChangeLog-98c
@@ -234,7 +234,7 @@ Fri Nov 14 17:08:20 1997 Douglas C. Schmidt <schmidt@flamenco.cs.wustl.edu>
Fri Nov 14 17:10:20 1997 Sumedh Mungee <sumedh@lindy.cs.wustl.edu>
- * cubit_i.cpp: Chaged &d to %d in ACE_ERROR
+ * cubit_i.cpp: Changed &d to %d in ACE_ERROR
Fri Nov 14 16:42:21 1997 Chris Cleeland <cleeland@tango.cs.wustl.edu>
diff --git a/ace/IOStream.cpp b/ace/IOStream.cpp
index 91f2b69e127..1c5bdd76577 100644
--- a/ace/IOStream.cpp
+++ b/ace/IOStream.cpp
@@ -110,13 +110,17 @@ ACE_Streambuf::underflow (void)
// If input mode is not set, any attempt to read from the stream is
// a failure.
- if (! (mode_ & ios::in))
+ if (ACE_BIT_DISABLED (mode_, ios::in))
return EOF;
// If base () is empty then this is the first time any get/put
// operation has been attempted on the stream.
+#if defined (ACE_HAS_STANDARD_CPP_LIBRARY)
+ if (!eback ())
+#else /* ACE_HAS_STANDARD_CPP_LIBRARY */
if (!this->base ())
+#endif /* ACE_HAS_STANDARD_CPP_LIBRARY */
{
// Set base () to use our private read buffer. The arguments are:
// beginning of the buffer (base ())
@@ -125,7 +129,7 @@ ACE_Streambuf::underflow (void)
//
// We have to say "no" to the third parameter because we want to
// explicitly handle deletion of the TWO buffers at destruction.
- //
+
setb (this->eback_saved_,
this->eback_saved_ + streambuf_size_, 0);
@@ -153,12 +157,11 @@ ACE_Streambuf::underflow (void)
//
if (this->cur_mode_ == this->put_mode_)
{
- // Dump any pending output to the peer. This is not
- // really necessary because of the dual-buffer arrangement
- // we've set up but intuitively it makes sense to send
- // the pending data before we request data since the peer
- // will probably need what we're sending before it can
- // respond.
+ // Dump any pending output to the peer. This is not really
+ // necessary because of the dual-buffer arrangement we've
+ // set up but intuitively it makes sense to send the pending
+ // data before we request data since the peer will probably
+ // need what we're sending before it can respond.
if (out_waiting () && syncout () == EOF)
return EOF;
@@ -167,16 +170,15 @@ ACE_Streambuf::underflow (void)
this->pbase_saved_ = pbase ();
this->pptr_saved_ = pptr ();
this->epptr_saved_ = epptr ();
- //
+
// Disable put mode as described in the constructor.
- //
setp (0, 0);
- // Like the case where base () is false, we now point base ()
- // to use our private get buffer.
-
+ // Like the case where base () is false, we now point base
+ // () to use our private get buffer.
setb (this->eback_saved_,
- this->eback_saved_ + streambuf_size_, 0);
+ this->eback_saved_ + streambuf_size_,
+ 0);
// And restore the previous state of the get pointers.
@@ -192,10 +194,10 @@ ACE_Streambuf::underflow (void)
// mode before reading everything. In that case, we take this
// opportunity to feed it back to the iostream.
if (in_avail ())
- // Remember that we return an int so that we can give
- // back EOF. The explicit cast prevents us from
- // returning a signed char when we're not returning EOF.
- return (u_char) *gptr ();
+ // Remember that we return an int so that we can give back
+ // EOF. The explicit cast prevents us from returning a signed
+ // char when we're not returning EOF.
+ return (u_char) *gptr ();
}
// We really shouldn't be here unless there is a lack of data in the
@@ -203,7 +205,7 @@ ACE_Streambuf::underflow (void)
int result = fillbuf ();
- // fillbuf will give us EOF if there was an error with the peer. In
+ // Fillbuf will give us EOF if there was an error with the peer. In
// that case, we can do no more input.
if (EOF == result)
@@ -230,8 +232,11 @@ ACE_Streambuf::overflow (int c)
if (! (mode_ & ios::out))
return EOF;
- // First invokation of a get or put function
+#if defined (ACE_HAS_STANDARD_CPP_LIBRARY)
+ if (!eback ())
+#else /* ACE_HAS_STANDARD_CPP_LIBRARY */
if (!base ())
+#endif /* ACE_HAS_STANDARD_CPP_LIBRARY */
{
// Set base () to use put's private buffer.
//
@@ -247,7 +252,7 @@ ACE_Streambuf::overflow (int c)
// Set the mode for optimization.
this->cur_mode_ = this->put_mode_;
}
- else // We're already reading or writting
+ else // We're already reading or writing
{
// If we're coming out of get mode...
if (this->cur_mode_ == this->get_mode_)
@@ -296,9 +301,9 @@ ACE_Streambuf::overflow (int c)
int
ACE_Streambuf::syncin (void)
{
- // As discussed, there really isn't any way to sync input from a socket-like
- // device. We specifially override this base-class function so that it won't
- // do anything evil to us.
+ // As discussed, there really isn't any way to sync input from a
+ // socket-like device. We specifially override this base-class
+ // function so that it won't do anything evil to us.
return 0;
}
@@ -320,18 +325,19 @@ ACE_Streambuf::syncout (void)
int
ACE_Streambuf::sync (void)
{
- // sync () is fairly traditional in that it syncs both input and output.
- // We could have omitted the call to syncin () but someday, we may want it
- // to do something.
+ // sync () is fairly traditional in that it syncs both input and
+ // output. We could have omitted the call to syncin () but someday,
+ // we may want it to do something.
syncin ();
- // Don't bother syncing the output unless there is data to be sent...
+ // Don't bother syncing the output unless there is data to be
+ // sent...
if (out_waiting ())
return syncout ();
-
- return 0;
+ else
+ return 0;
}
// flushbuf
@@ -339,32 +345,31 @@ ACE_Streambuf::sync (void)
int
ACE_Streambuf::flushbuf (void)
{
- // pptr () is one character beyond the last character put
- // into the buffer. pbase () points to the beginning of
- // the put buffer. Unless pptr () is greater than pbase ()
- // there is nothing to be sent to the peer.
- //
+ // pptr () is one character beyond the last character put into the
+ // buffer. pbase () points to the beginning of the put buffer.
+ // Unless pptr () is greater than pbase () there is nothing to be
+ // sent to the peer.
+
if (pptr () <= pbase ())
- return 0;
+ return 0;
// 4/12/97 -- JCEJ
// Kludge!!!
- // If the remote side shuts down the connection, an attempt to
- // send () to the remote will result in the message 'Broken Pipe'
- // I think this is an OS message, I've tracked it down to the
- // ACE_OS::write () function. That's the last one to be called
- // before the message. I can only test this on Linux though, so
- // I don't know how other systems will react.
+ // If the remote side shuts down the connection, an attempt to send
+ // () to the remote will result in the message 'Broken Pipe' I think
+ // this is an OS message, I've tracked it down to the ACE_OS::write
+ // () function. That's the last one to be called before the
+ // message. I can only test this on Linux though, so I don't know
+ // how other systems will react.
//
// To get around this gracefully, I do a PEEK recv () with an
- // immediate (nearly) timeout. recv () is much more graceful
- // on it's failure. If we get -1 from recv () not due to timeout
- // then we know we're SOL.
+ // immediate (nearly) timeout. recv () is much more graceful on
+ // it's failure. If we get -1 from recv () not due to timeout then
+ // we know we're SOL.
//
// Q: Is 'errno' threadsafe? Should the section below be a
// critical section?
//
- //
// char tbuf[1];
// ACE_Time_Value to (0,1);
// if (this->recv (tbuf, 1, MSG_PEEK, &to) == -1)
@@ -376,23 +381,19 @@ ACE_Streambuf::flushbuf (void)
// }
// }
//
- // The correct way to handle this is for the application to
- // trap (and ignore?) SIGPIPE. Thanks to Amos Shapira
- // for reminding me of this.
- //
+ // The correct way to handle this is for the application to trap
+ // (and ignore?) SIGPIPE. Thanks to Amos Shapira for reminding me
+ // of this.
+
+ // Starting at the beginning of the buffer, send as much data as
+ // there is waiting. send guarantees that all of the data will be
+ // sent or an error will be returned.
- // Starting at the beginning of the buffer, send as much
- // data as there is waiting. send guarantees that all
- // of the data will be sent or an error will be returned.
- //
if (this->send (pbase (), pptr () - pbase ()) == -1)
- {
- return EOF;
- }
+ return EOF;
// Now that we've sent everything in the output buffer, we reset the
// buffer pointers to appear empty.
- //
setp (base (), ebuf ());
return 0;
@@ -409,18 +410,19 @@ ACE_Streambuf::get_one_byte (void)
if (this->recv_n (base (), 1, MSG_PEEK, recv_timeout_) != 1)
return EOF;
-
- return 1;
+ else
+ return 1;
}
+// This will be called when the read (get) buffer has been exhausted
+// (ie -- gptr == egptr).
+
int
ACE_Streambuf::fillbuf (void)
- // This will be called when the read (get) buffer has been
- // exhausted (ie -- gptr == egptr)
{
- // Invoke recv_n to get exactly one byte from the remote. This
- // will block until something shows up.
- //
+ // Invoke recv_n to get exactly one byte from the remote. This will
+ // block until something shows up.
+
if (get_one_byte () == EOF)
return EOF;
@@ -440,7 +442,7 @@ ACE_Streambuf::fillbuf (void)
setg (base (), base (), base () + bc);
- // Return the byte-read-count including the one from <get_one_byte>
+ // Return the byte-read-count including the one from <get_one_byte>.
return bc;
}
@@ -457,35 +459,39 @@ ACE_Streambuf::ACE_Streambuf (u_int streambuf_size, int io_mode)
(void)reset_put_buffer ();
}
-u_int ACE_Streambuf::streambuf_size (void)
+u_int
+ACE_Streambuf::streambuf_size (void)
{
return streambuf_size_;
}
-u_int ACE_Streambuf::get_waiting (void)
- // Return the number of bytes not yet gotten.
- // eback + get_waiting = gptr
+// Return the number of bytes not yet gotten. eback + get_waiting =
+// gptr.
+
+u_int
+ACE_Streambuf::get_waiting (void)
{
- return this->gptr_saved_ - this->eback_saved_;
+ return this->gptr_saved_ - this->eback_saved_;
}
-u_int ACE_Streambuf::get_avail (void)
- // Return the number of bytes in the get area (includes some already gotten);
- // eback + get_avail = egptr
+// Return the number of bytes in the get area (includes some already
+// gotten); eback + get_avail = egptr.
+
+u_int
+ACE_Streambuf::get_avail (void)
{
- return this->egptr_saved_ - this->eback_saved_;
+ return this->egptr_saved_ - this->eback_saved_;
}
-u_int ACE_Streambuf::put_avail (void)
- // Return the number of bytes to be 'put' onto the stream media.
- // pbase + put_avail = pptr
+// Return the number of bytes to be 'put' onto the stream media.
+// pbase + put_avail = pptr.
+
+u_int
+ACE_Streambuf::put_avail (void)
{
- return this->pptr_saved_ - this->pbase_saved_;
+ return this->pptr_saved_ - this->pbase_saved_;
}
-char *
-ACE_Streambuf::reset_get_buffer (char * newBuffer, u_int _streambuf_size, u_int _gptr, u_int _egptr)
-//
// Typical usage:
//
// u_int newGptr = otherStream->get_waiting ();
@@ -495,11 +501,16 @@ ACE_Streambuf::reset_get_buffer (char * newBuffer, u_int _streambuf_size, u_int
//
// 'myStream' now has the get buffer of 'otherStream' and can use it in any way.
// 'otherStream' now has a new, empty get buffer.
-//
+
+char *
+ACE_Streambuf::reset_get_buffer (char *newBuffer,
+ u_int _streambuf_size,
+ u_int _gptr,
+ u_int _egptr)
{
char * rval = this->eback_saved_;
- // The get area is where the iostrem will get data from. This is
+ // The get area is where the iostream will get data from. This is
// our read buffer. There are three pointers which describe the
// read buffer:
//
@@ -516,15 +527,13 @@ ACE_Streambuf::reset_get_buffer (char * newBuffer, u_int _streambuf_size, u_int
// of our read-dedicated buffer.
//
if (newBuffer)
- {
- if (streambuf_size_ != _streambuf_size)
- return NULL;
- this->eback_saved_ = newBuffer;
- }
+ {
+ if (streambuf_size_ != _streambuf_size)
+ return NULL;
+ this->eback_saved_ = newBuffer;
+ }
else
- {
- ACE_NEW_RETURN (this->eback_saved_, char[streambuf_size_], 0);
- }
+ ACE_NEW_RETURN (this->eback_saved_, char[streambuf_size_], 0);
this->gptr_saved_ = this->eback_saved_ + _gptr;
this->egptr_saved_ = this->eback_saved_ + _egptr;
@@ -538,17 +547,18 @@ ACE_Streambuf::reset_get_buffer (char * newBuffer, u_int _streambuf_size, u_int
return rval;
}
-char *
-ACE_Streambuf::reset_put_buffer (char * newBuffer, u_int _streambuf_size, u_int _pptr)
-//
// Typical usage:
//
// u_int newPptr = otherStream->put_avail ();
// char * newBuf = otherStream->reset_put_buffer ();
// char * oldputbuf = otherStream->reset_put_buffer (newBuf, otherStream->streambuf_size (), newPptr);
-//
+
+char *
+ACE_Streambuf::reset_put_buffer (char *newBuffer,
+ u_int _streambuf_size,
+ u_int _pptr)
{
- char * rval = this->pbase_saved_;
+ char *rval = this->pbase_saved_;
// The put area is where the iostream will put data that needs to be
// sent to the peer. This becomes our write buffer. The three
@@ -564,15 +574,13 @@ ACE_Streambuf::reset_put_buffer (char * newBuffer, u_int _streambuf_size, u_int
// these three pointers.
//
if (newBuffer)
- {
- if (streambuf_size_ != _streambuf_size)
- return NULL;
- this->pbase_saved_ = newBuffer;
- }
+ {
+ if (streambuf_size_ != _streambuf_size)
+ return NULL;
+ this->pbase_saved_ = newBuffer;
+ }
else
- {
- ACE_NEW_RETURN (this->pbase_saved_, char[streambuf_size_], 0);
- }
+ ACE_NEW_RETURN (this->pbase_saved_, char[streambuf_size_], 0);
this->pptr_saved_ = this->pbase_saved_ + _pptr;
this->epptr_saved_ = this->pbase_saved_ + streambuf_size_;
@@ -612,5 +620,4 @@ ACE_Streambuf::~ACE_Streambuf (void)
}
#endif /* !ACE_LACKS_ACE_IOSTREAM */
-
#endif /* ACE_IOSTREAM_C */
diff --git a/ace/IOStream.h b/ace/IOStream.h
index b25e6e43a59..c47fb18f98a 100644
--- a/ace/IOStream.h
+++ b/ace/IOStream.h
@@ -33,6 +33,9 @@
#if defined (ACE_HAS_STRING_CLASS)
#if defined (ACE_WIN32)
typedef CString ACE_IOStream_String;
+#elif defined (ACE_HAS_STANDARD_CPP_LIBRARY) && defined (ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB)
+#include /**/ <string>
+typedef std::string ACE_IOStream_String;
#else
#include /**/ <String.h>
typedef String ACE_IOStream_String;
@@ -279,6 +282,17 @@ protected:
// that time.
virtual ACE_HANDLE get_handle (void);
+
+#if defined (ACE_HAS_STANDARD_CPP_LIBRARY)
+ char *base (void) const { return eback_saved_; }
+ char *ebuf (void) const { return eback_saved_ + streambuf_size_; }
+ int blen (void) const { return streambuf_size_; }
+ void setb (char* b, char* eb, int a=0)
+ {
+ setbuf (b, (eb - b));
+ }
+ int out_waiting (void) { return pptr () - pbase (); }
+#endif /* ACE_HAS_STANDARD_CPP_LIBRARY */
};
///////////////////////////////////////////////////////////////////////////
diff --git a/ace/IOStream_T.cpp b/ace/IOStream_T.cpp
index 51cbf03cd4e..4f52ae60b3a 100644
--- a/ace/IOStream_T.cpp
+++ b/ace/IOStream_T.cpp
@@ -46,7 +46,9 @@ ACE_Streambuf_T<STREAM>::ACE_Streambuf_T (STREAM *peer,
// functions anyway and I haven't implemented anything there to
// support unbuffered IO.
+#if !defined (ACE_LACKS_UNBUFFERED_STREAMBUF)
this->unbuffered (0);
+#endif /* ! ACE_LACKS_UNBUFFERED_STREAMBUF */
// Linebuffered is similar to unbuffered. Again, I don't have any
// need for this and I don't see the advantage. I believe this
diff --git a/ace/config-linux-kcc.h b/ace/config-linux-kcc.h
index 1d54422c80e..a212de03c55 100644
--- a/ace/config-linux-kcc.h
+++ b/ace/config-linux-kcc.h
@@ -68,7 +68,7 @@
// Compiler/platform has correctly prototyped header files.
#define ACE_HAS_CPLUSPLUS_HEADERS
-#define ACE_LACKS_POSIX_PROTOTYPES_FOR_SOME_FUNCS
+#define ACE_LACKS_SOME_POSIX_PROTOTYPES
// Platforms lacks UNIX domain sockets.
//#define ACE_LACKS_UNIX_DOMAIN_SOCKETS
@@ -130,10 +130,12 @@
//#define ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES
// Define this if you want to use the standard C++ library
-#if defined(__KCC)
+#if defined (__KCC)
#define ACE_HAS_STANDARD_CPP_LIBRARY 1
#define ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB 1
-#define ACE_LACKS_ACE_IOSTREAM 1
-#endif
+#define ACE_LACKS_IOSTREAM_FX 1
+#define ACE_LACKS_LINEBUFFERED_STREAMBUF 1
+#define ACE_LACKS_UNBUFFERED_STREAMBUF 1
+#endif /* __KCC */
#endif /* ACE_CONFIG_H */
diff --git a/examples/IOStream/client/iostream_client.cpp b/examples/IOStream/client/iostream_client.cpp
index cb54c9016a8..51556b7e34d 100644
--- a/examples/IOStream/client/iostream_client.cpp
+++ b/examples/IOStream/client/iostream_client.cpp
@@ -20,8 +20,8 @@ int main (int argc, char *argv[])
float f;
#if defined (ACE_HAS_STRING_CLASS)
- String s1;
- String s2;
+ ACE_IOStream_String s1;
+ ACE_IOStream_String s2;
server >> s1 >> i >> f >> s2;
cerr << "Server said:\n\t";
diff --git a/examples/IOStream/server/iostream_server.cpp b/examples/IOStream/server/iostream_server.cpp
index 494ddf53acf..0e1fb73bfca 100644
--- a/examples/IOStream/server/iostream_server.cpp
+++ b/examples/IOStream/server/iostream_server.cpp
@@ -39,72 +39,72 @@ public:
Handler (void) {}
virtual int open (void *)
- {
- if (this->reactor () ->register_handler
- (this, ACE_Event_Handler::READ_MASK) == - 1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "registering connection handler with ACE_Reactor\n"),
- -1);
+ {
+ if (this->reactor ()->register_handler
+ (this, ACE_Event_Handler::READ_MASK) == -1)
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "registering connection handler with ACE_Reactor\n"),
+ -1);
- return 0;
- }
+ return 0;
+ }
virtual void destroy (void)
- {
- this->peer ().close ();
- delete this ;
- }
+ {
+ this->peer ().close ();
+ delete this ;
+ }
virtual int close (u_long)
- {
- this->destroy ();
- return 0 ;
- }
+ {
+ this->destroy ();
+ return 0 ;
+ }
virtual int handle_input (ACE_HANDLE)
- {
- int i;
- float f;
+ {
+ int i;
+ float f;
#if defined (ACE_HAS_STRING_CLASS)
- String s;
+ ACE_IOStream_String s;
- if (!(this -> peer () >> i >> f >> s))
- {
- cerr << "Error getting data" << endl ;
- return - 1 ;
- }
+ if (!(this->peer () >> i >> f >> s))
+ {
+ cerr << "Error getting data" << endl ;
+ return - 1 ;
+ }
- cerr << "Received (" << i << ") (" << f << ") (" << s << ")" << endl ;
+ cerr << "Received (" << i << ") (" << f << ") (" << s << ")" << endl ;
- if (!(this -> peer () << "Received: " << i << " " << f << " " << s << endl))
- {
- cerr << __LINE__ << "Error sending data" << endl ;
- return - 1 ;
- }
+ if (!(this->peer () << "Received: " << i << " " << f << " " << s << endl))
+ {
+ cerr << __LINE__ << "Error sending data" << endl ;
+ return - 1 ;
+ }
#else
- if (!(this -> peer () >> i >> f))
- {
- cerr << "Error getting data" << endl ;
- return - 1 ;
- }
-
- cerr << "Received (" << i << ") (" << f << ")" << endl;
-
- if (!(this -> peer () << i << " " << f << endl))
- {
- cerr << __LINE__ << "Error sending data" << endl ;
- return - 1 ;
- }
+ if (!(this->peer () >> i >> f))
+ {
+ cerr << "Error getting data" << endl ;
+ return - 1 ;
+ }
+
+ cerr << "Received (" << i << ") (" << f << ")" << endl;
+
+ if (!(this->peer () << i << " " << f << endl))
+ {
+ cerr << __LINE__ << "Error sending data" << endl ;
+ return - 1 ;
+ }
#endif /* ACE_HAS_STRING_CLASS */
- // In order to flush the output to the peer, we have to use the
- // sync () function. Some iostreams implementations let us use a
- // 'flush' function much like the 'endl' function.
+ // In order to flush the output to the peer, we have to use the
+ // sync () function. Some iostreams implementations let us use a
+ // 'flush' function much like the 'endl' function.
- // this->peer ().sync ();
- return 0;
- }
+ // this->peer ().sync ();
+ return 0;
+ }
};
// Create an object which will accept new connection requests and
@@ -133,7 +133,7 @@ main (int argc, char *argv [])
Logging_Acceptor peer_acceptor ;
- if (peer_acceptor.open (ACE_INET_Addr (argc > 1 ? atoi (argv[1]) : ACE_DEFAULT_SERVER_PORT)) == - 1)
+ if (peer_acceptor.open (ACE_INET_Addr (argc > 1 ? atoi (argv[1]) : ACE_DEFAULT_SERVER_PORT)) == -1)
ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "open"), - 1);
else if (ACE_Reactor::instance ()->register_handler
diff --git a/examples/System_V_IPC/SV_Semaphores/Semaphores_1.cpp b/examples/System_V_IPC/SV_Semaphores/Semaphores_1.cpp
index d8207a8968b..1e5e01c8266 100644
--- a/examples/System_V_IPC/SV_Semaphores/Semaphores_1.cpp
+++ b/examples/System_V_IPC/SV_Semaphores/Semaphores_1.cpp
@@ -8,7 +8,7 @@
// Shared memory allocator (note that this chews up the
// ACE_DEFAULT_SEM_KEY).
-static ACE_Malloc<ACE_SHARED_MEMORY_POOL, ACE_SV_Semaphore_Simple> allocator;
+static ACE_Malloc<ACE_SHARED_MEMORY_POOL, ACE_SV_Semaphore_Simple> alloc;
const int SEM_KEY = ACE_DEFAULT_SEM_KEY + 1;
@@ -29,8 +29,8 @@ parent (char *shm)
else if (sem.acquire (1) == -1)
ACE_ERROR ((LM_ERROR, "%p", "parent sem.acquire(1)"));
- if (allocator.remove () == -1)
- ACE_ERROR ((LM_ERROR, "%p\n", "allocator.remove"));
+ if (alloc.remove () == -1)
+ ACE_ERROR ((LM_ERROR, "%p\n", "alloc.remove"));
if (sem.remove () == -1)
ACE_ERROR ((LM_ERROR, "%p\n", "sem.remove"));
return 0;
@@ -60,7 +60,7 @@ child (char *shm)
int
main (int, char *[])
{
- char *shm = (char *) allocator.malloc (27);
+ char *shm = (char *) alloc.malloc (27);
switch (ACE_OS::fork ())
{
diff --git a/include/makeinclude/platform_linux_kcc.GNU b/include/makeinclude/platform_linux_kcc.GNU
index c505973a637..1cff9783ea0 100644
--- a/include/makeinclude/platform_linux_kcc.GNU
+++ b/include/makeinclude/platform_linux_kcc.GNU
@@ -9,7 +9,7 @@ optimize = 0
CC = KCC
CXX = KCC
CFLAGS +=
-CCFLAGS += $(CFLAGS)
+CCFLAGS += $(CFLAGS) -DNULL=0
DCFLAGS += +K0 -g
DLD = $(CXX)
LD = $(CXX)
@@ -20,7 +20,7 @@ AR = KCC
ARFLAGS = -o
RANLIB = true
-SOFLAGS = $(CPPFLAGS) -tall
+SOFLAGS = $(CPPFLAGS)
SOBUILD = $(COMPILE.cc) $(PIC) -o $(VSHDIR)$*.o $<
PRELIB = @true
PRELIB_USES_OBJ_ONLY = 1