This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: fix build error on MinGW (HAVE_READLINK) undefined
> Date: Fri, 27 Jan 2012 12:21:59 +0000
> From: Pedro Alves <palves@redhat.com>
> CC: asmwarrior@gmail.com, gdb-patches@sourceware.org
>
> > But isn't ENOSYS sub-optimal in this case? Systems that don't have
> > readlink don't have symlinks, either.
>
> Not necessarily true. Might have symlinks but not a defined MAXPATHLEN,
> for example (I guess the Hurd may fall on that basked).
Could use PATH_MAX instead. No problem here.
> E.g., if the file does not exist, we should return ENOENT instead.
We could check that as well, and return ENOENT.
> >> *target_errno = FILEIO_ENOSYS;
> >> return NULL;
> >> #endif
> >
> > Which is wrong, don't you think?
>
> I don't.
Too bad. In my experience, saying "this is not a symlink" does TRT
more often than not.