"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "lib/readlink.c" between
bison-3.8.1.tar.xz and bison-3.8.2.tar.xz

About: Bison is a general-purpose parser generator.

readlink.c  (bison-3.8.1.tar.xz):readlink.c  (bison-3.8.2.tar.xz)
skipping to change at line 32 skipping to change at line 32
#include <errno.h> #include <errno.h>
#include <string.h> #include <string.h>
#include <sys/stat.h> #include <sys/stat.h>
#if !HAVE_READLINK #if !HAVE_READLINK
/* readlink() substitute for systems that don't have a readlink() function, /* readlink() substitute for systems that don't have a readlink() function,
such as DJGPP 2.03 and mingw32. */ such as DJGPP 2.03 and mingw32. */
ssize_t ssize_t
readlink (char const *file, char *buf _GL_UNUSED, readlink (char const *file, _GL_UNUSED char *buf,
size_t bufsize _GL_UNUSED) _GL_UNUSED size_t bufsize)
{ {
struct stat statbuf; struct stat statbuf;
/* In general we should use lstat() here, not stat(). But on platforms /* In general we should use lstat() here, not stat(). But on platforms
without symbolic links, lstat() - if it exists - would be equivalent to without symbolic links, lstat() - if it exists - would be equivalent to
stat(), therefore we can use stat(). This saves us a configure check. */ stat(), therefore we can use stat(). This saves us a configure check. */
if (stat (file, &statbuf) >= 0) if (stat (file, &statbuf) >= 0)
errno = EINVAL; errno = EINVAL;
return -1; return -1;
} }
 End of changes. 1 change blocks. 
2 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)