diff options
author | jtc <jtc@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2004-08-01 15:28:54 +0000 |
---|---|---|
committer | jtc <jtc@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2004-08-01 15:28:54 +0000 |
commit | 7f3b7d7c84edb7ea8a24863b6e35029d79108a3f (patch) | |
tree | 08741bb4ba568471e914832dc444bd141bd49457 | |
parent | 7899d6e66850077b0b61758c2b31b90106a6862a (diff) | |
download | ATCD-7f3b7d7c84edb7ea8a24863b6e35029d79108a3f.tar.gz |
ChangeLogTag: Sun Aug 1 08:15:23 2004 J.T. Conklin <jtc@acorntoolworks.com>
-rw-r--r-- | ChangeLog | 13 | ||||
-rw-r--r-- | ace/OS_Memory.h | 4 | ||||
-rw-r--r-- | configure.ac | 38 | ||||
-rw-r--r-- | m4/config_h.m4 | 3 |
4 files changed, 51 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog index a1f692c89da..885efa9156a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +Sun Aug 1 08:15:23 2004 J.T. Conklin <jtc@acorntoolworks.com> + + * configure.ac: + Moved subdirectory configuration above call to AC_OUTPUT. + + * ace/OS_Memory.h: + Provide ACE_nothrow and ACE_nothrow_t definitions for platforms + where definitions are not handled by special cases. + + * configure.ac: + * m4/config_h.m4: + Added check for ACE_HAS_NEW_NOTHROW. + Sun Aug 1 15:04:12 UTC 2004 Johnny Willemsen <jwillemsen@remedy.nl> * ace/QoS/qos.mpc: diff --git a/ace/OS_Memory.h b/ace/OS_Memory.h index cc5d3ce79a1..11f1371e521 100644 --- a/ace/OS_Memory.h +++ b/ace/OS_Memory.h @@ -124,10 +124,14 @@ typedef void *ACE_MALLOC_T; # elif defined (__BORLANDC__) || defined (ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB) # include /**/ <new> # define ACE_bad_alloc std::bad_alloc +# define ACE_nothrow std::nothrow +# define ACE_nothrow_t std::nothrow_t # define ACE_throw_bad_alloc throw ACE_bad_alloc () # else # include /**/ <new> # define ACE_bad_alloc bad_alloc +# define ACE_nothrow nothrow +# define ACE_nothrow_t nothrow_t # define ACE_throw_bad_alloc throw ACE_bad_alloc () # endif /* __HP_aCC */ diff --git a/configure.ac b/configure.ac index 34f5778a58d..6a6853c5438 100644 --- a/configure.ac +++ b/configure.ac @@ -4740,6 +4740,32 @@ if test "$ace_user_enable_exceptions" = yes; then fi dnl ace_cv_new_throws_bad_alloc_exceptions = no fi dnl $ace_user_enable_exceptions = yes +AC_CACHE_CHECK([if compiler supports new(std::nothrow)], + [ace_cv_has_new_nothrow], + [AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ +#if defined (ACE_HAS_NEW_NO_H) +# include <new> +#elif defined (ACE_HAS_NEW_H) +# include <new.h> +#endif + +int main(int, char*[]) { + int *foo; + +#ifdef ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB + foo = new (std::nothrow) int; +#else + foo = new (nothrow) int; +#endif /* ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB */ +}]])], [ + ace_cv_has_new_nothrow=yes + ],[ + ace_cv_has_new_nothrow=no + ])]) +if test $ace_cv_has_new_nothrow = yes; then + AC_DEFINE([ACE_HAS_NEW_NOTHROW]) +fi + ACE_CONVERT_WARNINGS_TO_ERRORS([ dnl Check if putmsg takes a const struct strbuf * dnl If we have getmsg() we can be pretty sure that we have putmsg() @@ -7362,6 +7388,11 @@ AC_CONFIG_FILES([ tests/SSL/Makefile ]) +dnl Configure subdirectories if they are present. +dnl if test -d $srcdir/TAO; then +dnl AC_CONFIG_SUBDIRS([TAO]) +dnl fi + dnl Note that the "ACE_VERSION" in the message below is an M4 macro dnl that expands to the version of ACE being configured. AC_CONFIG_COMMANDS([default],[ @@ -7370,10 +7401,3 @@ AC_CONFIG_COMMANDS([default],[ echo "" ],[]) AC_OUTPUT - - - -dnl Configure the TAO directory if it exists. -dnl if test -d $srcdir/TAO; then -dnl AC_CONFIG_SUBDIRS([TAO]) -dnl fi diff --git a/m4/config_h.m4 b/m4/config_h.m4 index 6e49e5bd10f..04057a615ad 100644 --- a/m4/config_h.m4 +++ b/m4/config_h.m4 @@ -495,6 +495,9 @@ AH_TEMPLATE([ACE_HAS_IPV6],[Platform supports IPv6]) AH_TEMPLATE([ACE_USES_IPV4_IPV6_MIGRATION], [Enable IPv6 support on platforms that don't have IPv6 turned on by default]) +AH_TEMPLATE([ACE_HAS_NEW_NOTHROW], +[Compiler supports new (std::nothrow)]) + AH_TEMPLATE([ACE_HAS_NONSTATIC_OBJECT_MANAGER], [Causes the ACE_Object_Manager instance to be created in main (int, char *[]), instead of as a static (global) instance.]) |