From 4515017f63ee7dad0f7e714022e21e555d372c25 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Tue, 31 Jul 2012 14:34:26 -0400 Subject: [PATCH] * src/conf_post.h [HPUX]: Undefine HAVE_RANDOM and HAVE_RINT. This is a belt-and-braces approach. * configure.ac: Related comment. --- configure.ac | 1 - src/ChangeLog | 2 ++ src/conf_post.h | 9 +++++++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 21ed77460a7..2c1b90e225b 100644 --- a/configure.ac +++ b/configure.ac @@ -2725,7 +2725,6 @@ if test $opsys != unixware; then AC_CHECK_FUNCS(getwd) fi -dnl FIXME Fragile: see above. ## Eric Backus 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. diff --git a/src/ChangeLog b/src/ChangeLog index fccb46f788e..26a93dbd817 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2012-07-31 Glenn Morris + * conf_post.h [HPUX]: Undefine HAVE_RANDOM and HAVE_RINT. + * conf_post.h (AMPERSAND_FULL_NAME, subprocesses): Move to configure.ac. diff --git a/src/conf_post.h b/src/conf_post.h index f8b76a1b19e..aa09ae7228c 100644 --- a/src/conf_post.h +++ b/src/conf_post.h @@ -71,11 +71,16 @@ along with GNU Emacs. If not, see . */ 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 -- 2.39.2