the other doesn't or one machine supports soft links and the other
doesn't.
if (preserve_devices && IS_DEVICE(file->mode))
file->rdev = (flags & SAME_RDEV) ? last_rdev : (dev_t)read_int(f);
if (preserve_devices && IS_DEVICE(file->mode))
file->rdev = (flags & SAME_RDEV) ? last_rdev : (dev_t)read_int(f);
if (preserve_links && S_ISLNK(file->mode)) {
int l = read_int(f);
file->link = (char *)malloc(l+1);
if (preserve_links && S_ISLNK(file->mode)) {
int l = read_int(f);
file->link = (char *)malloc(l+1);
read_buf(f,file->link,l);
file->link[l] = 0;
}
read_buf(f,file->link,l);
file->link[l] = 0;
}
#if SUPPORT_HARD_LINKS
if (preserve_hard_links && S_ISREG(file->mode)) {
#if SUPPORT_HARD_LINKS
if (preserve_hard_links && S_ISREG(file->mode)) {
break;
case 'H':
#if SUPPORT_HARD_LINKS
preserve_hard_links=1;
break;
case 'H':
#if SUPPORT_HARD_LINKS
preserve_hard_links=1;
+#else
+ fprintf(FERROR,"ERROR: hard links not supported on this platform\n");
+ exit_cleanup(1);
if (dry_run)
verbose = MAX(verbose,1);
if (dry_run)
verbose = MAX(verbose,1);
+#ifndef SUPPORT_LINKS
+ if (!am_server && preserve_links) {
+ fprintf(FERROR,"ERROR: symbolic links not supported\n");
+ exit_cleanup(1);
+ }
+#endif
+
if (am_server) {
setup_protocol(STDOUT_FILENO,STDIN_FILENO);
if (am_server) {
setup_protocol(STDOUT_FILENO,STDIN_FILENO);
if (preserve_links && S_ISLNK(file->mode)) {
if (preserve_links && S_ISLNK(file->mode)) {
char lnk[MAXPATHLEN];
int l;
if (statret == 0) {
char lnk[MAXPATHLEN];
int l;
if (statret == 0) {
fprintf(FINFO,"%s -> %s\n",
fname,file->link);
}
fprintf(FINFO,"%s -> %s\n",
fname,file->link);
}
#ifdef HAVE_MKNOD
if (am_root && preserve_devices && IS_DEVICE(file->mode)) {
#ifdef HAVE_MKNOD
if (am_root && preserve_devices && IS_DEVICE(file->mode)) {
#include "lib/getopt.h"
#endif
#include "lib/getopt.h"
#endif
+#ifndef S_IFLNK
+#define S_IFLNK 0120000
+#endif
#ifndef S_ISLNK
#define S_ISLNK(mode) (((mode) & S_IFLNK) == S_IFLNK)
#ifndef S_ISLNK
#define S_ISLNK(mode) (((mode) & S_IFLNK) == S_IFLNK)
#define bzero(buf,n) memset(buf,0,n)
#endif
#define bzero(buf,n) memset(buf,0,n)
#endif
-#define SUPPORT_LINKS (HAVE_READLINK && defined(S_ISLNK))
+#define SUPPORT_LINKS HAVE_READLINK
#define SUPPORT_HARD_LINKS HAVE_LINK
#define SUPPORT_HARD_LINKS HAVE_LINK
-#ifndef S_ISLNK
-#define S_ISLNK(x) 0
-#endif
-
#if !SUPPORT_LINKS
#define lstat stat
#endif
#if !SUPPORT_LINKS
#define lstat stat
#endif