automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Latest getloadavg.c?


From: Paul D. Smith
Subject: Latest getloadavg.c?
Date: 08 May 2002 13:24:43 -0400
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Anyone know who is the keeper of the most official GNU getloadavg.c?

The one in GNU make, at least, has some serious problems.  For example:

    ...
  #  ifdef SVR4
  #   define LOAD_AVE_TYPE long
  #  endif
    ...
  #  ifdef SVR4
  #   define NLIST_STRUCT
  #  endif

Uh oh... and sure enough:

    ...
  LOAD_AVE_TYPE load_ave[3];
    ...
  #   ifndef NLIST_STRUCT
    ...
  #   else /* NLIST_STRUCT */
  #    ifdef NLIST_NAME_UNION
        nl[0].n_un.n_name = LDAV_SYMBOL;
        nl[1].n_un.n_name = 0;
  #    else /* not NLIST_NAME_UNION */
        nl[0].n_name = LDAV_SYMBOL;
        nl[1].n_name = 0;
  #    endif /* not NLIST_NAME_UNION */
  #   endif /* NLIST_STRUCT */
    ...

And the compiler doesn't like that, obviously:

  ../getloadavg.c: In function `getloadavg':
  ../getloadavg.c:930: incompatible types in assignment
  ../getloadavg.c:931: incompatible types in assignment

:(

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <address@hidden>          Find some GNU make tips at:
 http://www.gnu.org                      http://www.paulandlesley.org/gmake/
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist



reply via email to

[Prev in Thread] Current Thread [Next in Thread]