summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog49
-rw-r--r--ace/os_include/sys/os_resource.h5
-rw-r--r--configure.ac83
-rw-r--r--m4/ace.m42
-rw-r--r--m4/acinclude.m42
-rw-r--r--m4/compiler.m414
-rw-r--r--m4/config_h.m49
7 files changed, 100 insertions, 64 deletions
diff --git a/ChangeLog b/ChangeLog
index 5410d757bd7..c68c943e59b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,52 @@
+Thu Jan 15 20:54:38 2004 Ossama Othman <ossama@dre.vanderbilt.edu>
+
+ * configure.ac:
+
+ Require GNU Autoconf 2.58 or better, not 2.57g or better.
+ Version 2.57g was a testing release not a stable release.
+
+ Use more comprehensive (custom) test for detecting shm_open()
+ support instead of AC_CHECK_FUNC. In particular, use
+ AC_LINK_IFELSE so that we can detect missing function prototype
+ errors. Addresses a problem on Solaris builds where shm_open()
+ support was incorrectly detected as available despite the fact
+ POSIX.1b support was not enabled.
+
+ Removed ACE_HAS_MINIMUM_IOSTREAMH_INCLUSION test. This macro is
+ no longer used.
+
+ * ace/os_include/sys/os_resource.h:
+
+ Include <sys/procfs.h> in the ACE_HAS_PROC_FS case. It is
+ necessary to pull in the "prusage_t" typedef. That typedef is
+ used later in this header. Addresses an ACE+autoconf build
+ problem on Solaris.
+
+ * m4/ace.m4:
+
+ Corrected quoting problem that caused "--enable-fast" help
+ string to be echoed incorrectly.
+
+ * m4/acinclude.m4:
+
+ Corrected typo in warning message.
+
+ * m4/compiler.m4:
+
+ Updated Sun C++ 5.0 configuration settings to match those in the
+ latest platform_sunos5_sunc++.GNU file.
+
+ * m4/config_h.m4 (AH_BOTTOM):
+
+ Added empty line to text appended to generated `config.h' file
+ to correct a "non-empty ending line" warning exhibited by Sun
+ C++ 5.0.
+
+ (ACE_HAS_MINIMUM_IOSTREAMH_INCLUSION):
+
+ Removed template for this preprocessor macro. It is no longer
+ used.
+
Thu Jan 15 20:33:09 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu>
* docs/ACE-development-process.html (HREF):
diff --git a/ace/os_include/sys/os_resource.h b/ace/os_include/sys/os_resource.h
index 55c832e40af..8845e544782 100644
--- a/ace/os_include/sys/os_resource.h
+++ b/ace/os_include/sys/os_resource.h
@@ -39,6 +39,11 @@
# include /**/ <sys/syscall.h>
#endif /* ACE_HAS_SYSCALL_H */
+// prusage_t is defined in <sys/procfs.h>
+#if defined (ACE_HAS_PROC_FS)
+# include /**/ <sys/procfs.h>
+#endif /* ACE_HAS_PROC_FS */
+
// Place all additions (especially function declarations) within extern "C" {}
#ifdef __cplusplus
extern "C"
diff --git a/configure.ac b/configure.ac
index 3b7b9c17979..301e6d88c43 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,8 +23,8 @@ Please see the file `COPYING' in the top level ACE directory for
additional details.])
-dnl Require GNU Autoconf 2.57g or better.
-AC_PREREQ([2.57g])
+dnl Require GNU Autoconf 2.58 or better.
+AC_PREREQ([2.58])
AC_CONFIG_SRCDIR([ace/ACE.cpp])
@@ -3845,7 +3845,35 @@ dnl End check for SYSV IPC functions
AC_CHECK_FUNC([read_real_time],
[AC_DEFINE([ACE_HAS_AIX_HI_RES_TIMER])],)
-AC_CHECK_FUNC([shm_open], [AC_DEFINE([ACE_HAS_SHM_OPEN])],)
+dnl See shm_open() test after this one ...
+dnl AC_CHECK_FUNC([shm_open], [AC_DEFINE([ACE_HAS_SHM_OPEN])],)
+
+dnl Use a more comprehensive test for shm_open() since the prototype
+dnl may not be visible on all platforms without enabling POSIX.1b
+dnl support (e.g. when the user defines _POSIX_C_SOURCE > 2).
+AC_MSG_CHECKING([for shm_open])
+AC_LINK_IFELSE([AC_LANG_PROGRAM(
+ [[
+#ifndef ACE_LACKS_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#include <fcntl.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+ ]],
+ [[
+ const char name[] = "Foo";
+ const int oflag = O_RDONLY;
+ const mode_t mode = 0400; /* Whatever */
+ const int fd = shm_open (name, oflag, mode);
+ ]])],
+ [
+ AC_DEFINE([ACE_HAS_SHM_OPEN])
+ AC_MSG_RESULT([yes])
+ ],
+ [
+ AC_MSG_RESULT([no])
+ ])
AC_CHECK_FUNC([snprintf],
[AC_DEFINE([ACE_HAS_SNPRINTF])],)
@@ -7166,55 +7194,6 @@ ACE_CACHE_CHECK([for ACE_IOStream support],
])
], , [AC_DEFINE([ACE_LACKS_ACE_IOSTREAM])])
-dnl Check if ACE needs minimum iostream header inclusion
-ACE_CACHE_CHECK([if ACE needs minimum iostream header inclusion],
- [ace_cv_lib_minimum_iostream],
- [
- dnl We want an empty ace/config.h to prevent multiple defines
- dnl with Autoconf's confdefs.h
- ACE_USE_TEMP_FILE([ace/config.h],
- [
- dnl Now run the compilation test
- ACE_TRY_COMPILE([-I. -I${srcdir}],
- [
-#if defined(ACE_UINT64_TYPEDEF)
- typedef ACE_UINT64_TYPEDEF ACE_UINT64;
-#endif /* ACE_UINT64_TYPEDEF */
-
-#include "ace/OS.cpp"
- ],
- [
- int a=0; a += 1;
- ],
- [
- ace_cv_lib_minimum_iostream=no
- ],
- [
- dnl Now check if ACE_HAS_MINIMUM_IOSTREAMH_INCLUSION makes
- dnl compilation work!
- ACE_TRY_COMPILE([-I. -I${srcdir}],
- [
-#if defined(ACE_UINT64_TYPEDEF)
- typedef ACE_UINT64_TYPEDEF ACE_UINT64;
-#endif /* ACE_UINT64_TYPEDEF */
-
-#define ACE_HAS_MINIMUM_IOSTREAMH_INCLUSION
-#include "ace/OS.cpp"
- ],
- [
- int a=0; a += 1;
- ],
- [
- ace_cv_lib_minimum_iostream=yes
- ],
- [
- dnl If we get here, then we have no idea what is wrong!
- ace_cv_lib_minimum_iostream=no
- ])
- ])
- ])
- ], [AC_DEFINE([ACE_HAS_MINIMUM_IOSTREAMH_INCLUSION])],)
-
dnl @@ I don't think that this test is correct. The only way I could
dnl get ACE_Addr::sap_any to work was to explicitly cast it to the
dnl a constant reference of the derived type.
diff --git a/m4/ace.m4 b/m4/ace.m4
index 31998f0a854..145f9417c29 100644
--- a/m4/ace.m4
+++ b/m4/ace.m4
@@ -457,7 +457,7 @@ dnl fi
AC_ARG_ENABLE([fast],
- AS_HELP_STRING(--enable-fast,enable -fast flag, e.g. Sun C++ [[[no]]]),
+ AS_HELP_STRING(--enable-fast,enable -fast flag (e.g. Sun C++) [[[no]]]),
[
case "${enableval}" in
yes)
diff --git a/m4/acinclude.m4 b/m4/acinclude.m4
index 603acb910cc..707d807d5f5 100644
--- a/m4/acinclude.m4
+++ b/m4/acinclude.m4
@@ -71,7 +71,7 @@ AC_DEFUN([ACE_CHECK_TOP_SRCDIR],
[
Please configure and build in a directory other than the
top-level source directory. Doing so will prevent files
- distributed with the package from being overwritten. This
+ distributed with the package from being overwritten. This is
currently necessary since autoconf support is still
experimental. If you encounter problems please use the stock
build procedure.
diff --git a/m4/compiler.m4 b/m4/compiler.m4
index c0733bc73dd..b2020779ec6 100644
--- a/m4/compiler.m4
+++ b/m4/compiler.m4
@@ -72,7 +72,7 @@ changequote([, ])dnl
dnl ACE_CPPFLAGS
dnl - General C++ preprocessor flags the configure
dnl script should set before CPPFLAGS to allow the
- dnl user override them.
+ dnl user to override them.
dnl WERROR - Compiler flag that converts warnings to errors
if test "$GXX" = yes; then
@@ -317,7 +317,12 @@ changequote([, ])dnl
dnl Sun C++ 5.0 weirdness
if (CC -V 2>&1 | $EGREP 'Compilers 5\.0' > /dev/null); then
- CXXFLAGS="$CXXFLAGS -library=iostream,no%Cstd -instances=explicit"
+ if test "$ace_user_enable_stdcpplib" = yes; then
+ CXXFLAGS="$CXXFLAGS -library=Cstd"
+ else
+ CXXFLAGS="$CXXFLAGS -library=iostream,no%Cstd"
+ AC_DEFINE([ACE_USES_OLD_IOSTREAMS])
+ fi
dnl Inlining appears to cause link problems with early
dnl releases of CC 5.0.
@@ -327,6 +332,11 @@ changequote([, ])dnl
dnl See /opt/SUNWspro_5.0/SC5.0/include/CC/stdcomp.h.
ACE_CPPFLAGS="$ACE_CPPFLAGS -D_RWSTD_NO_EXCEPTIONS"
fi
+
+ CXXFLAGS="$CXXFLAGS -instances=explicit"
+ else
+ CXXFLAGS="$CXXFLAGS -library=iostream"
+ AC_DEFINE([ACE_USES_OLD_IOSTREAMS])
fi
CXXFLAGS="$CXXFLAGS"
diff --git a/m4/config_h.m4 b/m4/config_h.m4
index 0b779273720..3afa97e5ca9 100644
--- a/m4/config_h.m4
+++ b/m4/config_h.m4
@@ -53,6 +53,7 @@ AH_BOTTOM([
// Local] [Variables:
// mode:C++
// End:
+
])
@@ -517,14 +518,6 @@ AH_TEMPLATE([ACE_HAS_MALLOC_STATS], [Enabled malloc statistics collection.])
AH_TEMPLATE([ACE_HAS_MEMCHR],[Use native implementation of memchr().])
-AH_TEMPLATE([ACE_HAS_MINIMUM_IOSTREAMH_INCLUSION],
-[Avoid #including ace/streams.h in OS.h. Users must include
- ace/streams.h, <iostream>, or <iostream.h> explicitly in their code.
- Some platforms, such as g++/VxWorks, have trouble compiling templates
- and iostreams header because of static variables in the stream
- headers. This flag will also avoid extra compilation and runtime
- overheads on some platforms.])
-
AH_TEMPLATE([ACE_USES_OLD_IOSTREAMS],
[Some files, such as ace/streams.h, want to include new style C++
stream headers. These headers are iomanip, ios, iostream, istream,