From 013328966a0c556f671e6eb22ecdd74d3f477803 Mon Sep 17 00:00:00 2001 From: Karl Ramm Date: Wed, 24 Dec 2008 19:56:22 +0000 Subject: remove macros complicating behind-the-scenes rearranging --- h/internal.h | 4 ++++ h/zephyr/zephyr.h | 13 ++++--------- lib/Makefile.in | 2 +- lib/ZInit.c | 17 ++++++++++++++++- lib/Zinternal.c | 9 --------- 5 files changed, 25 insertions(+), 20 deletions(-) diff --git a/h/internal.h b/h/internal.h index 62a467d..e00721c 100644 --- a/h/internal.h +++ b/h/internal.h @@ -93,6 +93,10 @@ extern int __subscriptions_next; extern int __Zephyr_port; /* Port number */ extern struct in_addr __My_addr; +extern int __Zephyr_fd; +extern int __Q_CompleteLength; +extern struct sockaddr_in __HM_addr; +extern char __Zephyr_realm[]; typedef Code_t (*Z_SendProc) (ZNotice_t *, char *, int, int); diff --git a/h/zephyr/zephyr.h b/h/zephyr/zephyr.h index 2300744..0346e05 100644 --- a/h/zephyr/zephyr.h +++ b/h/zephyr/zephyr.h @@ -224,16 +224,11 @@ void Z_debug(const char *, ...); /* Compatibility */ #define ZNewLocateUser ZLocateUser -/* Macros to retrieve Zephyr library values. */ -extern int __Zephyr_fd; -extern int __Q_CompleteLength; -extern struct sockaddr_in __HM_addr; -extern char __Zephyr_realm[]; -#define ZGetFD() __Zephyr_fd -#define ZQLength() __Q_CompleteLength -#define ZGetDestAddr() __HM_addr - +/* Not macros to retrieve Zephyr library values. */ const char *ZGetRealm(void); +int ZGetFD (void); +int ZQLength (void); +struct sockaddr_in ZGetDestAddr (void); #ifdef Z_DEBUG diff --git a/lib/Makefile.in b/lib/Makefile.in index 64e3692..1e80f84 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -47,7 +47,7 @@ OBJS = zephyr_err.lo ZAsyncLocate.lo ZCkAuth.lo ZCkIfNot.lo ZClosePort.lo \ all: libzephyr.la libzephyr.la: ${OBJS} - ${LIBTOOL} --mode=link ${CC} -rpath ${libdir} -version-info 3:0:0 \ + ${LIBTOOL} --mode=link ${CC} -rpath ${libdir} -version-info 4:0:0 \ ${LDFLAGS} -o $@ ${OBJS} ${LIBS} zephyr_err.c ${BUILDTOP}/h/zephyr/zephyr_err.h: zephyr_err.et diff --git a/lib/ZInit.c b/lib/ZInit.c index 0c84068..8f64257 100644 --- a/lib/ZInit.c +++ b/lib/ZInit.c @@ -194,4 +194,19 @@ ZInitialize(void) return (ZERR_NONE); } -const char * ZGetRealm (void) { return __Zephyr_realm; } +const char * ZGetRealm (void) { + return __Zephyr_realm; +} + +int ZGetFD (void) { + return __Zephyr_fd; +} + +int ZQLength (void) { + return __Q_CompleteLength; +} + +struct sockaddr_in ZGetDestAddr (void) { + return __HM_addr; +} + diff --git a/lib/Zinternal.c b/lib/Zinternal.c index 1edb891..d5e0e44 100644 --- a/lib/Zinternal.c +++ b/lib/Zinternal.c @@ -1261,15 +1261,6 @@ ZSetDebug(void (*proc) __P((const char *, va_list, void *)), } #endif /* Z_DEBUG */ -#undef ZGetFD -int ZGetFD (void) { return __Zephyr_fd; } - -#undef ZQLength -int ZQLength (void) { return __Q_CompleteLength; } - -#undef ZGetDestAddr -struct sockaddr_in ZGetDestAddr (void) { return __HM_addr; } - #ifdef HAVE_KRB5 Code_t Z_Checksum(krb5_data *cksumbuf, -- cgit v1.2.3