ca049d3
ca049d3
The AUTOLOAD function in Newt.pm looks at strerror(errno) to see
ca049d3
whether the constant() function (in Newt.xs) has returned EINVAL.
ca049d3
ca049d3
strerror(errno) is returned in the locale's language, so won't
ca049d3
always match /Invalid/.  constant() should never fail with
ca049d3
EINVAL anyway, so just ignore this case.
ca049d3
ca049d3
--- Newt-1.08/Newt.pm.lang	2003-07-31 12:01:52.000000000 +0100
ca049d3
+++ Newt-1.08/Newt.pm	2003-07-31 12:02:26.000000000 +0100
ca049d3
@@ -220,13 +220,8 @@
ca049d3
   croak "& not defined" if $constname eq 'constant';
ca049d3
   my $val = constant($constname, @_ ? $_[0] : 0);
ca049d3
   if ($! != 0) {
ca049d3
-    if ($! =~ /Invalid/) {
ca049d3
       $AutoLoader::AUTOLOAD = $AUTOLOAD;
ca049d3
       goto &AutoLoader::AUTOLOAD;
ca049d3
-    }
ca049d3
-    else {
ca049d3
-      croak "Your vendor has not defined Newt macro $constname";
ca049d3
-    }
ca049d3
   }
ca049d3
   *$AUTOLOAD = sub { $val };
ca049d3
   goto &$AUTOLOAD;