avoid warning about gccversion being non-numeric
authorTony Cook <tony@develop-help.com>
Mon, 8 Aug 2011 12:21:28 +0000 (22:21 +1000)
committerTony Cook <tony@develop-help.com>
Mon, 8 Aug 2011 12:21:28 +0000 (22:21 +1000)
Makefile.PL

index 5bdd682..bf712f0 100644 (file)
@@ -734,7 +734,7 @@ EOS
     }
     print CONFIG "#define $define->[0] $define->[1]\n";
   }
-  if ($Config{gccversion} && $Config{gccversion} > 3) {
+  if ($Config{gccversion} && $Config{gccversion} =~ /^([0-9]+)/ && $1 > 3) {
     print CONFIG <<EOS;
 /*
 
@@ -743,6 +743,7 @@ Compiler supports the GCC __attribute__((format...)) syntax.
 */
 
 #define IMAGER_FORMAT_ATTR 1
+
 EOS
   }