diff options
author | elliott_c <ocielliottc@users.noreply.github.com> | 2002-03-14 20:27:29 +0000 |
---|---|---|
committer | elliott_c <ocielliottc@users.noreply.github.com> | 2002-03-14 20:27:29 +0000 |
commit | 917dda7d8bf86cb332229b734614961c4fadc523 (patch) | |
tree | eb3d10f0f2302d7fd79c2fbec01c346b3463062e /TAO/examples/Simple | |
parent | a0109f6c62f7f39aa17f515e6f5878b72c523239 (diff) | |
download | ATCD-917dda7d8bf86cb332229b734614961c4fadc523.tar.gz |
ChangeLogTag: Thu Feb 28 09:55:21 2002 Chad Elliott <elliott_c@ociweb.com>
Diffstat (limited to 'TAO/examples/Simple')
-rw-r--r-- | TAO/examples/Simple/time/Time_Client_i.cpp | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/TAO/examples/Simple/time/Time_Client_i.cpp b/TAO/examples/Simple/time/Time_Client_i.cpp index 8ec47f9b5c5..0c42b8d1cdd 100644 --- a/TAO/examples/Simple/time/Time_Client_i.cpp +++ b/TAO/examples/Simple/time/Time_Client_i.cpp @@ -29,14 +29,29 @@ Time_Client_i::run (const char *name, ACE_TRY { + // 64-bit OS's require pointers to be aligned on an + // 8 byte boundary. 64-bit HP-UX requires a double to do this + // while a long does it for 64-bit Solaris. +#if defined (HPUX) + CORBA::Double padding; +#else + CORBA::Long padding; +#endif /* HPUX */ + CORBA::Long timedate; + + ACE_UNUSED_ARG (padding); + //Make the RMI. - CORBA::Long timedate = client->current_time (ACE_ENV_SINGLE_ARG_PARAMETER); + timedate = client->current_time (ACE_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; // Print out value - char *ascii_timedate = - ACE_OS::ctime (ACE_reinterpret_cast (time_t *, - &timedate)); + // Use ACE_OS::ctime_r(), ctime() doesn't seem to work properly + // under 64-bit solaris. + ACE_TCHAR ascii_timedate[64] = ""; + ACE_OS::ctime_r (ACE_reinterpret_cast (const time_t *, &timedate), + ascii_timedate, 64); + ACE_DEBUG ((LM_DEBUG, "string time is %s\n", ascii_timedate)); |