summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorharti <harti@FreeBSD.org>2005-10-05 15:19:56 +0000
committerharti <harti@FreeBSD.org>2005-10-05 15:19:56 +0000
commit1973a24241e1546ff01c2e658c24e17f7ac6b29e (patch)
treea597f8aad14e9169ecd796ea3576f3baadc8ee18 /contrib
parentefb2dfa1774240830b3f74b7fe4ab8050cc1cda0 (diff)
downloadFreeBSD-src-1973a24241e1546ff01c2e658c24e17f7ac6b29e.zip
FreeBSD-src-1973a24241e1546ff01c2e658c24e17f7ac6b29e.tar.gz
Vendor fix for the build problem of snmp_pf. Move the fallback definitions
for U?INT32_{MAX,MIN} from asn1.h into the .c files that actually require them (the .h file doesn't refer to these macros).
Diffstat (limited to 'contrib')
-rw-r--r--contrib/bsnmp/lib/asn1.c10
-rw-r--r--contrib/bsnmp/lib/asn1.h10
-rw-r--r--contrib/bsnmp/lib/snmpclient.c8
-rw-r--r--contrib/bsnmp/snmp_ntp/snmp_ntp.c10
-rw-r--r--contrib/bsnmp/snmpd/main.c4
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"
OpenPOWER on IntegriCloud