mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
This commit is contained in:
parent
bcbad0db92
commit
5b7bb1f44e
5 changed files with 127 additions and 0 deletions
34
ext/digest/defs.h
Normal file
34
ext/digest/defs.h
Normal file
|
@ -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 */
|
19
ext/digest/md5/extconf.rb
Normal file
19
ext/digest/md5/extconf.rb
Normal file
|
@ -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")
|
20
ext/digest/rmd160/extconf.rb
Normal file
20
ext/digest/rmd160/extconf.rb
Normal file
|
@ -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")
|
20
ext/digest/sha1/extconf.rb
Normal file
20
ext/digest/sha1/extconf.rb
Normal file
|
@ -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")
|
34
ext/digest/sha2/extconf.rb
Normal file
34
ext/digest/sha2/extconf.rb
Normal file
|
@ -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
|
Loading…
Add table
Reference in a new issue