os400: workaround an IBM ASCII run-time library bug

IBM-provided ASCII function puts() does not output an expected trailing
newline: emulate the correct behavior using other functions.

Closes #14281
This commit is contained in:
Patrick Monnerat 2024-07-26 17:15:27 +02:00 committed by Daniel Stenberg
parent fc273027f1
commit ad8c9a5807
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2
2 changed files with 10 additions and 2 deletions

View File

@ -38,6 +38,15 @@ typedef unsigned long u_int32_t;
#define isatty(fd) 0 #define isatty(fd) 0
/* Workaround bug in IBM QADRT runtime library:
* function puts() does not output the implicit trailing newline.
*/
#include <stdio.h> /* Be sure it is loaded. */
#undef puts
#define puts(s) (fputs((s), stdout) == EOF? EOF: putchar('\n'))
/* System API wrapper prototypes & definitions to support ASCII parameters. */ /* System API wrapper prototypes & definitions to support ASCII parameters. */
#include <sys/socket.h> #include <sys/socket.h>

View File

@ -226,8 +226,7 @@ in fact, very few common utilities are available. As a consequence, the
config-os400.h has been coded manually and the compilation scripts are config-os400.h has been coded manually and the compilation scripts are
a set of shell scripts stored in subdirectory packages/OS400. a set of shell scripts stored in subdirectory packages/OS400.
The "curl" command and the test environment are currently not supported on The test environment is currently not supported on OS/400.
OS/400.
Protocols currently implemented on OS/400: Protocols currently implemented on OS/400: