[csw-devel] SF.net SVN: gar:[20231] csw/mgar/pkg/mosh/trunk
dmichelsen at users.sourceforge.net
dmichelsen at users.sourceforge.net
Mon Jan 28 10:42:57 CET 2013
Revision: 20231
http://gar.svn.sourceforge.net/gar/?rev=20231&view=rev
Author: dmichelsen
Date: 2013-01-28 09:42:57 +0000 (Mon, 28 Jan 2013)
Log Message:
-----------
mosh/trunk: Cleanup of old stuff
Modified Paths:
--------------
csw/mgar/pkg/mosh/trunk/Makefile
csw/mgar/pkg/mosh/trunk/checksums
Removed Paths:
-------------
csw/mgar/pkg/mosh/trunk/files/0001-Do-not-use-libutil.patch
csw/mgar/pkg/mosh/trunk/files/0001-Hack-around-so-it-compiles-on-Solaris.patch
csw/mgar/pkg/mosh/trunk/files/0001-Test-on-inttypes.h-in-addition-to-stdint.h-and-don-t.patch
csw/mgar/pkg/mosh/trunk/files/0002-Various-Solaris-fixes.patch
Modified: csw/mgar/pkg/mosh/trunk/Makefile
===================================================================
--- csw/mgar/pkg/mosh/trunk/Makefile 2013-01-28 08:50:09 UTC (rev 20230)
+++ csw/mgar/pkg/mosh/trunk/Makefile 2013-01-28 09:42:57 UTC (rev 20231)
@@ -10,14 +10,6 @@
MASTER_SITES = https://github.com/downloads/keithw/mosh/
DISTFILES = $(DISTNAME).tar.gz
-#PATCHFILES += 0001-Test-on-inttypes.h-in-addition-to-stdint.h-and-don-t.patch
-#PATCHFILES += 0002-Various-Solaris-fixes.patch
-
-#PATCHFILES += 0001-Hack-around-so-it-compiles-on-Solaris.patch
-#PATCHFILES += 0001-Do-not-use-libutil.patch
-
-# Functions betoh64 from http://licq.sourcearchive.com/documentation/1.3.8/licq__byteorder_8h-source.html
-
PATCHFILES += 0001-Add-missing-include.patch
BUILD_DEP_PKGS += CSWboost-gcc-dev
@@ -47,21 +39,11 @@
GARCOMPILER = GCC4
-# See https://forums.oracle.com/forums/thread.jspa?threadID=2019232
-#EXTRA_CPPFLAGS += -D__aligned__=aligned
-
EXTRA_CONFIGURE_EXPORTS += PROTOC
CONFIGURE_ENV_PROTOC = $(prefix)/gxx/bin/protoc
EXTRA_INC += $(prefix)/gxx/include
EXTRA_LIB += $(prefix)/gxx/lib
-#EXTRA_LINKER_FLAGS += -lsocket -lnsl
-
include gar/category.mk
-xxxpost-patch-modulated:
- -cd $(WORKSRC) && /opt/csw/bin/autoreconf -fi
- @# These are generated protobuf files, regenerate later
- -cd $(WORKSRC)/src/protobufs && rm -f *.cc *.h
- @$(MAKECOOKIE)
Modified: csw/mgar/pkg/mosh/trunk/checksums
===================================================================
--- csw/mgar/pkg/mosh/trunk/checksums 2013-01-28 08:50:09 UTC (rev 20230)
+++ csw/mgar/pkg/mosh/trunk/checksums 2013-01-28 09:42:57 UTC (rev 20231)
@@ -1 +0,0 @@
-39c20391c84e639fcb51581c56cee762 mosh-1.2.3.tar.gz
Deleted: csw/mgar/pkg/mosh/trunk/files/0001-Do-not-use-libutil.patch
===================================================================
--- csw/mgar/pkg/mosh/trunk/files/0001-Do-not-use-libutil.patch 2013-01-28 08:50:09 UTC (rev 20230)
+++ csw/mgar/pkg/mosh/trunk/files/0001-Do-not-use-libutil.patch 2013-01-28 09:42:57 UTC (rev 20231)
@@ -1,25 +0,0 @@
-From f03a4727da805d97851110fb70851783b87c1a15 Mon Sep 17 00:00:00 2001
-From: Dagobert Michelsen <da\xC2m at opencsw.org>
-Date: Tue, 22 May 2012 14:50:12 +0200
-Subject: [PATCH] Do not use libutil
-
----
- src/frontend/Makefile.am | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/frontend/Makefile.am b/src/frontend/Makefile.am
-index 3716586..0bf8972 100644
---- a/src/frontend/Makefile.am
-+++ b/src/frontend/Makefile.am
-@@ -9,7 +9,7 @@ else
- LDADD += $(STDDJB_LDFLAGS)
- endif
-
--mosh_server_LDADD = $(LDADD) -lutil
-+mosh_server_LDADD = $(LDADD)
-
- bin_PROGRAMS =
-
---
-1.7.10
-
Deleted: csw/mgar/pkg/mosh/trunk/files/0001-Hack-around-so-it-compiles-on-Solaris.patch
===================================================================
--- csw/mgar/pkg/mosh/trunk/files/0001-Hack-around-so-it-compiles-on-Solaris.patch 2013-01-28 08:50:09 UTC (rev 20230)
+++ csw/mgar/pkg/mosh/trunk/files/0001-Hack-around-so-it-compiles-on-Solaris.patch 2013-01-28 09:42:57 UTC (rev 20231)
@@ -1,419 +0,0 @@
-From cfc71fb00b2ead54002c2501f4292dca33b6f815 Mon Sep 17 00:00:00 2001
-From: Dagobert Michelsen <da\xC2m at opencsw.org>
-Date: Tue, 22 May 2012 14:37:47 +0200
-Subject: [PATCH] Hack around so it compiles on Solaris
-
----
- configure.ac | 4 +-
- src/crypto/base64.h | 2 +-
- src/crypto/byteorder.h | 34 ++++++++++++++
- src/crypto/crypto.cc | 3 +-
- src/crypto/crypto.h | 5 ++
- src/crypto/ocb.cc | 9 +++-
- src/crypto/prng.h | 5 ++
- src/frontend/mosh-client.cc | 4 +-
- src/frontend/mosh-server.cc | 91 +++++++++++++++++++++++++++++++++++++
- src/frontend/stmclient.cc | 10 +++-
- src/network/network.cc | 4 +-
- src/network/network.h | 2 +-
- src/network/transportsender.cc | 1 +
- src/statesync/completeterminal.cc | 2 +
- src/terminal/parser.cc | 3 +-
- src/util/dos_assert.h | 4 ++
- src/util/fatal_assert.h | 4 ++
- 17 files changed, 175 insertions(+), 12 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 528a7a9..b526d59 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -101,7 +101,7 @@ AS_IF([test x"$with_skalibs" != xno],
- AC_SUBST([STDDJB_LDFLAGS], ["$SKALIBS_LDFLAGS -lstddjb"])])
-
- # Checks for header files.
--AC_CHECK_HEADERS([arpa/inet.h curses.h fcntl.h langinfo.h limits.h locale.h netinet/in.h stddef.h stdint.h stdlib.h string.h sys/ioctl.h sys/resource.h sys/socket.h sys/time.h term.h termios.h unistd.h wchar.h wctype.h], [], [AC_MSG_ERROR([Missing required header file.])])
-+AC_CHECK_HEADERS([arpa/inet.h curses.h fcntl.h langinfo.h limits.h locale.h netinet/in.h stddef.h stdint.h inttypes.h stdlib.h string.h sys/ioctl.h sys/resource.h sys/socket.h sys/time.h term.h termios.h unistd.h wchar.h wctype.h], [], [])
-
- AC_CHECK_HEADERS([pty.h util.h])
-
-@@ -157,7 +157,7 @@ AC_CHECK_DECL([htobe64],
- [AC_CHECK_DECL([OSSwapHostToBigInt64],
- [AC_DEFINE([HAVE_OSX_SWAP], [1],
- [Define if OSSwapHostToBigInt64 and friends exist.])],
-- [AC_MSG_ERROR([Unable to find byte swapping functions])],
-+ [],
- [[#include <libkern/OSByteOrder.h>]])],
- [[#include <endian.h>]])
-
-diff --git a/src/crypto/base64.h b/src/crypto/base64.h
-index 7593e59..46eab7a 100644
---- a/src/crypto/base64.h
-+++ b/src/crypto/base64.h
-@@ -27,7 +27,7 @@
- # include <stddef.h>
-
- /* Get bool. */
--# include <stdbool.h>
-+/* # include <stdbool.h> */
-
- /* This uses that the expression (n+(k-1))/k means the smallest
- integer >= n/k, i.e., the ceiling of n/k. */
-diff --git a/src/crypto/byteorder.h b/src/crypto/byteorder.h
-index f0c7f06..758c33e 100644
---- a/src/crypto/byteorder.h
-+++ b/src/crypto/byteorder.h
-@@ -31,4 +31,38 @@
- # define be16toh OSSwapBigToHostInt16
- #endif
-
-+/* Taken from http://licq.sourcearchive.com/documentation/1.3.8/licq__byteorder_8h-source.html */
-+
-+// Solaris header for endian and byte swap
-+#if defined(__sun) || defined(sun)
-+# include <sys/byteorder.h>
-+
-+// Solaris defines endian by setting _LITTLE_ENDIAN or _BIG_ENDIAN
-+# ifdef _BIG_ENDIAN
-+# define IS_BIG_ENDIAN
-+# endif
-+# ifdef _LITTLE_ENDIAN
-+# define IS_LITTLE_ENDIAN
-+# endif
-+
-+// Solaris 10 defines bswap functions: BSWAP_16, BSWAP_32, BSWAP_64
-+// Solaris 10 defines conversion functions: BE_16, BE_32, BE_64, LE_16, LE_32, LE_64
-+// BSD defines conversion functions: betoh16, betoh32, betoh64, letoh16, letoh32, letoh64
-+# define betoh16(x) BE_16(x)
-+# define letoh16(x) LE_16(x)
-+# define betoh32(x) BE_32(x)
-+# define letoh32(x) LE_32(x)
-+# define betoh64(x) BE_64(x)
-+# define letoh64(x) LE_64(x)
-+
-+#define htobe16(x) BE_16(x)
-+#define be16toh(x) BE_16(x)
-+#define htobe32(x) BE_32(x)
-+#define be32toh(x) BE_32(x)
-+#define htobe64(x) BE_64(x)
-+#define be64toh(x) BE_64(x)
-+
-+#endif
-+
-+
- #endif
-diff --git a/src/crypto/crypto.cc b/src/crypto/crypto.cc
-index e4f928f..497c6ea 100644
---- a/src/crypto/crypto.cc
-+++ b/src/crypto/crypto.cc
-@@ -263,7 +263,8 @@ Message Session::decrypt( string ciphertext )
- exit( 1 );
- }
-
-- Nonce __attribute__((__aligned__ (16))) nonce( str, 8 );
-+ /* Nonce __attribute__((__aligned__ (16))) nonce( str, 8 ); */
-+ Nonce nonce( str, 8 );
- char *body = (char *)aligned_alloc( body_len );
- memcpy( body, str + 8, body_len );
-
-diff --git a/src/crypto/crypto.h b/src/crypto/crypto.h
-index 1a2d897..b557b51 100644
---- a/src/crypto/crypto.h
-+++ b/src/crypto/crypto.h
-@@ -22,7 +22,12 @@
- #include "ae.h"
- #include <string>
- #include <string.h>
-+
-+#if defined( HAVE_STDINT_H )
- #include <stdint.h>
-+#elif defined( HAVE_INTTYPES_H )
-+ #include <inttypes.h>
-+#endif
-
- using std::string;
-
-diff --git a/src/crypto/ocb.cc b/src/crypto/ocb.cc
-index 8176896..10eec17 100644
---- a/src/crypto/ocb.cc
-+++ b/src/crypto/ocb.cc
-@@ -74,6 +74,9 @@
- #include <stdlib.h>
- #include <string.h>
-
-+#include "config.h"
-+#include <inttypes.h>
-+
- /* Define standard sized integers */
- #if defined(_MSC_VER) && (_MSC_VER < 1600)
- typedef unsigned __int8 uint8_t;
-@@ -81,7 +84,11 @@
- typedef unsigned __int64 uint64_t;
- typedef __int64 int64_t;
- #else
-- #include <stdint.h>
-+#if HAVE_STDINT_H
-+#include <stdint.h>
-+#elif HAVE_INTTYPES_H
-+ #include <inttypes.h>
-+#endif
- #endif
-
- /* Compiler-specific intrinsics and fixes: bswap64, ntz */
-diff --git a/src/crypto/prng.h b/src/crypto/prng.h
-index fdaf48e..121e087 100644
---- a/src/crypto/prng.h
-+++ b/src/crypto/prng.h
-@@ -23,7 +23,12 @@
- #include <stdio.h>
- #include <errno.h>
- #include <string.h>
-+
-+#if defined( HAVE_STDINT_H )
- #include <stdint.h>
-+#elif defined( HAVE_INTTYPES_H )
-+ #include <inttypes.h>
-+#endif
-
- #include "crypto.h"
-
-diff --git a/src/frontend/mosh-client.cc b/src/frontend/mosh-client.cc
-index 2c1709c..fdc5a76 100644
---- a/src/frontend/mosh-client.cc
-+++ b/src/frontend/mosh-client.cc
-@@ -27,8 +27,8 @@
- #include "locale_utils.h"
-
- /* these need to be included last because of conflicting defines */
--#include <curses.h>
--#include <term.h>
-+#include <ncurses/ncurses.h>
-+#include <ncurses/term.h>
-
- void usage( const char *argv0 ) {
- fprintf( stderr, "mosh-client (%s)\n", PACKAGE_STRING );
-diff --git a/src/frontend/mosh-server.cc b/src/frontend/mosh-server.cc
-index 27e8e3a..a79799e 100644
---- a/src/frontend/mosh-server.cc
-+++ b/src/frontend/mosh-server.cc
-@@ -212,6 +212,97 @@ int main( int argc, char *argv[] )
- }
- }
-
-+/* From http://bugs.mysql.com/bug.php?id=22429 */
-+
-+/* fork_pty() remplacement for Solarisk
-+ * This ignore the last two arguments
-+ * for the moment
-+ */
-+
-+#include <stdlib.h>
-+#include <unistd.h>
-+#include <fcntl.h>
-+#include <sys/ioctl.h>
-+#include <sys/stream.h>
-+#include <sys/stropts.h>
-+#include <sys/syscall.h>
-+#include <stdio.h>
-+#include <errno.h>
-+
-+int
-+forkpty (int *amaster,
-+ char *name,
-+ void *unused1,
-+ void *unused2)
-+{
-+ int master, slave;
-+ char *slave_name;
-+ pid_t pid;
-+
-+ master = open("/dev/ptmx", O_RDWR);
-+ if (master < 0)
-+ return -1;
-+
-+ if (grantpt (master) < 0)
-+ {
-+ close (master);
-+ return -1;
-+ }
-+
-+ if (unlockpt (master) < 0)
-+ {
-+ close (master);
-+ return -1;
-+ }
-+
-+ slave_name = ptsname (master);
-+ if (slave_name == NULL)
-+ {
-+ close (master);
-+ return -1;
-+ }
-+
-+ slave = open (slave_name, O_RDWR);
-+ if (slave < 0)
-+ {
-+ close (master);
-+ return -1;
-+ }
-+
-+ if (ioctl (slave, I_PUSH, "ptem") < 0
-+ || ioctl (slave, I_PUSH, "ldterm") < 0)
-+ {
-+ close (slave);
-+ close (master);
-+ return -1;
-+ }
-+
-+ if (amaster)
-+ *amaster = master;
-+
-+ if (name)
-+ strcpy (name, slave_name);
-+
-+ pid = fork ();
-+ switch (pid)
-+ {
-+ case -1: /* Error */
-+ return -1;
-+ case 0: /* Child */
-+ close (master);
-+ dup2 (slave, STDIN_FILENO);
-+ dup2 (slave, STDOUT_FILENO);
-+ dup2 (slave, STDERR_FILENO);
-+ return 0;
-+ default: /* Parent */
-+ close (slave);
-+ return pid;
-+ }
-+
-+ return -1;
-+}
-+
-+
- int run_server( const char *desired_ip, const char *desired_port,
- char *command[], const int colors ) {
- /* get initial window size */
-diff --git a/src/frontend/stmclient.cc b/src/frontend/stmclient.cc
-index 5a57783..d8ce05a 100644
---- a/src/frontend/stmclient.cc
-+++ b/src/frontend/stmclient.cc
-@@ -71,7 +71,15 @@ void STMClient::init( void )
- }
- #endif /* HAVE_IUTF8 */
-
-- cfmakeraw( &raw_termios );
-+ /* From http://www.sunmanagers.org/pipermail/summaries/2005-October/006871.html */
-+ // cfmakeraw(&raw_termios); // <--- not available on Solaris, so we better do it manually
-+ // begin of cfmakeraw replacement
-+ raw_termios.c_iflag &= ~(IGNBRK|BRKINT|PARMRK|ISTRIP|INLCR|IGNCR|ICRNL|IXON);
-+ raw_termios.c_oflag &= ~OPOST;
-+ raw_termios.c_lflag &= ~(ECHO|ECHONL|ICANON|ISIG|IEXTEN);
-+ raw_termios.c_cflag &= ~(CSIZE|PARENB);
-+ raw_termios.c_cflag |= CS8;
-+ // end of cfmakeraw replacement
-
- if ( tcsetattr( STDIN_FILENO, TCSANOW, &raw_termios ) < 0 ) {
- perror( "tcsetattr" );
-diff --git a/src/network/network.cc b/src/network/network.cc
-index a86b9dc..ea90130 100644
---- a/src/network/network.cc
-+++ b/src/network/network.cc
-@@ -194,11 +194,11 @@ Connection::Connection( const char *desired_ip, const char *desired_port ) /* se
- throw NetworkException( "Could not bind", errno );
- }
-
--bool Connection::try_bind( int socket, uint32_t s_addr, int port )
-+bool Connection::try_bind( int socket, uint32_t saddr, int port )
- {
- struct sockaddr_in local_addr;
- local_addr.sin_family = AF_INET;
-- local_addr.sin_addr.s_addr = s_addr;
-+ local_addr.sin_addr.s_addr = saddr;
-
- int search_low = PORT_RANGE_LOW, search_high = PORT_RANGE_HIGH;
-
-diff --git a/src/network/network.h b/src/network/network.h
-index dd9d79b..e1d4123 100644
---- a/src/network/network.h
-+++ b/src/network/network.h
-@@ -77,7 +77,7 @@ namespace Network {
- static const int PORT_RANGE_LOW = 60001;
- static const int PORT_RANGE_HIGH = 60999;
-
-- static bool try_bind( int socket, uint32_t s_addr, int port );
-+ static bool try_bind( int socket, uint32_t saddr, int port );
-
- int sock;
- bool has_remote_addr;
-diff --git a/src/network/transportsender.cc b/src/network/transportsender.cc
-index 2566bcc..0fbb0ac 100644
---- a/src/network/transportsender.cc
-+++ b/src/network/transportsender.cc
-@@ -23,6 +23,7 @@
- #include <stdio.h>
- #include <stdlib.h>
- #include <time.h>
-+#include <limits.h> /* for INT_MAX */
-
- #include "transportsender.h"
- #include "transportfragment.h"
-diff --git a/src/statesync/completeterminal.cc b/src/statesync/completeterminal.cc
-index 8f37145..29cf50b 100644
---- a/src/statesync/completeterminal.cc
-+++ b/src/statesync/completeterminal.cc
-@@ -19,6 +19,8 @@
- #include <boost/typeof/typeof.hpp>
- #include <boost/lambda/lambda.hpp>
-
-+#include <limits.h> /* for INT_MAX */
-+
- #include "completeterminal.h"
- #include "fatal_assert.h"
-
-diff --git a/src/terminal/parser.cc b/src/terminal/parser.cc
-index 227763f..0de6ff4 100644
---- a/src/terminal/parser.cc
-+++ b/src/terminal/parser.cc
-@@ -20,7 +20,8 @@
- #include <typeinfo>
- #include <errno.h>
- #include <wchar.h>
--#include <stdint.h>
-+/* #include <stdint.h> */
-+#include <inttypes.h>
-
- #include "parser.h"
-
-diff --git a/src/util/dos_assert.h b/src/util/dos_assert.h
-index eb84585..6032e97 100644
---- a/src/util/dos_assert.h
-+++ b/src/util/dos_assert.h
-@@ -32,6 +32,10 @@ static void dos_detected( const char *expression, const char *file, int line, co
- throw Crypto::CryptoException( buffer );
- }
-
-+#ifndef __STRING
-+#define __STRING(x) #x
-+#endif
-+
- #define dos_assert(expr) \
- ((expr) \
- ? (void)0 \
-diff --git a/src/util/fatal_assert.h b/src/util/fatal_assert.h
-index e5bf961..b9efbb8 100644
---- a/src/util/fatal_assert.h
-+++ b/src/util/fatal_assert.h
-@@ -29,6 +29,10 @@ static void fatal_error( const char *expression, const char *file, int line, con
- exit( 2 );
- }
-
-+#ifndef __STRING
-+#define __STRING(x) #x
-+#endif
-+
- #define fatal_assert(expr) \
- ((expr) \
- ? (void)0 \
---
-1.7.10
-
Deleted: csw/mgar/pkg/mosh/trunk/files/0001-Test-on-inttypes.h-in-addition-to-stdint.h-and-don-t.patch
===================================================================
--- csw/mgar/pkg/mosh/trunk/files/0001-Test-on-inttypes.h-in-addition-to-stdint.h-and-don-t.patch 2013-01-28 08:50:09 UTC (rev 20230)
+++ csw/mgar/pkg/mosh/trunk/files/0001-Test-on-inttypes.h-in-addition-to-stdint.h-and-don-t.patch 2013-01-28 09:42:57 UTC (rev 20231)
@@ -1,26 +0,0 @@
-From 7bbb71c6ce9873cf1c53f555fd7f7a5726ba1248 Mon Sep 17 00:00:00 2001
-From: Dagobert Michelsen <da\xC2m at opencsw.org>
-Date: Sat, 14 Apr 2012 16:00:42 +0200
-Subject: [PATCH] Test on inttypes.h in addition to stdint.h and don't bail
- out
-
----
- configure.ac | 2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 528a7a9..2e03605 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -101,7 +101,7 @@ AS_IF([test x"$with_skalibs" != xno],
- AC_SUBST([STDDJB_LDFLAGS], ["$SKALIBS_LDFLAGS -lstddjb"])])
-
- # Checks for header files.
--AC_CHECK_HEADERS([arpa/inet.h curses.h fcntl.h langinfo.h limits.h locale.h netinet/in.h stddef.h stdint.h stdlib.h string.h sys/ioctl.h sys/resource.h sys/socket.h sys/time.h term.h termios.h unistd.h wchar.h wctype.h], [], [AC_MSG_ERROR([Missing required header file.])])
-+AC_CHECK_HEADERS([arpa/inet.h curses.h fcntl.h langinfo.h limits.h locale.h netinet/in.h stddef.h stdint.h inttypes.h stdlib.h string.h sys/ioctl.h sys/resource.h sys/socket.h sys/time.h term.h termios.h unistd.h wchar.h wctype.h], [], [])
-
- AC_CHECK_HEADERS([pty.h util.h])
-
---
-1.7.9
-
Deleted: csw/mgar/pkg/mosh/trunk/files/0002-Various-Solaris-fixes.patch
===================================================================
--- csw/mgar/pkg/mosh/trunk/files/0002-Various-Solaris-fixes.patch 2013-01-28 08:50:09 UTC (rev 20230)
+++ csw/mgar/pkg/mosh/trunk/files/0002-Various-Solaris-fixes.patch 2013-01-28 09:42:57 UTC (rev 20231)
@@ -1,169 +0,0 @@
-From a3f705dbf1e546b6564415a8694f975757b3f19e Mon Sep 17 00:00:00 2001
-From: Dagobert Michelsen <da\xC2m at opencsw.org>
-Date: Tue, 24 Apr 2012 23:27:33 +0200
-Subject: [PATCH] Various Solaris fixes
-
----
- configure.ac | 2 +-
- src/crypto/base64.h | 2 +-
- src/crypto/byteorder.h | 26 ++++++++++++++++++++++++++
- src/crypto/crypto.cc | 3 ++-
- src/crypto/crypto.h | 5 +++++
- src/crypto/ocb.cc | 9 ++++++++-
- src/crypto/prng.h | 5 +++++
- src/terminal/parser.cc | 3 ++-
- 8 files changed, 50 insertions(+), 5 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 2e03605..b526d59 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -157,7 +157,7 @@ AC_CHECK_DECL([htobe64],
- [AC_CHECK_DECL([OSSwapHostToBigInt64],
- [AC_DEFINE([HAVE_OSX_SWAP], [1],
- [Define if OSSwapHostToBigInt64 and friends exist.])],
-- [AC_MSG_ERROR([Unable to find byte swapping functions])],
-+ [],
- [[#include <libkern/OSByteOrder.h>]])],
- [[#include <endian.h>]])
-
-diff --git a/src/crypto/base64.h b/src/crypto/base64.h
-index 7593e59..46eab7a 100644
---- a/src/crypto/base64.h
-+++ b/src/crypto/base64.h
-@@ -27,7 +27,7 @@
- # include <stddef.h>
-
- /* Get bool. */
--# include <stdbool.h>
-+/* # include <stdbool.h> */
-
- /* This uses that the expression (n+(k-1))/k means the smallest
- integer >= n/k, i.e., the ceiling of n/k. */
-diff --git a/src/crypto/byteorder.h b/src/crypto/byteorder.h
-index f0c7f06..14a03de 100644
---- a/src/crypto/byteorder.h
-+++ b/src/crypto/byteorder.h
-@@ -31,4 +31,30 @@
- # define be16toh OSSwapBigToHostInt16
- #endif
-
-+/* Taken from http://licq.sourcearchive.com/documentation/1.3.8/licq__byteorder_8h-source.html */
-+
-+// Solaris header for endian and byte swap
-+#if defined(__sun) || defined(sun)
-+# include <sys/byteorder.h>
-+
-+// Solaris defines endian by setting _LITTLE_ENDIAN or _BIG_ENDIAN
-+# ifdef _BIG_ENDIAN
-+# define IS_BIG_ENDIAN
-+# endif
-+# ifdef _LITTLE_ENDIAN
-+# define IS_LITTLE_ENDIAN
-+# endif
-+
-+// Solaris 10 defines bswap functions: BSWAP_16, BSWAP_32, BSWAP_64
-+// Solaris 10 defines conversion functions: BE_16, BE_32, BE_64, LE_16, LE_32, LE_64
-+// BSD defines conversion functions: betoh16, betoh32, betoh64, letoh16, letoh32, letoh64
-+# define betoh64(x) BE_64(x)
-+# define letoh64(x) LE_64(x)
-+
-+#define htobe64(x) BE_64(x)
-+#define be64toh(x) BE_64(x)
-+
-+#endif
-+
-+
- #endif
-diff --git a/src/crypto/crypto.cc b/src/crypto/crypto.cc
-index e4f928f..497c6ea 100644
---- a/src/crypto/crypto.cc
-+++ b/src/crypto/crypto.cc
-@@ -263,7 +263,8 @@ Message Session::decrypt( string ciphertext )
- exit( 1 );
- }
-
-- Nonce __attribute__((__aligned__ (16))) nonce( str, 8 );
-+ /* Nonce __attribute__((__aligned__ (16))) nonce( str, 8 ); */
-+ Nonce nonce( str, 8 );
- char *body = (char *)aligned_alloc( body_len );
- memcpy( body, str + 8, body_len );
-
-diff --git a/src/crypto/crypto.h b/src/crypto/crypto.h
-index 1a2d897..20a4a76 100644
---- a/src/crypto/crypto.h
-+++ b/src/crypto/crypto.h
-@@ -22,7 +22,12 @@
- #include "ae.h"
- #include <string>
- #include <string.h>
-+
-+#if defined( HAVE_STDINT_H )
- #include <stdint.h>
-+#elif defined( HAVE_INTTYPES_H )
-+ #include <inttypes.h>
-+#endif
-
- using std::string;
-
-diff --git a/src/crypto/ocb.cc b/src/crypto/ocb.cc
-index 8176896..790d96a 100644
---- a/src/crypto/ocb.cc
-+++ b/src/crypto/ocb.cc
-@@ -74,6 +74,9 @@
- #include <stdlib.h>
- #include <string.h>
-
-+#include "config.h"
-+#include <inttypes.h>
-+
- /* Define standard sized integers */
- #if defined(_MSC_VER) && (_MSC_VER < 1600)
- typedef unsigned __int8 uint8_t;
-@@ -81,7 +84,11 @@
- typedef unsigned __int64 uint64_t;
- typedef __int64 int64_t;
- #else
-- #include <stdint.h>
-+#if HAVE_STDINT_H
-+#include <stdint.h>
-+#elif HAVE_INTTYPES_H
-+ #include <inttypes.h>
-+#endif
- #endif
-
- /* Compiler-specific intrinsics and fixes: bswap64, ntz */
-diff --git a/src/crypto/prng.h b/src/crypto/prng.h
-index fdaf48e..0d89d79 100644
---- a/src/crypto/prng.h
-+++ b/src/crypto/prng.h
-@@ -23,7 +23,12 @@
- #include <stdio.h>
- #include <errno.h>
- #include <string.h>
-+
-+#if defined( HAVE_STDINT_H )
- #include <stdint.h>
-+#elif defined( HAVE_INTTYPES_H )
-+ #include <inttypes.h>
-+#endif
-
- #include "crypto.h"
-
-diff --git a/src/terminal/parser.cc b/src/terminal/parser.cc
-index 227763f..0de6ff4 100644
---- a/src/terminal/parser.cc
-+++ b/src/terminal/parser.cc
-@@ -20,7 +20,8 @@
- #include <typeinfo>
- #include <errno.h>
- #include <wchar.h>
--#include <stdint.h>
-+/* #include <stdint.h> */
-+#include <inttypes.h>
-
- #include "parser.h"
-
---
-1.7.10
-
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the devel
mailing list