On 31 Jan 2006 17:06:28 -0800, [EMAIL PROTECTED] wrote:
>Doesn't the POSIX setting affect the resolution of pathnames?
>where normally fopen("FRED") refers to a file relative to the
>current working directory, with POSIX(OFF) it refers instead
>to a DDNAME?  Admittedly, this is CRTL behavior, not connected
>to availability of UNIX services, yet the difference can be
>critical.

Yes, this is one of the key things that the LE POSIX setting affects.
It determines whether fopen("FRED") is opening the HFS file ./FRED
or the data set DSN=prefix.FRED (not DD name, by the way).  It works
this way because the filespec "FRED" is ambiguous as to type.  You
can open either type deterministically (without depending on LE POSIX)
by including one of the syntax hints that LE recognizes.  fopen("./FRED")
will always try to open an HFS file; fopen("//FRED") will always do data
set--no matter what LE POSIX says.  The C RTL book contains a rather
confusing flowchart that attempts to explain fopen's logic.  The case for
DD names (with "DD:" in the filespec) is particularly interesting.

Apparently something Wendell's application does is one of the few cases
where POSIX(ON) is really required, e.g. pthreads.

----------------------------------------------------------------------
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