changeset 80637:4f977a2686fb

(nl): Rename to name_list to avoid ncurses.h clash (bug#86). (getloadavg): Callers changed.
author Chong Yidong <cyd@stupidchicken.com>
date Fri, 25 Jul 2008 18:06:09 +0000
parents 9033139a9d0c
children 597395dc5dfe
files src/getloadavg.c
diffstat 1 files changed, 14 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/src/getloadavg.c	Fri Jul 25 18:05:40 2008 +0000
+++ b/src/getloadavg.c	Fri Jul 25 18:06:09 2008 +0000
@@ -490,7 +490,7 @@
 static long offset;
 
 #  if !defined(VMS) && !defined(sgi) && !defined(__linux__)
-static struct nlist nl[2];
+static struct nlist name_list[2];
 #  endif /* Not VMS or sgi */
 
 #  ifdef SUNOS_5
@@ -880,32 +880,32 @@
     {
 #  ifndef sgi
 #   ifndef NLIST_STRUCT
-      strcpy (nl[0].n_name, LDAV_SYMBOL);
-      strcpy (nl[1].n_name, "");
+      strcpy (name_list[0].n_name, LDAV_SYMBOL);
+      strcpy (name_list[1].n_name, "");
 #   else /* NLIST_STRUCT */
 #    ifdef HAVE_STRUCT_NLIST_N_UN_N_NAME
-      nl[0].n_un.n_name = LDAV_SYMBOL;
-      nl[1].n_un.n_name = 0;
+      name_list[0].n_un.n_name = LDAV_SYMBOL;
+      name_list[1].n_un.n_name = 0;
 #    else /* not HAVE_STRUCT_NLIST_N_UN_N_NAME */
-      nl[0].n_name = LDAV_SYMBOL;
-      nl[1].n_name = 0;
+      name_list[0].n_name = LDAV_SYMBOL;
+      name_list[1].n_name = 0;
 #    endif /* not HAVE_STRUCT_NLIST_N_UN_N_NAME */
 #   endif /* NLIST_STRUCT */
 
 #   ifndef SUNOS_5
       if (
 #    if !(defined (_AIX) && !defined (ps2))
-	  nlist (KERNEL_FILE, nl)
+	  nlist (KERNEL_FILE, name_list)
 #    else  /* _AIX */
-	  knlist (nl, 1, sizeof (nl[0]))
+	  knlist (name_list, 1, sizeof (name_list[0]))
 #    endif
 	  >= 0)
-	  /* Omit "&& nl[0].n_type != 0 " -- it breaks on Sun386i.  */
+	  /* Omit "&& name_list[0].n_type != 0 " -- it breaks on Sun386i.  */
 	  {
 #    ifdef FIXUP_KERNEL_SYMBOL_ADDR
-	    FIXUP_KERNEL_SYMBOL_ADDR (nl);
+	    FIXUP_KERNEL_SYMBOL_ADDR (name_list);
 #    endif
-	    offset = nl[0].n_value;
+	    offset = name_list[0].n_value;
 	  }
 #   endif /* !SUNOS_5 */
 #  else  /* sgi */
@@ -941,8 +941,8 @@
       if (kd != 0)
 	{
 	  /* nlist the currently running kernel.  */
-	  kvm_nlist (kd, nl);
-	  offset = nl[0].n_value;
+	  kvm_nlist (kd, name_list);
+	  offset = name_list[0].n_value;
 	  getloadavg_initialized = 1;
 	}
 #  endif /* SUNOS_5 */