summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2001-03-19 12:56:14 +1100
committerDamien Miller <djm@mindrot.org>2001-03-19 12:56:14 +1100
commit753b1c05a5cae0b38289d9a7d080c1d931c9ce6c (patch)
tree80f61c8b9d3f6cb2b76c172b412b4bb94af5b1c2
parentffd0e10b9c44201017d17ef4e2d4b21bdfa7b393 (diff)
Better fix for long long
-rw-r--r--defines.h6
-rw-r--r--scp.c2
2 files changed, 6 insertions, 2 deletions
diff --git a/defines.h b/defines.h
index 9e493238..60896512 100644
--- a/defines.h
+++ b/defines.h
@@ -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
diff --git a/scp.c b/scp.c
index 3dcd194e..decb8e98 100644
--- a/scp.c
+++ b/scp.c
@@ -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);