Skip to content

Commit

Permalink
The test for finding functions (like timegm()) did not really work.
Browse files Browse the repository at this point in the history
Unresolved symbols do not always error at compile time, but they
appear to do so at link time.
  • Loading branch information
schwern committed Feb 16, 2010
1 parent c44c16d commit 28a7e8f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 2 additions & 0 deletions perl/Time-y2038/Changes
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ Next
Build
* Switch dependency on JSON::XS to just JSON to eliminate
Lehmann-ware dependency.
* The test for the limits of the time.h did not work for
finding functions.


20100214.1823_03 Sun Feb 14 18:23:22 PST 2010
Expand Down
12 changes: 9 additions & 3 deletions perl/Time-y2038/inc/Local/Module/Build.pm
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,15 @@ END
print $fh $code;
close $fh;

my $obj = eval { $cb->compile(source => "try.c"); };
$self->notes($test, $obj ? 1 : 0);
unlink $obj if $obj;
my $exe = eval {
# Compile AND link to force undefined symbols to error
my $obj = $cb->compile(source => "try.c");
my $exe = $cb->link_executable(objects => $obj, exe_file => "try");
unlink $obj;
$exe;
};
$self->notes($test, $exe ? 1 : 0);
unlink $exe if $exe;
unlink "try.c";
}
}
Expand Down

0 comments on commit 28a7e8f

Please sign in to comment.