Yitzchak Scott-Thoennes <[EMAIL PROTECTED]> writes: >> >> #ifdef __BORLANDC__ >> return execv(cmdname, (char *const *)argv); >> #else >> return execv(cmdname, argv); >> #endif >> >> Why does gcc complain in the first place, though? I thought that >> passing a non const arg to a function with a const parameter was >> generally not a problem, and indeed, VC++ didn't complain. What is >> gcc's problem? > >There's discussion of this (that I didn't understand, but maybe you >will) in the SUSv3 execv page, under Rationale, that implies that gcc >is technically correct in having a problem. If you have to resort to >ifdef hell, I'd make it check for mingw, not for __BORLANDC__, since >mingw is what's getting the prototype wrong.
mingw and Visual C++ (versions 4 to 6) all agree.