diff --git a/configure.ac b/configure.ac index 2d8dfb6d..76c349db 100644 --- a/configure.ac +++ b/configure.ac @@ -7,6 +7,7 @@ AC_CONFIG_HEADERS([include/config.h]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_AUX_DIR([config]) AM_INIT_AUTOMAKE([1.9]) +AC_DEFINE([_POSIX_C_SOURCE],[200809L],[Enable POSIX]) PACKAGE_SUFFIX="-2.0" AC_SUBST(PACKAGE_SUFFIX) dnl https://www.gnu.org/software/libtool/manual/libtool.html#Libtool-versioning diff --git a/index/zebraapi.c b/index/zebraapi.c index 38f197f5..70125a1a 100644 --- a/index/zebraapi.c +++ b/index/zebraapi.c @@ -873,7 +873,7 @@ void map_basenames_func(void *vp, const char *name, const char *value) return ; no--; for (i = 0; inum_bases; i++) - if (p->basenames[i] && !STRCASECMP(p->basenames[i], fromdb)) + if (p->basenames[i] && !yaz_strcasecmp(p->basenames[i], fromdb)) { p->basenames[i] = 0; for (i = 0; i < no; i++) diff --git a/index/zinfo.c b/index/zinfo.c index d0630001..86ec44bd 100644 --- a/index/zinfo.c +++ b/index/zinfo.c @@ -799,11 +799,11 @@ int zebraExplain_curDatabase(ZebraExplainInfo zei, const char *database) assert(zei); if (zei->curDatabaseInfo && - !STRCASECMP(zei->curDatabaseInfo->databaseName, database)) + !yaz_strcasecmp(zei->curDatabaseInfo->databaseName, database)) return 0; for (zdi = zei->databaseInfo; zdi; zdi=zdi->next) { - if (!STRCASECMP(zdi->databaseName, database_n)) + if (!yaz_strcasecmp(zdi->databaseName, database_n)) break; } if (!zdi) @@ -897,7 +897,7 @@ int zebraExplain_newDatabase(ZebraExplainInfo zei, const char *database, assert(zei); for (zdi = zei->databaseInfo; zdi; zdi=zdi->next) { - if (!STRCASECMP(zdi->databaseName, database_n)) + if (!yaz_strcasecmp(zdi->databaseName, database_n)) break; } if (zdi) diff --git a/index/zinfo.h b/index/zinfo.h index 38c59205..12f7c445 100644 --- a/index/zinfo.h +++ b/index/zinfo.h @@ -25,13 +25,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include #include "recindex.h" -/* Compare string (ignore case) */ -#ifdef WIN32 -#define STRCASECMP stricmp -#else -#define STRCASECMP strcasecmp -#endif - YAZ_BEGIN_CDECL typedef enum {