Discussion:
stdioext OpenVMS patch.
(too old to reply)
John E. Malmberg
2017-07-01 23:29:00 UTC
Permalink
On OpenVMS, the struct _iobuf is needed to access members of the struct
FILE.

This is a patch for the affected stdioext modules to compile on OpenVMS.

Regards,
-John
Bruno Haible
2017-07-02 00:47:20 UTC
Permalink
Hi John,
Post by John E. Malmberg
On OpenVMS, the struct _iobuf is needed to access members of the struct
FILE.
This is a patch for the affected stdioext modules to compile on OpenVMS.
The approach looks generally right, but I'd request a couple of changes
before this can go in:

* Is _IOERR defined on OpenVMS? In some files, you treat OpenVMS
as part of the _IOERR case, in others you do it before _IOERR. Which
is not consistent.
If _IOERR is defined on OpenVMS, please update all
#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, MSVC, NonStop Kernel */
lines to include OpenVMS at the end of the comment.

* Instead of defining a variable 'stream', please using the same coding
style as for the other platforms: use macro fp_ which is defined to
a cast expression through lib/stdio-impl.h.

* The fbufmode.c change has a regression for all non-Windows, non-OpenVMS
platforms.

* The freading.c change is misindented.

Bruno
John E. Malmberg
2017-07-03 13:45:26 UTC
Permalink
Post by Bruno Haible
Hi John,
Post by John E. Malmberg
On OpenVMS, the struct _iobuf is needed to access members of the struct
FILE.
This is a patch for the affected stdioext modules to compile on OpenVMS.
The approach looks generally right, but I'd request a couple of changes
* Instead of defining a variable 'stream', please using the same
coding style as for the other platforms: use macro fp_ which
is defined to a cast expression through lib/stdio-impl.h.
Thank you. That greatly simplifies the updated attached patch.
Post by Bruno Haible
* Is _IOERR defined on OpenVMS? In some files, you treat OpenVMS
as part of the _IOERR case, in others you do it before _IOERR. Which
is not consistent.
If _IOERR is defined on OpenVMS, please update all
#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer,
mingw, MSVC, NonStop Kernel */
lines to include OpenVMS at the end of the comment.
Done
Post by Bruno Haible
* The fbufmode.c change has a regression for all non-Windows, non-OpenVMS
platforms.
Reverted back to original code.
Post by Bruno Haible
* The freading.c change is misindented.
No longer applicable.

Regards,
-John
Bruno Haible
2017-07-03 17:38:28 UTC
Permalink
Hi John,
Post by John E. Malmberg
Thank you. That greatly simplifies the updated attached patch.
Thanks. Applied (with comment changes also in fflush.c, fseeko.c).

Bruno

Loading...