From: WATANABE Tetsuya Date: 1998-08-17T13:49:33+09:00 Subject: [ruby-list:9139] Re: ruby 1.1c2 released >>>>> "matz" == Yukihiro Matsumoto writes: matz> In message "[ruby-list:9079] Re: ruby 1.1c2 released" matz> on 98/08/12, WATANABE Tetsuya writes: |cc のオプション -Aa は ANSI-C モードで、ヘッダと matz> なんで -Aa が必要になるんでしょうか.いや,もっと知りたいの matz> は -Aa なしでコンパイルするためにはどのような変更が必要なの matz> でしょうか? はい、みてみました。とりあえず前回の方法で動いていた のでそのままだったんですが... HP C と GCC で動きます。GCC の方はちょっとセコイこと をしないと、警告が消えませんでした。 以前のわたなべさんの CYGWIN32 対応パッチを含めていま す。 ------------------------------ --- snprintf.c.org Wed Aug 12 11:28:44 1998 +++ snprintf.c Mon Aug 17 13:46:06 1998 @@ -62,6 +62,9 @@ #if defined(__STDC__) # include +# if !defined(__P) +# define __P(x) x +# endif #else # undef __P # define __P(x) () @@ -71,6 +74,10 @@ #define _BSD_VA_LIST_ va_list #endif +#if defined(__hpux) && !defined(__GNUC__) +#define const +#endif + #if defined(sgi) #undef __const #define __const @@ -93,7 +100,9 @@ * boundaries. THIS IS A CROCK, but for now there is no way around it. */ #if !defined(_ANSI_SOURCE) && !defined(__STRICT_ANSI__) +#if !defined(__hpux) typedef off_t fpos_t; +#endif #else typedef struct __sfpos { char _pos[8]; @@ -238,9 +247,9 @@ #endif /* lint */ - - +#if defined(__hpux) && !defined(__GNUC__) #include +#endif /* * I/O descriptors for __sfvwrite(). @@ -274,8 +283,9 @@ if ((len = uio->uio_resid) == 0) return (0); - +#ifndef __hpux #define MIN(a, b) ((a) < (b) ? (a) : (b)) +#endif #define COPY(n) (void)memcpy((void *)fp->_p, (void *)p, (size_t)(n)) iov = uio->uio_iov; @@ -347,8 +357,12 @@ #define u_int unsigned int #include +#if !defined(__CYGWIN32__) && (defined(__hpux) && !defined(__GNUC__)) #include +#endif +#if defined(__hpux) && !defined(__GNUC__) #include +#endif #if defined(__STDC__) # include ------------------------------ matz> HP-UXでもそのままコンパイルできるようにしたいので,「ヘッダ matz> あたりのなんとか」をなんとかしたいです. これで make test OK です。 -- WATANABE Tetsuya HP Japan e-mail tetsu@jpn.hp.com