From 6daa792eab1488d013fefc5eb7e4d01f40f38687 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Sun, 7 Feb 2010 20:03:20 +0100 Subject: change defaults for CONFIG/BUILD/INSTALL styles All packages need an update, so here is a very huge commit. Most of the 460 source packages use automatic style for configuration, building and installing. Make these styles default to "auto". If you have a package, which does not conform to this, just use manual style and add a do-$task make target. I added a new style named AUTOTOOL style, which is needed for some broken packages, which needs to be updated via autoconf or automake. I renamed CONFIGURE_STYLE to CONFIG_STYLE. Updates for some packages, which have newer upstream versions. Renaming of all package/*/extra directories. Use the directory src/ to provide overwrites of source files or to add the code, when no upstream package is available or used. src directory will be automatically used. --- package/aiccu/Makefile | 4 ++- package/aiccu/extra/common/dn_skipname.c | 51 -------------------------------- package/aiccu/src/common/dn_skipname.c | 51 ++++++++++++++++++++++++++++++++ 3 files changed, 54 insertions(+), 52 deletions(-) delete mode 100644 package/aiccu/extra/common/dn_skipname.c create mode 100644 package/aiccu/src/common/dn_skipname.c (limited to 'package/aiccu') diff --git a/package/aiccu/Makefile b/package/aiccu/Makefile index 590786ee1..50b2f005b 100644 --- a/package/aiccu/Makefile +++ b/package/aiccu/Makefile @@ -20,10 +20,12 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,AICCU,${PKG_NAME},$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +CONFIG_STYLE:= manual +INSTALL_STYLE:= manual + TCFLAGS+= -D_REENTRANT -D_GNU_SOURCE -DAICCU_CONSOLE \ -D_LINUX -DHAS_IFHEAD -DAICCU_TYPE=\"linux\" TLDFLAGS+= -lpthread -lresolv -BUILD_STYLE:= auto MAKE_FLAGS+= CC='${TARGET_CC}' CFLAGS='${TCFLAGS}' LDFLAGS='${TLDFLAGS}' do-install: diff --git a/package/aiccu/extra/common/dn_skipname.c b/package/aiccu/extra/common/dn_skipname.c deleted file mode 100644 index f2219f335..000000000 --- a/package/aiccu/extra/common/dn_skipname.c +++ /dev/null @@ -1,51 +0,0 @@ -#include -#include - -/* Ripped from glibc 2.4 sources. */ - -/* - * ns_name_skip(ptrptr, eom) - * Advance *ptrptr to skip over the compressed name it points at. - * return: - * 0 on success, -1 (with errno set) on failure. - */ -int ns_name_skip(const u_char **ptrptr, const u_char *eom) -{ - const u_char *cp; - u_int n; - - cp = *ptrptr; - while (cp < eom && (n = *cp++) != 0) - { - /* Check for indirection. */ - switch (n & NS_CMPRSFLGS) { - case 0: /* normal case, n == len */ - cp += n; - continue; - case NS_CMPRSFLGS: /* indirection */ - cp++; - break; - default: /* illegal type */ - errno = EMSGSIZE; - return (-1); - } - break; - } - if (cp > eom) - { - errno = EMSGSIZE; - return (-1); - } - *ptrptr = cp; - return (0); -} - -int dn_skipname(const u_char *ptr, const u_char *eom) -{ - const u_char *saveptr = ptr; - - if(ns_name_skip(&ptr, eom) == -1) - return (-1); - return (ptr - saveptr); -} - diff --git a/package/aiccu/src/common/dn_skipname.c b/package/aiccu/src/common/dn_skipname.c new file mode 100644 index 000000000..f2219f335 --- /dev/null +++ b/package/aiccu/src/common/dn_skipname.c @@ -0,0 +1,51 @@ +#include +#include + +/* Ripped from glibc 2.4 sources. */ + +/* + * ns_name_skip(ptrptr, eom) + * Advance *ptrptr to skip over the compressed name it points at. + * return: + * 0 on success, -1 (with errno set) on failure. + */ +int ns_name_skip(const u_char **ptrptr, const u_char *eom) +{ + const u_char *cp; + u_int n; + + cp = *ptrptr; + while (cp < eom && (n = *cp++) != 0) + { + /* Check for indirection. */ + switch (n & NS_CMPRSFLGS) { + case 0: /* normal case, n == len */ + cp += n; + continue; + case NS_CMPRSFLGS: /* indirection */ + cp++; + break; + default: /* illegal type */ + errno = EMSGSIZE; + return (-1); + } + break; + } + if (cp > eom) + { + errno = EMSGSIZE; + return (-1); + } + *ptrptr = cp; + return (0); +} + +int dn_skipname(const u_char *ptr, const u_char *eom) +{ + const u_char *saveptr = ptr; + + if(ns_name_skip(&ptr, eom) == -1) + return (-1); + return (ptr - saveptr); +} + -- cgit v1.2.3