On Mon, Aug 30, 2004 at 07:19:17PM +0200, Sebastian Steinlechner wrote: > > Ok, that helped somewhat. At least I know now it's not the compilers > fault. But then again, why didn't anyone care to mention you need to > #define _XOPEN_SOURCE in ptsname(3)? It's definitely undefined otherwise > and that's what crashes a prerelease version of gftp 2.0.18 on my > machine.
Why don't people look at warnings when they get them? Your piece of code generated 2 warnings (if turned on) when compiled as C because C assumes types when you do not declare a function. In C++ it's even an error to not declare function. When compiling code as C or C++, you're compiling against different standards. Different standards have different functions defined or not. You can change those standards with those defines. I agree that the manual page of ptsname(3) should be more clear about it and I suggest you file a bug for it. Kurt

