[Image-SIG] PIL 1.0b1 bug report

Piers Lauder piers@cs.su.oz.au
Sat, 17 Apr 1999 13:30:04 +1000


I had to add the following code just before the last #include in each of Jpeg{En|De}code.c
	#undef METHODDEF
	#define METHODDEF(A) static A
	#undef GLOBAL
	#define GLOBAL(A) A

Without that, the macros produced code of the form
	static (void) XXX

and I got these errors:
	JpegEncode.c:40: parse error before `void'
	JpegEncode.c:46: parse error before `boolean'
	JpegEncode.c:68: parse error before `void'
	JpegEncode.c:72: `cinfo' undeclared here (not in a function)
	JpegEncode.c:72: warning: data definition has no type or storage class
	JpegEncode.c:73: parse error before `->'
	JpegEncode.c:74: parse error before `->'
	JpegEncode.c:74: conflicting types for `longjmp'
	/usr/include/setjmp.h:63: previous declaration of `longjmp'
	JpegEncode.c:74: warning: data definition has no type or storage class
	JpegEncode.c: In function `ImagingJpegEncode':
	JpegEncode.c:99: warning: assignment makes pointer from integer without a cast
	make: *** [JpegEncode.o] Error 1

System details:
	# s libImaging ; gcc -v
	Reading specs from /gnu/usr/lib/gcc-lib/sparc-sun-solaris2.6/2.8.1/specs
	gcc version 2.8.1
	# s libImaging ; uname -a
	SunOS staff 5.6 Generic_105181-05 sun4u sparc SUNW,Ultra-2