summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ace/OS_NS_stdio.cpp8
-rw-r--r--include/makeinclude/platform_hpux_aCC.GNU10
2 files changed, 14 insertions, 4 deletions
diff --git a/ace/OS_NS_stdio.cpp b/ace/OS_NS_stdio.cpp
index 2d15d2c05d3..93bbde7fce0 100644
--- a/ace/OS_NS_stdio.cpp
+++ b/ace/OS_NS_stdio.cpp
@@ -287,9 +287,9 @@ ACE_OS::snprintf (char *buf, size_t maxlen, const char *format, ...)
int, -1, result);
// Win32 doesn't regard a full buffer with no 0-terminate as an
// overrun.
- if (result == maxlen)
+ if (result == static_cast <int> (maxlen))
result = -1;
-
+
// Win32 doesn't 0-terminate the string if it overruns maxlen.
if (result == -1)
buf[maxlen-1] = '\0';
@@ -329,9 +329,9 @@ ACE_OS::snprintf (wchar_t *buf, size_t maxlen, const wchar_t *format, ...)
int, -1, result);
// Win32 doesn't regard a full buffer with no 0-terminate as an
// overrun.
- if (result == maxlen)
+ if (result == static_cast <int> (maxlen))
result = -1;
-
+
// Win32 doesn't 0-terminate the string if it overruns maxlen.
if (result == -1)
buf[maxlen-1] = '\0';
diff --git a/include/makeinclude/platform_hpux_aCC.GNU b/include/makeinclude/platform_hpux_aCC.GNU
index 84774a1fa17..de5b6732fc6 100644
--- a/include/makeinclude/platform_hpux_aCC.GNU
+++ b/include/makeinclude/platform_hpux_aCC.GNU
@@ -118,6 +118,16 @@ ifeq (03,$(CXXMAJORVERS))
endif
CPPFLAGS += $(THR_DEFS) -D_HPUX_SOURCE -DHPUX_VERS=$(HPUX_VERS) -DACE_LACKS_PRAGMA_ONCE
+ifeq (03,$(CXXMAJORVERS))
+ ifeq (57,$(CXXMINORVERS))
+ # aCC 3.57 has a bug. When a class has private constructors
+ # and is trying to be created from a friend class we end up with
+ # a compile error. We disable array optimization in the compiler
+ # by setting this environment variable.
+ export aCC_ARRAY_OPT=OFF
+ endif
+endif
+
# If exception support is explicitly disabled, tell the compiler.
# This is not recommended since the run-time library can throw exceptions.
ifneq ($(exceptions),1)