Mail Archives: djgpp/1996/05/14/21:20:43
Reply to message 1460608 from UCKO AT VAX1 DOT ROC on 05/14/96 12:20AM
>>This is very dangerous! Your program is linking in the DJGPP
>>version of mkdir, which expects ( char*, int, int ), and passing it
>>( char * ). Fortunately, this doesn't appear to result in any serious
>>problems in your program, but it is a surefire guarantee of
>>crashes if done too often.
>
>it's (char *, int), not (char *, int, int).
Sorry - I didn't pause to look it up, just quoted him. :)
>Anyway, this is perfectly safe;
>the second argument is meaningless under DOS and hence ignored, and DJGPP
>uses the C calling convention, in which the caller pops arguments, so the
>stack cannot be messed up.
Even so, calling functions w/o prototypes is a very bad way to do
things in general. What if the posix version of mkdir had taken (int, char*)?
*BOOM*
John
- Raw text -