Last-minute changed for 3.75.1
authorPaul Smith <psmith@gnu.org>
Mon, 7 Apr 1997 18:02:17 +0000 (18:02 +0000)
committerPaul Smith <psmith@gnu.org>
Mon, 7 Apr 1997 18:02:17 +0000 (18:02 +0000)
ChangeLog
config.h.in
configure.in
getloadavg.c

index a75a4a9..d73049d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,9 +2,16 @@ Mon Apr  7 02:06:22 1997  Paul D. Smith  <psmith@baynetworks.com>
 
        * Version 3.75.1
 
-       * compatMakefile (objs): Define & use theo $(GLOB) variable so
+       * compatMakefile (objs): Define & use the $(GLOB) variable so
        that it's removed correctly from build.sh.in when it's built.
 
+       * configure.in: On Solaris we can use the kstat_*() functions to
+       get load averages without needing special permissions.  Add a
+       check for -lkstat to see if we have it.
+
+       * getloadavg.c (getloadavg): Use HAVE_LIBKSTAT instead of SUN5 as
+       the test to enable kstat_open(), etc. processing.
+
 Fri Apr  4 20:21:18 1997  Eli Zaretskii  <eliz@is.elta.co.il>
 
        * <lots>: Fixes to work in the DJGPP DOS environment.
index c1fed49..1f83d84 100644 (file)
@@ -38,9 +38,6 @@
 /* Define if your system has a working fnmatch function.  */
 #undef HAVE_FNMATCH
 
-/* Define if your system has its own `getloadavg' function.  */
-#undef HAVE_GETLOADAVG
-
 /* Define if you have the getmntent function.  */
 #undef HAVE_GETMNTENT
 
 /* Define if you have the getgroups function.  */
 #undef HAVE_GETGROUPS
 
+/* Define if you have the getloadavg function.  */
+#undef HAVE_GETLOADAVG
+
 /* Define if you have the memmove function.  */
 #undef HAVE_MEMMOVE
 
 /* Define if you have the dgc library (-ldgc).  */
 #undef HAVE_LIBDGC
 
+/* Define if you have the kstat library (-lkstat).  */
+#undef HAVE_LIBKSTAT
+
 /* Define if you have the sun library (-lsun).  */
 #undef HAVE_LIBSUN
index 9a35c1a..c6f6583 100644 (file)
@@ -46,6 +46,7 @@ AC_FUNC_ALLOCA
 AC_FUNC_VFORK
 AC_FUNC_SETVBUF_REVERSED
 AC_FUNC_GETLOADAVG
+AC_CHECK_LIB(kstat, kstat_open)
 AC_FUNC_STRCOLL
 
 # Check out the wait reality.
index be589e7..dba7907 100644 (file)
@@ -541,7 +541,7 @@ getloadavg (loadavg, nelem)
   elem = -1;
 # endif
 
-# if !defined (LDAV_DONE) && defined (SUNOS_5)
+# if !defined (LDAV_DONE) && defined (HAVE_LIBKSTAT)
 /* Use libkstat because we don't have to be root.  */
 #  define LDAV_DONE
   kstat_ctl_t *kc;
@@ -586,7 +586,7 @@ getloadavg (loadavg, nelem)
     }
 
   kstat_close (kc);
-# endif /* SUNOS_5 */
+# endif /* HAVE_LIBKSTAT */
 
 # if !defined (LDAV_DONE) && defined (hpux) && defined (HAVE_PSTAT_GETDYNAMIC)
 /* Use pstat_getdynamic() because we don't have to be root.  */