diff options
author | nanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-07-16 07:38:15 +0000 |
---|---|---|
committer | nanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-07-16 07:38:15 +0000 |
commit | 0d195bf9fcafe7b7b8b3950c21be135555893889 (patch) | |
tree | df86eef08c059fe5b393f2581ac4f2e658eee923 | |
parent | 5d29f9f2c30b087d883ff59ffbbc2775695c6383 (diff) | |
download | ATCD-0d195bf9fcafe7b7b8b3950c21be135555893889.tar.gz |
ChangeLogTag:Fri Jul 16 02:28:10 1999 Nanbor Wang <nanbor@cs.wustl.edu>
-rw-r--r-- | ChangeLog-99b | 12 | ||||
-rw-r--r-- | ace/Log_Msg.cpp | 2 | ||||
-rw-r--r-- | tests/Basic_Types_Test.cpp | 8 |
3 files changed, 17 insertions, 5 deletions
diff --git a/ChangeLog-99b b/ChangeLog-99b index 2bc6f5594e1..89ee56f1a49 100644 --- a/ChangeLog-99b +++ b/ChangeLog-99b @@ -1,3 +1,15 @@ +Fri Jul 16 02:28:10 1999 Nanbor Wang <nanbor@cs.wustl.edu> + + * ace/Log_Msg.cpp (log): Changed (*va_arg (argp,PTF))(), which + extracts a function pointer from va_list and makes a call using + the pointer pointer to ACE_reinterpret_cast (PTF, va_arg (argp, + long))(). This assumes the sizeof (long) is exactly equal to + the size of a function pointer. + + * tests/Basic_Types_Test.cpp (main): Narrow down the check to + ensure sizeof(long) == sizeof (a function pointer) (which is + true for all the platforms that ACE runs on.) + Fri Jul 16 00:07:23 1999 Irfan Pyarali <irfan@cs.wustl.edu> * tests/Cached_Accept_Conn_Test.cpp (test_connection_management): diff --git a/ace/Log_Msg.cpp b/ace/Log_Msg.cpp index 84ed0583f92..d84a05bf72f 100644 --- a/ace/Log_Msg.cpp +++ b/ace/Log_Msg.cpp @@ -851,7 +851,7 @@ ACE_Log_Msg::log (const ASYS_TCHAR *format_str, ACE_Log_Msg::msg_off_ = bp - this->msg_; type = SKIP_SPRINTF; - (*va_arg (argp, PTF))(); + ACE_reinterpret_cast (PTF, va_arg (argp, long))(); if (ACE_BIT_ENABLED (ACE_Log_Msg::flags_, ACE_Log_Msg::SILENT)) { diff --git a/tests/Basic_Types_Test.cpp b/tests/Basic_Types_Test.cpp index de8bf8d898c..3bf1b41653e 100644 --- a/tests/Basic_Types_Test.cpp +++ b/tests/Basic_Types_Test.cpp @@ -153,11 +153,11 @@ main (int, ASYS_TCHAR *[]) else ACE_ERROR ((LM_ERROR, ASYS_TEXT ("sizeof (long) != sizeof (void*)\n"))); - // ACE assumes sizeof (long) >= sizeof (a_function_pointer) - if (sizeof (long) >= sizeof (a_function_pointer)) - ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("sizeof (long) >= sizeof (a_function_pointer)\n"))); + // ACE assumes sizeof (long) == sizeof (a_function_pointer) + if (sizeof (long) == sizeof (a_function_pointer)) + ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("sizeof (long) == sizeof (a_function_pointer)\n"))); else - ACE_ERROR ((LM_ERROR, ASYS_TEXT ("sizeof (long) < sizeof (a_function_pointer)\n"))); + ACE_ERROR ((LM_ERROR, ASYS_TEXT ("sizeof (long) != sizeof (a_function_pointer)\n"))); #if defined (ACE_LITTLE_ENDIAN) ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("little endian\n"))); |