pike/src/gc.c:73: conflicting types for `my_log2'
Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=1879
Reported by Fredrik Noring, Roxen Internet Software noring@roxen.com
This change in Pike/7.0/src/block_alloc.h 2001-07-04:
$ cvs di -r 1.19 -r 1.20 src/block_alloc.h | grep my_log2
< extern int my_log2(unsigned INT32 x);
> extern int my_log2(size_t x);
gives the compilation error below because my_log2 is declared as int my_log2(unsigned INT32 x) is stuff.[ch].
make[1]: Entering directory
`/home/distmaker/Distmaker/2.1/build/pike.du4.0/build'
Compiling /home/distmaker/Distmaker/2.1/build/pike.du4.0/pike/src/gc.c
/home/distmaker/Distmaker/2.1/build/pike.du4.0/pike/src/gc.c: In function
`init_marker_hash':
/home/distmaker/Distmaker/2.1/build/pike.du4.0/pike/src/gc.c:73:
conflicting types for `my_log2'
/home/distmaker/Distmaker/2.1/build/pike.du4.0/pike/src/stuff.h:16:
previous declaration of `my_log2'
/home/distmaker/Distmaker/2.1/build/pike.du4.0/pike/src/gc.c:73: warning:
extern declaration of `my_log2' doesn't match global one
WARNING: Compiler failure! Trying without optimization!
echo /home/distmaker/Distmaker/2.1/build/pike.du4.0/build/smartlink gcc -I.
-I/home/distmaker/Distmaker/2.1/build/pike.du4.0/pike/src -DORACLE_DEBUG
-I/home/distmaker/Distmaker/2.1/link/du4.0/include
-I/home/distmaker/Distmaker/2.1/build/pike.du4.0/pike/src
-I/home/distmaker/Distmaker/2.1/build/pike.du4.0/build -mieee
-DORACLE_DEBUG -I/home/distmaker/Distmaker/2.1/link/du4.0/include
-I/home/distmaker/Distmaker/2.1/build/pike.du4.0/pike/src
-I/home/distmaker/Distmaker/2.1/build/pike.du4.0/build -W -Wall
-Wpointer-arith -Wno-unused -c
/home/distmaker/Distmaker/2.1/build/pike.du4.0/pike/src/gc.c -o gc.o
/home/distmaker/Distmaker/2.1/build/pike.du4.0/pike/src/gc.c: In function
`init_marker_hash':
/home/distmaker/Distmaker/2.1/build/pike.du4.0/pike/src/gc.c:73:
conflicting types for `my_log2'
/home/distmaker/Distmaker/2.1/build/pike.du4.0/pike/src/stuff.h:16:
previous declaration of `my_log2'
/home/distmaker/Distmaker/2.1/build/pike.du4.0/pike/src/gc.c:73: warning:
extern declaration of `my_log2' doesn't match global one
make[1]: *** [gc.o] Error 1
make[1]: Leaving directory
`/home/distmaker/Distmaker/2.1/build/pike.du4.0/build'
make: *** [all] Error 2