[mod_python] make failed on AIX 5.1 using xlc

Hans-Joachim Ehlers HansJoachim.Ehlers at eumetsat.int
Thu Jan 12 04:36:06 EST 2006


>>>> "Graham Dumpleton" <grahamd at dscpl.com.au> 11/01/06 23:49 >>>
>Hans-Joachim Ehlers wrote ..
>> 
>> Graham Dumpleton" <grahamd at dscpl.com.au> 10/01/06 22:54  wrote
>> >Similar situation for the function cast you had to change in
>> requestobject.c.
>> >It just becomes to much of a pain to try and deal with the
strangeness
>> of
>> >lessor used compilers.
>> I made which the gcc (3.2.2) a syntax check against the patched
file
>> and it does not complains. 
>> So it would be nice and if the change will not cause trouble to have
in
>> the source code. Otherwise at the next revision me and other will
run in
>> the same or similar issue

>If you put the code back to how it was originally, ie., no hack for
the
>function cast, does GNU C compile it then?

Without any problem. The gnu compiler compiles also the patched
version

>The problem is that the code as originally written is syntactically
>correct and is what it should be. It is a problem with the compiler
>or platform that is the real problem. It is not a good idea to
introduce
>such a hack, which technically is wrong and may then cause another
>compiler or platform to fail. In other words, it may fix your
particular
>problem, but may in turn cause problems for a lot of others if the
>change were made.

I disagree at this point:
A syntax check with the gcc compiler shows for the requestobject.c

gcc -fsyntax-only -pedantic  -I/usr/local/apache2/include 
-I/usr/local/apache2/include   -I/usr/local/apache2/include 
-I$HOME/workbench/modpython/mod_python-3.1.4/src/include
-I/usr/local/apache2/include -I/usr/local/include/python2.4 
requestobject.c

requestobject.c: In function `getreq_recmbr_off':
requestobject.c:1121: warning: ISO C90 does not support `long long'
requestobject.c:1122: warning: ISO C90 does not support `long long'
requestobject.c:1122: warning: ISO C90 does not support `long long'
requestobject.c: At top level:
----> requestobject.c:1381: warning: initialization from incompatible
pointer type

Where   line 1381 is exactly:  (destructor)request_dealloc,     /*
tp_free */
If i fix the line to  (void(*)(void*))request_dealloc the GCC will not
t complain anymore.
So from my native view i would say that the original code is not
correct from the syntax view. 

requestobject.c: In function `getreq_recmbr_off':
requestobject.c:1121: warning: ISO C90 does not support `long long'
requestobject.c:1122: warning: ISO C90 does not support `long long'
requestobject.c:1122: warning: ISO C90 does not support `long long'
---->

Hajo



More information about the Mod_python mailing list