[mod_python] compile mod_python on iSeries (AS/400)

Graham Dumpleton graham.dumpleton at gmail.com
Thu Feb 14 14:56:27 EST 2008


On 15/02/2008, Denes L <denes1951 at yahoo.ca> wrote:
> The suggested change does not work:
>
> strcpy(ci->interpreter, interpreter);
> (__strcpy((ci->interpreter),(interpreter)));
> CZM0280  Function argument assignment between types "unsigned char*" and
> "const unsigned char*" is not allowed.

Just add a cast then:

   ci->interpreter = (char *)malloc(strlen(interpreter)+1));
   strcpy((char *)ci->interpreter, interpreter);

> I also found out that strdup is available in C++, should I be using the C++
> compiler for this?.

No. You'd probably find your C compiler also has it if the appropriate
preprocessor #define was given to have it work to a specific UNIX API
standard.

Graham


More information about the Mod_python mailing list