home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / unix / sys5 / r4 / 846 < prev    next >
Encoding:
Internet Message Format  |  1992-12-16  |  2.0 KB

  1. Path: sparky!uunet!mcsun!sun4nl!tuegate.tue.nl!viper!raymond
  2. From: raymond@es.ele.tue.nl (Raymond Nijssen)
  3. Newsgroups: comp.unix.sys5.r4
  4. Subject: Re: Problems with "dirent"
  5. Message-ID: <RAYMOND.92Dec16131013@cobra.es.ele.tue.nl>
  6. Date: 16 Dec 92 12:10:13 GMT
  7. References: <1992Dec13.193122.22173@osnbe.Olivetti.ch>
  8.     <1992Dec15.094802.3334@dcs.qmw.ac.uk>
  9. Sender: root@tuegate.tue.nl
  10. Organization: Eindhoven University of Technology, Eindhoven, The Netherlands
  11. Lines: 29
  12. In-reply-to: R.S.Jones@qmw.ac.uk's message of 15 Dec 92 09:48:02 GMT
  13.  
  14. In article <1992Dec15.094802.3334@dcs.qmw.ac.uk> R.S.Jones@qmw.ac.uk (Robert S. Jones) writes:
  15.  
  16. >   In article <1992Dec13.193122.22173@osnbe.Olivetti.ch> Richard H. E. Eiger,
  17. >   rheiger@renext.open.ch writes:
  18. >>I can only assume that there has to be something depending on additional  
  19. >>libraries (I have to use -lsocket -lnsl -lucb). Can anyone confirm?
  20.  
  21. >   I think you NEED an explicit -lc *before* the -lucb. There is of course an
  22. >   invisible implicit one after it! :-) On my SVr4 (an ICL DRS6000 running DRS/NX
  23. >   - but what the heck!) leaving this out causes all sorts of weird problems with
  24. >   BSD and AT&T library routines having the same name but slightly different
  25. >   shaped parameters.
  26.  
  27. Compare the definitions of the BSD and SYSV dirent structs, and it'll be
  28. perfectly clear why SYSV and BSD libraries are incompatible. Therefore, these
  29. libraries should never be used together, notwithstanding the observation that
  30. inserting -lc before -lucb usually works.
  31. Lots of other things, notably signals, are affected by this.
  32.  
  33. The best way to avoid these problems is to reconsider if you actually need
  34. libucb. In most cases, a few trivial #define-s (eg. for bcopy, index etc.)
  35. will make -lucb obsolete.
  36.  
  37. -Raymond
  38. --
  39. Raymond Nijssen             | Eindhoven University of Techology
  40.        phone: +31-40-473373 | Department of Electrical Engineering
  41.        fax:   +31-40-464527 | Design Automation Section (ES),  room EH 7.16
  42. "WP is for morons"          | PO. Box 513, 5600 MB Eindhoven, The Netherlands
  43.