mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 04:37:00 +00:00
Some missing from merge.
Signed-off-by: Salja <salja2012@hotmail.de>
This commit is contained in:
parent
ec939a5bce
commit
f4be15a7af
1895 changed files with 160408 additions and 53601 deletions
|
|
@ -1,3 +1,5 @@
|
|||
// $Id: SPIPE_Stream.cpp 91286 2010-08-05 09:04:31Z johnnyw $
|
||||
|
||||
#include "ace/SPIPE_Stream.h"
|
||||
#include "ace/OS_Memory.h"
|
||||
|
||||
|
|
@ -5,9 +7,6 @@
|
|||
#include "ace/SPIPE_Stream.inl"
|
||||
#endif /* __ACE_INLINE__ */
|
||||
|
||||
#if defined (ACE_HAS_ALLOC_HOOKS)
|
||||
# include "ace/Malloc_Base.h"
|
||||
#endif /* ACE_HAS_ALLOC_HOOKS */
|
||||
|
||||
|
||||
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
|
||||
|
|
@ -34,7 +33,6 @@ ACE_SPIPE_Stream::ACE_SPIPE_Stream (void)
|
|||
// the *total* number of trailing arguments, *not* a couple of the
|
||||
// number of tuple pairs!
|
||||
|
||||
#ifndef ACE_LACKS_VA_FUNCTIONS
|
||||
ssize_t
|
||||
ACE_SPIPE_Stream::send (size_t n, ...) const
|
||||
{
|
||||
|
|
@ -45,16 +43,9 @@ ACE_SPIPE_Stream::send (size_t n, ...) const
|
|||
#if defined (ACE_HAS_ALLOCA)
|
||||
iovp = (iovec *) alloca (total_tuples * sizeof (iovec));
|
||||
#else
|
||||
# ifdef ACE_HAS_ALLOC_HOOKS
|
||||
ACE_ALLOCATOR_RETURN (iovp, (iovec *)
|
||||
ACE_Allocator::instance ()->malloc (total_tuples *
|
||||
sizeof (iovec)),
|
||||
-1);
|
||||
# else
|
||||
ACE_NEW_RETURN (iovp,
|
||||
iovec[total_tuples],
|
||||
-1);
|
||||
# endif /* ACE_HAS_ALLOC_HOOKS */
|
||||
#endif /* !defined (ACE_HAS_ALLOCA) */
|
||||
|
||||
va_start (argp, n);
|
||||
|
|
@ -67,11 +58,7 @@ ACE_SPIPE_Stream::send (size_t n, ...) const
|
|||
|
||||
ssize_t result = ACE_OS::writev (this->get_handle (), iovp, total_tuples);
|
||||
#if !defined (ACE_HAS_ALLOCA)
|
||||
# ifdef ACE_HAS_ALLOC_HOOKS
|
||||
ACE_Allocator::instance ()->free (iovp);
|
||||
# else
|
||||
delete [] iovp;
|
||||
# endif /* ACE_HAS_ALLOC_HOOKS */
|
||||
#endif /* !defined (ACE_HAS_ALLOCA) */
|
||||
va_end (argp);
|
||||
return result;
|
||||
|
|
@ -93,16 +80,9 @@ ACE_SPIPE_Stream::recv (size_t n, ...) const
|
|||
#if defined (ACE_HAS_ALLOCA)
|
||||
iovp = (iovec *) alloca (total_tuples * sizeof (iovec));
|
||||
#else
|
||||
# ifdef ACE_HAS_ALLOC_HOOKS
|
||||
ACE_ALLOCATOR_RETURN (iovp, (iovec *)
|
||||
ACE_Allocator::instance ()->malloc (total_tuples *
|
||||
sizeof (iovec)),
|
||||
-1);
|
||||
# else
|
||||
ACE_NEW_RETURN (iovp,
|
||||
iovec[total_tuples],
|
||||
-1);
|
||||
# endif /* ACE_HAS_ALLOC_HOOKS */
|
||||
#endif /* !defined (ACE_HAS_ALLOCA) */
|
||||
|
||||
va_start (argp, n);
|
||||
|
|
@ -115,15 +95,10 @@ ACE_SPIPE_Stream::recv (size_t n, ...) const
|
|||
|
||||
ssize_t result = ACE_OS::readv (this->get_handle (), iovp, total_tuples);
|
||||
#if !defined (ACE_HAS_ALLOCA)
|
||||
# ifdef ACE_HAS_ALLOC_HOOKS
|
||||
ACE_Allocator::instance ()->free (iovp);
|
||||
# else
|
||||
delete [] iovp;
|
||||
# endif /* ACE_HAS_ALLOC_HOOKS */
|
||||
#endif /* !defined (ACE_HAS_ALLOCA) */
|
||||
va_end (argp);
|
||||
return result;
|
||||
}
|
||||
#endif // ACE_LACKS_VA_FUNCTIONS
|
||||
|
||||
ACE_END_VERSIONED_NAMESPACE_DECL
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue