From 212cfc4b4869fbbe5b038f7480e67d26f60f1545 Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Wed, 3 Aug 2005 10:57:15 +1000 Subject: - (dtucker) [openbsd-compat/fake-rfc2553.h] Check for EAI_* defines individually and use a value less likely to collide with real values from netdb.h. Fixes compile warnings on FreeBSD 5.3. ok djm@ --- openbsd-compat/fake-rfc2553.h | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'openbsd-compat/fake-rfc2553.h') diff --git a/openbsd-compat/fake-rfc2553.h b/openbsd-compat/fake-rfc2553.h index 636792ed7..24a34d17a 100644 --- a/openbsd-compat/fake-rfc2553.h +++ b/openbsd-compat/fake-rfc2553.h @@ -1,4 +1,4 @@ -/* $Id: fake-rfc2553.h,v 1.10 2005/02/11 07:32:13 dtucker Exp $ */ +/* $Id: fake-rfc2553.h,v 1.11 2005/08/03 00:57:15 dtucker Exp $ */ /* * Copyright (C) 2000-2003 Damien Miller. All rights reserved. @@ -114,10 +114,16 @@ struct sockaddr_in6 { #endif /* !NI_MAXHOST */ #ifndef EAI_NODATA -# define EAI_NODATA 1 -# define EAI_MEMORY 2 -# define EAI_NONAME 3 -# define EAI_SYSTEM 4 +# define EAI_NODATA (MAX_INT - 1) +#endif +#ifndef EAI_MEMORY +# define EAI_MEMORY (MAX_INT - 2) +#endif +#ifndef EAI_NONAME +# define EAI_NONAME (MAX_INT - 3) +#endif +#ifndef EAI_SYSTEM +# define EAI_SYSTEM (MAX_INT - 4) #endif #ifndef HAVE_STRUCT_ADDRINFO -- cgit v1.2.3 From 9825697d3cf75e262dc81f01f7f6bf1e234306d3 Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Wed, 3 Aug 2005 15:36:21 +1000 Subject: - (dtucker) [openbsd-compat/fake-rfc2553.h] MAX_INT -> INT_MAX since the latter is specified in the standard. --- ChangeLog | 4 +++- openbsd-compat/fake-rfc2553.h | 10 +++++----- 2 files changed, 8 insertions(+), 6 deletions(-) (limited to 'openbsd-compat/fake-rfc2553.h') diff --git a/ChangeLog b/ChangeLog index 04fa21d0f..c0c2dbc05 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,8 @@ - (dtucker) [openbsd-compat/fake-rfc2553.h] Check for EAI_* defines individually and use a value less likely to collide with real values from netdb.h. Fixes compile warnings on FreeBSD 5.3. ok djm@ + - (dtucker) [openbsd-compat/fake-rfc2553.h] MAX_INT -> INT_MAX since the + latter is specified in the standard. 20050802 - (dtucker) OpenBSD CVS Sync @@ -2894,4 +2896,4 @@ - (djm) Trim deprecated options from INSTALL. Mention UsePAM - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu -$Id: ChangeLog,v 1.3861 2005/08/03 00:57:15 dtucker Exp $ +$Id: ChangeLog,v 1.3862 2005/08/03 05:36:21 dtucker Exp $ diff --git a/openbsd-compat/fake-rfc2553.h b/openbsd-compat/fake-rfc2553.h index 24a34d17a..cbcf7f727 100644 --- a/openbsd-compat/fake-rfc2553.h +++ b/openbsd-compat/fake-rfc2553.h @@ -1,4 +1,4 @@ -/* $Id: fake-rfc2553.h,v 1.11 2005/08/03 00:57:15 dtucker Exp $ */ +/* $Id: fake-rfc2553.h,v 1.12 2005/08/03 05:36:21 dtucker Exp $ */ /* * Copyright (C) 2000-2003 Damien Miller. All rights reserved. @@ -114,16 +114,16 @@ struct sockaddr_in6 { #endif /* !NI_MAXHOST */ #ifndef EAI_NODATA -# define EAI_NODATA (MAX_INT - 1) +# define EAI_NODATA (INT_MAX - 1) #endif #ifndef EAI_MEMORY -# define EAI_MEMORY (MAX_INT - 2) +# define EAI_MEMORY (INT_MAX - 2) #endif #ifndef EAI_NONAME -# define EAI_NONAME (MAX_INT - 3) +# define EAI_NONAME (INT_MAX - 3) #endif #ifndef EAI_SYSTEM -# define EAI_SYSTEM (MAX_INT - 4) +# define EAI_SYSTEM (INT_MAX - 4) #endif #ifndef HAVE_STRUCT_ADDRINFO -- cgit v1.2.3