diff options
| author | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-08-14 17:04:00 +0000 |
|---|---|---|
| committer | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-08-14 17:04:00 +0000 |
| commit | a7e340fcf937a3c54db2146b4b5bde6204cff461 (patch) | |
| tree | 684e18dff55f47412c7843f4b1a133b018bc0c99 /ext/digest/sha2 | |
| parent | ee71cc0f06b400bf428bee495361070dc80d633f (diff) | |
| download | ruby-a7e340fcf937a3c54db2146b4b5bde6204cff461.tar.gz ruby-a7e340fcf937a3c54db2146b4b5bde6204cff461.tar.xz ruby-a7e340fcf937a3c54db2146b4b5bde6204cff461.zip | |
* ext/digest/defs.h: Define NO_UINT64_T instead of emitting an
error to fail.
* ext/digest/sha2/extconf.rb: Do not exit on error, and utilize
NO_UINT64_T to detect if the system has a 64bit integer type.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@1684 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/digest/sha2')
| -rw-r--r-- | ext/digest/sha2/extconf.rb | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/ext/digest/sha2/extconf.rb b/ext/digest/sha2/extconf.rb index 144f266b2..412b2d430 100644 --- a/ext/digest/sha2/extconf.rb +++ b/ext/digest/sha2/extconf.rb @@ -17,12 +17,18 @@ have_header("inttypes.h") have_header("unistd.h") -unless try_link(<<SRC, $defs.join(' ')) +if try_run(<<SRC, $defs.join(' ')) #include "../defs.h" -main(){} +int main(void) { +#ifdef NO_UINT64_T + return 1; +#else + return 0; +#endif +} SRC +then + create_makefile("digest/sha2") +else puts "** Cannot find a 64bit integer type - skipping the SHA2 module." - exit 1 end - -create_makefile("digest/sha2") |
