cjs 2895: Fix configure check to compile with IBM Visual Age C compiler

- remove nested functions
- use char *pcap_version instead of char pcap_version[]

Changed the fix for the nested functions to use the mechanisms provided
by autoconf.

svn path=/trunk/; revision=6963
This commit is contained in:
Jörg Mayer 2003-01-21 21:47:36 +00:00
parent 8adf7a08fd
commit 106bedb847
3 changed files with 12 additions and 9 deletions

View File

@ -1578,6 +1578,10 @@ Huagang Xie <xie [AT] lids.org> {
MySQL support
}
cfs 2895 <cjs2895 [AT] hotmail.com> {
Fix configure check for pcap_version
}
Alain Magloire <alainm[AT]rcsm.ece.mcgill.ca> was kind enough to
give his permission to use his version of snprintf.c.

View File

@ -2,7 +2,7 @@ dnl Macros that test for specific features.
dnl This file is part of the Autoconf packaging for Ethereal.
dnl Copyright (C) 1998-2000 by Gerald Combs.
dnl
dnl $Id: acinclude.m4,v 1.48 2003/01/21 20:38:30 jmayer Exp $
dnl $Id: acinclude.m4,v 1.49 2003/01/21 21:47:07 jmayer Exp $
dnl
dnl This program is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
@ -339,15 +339,13 @@ AC_DEFUN(AC_ETHEREAL_PCAP_VERSION_CHECK,
AC_MSG_CHECKING(whether pcap_version is defined by libpcap)
ac_save_LIBS="$LIBS"
LIBS="$PCAP_LIBS $SOCKET_LIBS $NSL_LIBS $LIBS"
AC_TRY_LINK([],
AC_TRY_LINK(
[
char *
return_pcap_version(void)
{
extern char pcap_version[];
return pcap_version;
}
# include <stdio.h>
extern char *pcap_version;
],
[
printf ("%s\n", pcap_version);
],
ac_cv_pcap_version_defined=yes,
ac_cv_pcap_version_defined=no,

View File

@ -1686,6 +1686,7 @@ B<http://www.ethereal.com>.
Anders Broman <a.broman [AT] telia.com>
Christian Falckenberg <christian.falckenberg [AT] nortelnetworks.com>
Huagang Xie <xie [AT] lids.org>
cjs 2895 <cjs2895 [AT] hotmail.com>
Alain Magloire <alainm[AT]rcsm.ece.mcgill.ca> was kind enough to give his
permission to use his version of snprintf.c.