[perl-Glib] Fix compilation against perl 5.8.x



commit 28913a75298bcb5fbbfde6c9f7b1e93233bfb405
Author: Torsten SchÃnfeld <kaffeetisch gmx de>
Date:   Sun Aug 21 15:42:29 2011 +0200

    Fix compilation against perl 5.8.x
    
    The POSIX module included with perl 5.8.x apparently did not setup
    prototypes for the various numerical min/max constants, at least when
    you specified an export list that does not include these constants.  Fix
    by adding parens.

 lib/Glib/GenPod.pm |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/lib/Glib/GenPod.pm b/lib/Glib/GenPod.pm
index 6bf7380..eae20fd 100644
--- a/lib/Glib/GenPod.pm
+++ b/lib/Glib/GenPod.pm
@@ -567,15 +567,15 @@ sub _pspec_formatted_default {
     $default = ord($default) . ' ' . Data::Dumper->new([$default])
       ->Useqq(1)->Terse(1)->Indent(0)->Dump;
 
-  } elsif ($type eq 'Glib::Double' && $default == POSIX::DBL_MAX) {
+  } elsif ($type eq 'Glib::Double' && $default == POSIX::DBL_MAX()) {
     # Show DBL_MAX symbolically.
     # Eg. Gtk2::Range property "fill-level" is DBL_MAX.
     $default = "DBL_MAX";
-  } elsif ($type eq 'Glib::Double' && $default == - POSIX::DBL_MAX) {
+  } elsif ($type eq 'Glib::Double' && $default == - POSIX::DBL_MAX()) {
     $default = "-DBL_MAX";
-  } elsif ($type eq 'Glib::Float' && $default == POSIX::FLT_MAX) {
+  } elsif ($type eq 'Glib::Float' && $default == POSIX::FLT_MAX()) {
     $default = "FLT_MAX";
-  } elsif ($type eq 'Glib::Float' && $default == - POSIX::FLT_MAX) {
+  } elsif ($type eq 'Glib::Float' && $default == - POSIX::FLT_MAX()) {
     $default = "-FLT_MAX";
 
   } elsif ($type eq 'Glib::Double' || $type eq 'Glib::Float') {
@@ -597,13 +597,13 @@ sub _pspec_formatted_default {
       $default = "$default $keyname";
     }
 
-  } elsif ($type eq 'Glib::Int' && $default == POSIX::INT_MAX) {
+  } elsif ($type eq 'Glib::Int' && $default == POSIX::INT_MAX()) {
     # Show INT_MAX symbolically
     # eg. Gtk2::Paned property "max-position" is INT_MAX
     $default = "INT_MAX";
-  } elsif ($type eq 'Glib::Int' && $default == POSIX::INT_MIN) {
+  } elsif ($type eq 'Glib::Int' && $default == POSIX::INT_MIN()) {
     $default = "INT_MAX";
-  } elsif ($type eq 'Glib::UInt' && $default == POSIX::UINT_MAX) {
+  } elsif ($type eq 'Glib::UInt' && $default == POSIX::UINT_MAX()) {
     $default = "UINT_MAX";
 
   } else {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]