diff options
-rw-r--r-- | contrib/bsnmp/lib/asn1.c | 10 | ||||
-rw-r--r-- | contrib/bsnmp/lib/asn1.h | 10 | ||||
-rw-r--r-- | contrib/bsnmp/lib/snmpclient.c | 8 | ||||
-rw-r--r-- | contrib/bsnmp/snmp_ntp/snmp_ntp.c | 10 | ||||
-rw-r--r-- | contrib/bsnmp/snmpd/main.c | 4 |
5 files changed, 32 insertions, 10 deletions
diff --git a/contrib/bsnmp/lib/asn1.c b/contrib/bsnmp/lib/asn1.c index 67c1e25..d72eee5 100644 --- a/contrib/bsnmp/lib/asn1.c +++ b/contrib/bsnmp/lib/asn1.c @@ -43,6 +43,16 @@ #include <assert.h> #include "asn1.h" +#if !defined(INT32_MIN) +#define INT32_MIN (-0x7fffffff-1) +#endif +#if !defined(INT32_MAX) +#define INT32_MAX (0x7fffffff) +#endif +#if !defined(UINT32_MAX) +#define UINT32_MAX (0xffffffff) +#endif + static void asn_error_func(const struct asn_buf *, const char *, ...); void (*asn_error)(const struct asn_buf *, const char *, ...) = asn_error_func; diff --git a/contrib/bsnmp/lib/asn1.h b/contrib/bsnmp/lib/asn1.h index 9f7749a..ccbafc9 100644 --- a/contrib/bsnmp/lib/asn1.h +++ b/contrib/bsnmp/lib/asn1.h @@ -179,14 +179,4 @@ enum { ASN_EXCEPT_ENDOFMIBVIEW = 0x02, }; -#if !defined(INT32_MIN) -#define INT32_MIN (-0x7fffffff-1) -#endif -#if !defined(INT32_MAX) -#define INT32_MAX (0x7fffffff) -#endif -#if !defined(UINT32_MAX) -#define UINT32_MAX (0xffffffff) -#endif - #endif diff --git a/contrib/bsnmp/lib/snmpclient.c b/contrib/bsnmp/lib/snmpclient.c index fa794f3..5e7d351 100644 --- a/contrib/bsnmp/lib/snmpclient.c +++ b/contrib/bsnmp/lib/snmpclient.c @@ -64,6 +64,14 @@ #include "snmpclient.h" #include "snmppriv.h" +#if !defined(INT32_MAX) +#define INT32_MAX (0x7fffffff) +#endif +#if !defined(UINT32_MAX) +#define UINT32_MAX (0xffffffff) +#endif + + /* global context */ struct snmp_client snmp_client; diff --git a/contrib/bsnmp/snmp_ntp/snmp_ntp.c b/contrib/bsnmp/snmp_ntp/snmp_ntp.c index b798847..830c01f 100644 --- a/contrib/bsnmp/snmp_ntp/snmp_ntp.c +++ b/contrib/bsnmp/snmp_ntp/snmp_ntp.c @@ -55,6 +55,16 @@ #include "ntp_tree.h" #include "ntp_oid.h" +#if !defined(INT32_MIN) +#define INT32_MIN (-0x7fffffff-1) +#endif +#if !defined(INT32_MAX) +#define INT32_MAX (0x7fffffff) +#endif +#if !defined(UINT32_MAX) +#define UINT32_MAX (0xffffffff) +#endif + #define NTPC_MAX 576 #define NTPC_VERSION 3 #define NTPC_MODE 6 diff --git a/contrib/bsnmp/snmpd/main.c b/contrib/bsnmp/snmpd/main.c index 676c2027..37ae33e 100644 --- a/contrib/bsnmp/snmpd/main.c +++ b/contrib/bsnmp/snmpd/main.c @@ -57,6 +57,10 @@ #include "tree.h" #include "oid.h" +#if !defined(INT32_MAX) +#define INT32_MAX (0x7fffffff) +#endif + #define PATH_PID "/var/run/%s.pid" #define PATH_CONFIG "/etc/%s.config" |