diff --git a/configure.ac b/configure.ac index 9b149beb..9819c82c 100644 --- a/configure.ac +++ b/configure.ac @@ -32,27 +32,6 @@ to install it.]])], [AC_MSG_ERROR([[GNU gperf required, please install it.]])]) ]) -GPERF_TEST="$(echo foo,bar | ${GPERF} -L ANSI-C)" - -AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([ - #include - const char * in_word_set(const char *, size_t); - $GPERF_TEST] - )], - [GPERF_LEN_TYPE=size_t], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([ - #include - const char * in_word_set(const char *, unsigned); - $GPERF_TEST] - )], - [GPERF_LEN_TYPE=unsigned], - [AC_MSG_ERROR([** unable to determine gperf len type])] - )] -) - -AC_DEFINE_UNQUOTED([GPERF_LEN_TYPE], [$GPERF_LEN_TYPE], [gperf len type]) AC_PATH_PROG([ANTLR], [[antlr3]]) AS_IF([[test -z "$ANTLR"]], [AS_IF([[test -f "$srcdir/src/SMARTPLLexer.h"]], diff --git a/src/dmap_common.c b/src/dmap_common.c index 250a2d13..b2bc362b 100644 --- a/src/dmap_common.c +++ b/src/dmap_common.c @@ -42,6 +42,12 @@ dmap_get_fields_table(int *nfields) return dmap_fields; } +// This wrapper is so callers don't need to include dmap_fields_hash.h +const struct dmap_field * +dmap_find_field_wrapper(const char *str, int len) +{ + return dmap_find_field(str, len); +} void dmap_add_container(struct evbuffer *evbuf, const char *tag, int len) diff --git a/src/dmap_common.h b/src/dmap_common.h index 93a2bdc0..73f72d03 100644 --- a/src/dmap_common.h +++ b/src/dmap_common.h @@ -2,7 +2,6 @@ #ifndef __DMAP_HELPERS_H__ #define __DMAP_HELPERS_H__ -#include "config.h" #include #include @@ -45,9 +44,8 @@ extern const struct dmap_field_map dfm_dmap_aeSP; const struct dmap_field * dmap_get_fields_table(int *nfields); -/* From dmap_fields.gperf - keep in sync, don't alter */ const struct dmap_field * -dmap_find_field (register const char *str, register GPERF_LEN_TYPE len); +dmap_find_field_wrapper(const char *str, int len); void diff --git a/src/httpd_daap.c b/src/httpd_daap.c index aef2fe0e..0564275b 100644 --- a/src/httpd_daap.c +++ b/src/httpd_daap.c @@ -738,7 +738,7 @@ parse_meta(struct evhttp_request *req, char *tag, const char *param, const struc if (n == i) { - meta[i] = dmap_find_field(field, strlen(field)); + meta[i] = dmap_find_field_wrapper(field, strlen(field)); if (!meta[i]) {