From 84ce9b455d04e7f145d43ef8dac2ddc59e41802d Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Thu, 26 May 2005 20:12:15 +1000 Subject: - (dtucker) [configure.ac openbsd-compat/getrrsetbyname.c] Bug #1033: Provide templates for _getshort and _getlong if missing to prevent compiler warnings on Linux. --- ChangeLog | 11 +++++++---- configure.ac | 3 ++- openbsd-compat/getrrsetbyname.c | 4 ++++ 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4dec60c1b..148199a55 100644 --- a/ChangeLog +++ b/ChangeLog @@ -98,9 +98,12 @@ - (dtucker) [regress/reexec.sh] Add ${EXEEXT} so this test also works on Cygwin. - (dtucker) [auth-pam.c] Bug #1033: Fix warnings building with PAM on Linux: - warning: dereferencing type-punned pointer will break strict-aliasing rules - warning: passing arg 3 of `pam_get_item' from incompatible pointer type - The type-punned pointer fix is based on a patch from SuSE's rpm. ok djm@ + warning: dereferencing type-punned pointer will break strict-aliasing rules + warning: passing arg 3 of `pam_get_item' from incompatible pointer type + The type-punned pointer fix is based on a patch from SuSE's rpm. ok djm@ + - (dtucker) [configure.ac openbsd-compat/getrrsetbyname.c] Bug #1033: Provide + templates for _getshort and _getlong if missing to prevent compiler warnings + on Linux. 20050524 - (djm) [contrib/caldera/openssh.spec contrib/redhat/openssh.spec] @@ -2600,4 +2603,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.3788 2005/05/26 09:59:48 dtucker Exp $ +$Id: ChangeLog,v 1.3789 2005/05/26 10:12:15 dtucker Exp $ diff --git a/configure.ac b/configure.ac index 20c8f1587..fd8218aea 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -# $Id: configure.ac,v 1.260 2005/04/24 07:52:23 dtucker Exp $ +# $Id: configure.ac,v 1.261 2005/05/26 10:12:15 dtucker Exp $ # # Copyright (c) 1999-2004 Damien Miller # @@ -2402,6 +2402,7 @@ int main() AC_MSG_RESULT(no)]) ]) AC_CHECK_FUNCS(_getshort _getlong) + AC_CHECK_DECLS([_getshort, _getlong]) AC_CHECK_MEMBER(HEADER.ad, [AC_DEFINE(HAVE_HEADER_AD)],, [#include ]) diff --git a/openbsd-compat/getrrsetbyname.c b/openbsd-compat/getrrsetbyname.c index 4e869c4df..2016ffe31 100644 --- a/openbsd-compat/getrrsetbyname.c +++ b/openbsd-compat/getrrsetbyname.c @@ -144,6 +144,8 @@ _getshort(msgp) GETSHORT(u, msgp); return (u); } +#elif defined(HAVE_DECL__GETSHORT) && (HAVE_DECL__GETSHORT == 0) +u_int16_t _getshort(register const u_char *); #endif #ifndef HAVE__GETLONG @@ -156,6 +158,8 @@ _getlong(msgp) GETLONG(u, msgp); return (u); } +#elif defined(HAVE_DECL__GETLONG) && (HAVE_DECL__GETLONG == 0) +u_int32_t _getlong(register const u_char *); #endif int -- cgit v1.2.3