- png_structp png_read_ptr =
- png_create_read_struct(PNG_LIBPNG_VER_STRING,
- (png_voidp)NULL,
- /* we would need to point to error handlers
- here to do it properly */
- (png_error_ptr)NULL, (png_error_ptr)NULL);
-
- png_infop info_ptr = png_create_info_struct(png_read_ptr);
-
- (*width)=0;
- (*height)=0;
-
- if (setjmp(png_read_ptr->jmpbuf)){
+ png_structp png_read_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING,
+ (png_voidp) NULL,
+ /* we would need to point to error handlers
+ here to do it properly */
+ (png_error_ptr) NULL,
+ (png_error_ptr) NULL);
+
+ png_infop info_ptr = png_create_info_struct(png_read_ptr);
+
+ (*width) = 0;
+ (*height) = 0;
+
+/* this is to make compile on aix work since they seem to define jmpbuf
+ to be _jmpbuf which breaks compilation */
+
+#ifdef jmpbuf
+#undef jmpbuf
+#endif
+
+#ifndef png_jmpbuf
+# define png_jmpbuf(png_ptr) ((png_ptr)->jmpbuf)
+#endif
+
+ if (setjmp(png_jmpbuf(png_read_ptr))){