diff options
author | (no author) <(no author)@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-08-16 07:35:43 +0000 |
---|---|---|
committer | (no author) <(no author)@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-08-16 07:35:43 +0000 |
commit | 5b7bb1f44ef43c86aa33008707fb558e3a7160f9 (patch) | |
tree | 55a20371567a52af42cfce67f9e2e154de9d2510 /ext | |
parent | bcbad0db92a939d0daa6fc078c53d41961d7bf14 (diff) |
This commit was manufactured by cvs2svn to create branch 'ruby_1_6'.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1693 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r-- | ext/digest/defs.h | 34 | ||||
-rw-r--r-- | ext/digest/md5/extconf.rb | 19 | ||||
-rw-r--r-- | ext/digest/rmd160/extconf.rb | 20 | ||||
-rw-r--r-- | ext/digest/sha1/extconf.rb | 20 | ||||
-rw-r--r-- | ext/digest/sha2/extconf.rb | 34 |
5 files changed, 127 insertions, 0 deletions
diff --git a/ext/digest/defs.h b/ext/digest/defs.h new file mode 100644 index 0000000000..7af8f52324 --- /dev/null +++ b/ext/digest/defs.h @@ -0,0 +1,34 @@ +/* -*- C -*- + * $Id$ + */ + +#ifndef DEFS_H +#define DEFS_H + +#include "ruby.h" +#include <sys/types.h> + +#if defined(HAVE_SYS_CDEFS_H) +# include <sys/cdefs.h> +#else +# define __BEGIN_DECLS +# define __END_DECLS +#endif + +#if defined(HAVE_INTTYPES_H) +# include <inttypes.h> +#else + typedef unsigned char uint8_t; + typedef unsigned int uint32_t; +# if SIZEOF_LONG == 8 + typedef unsigned long uint64_t; +# elif defined(__GNUC__) + typedef unsigned long long uint64_t; +# elif defined(_MSC_VER) + typedef unsigned _int64 uint64_t; +# else +# define NO_UINT64_T +# endif +#endif + +#endif /* DEFS_H */ diff --git a/ext/digest/md5/extconf.rb b/ext/digest/md5/extconf.rb new file mode 100644 index 0000000000..93a14025d0 --- /dev/null +++ b/ext/digest/md5/extconf.rb @@ -0,0 +1,19 @@ +# $RoughId: extconf.rb,v 1.3 2001/08/14 19:54:51 knu Exp $ +# $Id$ + +require "mkmf" + +$CFLAGS << " -DHAVE_CONFIG_H -I#{File.dirname(__FILE__)}/.." + +$objs = [ + "md5.#{$OBJEXT}", + "md5init.#{$OBJEXT}", +] + +have_header("sys/cdefs.h") + +have_header("inttypes.h") + +have_header("unistd.h") + +create_makefile("digest/md5") diff --git a/ext/digest/rmd160/extconf.rb b/ext/digest/rmd160/extconf.rb new file mode 100644 index 0000000000..ce53c77b55 --- /dev/null +++ b/ext/digest/rmd160/extconf.rb @@ -0,0 +1,20 @@ +# $RoughId: extconf.rb,v 1.3 2001/08/14 19:54:51 knu Exp $ +# $Id$ + +require "mkmf" + +$CFLAGS << " -DHAVE_CONFIG_H -I#{File.dirname(__FILE__)}/.." + +$objs = [ + "rmd160.#{$OBJEXT}", + "rmd160hl.#{$OBJEXT}", + "rmd160init.#{$OBJEXT}", +] + +have_header("sys/cdefs.h") + +have_header("inttypes.h") + +have_header("unistd.h") + +create_makefile("digest/rmd160") diff --git a/ext/digest/sha1/extconf.rb b/ext/digest/sha1/extconf.rb new file mode 100644 index 0000000000..45e374e369 --- /dev/null +++ b/ext/digest/sha1/extconf.rb @@ -0,0 +1,20 @@ +# $RoughId: extconf.rb,v 1.3 2001/08/14 19:54:51 knu Exp $ +# $Id$ + +require "mkmf" + +$CFLAGS << " -DHAVE_CONFIG_H -I#{File.dirname(__FILE__)}/.." + +$objs = [ + "sha1.#{$OBJEXT}", + "sha1hl.#{$OBJEXT}", + "sha1init.#{$OBJEXT}", +] + +have_header("sys/cdefs.h") + +have_header("inttypes.h") + +have_header("unistd.h") + +create_makefile("digest/sha1") diff --git a/ext/digest/sha2/extconf.rb b/ext/digest/sha2/extconf.rb new file mode 100644 index 0000000000..f593c79111 --- /dev/null +++ b/ext/digest/sha2/extconf.rb @@ -0,0 +1,34 @@ +# $RoughId: extconf.rb,v 1.4 2001/08/14 19:54:51 knu Exp $ +# $Id$ + +require "mkmf" + +$CFLAGS << " -DHAVE_CONFIG_H -I#{File.dirname(__FILE__)}/.." + +$objs = [ + "sha2.#{$OBJEXT}", + "sha2hl.#{$OBJEXT}", + "sha2init.#{$OBJEXT}", +] + +have_header("sys/cdefs.h") + +have_header("inttypes.h") + +have_header("unistd.h") + +if try_run(<<SRC, $defs.join(' ')) +#include "defs.h" +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." +end |