This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH : enhance win32 libiberty pex-win32.c for combo install dirs


DJ Delorie wrote:
Library functions are not allowed to print their own errors; they are
supposed to pass error conditions back to the caller so that the
caller can do the right thing.
There is not ability in the API to return the OS's error string. The error text was necessary to troubleshoot the problem.

I think you can comment the fprint() out and keep that code to troubleshoot in the future.

The "right thing" in this installation $PREFIX situation would have been for the caller to ask for the chained program by its true name. But we both know that is not going to happen.


What happens if the file passed already has an extension?
I was not seeing anything but extension-less requests.

If if they come with extensions, it will find the caller's name with extension just fine, since there was a final test case added: "" -> no extension added.

Will it
accidentally run an existing foo.exe.com or something?
Might actually do that, but that file *does need to be run*, (out of town, that is.)



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]