Re: String compare
Re: String compare
- Subject: Re: String compare
- From: Shawn Erickson <email@hidden>
- Date: Fri, 8 Apr 2005 11:33:07 -0700
On Apr 8, 2005, at 11:16 AM, Carl Smith wrote:
Is there any kernel level functions equivalent to memcmp or strcmp, to compare two strings?
Of course this question is right up there with is there a malloc in the kernel when in fact there is only it’s defined _MALLOC.
[G5:~] shawnce% grep -r memcmp /System/Library/Frameworks/Kernel.framework/Headers
/System/Library/Frameworks/Kernel.framework/Headers/IOKit/system.h:extern int memcmp(const void *, const void *, size_t);
...
[G5:~] shawnce% grep -r strcmp /System/Library/Frameworks/Kernel.framework/Versions/A/Headers
...
/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/string.h:extern int strcmp(const char *, const char *);
[G5:~] shawnce% grep -r malloc /System/Library/Frameworks/Kernel.framework/Versions/A/Headers
...
/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/libsa/stdlib.h:__private_extern__ void * malloc(size_t size);
...
Of course what you should be using etc depends on what you are doing in the kernel. If this an IOKit driver, etc.?
-Shawn
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden