From: Hugh Sasse Staff Elec Eng Date: 2003-03-21T03:55:30+09:00 Subject: Re: Solaris2.5.1, ruby-1.8.0 snapshot 19-MAR-2003 On Fri, 21 Mar 2003, Yukihiro Matsumoto wrote: > > In message "Solaris2.5.1, ruby-1.8.0 snapshot 19-MAR-2003" > on 03/03/21, Hugh Sasse Staff Elec Eng writes: > | > |I have just tried to build the nightly snapshot I picked up > |yesterday under Solaris 2.5.1, with GCC-3.2.2 (which seemed to build > |OK), and I get this: > | > |brains hgs 22 %> gmake > |/usr/local/bin/gcc -g -O2 -I. -I. -c array.c > |In file included from ruby.h:655, > | from array.c:15: > |missing.h:122: parse error before "va_list" > |gmake: *** [array.o] Error 1 > Brian's suggestion worked on array.c, but I have gone with this one... > How about this? > > --- missing.h 20 Feb 2003 06:49:00 -0000 1.7 > +++ missing.h 20 Mar 2003 16:26:31 -0000 > @@ -120,2 +120,7 @@ extern unsigned long strtoul _((char *, > #ifndef HAVE_VSNPRINTF > +# ifdef HAVE_STDARG_PROTOTYPES > +# include > +# else > +# include > +# endif > extern snprintf __((char *, size_t n, char const *, ...)); > > matz. This gets Much further, but I now have: compiling digest/md5 gmake[1]: Entering directory `/home/hgs/ruby/ruby-snapshot/ext/digest/md5' /usr/local/bin/gcc -fPIC -g -O2 -DHAVE_CONFIG_H -I/home/hgs/ruby/ruby-snapshot/ext/digest/md5/.. -I. -I/home/hgs/ruby/ruby-snapshot -I/home/hgs/ruby/ruby-snapshot -I/home/hgs/ruby/ruby-snapshot/ext/digest/md5 -DHAVE_INTTYPES_H -DHAVE_UNISTD_H -c md5init.c In file included from md5.h:49, from md5init.c:8: /home/hgs/ruby/ruby-snapshot/ext/digest/defs.h:20:23: inttypes.h: No such file or directory In file included from md5init.c:8: md5.h:60: parse error before "uint32_t" md5.h:60: warning: no semicolon at end of struct or union md5.h:61: warning: data definition has no type or storage class md5.h:62: parse error before "buffer" md5.h:62: warning: data definition has no type or storage class md5.h:63: parse error before '}' token md5.h:63: warning: data definition has no type or storage class md5.h:73: parse error before '*' token md5.h:74: parse error before '*' token md5.h:75: parse error before '*' token md5.h:76: parse error before '*' token md5.h:77: parse error before '*' token gmake[1]: *** [md5init.o] Error 1 gmake[1]: Leaving directory `/home/hgs/ruby/ruby-snapshot/ext/digest/md5' gmake: *** [all] Error 1 brains hgs 75 %> brains hgs 84 %> cat -n /home/hgs/ruby/ruby-snapshot/ext/digest/defs.h | body 19 30 19 #if defined(HAVE_INTTYPES_H) 20 # include 21 #else 22 typedef unsigned char uint8_t; 23 typedef unsigned int uint32_t; 24 # if SIZEOF_LONG == 8 25 typedef unsigned long uint64_t; 26 # elif defined(__GNUC__) 27 typedef unsigned long long uint64_t; 28 # elif defined(_MSC_VER) 29 typedef unsigned _int64 uint64_t; 30 # elif defined(__BORLANDC__) brains hgs 85 %> brains hgs 85 %> cat -n /home/hgs/ruby/ruby-snapshot/ext/digest/md5/md5.h | body 45 80 45 46 #ifndef MD5_INCLUDED 47 # define MD5_INCLUDED 48 49 #include "defs.h" 50 51 /* 52 * This code has some adaptations for the Ghostscript environment, but it 53 * will compile and run correctly in any environment with 8-bit chars and 54 * 32-bit ints. Specifically, it assumes that if the following are 55 * defined, they have the same meaning as in Ghostscript: P1, P2, P3. 56 */ 57 58 /* Define the state of the MD5 Algorithm. */ 59 typedef struct md5_state_s { 60 uint32_t count[2]; /* message length in bits, lsw first */ 61 uint32_t state[4]; /* digest buffer */ 62 uint8_t buffer[64]; /* accumulate block */ 63 } MD5_CTX; 64 65 #ifdef RUBY 66 #define MD5_Init rb_Digest_MD5_Init 67 #define MD5_Update rb_Digest_MD5_Update 68 #define MD5_Final rb_Digest_MD5_Final 69 #define MD5_End rb_Digest_MD5_End 70 #define MD5_Equal rb_Digest_MD5_Equal 71 #endif 72 73 void MD5_Init _((MD5_CTX *pms)); 74 void MD5_Update _((MD5_CTX *pms, const uint8_t *data, size_t nbytes)); 75 void MD5_Final _((uint8_t *digest, MD5_CTX *pms)); 76 void MD5_End _((MD5_CTX *pctx, uint8_t *hexdigest)); 77 int MD5_Equal _((MD5_CTX *pctx1, MD5_CTX *pctx2)); 78 79 #define MD5_BLOCK_LENGTH 64 80 #define MD5_DIGEST_LENGTH 16 brains hgs 86 %> I can't find a definition of uint32_t in /usr/local/include, ... but it seems to be typedef'ed in /usr/include/syn/synch.h and usr/include/pthread.h Hugh > >