support.h (133211) | support.h (156066) |
---|---|
1/* | 1/* |
2 * Copyright (C) 2004 | 2 * Copyright (C) 2004-2005 |
3 * Hartmut Brandt. 4 * All rights reserved. 5 * 6 * Author: Harti Brandt <harti@freebsd.org> 7 * 8 * Redistribution and use in source and binary forms, with or without 9 * modification, are permitted provided that the following conditions 10 * are met: --- 10 unchanged lines hidden (view full) --- 21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * | 3 * Hartmut Brandt. 4 * All rights reserved. 5 * 6 * Author: Harti Brandt <harti@freebsd.org> 7 * 8 * Redistribution and use in source and binary forms, with or without 9 * modification, are permitted provided that the following conditions 10 * are met: --- 10 unchanged lines hidden (view full) --- 21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * |
29 * $Begemot: bsnmp/lib/support.h,v 1.1 2004/08/06 08:47:59 brandt Exp $ | 29 * $Begemot: bsnmp/lib/support.h,v 1.2 2005/10/06 07:14:59 brandt_h Exp $ |
30 * 31 * Functions that are missing on certain systems. This header file is not 32 * to be installed. 33 */ 34#ifndef bsnmp_support_h_ 35#define bsnmp_support_h_ 36 37#include <sys/cdefs.h> --- 25 unchanged lines hidden (view full) --- 63 64int getaddrinfo(const char *, const char *, const struct addrinfo *, 65 struct addrinfo **); 66const char *gai_strerror(int); 67void freeaddrinfo(struct addrinfo *); 68 69#endif 70 | 30 * 31 * Functions that are missing on certain systems. This header file is not 32 * to be installed. 33 */ 34#ifndef bsnmp_support_h_ 35#define bsnmp_support_h_ 36 37#include <sys/cdefs.h> --- 25 unchanged lines hidden (view full) --- 63 64int getaddrinfo(const char *, const char *, const struct addrinfo *, 65 struct addrinfo **); 66const char *gai_strerror(int); 67void freeaddrinfo(struct addrinfo *); 68 69#endif 70 |
71/* 72 * For systems with missing stdint.h or inttypes.h 73 */ 74#if !defined(INT32_MIN) 75#define INT32_MIN (-0x7fffffff-1) |
|
71#endif | 76#endif |
77#if !defined(INT32_MAX) 78#define INT32_MAX (0x7fffffff) 79#endif 80#if !defined(UINT32_MAX) 81#define UINT32_MAX (0xffffffff) 82#endif 83 84/* 85 * Systems missing SA_SIZE(). Taken from FreeBSD net/route.h:1.63 86 */ 87#ifndef SA_SIZE 88 89#define SA_SIZE(sa) \ 90 ( (!(sa) || ((struct sockaddr *)(sa))->sa_len == 0) ? \ 91 sizeof(long) : \ 92 1 + ( (((struct sockaddr *)(sa))->sa_len - 1) | (sizeof(long) - 1) ) ) 93 94#endif 95 96#endif |
|