[cig-commits] commit: including png.h before StGermain.h because both header files will include setjmp.h and png.h will complain and not compile if setjmp.h has already been included.

Mercurial hg at geodynamics.org
Mon Nov 24 11:28:50 PST 2008


changeset:   12:e390b30a66d8
user:        RobertTurnbull
date:        Fri Jun 01 02:29:32 2007 +0000
files:       OutputFormats/src/OutputPNG.c
description:
including png.h before StGermain.h because both header files will include setjmp.h and png.h will complain and not compile if setjmp.h has already been included.
Notes:
	This is definitely a problem with libpng-1.2.16 and libpng-1.2.5, I'm guessing other versions of libpng as well.
	setjmp is included in ./StGermain/Base/Foundation/src/debug.h from revision 4083 onwards (added April 30 this year)

Has anyone else had this problem?


diff -r 6cd1790e9db3 -r e390b30a66d8 OutputFormats/src/OutputPNG.c
--- a/OutputFormats/src/OutputPNG.c	Fri Jun 01 01:17:56 2007 +0000
+++ b/OutputFormats/src/OutputPNG.c	Fri Jun 01 02:29:32 2007 +0000
@@ -39,12 +39,13 @@
 *+		Patrick Sunter
 *+		Greg Watson
 *+
-** $Id: OutputPNG.c 628 2006-10-12 08:23:07Z SteveQuenette $
+** $Id: OutputPNG.c 697 2007-06-01 02:29:32Z RobertTurnbull $
 ** 
 **~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
 #ifdef HAVE_PNG
 
 #include <mpi.h>
+#include <png.h>
 #include <StGermain/StGermain.h>
 
 #include <glucifer/Base/Base.h>
@@ -55,8 +56,6 @@
 #include <assert.h>
 #include <string.h>
 
-#include <png.h>
-#include <setjmp.h>
 
 /* Textual name of this class - This is a global pointer which is used for times when you need to refer to class and not a particular instance of a class */
 const Type lucOutputPNG_Type = "lucOutputPNG";



More information about the CIG-COMMITS mailing list