From 7a24c346b07d672c3d95bb44f16a0133f5197e3d Mon Sep 17 00:00:00 2001 From: Martin Pool Date: Thu, 9 Nov 2000 09:05:14 +0000 Subject: [PATCH] Print a warning message in the version if the platform cannot support 32-bit ints --- io.c | 10 ++++++++-- options.c | 26 +++++++++++++++++++++----- 2 files changed, 29 insertions(+), 7 deletions(-) diff --git a/io.c b/io.c index b58eff0c..253344b0 100644 --- a/io.c +++ b/io.c @@ -1,5 +1,6 @@ -/* - Copyright (C) Andrew Tridgell 1996 +/* -*- c-file-style: "linux" -*- + + Copyright (C) 1996-2000 by Andrew Tridgell Copyright (C) Paul Mackerras 1996 This program is free software; you can redistribute it and/or modify @@ -507,6 +508,11 @@ void write_int(int f,int32 x) writefd(f,b,4); } + +/* + * Note: int64 may actually be a 32-bit type if ./configure couldn't find any + * 64-bit types on this platform. + */ void write_longint(int f, int64 x) { extern int remote_version; diff --git a/options.c b/options.c index 4176b328..be53d5a4 100644 --- a/options.c +++ b/options.c @@ -1,5 +1,6 @@ -/* - Copyright (C) Andrew Tridgell 1998 +/* -*- c-file-style: "linux" -*- + + Copyright (C) 1998-2000 by Andrew Tridgell 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 @@ -95,10 +96,27 @@ static int modify_window_set; struct in_addr socket_address = {INADDR_ANY}; + +static void print_rsync_version(void) +{ + rprintf(FINFO, "rsync version %s protocol version %d (%d-bit files)\n\n", + VERSION, PROTOCOL_VERSION, + sizeof(int64) * 8); + rprintf(FINFO, "Written by Andrew Tridgell and Paul Mackerras\n"); + rprintf(FINFO, "http://rsync.samba.org/\n"); +#ifdef NO_INT64 + rprintf(FINFO, "WARNING: no 64-bit integers on this platform!\n"); +#endif +} + + void usage(enum logcode F) { rprintf(F,"rsync version %s Copyright Andrew Tridgell and Paul Mackerras\n\n", VERSION); +#ifdef NO_INT64 + rprintf(F, "WARNING: no 64-bit integers on this platform!\n"); +#endif rprintf(F,"rsync is a file transfer program capable of efficient remote update\nvia a fast differencing algorithm.\n\n"); @@ -317,9 +335,7 @@ int parse_arguments(int argc, char *argv[], int frommain) switch (opt) { case OPT_VERSION: - rprintf(FINFO,"rsync version %s protocol version %d\n\n", - VERSION,PROTOCOL_VERSION); - rprintf(FINFO,"Written by Andrew Tridgell and Paul Mackerras\n"); + print_rsync_version(); exit_cleanup(0); case OPT_SUFFIX: -- 2.34.1