This thread is a little old now, but I just want to make sure anyone
reading this in the future can clearly see that it is you, not I, that
is the idiot.
[color=blue]
> You are calling a Java function named remove() in a Java program.[/color]
No. I am calling the C function remove() from a C program; I just
happen to be using JNI to call my C program from a Java program.
[color=blue]
> Java is completely off-topic here.[/color]
Yes, it is. That, however, is beside the point, as this is not a Java
question. I simply mentioned Java to provide background as to what I
am doing.
[color=blue]
> Just because Java provides a
> function with the name of a standard C and C++ library function does
> not make this a C or C++ question.[/color]
You clearly have no experience in Java, or you would have been able to
quickly realize that the code I displayed was NOT Java, and I'm a
little skeptical about your C/C++ experience if you did not recongnize
that it IS C code.
At any rate, for anyone who may be interested (or for future
seachers), my problem was simply that I was running strerror() on the
return code, when I actually needed to run it on errcode. A silly
mistake that caused me a lot of headache.
Jack Klein <jackklein@spamcop.net> wrote in message news:<c20ve09lideo85srv2gbsbinnnv6mq4kpe@4ax.com>. ..[color=blue]
> On 8 Jul 2004 06:53:35 -0700,
orr94@yahoo.com (Jerry Orr) wrote in
> comp.lang.c++:
>[color=green]
> > I'm writing a simple JNI C++ function on a z/OS 1.4 system. I am
> > attempting to rename a dataset; however, when I use the rename()
> > function, I get a return code of -1. All of the return codes listed in
> > the "C/C++ Runtime Library Reference" (EACCES, EINVAL, etc) are
> > positive integers, and all of them can be successfully input into
> > strerror() to get a valid error message. Passing -1 to strerror(),
> > though, just returns a null string.
> >
> > Has anyone experienced anything similar to this? I'm not sure why I'd
> > be getting -1 as a return code, and I've been unable to find anything
> > about it in the manuals or on the web.[/color]
>
> [snip off-topic java code]
>
> What you have here is not a C++ language issue at all.
>
> You are calling a Java function named remove() in a Java program.
> Java is completely off-topic here. Just because Java provides a
> function with the name of a standard C and C++ library function does
> not make this a C or C++ question.[/color]