• 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: "Carl Smith" <email@hidden>
  • Date: Fri, 8 Apr 2005 14:44:17 -0400
  • Thread-topic: String compare

Thanks for the reply Shawn, actually I am not using an IOKit, it is a NKE, and if I use anything that is not in the sys/ directory my kernel crashes. Like trying to use memcmp. The same goes for malloc. But if I use _MALLOC, which is defined in sys/malloc.h I am fine, so I was looking for something along the same line in the sys/ folders but could not fine anything. Just thought maybe some of the Apple guys knew of something off the top of there heads.

 

Carl

 

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

  • Follow-Ups:
    • RE: String compare
      • From: Quinn <email@hidden>
  • Prev by Date: Re: String compare
  • Next by Date: how to tell which symbols are exported?
  • Previous by thread: Re: String compare
  • Next by thread: RE: String compare
  • Index(es):
    • Date
    • Thread