From: Arran Cudbard-Bell Date: Mon, 5 Nov 2012 20:20:11 +0000 (+0000) Subject: Substitute autoconf defines in missing.h and tls.h at build time to avoid including... X-Git-Tag: release_3_0_0_beta1~1601^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fdf6e3d11acd3ee3b0793bdc02caa433be192c98;p=thirdparty%2Ffreeradius-server.git Substitute autoconf defines in missing.h and tls.h at build time to avoid including autoconf.h Move some function checks from libradius.h to missing.h Rename ASCEND_BINARY to WITH_ASCEND_BINARY so it gets copied to features.h --- diff --git a/configure b/configure index 42d0ed5f5c6..42f58bf081f 100755 --- a/configure +++ b/configure @@ -15357,7 +15357,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $raddbdir" >&5 $as_echo "$raddbdir" >&6; } -ASCEND_BINARY=yes +WITH_ASCEND_BINARY=yes # Check whether --with-ascend-binary was given. if test "${with_ascend_binary+set}" = set; then : @@ -15365,14 +15365,14 @@ if test "${with_ascend_binary+set}" = set; then : yes) ;; *) - ASCEND_BINARY="" + WITH_ASCEND_BINARY="" esac fi -if test "X$ASCEND_BINARY" = "Xyes"; then +if test "X$WITH_ASCEND_BINARY" = "Xyes"; then -$as_echo "#define ASCEND_BINARY /**/" >>confdefs.h +$as_echo "#define WITH_ASCEND_BINARY /**/" >>confdefs.h fi diff --git a/configure.in b/configure.in index 8306ef9f7fd..29532ee41cc 100644 --- a/configure.in +++ b/configure.in @@ -266,18 +266,18 @@ AC_SUBST(raddbdir) AC_MSG_RESULT($raddbdir) dnl extra argument: --with-ascend-binary -ASCEND_BINARY=yes +WITH_ASCEND_BINARY=yes AC_ARG_WITH(ascend-binary, [ --with-ascend-binary Include support for Ascend binary filter attributes (default=yes)], [ case "$withval" in yes) ;; *) - ASCEND_BINARY="" + WITH_ASCEND_BINARY="" esac ] ) -if test "X$ASCEND_BINARY" = "Xyes"; then - AC_DEFINE(ASCEND_BINARY, [], [Include support for Ascend binary filter attributes]) +if test "X$WITH_ASCEND_BINARY" = "Xyes"; then + AC_DEFINE(WITH_ASCEND_BINARY, [], [Include support for Ascend binary filter attributes]) fi dnl extra argument: --with-threads diff --git a/src/include/.gitignore b/src/include/.gitignore new file mode 100644 index 00000000000..44f1afa546d --- /dev/null +++ b/src/include/.gitignore @@ -0,0 +1,5 @@ +autoconf.sed +missing.h +tls.h +features.h + diff --git a/src/include/Makefile b/src/include/Makefile index d666f3ae587..e50c2b37f0e 100644 --- a/src/include/Makefile +++ b/src/include/Makefile @@ -4,25 +4,46 @@ # Version: $Id$ # -HEADERS = autoconf.h conf.h conffile.h detail.h dhcp.h event.h hash.h heap.h \ +HEADERS = conf.h conffile.h detail.h dhcp.h event.h features.h hash.h heap.h \ ident.h libradius.h md4.h md5.h missing.h modcall.h modules.h \ packet.h rad_assert.h radius.h radiusd.h radpaths.h \ radutmp.h realms.h sha1.h stats.h sysutmp.h token.h \ udpfromto.h vmps.h vqp.h base64.h +# +# Files which would need to #include +# +PREPROC = missing.h tls.h + include ../../Make.inc .PHONY: all clean distclean install .PHONY: all clean distclean install reconfig -all: radpaths.h +all: radpaths.h features.h $(PREPROC) radpaths.h: build-radpaths-h @/bin/sh ./build-radpaths-h -distclean: - rm -f radpaths.h +features.h: + @grep -o "^\#define\s*WITH_.*" autoconf.h > features.h + +autoconf.sed: + @grep ^#define autoconf.h | sed 's,/\*\*/,1,;' | awk '{print "\ + s,#[[:blank:]]*ifdef[[:blank:]]*" $$2 ",#if "$$3 ",g;\ + s,#[[:blank:]]*ifndef[[:blank:]]*" $$2 ",#if !"$$3 ",g;\ + s,defined(" $$2 ")," $$3 ",g;\ + s," $$2 ","$$3 ",g;"}' > ./autoconf.sed + +$(PREPROC): autoconf.sed + @sed -f autoconf.sed < `echo $@ | sed 's/\\./-/'` > $@ +distclean: clean + @rm -f radpaths.h + reconfig clean: + @rm -f features.h + @rm -f autoconf.sed + @rm -f $(PREPROC) install: $(INSTALL) -d -m 755 $(R)$(includedir)/freeradius diff --git a/src/include/libradius.h b/src/include/libradius.h index ab2856f684c..2744bb6d67f 100644 --- a/src/include/libradius.h +++ b/src/include/libradius.h @@ -30,9 +30,11 @@ RCSIDH(libradius_h, "$Id$") #include -#ifdef HAVE_ERRNO_H -#include -#endif +/* + * Let any external program building against the library know what + * features the library was built with. + */ +#include #include #include @@ -297,17 +299,6 @@ DICT_VENDOR *dict_vendorbyvalue(int vendor); /*#define dict_valget dict_valbyattr almost but not quite*/ #endif -/* get around diffrent ctime_r styles */ -#ifdef CTIMERSTYLE -#if CTIMERSTYLE == SOLARISSTYLE -#define CTIME_R(a,b,c) ctime_r(a,b,c) -#else -#define CTIME_R(a,b,c) ctime_r(a,b) -#endif -#else -#define CTIME_R(a,b,c) ctime_r(a,b) -#endif - /* md5.c */ void fr_md5_calc(uint8_t *, const uint8_t *, unsigned int); @@ -481,15 +472,6 @@ int rad_lockfd_nonblock(int fd, int lock_len); int rad_unlockfd(int fd, int lock_len); void fr_bin2hex(const uint8_t *bin, char *hex, size_t len); size_t fr_hex2bin(const char *hex, uint8_t *bin, size_t len); -#ifndef HAVE_INET_PTON -int inet_pton(int af, const char *src, void *dst); -#endif -#ifndef HAVE_INET_NTOP -const char *inet_ntop(int af, const void *src, char *dst, size_t cnt); -#endif -#ifndef HAVE_CLOSEFROM -int closefrom(int fd); -#endif int fr_ipaddr_cmp(const fr_ipaddr_t *a, const fr_ipaddr_t *b); int ip_hton(const char *src, int af, fr_ipaddr_t *dst); @@ -500,11 +482,11 @@ int fr_sockaddr2ipaddr(const struct sockaddr_storage *sa, socklen_t salen, fr_ipaddr_t *ipaddr, int * port); -#ifdef ASCEND_BINARY +#ifdef WITH_ASCEND_BINARY /* filters.c */ int ascend_parse_filter(VALUE_PAIR *pair); void print_abinary(const VALUE_PAIR *vp, char *buffer, size_t len, int delimitst); -#endif /*ASCEND_BINARY*/ +#endif /*WITH_ASCEND_BINARY*/ /* random numbers in isaac.c */ /* context of random number generator */ diff --git a/src/include/missing.h b/src/include/missing-h similarity index 60% rename from src/include/missing.h rename to src/include/missing-h index b9333d6800c..b3eaf9af61e 100644 --- a/src/include/missing.h +++ b/src/include/missing-h @@ -4,6 +4,8 @@ /* * missing.h Replacements for functions that are or can be * missing on some platforms. + * HAVE_* and WITH_* defines are substituted at + * build time by make with values from autoconf.h. * * Version: $Id$ * @@ -12,86 +14,86 @@ #include RCSIDH(missing_h, "$Id$") -#include - #ifdef HAVE_STDINT_H -#include +# include #endif #ifdef HAVE_STDDEF_H -#include +# include #endif #ifdef HAVE_SYS_TYPES_H -#include +# include #endif #ifdef HAVE_INTTYPES_H -#include +# include #endif #ifdef HAVE_STRINGS_H -#include +# include #endif #ifdef HAVE_STRING_H -#include +# include #endif #ifdef HAVE_NETDB_H -#include +# include #endif #ifdef HAVE_NETINET_IN_H -#include +# include #endif #ifdef HAVE_ARPA_INET_H -#include +# include #endif #ifdef HAVE_SYS_SELECT_H -#include +# include #endif #ifdef HAVE_SYS_SOCKET_H -#include +# include #endif #ifdef HAVE_UNISTD_H -#include +# include #endif #ifndef HAVE_VSNPRINTF -#include +# include #endif #ifdef HAVE_SYS_LOCKING_H -#include +# include +#endif + +#ifdef HAVE_ERRNO_H +# include #endif /* * Check for inclusion of , versus * Taken verbatim from the autoconf manual. */ -#if TIME_WITH_SYS_TIME -# include -# include -#else -# ifdef HAVE_SYS_TIME_H +#ifdef TIME_WITH_SYS_TIME # include -# else # include -# endif +#else +# if HAVE_SYS_TIME_H +# include +# else +# include +# endif #endif /* * Don't look for winsock.h if we're on cygwin. */ -#ifndef __CYGWIN__ -#ifdef HAVE_WINSOCK_H -#include -#endif +#if !defined(__CYGWIN__) && defined(HAVE_WINSOCK_H) +# include #endif #ifdef __APPLE__ @@ -106,7 +108,6 @@ extern "C" { /* * Functions from missing.c */ - #ifndef HAVE_STRNCASECMP extern int strncasecmp(char *s1, char *s2, int n); #endif @@ -128,33 +129,43 @@ struct tm *localtime_r(const time_t *l_clock, struct tm *result); char *ctime_r(const time_t *l_clock, char *l_buf); #endif -#if defined(NEED_DECLARATION_CRYPT) || !defined(HAVE_CRYPT) +#if !defined(HAVE_CRYPT) || defined(NEED_DECLARATION_CRYPT) char *crypt(char *key, char *salt); #endif -#ifdef NEED_DECLARATION_STRNCASECMP -int strncasecmp(char *s1, char *s2, int n); +#if !defined(HAVE_INET_ATON) || defined(NEED_DECLARATION_INET_ATON) +struct in_addr; +int inet_aton(const char *cp, struct in_addr *inp); #endif -#ifdef NEED_DECLARATION_STRCASECMP -int strcasecmp(char *s1, char *s2); +#ifndef HAVE_INET_PTON +int inet_pton(int af, const char *src, void *dst); #endif - -#if defined(NEED_DECLARATION_INET_ATON) || !defined(HAVE_INET_ATON) -struct in_addr; -int inet_aton(const char *cp, struct in_addr *inp); +#ifndef HAVE_INET_NTOP +const char *inet_ntop(int af, const void *src, char *dst, size_t cnt); +#endif +#ifndef HAVE_CLOSEFROM +int closefrom(int fd); #endif #ifndef HAVE_SETLINEBUF -#ifdef HAVE_SETVBUF -#define setlinebuf(x) setvbuf(x, NULL, _IOLBF, 0) -#else -#define setlinebuf(x) 0 +# ifdef HAVE_SETVBUF +# define setlinebuf(x) setvbuf(x, NULL, _IOLBF, 0) +# else +# define setlinebuf(x) 0 +# endif #endif + +#ifdef NEED_DECLARATION_STRNCASECMP +int strncasecmp(char *s1, char *s2, int n); +#endif + +#ifdef NEED_DECLARATION_STRCASECMP +int strcasecmp(char *s1, char *s2); #endif #ifdef NEED_DECLARATION_SETLINEBUF -#define setlinebuf(x) 0 +# define setlinebuf(x) 0 #endif #ifdef NEED_DECLARATION_GETUSERSHELL @@ -166,31 +177,31 @@ void endusershell(void); #endif #ifndef INADDR_ANY -#define INADDR_ANY ((uint32_t) 0x00000000) +# define INADDR_ANY ((uint32_t) 0x00000000) #endif #ifndef INADDR_LOOPBACK -#define INADDR_LOOPBACK ((uint32_t) 0x7f000001) /* Inet 127.0.0.1 */ +# define INADDR_LOOPBACK ((uint32_t) 0x7f000001) /* Inet 127.0.0.1 */ #endif #ifndef INADDR_NONE -#define INADDR_NONE ((uint32_t) 0xffffffff) +# define INADDR_NONE ((uint32_t) 0xffffffff) #endif #ifndef INADDRSZ -#define INADDRSZ 4 +# define INADDRSZ 4 #endif #ifndef INET_ADDRSTRLEN -#define INET_ADDRSTRLEN 16 +# define INET_ADDRSTRLEN 16 #endif #ifndef AF_UNSPEC -#define AF_UNSPEC 0 +# define AF_UNSPEC 0 #endif #ifndef AF_INET6 -#define AF_INET6 10 +# define AF_INET6 10 #endif #ifndef HAVE_STRUCT_IN6_ADDR @@ -201,82 +212,81 @@ struct in6_addr uint16_t u6_addr16[8]; uint32_t u6_addr32[4]; } in6_u; -#define s6_addr in6_u.u6_addr8 -#define s6_addr16 in6_u.u6_addr16 -#define s6_addr32 in6_u.u6_addr32 +# define s6_addr in6_u.u6_addr8 +# define s6_addr16 in6_u.u6_addr16 +# define s6_addr32 in6_u.u6_addr32 }; -#ifndef IN6ADDRSZ -#define IN6ADDRSZ 16 -#endif +# ifndef IN6ADDRSZ +# define IN6ADDRSZ 16 +# endif -#ifndef INET6_ADDRSTRLEN -#define INET6_ADDRSTRLEN 46 -#endif +# ifndef INET6_ADDRSTRLEN +# define INET6_ADDRSTRLEN 46 +# endif -#ifndef IN6ADDR_ANY_INIT -#define IN6ADDR_ANY_INIT {{{ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }}} -#endif +# ifndef IN6ADDR_ANY_INIT +# define IN6ADDR_ANY_INIT {{{ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }}} +# endif -#ifndef IN6ADDR_LOOPBACK_INIT -#define IN6ADDR_LOOPBACK_INIT {{{ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 }}} -#endif +# ifndef IN6ADDR_LOOPBACK_INIT +# define IN6ADDR_LOOPBACK_INIT {{{ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 }}} +# endif -#ifndef IN6_IS_ADDR_UNSPECIFIED -#define IN6_IS_ADDR_UNSPECIFIED(a) \ +# ifndef IN6_IS_ADDR_UNSPECIFIED +# define IN6_IS_ADDR_UNSPECIFIED(a) \ (((__const uint32_t *) (a))[0] == 0 \ && ((__const uint32_t *) (a))[1] == 0 \ && ((__const uint32_t *) (a))[2] == 0 \ && ((__const uint32_t *) (a))[3] == 0) -#endif +# endif -#ifndef IN6_IS_ADDR_LOOPBACK -#define IN6_IS_ADDR_LOOPBACK(a) \ +# ifndef IN6_IS_ADDR_LOOPBACK +# define IN6_IS_ADDR_LOOPBACK(a) \ (((__const uint32_t *) (a))[0] == 0 \ && ((__const uint32_t *) (a))[1] == 0 \ && ((__const uint32_t *) (a))[2] == 0 \ && ((__const uint32_t *) (a))[3] == htonl (1)) -#endif +# endif -#ifndef IN6_IS_ADDR_MULTICAST -#define IN6_IS_ADDR_MULTICAST(a) (((__const uint8_t *) (a))[0] == 0xff) -#endif +# ifndef IN6_IS_ADDR_MULTICAST +# define IN6_IS_ADDR_MULTICAST(a) (((__const uint8_t *) (a))[0] == 0xff) +# endif -#ifndef IN6_IS_ADDR_LINKLOCAL -#define IN6_IS_ADDR_LINKLOCAL(a) \ +# ifndef IN6_IS_ADDR_LINKLOCAL +# define IN6_IS_ADDR_LINKLOCAL(a) \ ((((__const uint32_t *) (a))[0] & htonl (0xffc00000)) \ == htonl (0xfe800000)) -#endif +# endif -#ifndef IN6_IS_ADDR_SITELOCAL -#define IN6_IS_ADDR_SITELOCAL(a) \ +# ifndef IN6_IS_ADDR_SITELOCAL +# define IN6_IS_ADDR_SITELOCAL(a) \ ((((__const uint32_t *) (a))[0] & htonl (0xffc00000)) \ == htonl (0xfec00000)) -#endif +# endif -#ifndef IN6_IS_ADDR_V4MAPPED -#define IN6_IS_ADDR_V4MAPPED(a) \ +# ifndef IN6_IS_ADDR_V4MAPPED +# define IN6_IS_ADDR_V4MAPPED(a) \ ((((__const uint32_t *) (a))[0] == 0) \ && (((__const uint32_t *) (a))[1] == 0) \ && (((__const uint32_t *) (a))[2] == htonl (0xffff))) -#endif +# endif -#ifndef IN6_IS_ADDR_V4COMPAT -#define IN6_IS_ADDR_V4COMPAT(a) \ +# ifndef IN6_IS_ADDR_V4COMPAT +# define IN6_IS_ADDR_V4COMPAT(a) \ ((((__const uint32_t *) (a))[0] == 0) \ && (((__const uint32_t *) (a))[1] == 0) \ && (((__const uint32_t *) (a))[2] == 0) \ && (ntohl (((__const uint32_t *) (a))[3]) > 1)) -#endif +# endif -#ifndef IN6_ARE_ADDR_EQUAL -#define IN6_ARE_ADDR_EQUAL(a,b) \ +# ifndef IN6_ARE_ADDR_EQUAL +# define IN6_ARE_ADDR_EQUAL(a,b) \ ((((__const uint32_t *) (a))[0] == ((__const uint32_t *) (b))[0]) \ && (((__const uint32_t *) (a))[1] == ((__const uint32_t *) (b))[1]) \ && (((__const uint32_t *) (a))[2] == ((__const uint32_t *) (b))[2]) \ && (((__const uint32_t *) (a))[3] == ((__const uint32_t *) (b))[3])) -#endif - +# endif #endif /* HAVE_STRUCT_IN6_ADDR */ /* @@ -286,29 +296,28 @@ struct in6_addr #ifndef HAVE_STRUCT_SOCKADDR_STORAGE struct sockaddr_storage { - uint16_t ss_family; /* Address family, etc. */ + uint16_t ss_family; /* Address family, etc. */ char ss_padding[128 - (sizeof(uint16_t))]; }; -#endif /* HAVE_STRUCT_SOCKADDR_STORAGE */ +#endif #ifndef HAVE_STRUCT_ADDRINFO - /* for old netdb.h */ -#ifndef EAI_SERVICE -#define EAI_MEMORY 2 -#define EAI_FAMILY 5 /* ai_family not supported */ -#define EAI_NONAME 8 /* hostname nor servname provided, or not known */ -#define EAI_SERVICE 9 /* servname not supported for ai_socktype */ -#endif +# ifndef EAI_SERVICE +# define EAI_MEMORY 2 +# define EAI_FAMILY 5 /* ai_family not supported */ +# define EAI_NONAME 8 /* hostname nor servname provided, or not known */ +# define EAI_SERVICE 9 /* servname not supported for ai_socktype */ +# endif /* dummy value for old netdb.h */ -#ifndef AI_PASSIVE -#define AI_PASSIVE 1 -#define AI_CANONNAME 2 -#define AI_NUMERICHOST 4 -#define NI_NUMERICHOST 2 -#define NI_NAMEREQD 4 -#define NI_NUMERICSERV 8 +# ifndef AI_PASSIVE +# define AI_PASSIVE 1 +# define AI_CANONNAME 2 +# define AI_NUMERICHOST 4 +# define NI_NUMERICHOST 2 +# define NI_NAMEREQD 4 +# define NI_NUMERICSERV 8 struct addrinfo { @@ -322,8 +331,7 @@ struct addrinfo struct addrinfo *ai_next; /* Pointer to next in list. */ }; -#endif /* AI_PASSIVE */ - +# endif /* AI_PASSIVE */ #endif /* HAVE_STRUCT_ADDRINFO */ /* Translate name of a service location and/or a service name to set of @@ -352,7 +360,6 @@ extern int getnameinfo (const struct sockaddr *__sa, /* * Functions from snprintf.c */ - #ifndef HAVE_VSNPRINTF extern int vsnprintf(char *str, size_t count, const char *fmt, va_list arg); #endif @@ -364,7 +371,6 @@ extern int snprintf(char *str, size_t count, const char *fmt, ...); /* * Functions from strl{cat,cpy}.c */ - #ifndef HAVE_STRLCPY extern size_t strlcpy(char *dst, const char *src, size_t siz); #endif @@ -374,7 +380,7 @@ extern size_t strlcat(char *dst, const char *src, size_t siz); #endif #ifndef INT16SZ -#define INT16SZ (2) +# define INT16SZ (2) #endif #ifndef HAVE_GMTIME_R @@ -385,28 +391,40 @@ struct tm *gmtime_r(const time_t *l_clock, struct tm *result); int gettimeofday (struct timeval *tv, void *tz); #endif +/* + * Work around diffrent ctime_r styles + */ +#ifdef CTIMERSTYLE +# if CTIMERSTYLE == SOLARISSTYLE +# define CTIME_R(a,b,c) ctime_r(a,b,c) +# else +# define CTIME_R(a,b,c) ctime_r(a,b) +# endif +#else +# define CTIME_R(a,b,c) ctime_r(a,b) +#endif + #ifdef WIN32 -#undef interface -#undef mkdir -#define mkdir(_d, _p) mkdir(_d) -#define FR_DIR_SEP '\\' -#define FR_DIR_IS_RELATIVE(p) ((*p && (p[1] != ':')) || ((*p != '\\') && (*p != '\\'))) +# undef interface +# undef mkdir +# define mkdir(_d, _p) mkdir(_d) +# define FR_DIR_SEP '\\' +# define FR_DIR_IS_RELATIVE(p) ((*p && (p[1] != ':')) || ((*p != '\\') && (*p != '\\'))) #else -#define FR_DIR_SEP '/' -#define FR_DIR_IS_RELATIVE(p) ((*p) != '/') +# define FR_DIR_SEP '/' +# define FR_DIR_IS_RELATIVE(p) ((*p) != '/') #endif #ifdef HAVE_SYS_LOCKING_H -#define lockf _locking - -#define F_ULOCK _LK_UNLCK /* Unlock locked sections. */ -#define F_LOCK _LK_LOCK /* Lock a section for exclusive use. */ -#define F_TLOCK _LK_NBLCK /* Test and lock a section for exclusive use */ -#define F_TEST _LK_RLCK /* Test section for locks by other processes. */ +# define lockf _locking +# define F_ULOCK _LK_UNLCK /* Unlock locked sections. */ +# define F_LOCK _LK_LOCK /* Lock a section for exclusive use. */ +# define F_TLOCK _LK_NBLCK /* Test and lock a section for exclusive use */ +# define F_TEST _LK_RLCK /* Test section for locks by other processes. */ #endif #ifndef offsetof -# define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) +# define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) #endif void timeval2ntp(const struct timeval *tv, uint8_t *ntp); @@ -420,5 +438,4 @@ void ntp2timeval(struct timeval *tv, const char *ntp); #ifdef __cplusplus } #endif - #endif /* _FR_MISSING_H */ diff --git a/src/include/tls.h b/src/include/tls-h similarity index 99% rename from src/include/tls.h rename to src/include/tls-h index 18997d9c744..965e18b5f8f 100644 --- a/src/include/tls.h +++ b/src/include/tls-h @@ -1,7 +1,7 @@ #ifndef FR_TLS_H #define FR_TLS_H -#ifdef WITH_TLS +#if WITH_TLS /* * @file tls.h @@ -28,18 +28,17 @@ #include RCSIDH(tls_h, "$Id$") -#include #include /* * For RH 9, which apparently needs this. */ #ifndef OPENSSL_NO_KRB5 -#define OPENSSL_NO_KRB5 +# define OPENSSL_NO_KRB5 #endif #include #ifdef HAVE_OPENSSL_ENGINE_H -#include +# include #endif #include diff --git a/src/lib/filters.c b/src/lib/filters.c index 19f18d91070..fd6283f2df8 100644 --- a/src/lib/filters.c +++ b/src/lib/filters.c @@ -25,7 +25,7 @@ RCSID("$Id$") #include -#ifdef ASCEND_BINARY +#ifdef WITH_ASCEND_BINARY #include /* diff --git a/src/lib/print.c b/src/lib/print.c index f682d44811c..c36e0477060 100644 --- a/src/lib/print.c +++ b/src/lib/print.c @@ -290,7 +290,7 @@ int vp_prints_value(char * out, size_t outlen, const VALUE_PAIR *vp, int delimit buf, sizeof(buf)); break; case PW_TYPE_ABINARY: -#ifdef ASCEND_BINARY +#ifdef WITH_ASCEND_BINARY a = buf; print_abinary(vp, buf, sizeof(buf), delimitst); break; diff --git a/src/lib/valuepair.c b/src/lib/valuepair.c index 9b067a7c661..c36bd70a962 100644 --- a/src/lib/valuepair.c +++ b/src/lib/valuepair.c @@ -1089,7 +1089,7 @@ VALUE_PAIR *pairparsevalue(VALUE_PAIR *vp, const char *value) break; case PW_TYPE_ABINARY: -#ifdef ASCEND_BINARY +#ifdef WITH_ASCEND_BINARY if (strncasecmp(value, "0x", 2) == 0) { vp->type = PW_TYPE_OCTETS; goto do_octets; diff --git a/src/main/valuepair.c b/src/main/valuepair.c index f1b6f994db0..474cc4b2b82 100644 --- a/src/main/valuepair.c +++ b/src/main/valuepair.c @@ -220,7 +220,7 @@ int radius_compare_vps(REQUEST *request, VALUE_PAIR *check, VALUE_PAIR *vp) * Not a regular expression, compare the types. */ switch(check->type) { -#ifdef ASCEND_BINARY +#ifdef WITH_ASCEND_BINARY /* * Ascend binary attributes can be treated * as opaque objects, I guess...