On 17 Oct 2004 at 21:05, Frank Heckenbach wrote:
[...]
Looking at crtc.c, I find this: #ifdef __MINGW32__ #undef _NO_OLDNAMES #define _NO_OLDNAMES 1 #endif
Looking at sys/types.h, I find this: #ifndef _NO_OLDNAMES typedef _off_t off_t; #endif
So there seems to a problem here ...
Looks like a bug in the mingw headers. If `ftruncate' in unistd.h uses `off_t', but the other headers don't declare this type (if `_NO_OLDNAMES' is set), there's something wrong.
As a matter of fact, there are several things in sys/types.h that are not declared if _NO_OLDNAMES is set (including dev_t, ssize_t, pid_t, etc.). I guess that one should never set _NO_OLDNAMES :(
BTW, according to the comment in crtc.c, `_NO_OLDNAMES' is defined in order to prevent stdlib.h from declaring a `beep' function which would conflict with PDCurses' one. Since `beep' belongs to the curses standard, it would be a bug for stdlib.h to define its own version. If this bug is fixed by now, we could remove `_NO_OLDNAMES'. This would avoid the first bug, though not really solve it.
stdlib.h no longer has 'beep' (but it has '_beep')
You might report this to the mingw maintainers.
Hmmm ....
BTW, AFAIK, there weren't any related changes in GPC or CRT recently, so I suppose something was changed in the mingw headers.
Yes, that is correct. The mingw headers have changed a lot (doesn't seem to affect C programs negatively, though, and gcc/gpc compile without a problem).
Best regards, The Chief -------- Prof. Abimbola A. Olowofoyeku (The African Chief) web: http://www.greatchief.plus.com/