This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Gas vs irregular files
Andreas Schwab <schwab@suse.de> writes:
> Ian Lance Taylor <ian@wasabisystems.com> writes:
>
> > do this:
> >
> > f_in = fopen (filename, FOPEN_RT);
> >
> > ...
> >
> > if (f_in == NULL)
> > {
> > if (errno == ENOENT)
> > as_bad (_("%s: No such file"), filename);
> > else
> > {
> > as_bad (_("can't open %s for reading"), file_name);
> > as_perror ("%s", file_name);
> > }
> > return;
> > }
>
> Why making ENOENT a special case anyway? What's wrong with as_perror?
As far as I can tell, the original reporter didn't like the fact that
the error message said ``No such file or directory.'' I'm pointing
out a better way to fix that particular problem.
Ian