aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert2011-02-14 22:40:12 -0800
committerPaul Eggert2011-02-14 22:40:12 -0800
commit9502925a798a3af3d40f67a30f30ced94d814f52 (patch)
tree90d1bdd2ea83faa8875d08da1bcc924a0002d218
parentfae95934b8edae3f538063e756ac799ed94313b2 (diff)
downloademacs-9502925a798a3af3d40f67a30f30ced94d814f52.tar.gz
emacs-9502925a798a3af3d40f67a30f30ced94d814f52.zip
Merge from proposed getloadavg simplifications in gnulib.
* configure, lib/Makefile.in, src/config.in: Regenerate. * lib/getloadavg.c, lib/stdlib.in.h, m4/getloadavg.m4: New versions from gnulib. 2011-02-15 Paul Eggert <eggert@cs.ucla.edu>
-rw-r--r--ChangeLog8
-rwxr-xr-xconfigure350
-rw-r--r--lib/Makefile.in2
-rw-r--r--lib/getloadavg.c46
-rw-r--r--lib/stdlib.in.h10
-rw-r--r--m4/getloadavg.m4143
-rw-r--r--src/config.in14
7 files changed, 210 insertions, 363 deletions
diff --git a/ChangeLog b/ChangeLog
index 52db9f45cd6..c664526fe7c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
12011-02-15 Paul Eggert <eggert@cs.ucla.edu> 12011-02-15 Paul Eggert <eggert@cs.ucla.edu>
2 2
3 Merge from proposed getloadavg simplifications in gnulib.
4
5 * configure, lib/Makefile.in, src/config.in: Regenerate.
6 * lib/getloadavg.c, lib/stdlib.in.h, m4/getloadavg.m4: New
7 versions from gnulib.
8
92011-02-15 Paul Eggert <eggert@cs.ucla.edu>
10
3 Merge from gnulib. 11 Merge from gnulib.
4 12
5 2011-02-13 Bruno Haible <bruno@clisp.org> 13 2011-02-13 Bruno Haible <bruno@clisp.org>
diff --git a/configure b/configure
index 6f7148b0a65..df3d1f72eda 100755
--- a/configure
+++ b/configure
@@ -816,8 +816,6 @@ GNULIB_DUP2
816GNULIB_CLOSE 816GNULIB_CLOSE
817GNULIB_CHOWN 817GNULIB_CHOWN
818GETLOADAVG_LIBS 818GETLOADAVG_LIBS
819KMEM_GROUP
820NEED_SETGID
821REPLACE_UNSETENV 819REPLACE_UNSETENV
822REPLACE_STRTOD 820REPLACE_STRTOD
823REPLACE_SETENV 821REPLACE_SETENV
@@ -1105,6 +1103,9 @@ LDFLAGS
1105LIBS 1103LIBS
1106CPPFLAGS 1104CPPFLAGS
1107CPP 1105CPP
1106CPPFLAGS
1107CPP
1108CPPFLAGS
1108XMKMF' 1109XMKMF'
1109 1110
1110 1111
@@ -14468,44 +14469,31 @@ fi
14468# Persuade glibc <stdlib.h> to declare getloadavg(). 14469# Persuade glibc <stdlib.h> to declare getloadavg().
14469 14470
14470 14471
14471gl_have_func=no # yes means we've found a way to get the load average.
14472
14473# Make sure getloadavg.c is where it belongs, at configure-time. 14472# Make sure getloadavg.c is where it belongs, at configure-time.
14474test -f "$srcdir/$gl_source_base/getloadavg.c" || 14473test -f "$srcdir/$gl_source_base/getloadavg.c" ||
14475 as_fn_error $? "$srcdir/$gl_source_base/getloadavg.c is missing" "$LINENO" 5 14474 as_fn_error $? "$srcdir/$gl_source_base/getloadavg.c is missing" "$LINENO" 5
14476 14475
14477gl_save_LIBS=$LIBS 14476gl_save_LIBS=$LIBS
14478 14477
14479# Check for getloadavg, but be sure not to touch the cache variable. 14478ac_fn_c_check_func "$LINENO" "getloadavg" "ac_cv_func_getloadavg"
14480(ac_fn_c_check_func "$LINENO" "getloadavg" "ac_cv_func_getloadavg"
14481if test "x$ac_cv_func_getloadavg" = xyes; then : 14479if test "x$ac_cv_func_getloadavg" = xyes; then :
14482 exit 0
14483else
14484 exit 1
14485fi
14486) && gl_have_func=yes
14487
14488# On HPUX9, an unprivileged user can get load averages through this function.
14489for ac_func in pstat_getdynamic
14490do :
14491 ac_fn_c_check_func "$LINENO" "pstat_getdynamic" "ac_cv_func_pstat_getdynamic"
14492if test "x$ac_cv_func_pstat_getdynamic" = xyes; then :
14493 cat >>confdefs.h <<_ACEOF
14494#define HAVE_PSTAT_GETDYNAMIC 1
14495_ACEOF
14496
14497fi
14498done
14499 14480
14481else
14482 gl_have_func=no
14500 14483
14501# Solaris has libkstat which does not require root. 14484 # Some systems with -lutil have (and need) -lkvm as well, some do not.
14502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kstat_open in -lkstat" >&5 14485 # On Solaris, -lkvm requires nlist from -lelf, so check that first
14503$as_echo_n "checking for kstat_open in -lkstat... " >&6; } 14486 # to get the right answer into the cache.
14504if ${ac_cv_lib_kstat_kstat_open+:} false; then : 14487 # For kstat on solaris, we need to test for libelf and libkvm to force the
14488 # definition of SVR4 below.
14489 if test $gl_have_func = no; then
14490 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_begin in -lelf" >&5
14491$as_echo_n "checking for elf_begin in -lelf... " >&6; }
14492if ${ac_cv_lib_elf_elf_begin+:} false; then :
14505 $as_echo_n "(cached) " >&6 14493 $as_echo_n "(cached) " >&6
14506else 14494else
14507 ac_check_lib_save_LIBS=$LIBS 14495 ac_check_lib_save_LIBS=$LIBS
14508LIBS="-lkstat $LIBS" 14496LIBS="-lelf $LIBS"
14509cat confdefs.h - <<_ACEOF >conftest.$ac_ext 14497cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14510/* end confdefs.h. */ 14498/* end confdefs.h. */
14511 14499
@@ -14515,45 +14503,37 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14515#ifdef __cplusplus 14503#ifdef __cplusplus
14516extern "C" 14504extern "C"
14517#endif 14505#endif
14518char kstat_open (); 14506char elf_begin ();
14519int 14507int
14520main () 14508main ()
14521{ 14509{
14522return kstat_open (); 14510return elf_begin ();
14523 ; 14511 ;
14524 return 0; 14512 return 0;
14525} 14513}
14526_ACEOF 14514_ACEOF
14527if ac_fn_c_try_link "$LINENO"; then : 14515if ac_fn_c_try_link "$LINENO"; then :
14528 ac_cv_lib_kstat_kstat_open=yes 14516 ac_cv_lib_elf_elf_begin=yes
14529else 14517else
14530 ac_cv_lib_kstat_kstat_open=no 14518 ac_cv_lib_elf_elf_begin=no
14531fi 14519fi
14532rm -f core conftest.err conftest.$ac_objext \ 14520rm -f core conftest.err conftest.$ac_objext \
14533 conftest$ac_exeext conftest.$ac_ext 14521 conftest$ac_exeext conftest.$ac_ext
14534LIBS=$ac_check_lib_save_LIBS 14522LIBS=$ac_check_lib_save_LIBS
14535fi 14523fi
14536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kstat_kstat_open" >&5 14524{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_elf_elf_begin" >&5
14537$as_echo "$ac_cv_lib_kstat_kstat_open" >&6; } 14525$as_echo "$ac_cv_lib_elf_elf_begin" >&6; }
14538if test "x$ac_cv_lib_kstat_kstat_open" = xyes; then : 14526if test "x$ac_cv_lib_elf_elf_begin" = xyes; then :
14539 cat >>confdefs.h <<_ACEOF 14527 LIBS="-lelf $LIBS"
14540#define HAVE_LIBKSTAT 1
14541_ACEOF
14542
14543 LIBS="-lkstat $LIBS"
14544
14545fi 14528fi
14546 14529
14547test $ac_cv_lib_kstat_kstat_open = yes && gl_have_func=yes 14530 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kvm_open in -lkvm" >&5
14548 14531$as_echo_n "checking for kvm_open in -lkvm... " >&6; }
14549# AIX has libperfstat which does not require root 14532if ${ac_cv_lib_kvm_kvm_open+:} false; then :
14550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for perfstat_cpu_total in -lperfstat" >&5
14551$as_echo_n "checking for perfstat_cpu_total in -lperfstat... " >&6; }
14552if ${ac_cv_lib_perfstat_perfstat_cpu_total+:} false; then :
14553 $as_echo_n "(cached) " >&6 14533 $as_echo_n "(cached) " >&6
14554else 14534else
14555 ac_check_lib_save_LIBS=$LIBS 14535 ac_check_lib_save_LIBS=$LIBS
14556LIBS="-lperfstat $LIBS" 14536LIBS="-lkvm $LIBS"
14557cat confdefs.h - <<_ACEOF >conftest.$ac_ext 14537cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14558/* end confdefs.h. */ 14538/* end confdefs.h. */
14559 14539
@@ -14563,50 +14543,38 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14563#ifdef __cplusplus 14543#ifdef __cplusplus
14564extern "C" 14544extern "C"
14565#endif 14545#endif
14566char perfstat_cpu_total (); 14546char kvm_open ();
14567int 14547int
14568main () 14548main ()
14569{ 14549{
14570return perfstat_cpu_total (); 14550return kvm_open ();
14571 ; 14551 ;
14572 return 0; 14552 return 0;
14573} 14553}
14574_ACEOF 14554_ACEOF
14575if ac_fn_c_try_link "$LINENO"; then : 14555if ac_fn_c_try_link "$LINENO"; then :
14576 ac_cv_lib_perfstat_perfstat_cpu_total=yes 14556 ac_cv_lib_kvm_kvm_open=yes
14577else 14557else
14578 ac_cv_lib_perfstat_perfstat_cpu_total=no 14558 ac_cv_lib_kvm_kvm_open=no
14579fi 14559fi
14580rm -f core conftest.err conftest.$ac_objext \ 14560rm -f core conftest.err conftest.$ac_objext \
14581 conftest$ac_exeext conftest.$ac_ext 14561 conftest$ac_exeext conftest.$ac_ext
14582LIBS=$ac_check_lib_save_LIBS 14562LIBS=$ac_check_lib_save_LIBS
14583fi 14563fi
14584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_perfstat_perfstat_cpu_total" >&5 14564{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kvm_kvm_open" >&5
14585$as_echo "$ac_cv_lib_perfstat_perfstat_cpu_total" >&6; } 14565$as_echo "$ac_cv_lib_kvm_kvm_open" >&6; }
14586if test "x$ac_cv_lib_perfstat_perfstat_cpu_total" = xyes; then : 14566if test "x$ac_cv_lib_kvm_kvm_open" = xyes; then :
14587 cat >>confdefs.h <<_ACEOF 14567 LIBS="-lkvm $LIBS"
14588#define HAVE_LIBPERFSTAT 1
14589_ACEOF
14590
14591 LIBS="-lperfstat $LIBS"
14592
14593fi 14568fi
14594 14569
14595test $ac_cv_lib_perfstat_perfstat_cpu_total = yes && gl_have_func=yes 14570 # Check for the 4.4BSD definition of getloadavg.
14596 14571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lutil" >&5
14597# Some systems with -lutil have (and need) -lkvm as well, some do not. 14572$as_echo_n "checking for getloadavg in -lutil... " >&6; }
14598# On Solaris, -lkvm requires nlist from -lelf, so check that first 14573if ${ac_cv_lib_util_getloadavg+:} false; then :
14599# to get the right answer into the cache.
14600# For kstat on solaris, we need to test for libelf and libkvm to force the
14601# definition of SVR4 below.
14602if test $gl_have_func = no; then
14603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_begin in -lelf" >&5
14604$as_echo_n "checking for elf_begin in -lelf... " >&6; }
14605if ${ac_cv_lib_elf_elf_begin+:} false; then :
14606 $as_echo_n "(cached) " >&6 14574 $as_echo_n "(cached) " >&6
14607else 14575else
14608 ac_check_lib_save_LIBS=$LIBS 14576 ac_check_lib_save_LIBS=$LIBS
14609LIBS="-lelf $LIBS" 14577LIBS="-lutil $LIBS"
14610cat confdefs.h - <<_ACEOF >conftest.$ac_ext 14578cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14611/* end confdefs.h. */ 14579/* end confdefs.h. */
14612 14580
@@ -14616,37 +14584,44 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14616#ifdef __cplusplus 14584#ifdef __cplusplus
14617extern "C" 14585extern "C"
14618#endif 14586#endif
14619char elf_begin (); 14587char getloadavg ();
14620int 14588int
14621main () 14589main ()
14622{ 14590{
14623return elf_begin (); 14591return getloadavg ();
14624 ; 14592 ;
14625 return 0; 14593 return 0;
14626} 14594}
14627_ACEOF 14595_ACEOF
14628if ac_fn_c_try_link "$LINENO"; then : 14596if ac_fn_c_try_link "$LINENO"; then :
14629 ac_cv_lib_elf_elf_begin=yes 14597 ac_cv_lib_util_getloadavg=yes
14630else 14598else
14631 ac_cv_lib_elf_elf_begin=no 14599 ac_cv_lib_util_getloadavg=no
14632fi 14600fi
14633rm -f core conftest.err conftest.$ac_objext \ 14601rm -f core conftest.err conftest.$ac_objext \
14634 conftest$ac_exeext conftest.$ac_ext 14602 conftest$ac_exeext conftest.$ac_ext
14635LIBS=$ac_check_lib_save_LIBS 14603LIBS=$ac_check_lib_save_LIBS
14636fi 14604fi
14637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_elf_elf_begin" >&5 14605{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_getloadavg" >&5
14638$as_echo "$ac_cv_lib_elf_elf_begin" >&6; } 14606$as_echo "$ac_cv_lib_util_getloadavg" >&6; }
14639if test "x$ac_cv_lib_elf_elf_begin" = xyes; then : 14607if test "x$ac_cv_lib_util_getloadavg" = xyes; then :
14640 LIBS="-lelf $LIBS" 14608 LIBS="-lutil $LIBS" gl_have_func=yes
14641fi 14609fi
14642 14610
14643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kvm_open in -lkvm" >&5 14611 fi
14644$as_echo_n "checking for kvm_open in -lkvm... " >&6; } 14612
14645if ${ac_cv_lib_kvm_kvm_open+:} false; then : 14613 if test $gl_have_func = no; then
14614 # There is a commonly available library for RS/6000 AIX.
14615 # Since it is not a standard part of AIX, it might be installed locally.
14616 gl_getloadavg_LIBS=$LIBS
14617 LIBS="-L/usr/local/lib $LIBS"
14618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lgetloadavg" >&5
14619$as_echo_n "checking for getloadavg in -lgetloadavg... " >&6; }
14620if ${ac_cv_lib_getloadavg_getloadavg+:} false; then :
14646 $as_echo_n "(cached) " >&6 14621 $as_echo_n "(cached) " >&6
14647else 14622else
14648 ac_check_lib_save_LIBS=$LIBS 14623 ac_check_lib_save_LIBS=$LIBS
14649LIBS="-lkvm $LIBS" 14624LIBS="-lgetloadavg $LIBS"
14650cat confdefs.h - <<_ACEOF >conftest.$ac_ext 14625cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14651/* end confdefs.h. */ 14626/* end confdefs.h. */
14652 14627
@@ -14656,38 +14631,57 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14656#ifdef __cplusplus 14631#ifdef __cplusplus
14657extern "C" 14632extern "C"
14658#endif 14633#endif
14659char kvm_open (); 14634char getloadavg ();
14660int 14635int
14661main () 14636main ()
14662{ 14637{
14663return kvm_open (); 14638return getloadavg ();
14664 ; 14639 ;
14665 return 0; 14640 return 0;
14666} 14641}
14667_ACEOF 14642_ACEOF
14668if ac_fn_c_try_link "$LINENO"; then : 14643if ac_fn_c_try_link "$LINENO"; then :
14669 ac_cv_lib_kvm_kvm_open=yes 14644 ac_cv_lib_getloadavg_getloadavg=yes
14670else 14645else
14671 ac_cv_lib_kvm_kvm_open=no 14646 ac_cv_lib_getloadavg_getloadavg=no
14672fi 14647fi
14673rm -f core conftest.err conftest.$ac_objext \ 14648rm -f core conftest.err conftest.$ac_objext \
14674 conftest$ac_exeext conftest.$ac_ext 14649 conftest$ac_exeext conftest.$ac_ext
14675LIBS=$ac_check_lib_save_LIBS 14650LIBS=$ac_check_lib_save_LIBS
14676fi 14651fi
14677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kvm_kvm_open" >&5 14652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_getloadavg_getloadavg" >&5
14678$as_echo "$ac_cv_lib_kvm_kvm_open" >&6; } 14653$as_echo "$ac_cv_lib_getloadavg_getloadavg" >&6; }
14679if test "x$ac_cv_lib_kvm_kvm_open" = xyes; then : 14654if test "x$ac_cv_lib_getloadavg_getloadavg" = xyes; then :
14680 LIBS="-lkvm $LIBS" 14655 LIBS="-lgetloadavg $LIBS" gl_have_func=yes
14656else
14657 LIBS=$gl_getloadavg_LIBS
14681fi 14658fi
14682 14659
14683 # Check for the 4.4BSD definition of getloadavg. 14660 fi
14684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lutil" >&5 14661
14685$as_echo_n "checking for getloadavg in -lutil... " >&6; } 14662 # Set up the replacement function if necessary.
14686if ${ac_cv_lib_util_getloadavg+:} false; then : 14663 if test $gl_have_func = no; then
14664
14665
14666
14667
14668
14669
14670
14671
14672 gl_LIBOBJS="$gl_LIBOBJS getloadavg.$ac_objext"
14673
14674
14675# Figure out what our getloadavg.c needs.
14676
14677# Solaris has libkstat which does not require root.
14678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kstat_open in -lkstat" >&5
14679$as_echo_n "checking for kstat_open in -lkstat... " >&6; }
14680if ${ac_cv_lib_kstat_kstat_open+:} false; then :
14687 $as_echo_n "(cached) " >&6 14681 $as_echo_n "(cached) " >&6
14688else 14682else
14689 ac_check_lib_save_LIBS=$LIBS 14683 ac_check_lib_save_LIBS=$LIBS
14690LIBS="-lutil $LIBS" 14684LIBS="-lkstat $LIBS"
14691cat confdefs.h - <<_ACEOF >conftest.$ac_ext 14685cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14692/* end confdefs.h. */ 14686/* end confdefs.h. */
14693 14687
@@ -14697,44 +14691,61 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14697#ifdef __cplusplus 14691#ifdef __cplusplus
14698extern "C" 14692extern "C"
14699#endif 14693#endif
14700char getloadavg (); 14694char kstat_open ();
14701int 14695int
14702main () 14696main ()
14703{ 14697{
14704return getloadavg (); 14698return kstat_open ();
14705 ; 14699 ;
14706 return 0; 14700 return 0;
14707} 14701}
14708_ACEOF 14702_ACEOF
14709if ac_fn_c_try_link "$LINENO"; then : 14703if ac_fn_c_try_link "$LINENO"; then :
14710 ac_cv_lib_util_getloadavg=yes 14704 ac_cv_lib_kstat_kstat_open=yes
14711else 14705else
14712 ac_cv_lib_util_getloadavg=no 14706 ac_cv_lib_kstat_kstat_open=no
14713fi 14707fi
14714rm -f core conftest.err conftest.$ac_objext \ 14708rm -f core conftest.err conftest.$ac_objext \
14715 conftest$ac_exeext conftest.$ac_ext 14709 conftest$ac_exeext conftest.$ac_ext
14716LIBS=$ac_check_lib_save_LIBS 14710LIBS=$ac_check_lib_save_LIBS
14717fi 14711fi
14718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_getloadavg" >&5 14712{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kstat_kstat_open" >&5
14719$as_echo "$ac_cv_lib_util_getloadavg" >&6; } 14713$as_echo "$ac_cv_lib_kstat_kstat_open" >&6; }
14720if test "x$ac_cv_lib_util_getloadavg" = xyes; then : 14714if test "x$ac_cv_lib_kstat_kstat_open" = xyes; then :
14721 LIBS="-lutil $LIBS" gl_have_func=yes gl_cv_func_getloadavg_setgid=yes 14715 cat >>confdefs.h <<_ACEOF
14716#define HAVE_LIBKSTAT 1
14717_ACEOF
14718
14719 LIBS="-lkstat $LIBS"
14720
14722fi 14721fi
14723 14722
14723test $ac_cv_lib_kstat_kstat_open = yes && gl_have_func=yes
14724
14725# On HPUX9, an unprivileged user can get load averages this way.
14726if test $gl_have_func = no; then
14727 for ac_func in pstat_getdynamic
14728do :
14729 ac_fn_c_check_func "$LINENO" "pstat_getdynamic" "ac_cv_func_pstat_getdynamic"
14730if test "x$ac_cv_func_pstat_getdynamic" = xyes; then :
14731 cat >>confdefs.h <<_ACEOF
14732#define HAVE_PSTAT_GETDYNAMIC 1
14733_ACEOF
14734 gl_have_func=yes
14735fi
14736done
14737
14724fi 14738fi
14725 14739
14740# AIX has libperfstat which does not require root
14726if test $gl_have_func = no; then 14741if test $gl_have_func = no; then
14727 # There is a commonly available library for RS/6000 AIX. 14742 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for perfstat_cpu_total in -lperfstat" >&5
14728 # Since it is not a standard part of AIX, it might be installed locally. 14743$as_echo_n "checking for perfstat_cpu_total in -lperfstat... " >&6; }
14729 gl_getloadavg_LIBS=$LIBS 14744if ${ac_cv_lib_perfstat_perfstat_cpu_total+:} false; then :
14730 LIBS="-L/usr/local/lib $LIBS"
14731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lgetloadavg" >&5
14732$as_echo_n "checking for getloadavg in -lgetloadavg... " >&6; }
14733if ${ac_cv_lib_getloadavg_getloadavg+:} false; then :
14734 $as_echo_n "(cached) " >&6 14745 $as_echo_n "(cached) " >&6
14735else 14746else
14736 ac_check_lib_save_LIBS=$LIBS 14747 ac_check_lib_save_LIBS=$LIBS
14737LIBS="-lgetloadavg $LIBS" 14748LIBS="-lperfstat $LIBS"
14738cat confdefs.h - <<_ACEOF >conftest.$ac_ext 14749cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14739/* end confdefs.h. */ 14750/* end confdefs.h. */
14740 14751
@@ -14744,67 +14755,46 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14744#ifdef __cplusplus 14755#ifdef __cplusplus
14745extern "C" 14756extern "C"
14746#endif 14757#endif
14747char getloadavg (); 14758char perfstat_cpu_total ();
14748int 14759int
14749main () 14760main ()
14750{ 14761{
14751return getloadavg (); 14762return perfstat_cpu_total ();
14752 ; 14763 ;
14753 return 0; 14764 return 0;
14754} 14765}
14755_ACEOF 14766_ACEOF
14756if ac_fn_c_try_link "$LINENO"; then : 14767if ac_fn_c_try_link "$LINENO"; then :
14757 ac_cv_lib_getloadavg_getloadavg=yes 14768 ac_cv_lib_perfstat_perfstat_cpu_total=yes
14758else 14769else
14759 ac_cv_lib_getloadavg_getloadavg=no 14770 ac_cv_lib_perfstat_perfstat_cpu_total=no
14760fi 14771fi
14761rm -f core conftest.err conftest.$ac_objext \ 14772rm -f core conftest.err conftest.$ac_objext \
14762 conftest$ac_exeext conftest.$ac_ext 14773 conftest$ac_exeext conftest.$ac_ext
14763LIBS=$ac_check_lib_save_LIBS 14774LIBS=$ac_check_lib_save_LIBS
14764fi 14775fi
14765{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_getloadavg_getloadavg" >&5 14776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_perfstat_perfstat_cpu_total" >&5
14766$as_echo "$ac_cv_lib_getloadavg_getloadavg" >&6; } 14777$as_echo "$ac_cv_lib_perfstat_perfstat_cpu_total" >&6; }
14767if test "x$ac_cv_lib_getloadavg_getloadavg" = xyes; then : 14778if test "x$ac_cv_lib_perfstat_perfstat_cpu_total" = xyes; then :
14768 LIBS="-lgetloadavg $LIBS"
14769else
14770 LIBS=$gl_getloadavg_LIBS
14771fi
14772
14773fi
14774
14775# Make sure it is really in the library, if we think we found it,
14776# otherwise set up the replacement function.
14777for ac_func in getloadavg
14778do :
14779 ac_fn_c_check_func "$LINENO" "getloadavg" "ac_cv_func_getloadavg"
14780if test "x$ac_cv_func_getloadavg" = xyes; then :
14781 cat >>confdefs.h <<_ACEOF 14779 cat >>confdefs.h <<_ACEOF
14782#define HAVE_GETLOADAVG 1 14780#define HAVE_LIBPERFSTAT 1
14783_ACEOF 14781_ACEOF
14784 14782
14785else 14783 LIBS="-lperfstat $LIBS"
14786
14787
14788
14789
14790
14791
14792
14793
14794 gl_LIBOBJS="$gl_LIBOBJS getloadavg.$ac_objext"
14795 14784
14785fi
14796 14786
14797$as_echo "#define C_GETLOADAVG 1" >>confdefs.h 14787 test $ac_cv_lib_perfstat_perfstat_cpu_total = yes && gl_have_func=yes
14788fi
14798 14789
14799# Figure out what our getloadavg.c needs. 14790if test $gl_have_func = no; then
14800gl_have_func=no 14791 ac_fn_c_check_header_mongrel "$LINENO" "sys/dg_sys_info.h" "ac_cv_header_sys_dg_sys_info_h" "$ac_includes_default"
14801ac_fn_c_check_header_mongrel "$LINENO" "sys/dg_sys_info.h" "ac_cv_header_sys_dg_sys_info_h" "$ac_includes_default"
14802if test "x$ac_cv_header_sys_dg_sys_info_h" = xyes; then : 14792if test "x$ac_cv_header_sys_dg_sys_info_h" = xyes; then :
14803 gl_have_func=yes 14793 gl_have_func=yes
14804 14794
14805$as_echo "#define DGUX 1" >>confdefs.h 14795$as_echo "#define DGUX 1" >>confdefs.h
14806 14796
14807 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dg_sys_info in -ldgc" >&5 14797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dg_sys_info in -ldgc" >&5
14808$as_echo_n "checking for dg_sys_info in -ldgc... " >&6; } 14798$as_echo_n "checking for dg_sys_info in -ldgc... " >&6; }
14809if ${ac_cv_lib_dgc_dg_sys_info+:} false; then : 14799if ${ac_cv_lib_dgc_dg_sys_info+:} false; then :
14810 $as_echo_n "(cached) " >&6 14800 $as_echo_n "(cached) " >&6
@@ -14852,6 +14842,7 @@ fi
14852fi 14842fi
14853 14843
14854 14844
14845fi
14855 14846
14856# We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it 14847# We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
14857# uses stabs), but it is still SVR4. We cannot check for <elf.h> because 14848# uses stabs), but it is still SVR4. We cannot check for <elf.h> because
@@ -14920,8 +14911,6 @@ cat >>confdefs.h <<_ACEOF
14920_ACEOF 14911_ACEOF
14921 14912
14922 14913
14923$as_echo "#define NLIST_NAME_UNION 1" >>confdefs.h
14924
14925fi 14914fi
14926 14915
14927 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 14916 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -14952,65 +14941,10 @@ fi
14952 14941
14953done 14942done
14954 14943
14955fi 14944 fi
14956done
14957
14958
14959# Some definitions of getloadavg require that the program be installed setgid.
14960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getloadavg requires setgid" >&5
14961$as_echo_n "checking whether getloadavg requires setgid... " >&6; }
14962if ${gl_cv_func_getloadavg_setgid+:} false; then :
14963 $as_echo_n "(cached) " >&6
14964else
14965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14966/* end confdefs.h. */
14967#define CONFIGURING_GETLOADAVG
14968#include "$srcdir/$gl_source_base/getloadavg.c"
14969#ifdef LDAV_PRIVILEGED
14970Yowza Am I SETGID yet
14971#endif
14972
14973_ACEOF
14974if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14975 $EGREP "Yowza Am I SETGID yet" >/dev/null 2>&1; then :
14976 gl_cv_func_getloadavg_setgid=yes
14977else
14978 gl_cv_func_getloadavg_setgid=no
14979fi
14980rm -f conftest*
14981
14982fi
14983{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getloadavg_setgid" >&5
14984$as_echo "$gl_cv_func_getloadavg_setgid" >&6; }
14985if test $gl_cv_func_getloadavg_setgid = yes; then
14986 NEED_SETGID=true
14987
14988$as_echo "#define GETLOADAVG_PRIVILEGED 1" >>confdefs.h
14989
14990else
14991 NEED_SETGID=false
14992fi 14945fi
14993 14946
14994if test $gl_cv_func_getloadavg_setgid = yes; then
14995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking group of /dev/kmem" >&5
14996$as_echo_n "checking group of /dev/kmem... " >&6; }
14997if ${gl_cv_group_kmem+:} false; then :
14998 $as_echo_n "(cached) " >&6
14999else
15000 # On Solaris, /dev/kmem is a symlink. Get info on the real file.
15001 ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null`
15002 # If we got an error (system does not support symlinks), try without -L.
15003 test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem`
15004 gl_cv_group_kmem=`echo $ac_ls_output \
15005 | sed -ne 's/[ ][ ]*/ /g
15006 s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/
15007 / /s/.* //;p'`
15008 14947
15009fi
15010{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_group_kmem" >&5
15011$as_echo "$gl_cv_group_kmem" >&6; }
15012 KMEM_GROUP=$gl_cv_group_kmem
15013fi
15014if test "x$gl_save_LIBS" = x; then 14948if test "x$gl_save_LIBS" = x; then
15015 GETLOADAVG_LIBS=$LIBS 14949 GETLOADAVG_LIBS=$LIBS
15016else 14950else
diff --git a/lib/Makefile.in b/lib/Makefile.in
index bdc405a505f..82e23967865 100644
--- a/lib/Makefile.in
+++ b/lib/Makefile.in
@@ -296,7 +296,6 @@ INSTALL_INFO = @INSTALL_INFO@
296INSTALL_PROGRAM = @INSTALL_PROGRAM@ 296INSTALL_PROGRAM = @INSTALL_PROGRAM@
297INSTALL_SCRIPT = @INSTALL_SCRIPT@ 297INSTALL_SCRIPT = @INSTALL_SCRIPT@
298INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ 298INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
299KMEM_GROUP = @KMEM_GROUP@
300KRB4LIB = @KRB4LIB@ 299KRB4LIB = @KRB4LIB@
301KRB5LIB = @KRB5LIB@ 300KRB5LIB = @KRB5LIB@
302LDFLAGS = @LDFLAGS@ 301LDFLAGS = @LDFLAGS@
@@ -349,7 +348,6 @@ MKDEPDIR = @MKDEPDIR@
349MKDIR_P = @MKDIR_P@ 348MKDIR_P = @MKDIR_P@
350MOUSE_SUPPORT = @MOUSE_SUPPORT@ 349MOUSE_SUPPORT = @MOUSE_SUPPORT@
351M_FILE = @M_FILE@ 350M_FILE = @M_FILE@
352NEED_SETGID = @NEED_SETGID@
353NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ 351NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@
354NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ 352NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@
355NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ 353NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@
diff --git a/lib/getloadavg.c b/lib/getloadavg.c
index 96a6aa4d49c..8e917145c5c 100644
--- a/lib/getloadavg.c
+++ b/lib/getloadavg.c
@@ -94,11 +94,6 @@
94#include <errno.h> 94#include <errno.h>
95#include <stdio.h> 95#include <stdio.h>
96 96
97/* Exclude all the code except the test program at the end
98 if the system has its own `getloadavg' function. */
99
100#ifndef HAVE_GETLOADAVG
101
102# include <sys/types.h> 97# include <sys/types.h>
103 98
104/* Both the Emacs and non-Emacs sections want this. Some 99/* Both the Emacs and non-Emacs sections want this. Some
@@ -1032,44 +1027,3 @@ getloadavg (double loadavg[], int nelem)
1032# endif 1027# endif
1033 return elem; 1028 return elem;
1034} 1029}
1035
1036#endif /* ! HAVE_GETLOADAVG */
1037
1038#ifdef TEST
1039int
1040main (int argc, char **argv)
1041{
1042 int naptime = 0;
1043
1044 if (argc > 1)
1045 naptime = atoi (argv[1]);
1046
1047 while (1)
1048 {
1049 double avg[3];
1050 int loads;
1051
1052 errno = 0; /* Don't be misled if it doesn't set errno. */
1053 loads = getloadavg (avg, 3);
1054 if (loads == -1)
1055 {
1056 perror ("Error getting load average");
1057 return EXIT_FAILURE;
1058 }
1059 if (loads > 0)
1060 printf ("1-minute: %f ", avg[0]);
1061 if (loads > 1)
1062 printf ("5-minute: %f ", avg[1]);
1063 if (loads > 2)
1064 printf ("15-minute: %f ", avg[2]);
1065 if (loads > 0)
1066 putchar ('\n');
1067
1068 if (naptime == 0)
1069 break;
1070 sleep (naptime);
1071 }
1072
1073 return EXIT_SUCCESS;
1074}
1075#endif /* TEST */
diff --git a/lib/stdlib.in.h b/lib/stdlib.in.h
index 6e69a277af0..62d18c62811 100644
--- a/lib/stdlib.in.h
+++ b/lib/stdlib.in.h
@@ -88,10 +88,10 @@ struct random_data
88# include <unistd.h> 88# include <unistd.h>
89#endif 89#endif
90 90
91#ifndef __attribute__ 91#if 3 <= __GNUC__ || __GNUC__ == 2 && 8 <= __GNUC_MINOR__
92# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) 92# define _GL_ATTRIBUTE_NORETURN __attribute__ ((__noreturn__))
93# define __attribute__(Spec) /* empty */ 93#else
94# endif 94# define _GL_ATTRIBUTE_NORETURN
95#endif 95#endif
96 96
97/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ 97/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
@@ -119,7 +119,7 @@ struct random_data
119/* Terminate the current process with the given return code, without running 119/* Terminate the current process with the given return code, without running
120 the 'atexit' handlers. */ 120 the 'atexit' handlers. */
121# if !@HAVE__EXIT@ 121# if !@HAVE__EXIT@
122_GL_FUNCDECL_SYS (_Exit, void, (int status) __attribute__ ((__noreturn__))); 122_GL_FUNCDECL_SYS (_Exit, void, (int status) _GL_ATTRIBUTE_NORETURN);
123# endif 123# endif
124_GL_CXXALIAS_SYS (_Exit, void, (int status)); 124_GL_CXXALIAS_SYS (_Exit, void, (int status));
125_GL_CXXALIASWARN (_Exit); 125_GL_CXXALIASWARN (_Exit);
diff --git a/m4/getloadavg.m4 b/m4/getloadavg.m4
index d25ad345b33..4aae158e963 100644
--- a/m4/getloadavg.m4
+++ b/m4/getloadavg.m4
@@ -20,90 +20,44 @@ AC_DEFUN([gl_GETLOADAVG],
20# Persuade glibc <stdlib.h> to declare getloadavg(). 20# Persuade glibc <stdlib.h> to declare getloadavg().
21AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) 21AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
22 22
23gl_have_func=no # yes means we've found a way to get the load average.
24
25# Make sure getloadavg.c is where it belongs, at configure-time. 23# Make sure getloadavg.c is where it belongs, at configure-time.
26test -f "$srcdir/$1/getloadavg.c" || 24test -f "$srcdir/$1/getloadavg.c" ||
27 AC_MSG_ERROR([$srcdir/$1/getloadavg.c is missing]) 25 AC_MSG_ERROR([$srcdir/$1/getloadavg.c is missing])
28 26
29gl_save_LIBS=$LIBS 27gl_save_LIBS=$LIBS
30 28
31# Check for getloadavg, but be sure not to touch the cache variable. 29AC_CHECK_FUNC([getloadavg], [],
32(AC_CHECK_FUNC([getloadavg], [exit 0], [exit 1])) && gl_have_func=yes 30 [gl_have_func=no
33 31
34# On HPUX9, an unprivileged user can get load averages through this function. 32 # Some systems with -lutil have (and need) -lkvm as well, some do not.
35AC_CHECK_FUNCS([pstat_getdynamic]) 33 # On Solaris, -lkvm requires nlist from -lelf, so check that first
36 34 # to get the right answer into the cache.
37# Solaris has libkstat which does not require root. 35 # For kstat on solaris, we need to test for libelf and libkvm to force the
38AC_CHECK_LIB([kstat], [kstat_open]) 36 # definition of SVR4 below.
39test $ac_cv_lib_kstat_kstat_open = yes && gl_have_func=yes 37 if test $gl_have_func = no; then
38 AC_CHECK_LIB([elf], [elf_begin], [LIBS="-lelf $LIBS"])
39 AC_CHECK_LIB([kvm], [kvm_open], [LIBS="-lkvm $LIBS"])
40 # Check for the 4.4BSD definition of getloadavg.
41 AC_CHECK_LIB([util], [getloadavg],
42 [LIBS="-lutil $LIBS" gl_have_func=yes])
43 fi
44
45 if test $gl_have_func = no; then
46 # There is a commonly available library for RS/6000 AIX.
47 # Since it is not a standard part of AIX, it might be installed locally.
48 gl_getloadavg_LIBS=$LIBS
49 LIBS="-L/usr/local/lib $LIBS"
50 AC_CHECK_LIB([getloadavg], [getloadavg],
51 [LIBS="-lgetloadavg $LIBS" gl_have_func=yes],
52 [LIBS=$gl_getloadavg_LIBS])
53 fi
54
55 # Set up the replacement function if necessary.
56 if test $gl_have_func = no; then
57 AC_LIBOBJ([getloadavg])
58 gl_PREREQ_GETLOADAVG
59 fi])
40 60
41# AIX has libperfstat which does not require root
42AC_CHECK_LIB([perfstat], [perfstat_cpu_total])
43test $ac_cv_lib_perfstat_perfstat_cpu_total = yes && gl_have_func=yes
44
45# Some systems with -lutil have (and need) -lkvm as well, some do not.
46# On Solaris, -lkvm requires nlist from -lelf, so check that first
47# to get the right answer into the cache.
48# For kstat on solaris, we need to test for libelf and libkvm to force the
49# definition of SVR4 below.
50if test $gl_have_func = no; then
51 AC_CHECK_LIB([elf], [elf_begin], [LIBS="-lelf $LIBS"])
52 AC_CHECK_LIB([kvm], [kvm_open], [LIBS="-lkvm $LIBS"])
53 # Check for the 4.4BSD definition of getloadavg.
54 AC_CHECK_LIB([util], [getloadavg],
55 [LIBS="-lutil $LIBS" gl_have_func=yes gl_cv_func_getloadavg_setgid=yes])
56fi
57
58if test $gl_have_func = no; then
59 # There is a commonly available library for RS/6000 AIX.
60 # Since it is not a standard part of AIX, it might be installed locally.
61 gl_getloadavg_LIBS=$LIBS
62 LIBS="-L/usr/local/lib $LIBS"
63 AC_CHECK_LIB([getloadavg], [getloadavg],
64 [LIBS="-lgetloadavg $LIBS"], [LIBS=$gl_getloadavg_LIBS])
65fi
66
67# Make sure it is really in the library, if we think we found it,
68# otherwise set up the replacement function.
69AC_CHECK_FUNCS([getloadavg], [],
70 [gl_PREREQ_GETLOADAVG])
71
72# Some definitions of getloadavg require that the program be installed setgid.
73AC_CACHE_CHECK([whether getloadavg requires setgid],
74 gl_cv_func_getloadavg_setgid,
75[AC_EGREP_CPP([Yowza Am I SETGID yet],
76[#define CONFIGURING_GETLOADAVG
77#include "$srcdir/$1/getloadavg.c"
78#ifdef LDAV_PRIVILEGED
79Yowza Am I SETGID yet
80#endif
81],
82 gl_cv_func_getloadavg_setgid=yes,
83 gl_cv_func_getloadavg_setgid=no)])
84if test $gl_cv_func_getloadavg_setgid = yes; then
85 NEED_SETGID=true
86 AC_DEFINE([GETLOADAVG_PRIVILEGED], [1],
87 [Define to 1 if the `getloadavg' function needs to be run setuid
88 or setgid.])
89else
90 NEED_SETGID=false
91fi
92AC_SUBST([NEED_SETGID])dnl
93
94if test $gl_cv_func_getloadavg_setgid = yes; then
95 AC_CACHE_CHECK([group of /dev/kmem], [gl_cv_group_kmem],
96[ # On Solaris, /dev/kmem is a symlink. Get info on the real file.
97 ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null`
98 # If we got an error (system does not support symlinks), try without -L.
99 test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem`
100 gl_cv_group_kmem=`echo $ac_ls_output \
101 | sed -ne ['s/[ ][ ]*/ /g
102 s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/
103 / /s/.* //;p']`
104])
105 AC_SUBST([KMEM_GROUP], [$gl_cv_group_kmem])dnl
106fi
107if test "x$gl_save_LIBS" = x; then 61if test "x$gl_save_LIBS" = x; then
108 GETLOADAVG_LIBS=$LIBS 62 GETLOADAVG_LIBS=$LIBS
109else 63else
@@ -133,14 +87,30 @@ AC_CHECK_DECL([getloadavg], [], [HAVE_DECL_GETLOADAVG=0],
133# -------------------- 87# --------------------
134# Set up the AC_LIBOBJ replacement of `getloadavg'. 88# Set up the AC_LIBOBJ replacement of `getloadavg'.
135AC_DEFUN([gl_PREREQ_GETLOADAVG], 89AC_DEFUN([gl_PREREQ_GETLOADAVG],
136[AC_LIBOBJ([getloadavg]) 90[
137AC_DEFINE([C_GETLOADAVG], [1], [Define to 1 if using `getloadavg.c'.])
138# Figure out what our getloadavg.c needs. 91# Figure out what our getloadavg.c needs.
139gl_have_func=no 92
140AC_CHECK_HEADER([sys/dg_sys_info.h], 93# Solaris has libkstat which does not require root.
141[gl_have_func=yes 94AC_CHECK_LIB([kstat], [kstat_open])
142 AC_DEFINE([DGUX], [1], [Define to 1 for DGUX with <sys/dg_sys_info.h>.]) 95test $ac_cv_lib_kstat_kstat_open = yes && gl_have_func=yes
143 AC_CHECK_LIB([dgc], [dg_sys_info])]) 96
97# On HPUX9, an unprivileged user can get load averages this way.
98if test $gl_have_func = no; then
99 AC_CHECK_FUNCS([pstat_getdynamic], [gl_have_func=yes])
100fi
101
102# AIX has libperfstat which does not require root
103if test $gl_have_func = no; then
104 AC_CHECK_LIB([perfstat], [perfstat_cpu_total])
105 test $ac_cv_lib_perfstat_perfstat_cpu_total = yes && gl_have_func=yes
106fi
107
108if test $gl_have_func = no; then
109 AC_CHECK_HEADER([sys/dg_sys_info.h],
110 [gl_have_func=yes
111 AC_DEFINE([DGUX], [1], [Define to 1 for DGUX with <sys/dg_sys_info.h>.])
112 AC_CHECK_LIB([dgc], [dg_sys_info])])
113fi
144 114
145# We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it 115# We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
146# uses stabs), but it is still SVR4. We cannot check for <elf.h> because 116# uses stabs), but it is still SVR4. We cannot check for <elf.h> because
@@ -171,10 +141,7 @@ fi
171 141
172AC_CHECK_HEADERS([nlist.h], 142AC_CHECK_HEADERS([nlist.h],
173[AC_CHECK_MEMBERS([struct nlist.n_un.n_name], 143[AC_CHECK_MEMBERS([struct nlist.n_un.n_name],
174 [AC_DEFINE([NLIST_NAME_UNION], [1], 144 [], [],
175 [Define to 1 if your `struct nlist' has an
176 `n_un' member. Obsolete, depend on
177 `HAVE_STRUCT_NLIST_N_UN_N_NAME])], [],
178 [@%:@include <nlist.h>]) 145 [@%:@include <nlist.h>])
179 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <nlist.h>]], 146 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <nlist.h>]],
180 [[struct nlist x; 147 [[struct nlist x;
diff --git a/src/config.in b/src/config.in
index 68cd4b39ac0..637287a024c 100644
--- a/src/config.in
+++ b/src/config.in
@@ -42,9 +42,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
42/* Define to 1 if using `alloca.c'. */ 42/* Define to 1 if using `alloca.c'. */
43#undef C_ALLOCA 43#undef C_ALLOCA
44 44
45/* Define to 1 if using `getloadavg.c'. */
46#undef C_GETLOADAVG
47
48/* Define to 1 for DGUX with <sys/dg_sys_info.h>. */ 45/* Define to 1 for DGUX with <sys/dg_sys_info.h>. */
49#undef DGUX 46#undef DGUX
50 47
@@ -74,10 +71,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
74/* Define this to check for short string overrun. */ 71/* Define this to check for short string overrun. */
75#undef GC_CHECK_STRING_OVERRUN 72#undef GC_CHECK_STRING_OVERRUN
76 73
77/* Define to 1 if the `getloadavg' function needs to be run setuid or setgid.
78 */
79#undef GETLOADAVG_PRIVILEGED
80
81/* Define to 1 if the `getpgrp' function requires zero arguments. */ 74/* Define to 1 if the `getpgrp' function requires zero arguments. */
82#undef GETPGRP_VOID 75#undef GETPGRP_VOID
83 76
@@ -225,9 +218,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
225/* Define to 1 if you have the `getline' function. */ 218/* Define to 1 if you have the `getline' function. */
226#undef HAVE_GETLINE 219#undef HAVE_GETLINE
227 220
228/* Define to 1 if you have the `getloadavg' function. */
229#undef HAVE_GETLOADAVG
230
231/* Define to 1 if you have the <getopt.h> header file. */ 221/* Define to 1 if you have the <getopt.h> header file. */
232#undef HAVE_GETOPT_H 222#undef HAVE_GETOPT_H
233 223
@@ -876,10 +866,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
876/* Define to support POP mail retrieval. */ 866/* Define to support POP mail retrieval. */
877#undef MAIL_USE_POP 867#undef MAIL_USE_POP
878 868
879/* Define to 1 if your `struct nlist' has an `n_un' member. Obsolete, depend
880 on `HAVE_STRUCT_NLIST_N_UN_N_NAME */
881#undef NLIST_NAME_UNION
882
883/* Define to 1 if you don't have struct exception in math.h. */ 869/* Define to 1 if you don't have struct exception in math.h. */
884#undef NO_MATHERR 870#undef NO_MATHERR
885 871