This is a discussion on Re: Patch 1728247 long long vs int64_t within the SNMP Coders forums, part of the Networking and Network Related category; On Mon, 25 Jun 2007 00:29:23 +0200 Thomas Anders <thomas.anders@blue-cable.de> wrote: > ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
On Mon, 25 Jun 2007 00:29:23 +0200
Thomas Anders <thomas.anders@blue-cable.de> wrote: > Dave Shield wrote: > > Does such a setup define "SIZEOF_LONG_LONG" ? > > If so where? (And *why*?!) > > So what happens to the Windows builds if you remove "#define > SIZEOF_LONG_LONG 8" from win32/net-snmp/net-snmp-config.h? > > It looks like it'd just affect snmplib/snmp_client.c which could be > fixed if needed. As far as I read, the reason why "SIZE_OF_LONG_LONG" is defined is to go thorough the common code for 2 types of environment. One is the environment which has "long long", the other is the one of Windows environment which doesn't have "long long" but it has "__int64". I think it is a bit tricky to define "SIZE_OF_LONG_LONG" for such purpose. How about the attached proposal patch? Please note I haven't test it works or not, as I don't have such an Windows environment. Best Regards, ---- Mitsuru Chinen <mitch@linux.vnet.ibm.com> Index: snmplib/snmp_client.c ================================================== ================= --- snmplib/snmp_client.c (revision 16563) +++ snmplib/snmp_client.c (working copy) @@ -807,7 +807,7 @@ } } #endif -#if SIZEOF_LONG != SIZEOF_LONG_LONG +#if (SIZEOF_LONG != SIZEOF_LONG_LONG) || (defined (WIN32) && !defined (mingw32)) #if defined (WIN32) && !defined (mingw32) else if (vars->val_len == sizeof(__int64)){ const unsigned __int64 *val_ullong 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 Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/...et-snmp-coders |