2009-06-30 5 views
2

z/OS USSでz/libをコンパイルしようとしています。 iveはgmakeとc89コンパイラ(これはc89標準に準拠していると仮定しています)とUSSはPOSIXに準拠しています。zlib(z/OS)USS

しかし、zlibのは、次のエラー(S)私は徐々にFAR *を取るとき

c89 -O3 -DUSE_MMAP -D_XOPEN_SOURCE_EXTENDED=1 -D_POSIX_SOURCE -c -o example.o example.c 
ERROR CCN3277 ./zlib.h:92 Syntax error: possible missing ';' or ','? 
ERROR CCN3007 ./zlib.h:92 "struct internal_state" is undefined. 
ERROR CCN3166 ./zlib.h:103 Definition of function FAR requires parentheses. 
ERROR CCN3276 ./zlib.h:103 Syntax error: possible missing '{'? 
ERROR CCN3273 ./zlib.h:124 Missing type in declaration of gz_header. 
ERROR CCN3166 ./zlib.h:126 Definition of function gz_header requires parentheses. 
ERROR CCN3276 ./zlib.h:126 Syntax error: possible missing '{'? 
WARNING CCN3137 ./zlib.h:1346 Declaration must declare at least one declarator, tag, or the members of an enumeration. 
ERROR CCN3275 ./zlib.h:1350 Unexpected text z encountered. 
ERROR CCN3282 ./zlib.h:1350 The type of the parameters must be specified in a prototype. 
ERROR CCN3275 ./example.c:95 Unexpected text file encountered. 
ERROR CCN3045 ./example.c:95 Undeclared identifier gzFile. 
ERROR CCN3046 ./example.c:96 Syntax error. 
ERROR CCN3045 ./example.c:98 Undeclared identifier file. 
ERROR CCN3019 ./example.c:523 Expecting an array or a pointer to object type. 
ERROR CCN3280 ./example.c:527 Function argument assignment between types "const char*" and "int" is not allowed. 
CCN0793(I) Compilation failed for file ./example.c. Object file not created. 
FSUM3065 The COMPILE step ended with return code 12. 
FSUM3017 Could not compile example.c. Correct the errors and try again. 
gmake: *** [example.o] Error 3 

は(私は考えてそのfarポインタが、イムで

struct internal_state FAR *state; /* not visible by applications */ 

上にトリップしているようです本当にそれは確かではない)エラーは消え去る。しかし、これは図書館なので、これを取り除くことによって他の人工物がどのように生成されるのか分かりません。

誰にでもアイデアがありますか?

古いメインフレームのヘッドはありますか?

+0

これは私がC/C++プリプロセッサを嫌う理由です。 – Malcolm

答えて

2

コンパイルされたzlibの以前のバージョンがある判明USS、バージョン1.1.4またはこれに近い。それは後のレベルですが、私はこれが最新のコードでFARポインタを実装する前であるため、これを前提としています。だからative私はそれが動作するように思った。

ご協力いただきありがとうございます。

よろしく

マーク。

1

FARはC89キーワードではなく、Microsoft/Intelismであり、おそらくどこかで定義されています。そうでない場合、あなたは何としてそれを定義する必要があります。

#define FAR 

しかし、これはおそらく唯一の多くの問題のいずれかを修正します。私は、ライブラリがFARポインタのようなものを処理するための条件付きコンパイルのいくつかの形式を使用していると推測します。あなたのプラットフォームに最も適した設定を見つけるためにドキュメントを読む必要があります。

1

xlcがシステムのデフォルトコンパイラであるため、私はxlcをc89の代わりに使用したいと思いますが、おそらく問題があるでしょう。私はMVS-OEの電子メールリストを購読したいと思います。リストについての情報へのリンクので、メッセージを [email protected] に電子メールを送信し、今ダウンしていると思われる:INFO MVS-OE