From: Katsuyuki Komatsu Date: 1999-05-13T14:09:37+09:00 Subject: [ruby-dev:6775] Re: Ruby 1.3.3-990507 小松です。 In the message of [ruby-dev:6774] Re: Ruby 1.3.3-990507 on 1999/5/13 13:47:33 Katsuyuki Komatsu wrote: |HP-UX 10.20では、以下のような結果になりました。 |いずれの場合でも「__hpux」は定義されています。 あれ?cc (cc -Ac) では-vで見ると-Dhpuxがないのに#ifdefで試すと 定義されていることになってる。ということで訂正。 「hpux」が定義される cc -Ac (HP92453-01 A.10.32.20 HP C Compiler) CC (HP C++ HPCPLUSPLUS A.10.40) gcc (gcc-2.8.1) g++ (gcc-2.8.1) 「hpux」が定義されない cc -Aa, cc -Ae (HP92453-01 A.10.32.20 HP C Compiler) c89 (HP92453-01 A.10.32.20 HP C Compiler) aCC (HP aC++ B3910B A.01.15) % uname -s -r HP-UX B.10.20 % cat t.c #include int main() { #ifdef hpux printf("'hpux' is defined.\n"); #else printf("'hpux' is not defined.\n"); #endif #ifdef __hpux printf("'__hpux' is defined.\n"); #else printf("'__hpux' is not defined.\n"); #endif return 0; } % cc -o t t.c ; ./t 'hpux' is defined. '__hpux' is defined. % cc -Ac -o t t.c ; ./t 'hpux' is defined. '__hpux' is defined. % cc -Aa -o t t.c ; ./t 'hpux' is not defined. '__hpux' is defined. % cc -Ae -o t t.c ; ./t 'hpux' is not defined. '__hpux' is defined. % c89 -o t t.c ; ./t 'hpux' is not defined. '__hpux' is defined. % CC -o t t.c ; ./t 'hpux' is defined. '__hpux' is defined. % aCC -o t t.c ; ./t 'hpux' is not defined. '__hpux' is defined. % gcc -o t t.c ; ./t 'hpux' is defined. '__hpux' is defined. % g++ -o t t.c ; ./t 'hpux' is defined. '__hpux' is defined. % % cc -v -o t t.c ; ./t cc: CCOPTS is not set. /opt/langtools/lbin/cpp t.c /var/tmp/ctmAAAa18490 -$ -D__hp9000s700 -D__hp9000s800 -D__hppa -D__hpux -D__unix -e -D_PA_RISC1_1 -D__CLASSIC_C__ -j cc: Entering Preprocessor. /opt/ansic/lbin/ccom /var/tmp/ctmAAAa18490 t.o -Oq00,al,ag,cn,Lm,sz,Ic,vo,lc,mf,Po,es,rs,sp,in,vc,pi,fa,pe,Rr,Fl,pv,pa,nf,cp,lx,st,ap,Pg,ug,lu,dp,fs,bp,wp! -Ac cc: LPATH is /usr/lib/pa1.1:/usr/lib:/opt/langtools/lib: /usr/ccs/bin/ld /opt/langtools/lib/crt0.o -u main -o t t.o -lc cc: Entering Link editor. 'hpux' is defined. '__hpux' is defined. % -- 小松克行 (株)サリオンシステムズリサーチ ソフトウェア開発部 Katsuyuki Komatsu