Where is the implementation of strlen() in GCC?

后端 未结 10 1170
梦毁少年i
梦毁少年i 2021-02-04 01:21

Can anyone point me to the definition of strlen() in GCC? I\'ve been grepping release 4.4.2 for about a half hour now (while Googling like crazy) and I can\'t seem

10条回答
  •  自闭症患者
    2021-02-04 01:53

    You should be looking in glibc, not GCC -- it seems to be defined in strlen.c -- here's a link to strlen.c for glibc version 2.7... And here is a link to the glibc SVN repository online for strlen.c.

    The reason you should be looking at glibc and not gcc is:

    The GNU C library is used as the C library in the GNU system and most systems with the Linux kernel.

提交回复
热议问题