From e6276dcaf952cd6303b97c3bf1b9a076b59f8b0c Mon Sep 17 00:00:00 2001 From: Steve Huston Date: Fri, 21 Jan 2011 22:02:34 +0000 Subject: ChangeLogTag:Fri Jan 21 17:04:29 UTC 2011 Steve Huston --- ChangeLog | 24 ++++++++++++++++++++++++ ace/config-hpux-11.00.h | 12 ++++++------ include/makeinclude/platform_hpux_aCC.GNU | 23 ++++------------------- m4/ace_func.m4 | 18 ------------------ m4/compiler.m4 | 3 +++ 5 files changed, 37 insertions(+), 43 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2e982dcc095..4b576618838 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,27 @@ +Fri Jan 21 17:04:29 UTC 2011 Steve Huston + + * ace/config-hpux-11.00.h: Set ACE_LACKS_(STR|WCS)TO[U]LL when + the requisite long-long compiler settings are missing. Enables + use of these functions when they're available. + + * m4/ace_func.m4: Remove the parts of ACE_FUNC_WCSTOLL and + ACE_FUNC_WCSTOULL that set ACE_LACKS_*_PROTOTYPE. The use of + the ACE_LACKS_*_PROTOTYPE was removed from ACE code in + Thu Jan 20 11:42:53 UTC 2010 Martin Corino + plus, it's wrong. The functions (at least on HP-UX, which seems + to center on the issue here) are available when needed via a + #pragma extern, which effectively inlines the code from the + compiler. Adding a prototype is the wrong thing to do in this + case. + + * m4/compiler.m4: Add -ext to aCC's options. Turns on long-long. + + * include/makeinclude/platform_hpux_aCC.GNU: Remove all the specific + macro setting to try and select particular threading features and + Rogue Wave libs. Use -mt and be done with it. -mt does the right + thing wrt RW and preprocessor feature macros based on the -AA/-AP + options. Also add -ext to turn on long-long. + Fri Jan 21 00:15:19 UTC 2011 Steve Huston * bin/MakeProjectCreator/config/acemfcexe.mpb: New base project diff --git a/ace/config-hpux-11.00.h b/ace/config-hpux-11.00.h index da51195dc65..f2a7dd71201 100644 --- a/ace/config-hpux-11.00.h +++ b/ace/config-hpux-11.00.h @@ -319,12 +319,12 @@ #define ACE_LACKS_SUSECONDS_T #define ACE_LACKS_SYS_SYSCTL_H -// @@ TODO: It looks like HP-UX provides strtoll, strtoull, wcstoll and -// wcstoull but some more work is needed to plug them in correctly. -#define ACE_LACKS_STRTOLL -#define ACE_LACKS_WCSTOLL -#define ACE_LACKS_STRTOULL -#define ACE_LACKS_WCSTOULL +#if !(defined(__STDC_EXT__) || defined(_INCLUDE_LONGLONG) || defined(_INCLUDE_STDC__SOURCE_199901)) +# define ACE_LACKS_STRTOLL +# define ACE_LACKS_WCSTOLL +# define ACE_LACKS_STRTOULL +# define ACE_LACKS_WCSTOULL +#endif #define ACE_LACKS_ISWASCII diff --git a/include/makeinclude/platform_hpux_aCC.GNU b/include/makeinclude/platform_hpux_aCC.GNU index 084f7cd1dae..17ba3efa4a8 100644 --- a/include/makeinclude/platform_hpux_aCC.GNU +++ b/include/makeinclude/platform_hpux_aCC.GNU @@ -45,6 +45,9 @@ else endif endif +# Want to be able to do [unsigned] long long. +CCFLAGS += -ext + ifeq (1,$(stdcpplib)) CCFLAGS += -AA ifeq (03,$(CXXMAJORVERS)) @@ -62,25 +65,7 @@ endif # and specified compiler options. ifeq ($(threads),1) THR_DEFS = -DACE_HAS_THREADS - - # x.30 was the first version offering -mt. So, if it's a .2x version, - # set the defs by hand; anything else, use -mt. This leaves out .1x - # versions, which should be no problem at this point. - ifeq (,$(filter 2%,$(CXXMINORVERS))) - CC_THR_DEFS += -mt - else - # Different for v2 vs. v1 C++ library selection. - ifeq (1,$(stdcpplib)) - THR_DEFS += -D_RWSTD_MULTI_THREAD - else - THR_DEFS += -DRWSTD_MULTI_THREAD -D_THREAD_SAFE - endif - - # For HP-UX 11.x, choose kernel threads over CMA (user) threads. - ifeq ($(word 2,$(HPVERS_WORDS)), 11) - THR_DEFS += -D_POSIX_C_SOURCE=199506L - endif - endif + CC_THR_DEFS += -mt else THR_DEFS = -DACE_HAS_THREADS=0 # On HP-UX 11, even without building for threads, the *_r reentrant diff --git a/m4/ace_func.m4 b/m4/ace_func.m4 index bc8cbd11653..f031f563ae0 100644 --- a/m4/ace_func.m4 +++ b/m4/ace_func.m4 @@ -207,8 +207,6 @@ fi # + Defines ACE_LACKS_WCSTOLL to 1 if platform lacks wcstoll() # + Defines ACE_WCSTOLL_EQUIVALENT to identifier name if platform # has a equivalent function that differs in name only. -# + Defines ACE_LACKS_WCSTOLL_PROTOTYPE to 1 if platform lacks -# declaration for wcstoll(). AC_DEFUN([ACE_FUNC_WCSTOLL], [ACE_CHECK_LACKS_FUNCS(wcstoll) if test $ac_cv_func_wcstoll = "no"; then @@ -223,13 +221,6 @@ if test $ac_cv_func_wcstoll = "no"; then [Define to function that is equivalent to wcstoll()]) fi fi -else - AC_CHECK_DECL([wcstoll], - [], - [AC_DEFINE([ACE_LACKS_WCSTOLL_PROTOTYPE], 1, - [Define to 1 if platform lacks a declaration for wcstoll()])], - [#include -#include ]) fi ]) @@ -237,8 +228,6 @@ fi # + Defines ACE_LACKS_WCSTOULL to 1 if platform lacks wcstoull() # + Defines ACE_WCSTOULL_EQUIVALENT to identifier name if platform # has a equivalent function that differs in name only. -# + Defines ACE_LACKS_WCSTOULL_PROTOTYPE to 1 if platform lacks -# declaration for wcstoull(). AC_DEFUN([ACE_FUNC_WCSTOULL], [ACE_CHECK_LACKS_FUNCS(wcstoull) if test $ac_cv_func_wcstoull = "no"; then @@ -253,13 +242,6 @@ if test $ac_cv_func_wcstoull = "no"; then [Define to function that is equivalent to wcstoull()]) fi fi -else - AC_CHECK_DECL([wcstoull], - [], - [AC_DEFINE([ACE_LACKS_WCSTOULL_PROTOTYPE], 1, - [Define to 1 if platform lacks a declaration for wcstoull()])], - [#include -#include ]) fi ]) diff --git a/m4/compiler.m4 b/m4/compiler.m4 index ce202c8b8b7..14ba9708690 100644 --- a/m4/compiler.m4 +++ b/m4/compiler.m4 @@ -161,6 +161,9 @@ dnl @todo Clean up / consolidate these conditionals ;; aCC) CFLAGS = "${CFLAGS:-} -Ae" + # We want support for long long; without this the feature checks + # for wcstoll et al detect the function but it won't compile. + CXXFLAGS="$CXXFLAGS -ext" # -AA has been available since aC++ x.27 (2001?) - if using a # compiler without this support, must --enable_stdcpplib=no. if test "$ace_user_enable_stdcpplib" = yes; then -- cgit v1.2.1