diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2006-05-05 07:58:49 +0000 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2006-05-05 07:58:49 +0000 |
commit | c6b90f6aa3fa23bbb78e8c83e0fcc2d189eaf8d4 (patch) | |
tree | 9fd017f01fdabf43484f41533b9e1d9e7da039bb | |
parent | dff8543d735b1f452dd476e15d114632c47158dd (diff) | |
download | ATCD-c6b90f6aa3fa23bbb78e8c83e0fcc2d189eaf8d4.tar.gz |
ChangeLogTag: Fri May 5 07:42:12 UTC 2006 Johnny Willemsen <jwillemsen@remedy.nl>
-rw-r--r-- | ace/IOStream.h | 8 | ||||
-rw-r--r-- | ace/Lib_Find.cpp | 2 | ||||
-rw-r--r-- | ace/Mem_Map.cpp | 46 | ||||
-rw-r--r-- | ace/OS.h | 46 | ||||
-rw-r--r-- | ace/OS_NS_fcntl.cpp | 40 | ||||
-rw-r--r-- | ace/OS_NS_netdb.inl | 17 | ||||
-rw-r--r-- | ace/OS_NS_sys_utsname.cpp | 17 |
7 files changed, 17 insertions, 159 deletions
diff --git a/ace/IOStream.h b/ace/IOStream.h index 49c0612da13..aeaced51bc5 100644 --- a/ace/IOStream.h +++ b/ace/IOStream.h @@ -378,7 +378,7 @@ typedef ostream& (*__omanip_)(ostream&); // operators. Notice how the <ipfx> and <isfx> functions are used. #define GET_SIG(MT,DT) inline virtual MT& operator>> (DT v) -# if defined (__KCC) || (defined (__SUNPRO_CC) && __SUNPRO_CC > 0x510) +# if (defined (__SUNPRO_CC) && __SUNPRO_CC > 0x510) #define GET_CODE { \ if (ipfx (0)) \ { \ @@ -396,7 +396,7 @@ typedef ostream& (*__omanip_)(ostream&); isfx (); \ return *this; \ } -# endif /* __KCC */ +# endif #define GET_PROT(MT,DT,CODE) GET_SIG(MT,DT) CODE #define GET_FUNC(MT,DT) GET_PROT(MT,DT,GET_CODE) @@ -405,7 +405,7 @@ typedef ostream& (*__omanip_)(ostream&); // operators. Notice how the <opfx> and <osfx> functions are used. #define PUT_SIG(MT,DT) inline virtual MT& operator<< (DT v) -# if defined (__KCC) || (defined (__SUNPRO_CC) && __SUNPRO_CC > 0x510) +# if (defined (__SUNPRO_CC) && __SUNPRO_CC > 0x510) #define PUT_CODE { \ if (opfx ()) \ { \ @@ -423,7 +423,7 @@ typedef ostream& (*__omanip_)(ostream&); osfx (); \ return *this; \ } -# endif /* __KCC */ +# endif #define PUT_PROT(MT,DT,CODE) PUT_SIG(MT,DT) CODE #define PUT_FUNC(MT,DT) PUT_PROT(MT,DT,PUT_CODE) diff --git a/ace/Lib_Find.cpp b/ace/Lib_Find.cpp index 546b1469f8d..1d3929f710a 100644 --- a/ace/Lib_Find.cpp +++ b/ace/Lib_Find.cpp @@ -27,7 +27,6 @@ ACE_RCSID(ace, Lib_Find, "$Id$") ACE_BEGIN_VERSIONED_NAMESPACE_DECL -#if ! defined (ACE_PSOS_DIAB_MIPS) int ACE::ldfind (const ACE_TCHAR* filename, ACE_TCHAR pathname[], @@ -598,7 +597,6 @@ ACE::open_temp_file (const ACE_TCHAR *name, int mode, int perm) return handle; #endif /* ACE_WIN32 */ } -#endif /* ! ACE_PSOS_DIAB_MIPS */ size_t ACE::strrepl (char *s, char search, char replace) diff --git a/ace/Mem_Map.cpp b/ace/Mem_Map.cpp index 049a72a83df..40243c39787 100644 --- a/ace/Mem_Map.cpp +++ b/ace/Mem_Map.cpp @@ -107,7 +107,7 @@ ACE_Mem_Map::map_it (ACE_HANDLE handle, #if defined (ACE_LACKS_AUTO_MMAP_REPLACEMENT) // If the system does not replace any previous mappings, then // unmap() before (potentially) mapping to the same location. - int unmap_result = this->unmap (); + int const unmap_result = this->unmap (); if (unmap_result != 0) return unmap_result; #endif /* ACE_LACKS_AUTO_MMAP_REPLACEMENT */ @@ -115,18 +115,7 @@ ACE_Mem_Map::map_it (ACE_HANDLE handle, this->base_addr_ = addr; this->handle_ = handle; -#if defined (CHORUS) - // Chorus does not support filesize on a shared memory handle. We - // assume that <length_> = 0 when <ACE_Mem_Map> is initially - // constructed (i.e., before <map_it> is called with a valid - // <len_request>). - long result = this->length_; - - if (result == -1) - return -1; -#else off_t result = ACE_OS::filesize (this->handle_); -#endif /* CHORUS */ // At this point we know <result> is not negative... size_t current_file_length = static_cast<size_t> (result); @@ -166,7 +155,6 @@ ACE_Mem_Map::map_it (ACE_HANDLE handle, // Check if we need to extend the backing store. if (extend_backing_store) { -#if !defined (CHORUS) // Remember than write increases the size by one. off_t null_byte_position; if (requested_file_length > 0) @@ -182,20 +170,6 @@ ACE_Mem_Map::map_it (ACE_HANDLE handle, 1, null_byte_position) == -1) return -1; -#else - // This nonsense is to make this code similar to the above code. - size_t actual_file_length; - if (requested_file_length > 0) - // This will make the file size <requested_file_length> - actual_file_length = requested_file_length; - else - // This will make the file size 1 - actual_file_length = 1; - - if (ACE_OS::ftruncate (this->handle_, - actual_file_length) == -1) - return -1; -#endif /* !CHORUS */ } #if defined (ACE_HAS_LYNXOS_BROKEN_MMAP) @@ -217,14 +191,14 @@ ACE_Mem_Map::map_it (ACE_HANDLE handle, max_mapping_name_length + 1); this->base_addr_ = ACE_OS::mmap (this->base_addr_, - this->length_, - prot, - share, - this->handle_, - offset, - &this->file_mapping_, - sa, - file_mapping_name); + this->length_, + prot, + share, + this->handle_, + offset, + &this->file_mapping_, + sa, + file_mapping_name); } else #endif /* ACE_USE_MAPPING_NAME */ @@ -385,7 +359,7 @@ ACE_Mem_Map::remove (void) this->close (); if (this->filename_[0] != '\0') -#if defined (CHORUS) || defined (__QNXNTO__) +#if defined (__QNXNTO__) return ACE_OS::shm_unlink (this->filename_); #else return ACE_OS::unlink (this->filename_); @@ -110,33 +110,6 @@ ACE_END_VERSIONED_NAMESPACE_DECL #include "ace/os_include/sys/os_wait.h" -# if defined (ACE_PSOS) -# include /**/ "ace/sys_conf.h" /* system configuration file */ -# include /**/ <pna.h> /* pNA+ TCP/IP Network Manager calls */ -# if defined (ACE_PSOSIM) -# include /**/ <psos.h> /* pSOS+ system calls */ - /* include <rpc.h> pRPC+ Remote Procedure Call Library calls */ - /* are not supported by pSOSim */ - /* */ - /* include <phile.h> pHILE+ file system calls are not supported */ - /* by pSOSim *so*, for the time being, we make */ - /* use of UNIX file system headers and then */ - /* when we have time, we wrap UNIX file system */ - /* calls w/ pHILE+ wrappers, and modify ACE to */ - /* use the wrappers under pSOSim */ -# else -# include /**/ <configs.h> /* includes all pSOS headers */ -// #include /**/ <psos.h> /* pSOS system calls */ -# include /**/ <phile.h> /* pHILE+ file system calls */ -// #include /**/ <prepccfg.h> /* pREPC+ file system calls */ -# if defined (ACE_PSOS_DIAB_MIPS) -# if !defined (ACE_PSOS_USES_DIAB_SYS_CALLS) -# include /**/ <prepc.h> -# endif /* ACE_PSOS_USES_DIAB_SYS_CALLS */ -# endif /* ACE_PSOS_DIAB_MIPS */ -# endif /* defined (ACE_PSOSIM) */ -# endif /* defined (ACE_PSOS) **********************************************/ - // This needs to go here *first* to avoid problems with AIX. # if defined (ACE_HAS_PTHREADS) # include "ace/os_include/os_pthread.h" @@ -231,24 +204,7 @@ ACE_END_VERSIONED_NAMESPACE_DECL # else /* !defined (ACE_WIN32) && !defined (ACE_PSOS) */ -# if defined (CHORUS) -# include /**/ <chorus.h> -# if !defined(CHORUS_4) -# include /**/ <cx/select.h> -# else -# include "ace/os_include/os_stdio.h" -# endif -# include "ace/os_include/sys/os_uio.h" -# include "ace/os_include/os_time.h" -# include /**/ <stdfileio.h> -# include /**/ <am/afexec.h> -# include "ace/os_include/sys/os_types.h" -# include "ace/os_include/os_signal.h" // <sys/signal.h> -# include "ace/os_include/sys/os_wait.h" -# include "ace/os_include/os_pwd.h" -# include /**/ <timer/chBench.h> - -# elif defined (CYGWIN32) +# if defined (CYGWIN32) # include "ace/os_include/sys/os_uio.h" # include "ace/os_include/os_fcntl.h" // <sys/file.h> # include "ace/os_include/sys/os_time.h" diff --git a/ace/OS_NS_fcntl.cpp b/ace/OS_NS_fcntl.cpp index 1d9d5bf2bcc..bd3cbba647d 100644 --- a/ace/OS_NS_fcntl.cpp +++ b/ace/OS_NS_fcntl.cpp @@ -114,46 +114,6 @@ ACE_OS::open (const char *filename, ACE_FAIL_RETURN (h); else return h; -#elif defined (ACE_PSOS) - ACE_UNUSED_ARG (perms); - ACE_UNUSED_ARG (sa); -# if defined (ACE_PSOS_LACKS_PHILE) - ACE_UNUSED_ARG (filename); - return 0; -# else - unsigned long result, handle; - result = ::open_f (&handle, const_cast<char *> (filename), 0); - if (result != 0) - { - // We need to clean this up...not 100% correct! - // To correct we should handle all the cases of TRUNC and CREAT - if ((result == 0x200B) && (ACE_BIT_ENABLED (mode, O_CREAT))) - { - result = ::create_f(const_cast<char *> (filename),1,0); - if (result != 0) - { - errno = result; - return static_cast<ACE_HANDLE> (-1); - } - else //File created...try to open it again - { - result = ::open_f (&handle, const_cast<char *> (filename), 0); - if (result != 0) - { - errno = result; - return static_cast<ACE_HANDLE> (-1); - } - - } - } - else - { - errno = result; - return static_cast<ACE_HANDLE> (-1); - } - } - return static_cast<ACE_HANDLE> (handle); -# endif /* defined (ACE_PSOS_LACKS_PHILE) */ #elif defined (INTEGRITY) ACE_UNUSED_ARG (sa); if(!strcmp(filename,ACE_DEV_NULL)) { diff --git a/ace/OS_NS_netdb.inl b/ace/OS_NS_netdb.inl index e1caa25eb6d..6f3eb4c0d27 100644 --- a/ace/OS_NS_netdb.inl +++ b/ace/OS_NS_netdb.inl @@ -81,15 +81,7 @@ ACE_OS::gethostbyaddr_r (const char *addr, int *h_errnop) { ACE_OS_TRACE ("ACE_OS::gethostbyaddr_r"); -# if defined (ACE_PSOS) - ACE_UNUSED_ARG (addr); - ACE_UNUSED_ARG (length); - ACE_UNUSED_ARG (type); - ACE_UNUSED_ARG (result); - ACE_UNUSED_ARG (buffer); - ACE_UNUSED_ARG (h_errnop); - ACE_NOTSUP_RETURN (0); -# elif defined (ACE_HAS_REENTRANT_FUNCTIONS) && !defined (UNIXWARE) +# if defined (ACE_HAS_REENTRANT_FUNCTIONS) && !defined (UNIXWARE) # if defined (AIX) || defined (DIGITAL_UNIX) || defined (HPUX_10) ACE_OS::memset (buffer, 0, sizeof (ACE_HOSTENT_DATA)); @@ -292,12 +284,7 @@ ACE_INLINE struct hostent * ACE_OS::getipnodebyname (const char *name, int family, int flags) { ACE_OS_TRACE ("ACE_OS::getipnodebyname"); -# if defined (ACE_PSOS) - ACE_UNUSED_ARG (name); - ACE_UNUSED_ARG (family); - ACE_UNUSED_ARG (flags); - ACE_NOTSUP_RETURN (0); -# elif defined (ACE_HAS_IPV6) && !defined (ACE_WIN32) +# if defined (ACE_HAS_IPV6) && !defined (ACE_WIN32) # if defined (ACE_LACKS_GETIPNODEBYNAME) ACE_UNUSED_ARG (flags); # if defined (ACE_HAS_NONCONST_GETBY) diff --git a/ace/OS_NS_sys_utsname.cpp b/ace/OS_NS_sys_utsname.cpp index ea4e96c1348..2fa9fdfbdbe 100644 --- a/ace/OS_NS_sys_utsname.cpp +++ b/ace/OS_NS_sys_utsname.cpp @@ -222,23 +222,6 @@ ACE_OS::uname (ACE_utsname *name) ACE_OS::strcpy (name->machine, sysModel ()); return ACE_OS::hostname (name->nodename, maxnamelen); -#elif defined (CHORUS) - size_t maxnamelen = sizeof name->nodename; - ACE_OS::strcpy (name->sysname, "CHORUS/ClassiX"); - ACE_OS::strcpy (name->release, "???"); - ACE_OS::strcpy (name->version, "???"); - ACE_OS::strcpy (name->machine, "???"); - - return ACE_OS::hostname (name->nodename, maxnamelen); -#elif defined (ACE_PSOS) - const unsigned long buflen(64); - char buf[buflen]; - unsigned long len; - sys_info(PSOS_VERSION,(void *)buf,buflen,&len); - ACE_OS::strcpy (name->sysname, "pSOS"); - ACE_OS::strcpy (name->release, "???"); - ACE_OS::strcpy (name->version, buf); - ACE_OS::strcpy (name->machine, "PPC 405"); // a bit of a hack #elif defined (INTEGRITY) if(!name) { errno = EFAULT; |