On Mon, 5 Jan 2009 08:38:39 -0600, Paul Gilmartin <[email protected]> wrote:

>(Related to a thread on MVS-OE, but perhaps a reader here
>knows more)
>
>In:
>
>    Title: z/OS V1R10.0 XL C/C++ Run-Time Library Reference
>    Document Number: SA22-7821-10
>
>   Linkname: fcntl() -- Control Open File Descriptors
>        URL:
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/EDCLB190/3.245
>
>I see:
>
>     #define _POSIX_SOURCE
>     #include <fcntl.h>
>     int fcntl(int fildes, int action, ...);
>
>However:
>
>MVS:147$ uname -a
>OS/390 ECC8 20.00 03 2094
>MVS:148$ cat test.c
>#define _POSIX_SOURCE
>#include <fcntl.h>
>
>int test(void) {
>int I; I = QUERYCVT; }
>
>MVS:149$ c89 test.c
>ERROR CCN3045 ./test.c:5     Undeclared identifier QUERYCVT.
>
>There are a couple other #defines on the page; neither of
>them works.  QUERYCVT is defined in /usr/include/fcntl.h,
>in the usual nest of #ifdefs.  What do I need to define or
>supply as a compiler option to get to this structure?
>
>Thanks,
>gil

I don't have z/OS 1.10, only 1.8. From my examination, the define of
QUERYCVT is dependent on the definition of __FX. __FX is defined in
features.h. So, first off, have you #include'd <features.h>? Within this
file, __FX is dependent on the LE level and on _OPEN_SYS_FILE_EXT being
defined. From looking in the manual, if appears that you may need to have
the statement:

#define _OPEN_SYS_FILE_EXT 1

in your source code before the #include of <fcntl.h>.

Wish I could test this for you, but we are not licensed for the C compiler.

--
John

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to