Require symlink support
Require lstat(2), lchown(2), S_IFLNK and S_ISLNK from POSIX.1-2001. Already unconditionally used in lib/tcbfuncs.c and lib/run_part.c.
This commit is contained in:
committed by
Serge Hallyn
parent
f6f8bcd2a5
commit
dab764d019
@@ -65,7 +65,6 @@ int lrename (const char *old, const char *new)
|
||||
int res;
|
||||
char *r = NULL;
|
||||
|
||||
#if defined(S_ISLNK)
|
||||
#ifndef __GLIBC__
|
||||
char resolved_path[PATH_MAX];
|
||||
#endif /* !__GLIBC__ */
|
||||
@@ -82,7 +81,6 @@ int lrename (const char *old, const char *new)
|
||||
new = r;
|
||||
}
|
||||
}
|
||||
#endif /* S_ISLNK */
|
||||
|
||||
res = rename (old, new);
|
||||
|
||||
|
||||
@@ -205,22 +205,6 @@ static inline void memzero(void *ptr, size_t size)
|
||||
# define SEEK_END 2
|
||||
#endif
|
||||
|
||||
#ifndef S_ISLNK
|
||||
#define S_ISLNK(x) (0)
|
||||
#endif
|
||||
|
||||
#if HAVE_LCHOWN
|
||||
#define LCHOWN lchown
|
||||
#else
|
||||
#define LCHOWN chown
|
||||
#endif
|
||||
|
||||
#if HAVE_LSTAT
|
||||
#define LSTAT lstat
|
||||
#else
|
||||
#define LSTAT stat
|
||||
#endif
|
||||
|
||||
#if HAVE_TERMIOS_H
|
||||
# include <termios.h>
|
||||
# define STTY(fd, termio) tcsetattr(fd, TCSANOW, termio)
|
||||
|
||||
Reference in New Issue
Block a user