Popen implicitly declared even though #include is added?

As the man page says: Feature Test Macro Requirements for glibc (see feature_test_macros(7)): popen(), pclose(): _POSIX_C_SOURCE >= 2 || _XOPEN_SOURCE || _BSD_SOURCE || _SVID_SOURCE So you should #define _BSD_SOURCE or one of the others before #includeing stdio.h.

Let me try it out. This is interesting because I have used pipe in the past (almost with the exact same code) and it worked. Any reason why?

– Chris Allen Mar 29 at 5:56 Hmm, it seemed to calm down half of the popen and pclose complaints. Thanks for your help though. – Chris Allen Mar 29 at 6:03 2 You should define _POSIX_C_SOURCE or _XOPEN_SOURCE.

The others are not (current) standards. _SVID_SOURCE may have been a standard at one time but the age of SVID is something like 15 years past... – R.. Mar 29 at 12:16 hmmm, I defined those but I'm still getting errors. – Chris Allen Mar 29 at 17:30.

I put the prototypes of popen and pclose at the top of my code. It seemed to have settled the problem.

3 Do not do that - it is a bad way to fix the problem. Use the standard headers, and get the defines right so that it compiles correctly. And you should probably accept an answer to this question.

– Jonathan Leffler Jun 16 at 22:20.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions