Ethereal-dev: Re: [Ethereal-dev] base64_decode name clash (util.c vs. Heimdal w/--with-krb5)

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: "Olivier Biot" <ethereal@xxxxxxxxxx>
Date: Sat, 8 May 2004 14:01:56 +0200
From: Thomas Anders

| Hi all,
|
| there's currently a name clash for base64_decode() in Ethereal (CVS)
| vs. latest Heimdal 0.6.2:
|
| Ethereal CVS:
| util.c: size_t base64_decode(char *s)
|
| Heimdal 0.6.2:
| lib/roken/base64.c: int base64_decode(const char *str, void *data)
|
| This (obviously) causes linker errors when building libethereal.so
| while using --with-krb5 (which brings in Heimdal).
|
| FWIW, util.c's base64_decode seems to be used only rarely
| (packet-http.c).

Is the heimdal function effectively announced and used in the API or
is it only exported by accident?

We may either rename the helper funtion in epan/util.[ch] or move it
into packet-http.c and declare it static.

Or we may decide to use the heimdal function if it is available; this
would require some simple autoconf magic, and preprocesser
conditionals in packet-http.c, epan/util.h and epan/util.c while at
the same time using the correct function signature.

| Somewhat related: "--with-krb5" causes the Heimdal libs to be
| (unnecessarily) linked into libdfilter and libftypes. This also
| breaks building libethereal.so ("multiple definition of ..."),
| but can be fixed easily by trimming "LIBS=" in the corresponding
| Makefiles.

All Makefile.in files (but the one in wiretap) seem to be contaminated
with:
    KRB5_CONFIG = @KRB5_CONFIG@
    KRB5_LIBS = @KRB5_LIBS@
However only one actually uses it:
    $ grep 'KRB5_LIBS' epan/Makefile.in
    KRB5_LIBS = @KRB5_LIBS@
    libethereal_la_LIBADD = @INET_ATON_O@ @INET_PTON_O@ @INET_NTOP_O@
dfilter/libdfilter.la ftypes/libftypes.la @KRB5_LIBS@

Regards,

Olivier