stdio.h

Hi,
I had some files in RTP 6.0 which were working fine. When i try to compile
it under RTP 6.1 some of the flags are not found.

I have pasted below a section from the stdio.h (RTP 6.0) which is not found
in the newly installed RTP 6.1. Are these declarations in a different file
? Is it right to be using these flags ? Are there any other changes i will
have to make to the code ? The package installed is the development
(headers and libs) targeting x86

Thanks for your help
Dennis
************ SECTION FROM STDIO.H ( RTP 6.0) not found in RTP 6.1


/* values for _flag field in FILE struct */

#define _READ 0x0001 /* file opened for reading */

#define _WRITE 0x0002 /* file opened for writing */

#define _UNGET 0x0100 /* ungetc has been done */

#define _BIGBUF 0x0008 /* big buffer allocated */

#define _EOF 0x0010 /* EOF has occurred */

#define _SFERR 0x0020 /* error has occurred on this file */

#define _APPEND 0x0080 /* file opened for append */

#define _BINARY 0x0000 /* not required for POSIX QNX */

#define _IOFBF 0x0000 /* full buffering */

#define _IOLBF 0x0040 /* line buffering */

#define _IONBF 0x0004 /* no buffering */

#define _TMPFIL 0x0800 /* this is a temporary file */

#define _DIRTY 0x1000 /* buffer has been modified */

#define _ISTTY 0x2000 /* is console device */

#define _DYNAMIC 0x4000 /* FILE is dynamically allocated */

#define EOF (-1) /* End of File/Error return code */

Dennis <dmoses@z-kat.com> wrote:

I had some files in RTP 6.0 which were working fine. When i try to compile
it under RTP 6.1 some of the flags are not found.

I have pasted below a section from the stdio.h (RTP 6.0) which is not found
in the newly installed RTP 6.1. Are these declarations in a different file
? Is it right to be using these flags ? Are there any other changes i will
have to make to the code ? The package installed is the development
(headers and libs) targeting x86

I guess someone told you that the sources are the best documentation,
and you believed them, right? :wink:

Don’t listen to them. These flags are undocumented, internal details of
how the stdio library was implemeted in QNX 6.0. QNX 6.1 implements it
differently. It’s safer to only rely on what the real docs promise you.
Or, even better, try to use standard functions where possible, and only
rely on what the relevant standard (ISO C, POSIX, Unix 98, …) tells
you.

Thanks for your help
Dennis
************ SECTION FROM STDIO.H ( RTP 6.0) not found in RTP 6.1


/* values for _flag field in FILE struct */

#define _READ 0x0001 /* file opened for reading */

#define _WRITE 0x0002 /* file opened for writing */

#define _UNGET 0x0100 /* ungetc has been done */

#define _BIGBUF 0x0008 /* big buffer allocated */

#define _EOF 0x0010 /* EOF has occurred */

#define _SFERR 0x0020 /* error has occurred on this file */

#define _APPEND 0x0080 /* file opened for append */

#define _BINARY 0x0000 /* not required for POSIX QNX */

#define _IOFBF 0x0000 /* full buffering */

#define _IOLBF 0x0040 /* line buffering */

#define _IONBF 0x0004 /* no buffering */

#define _TMPFIL 0x0800 /* this is a temporary file */

#define _DIRTY 0x1000 /* buffer has been modified */

#define _ISTTY 0x2000 /* is console device */

#define _DYNAMIC 0x4000 /* FILE is dynamically allocated */

#define EOF (-1) /* End of File/Error return code */


Wojtek Lerch (wojtek@qnx.com) QNX Software Systems Ltd.