diff options
author | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-01-29 20:52:16 +0000 |
---|---|---|
committer | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-01-29 20:52:16 +0000 |
commit | 22c6ecbd0dd7cf14bb3af73841e9d433f0c93733 (patch) | |
tree | 49ea2137d9c1b25f9d292f9fdaaa3e7732df251c /examples | |
parent | e98cab44b71b4ec780fe2f407cf039f69e639b3f (diff) | |
download | ATCD-22c6ecbd0dd7cf14bb3af73841e9d433f0c93733.tar.gz |
ChangeLogTag:Fri Jan 29 14:49:37 1999 Carlos O'Ryan <coryan@cs.wustl.edu>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/IPC_SAP/SOCK_SAP/C-inserver.cpp | 5 | ||||
-rw-r--r-- | examples/System_V_IPC/SV_Semaphores/Semaphores_1.cpp | 7 | ||||
-rw-r--r-- | examples/System_V_IPC/SV_Semaphores/Semaphores_2.cpp | 13 |
3 files changed, 18 insertions, 7 deletions
diff --git a/examples/IPC_SAP/SOCK_SAP/C-inserver.cpp b/examples/IPC_SAP/SOCK_SAP/C-inserver.cpp index 376a2bbb248..fd33983dcf2 100644 --- a/examples/IPC_SAP/SOCK_SAP/C-inserver.cpp +++ b/examples/IPC_SAP/SOCK_SAP/C-inserver.cpp @@ -75,7 +75,12 @@ int main (int argc, char *argv[]) continue; } +#if !defined(_UNICOS) int addr_len = sizeof cli_addr.sin_addr.s_addr; +#else /* ! _UNICOS */ + // sizeof on bitfield fails + int addr_len = sizeof cli_addr.sin_addr; // 32 bit biffield in UNICOS +#endif /* ! _UNICOS */ hp = ACE_OS::gethostbyaddr ((char *) &cli_addr.sin_addr, addr_len, AF_INET); diff --git a/examples/System_V_IPC/SV_Semaphores/Semaphores_1.cpp b/examples/System_V_IPC/SV_Semaphores/Semaphores_1.cpp index a6127daabaa..d0b2d075da8 100644 --- a/examples/System_V_IPC/SV_Semaphores/Semaphores_1.cpp +++ b/examples/System_V_IPC/SV_Semaphores/Semaphores_1.cpp @@ -6,7 +6,7 @@ ACE_RCSID(SV_Semaphores, Semaphores_1, "$Id$") -#if defined (ACE_HAS_SYSV_IPC) +#if defined (ACE_HAS_SYSV_IPC) && !defined(ACE_LACKS_SYSV_SHMEM) // Shared memory allocator (note that this chews up the // ACE_DEFAULT_SEM_KEY). @@ -80,11 +80,13 @@ main (int, char *[]) int main (int, char *[]) { ACE_ERROR ((LM_ERROR, - "SYSV IPC is not supported on this platform\n")); + "SYSV IPC, or SYSV SHMEM is not supported on this platform\n")); return 0; } #endif /* ACE_HAS_SYSV_IPC */ +#if defined (ACE_HAS_SYSV_IPC) && !defined(ACE_LACKS_SYSV_SHMEM) + #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) template class ACE_Guard<ACE_SV_Semaphore_Simple>; template class ACE_Malloc<ACE_SHARED_MEMORY_POOL, ACE_SV_Semaphore_Simple>; @@ -97,3 +99,4 @@ template class ACE_Write_Guard<ACE_SV_Semaphore_Simple>; #pragma instantiate ACE_Write_Guard<ACE_SV_Semaphore_Simple> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ +#endif /* ACE_HAS_SYSV_IPC */ diff --git a/examples/System_V_IPC/SV_Semaphores/Semaphores_2.cpp b/examples/System_V_IPC/SV_Semaphores/Semaphores_2.cpp index 9afa1ff8dbf..1960dba20f0 100644 --- a/examples/System_V_IPC/SV_Semaphores/Semaphores_2.cpp +++ b/examples/System_V_IPC/SV_Semaphores/Semaphores_2.cpp @@ -12,7 +12,7 @@ ACE_RCSID(SV_Semaphores, Semaphores_2, "$Id$") -#if defined (ACE_HAS_SYSV_IPC) +#if defined (ACE_HAS_SYSV_IPC) && !defined(ACE_LACKS_SYSV_SHMEM) // Shared memory allocator (note that this chews up the // ACE_DEFAULT_SEM_KEY). @@ -101,20 +101,23 @@ main (int, char *[]) int main (int, char *[]) { ACE_ERROR ((LM_ERROR, - "SYSV IPC is not supported on this platform\n")); + "SYSV IPC, or SYSV SHMEM is not supported on this platform\n")); return 0; } #endif /* ACE_HAS_SYSV_IPC */ -#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) +#if defined (ACE_HAS_SYSV_IPC) && !defined(ACE_LACKS_SYSV_SHMEM) + +# if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) template class ACE_Guard<ACE_SV_Semaphore_Simple>; template class ACE_Malloc<ACE_SHARED_MEMORY_POOL, ACE_SV_Semaphore_Simple>; template class ACE_Read_Guard<ACE_SV_Semaphore_Simple>; template class ACE_Write_Guard<ACE_SV_Semaphore_Simple>; -#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) +# elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) #pragma instantiate ACE_Guard<ACE_SV_Semaphore_Simple> #pragma instantiate ACE_Malloc<ACE_SHARED_MEMORY_POOL, ACE_SV_Semaphore_Simple> #pragma instantiate ACE_Read_Guard<ACE_SV_Semaphore_Simple> #pragma instantiate ACE_Write_Guard<ACE_SV_Semaphore_Simple> -#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ +# endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ +#endif /* ACE_HAS_SYSV_IPC */ |