summaryrefslogtreecommitdiff
path: root/rpmio
diff options
context:
space:
mode:
Diffstat (limited to 'rpmio')
-rw-r--r--rpmio/Makefile.am20
-rw-r--r--rpmio/base64.c4
-rw-r--r--rpmio/base64.h4
-rw-r--r--rpmio/tkey.c8
4 files changed, 26 insertions, 10 deletions
diff --git a/rpmio/Makefile.am b/rpmio/Makefile.am
index e24fc8564..336a5d3ef 100644
--- a/rpmio/Makefile.am
+++ b/rpmio/Makefile.am
@@ -2,7 +2,7 @@
AUTOMAKE_OPTIONS = 1.4 foreign
-EXTRA_DIST = tdigest.c tficl.c tkey.c trpmio.c
+EXTRA_DIST = base64.c tdigest.c tficl.c tkey.c trpmio.c
INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/build -I$(top_srcdir)/lib \
-I$(top_srcdir)/popt @INCPATH@
@@ -13,11 +13,15 @@ pkginc_HEADERS = \
ugid.h
noinst_HEADERS = base64.h rpmio_internal.h
+BEECRYPTLOBJS = $(shell cat $(top_builddir)/beecrypt/listobjs)
+
lib_LTLIBRARIES = librpmio.la
librpmio_la_SOURCES = rpmrpc.c rpmio.c url.c macro.c \
- base64.c digest.c strcasecmp.c stubs.c \
+ digest.c strcasecmp.c stubs.c \
ugid.c rpmmalloc.c rpmlog.c
librpmio_la_LDFLAGS = -release @VERSION@
+librpmio_la_LIBADD = $(BEECRYPTLOBJS)
+librpmio_la_DEPENDENCIES = .created
# XXX Add internal libtool dependence
install-data-local:
@@ -25,6 +29,18 @@ install-data-local:
sed -e "s|^dependency_libs='|& -lpopt|" < librpmio.la > .librpmio.la && \
mv .librpmio.la librpmio.la
+$(top_builddir)/beecrypt/listobjs:
+ make -C $(top_builddir)/beecrypt listobjs
+
+.created: $(top_builddir)/beecrypt/listobjs
+ for lo in $(BEECRYPTLOBJS); do \
+ [ -f $$lo ] || $(LN_S) $(top_builddir)/beecrypt/$$lo $$lo ; \
+ done
+ touch $@
+
+clean-local:
+ rm -f $(BEECRYPTLOBJS) *.o .created
+
.PHONY: sources
sources:
@echo $(librpmio_la_SOURCES:%=rpmio/%)
diff --git a/rpmio/base64.c b/rpmio/base64.c
index 4b95db38b..d680be2db 100644
--- a/rpmio/base64.c
+++ b/rpmio/base64.c
@@ -8,7 +8,7 @@ static int _debug = 0;
#include "base64.h"
#include "debug.h"
-int B64decode (const char * s, void ** datap, size_t *lenp)
+int b64decode (const char * s, void ** datap, size_t *lenp)
{
static /*@only@*/ char * b64dec = NULL;
unsigned char *t, *te;
@@ -73,7 +73,7 @@ fprintf(stderr, "%7u %02x %02x %02x %02x -> %02x %02x %02x\n",
return 0;
}
-char * B64encode (const void * str, size_t ns)
+char * b64encode (const void * str, size_t ns)
{
static char b64enc[] =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
diff --git a/rpmio/base64.h b/rpmio/base64.h
index 2fecb3e5c..cf9e84303 100644
--- a/rpmio/base64.h
+++ b/rpmio/base64.h
@@ -17,7 +17,7 @@ extern "C" {
* @return 0 on success
*/
/*@unused@*/
-int B64decode (const char * s, /*@out@*/ void ** datap, /*@out@*/ size_t *lenp);
+int b64decode (const char * s, /*@out@*/ void ** datap, /*@out@*/ size_t *lenp);
/**
* Encode chunks of 3 bytes of binary input into 4 bytes of base64 output.
@@ -26,7 +26,7 @@ int B64decode (const char * s, /*@out@*/ void ** datap, /*@out@*/ size_t *lenp);
* @return (malloc'd) base64 string
*/
/*@unused@*/
-char * B64encode (const void * data, size_t ns);
+char * b64encode (const void * data, size_t ns);
#ifdef __cplusplus
}
diff --git a/rpmio/tkey.c b/rpmio/tkey.c
index f9b553d4c..5e017ea28 100644
--- a/rpmio/tkey.c
+++ b/rpmio/tkey.c
@@ -696,8 +696,8 @@ main (int argc, char *argv[])
if (_debug)
fprintf(stderr, "*** sig is\n%s\n", sig);
- if ((rc = B64decode(sig, (void **)&dec, &declen)) != 0) {
- fprintf(stderr, "*** B64decode returns %d\n", rc);
+ if ((rc = b64decode(sig, (void **)&dec, &declen)) != 0) {
+ fprintf(stderr, "*** b64decode returns %d\n", rc);
exit(rc);
}
@@ -707,8 +707,8 @@ fprintf(stderr, "*** sig is\n%s\n", sig);
exit(len);
}
- if ((enc = B64encode(dec, declen)) == NULL) {
- fprintf(stderr, "*** B64encode returns %d\n", rc);
+ if ((enc = b64encode(dec, declen)) == NULL) {
+ fprintf(stderr, "*** b64encode failed\n");
exit(4);
}