- check for setlinebuf() in autoconf. Apparently HPUX doesn't have it
authorAndrew Tridgell <tridge@samba.org>
Tue, 16 Dec 1997 22:39:55 +0000 (22:39 +0000)
committerAndrew Tridgell <tridge@samba.org>
Tue, 16 Dec 1997 22:39:55 +0000 (22:39 +0000)
- use @exec_prefix@ and @prefix@ in more useful ways in Makefile.in

Makefile.in
configure.in
flist.c
main.c

index d144944..bc623bd 100644 (file)
@@ -1,8 +1,10 @@
 # Makefile for rsync. This is processed by configure to produce the final
 # Makefile
 
-INSTALL_BIN=@prefix@/bin
-INSTALL_MAN=@prefix@/man
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+INSTALL_BIN=$(exec_prefix)/bin
+INSTALL_MAN=$(prefix)/man
 
 LIBS=@LIBS@
 CC=@CC@ 
index ce1b9e3..3112f0c 100644 (file)
@@ -42,7 +42,7 @@ AC_FUNC_MMAP
 AC_FUNC_UTIME_NULL
 AC_CHECK_FUNCS(waitpid strtok pipe getcwd mkdir strdup strerror chown chmod mknod)
 AC_CHECK_FUNCS(fchmod fstat strchr bcopy bzero readlink link utime utimes)
-AC_CHECK_FUNCS(memmove getopt_long lchown)
+AC_CHECK_FUNCS(memmove getopt_long lchown setlinebuf)
 
 echo $ac_n "checking for working fnmatch... $ac_c"
 AC_TRY_RUN([#include <fnmatch.h>
diff --git a/flist.c b/flist.c
index b333b5b..8a99500 100644 (file)
--- a/flist.c
+++ b/flist.c
@@ -187,7 +187,7 @@ void receive_file_entry_v11(struct file_struct *file,
   bzero((char *)file,sizeof(*file));
 
   file->name = (char *)malloc(l1+l2+1);
-  if (!file->name) out_of_memory("receive_file_entry");
+  if (!file->name) out_of_memory("receive_file_entry 1");
 
   strncpy(file->name,lastname,l1);
   read_buf(f,file->name+l1,l2);
@@ -207,7 +207,7 @@ void receive_file_entry_v11(struct file_struct *file,
   if (preserve_links && S_ISLNK(file->mode)) {
     int l = read_int(f);
     file->link = (char *)malloc(l+1);
-    if (!file->link) out_of_memory("receive_file_entry");
+    if (!file->link) out_of_memory("receive_file_entry 2");
     read_buf(f,file->link,l);
     file->link[l] = 0;
   }
diff --git a/main.c b/main.c
index 3fbdea1..d289a58 100644 (file)
--- a/main.c
+++ b/main.c
@@ -730,8 +730,10 @@ int main(int argc,char *argv[])
 
     setup_protocol(f_out,f_in);
 
+#if HAVE_SETLINEBUF
     setlinebuf(FINFO);
     setlinebuf(FERROR);
+#endif
 
     if (verbose > 3) 
       fprintf(FERROR,"parent=%d child=%d sender=%d recurse=%d\n",