home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / sys / hp / 14411 < prev    next >
Encoding:
Internet Message Format  |  1992-12-29  |  1.0 KB

  1. Path: sparky!uunet!dtix!darwin.sura.net!spool.mu.edu!sdd.hp.com!hpscit.sc.hp.com!hplextra!hpfcso!stroyan
  2. From: stroyan@hpfcso.FC.HP.COM (Mike Stroyan)
  3. Newsgroups: comp.sys.hp
  4. Subject: Re: Compiling a short C program with "cc - Aa"
  5. Message-ID: <7371509@hpfcso.FC.HP.COM>
  6. Date: 29 Dec 92 19:56:44 GMT
  7. References: <b2X=m-@engin.umich.edu>
  8. Organization: Hewlett-Packard, Fort Collins, CO, USA
  9. Lines: 15
  10.  
  11. In comp.sys.hp, dtk@atl.hp.com (Dara T. Khani) writes:
  12.  
  13. > One step forward, one step back :(
  14. > The routine getrusage is not provided in HP-UX.  You can either write 
  15. > your own routine or use ifdef to isolate the call and use alternate calls.
  16. > An HP-UX routine similar to getrusage is times(2).
  17.  
  18. Of course, the code already has a "times" based implemenatation inside the
  19. "#ifdef hpux" test.  As the original poster noted-
  20. > > The symbol "hpux" isn't defined if I use "cc -Aa".
  21.  
  22. Instead, use the symbol "__hpux".  The ANSI C standard doesn't allow predefined
  23. cpp symbols without the leading underscores.
  24.  
  25. Mike Stroyan, mike_stroyan@fc.hp.com
  26.