home *** CD-ROM | disk | FTP | other *** search
/ ftp.cse.unsw.edu.au / 2014.06.ftp.cse.unsw.edu.au.tar / ftp.cse.unsw.edu.au / pub / doc / papers / misc / cs.toronto.edu:programming / portability < prev    next >
Encoding:
Internet Message Format  |  1992-10-18  |  1.8 KB

  1. Path: news-server.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!auspex!guy
  2. From: guy@auspex.auspex.com (Guy Harris)
  3. Newsgroups: comp.sources.d
  4. Subject: Re: Problems with auth2.1 on Sys5r3.2+bsd extensions (m88k)
  5. Keywords: flock and libraries
  6. Message-ID: <3339@auspex.auspex.com>
  7. Date: 12 May 90 18:48:52 GMT
  8. References: <1990May12.051930.8990@wolves.uucp> <28075:May1213:35:1390@stealth.acf.nyu.edu>
  9. Organization: Auspex Systems, Santa Clara
  10. Lines: 31
  11.  
  12. >> has
  13. >> several instances of the bsd/sun specific flock(2) system call!
  14. >
  15. >Why are you so surprised? Sockets aren't available anywhere other than
  16. >BSD in the first place;
  17.  
  18. Well, that's an overstatement - and a relevant one in this context. 
  19. Various S5 systems that lack "flock()" do have sockets emulation
  20. libraries that do the job with what I suspect are varying degrees of
  21. success; S5R4's may be more successful than others.  (The "BSD/XENIX(R)
  22. Compatibility Guide" in the AT&T Five-Foot Shelf of Classics - a/k/a the
  23. S5R4 documentation - doesn't mention "flock()".)
  24.  
  25. Those S5 systems should, in general, have "fcntl()"-based locking,
  26. however.
  27.  
  28. Rules for authors: if you think you've run into all the possible UNIX
  29. system variants, think again - you almost certainly haven't.  (I've
  30. probably run into, in some context, more than most, and I still get
  31. surprised on occasion.)  Be prepared to get requests for changes to
  32. improve your code's portability, hopefully along with the changes to be
  33. made.
  34.  
  35. Rules for people who pick up code: if you think the author has run into
  36. all the possible UNIX system variants, or even has them handy on which
  37. to develop code, think again - they almost certainly haven't.  Be
  38. prepared to have to do some work to get the code running on your system,
  39. and be prepared to feed the changes back to the author.
  40.  
  41. With any luck, over time some of the less useful variation will
  42. disappear.
  43.