From 75edac3366133f83d10ad8c560db7d28e48305f3 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Tue, 9 May 2000 15:28:41 +1000 Subject: [PATCH] - Cleanup of bsd-base64 headers, bugfix definitions of __b64_*. Reported by Andre Lucas --- bsd-base64.c | 7 ++++--- bsd-base64.h | 11 ++++------- uuencode.c | 2 -- 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/bsd-base64.c b/bsd-base64.c index 57a957364..8cbf8eeef 100644 --- a/bsd-base64.c +++ b/bsd-base64.c @@ -44,7 +44,7 @@ #include "config.h" -#ifndef HAVE_B64_NTOP +#if !defined(HAVE_B64_NTOP) && !defined(HAVE___B64_NTOP) #include #include @@ -53,12 +53,13 @@ #include #include -#include #include #include #include +#include "bsd-base64.h" + #define Assert(Cond) if (!(Cond)) abort() static const char Base64[] = @@ -312,4 +313,4 @@ b64_pton(char const *src, u_char *target, size_t targsize) return (tarindex); } -#endif /* HAVE_B64_NTOP */ +#endif /* !defined(HAVE_B64_NTOP) && !defined(HAVE___B64_NTOP) */ diff --git a/bsd-base64.h b/bsd-base64.h index c5dace7cb..c1d69dd6c 100644 --- a/bsd-base64.h +++ b/bsd-base64.h @@ -4,16 +4,13 @@ #include "config.h" #ifndef HAVE___B64_NTOP -# ifdef HAVE_B64_NTOP -# define __b64_ntop b64_ntop -# define __b64_pton b64_pton -# else /* !HAVE_B64_NTOP */ - +# ifndef HAVE_B64_NTOP int b64_ntop(u_char const *src, size_t srclength, char *target, size_t targsize); int b64_pton(char const *src, u_char *target, size_t targsize); - -# endif /* HAVE_B64_NTOP */ +# endif /* !HAVE_B64_NTOP */ +# define __b64_ntop b64_ntop +# define __b64_pton b64_pton #endif /* HAVE___B64_NTOP */ #endif /* _BSD_BINRESVPORT_H */ diff --git a/uuencode.c b/uuencode.c index fc84d5a58..2540d7564 100644 --- a/uuencode.c +++ b/uuencode.c @@ -4,8 +4,6 @@ #include "includes.h" #include "xmalloc.h" -#include - int uuencode(unsigned char *src, unsigned int srclength, char *target, size_t targsize)