diff options
author | harti <harti@FreeBSD.org> | 2006-02-27 16:16:18 +0000 |
---|---|---|
committer | harti <harti@FreeBSD.org> | 2006-02-27 16:16:18 +0000 |
commit | 247524ddce71d1f56900276811136dfdbe38cc55 (patch) | |
tree | 8156bfffe30f91fdf58a22bd39fcc0704622e399 /contrib/bsnmp/lib | |
parent | 38bcf38e8ed377df49a5c02ef7a7102bf85e35e2 (diff) | |
parent | 9b4fc3d8f13de6a6c075d5b243b2e8370bd35367 (diff) | |
download | FreeBSD-src-247524ddce71d1f56900276811136dfdbe38cc55.zip FreeBSD-src-247524ddce71d1f56900276811136dfdbe38cc55.tar.gz |
This commit was generated by cvs2svn to compensate for changes in r156066,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'contrib/bsnmp/lib')
-rw-r--r-- | contrib/bsnmp/lib/asn1.c | 14 | ||||
-rw-r--r-- | contrib/bsnmp/lib/asn1.h | 2 | ||||
-rw-r--r-- | contrib/bsnmp/lib/snmpclient.c | 10 | ||||
-rw-r--r-- | contrib/bsnmp/lib/support.h | 29 |
4 files changed, 32 insertions, 23 deletions
diff --git a/contrib/bsnmp/lib/asn1.c b/contrib/bsnmp/lib/asn1.c index d72eee5..16b523d 100644 --- a/contrib/bsnmp/lib/asn1.c +++ b/contrib/bsnmp/lib/asn1.c @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Begemot: bsnmp/lib/asn1.c,v 1.29 2005/10/04 11:21:31 brandt_h Exp $ + * $Begemot: bsnmp/lib/asn1.c,v 1.31 2005/10/06 07:14:58 brandt_h Exp $ * * ASN.1 for SNMP. */ @@ -41,17 +41,9 @@ #include <inttypes.h> #endif #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 +#include "support.h" +#include "asn1.h" static void asn_error_func(const struct asn_buf *, const char *, ...); diff --git a/contrib/bsnmp/lib/asn1.h b/contrib/bsnmp/lib/asn1.h index ccbafc9..5748b14 100644 --- a/contrib/bsnmp/lib/asn1.h +++ b/contrib/bsnmp/lib/asn1.h @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Begemot: bsnmp/lib/asn1.h,v 1.19 2005/10/04 11:21:31 brandt_h Exp $ + * $Begemot: bsnmp/lib/asn1.h,v 1.20 2005/10/05 16:43:11 brandt_h Exp $ * * ASN.1 for SNMP */ diff --git a/contrib/bsnmp/lib/snmpclient.c b/contrib/bsnmp/lib/snmpclient.c index 5e7d351..b77543a 100644 --- a/contrib/bsnmp/lib/snmpclient.c +++ b/contrib/bsnmp/lib/snmpclient.c @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Begemot: bsnmp/lib/snmpclient.c,v 1.34 2005/10/04 14:32:42 brandt_h Exp $ + * $Begemot: bsnmp/lib/snmpclient.c,v 1.36 2005/10/06 07:14:58 brandt_h Exp $ * * Support functions for SNMP clients. */ @@ -64,14 +64,6 @@ #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/lib/support.h b/contrib/bsnmp/lib/support.h index 53aba2c..415c85b 100644 --- a/contrib/bsnmp/lib/support.h +++ b/contrib/bsnmp/lib/support.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004 + * Copyright (C) 2004-2005 * Hartmut Brandt. * All rights reserved. * @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Begemot: bsnmp/lib/support.h,v 1.1 2004/08/06 08:47:59 brandt Exp $ + * $Begemot: bsnmp/lib/support.h,v 1.2 2005/10/06 07:14:59 brandt_h Exp $ * * Functions that are missing on certain systems. This header file is not * to be installed. @@ -68,4 +68,29 @@ void freeaddrinfo(struct addrinfo *); #endif +/* + * For systems with missing stdint.h or inttypes.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 + +/* + * Systems missing SA_SIZE(). Taken from FreeBSD net/route.h:1.63 + */ +#ifndef SA_SIZE + +#define SA_SIZE(sa) \ + ( (!(sa) || ((struct sockaddr *)(sa))->sa_len == 0) ? \ + sizeof(long) : \ + 1 + ( (((struct sockaddr *)(sa))->sa_len - 1) | (sizeof(long) - 1) ) ) + +#endif + #endif |