summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-08-11 15:07:06 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-08-11 15:07:06 +0000
commit2791740667474098bc4c0c87d3dcdf1da81a60fe (patch)
treeeb9499ce04313fc6cfa0f33d225f7b318c8650fc /ext
parent6c54c1f8de83e147de7e3208be3fdbb3e96cfbd3 (diff)
* ext/digest/sha2/sha2.h: need to include defs.h instead of inttypes.h
because VC6 doesn't have the latter. * ext/digest/sha2/extconf.rb: rollback r24441. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@24503 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/digest/sha2/extconf.rb2
-rw-r--r--ext/digest/sha2/sha2.h13
2 files changed, 4 insertions, 11 deletions
diff --git a/ext/digest/sha2/extconf.rb b/ext/digest/sha2/extconf.rb
index 31c91f2706..c15043f113 100644
--- a/ext/digest/sha2/extconf.rb
+++ b/ext/digest/sha2/extconf.rb
@@ -13,8 +13,6 @@ $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 87f9674cee..88c5249639 100644
--- a/ext/digest/sha2/sha2.h
+++ b/ext/digest/sha2/sha2.h
@@ -49,11 +49,8 @@ extern "C" {
*/
#include <sys/types.h>
-#ifdef HAVE_INTTYPES_H
-#include <inttypes.h>
-#endif
-
#ifdef RUBY
+# include "defs.h"
# ifdef HAVE_PROTOTYPES
# undef NOPROTO
# else
@@ -70,11 +67,9 @@ extern "C" {
# endif /* BYTE_ORDER */
# define SHA2_USE_INTTYPES_H
#else /* RUBY */
-#ifdef SHA2_USE_INTTYPES_H
-
-#include <inttypes.h>
-
-#endif /* SHA2_USE_INTTYPES_H */
+# ifdef SHA2_USE_INTTYPES_H
+# include <inttypes.h>
+# endif /* SHA2_USE_INTTYPES_H */
#endif /* RUBY */