On Thu, 28 Jun 2007 22:06:03 +0900
Mitsuru Chinen <[EMAIL PROTECTED]> wrote:

> Then, how about the attached patch?

Oops, I'm sorry. I forgot to delete target code,
the definition of SIZEOF_LONG_LONG.

Best Regards,
----
Mitsuru Chinen <[EMAIL PROTECTED]>


Index: snmplib/snmp_client.c
===================================================================
--- snmplib/snmp_client.c       (revision 16563)
+++ snmplib/snmp_client.c       (working copy)
@@ -807,16 +807,11 @@
                 }
             }
 #endif
-#if SIZEOF_LONG != SIZEOF_LONG_LONG
-#if defined (WIN32) && !defined (mingw32)
-            else if (vars->val_len == sizeof(__int64)){
-                const unsigned __int64   *val_ullong
-                    = (const unsigned __int64 *) value;
-#else
-                else if (vars->val_len == sizeof(long long)){
-                const unsigned long long   *val_ullong
-                    = (const unsigned long long *) value;
-#endif
+#if HAVE_UINT64_T
+            else if (vars->val_len == sizeof(uint64_t)){
+                const uint64_t *val_ullong
+                    = (const uint64_t *) value;
+
                 *(vars->val.integer) = (long) *val_ullong;
                 if (*(vars->val.integer) > 0xffffffff) {
                     snmp_log(LOG_ERR,"truncating integer value > 32 bits\n");
Index: include/net-snmp/types.h
===================================================================
--- include/net-snmp/types.h    (revision 16563)
+++ include/net-snmp/types.h    (working copy)
@@ -157,8 +157,10 @@
 #ifndef HAVE_UINT64_T
 #ifdef HAVE_U_INT64_T
 typedef u_int64_t        uint64_t;
+#define HAVE_UINT64_T 1
 #elif defined(INT64_T)
 typedef unsigned INT64_T uint64_t;
+#define HAVE_UINT64_T 1
 #endif
 #endif
 
Index: win32/net-snmp/net-snmp-config.h.in
===================================================================
--- win32/net-snmp/net-snmp-config.h.in (revision 16563)
+++ win32/net-snmp/net-snmp-config.h.in (working copy)
@@ -933,9 +933,6 @@
 /* The size of a `long', as computed by sizeof. */
 #define SIZEOF_LONG 4
 
-/* The size of a `long long', as computed by sizeof. */
-#define SIZEOF_LONG_LONG 8
-
 /* The size of a `short', as computed by sizeof. */
 #define SIZEOF_SHORT 2
 
Index: win32/net-snmp/net-snmp-config.h
===================================================================
--- win32/net-snmp/net-snmp-config.h    (revision 16563)
+++ win32/net-snmp/net-snmp-config.h    (working copy)
@@ -933,9 +933,6 @@
 /* The size of a `long', as computed by sizeof. */
 #define SIZEOF_LONG 4
 
-/* The size of a `long long', as computed by sizeof. */
-#define SIZEOF_LONG_LONG 8
-
 /* The size of a `short', as computed by sizeof. */
 #define SIZEOF_SHORT 2
 

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to