I have download the source code of gcc, using this command:
svn checkout svn://gcc.gnu.org/svn/gcc/trunk SomeLocalDir
Who can tell me where can I find the implementation of standard library function strncpy()?
Thank you.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
gccdoesn’t actually contain the source ofstrncpy, asgcccontains the compiler code and not the standard library code.You want the source from GNU libc (glibc):
This is a link to the current trunk implementation of
strncpy.cin glibc.http://sourceware.org/git/?p=glibc.git;a=blob;f=string/strncpy.c;h=f6ee27832da95d9da9aef8a6fcf73f53f997c796;hb=HEAD