X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=recctrl%2Frecctrl.c;h=d4f6f2b9fd46eaad523186eedb398d4e25e3a5c9;hb=174ad2c7bbf2b7312ac080de2fd85d0509a55404;hp=a19874feb711cd6ab064cb20d31f238ada63b0a9;hpb=39cb125e7755c6058a93dada8d5172804213cf8e;p=idzebra-moved-to-github.git diff --git a/recctrl/recctrl.c b/recctrl/recctrl.c index a19874f..d4f6f2b 100644 --- a/recctrl/recctrl.c +++ b/recctrl/recctrl.c @@ -1,6 +1,6 @@ -/* $Id: recctrl.c,v 1.14 2004-11-29 21:55:28 adam Exp $ - Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004 - Index Data Aps +/* $Id: recctrl.c,v 1.17 2005-01-15 19:38:32 adam Exp $ + Copyright (C) 1995-2005 + Index Data ApS This file is part of the Zebra server. @@ -24,7 +24,9 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include #include #include +#if HAVE_DLFCN_H #include +#endif #include #include @@ -48,6 +50,9 @@ struct recTypes { struct recTypeInstance *entries; }; +#ifdef IDZEBRA_STATIC_GRS_SGML + extern RecType idzebra_filter_grs_sgml[]; +#endif #ifdef IDZEBRA_STATIC_TEXT extern RecType idzebra_filter_text[]; #endif @@ -78,8 +83,9 @@ RecTypeClass recTypeClass_create (Res res, NMEM nmem) const char *module_path = res_get_def(res, "modulePath", DEFAULT_MODULE_PATH); - extern RecType idzebra_filter_grs_sgml[]; +#ifdef IDZEBRA_STATIC_GRS_SGML recTypeClass_add (&rts, idzebra_filter_grs_sgml, nmem, 0); +#endif #ifdef IDZEBRA_STATIC_TEXT recTypeClass_add (&rts, idzebra_filter_text, nmem, 0); #endif @@ -101,6 +107,7 @@ RecTypeClass recTypeClass_create (Res res, NMEM nmem) recTypeClass_add (&rts, idzebra_filter_safari, nmem, 0); #endif +#if HAVE_DLFCN_H if (module_path) { DIR *dir = opendir(module_path); @@ -146,6 +153,7 @@ RecTypeClass recTypeClass_create (Res res, NMEM nmem) closedir(dir); } } +#endif return rts; } @@ -180,8 +188,10 @@ void recTypeClass_destroy(RecTypeClass rtc) { for (; rtc; rtc = rtc->next) { +#if HAVE_DLFCN_H if (rtc->module_handle) dlclose(rtc->module_handle); +#endif } }