Better fix for long long

This commit is contained in:
Damien Miller 2001-03-19 12:56:14 +11:00
parent ffd0e10b9c
commit 753b1c05a5
2 changed files with 6 additions and 2 deletions

View File

@ -1,7 +1,7 @@
#ifndef _DEFINES_H
#define _DEFINES_H
/* $Id: defines.h,v 1.57 2001/03/18 23:09:28 djm Exp $ */
/* $Id: defines.h,v 1.58 2001/03/19 01:56:14 djm Exp $ */
/* Some platforms need this for the _r() functions */
#if !defined(_REENTRANT) && !defined(SNI)
@ -125,6 +125,10 @@ enum
/* If sys/types.h does not supply intXX_t, supply them ourselves */
/* (or die trying) */
#ifdef SIZEOF_LONG_LONG_INT
# define HAVE_LONG_LONG_INT
#endif
#ifndef HAVE_U_INT
typedef unsigned int u_int;
#endif

2
scp.c
View File

@ -545,7 +545,7 @@ syserr: run_err("%s: %s", name, strerror(errno));
goto next;
}
#define FILEMODEMASK (S_ISUID|S_ISGID|S_IRWXU|S_IRWXG|S_IRWXO)
#ifdef HAVE_INT64_T
#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);