PATCH: only typedef int64 if type does not already exist

"Bostock James" <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <84E219D8B81E5F4688C4A8992426CD8301318232@fr-par-mail01.comverse.com>
Hi,

The attached patch causes the int64 type to only be defined (in
gw/smsc/smsc_soap.c) if it does not already exist (as determined by the
autoconf AC_CHECK_TYPES macro). This patch fixes a compilation failure
on AIX when compiling in 64 bit mode.

-james
kannel.int64.patch (application/octet-stream, 1.7 KB)
Index: configure.in
===================================================================
RCS file: /home/cvs/gateway/configure.in,v
retrieving revision 1.177
diff -u -r1.177 configure.in
--- configure.in	2 Jul 2008 14:56:31 -0000	1.177
+++ configure.in	10 Jul 2008 13:41:59 -0000
@@ -199,6 +199,9 @@
 AC_SUBST(SIZEOF_LONG)
 AC_SUBST(SIZEOF_LONG_LONG)
 
+dnl Checks for types
+AC_CHECK_TYPES([int64], AC_DEFINE(HAVE_INT64))
+
 dnl Checks for libraries.
 
 AC_CHECK_LIB(m, log)
Index: gw-config.h.in
===================================================================
RCS file: /home/cvs/gateway/gw-config.h.in,v
retrieving revision 1.20
diff -u -r1.20 gw-config.h.in
--- gw-config.h.in	9 Jan 2008 20:07:01 -0000	1.20
+++ gw-config.h.in	10 Jul 2008 13:41:59 -0000
@@ -264,6 +264,9 @@
 /* Define if you have working semaphore (sem_t). */
 #undef HAVE_SEMAPHORE
 
+/* Define if you have int64. */
+#undef HAVE_INT64
+
 /* If we're using GCC, we can get it to check format function arguments. */
 #ifdef __GNUC__
     #define PRINTFLIKE(a,b) __attribute__((format(printf, a, b)))
Index: gw/smsc/smsc_soap.c
===================================================================
RCS file: /home/cvs/gateway/gw/smsc/smsc_soap.c,v
retrieving revision 1.20
diff -u -r1.20 smsc_soap.c
--- gw/smsc/smsc_soap.c	10 Mar 2008 09:37:42 -0000	1.20
+++ gw/smsc/smsc_soap.c	10 Jul 2008 13:42:00 -0000
@@ -223,7 +223,9 @@
 /* useful macros go here (some of these were ripped of other modules,
    so maybe its better to put them in a shared file) */
 #define	O_DESTROY(a)	{ if(a) octstr_destroy(a); a=NULL; }
+#ifndef HAVE_INT64
 typedef long long int64;
+#endif
  
 /*
  * SOAP module public API towards bearerbox
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.