home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / unix / internal / 2086 < prev    next >
Encoding:
Internet Message Format  |  1992-12-30  |  2.6 KB

  1. Path: sparky!uunet!cs.utexas.edu!swrinde!emory!gwinnett!wafbox!bill
  2. From: bill@wafbox.gwinnett.com (Bill Fulton)
  3. Newsgroups: comp.unix.internals
  4. Subject: Re: SVR4: getminor(D3DK)
  5. Message-ID: <355@wafbox.gwinnett.com>
  6. Date: 30 Dec 92 02:36:53 GMT
  7. References: <1992Dec14.120638.25587@spectrum.xerox.com> <1992Dec16.040749.3041@hawkmoon.mn.org>
  8. Reply-To: bill@wafbox.UUCP (Bill Fulton)
  9. Organization: (Home)
  10. Lines: 47
  11.  
  12. In article <1992Dec16.040749.3041@hawkmoon.mn.org> det@hawkmoon.mn.org (Derek Terveer) writes:
  13. >Thomas Jagodits (jagodits@vega2.wrc.Xerox.COM) wrote:
  14. >: In article <1992Dec14.034005.13663@hawkmoon.mn.org> det@hawkmoon.mn.org (Derek Terveer) writes:
  15. >: >I am having problems with the getminor() call.  I am making some calls
  16. >: >to getminor() in order to extract the minor numbers, according to the
  17. >: >ddi/dki ref manual:
  18. >: >__minor                             sdsg/Driver.o
  19. >: >__major                             sdsg/Driver.o
  20. >: >__makedev                           sdsg/Driver.o
  21. >:
  22. >:  Did you miss to include <sys/sysmacros.h> ?
  23. >:  All the listed undefined are there.
  24. >
  25. >I did have <sys/sysmacros.h> included and I still got those undefined
  26. >externs.  Then, while looking through the <sys/ddi.h> file I came upon
  27. >the following section:
  28. >/* The following declarations take the place of macros in
  29. > * sysmacros.h The undefs are for any case where a driver includes
  30. > * sysmacros.h, even though DDI conforming drivers must not.
  31.   ...
  32. >This led me to believe that I should not include sysmacros.h.  Is this
  33. >an incorrect assumption?
  34.  
  35. From "Writing a Unix Device Driver" (2nd Edition):
  36.     "If you are using System V Release 4.0 and want to be compatible with the
  37.     DDI and the DKI, ddi.h must be included *last*. ddi.h will undefine
  38.     several macros that may be declared in /usr/include/sys/sysmacros.h and
  39.     replace these with function calls."
  40.  
  41. This still doesn't answer your main question, but seemed relevant (and worth
  42. broadcasting).
  43.  
  44. By the way, the new second edition of this book is very well worth getting
  45. (especially now that it's in paperback). It's a damned shame that the authors
  46. can't explain their topics more clearly and that they are not more organized,
  47. but there is, at the very least, a wealth of tidbits, such as the above,
  48. throughout the book. Also, there are several tables comparing SysV3, SysV4,
  49. and BSD Unix device driver details. Info is:
  50.  
  51.     by Egan & Teixeira
  52.     Publisher: Wiley
  53.     ISBN: O-471-53575-3
  54.  
  55. -- 
  56. Bill Fulton            (Home Alone) |    Grab .. 
  57.     bill@wafbox.gwinnett.com        |            The ..
  58. OR  ..!gatech!dcatla!wafbox!bill    |                   Reins
  59.