stdio.h

The stdio.h header file declares functions that deal with standard input and output. One of these functions, fdopen(), is supported only in a POSIX program.

The stdio.h header file also declares these functions:

Defined types in stdio.h

The FILE type is defined in stdio.h. Stream functions use a pointer to the FILE type to get access to a given stream. The system uses the information in the FILE structure to maintain the stream. The C standard streams stdin, stdout, and stderr are also defined in stdio.h.

The type fpos_t is defined in stdio.h for use with fgetpos() and fsetpos().

The types __S99parms, __S99rbx_t, and __S99emparms_t are defined in stdio.h for use with the svc99() function.

The type fldata_t is defined in stdio.h for use with the fldata() function.

The types __amrc_type and __amrc2_type are defined in stdio.h for use in determining error information when I/O functions fail.

Macros defined in stdio.h

You can use these macros as constants in your programs, but you should not alter their values.
BUFSIZ
Specifies the buffer size to be used by the setbuf() library function when you are allocating buffers for stream I/O. This value is the expected size of the user’s buffer supplied to setbuf(). If a larger buffer is required, for example, if blocksize is larger than BUFSIZ, or if special buffer attributes are required, z/OS® XL C/C++ applications will not use the user's buffer.
EOF
The value returned by an I/O function when the End Of File (EOF) (or in some cases, an error) is found.
FOPEN_MAX
The maximum number of files that can be open simultaneously.
FILENAME_MAX
The maximum number of characters in a filename. Can be used in the size specification of an array (for example, to hold the filename returned by fldata()).
L_tmpnam
The size of the longest temporary name that can be generated by the tmpnam() function.
L_ctermid
Maximum size of a character array for ctermid() output. This macro is supported only in a POSIX program.
NULL
A pointer which never points to a data object.
TMP_MAX
The minimum number of unique file names that can be generated by the tmpnam() function.

The macros SEEK_CUR, SEEK_END, and SEEK_SET expand to integral constant expressions and can be used as the third argument to fseek().

The macros _IOFBF, _IOLBF, and _IONBF expand to integral constant expressions with distinct values suitable for use as the third argument to the setvbuf() function.

The following macros expand to integer constant expressions suitable for interpreting values returned by fldata(), in the fldata_t structure.

The following macros expand to integral constant expressions suitable for use as the fourth argument to the flocate() function.

The following macros expand to integral constant expressions suitable for use as the argument to the function clrmemf().

The following macros expand to integral constant expressions suitable for use to determine the last operation reported in the __amrc_type structure. All these macros are described in z/OS XL C/C++ Programming Guide.