fix build error on MinGW (HAVE_READLINK) undefined

Eli Zaretskii eliz@gnu.org
Fri Jan 27 12:47:00 GMT 2012


> 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.



More information about the Gdb-patches mailing list