Re: String Functions in Linux Kernel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

#include<string.h> actually refers to /usr/include/string.h present on
the system whereas
#include<linux/string.h> refers to
/usr/src/linux-headers-2.6.35-22-generic/include/linux/string.h if
your linux kernel version is 2.6.535.22 or to corresponding kernel
directory you have targeted the compiler to.

linux/string.h contains functions optimized for kernel but I still
dont understand why does it still include string.h.

On Fri, Sep 23, 2011 at 11:21 AM, Chandrabhanu Mahapatra
<chandrabhanu.anand@xxxxxxxxx> wrote:
> Is it safe to use string.h functions in kernel which are mostly user
> level functions.
> What is the difference when I write
> #include<string.h>
> and
> #include<linux/string.h>
> Where does each of the above point to in the linux kernel directory?
> In Linux-3.0/include/linux/string.h I found an entry for
> #include<string.h>
> What does the above exactly mean?
> Are there string safe function present in linux as like in windows driver model?
> --
> Chandrabhanu Mahapatra

Chandrabhanu Mahapatra
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at

[Site Home]     [Audio]     [Hams]     [Kernel Newbies]     [Memory]     [Security]     [Netfilter]     [Bugtraq]     [Photo]     [Yosemite Photos]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linux Resources]     [Fedora Users]

  Powered by Linux