• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: String compare
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >String compare (From: "Carl Smith" <email@hidden>)

  • Prev by Date: String compare
  • Next by Date: RE: String compare
  • Previous by thread: String compare
  • Next by thread: RE: String compare
  • Index(es):
    • Date
    • Thread