This is a discussion on Patch 1728247 long long vs int64_t within the SNMP Coders forums, part of the Networking and Network Related category; Patch 1728247 added to types.h: #ifndef HAVE_INTMAX_T #ifdef SIZEOF_LONG_LONG typedef long long int intmax_t; #else typedef long intmax_t; #endif #...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Patch 1728247 added to types.h: #ifndef HAVE_INTMAX_T #ifdef SIZEOF_LONG_LONG typedef long long int intmax_t; #else typedef long intmax_t; #endif #endif #ifndef HAVE_INTMAX_T #ifdef SIZEOF_LONG_LONG typedef unsigned long long int uintmax_t; #else typedef unsigned long uintmax_t; #endif #endif This will not compile with MSVC 6 as *long long* and *unsigned long long* are not supported. __int64 should be used under Windows. __int64 was is used in snmp_client.c using an #ifdef for WIN32. I think MSVC 7 may support long long, but we are maintaining support for MSVC 6. I thought that the correct way to fix this was to change: typedef long long intmax_t; typedef unsigned long long uintmax_t; to: typedef int64_t intmax_t; typedef uint64_t uintmax_t; The Windows net-snmp-config.h defines HAVE_UINT64_T, and also has a typedef of: typedef unsigned __int64 uint64_t; Using int64_t and uint64_t compiles fine with Windows and Linux. Is this the preferred fix or should we just #ifdef Windows again? Alex ------------------------------------------------------------------------- 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 |
![]() |
| Thread Tools | |
| Display Modes | |
|
|