Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: md5.h



On Friday, February 27, 2004, at 07:39 AM, Kenneth Hill wrote:

Justin,

Forgive my ignorance, but I am confused by your statements regarding the <sys/...> includes. While I agree that there is some stuff in the directory that has no real use outside the kernel -- it seems to me that there are a number of things in there that are needed at a user-level:
<sys/types.h>, <sys/stat.h>, <sys/select.h>, etc...

You are correct.

am I misinterpreting your statement or have I been using the wrong includes? It never occurred to me that I should avoid including things in the <sys/...> directory (other than the fact that headers the are ifndef'd out by KERNAL aren't really useful...)-- can you offer any more clarity on this?

There is no clear-cut statement to be made here (other than that "KERNEL" is not spelled with an "A"). Some header files are needed by user-mode code (stat.h, ...) and some should never be included unless you are a Trained Professional, on a Closed Track. One way to determine whether you should be including a <sys/> or <net*/> header is to check man pages. Of course that rule of thumb is oft-times negated by the fact that the man pages are missing or wrong.

Hope that muddies the water for you :-}

Cheers,

Justin

--
/~\ The ASCII Justin C. Walker, Curmudgeon-at-Large
\ / Ribbon Campaign
X Help cure HTML Email
/ \
_______________________________________________
darwin-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-development
Do not post admin requests to the list. They will be ignored.


References: 
 >Re: md5.h (From: Kenneth Hill <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.