On 05 May 2008 17:28:41 GMT, Dave Saville wrote:

> int main(int argc, char**argv)
> {
> open("H:/home/DB/Clipprocess", O_RDONLY);
> printf("Return from file open: %s", strerror(errno));
> }
> The second p in the filename should be P and if it is, open returns
> "no error" when H is NFS mounted from an OS/2 box with enforce case.
> As it is coded it returns "file not found". But E, EPM, Vi et al can
> all open it regardless of the case typed in the command line. I can
> see no documented flags to open, or fopen which acts the same, WRT to
> case.
> Incidently, how do I compile a program such that os2trace works? Just
> running the above through GCC and pointing os2trace at the resulting
> exe reports it can't trace anything.

Well obviously you are not using any native API calls here and you are
relying on the C runtime library to translate for you, so you have to
ask yourself where is the C runtime? This comes down to whether you are
linking statically or dynamically. If the latter, then you aren't going
to get any trace info. unless you trace the library DLL as well. This can
get messy, so I would recommend you don't do it unless you need to.
As you have the source then you don't need to, so just set the compiler
options and link statically.
Who knows what parameter mangling the runtime library is doing to your
open() call. If you want exact control then you need to remove as many
intermediate layers as possible.
At least you'll find out what's going on.