home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / sys / mips / 904 < prev    next >
Encoding:
Text File  |  1992-08-27  |  1.4 KB  |  61 lines

  1. Path: sparky!uunet!dtix!darwin.sura.net!wupost!sdd.hp.com!swrinde!elroy.jpl.nasa.gov!lll-winken!taurus!taygeta.oc.nps.navy.mil!skip
  2. From: skip@taygeta.oc.nps.navy.mil (Skip Carter)
  3. Newsgroups: comp.sys.mips
  4. Subject: where is settimeofday()
  5. Message-ID: <6022@taurus.cs.nps.navy.mil>
  6. Date: 27 Aug 92 21:43:17 GMT
  7. Sender: news@taurus.cs.nps.navy.mil
  8. Reply-To: skip@taygeta.oc.nps.navy.mil (Skip Carter)
  9. Lines: 50
  10.  
  11.  
  12.     I have a program that must be compiled under the sysv systype
  13.     on a MIPS 3230 running RiscOS 4.52.  But the linker can't
  14.     seem to find two BSD functions.
  15.  
  16.     When compiling under systype sysv,  settimeofday() and
  17.     usleep() are not resolved, even when the compiler is told
  18.     to look in the bsd libraries.   Where are these functions ?
  19.  
  20.     My compilation line:
  21.  
  22.     cc -I/usr/include/bsd -systype sysv  stime.c -lbsd
  23.  
  24.     gives,
  25.  
  26.  
  27.     ld:
  28.     Undefined:
  29.     settimeofday
  30.     usleep
  31.  
  32.     but,
  33.  
  34.     cc -systype bsd43 stime.c
  35.  
  36.     compiles OK.
  37.  
  38.  
  39.     This program demonstrates the problem,
  40.  
  41. /* test settimeofday call with different environments */
  42.  
  43. #include <stdio.h>
  44. #include <sys/time.h>
  45.  
  46. void main()
  47. {
  48.     struct timeval tv;
  49.  
  50.        settimeofday(&tv, NULL);
  51.  
  52.        usleep( 40000 );
  53.  
  54. }
  55.  
  56. -- 
  57.  Everett (Skip) Carter             Phone:  408-646-3318 FAX: 408-646-2712
  58.  Naval Postgraduate School         INTERNET: skip@taygeta.oc.nps.navy.mil
  59.  Dept. of Oceanography, Code OC/CR  UUCP:     ...!uunet!taygeta!skip
  60.  Monterey, CA. 93943               TELEMAIL: s.carter/omnet
  61.