2

Possible Duplicate:
Why is getcwd() not ISO C++ compliant?

After searching for availability of execvp on Windows, particularly with VisualStudio, I've ended up with http://msdn.microsoft.com/en-us/library/ms235414.aspx ...

However, it says I should use _execvp instead of execvp. GCC also seems to support _execvp. But what's the deal with the underscore? why is using _execvp more ISO C++ conformant than using execvp?

Also, wouldn't the term deprecated imply that execvp would be removed with some undefined VisualStudio version?

Community
  • 1
  • 1
  • 3
    Duplicate: http://stackoverflow.com/questions/647704/why-is-getcwd-not-iso-c-compliant. Basically, names that begin with an underscore in the global namespace [are reserved](http://stackoverflow.com/questions/228783/what-are-the-rules-about-using-an-underscore-in-a-c-identifier) for implementations, so they should use that. – GManNickG Oct 17 '10 at 20:45
  • And yes, that means it can go away at any release. – GManNickG Oct 17 '10 at 21:06
  • @GMan: noted... it's a little odd though. :-) –  Oct 17 '10 at 21:27
  • If you want to use a POSIX name, just include a POSIX header. `` is not part of the C standard library, so once you include it, you're writing a standard POSIX program, not a standard C program. Likewise, this isn't something that GCC does or doesn't support, it's an operating system issue. Mac OS X uses GCC but does not define `_execvp`. – Potatoswatter Oct 18 '10 at 01:03

0 Answers0