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