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 Thursday, February 26, 2004, at 07:09 AM, email@hidden wrote:

Justin,

Thanks for responding.

On Feb 25, 2004, at 10:00 PM, email@hidden wrote:
[snip]
You are missing the realization that you should not be using headers
from /usr/include/sys in user-level code (with a few exceptions that
are *very* system-specific). If the identifiers are declared in a
<sys/...> header, they will generally be declared and instantiated in
the kernel, and your code can't user them.

After I posted the above question, I found /usr/include/openssl/md5.h, which -- lo and behold -- did not include the MD5File() prototype. So, I downloaded the text_cmds project from Darwin 7, found how it calculated the MD5 sum for a file, and followed its' example. My question now is simply: Why is /usr/include/sys/md5.h even there? No lib on my 10.3.2 box exports the MD5File() function, and from your response, I shouldn't even be using this include file.

The answer is simply that code within the kernel needs it.

You should definitely not include code from the <sys/> directory unless you *know* you need it, and that will rarely happen.

Regards,

Justin

--
Justin C. Walker, Curmudgeon-At-Large *
Institute for General Semantics | If you're not confused,
| You're not paying attention
*--------------------------------------*-------------------------------*
_______________________________________________
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: 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.