--Multipart_Sat_Jul__7_10:49:38_2001-1
Content-Type: text/plain; charset=ISO-2022-JP

At Sat, 07 Jul 2001 09:45:05 +0900,
立石 wrote:
> > > 改良後のパッチなど詳しくは後日報告します.
> >  よろしくお願いします。
> 
> こっちはもう少しお待ち下さい.:)

make, test.rb が通るようにはしてみました.方法として,
defs.hという新しいファイルを導入しました.

#include <sys/cdefs.h>

の代わりに,

#include "defs.h"

を行ないます.extconf.rbでは sys/cdefs.h の検査と,Solaris
にある sys/int_types.h, sys/types32.h の検査を行ないます.
Solarisでは uint32_t のように定義されているようなので,これ
を typedef によって u_int32_t などに置き換えました.
以下に 'cvs diff' と 'defs.h' を添付します.


--Multipart_Sat_Jul__7_10:49:38_2001-1
Content-Type: application/octet-stream
Content-Disposition: attachment; filename="patch"
Content-Transfer-Encoding: 7bit

Index: extconf.rb
RCS file: /src/rough/ext/digest/extconf.rb,v
retrieving revision 1.2
diff -u -r1.2 extconf.rb
--- extconf.rb	2001/07/06 18:12:31	1.2
+++ extconf.rb	2001/07/07 01:38:55
@@ -15,4 +15,7 @@
   "rmd160hl.#{$OBJEXT}"
 ]
 
+have_header("sys/cdefs.h")
+have_header("sys/types32.h")   # for Solaris8
+have_header("sys/int_types.h") # for Solaris7
 create_makefile("digest")
Index: md5.h
RCS file: /src/rough/ext/digest/md5.h,v
retrieving revision 1.2
diff -u -r1.2 md5.h
--- md5.h	2001/07/06 18:12:31	1.2
+++ md5.h	2001/07/07 01:38:55
@@ -44,7 +44,7 @@
 #ifndef MD5_INCLUDED
 #  define MD5_INCLUDED
 
-#include <sys/cdefs.h>
+#include "defs.h"
 #include <sys/types.h>
 #include "ruby.h"
 
Index: rmd160.c
RCS file: /src/rough/ext/digest/rmd160.c,v
retrieving revision 1.2
diff -u -r1.2 rmd160.c
--- rmd160.c	2001/07/06 18:12:31	1.2
+++ rmd160.c	2001/07/07 01:38:55
@@ -18,7 +18,7 @@
  *
 \********************************************************************/
 
-#include <sys/cdefs.h>
+#include "defs.h"
 #ifndef lint
 /* __RCSID("$NetBSD: rmd160.c,v 1.1.1.1 2001/03/06 11:21:05 agc Exp $"); */
 #endif	/* not lint */
Index: rmd160.h
RCS file: /src/rough/ext/digest/rmd160.h,v
retrieving revision 1.2
diff -u -r1.2 rmd160.h
--- rmd160.h	2001/07/06 18:12:31	1.2
+++ rmd160.h	2001/07/07 01:38:55
@@ -24,7 +24,7 @@
 #ifndef _RMD160_H_
 #define _RMD160_H_
 
-#include <sys/cdefs.h>
+#include "defs.h"
 #include <sys/types.h>
 #include "ruby.h"
 
Index: rmd160hl.c
RCS file: /src/rough/ext/digest/rmd160hl.c,v
retrieving revision 1.2
diff -u -r1.2 rmd160hl.c
--- rmd160hl.c	2001/07/06 18:12:31	1.2
+++ rmd160hl.c	2001/07/07 01:38:55
@@ -11,7 +11,7 @@
  * from OpenBSD: rmd160hl.c,v 1.2 1999/08/17 09:13:12 millert Exp $
  */  
 
-#include <sys/cdefs.h>
+#include "defs.h"
 #ifndef lint
 /* __RCSID("$NetBSD: rmd160hl.c,v 1.1.1.1 2001/03/06 11:21:05 agc Exp $"); */
 #endif	/* not lint */
Index: sha1.h
RCS file: /src/rough/ext/digest/sha1.h,v
retrieving revision 1.2
diff -u -r1.2 sha1.h
--- sha1.h	2001/07/06 18:12:31	1.2
+++ sha1.h	2001/07/07 01:38:55
@@ -9,6 +9,7 @@
 #ifndef _SYS_SHA1_H_
 #define	_SYS_SHA1_H_
 
+#include "defs.h"
 #include <sys/types.h>
 #include "ruby.h"
 
Index: sha1hl.c
RCS file: /src/rough/ext/digest/sha1hl.c,v
retrieving revision 1.2
diff -u -r1.2 sha1hl.c
--- sha1hl.c	2001/07/06 18:12:31	1.2
+++ sha1hl.c	2001/07/07 01:38:55
@@ -11,7 +11,7 @@
 
 /* #include "namespace.h" */
 
-#include <sys/cdefs.h>
+#include "defs.h"
 #include <sys/fcntl.h>
 #include <sys/file.h>
 #include <sys/types.h>
Index: sha2.h
RCS file: /src/rough/ext/digest/sha2.h,v
retrieving revision 1.2
diff -u -r1.2 sha2.h
--- sha2.h	2001/07/06 18:12:31	1.2
+++ sha2.h	2001/07/07 01:38:55
@@ -47,6 +47,7 @@
  * may need to change this, or define these things yourself in this
  * file.
  */
+#include "defs.h"
 #include <sys/types.h>
 
 #ifdef SHA2_USE_INTTYPES_H
Index: sha2hl.c
RCS file: /src/rough/ext/digest/sha2hl.c,v
retrieving revision 1.2
diff -u -r1.2 sha2hl.c
--- sha2hl.c	2001/07/06 18:12:31	1.2
+++ sha2hl.c	2001/07/07 01:38:55
@@ -41,7 +41,7 @@
  */
 
 
-#include <sys/cdefs.h>
+#include "defs.h"
 #ifndef lint
 /* __RCSID("$NetBSD: sha2hl.c,v 1.1 2001/03/12 09:08:40 agc Exp $"); */
 #endif				/* not lint */


--Multipart_Sat_Jul__7_10:49:38_2001-1
Content-Type: application/octet-stream
Content-Disposition: attachment; filename="defs.h"
Content-Transfer-Encoding: 7bit

/* -*- C -*-
 * $Id:$
 */

#ifndef DEFS_H
#define DEFS_H

#if defined(HAVE_SYS_DEFS_H)
# include <sys/cdefs.h>
#else

#define __BEGIN_DECLS
#define __END_DECLS

#if defined(HAVE_SYS_TYPES32_H)
# include <sys/types32.h>
  typedef uint8_t  u_int8_t;
  typedef uint32_t u_int32_t;
  typedef uint64_t u_int64_t;
#elif defined(HAVE_SYS_INT_TYPES_H)
  typedef uint8_t  u_int8_t;
  typedef uint32_t u_int32_t;
  typedef uint64_t u_int64_t;
#else /* assumption: sizeof(long long) 8 && sizeof(int) 4 */
  typedef unsigned char u_int8_t;
  typedef unsigned int  u_int32_t;
  typedef unsigned long long u_int64_t;
#endif

#endif /* HAVE_SYS_CDEFS_H */
#endif /* DEFS_H */

--Multipart_Sat_Jul__7_10:49:38_2001-1--