aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2012-07-06 21:03:46 -0400
committerGlenn Morris2012-07-06 21:03:46 -0400
commit4516fbef7207ca23ca72da28d060dad979319310 (patch)
treeaff14f94e05168a85e2b92dbc026fcc75a9f0909
parent07adc2c63b17a5829879886901cb731483a469cd (diff)
downloademacs-4516fbef7207ca23ca72da28d060dad979319310.tar.gz
emacs-4516fbef7207ca23ca72da28d060dad979319310.zip
Replace some src/s undefs by never even checking on relevant platforms
* configure.in: (getwd): Don't check for it on unixware. (random, rint): Don't check for these on hpux. (res_init, libresolv): Don't check for these on darwin. * src/s/darwin.h (HAVE_RES_INIT, HAVE_LIBRESOLV): * src/s/hpux10-20.h (HAVE_RINT, HAVE_RANDOM): * src/s/unixware.h (HAVE_GETWD): Move undefs to configure (effectively).
-rw-r--r--ChangeLog8
-rw-r--r--configure.in61
-rw-r--r--src/ChangeLog6
-rw-r--r--src/s/darwin.h5
-rw-r--r--src/s/hpux10-20.h13
-rw-r--r--src/s/unixware.h3
6 files changed, 58 insertions, 38 deletions
diff --git a/ChangeLog b/ChangeLog
index d73c1f1b539..1b7fa14edd3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
12012-07-07 Glenn Morris <rgm@gnu.org>
2
3 * configure.in: Rather than checking for things then undef'ing
4 them on some platforms, simply don't check for them.
5 (getwd): Don't check for it on unixware.
6 (random, rint): Don't check for these on hpux.
7 (res_init, libresolv): Don't check for these on darwin.
8
12012-07-07 Juanma Barranquero <lekktu@gmail.com> 92012-07-07 Juanma Barranquero <lekktu@gmail.com>
2 10
3 * lib/makefile.w32-in (GNULIBOBJS): Add $(BLD)/c-ctype.$(O), 11 * lib/makefile.w32-in (GNULIBOBJS): Add $(BLD)/c-ctype.$(O),
diff --git a/configure.in b/configure.in
index 09551ae58e9..fdd7ea0156c 100644
--- a/configure.in
+++ b/configure.in
@@ -2700,9 +2700,9 @@ AC_SUBST(BLESSMAIL_TARGET)
2700 2700
2701AC_CHECK_FUNCS(gethostname \ 2701AC_CHECK_FUNCS(gethostname \
2702rename closedir mkdir rmdir getrusage get_current_dir_name \ 2702rename closedir mkdir rmdir getrusage get_current_dir_name \
2703random lrand48 logb frexp fmod rint cbrt setsid \ 2703lrand48 logb frexp fmod cbrt setsid \
2704strerror fpathconf select euidaccess getpagesize setlocale \ 2704strerror fpathconf select euidaccess getpagesize setlocale \
2705utimes getrlimit setrlimit setpgid getcwd getwd shutdown getaddrinfo \ 2705utimes getrlimit setrlimit setpgid getcwd shutdown getaddrinfo \
2706__fpending strsignal setitimer \ 2706__fpending strsignal setitimer \
2707sendto recvfrom getsockname getpeername getifaddrs freeifaddrs \ 2707sendto recvfrom getsockname getpeername getifaddrs freeifaddrs \
2708gai_strerror mkstemp getline getdelim fsync sync \ 2708gai_strerror mkstemp getline getdelim fsync sync \
@@ -2711,6 +2711,22 @@ getpwent endpwent getgrent endgrent \
2711touchlock \ 2711touchlock \
2712cfmakeraw cfsetspeed copysign __executable_start) 2712cfmakeraw cfsetspeed copysign __executable_start)
2713 2713
2714dnl getwd appears to be buggy on SVR4.2, so we don't use it.
2715if test $opsys != unixware; then
2716 AC_CHECK_FUNCS(getwd)
2717fi
2718
2719## Eric Backus <ericb@lsid.hp.com> says, HP-UX 9.x on HP 700 machines
2720## has a broken `rint' in some library versions including math library
2721## version number A.09.05.
2722## You can fix the math library by installing patch number PHSS_4630.
2723## But we can fix it more reliably for Emacs by just not using rint.
2724## We also skip HAVE_RANDOM - see comments in src/s/hpux10-20.h.
2725case $opsys in
2726 hpux*) : ;;
2727 *) AC_CHECK_FUNCS(random rint) ;;
2728esac
2729
2714dnl Cannot use AC_CHECK_FUNCS 2730dnl Cannot use AC_CHECK_FUNCS
2715AC_CACHE_CHECK([for __builtin_unwind_init], 2731AC_CACHE_CHECK([for __builtin_unwind_init],
2716 emacs_cv_func___builtin_unwind_init, 2732 emacs_cv_func___builtin_unwind_init,
@@ -2847,33 +2863,40 @@ AC_SUBST(TERMCAP_OBJ)
2847 2863
2848 2864
2849# Do we have res_init, for detecting changes in /etc/resolv.conf? 2865# Do we have res_init, for detecting changes in /etc/resolv.conf?
2866# On Darwin, res_init appears not to be useful: see bug#562 and
2867# http://lists.gnu.org/archive/html/emacs-devel/2007-11/msg01467.html
2850resolv=no 2868resolv=no
2851AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <netinet/in.h> 2869
2870if test $opsys != darwin; then
2871
2872 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <netinet/in.h>
2852#include <arpa/nameser.h> 2873#include <arpa/nameser.h>
2853#include <resolv.h>]], 2874#include <resolv.h>]],
2854 [[return res_init();]])], 2875 [[return res_init();]])],
2855 have_res_init=yes, have_res_init=no) 2876 have_res_init=yes, have_res_init=no)
2856if test "$have_res_init" = no; then 2877 if test "$have_res_init" = no; then
2857 OLIBS="$LIBS" 2878 OLIBS="$LIBS"
2858 LIBS="$LIBS -lresolv" 2879 LIBS="$LIBS -lresolv"
2859 AC_MSG_CHECKING(for res_init with -lresolv) 2880 AC_MSG_CHECKING(for res_init with -lresolv)
2860 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <netinet/in.h> 2881 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <netinet/in.h>
2861#include <arpa/nameser.h> 2882#include <arpa/nameser.h>
2862#include <resolv.h>]], 2883#include <resolv.h>]],
2863 [[return res_init();]])], 2884 [[return res_init();]])],
2864 have_res_init=yes, have_res_init=no) 2885 have_res_init=yes, have_res_init=no)
2865 AC_MSG_RESULT($have_res_init) 2886 AC_MSG_RESULT($have_res_init)
2866 if test "$have_res_init" = yes ; then 2887 if test "$have_res_init" = yes ; then
2867 resolv=yes 2888 resolv=yes
2889 fi
2890 LIBS="$OLIBS"
2868 fi 2891 fi
2869 LIBS="$OLIBS"
2870fi
2871 2892
2872if test "$have_res_init" = yes; then 2893 if test "$have_res_init" = yes; then
2873 AC_DEFINE(HAVE_RES_INIT, 1, [Define to 1 if res_init is available.]) 2894 AC_DEFINE(HAVE_RES_INIT, 1, [Define to 1 if res_init is available.])
2874fi 2895 fi
2896fi dnl !darwin
2875 2897
2876# Do we need the Hesiod library to provide the support routines? 2898# Do we need the Hesiod library to provide the support routines?
2899dnl FIXME? Should we be skipping this on Darwin too?
2877LIBHESIOD= 2900LIBHESIOD=
2878if test "$with_hesiod" != no ; then 2901if test "$with_hesiod" != no ; then
2879 # Don't set $LIBS here -- see comments above. FIXME which comments? 2902 # Don't set $LIBS here -- see comments above. FIXME which comments?
@@ -2897,7 +2920,7 @@ fi
2897AC_SUBST(LIBHESIOD) 2920AC_SUBST(LIBHESIOD)
2898 2921
2899# Do we need libresolv (due to res_init or Hesiod)? 2922# Do we need libresolv (due to res_init or Hesiod)?
2900if test "$resolv" = yes ; then 2923if test "$resolv" = yes && test $opsys != darwin; then
2901 AC_DEFINE(HAVE_LIBRESOLV, 1, 2924 AC_DEFINE(HAVE_LIBRESOLV, 1,
2902 [Define to 1 if you have the resolv library (-lresolv).]) 2925 [Define to 1 if you have the resolv library (-lresolv).])
2903 LIBRESOLV=-lresolv 2926 LIBRESOLV=-lresolv
diff --git a/src/ChangeLog b/src/ChangeLog
index ef2d06dc5b0..03c92804fb8 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
12012-07-07 Glenn Morris <rgm@gnu.org>
2
3 * s/darwin.h (HAVE_RES_INIT, HAVE_LIBRESOLV):
4 * s/hpux10-20.h (HAVE_RINT, HAVE_RANDOM):
5 * s/unixware.h (HAVE_GETWD): Move undefs to configure (effectively).
6
12012-07-07 Juanma Barranquero <lekktu@gmail.com> 72012-07-07 Juanma Barranquero <lekktu@gmail.com>
2 8
3 * makefile.w32-in (DISPEXTERN_H, $(BLD)/regex.$(O)): 9 * makefile.w32-in (DISPEXTERN_H, $(BLD)/regex.$(O)):
diff --git a/src/s/darwin.h b/src/s/darwin.h
index ce86bc5f578..b042630ee91 100644
--- a/src/s/darwin.h
+++ b/src/s/darwin.h
@@ -106,11 +106,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
106#define SYSTEM_PURESIZE_EXTRA 200000 106#define SYSTEM_PURESIZE_EXTRA 200000
107#endif 107#endif
108 108
109/* On Darwin, res_init appears not to be useful: see bug#562 and
110 http://lists.gnu.org/archive/html/emacs-devel/2007-11/msg01467.html */
111#undef HAVE_RES_INIT
112#undef HAVE_LIBRESOLV
113
114#ifdef emacs 109#ifdef emacs
115#define malloc unexec_malloc 110#define malloc unexec_malloc
116#define realloc unexec_realloc 111#define realloc unexec_realloc
diff --git a/src/s/hpux10-20.h b/src/s/hpux10-20.h
index 683837891f4..62bb0f4e344 100644
--- a/src/s/hpux10-20.h
+++ b/src/s/hpux10-20.h
@@ -61,23 +61,14 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
61 HP-UX 10.20, and that it works for HP-UX 0 as well. */ 61 HP-UX 10.20, and that it works for HP-UX 0 as well. */
62#define NO_EDITRES 62#define NO_EDITRES
63 63
64/* Eric Backus <ericb@lsid.hp.com> says, HP-UX 9.x on HP 700 machines
65 has a broken `rint' in some library versions including math library
66 version number A.09.05.
67
68 You can fix the math library by installing patch number PHSS_4630.
69 But we can fix it more reliably for Emacs like this. */
70#undef HAVE_RINT
71
72/* We have to go this route, rather than hpux9's approach of renaming the 64/* We have to go this route, rather than hpux9's approach of renaming the
73 functions via macros. The system's stdlib.h has fully prototyped 65 functions via macros. The system's stdlib.h has fully prototyped
74 declarations, which yields a conflicting definition of srand48; it 66 declarations, which yields a conflicting definition of srand48; it
75 tries to redeclare what was once srandom to be srand48. So we go 67 tries to redeclare what was once srandom to be srand48. So we go
76 with HAVE_LRAND48 being defined. */ 68 with HAVE_LRAND48 being defined.
69 Note we also undef HAVE_RANDOM via configure. */
77#undef srandom 70#undef srandom
78#undef random 71#undef random
79#undef HAVE_RANDOM
80
81 72
82/* Rainer Malzbender <rainer@displaytech.com> says defining 73/* Rainer Malzbender <rainer@displaytech.com> says defining
83 HAVE_XRMSETDATABASE allows Emacs to compile on HP-UX 10.20 using GCC. */ 74 HAVE_XRMSETDATABASE allows Emacs to compile on HP-UX 10.20 using GCC. */
diff --git a/src/s/unixware.h b/src/s/unixware.h
index 18d24b28507..1f35287f6d1 100644
--- a/src/s/unixware.h
+++ b/src/s/unixware.h
@@ -20,9 +20,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
20 20
21#include "usg5-4-common.h" 21#include "usg5-4-common.h"
22 22
23/* #define HAVE_GETWD (appears to be buggy on SVR4.2) */
24#undef HAVE_GETWD
25
26/* This is the same definition as in usg5-4-common.h, but with sigblock/sigunblock 23/* This is the same definition as in usg5-4-common.h, but with sigblock/sigunblock
27 rather than sighold/sigrelse, which appear to be BSD4.1 specific. 24 rather than sighold/sigrelse, which appear to be BSD4.1 specific.
28 It may also be appropriate for SVR4.x 25 It may also be appropriate for SVR4.x