diff options
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | configure.ac | 108 | ||||
-rw-r--r-- | m4/config_h.m4 | 26 |
3 files changed, 73 insertions, 69 deletions
diff --git a/ChangeLog b/ChangeLog index 265d4184e3c..01daa3fb68c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Mon Dec 20 08:10:31 2004 J.T. Conklin <jtc@acorntoolworks.com> + + * configure.ac: + * m4/config_h.m4: + + Replaced autoheader templates for type and size in config_h.m4 + with a third argument to AC_DEFINE in configure.ac. + Mon Dec 20 09:40:22 2004 Chad Elliott <elliott_c@ociweb.com> * bin/tao_other_tests.lst: diff --git a/configure.ac b/configure.ac index 0a6000f0de9..79edadd7467 100644 --- a/configure.ac +++ b/configure.ac @@ -1097,30 +1097,64 @@ dnl AC_CHECK_TYPE([off64_t],[long long]) dnl Specific typedef checks dnl TODO: Check whether these typedefs can be defined somewhere else. -ACE_CHECK_TYPE([idtype_t],[signal.h],[AC_DEFINE([ACE_HAS_IDTYPE_T])],) +AC_CHECK_TYPE([idtype_t], + [AC_DEFINE([ACE_HAS_IDTYPE_T], 1, + [Define to 1 if the system has the type `idtype_t'.])], + [], + [#include <signal.h>]) + +AC_CHECK_TYPE([key_t], + [], + [AC_DEFINE([ACE_LACKS_KEY_T], 1, + [Define to 1 if the system lacks the type `key_t'.])], + [#include <sys/types.h>]) + ACE_CHECK_TYPE([sem_t],[semaphore.h],,) -ACE_CHECK_TYPE([key_t],[sys/types.h],,[AC_DEFINE([ACE_LACKS_KEY_T])]) -ACE_CHECK_TYPE([ssize_t],[sys/types.h],[AC_DEFINE([ACE_HAS_SSIZE_T])],) -ACE_CHECK_TYPE([u_longlong_t],[sys/types.h],,[AC_DEFINE([ACE_LACKS_U_LONGLONG_T])]) -ACE_CHECK_TYPE([pri_t],[sys/types.h],,[AC_DEFINE([ACE_LACKS_PRI_T])]) + +AC_CHECK_TYPE([pri_t], + [], + [AC_DEFINE([ACE_LACKS_PRI_T], 1, + [Define to 1 if the system lacks the type 'pri_t'.])], + [#include <sys/types.h>]) + +AC_CHECK_TYPE([sig_atomic_t], + [AC_DEFINE([ACE_HAS_SIG_ATOMIC_T], 1, + [Define to 1 if the system has the type 'sig_atomic_t'.])], + [], + [#include <signal.h>]) + +AC_CHECK_TYPE([ssize_t], + [AC_DEFINE([ACE_HAS_SSIZE_T], 1, + [Define to 1 if the system has the type `ssize_t'.])], + [], + [#include <sys/types.h>]) dnl Some platforms define ucontext_t in <sys/ucontext.h>, but ACE dnl doesn't explicitly include that header. However, it is very dnl likely that <signal.h> does, either directly or indirectly. AC_CHECK_TYPE([ucontext_t], - AC_DEFINE([ACE_HAS_UCONTEXT_T]), - , - [ -#include <signal.h> + [AC_DEFINE([ACE_HAS_UCONTEXT_T], 1, + [Define to 1 if the system has the type `ucontext_t'.])], + [], +[#include <signal.h> #ifndef ACE_LACKS_UCONTEXT_H # include <ucontext.h> #endif ]) -ACE_CHECK_TYPE([wchar_t],[wchar.h],, - [ - ACE_CHECK_TYPE([wchar_t],[sys/types.h],,[AC_DEFINE([ACE_LACKS_WCHAR_T])]) - ]) +AC_CHECK_TYPE([u_longlong_t], + [], + [AC_DEFINE([ACE_LACKS_U_LONGLONG_T], 1, + [Define to 1 if the system lacks the type `u_long_long'.])], + [#include <sys/types.h>]) + +AC_CHECK_TYPE([wchar_t], + [], + [AC_DEFINE([ACE_LACKS_WCHAR_T], 1, + [Define to 1 if the system lacks the type `wchar_t'.])], +[#include <sys/types.h> +#include <wchar.h> +]) ACE_CHECK_TYPE([socklen_t],[sys/socket.h],[AC_DEFINE([ACE_HAS_SOCKLEN_T])], [ @@ -1172,23 +1206,6 @@ ACE_CHECK_TYPE([socklen_t],[sys/socket.h],[AC_DEFINE([ACE_HAS_SOCKLEN_T])], ]) ]) -dnl Check for sig_atomic_t -ACE_CACHE_CHECK([for sig_atomic_t], - [ace_cv_lib_posix_defines_sig_atomic_t],[ - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -#ifndef ACE_LACKS_SYS_TYPES_H -# include <sys/types.h> -#endif -#include <signal.h> - ]],[[ - sig_atomic_t sat; - ]])],[ - ace_cv_lib_posix_defines_sig_atomic_t=yes - ],[ - ace_cv_lib_posix_defines_sig_atomic_t=no - ]) -],[AC_DEFINE([ACE_HAS_SIG_ATOMIC_T])],) - dnl SECTION 7: checks for structures @@ -1697,51 +1714,56 @@ dnl If we get a size of zero, then the type is unknown to the compiler. dnl We don't need to check for sizeof(char) right now. Also conflicts with dnl ACE definition in Basic_Types.h, so we leave the test out. if test "$cross_compiling" != yes; then - dnl AC_CHECK_SIZEOF([char],[1]) - dnl if test "$ac_cv_sizeof_char" != "0"; then - dnl AC_DEFINE([ACE_SIZEOF_CHAR],[SIZEOF_CHAR]) - dnl fi AC_CHECK_SIZEOF([wchar_t]) if test "$ac_cv_sizeof_wchar_t" != 0; then - AC_DEFINE_UNQUOTED([ACE_SIZEOF_WCHAR],[$ac_cv_sizeof_wchar_t]) + AC_DEFINE_UNQUOTED([ACE_SIZEOF_WCHAR],[$ac_cv_sizeof_wchar_t], + [Size of the native "wchar_t" type]) fi AC_CHECK_SIZEOF([short]) if test "$ac_cv_sizeof_short" != 0; then - AC_DEFINE_UNQUOTED([ACE_SIZEOF_SHORT],[$ac_cv_sizeof_short]) + AC_DEFINE_UNQUOTED([ACE_SIZEOF_SHORT],[$ac_cv_sizeof_short], + [Size of the native "short" type]) fi AC_CHECK_SIZEOF([int]) if test $ac_cv_sizeof_int != 0; then - AC_DEFINE_UNQUOTED([ACE_SIZEOF_INT],[$ac_cv_sizeof_int]) + AC_DEFINE_UNQUOTED([ACE_SIZEOF_INT],[$ac_cv_sizeof_int], + [Size of the native "int" type]) fi AC_CHECK_SIZEOF([long]) if test $ac_cv_sizeof_long != 0; then - AC_DEFINE_UNQUOTED([ACE_SIZEOF_LONG],[$ac_cv_sizeof_long]) + AC_DEFINE_UNQUOTED([ACE_SIZEOF_LONG],[$ac_cv_sizeof_long], + [Size of the native "long" type]) fi AC_CHECK_SIZEOF([long long]) if test $ac_cv_sizeof_long_long != 0; then - AC_DEFINE_UNQUOTED([ACE_SIZEOF_LONG_LONG],[$ac_cv_sizeof_long_long]) + AC_DEFINE_UNQUOTED([ACE_SIZEOF_LONG_LONG],[$ac_cv_sizeof_long_long], + [Size of the native "long long" type]) else AC_DEFINE([ACE_LACKS_LONGLONG_T]) fi AC_CHECK_SIZEOF([void *]) if test $ac_cv_sizeof_void_p != 0; then - AC_DEFINE_UNQUOTED([ACE_SIZEOF_VOID_P],[$ac_cv_sizeof_void_p]) + AC_DEFINE_UNQUOTED([ACE_SIZEOF_VOID_P],[$ac_cv_sizeof_void_p], + [Size of the native "pointer to void" type]) fi AC_CHECK_SIZEOF([float]) if test $ac_cv_sizeof_float != 0; then - AC_DEFINE_UNQUOTED([ACE_SIZEOF_FLOAT],[$ac_cv_sizeof_float]) + AC_DEFINE_UNQUOTED([ACE_SIZEOF_FLOAT],[$ac_cv_sizeof_float], + [Size of the native "float" type]) else AC_DEFINE([ACE_LACKS_FLOATING_POINT]) fi AC_CHECK_SIZEOF([double]) if test $ac_cv_sizeof_double != 0; then - AC_DEFINE_UNQUOTED([ACE_SIZEOF_DOUBLE],[$ac_cv_sizeof_double]) + AC_DEFINE_UNQUOTED([ACE_SIZEOF_DOUBLE],[$ac_cv_sizeof_double], + [Size of the native "double" type]) else AC_DEFINE([ACE_LACKS_FLOATING_POINT]) fi AC_CHECK_SIZEOF([long double]) if test $ac_cv_sizeof_long_double != 0; then - AC_DEFINE_UNQUOTED([ACE_SIZEOF_LONG_DOUBLE],[$ac_cv_sizeof_long_double]) + AC_DEFINE_UNQUOTED([ACE_SIZEOF_LONG_DOUBLE],[$ac_cv_sizeof_long_double], + [Size of the native "long double" type]) fi dnl Set the 64 bit typedefs diff --git a/m4/config_h.m4 b/m4/config_h.m4 index c44768a4b49..170309c5af9 100644 --- a/m4/config_h.m4 +++ b/m4/config_h.m4 @@ -205,20 +205,6 @@ AH_TEMPLATE([ACE_USE_RCSID],[Enable embedding of global RCS ID strings into comp AH_TEMPLATE([IP_ADD_MEMBERSHIP],[]) AH_TEMPLATE([IP_DROP_MEMBERSHIP],[]) - -dnl Specify sizes of given built-in types. If a size isn't defined here, -dnl then ace/Basic_Types.h will attempt to deduce the size. -dnl AH_TEMPLATE([ACE_SIZEOF_CHAR],[Size of native "char" type]) -AH_TEMPLATE([ACE_SIZEOF_WCHAR],[Size of native "wchar_t" type]) -AH_TEMPLATE([ACE_SIZEOF_SHORT],[Size of the native "short" type]) -AH_TEMPLATE([ACE_SIZEOF_INT],[Size of the native "int" type]) -AH_TEMPLATE([ACE_SIZEOF_LONG],[Size of the native "long" type]) -AH_TEMPLATE([ACE_SIZEOF_LONG_LONG],[Size of the native "long long" type]) -AH_TEMPLATE([ACE_SIZEOF_VOID_P],[Size of the native "pointer to void" type]) -AH_TEMPLATE([ACE_SIZEOF_FLOAT],[Size of the native "float" type]) -AH_TEMPLATE([ACE_SIZEOF_DOUBLE],[Size of the native "double" type]) -AH_TEMPLATE([ACE_SIZEOF_LONG_DOUBLE],[Size of the native "long double" type]) - AH_VERBATIM([ACE_INT64_TYPEDEF], [ /* @@ -444,8 +430,6 @@ AH_TEMPLATE([ACE_HAS_LLSEEK], AH_TEMPLATE([ACE_HAS_HI_RES_TIMER], [Compiler/platform supports SunOS high resolution timers]) -AH_TEMPLATE([ACE_HAS_IDTYPE_T],[Compiler/platform supports idtype_t.]) - AH_TEMPLATE([ACE_HAS_INLINED_OSCALLS],[ Inline all the static class OS methods to remove call overhead Note: This gets defined by OS.h if __ACE_INLINE__ is defined]) @@ -698,8 +682,6 @@ AH_TEMPLATE([ACE_HAS_SOCKLEN_T], AH_TEMPLATE([ACE_HAS_SPARCWORKS_401_SIGNALS], [Compiler has brain-damaged SPARCwork SunOS 4.x signal prototype...]) -AH_TEMPLATE([ACE_HAS_SSIZE_T],[Compiler supports the ssize_t typedef]) - AH_TEMPLATE([ACE_HAS_THR_YIELD],[Platform has thr_yield()]) AH_TEMPLATE([ACE_HAS_STANDARD_CPP_LIBRARY], @@ -968,9 +950,6 @@ AH_TEMPLATE([ACE_LACKS_PLACEMENT_OPERATOR_DELETE], AH_TEMPLATE([ACE_LACKS_PRAGMA_ONCE], [Compiler complains about use of obsolete "pragma once"]) -AH_TEMPLATE([ACE_LACKS_PRI_T], -[Platform lacks pri_t (e.g., Tandem NonStop UNIX).]) - AH_TEMPLATE([ACE_LACKS_THREAD_STACK_ADDR], [Platform lack pthread_attr_setstackaddr()]) @@ -1014,9 +993,6 @@ AH_TEMPLATE([ACE_LACKS_SYS_MSG_H], AH_TEMPLATE([ACE_LACKS_SYSV_MSQ_PROTOS], [Platform lacks SYSV message queue prototypes]) -AH_TEMPLATE([ACE_LACKS_KEY_T], -[Platform lacks key_t (e.g., Chorus, VxWorks, Win32)]) - AH_TEMPLATE([ACE_LACKS_SI_ADDR], [Platform lacks the si_addr field of siginfo_t (e.g., VxWorks and HP/UX 10.x)]) @@ -1081,8 +1057,6 @@ AH_TEMPLATE([ACE_LACKS_UNIX_SIGNALS], AH_TEMPLATE([ACE_LACKS_UTSNAME_T], [Platform lacks struct utsname (e.g., Win32 and VxWorks)]) -AH_TEMPLATE([ACE_LACKS_WCHAR_T],[Platform lacks wchar_t typedef]) - AH_TEMPLATE([ACE_HAS_3_PARAM_WCSTOK], [Platform's wcstok() takes 3 arguments]) |