]> git.imager.perl.org - imager.git/commitdiff
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 5bdd6824d4a65b640fd5261a8117a054522e1d87..bf712f0397812c79e5f196f9adae248e33044ed0 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
   }