basename()

C

Captain Pugwash

What is the official position on using basename() in STDC99 programs on
Linux?

I find contrary to the man pages, if I use string.h, I still get an
implicit declaration for using basename() in my programs.

Why?
 
J

Joachim Schmitz

Captain said:
What is the official position on using basename() in STDC99 programs
on Linux?

I find contrary to the man pages, if I use string.h, I still get an
implicit declaration for using basename() in my programs.

Why?

basename is not Std C, it is POSIX and declared in libgen.h

Bye, Jojo
 
J

Joachim Schmitz

Joachim said:
basename is not Std C, it is POSIX and declared in libgen.h

Actually as 'man 3 basename' reveales there is also a Gnu version in
string.h, if you #define _GNU_SOURCE

bye, Jojo
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,954
Messages
2,570,114
Members
46,702
Latest member
VernitaGow

Latest Threads

Top