cc & no 64bit int patches

Tim Rice tim at multitalents.net
Tue Jan 23 14:59:36 EST 2001


Here are a couple of patches against the CVS (Jan 22 18:41 PST)

Some C++ comments found their way into ssh.h

The no64.patch puts ifdefs around buffer_get_int64() 
now in bufaux.[c,h]

-- 
Tim Rice				Multitalents	(707) 887-1469
tim at multitalents.net

-------------- next part --------------
--- ssh.h.old	Mon Jan 22 18:40:58 2001
+++ ssh.h	Mon Jan 22 19:02:02 2001
@@ -25,8 +25,10 @@
 # include <sys/select.h>
 #endif
 
-//#include "rsa.h"
-//#include "cipher.h"
+/*
+#include "rsa.h"
+#include "cipher.h"
+*/
 
 /* Cipher used for encrypting authentication files. */
 #define SSH_AUTHFILE_CIPHER	SSH_CIPHER_3DES
-------------- next part --------------
--- bufaux.c.old	Mon Jan 22 18:40:22 2001
+++ bufaux.c	Mon Jan 22 19:15:04 2001
@@ -152,6 +152,7 @@
 	return GET_32BIT(buf);
 }
 
+#ifdef HAVE_U_INT64_T
 u_int64_t
 buffer_get_int64(Buffer *buffer)
 {
@@ -159,6 +160,7 @@
 	buffer_get(buffer, (char *) buf, 8);
 	return GET_64BIT(buf);
 }
+#endif
 
 /*
  * Stores an integer in the buffer in 4 bytes, msb first.
@@ -171,6 +173,7 @@
 	buffer_append(buffer, buf, 4);
 }
 
+#ifdef HAVE_U_INT64_T
 void
 buffer_put_int64(Buffer *buffer, u_int64_t value)
 {
@@ -178,6 +181,7 @@
 	PUT_64BIT(buf, value);
 	buffer_append(buffer, buf, 8);
 }
+#endif
 
 /*
  * Returns an arbitrary binary string from the buffer.  The string cannot
--- bufaux.h.old	Mon Jan 22 18:40:22 2001
+++ bufaux.h	Mon Jan 22 19:10:22 2001
@@ -31,11 +31,15 @@
 
 /* Returns an integer from the buffer (4 bytes, msb first). */
 u_int buffer_get_int(Buffer * buffer);
+#ifdef HAVE_U_INT64_T
 u_int64_t buffer_get_int64(Buffer *buffer);
+#endif
 
 /* Stores an integer in the buffer in 4 bytes, msb first. */
 void    buffer_put_int(Buffer * buffer, u_int value);
+#ifdef HAVE_U_INT64_T
 void	buffer_put_int64(Buffer *buffer, u_int64_t value);
+#endif
 
 /* Returns a character from the buffer (0 - 255). */
 int     buffer_get_char(Buffer * buffer);
--- defines.h.old	Mon Jan 22 18:40:32 2001
+++ defines.h	Mon Jan 22 19:45:41 2001
@@ -171,20 +171,22 @@
 #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_INTXX_T 1
+#   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_INTXX_T 1
+#   define HAVE_U_INT64_T 1
 #  endif
 # endif
 #endif


More information about the openssh-unix-dev mailing list