Re: New --with-rsync-name option

2001-06-11 Thread Dave Dykstra

On Sun, Jun 10, 2001 at 03:01:26AM -0500, [EMAIL PROTECTED] wrote:
 Patch to set RSYNC_NAME in rsync.h. It adds a new option to configure,
 --with-rsync-name, that takes a string that is used to replace
 RSYNC_NAME. The default is rsync.

I kind of hate to pre-process all of rsync.h for just that one variable.
Isn't there some way to get autoheader to stick it into config.h.in?
Alternatively it could go into a -D as part of @CFLAGS@ in Makefile.in
but I'm not sure I care for that much either.

- Dave Dykstra




New --with-rsync-name option

2001-06-10 Thread rsync

Patch to set RSYNC_NAME in rsync.h. It adds a new option to configure,
--with-rsync-name, that takes a string that is used to replace
RSYNC_NAME. The default is rsync.

-- 
albert chin ([EMAIL PROTECTED])

-- snip snip
Index: configure.in
===
RCS file: /cvsroot/rsync/configure.in,v
retrieving revision 1.72
diff -u -3 -p -r1.72 configure.in
--- configure.in7 May 2001 06:59:37 -   1.72
+++ configure.in10 Jun 2001 07:48:04 -
@@ -38,6 +38,14 @@ fi
 AC_ARG_WITH(included-popt,
 [  --with-included-poptuse bundled popt library, not from system])
 
+AC_ARG_WITH(rsync-name,
+   [  --with-rsync-name=NAME  set rsync path used on server to NAME
+  (default: rsync)],[
+   RSYNC_NAME=$with_rsync_name
+   ],[
+   RSYNC_NAME=rsync])
+AC_SUBST(RSYNC_NAME)
+
 dnl Checks for programs.
 AC_PROG_CC
 AC_PROG_INSTALL
@@ -340,4 +348,4 @@ AC_SUBST(OBJ_RESTORE)
 AC_SUBST(CC_SHOBJ_FLAG)
 AC_SUBST(BUILD_POPT)
 
-AC_OUTPUT(Makefile lib/dummy zlib/dummy)
+AC_OUTPUT(Makefile lib/dummy zlib/dummy rsync.h)
--- rsync.h Sun Jun 10 02:47:57 2001
+++ /dev/null   Sat Nov 11 12:59:35 2000
@@ -1,522 +0,0 @@
-/* 
-   Copyright (C) by Andrew Tridgell 1996, 2000
-   Copyright (C) Paul Mackerras 1996
-   Copyright (C) 2001 by Martin Pool [EMAIL PROTECTED]
-   
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*/
-
-#define False 0
-#define True 1
-
-#define BLOCK_SIZE 700
-#define RSYNC_RSH_ENV RSYNC_RSH
-
-#define RSYNC_NAME rsync
-#define RSYNCD_CONF /etc/rsyncd.conf
-
-#define DEFAULT_LOCK_FILE /var/run/rsyncd.lock
-#define URL_PREFIX rsync://
-
-#define BACKUP_SUFFIX ~
-
-/* a non-zero CHAR_OFFSET makes the rolling sum stronger, but is
-   incompatible with older versions :-( */
-#define CHAR_OFFSET 0
-
-
-#define FLAG_DELETE (10)
-#define SAME_MODE (11)
-#define SAME_RDEV (12)
-#define SAME_UID (13)
-#define SAME_GID (14)
-#define SAME_DIR (15)
-#define SAME_NAME SAME_DIR
-#define LONG_NAME (16)
-#define SAME_TIME (17)
-
-/* update this if you make incompatible changes */
-#define PROTOCOL_VERSION 24
-#define MIN_PROTOCOL_VERSION 15
-#define MAX_PROTOCOL_VERSION 30
-
-#define RSYNC_PORT 873
-
-#define SPARSE_WRITE_SIZE (1024)
-#define WRITE_SIZE (32*1024)
-#define CHUNK_SIZE (32*1024)
-#define MAX_MAP_SIZE (256*1024)
-#define IO_BUFFER_SIZE (4092)
-
-#define MAX_ARGS 1000
-
-#define MPLEX_BASE 7
-
-/* Log values.  I *think* what these mean is: FLOG goes to the server
- * logfile; FERROR and FINFO try to end up on the client, with
- * different levels of filtering. */
-enum logcode {FNONE=0, FERROR=1, FINFO=2, FLOG=3 };
-
-#include errcode.h
-
-#include config.h
-
-#if HAVE_REMSH
-#define RSYNC_RSH remsh
-#else
-#define RSYNC_RSH rsh
-#endif
-
-#include sys/types.h
-
-#ifdef HAVE_UNISTD_H
-#include unistd.h
-#endif
-#include stdio.h
-#include stddef.h
-
-#ifdef HAVE_SYS_PARAM_H
-#include sys/param.h
-#endif
-
-#ifdef HAVE_STDLIB_H
-#include stdlib.h
-#endif
-
-#ifdef HAVE_SYS_SOCKET_H
-#include sys/socket.h
-#endif
-
-#ifdef HAVE_STRING_H
-#include string.h
-#endif
-
-#ifdef HAVE_MALLOC_H
-#include malloc.h
-#endif
-
-#ifdef TIME_WITH_SYS_TIME
-#include sys/time.h
-#include time.h
-#else
-#ifdef HAVE_SYS_TIME_H
-#include sys/time.h
-#else
-#include time.h
-#endif
-#endif
-
-#ifdef HAVE_FCNTL_H
-#include fcntl.h
-#else
-#ifdef HAVE_SYS_FCNTL_H
-#include sys/fcntl.h
-#endif
-#endif
-
-#include sys/stat.h
-
-#ifdef HAVE_SYS_IOCTL_H
-#include sys/ioctl.h
-#endif
-
-#ifdef HAVE_SYS_FILIO_H
-#include sys/filio.h
-#endif
-
-#include signal.h
-#ifdef HAVE_SYS_WAIT_H
-#include sys/wait.h
-#endif
-#ifdef HAVE_CTYPE_H
-#include ctype.h
-#endif
-#ifdef HAVE_GRP_H
-#include grp.h
-#endif
-#include errno.h
-
-#ifdef HAVE_UTIME_H
-#include utime.h
-#endif
-
-#ifdef HAVE_SYS_SELECT_H
-#include sys/select.h
-#endif
-
-#ifdef HAVE_SYS_MODE_H
-/* apparently AIX needs this for S_ISLNK */
-#ifndef S_ISLNK
-#include sys/mode.h
-#endif
-#endif
-
-#ifdef HAVE_FNMATCH
-#include fnmatch.h
-#else
-#include lib/fnmatch.h
-#endif
-
-#ifdef HAVE_GLOB_H
-#include glob.h
-#endif
-
-/* these are needed for the uid/gid mapping code */
-#include pwd.h
-#include grp.h
-
-#include stdarg.h
-#include netinet/in.h
-#include arpa/inet.h
-#include netdb.h
-#include syslog.h
-#include