z/OS USS 上的 zlib

发布于 2024-07-25 14:46:34 字数 1900 浏览 12 评论 0原文

我正在尝试在 z/OS USS(这就是大型机)上编译 z/lib。 我有 gmake 和 c89 编译器(我假设它符合 c89 标准),并且 USS 应该符合 POSIX。

zlib 似乎会遇到

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

以下错误,

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 * (我认为它是一个远指针,但我真的不太确定)时, 错误就会消失。 但由于这是一个库,我不确定删除它会产生什么其他工件。

有人有什么想法吗?

那里有旧的主机头吗?

Im trying to compile z/lib on z/OS USS(thats right a mainframe). ive got gmake and the c89 compiler (which im assuming is c89 standards compliant) and USS is supposed to be POSIX compliant.

But zlib seems to be tripping up on

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

with the following error(s)

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

when i progressively take out the FAR * (i think its a far pointer but im really not that sure) the errors go away. But as this is a library, im not sure what other artifacts are going to be produced by removing this.

has anybody got any ideas?

any old mainframe heads out there?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

梦言归人 2024-08-01 14:46:34

事实证明,zlib 的早期版本可以在 USS 上编译,版本 1.1.4 或接近该版本。 它是一个后级,但我认为这是可行的,因为它是在最新代码中实现 FAR 指针之前。 所以我想我已经可以使用自动取款机了。

感谢你的帮助。

问候

马克。

it turns out there is a previous version of zlib that compiles on USS, version 1.1.4 or close to that. Its a back level, but i presume this works because it is before the implementation of the FAR pointer in the latest code. So atm i think ive got it to work.

thanks for all your help.

Regards

Mark.

红玫瑰 2024-08-01 14:46:34

FAR 不是 C89 关键字,它是 Microsoft/Intelism,并且可能在某处 #define。 如果不是,您需要将其定义为空:

#define FAR

但是,这可能只能解决许多问题之一。 我猜想该库使用某种形式的条件编译来处理 FAR 指针之类的事情 - 您需要阅读文档以查找哪种配置最适合您的平台。

FAR is not a C89 keyword, it is a Microsoft/Intelism and is probably #defined somewhere. If not, you need to define it as nothing:

#define FAR

However, this will probably only fix one of many problems. I would guess that the library uses some form of conditional compilation to handle things like FAR pointers - you need to read the docs to find which configuration is most suitabkle for your platform.

山色无中 2024-08-01 14:46:34

我会使用 xlc 而不是 c89,因为 xlc 是您的系统默认编译器,但您仍然可能会遇到问题。 我会订阅 MVS-OE 电子邮件列表,上面的人非常有帮助。 有关该列表的信息的链接现在似乎已关闭,因此请发送电子邮件至
[电子邮件受保护]
带有消息:INFO MVS-OE

I'd use xlc instead of c89 since xlc is your system default compiler but you'll still probably have issues. I'd subscribe to the MVS-OE email list, the people on it are quite helpful. The link to info about the list appears to be down now so send email to
[email protected]
with the message: INFO MVS-OE

莫相离 2024-08-01 14:46:34

FWIW,IBM 提供了 zlib 的预构建版本,其中包括对最新老式大型机上可用的压缩硬件(所谓的 zEDC)的支持。 请参阅 zEnterprise 的 zlib数据压缩

FWIW, IBM provides a prebuilt version of zlib that includes support for the compression hardware (so-called zEDC) available on recent-vintage mainframes. See zlib for zEnterprise Data Compression

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文