I've searched for inet_ntop as requested both via "nm *.a" in /usr/lib and
/usr/ccs/lib as well as find /usr/include .... There does not appear to be any
reference to inet_ntop anywere on Compaq Tru64 V4.0E or V4.0F systems either in
the libraries or the include files.
For the problem of setenv/unsetenv not being defined when compiling with GCC, I
added the -DAES_SOURCE to the configure script as follows:
osf* )
AC_DEFINE_UNQUOTED(DECALPHA,$version)
if test "$ac_cv_prog_gcc" != yes; then
CPPFLAGS="$CPPFLAGS -std";
CFLAGS="$CFLAGS -std";
else
CPPFLAGS="$CPPFLAGS -DAES_SOURCE"
CFLAGS="$CFLAGS -DAES_SOURCE"
fi
That solves the problem of setenv/unsetenv not being defined while compiling
ifhp-3.4.4 although it may be a mask rather that the "correct" solution. I'll
try to find the time to see if there is a better solution, e.g., a switch to GCC
to get it to create the correct macro definitions on it's own. The way the
header file (stdlib.h) is set up AES_SOURCE will be defined automatically if
_ANSI_C_SOURCE is NOT defined. The comment in the include file claims that
AES_SOURCE is part of a "historical" environment. But then why is it required to
get the include fines to define setenv/unsetenv?
Now all we have to solve is the missing inet_ntop and I'll be able to link it
and try it.
- Justus
[EMAIL PROTECTED] on 01/07/2001 12:30:08
Please respond to [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
cc: (bcc: Justus J. Addiss/HI-Healthinfo/3M/US)
Subject: Re: LPRng: ifhp-3.4.4 fails to compile due to IPV6 code
> From [EMAIL PROTECTED] Thu Jan 4 10:01:26 2001
> From: [EMAIL PROTECTED]
> To: [EMAIL PROTECTED]
> Date: Thu, 4 Jan 2001 11:58:48 -0500
> Subject: LPRng: ifhp-3.4.4 fails to compile due to IPV6 code
>
>
>
> On Tru64 V4.0E ifhp fails to link because inet_ntop is not found. This is a
> routine called in open_device.c. The configure script correctly decided that
> inet_ntop did NOT exist but there are no #if defined in open_device.c to test
> for this and not compile the offending code. It looks like the entire
> inet_ntop_sockaddr() function is new. Maybe all of this should be commented
out
> if there is no IPV6?
I suspect another problem. On Solaris 2.5.1 and BSDI 4.1 I get:
in config.h:
/* Define if you have the inet_ntop function. */
/* #undef HAVE_INET_NTOP */
/* Define if you have the inet_pton function. */
/* #undef HAVE_INET_PTON */
So these systems do not have inet_ntop and inet_pton.
I test for this in LPRng/src/common/linksupport.c:
#if !defined(HAVE_INET_NTOP)
/***************************************************************************
* inet_ntop( int family, const void *addr,
* const char *strptr, int len )
* p means presentation, i.e. - ASCII C string
* n means numeric, i.e. - network byte ordered address
* family = AF_Protocol or AF_Protocol6
* addr = binary to convert
* strptr = string where to place
* len = length
***************************************************************************/
const char *inet_ntop( int family, const void *addr,
char *str, size_t len )
{
char *s;
This compiles and is tested. You can find out of there is a definition
for this in the liblpr library:
nm liblpr.a | grep inet_ntop
h4: {45} % !! |grep inet_ntop
nm *.a | grep inet_ntop
U inet_ntop_sockaddr
00001eb8 T __inet_ntop
00001ef4 T inet_ntop_sockaddr
U __inet_ntop
U inet_ntop_sockaddr
As you see, there are uses and references to it. So it is defined
in this library. Please repeat (or try to :-) this and see if you
have the same stuff.
Also, check to make sure that they did not bury the inet_ntop() code
in some library or that there is not a definition in a 'magic' include
file:
cd /usr/include;
find . -type f -exec grep -l inet_ntop {} \;
cd /usr/lib
for i in * ; do
echo LIB $i
nm $i | grep inet_ntop
done
>
> Also, I still have the problem that GCC V2.95.2 on Tru64 believes that SETENV
> and UNSETENV exist, but fails to define AES_SOURCE that is required for these
> function calls to be defined in the system header files. So trying to compile
> with GCC on Tru64 fails because of the implicit definition of setenv() and
> unsetenv().
>
> - Justus Addiss
OK.
a)
Run configure and look the first part of the output:
loading cache ./config.cache
checking host system type... i386-pc-bsdi4.1
checking target system type... i386-pc-bsdi4.1
checking build system type... i386-pc-bsdi4.1
checking for mawk... (cached) gawk
Target is i386-pc-bsdi4.1, arch i386, os bsdi4.1, release 4.1, version 410
^^^^^^
target_os
b) look at the configure.in file. You will see
case $target_os in
*linux* )
no_resolv_lib=yes;
...
osf* )
AC_DEFINE_UNQUOTED(DECALPHA,$version)
if test "$ac_cv_prog_gcc" != yes; then
CPPFLAGS="$CPPFLAGS -std";
CFLAGS="$CFLAGS -std";
fi
;;
*mips-sni* )
;;
esac
You need to add an entry for this system.
i.e. -
Target is srx-bugus2.1, arch sr, os bugus2.1, release 2.1, version 210
os bugus2.1
case $target_os in
bogus* )
if test "$ac_cv_prog_gcc" = yes; then
CPPFLAGS="$CPPFLAGS -DAES_SOURCE";
CFLAGS="$CFLAGS -DAES_SOURCE";
fi
Try this and see if it works/helps/does nothing...
Patrick
Patrick Powell Astart Technologies,
[EMAIL PROTECTED] 9475 Chesapeake Drive, Suite D,
Network and System San Diego, CA 92123
Consulting 858-874-6543 FAX 858-279-8424
LPRng - Print Spooler (http://www.lprng.com)
-----------------------------------------------------------------------------
YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST
The address you post from MUST be your subscription address
If you need help, send email to [EMAIL PROTECTED] (or lprng-requests
or lprng-digest-requests) with the word 'help' in the body. For the impatient,
to subscribe to a list with name LIST, send mail to [EMAIL PROTECTED]
with: | example:
subscribe LIST <mailaddr> | subscribe lprng-digest [EMAIL PROTECTED]
unsubscribe LIST <mailaddr> | unsubscribe lprng [EMAIL PROTECTED]
If you have major problems, send email to [EMAIL PROTECTED] with the word
LPRNGLIST in the SUBJECT line.
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST
The address you post from MUST be your subscription address
If you need help, send email to [EMAIL PROTECTED] (or lprng-requests
or lprng-digest-requests) with the word 'help' in the body. For the impatient,
to subscribe to a list with name LIST, send mail to [EMAIL PROTECTED]
with: | example:
subscribe LIST <mailaddr> | subscribe lprng-digest [EMAIL PROTECTED]
unsubscribe LIST <mailaddr> | unsubscribe lprng [EMAIL PROTECTED]
If you have major problems, send email to [EMAIL PROTECTED] with the word
LPRNGLIST in the SUBJECT line.
-----------------------------------------------------------------------------