hacked code.
+20030428
+ - (bal) [defines.h progressmeter.c scp.c] Some more culling of non 64bit
+ hacked code.
+
20030427
- (bal) Bug #541: return; was dropped by mistake. Reported by
furrier@iglou.com
#ifndef HAVE_INT64_T
# if (SIZEOF_LONG_INT == 8)
typedef long int int64_t;
-# define HAVE_INT64_T 1
# else
# if (SIZEOF_LONG_LONG_INT == 8)
typedef long long int int64_t;
-# define HAVE_INT64_T 1
# endif
# endif
#endif
#ifndef HAVE_U_INT64_T
# if (SIZEOF_LONG_INT == 8)
typedef unsigned long int u_int64_t;
-# define HAVE_U_INT64_T 1
# else
# if (SIZEOF_LONG_LONG_INT == 8)
typedef unsigned long long int u_int64_t;
-# define HAVE_U_INT64_T 1
# endif
# endif
#endif
-#if !defined(HAVE_LONG_LONG_INT) && (SIZEOF_LONG_LONG_INT == 8)
-# define HAVE_LONG_LONG_INT 1
-#endif
#ifndef HAVE_U_CHAR
typedef unsigned char u_char;
nspaces = MIN(get_tty_width() - 79, sizeof(spaces) - 1);
-#ifdef HAVE_LONG_LONG_INT
snprintf(buf, sizeof(buf),
"\r%-45.45s%.*s%3d%% %4lld%c%c %3lld.%01d%cB/s",
curfile,
nspaces,
spaces,
ratio,
- (long long)abbrevsize,
+ (int64_t)abbrevsize,
prefixes[ai],
ai == 0 ? ' ' : 'B',
- (long long)(bytespersec / 1024),
+ (int64_t)(bytespersec / 1024),
(int)((bytespersec % 1024) * 10 / 1024),
prefixes[bi]
);
-#else
- /* XXX: Handle integer overflow? */
- snprintf(buf, sizeof(buf),
- "\r%-45.45s%.*s%3d%% %4lu%c%c %3lu.%01d%cB/s",
- curfile,
- nspaces,
- spaces,
- ratio,
- (u_long)abbrevsize,
- prefixes[ai],
- ai == 0 ? ' ' : 'B',
- (u_long)(bytespersec / 1024),
- (int)((bytespersec % 1024) * 10 / 1024),
- prefixes[bi]
- );
-#endif
if (cursize <= 0 || elapsed <= 0.0 || cursize > totalbytes) {
snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf),
goto next;
}
#define FILEMODEMASK (S_ISUID|S_ISGID|S_IRWXU|S_IRWXG|S_IRWXO)
-#ifdef HAVE_LONG_LONG_INT
snprintf(buf, sizeof buf, "C%04o %lld %s\n",
(u_int) (stb.st_mode & FILEMODEMASK),
- (long long)stb.st_size, last);
-#else
- /* XXX: Handle integer overflow? */
- snprintf(buf, sizeof buf, "C%04o %lu %s\n",
- (u_int) (stb.st_mode & FILEMODEMASK),
- (u_long) stb.st_size, last);
-#endif
+ (int64_t)stb.st_size, last);
if (verbose_mode) {
fprintf(stderr, "Sending file modes: %s", buf);
}