* src/conf_post.h [HPUX]: Undefine HAVE_RANDOM and HAVE_RINT.
authorGlenn Morris <rgm@gnu.org>
Tue, 31 Jul 2012 18:34:26 +0000 (14:34 -0400)
committerGlenn Morris <rgm@gnu.org>
Tue, 31 Jul 2012 18:34:26 +0000 (14:34 -0400)
This is a belt-and-braces approach.

* configure.ac: Related comment.

configure.ac
src/ChangeLog
src/conf_post.h

index 21ed774..2c1b90e 100644 (file)
@@ -2725,7 +2725,6 @@ if test $opsys != unixware; then
   AC_CHECK_FUNCS(getwd)
 fi
 
-dnl FIXME Fragile: see above.
 ## Eric Backus <ericb@lsid.hp.com> says, HP-UX 9.x on HP 700 machines
 ## has a broken `rint' in some library versions including math library
 ## version number A.09.05.
index fccb46f..26a93db 100644 (file)
@@ -1,5 +1,7 @@
 2012-07-31  Glenn Morris  <rgm@gnu.org>
 
+       * conf_post.h [HPUX]: Undefine HAVE_RANDOM and HAVE_RINT.
+
        * conf_post.h (AMPERSAND_FULL_NAME, subprocesses):
        Move to configure.ac.
 
index f8b76a1..aa09ae7 100644 (file)
@@ -71,11 +71,16 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
    renaming the functions via macros.  The system's stdlib.h has fully
    prototyped declarations, which yields a conflicting definition of
    srand48; it tries to redeclare what was once srandom to be srand48.
-   So we go with HAVE_LRAND48 being defined.  Note we also undef
-   HAVE_RANDOM via configure.  */
+   So we go with HAVE_LRAND48 being defined.  */
 #ifdef HPUX
 #undef srandom
 #undef random
+/* We try to avoid checking for random and rint on hpux in
+   configure.ac, but some other configure test might check for them as
+   a dependency, so to be safe we also undefine them here.
+ */
+#undef HAVE_RANDOM
+#undef HAVE_RINT
 #endif
 
 #ifdef IRIX6_5