summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-08-07 11:19:28 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-08-07 11:19:28 +0000
commit6df41fc37a1d34d6f56f0b937d18837d11be0de2 (patch)
treea31c5d0e398f84c1342cf6c702b857a7e01ba18f
parent01efe808b9a1c528a8f589179fe294b78f4e85f6 (diff)
* ext/digest/sha2/sha2.h: include inttypes.h for uint32_h, etc.
* ext/digest/sha2/extconf.rb: check inttypes.h. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@24441 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog6
-rw-r--r--ext/digest/sha2/extconf.rb2
-rw-r--r--ext/digest/sha2/sha2.h4
3 files changed, 12 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 542827027c..89c0367f0f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Fri Aug 7 20:18:21 2009 Tanaka Akira <[email protected]>
+
+ * ext/digest/sha2/sha2.h: include inttypes.h for uint32_h, etc.
+
+ * ext/digest/sha2/extconf.rb: check inttypes.h.
+
Fri Aug 7 02:03:48 2009 Akinori MUSHA <[email protected]>
* ext/digest/sha2/sha2.[ch]: Update to 1.0 RELEASE which fixes an
diff --git a/ext/digest/sha2/extconf.rb b/ext/digest/sha2/extconf.rb
index c15043f113..31c91f2706 100644
--- a/ext/digest/sha2/extconf.rb
+++ b/ext/digest/sha2/extconf.rb
@@ -13,6 +13,8 @@ $objs = [
have_header("sys/cdefs.h")
+have_header("inttypes.h")
+
$preload = %w[digest]
if have_type("uint64_t", "defs.h", $defs.join(' '))
diff --git a/ext/digest/sha2/sha2.h b/ext/digest/sha2/sha2.h
index 3536b31330..87f9674cee 100644
--- a/ext/digest/sha2/sha2.h
+++ b/ext/digest/sha2/sha2.h
@@ -49,6 +49,10 @@ extern "C" {
*/
#include <sys/types.h>
+#ifdef HAVE_INTTYPES_H
+#include <inttypes.h>
+#endif
+
#ifdef RUBY
# ifdef HAVE_PROTOTYPES
# undef NOPROTO