From: Mike Taylor Date: Thu, 8 Aug 2002 16:14:26 +0000 (+0000) Subject: Add -ansi option to default G++ flags. That detects that X-Git-Tag: YAZPP.0.3~10 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=fb113bcbf8398f8faa896529405909c7f8092b20;p=yazpp-moved-to-github.git Add -ansi option to default G++ flags. That detects that on my Linux system (Red Hat 7.1) wrongly fails to declare strcasecmp(), so I am using yaz_matchstr() instead. --- diff --git a/zoom/Makefile b/zoom/Makefile index b901e05..2b3201d 100644 --- a/zoom/Makefile +++ b/zoom/Makefile @@ -1,8 +1,8 @@ -# $Header: /home/cvsroot/yaz++/zoom/Attic/Makefile,v 1.2 2002-08-08 16:06:50 mike Exp $ +# $Header: /home/cvsroot/yaz++/zoom/Attic/Makefile,v 1.3 2002-08-08 16:14:26 mike Exp $ CCC = g++ # ... until I figure out what the standard # Make macro name is for the C++ compiler. -CPPFLAGS := -Wall -g +CPPFLAGS := -Wall -g -ansi L = libzoom.a OBJ = $L(zexcept.o) $L(zconn.o) $L(zquery.o) $L(zrs.o) $L(zrec.o) diff --git a/zoom/zrec.cpp b/zoom/zrec.cpp index 2a0bd6f..09dee2f 100644 --- a/zoom/zrec.cpp +++ b/zoom/zrec.cpp @@ -1,9 +1,9 @@ -// $Header: /home/cvsroot/yaz++/zoom/zrec.cpp,v 1.2 2002-08-08 16:06:08 mike Exp $ +// $Header: /home/cvsroot/yaz++/zoom/zrec.cpp,v 1.3 2002-08-08 16:14:26 mike Exp $ // Z39.50 Record class #include "zoom++.h" -#include // for strcasecmp() +#include // for yaz_matchstr() namespace ZOOM { @@ -39,19 +39,19 @@ namespace ZOOM { const char *syn = ZOOM_record_get(r, "syntax", 0); // These string constants are from yaz/util/oid.c - if (!strcasecmp(syn, "xml")) + if (!yaz_matchstr(syn, "xml")) return XML; - else if (!strcasecmp(syn, "GRS-1")) + else if (!yaz_matchstr(syn, "GRS-1")) return GRS1; - else if (!strcasecmp(syn, "SUTRS")) + else if (!yaz_matchstr(syn, "SUTRS")) return SUTRS; - else if (!strcasecmp(syn, "USmarc")) + else if (!yaz_matchstr(syn, "USmarc")) return USMARC; - else if (!strcasecmp(syn, "UKmarc")) + else if (!yaz_matchstr(syn, "UKmarc")) return UKMARC; - else if (!strcasecmp(syn, "XML") || - !strcasecmp(syn, "text-XML") || - !strcasecmp(syn, "application-XML")) + else if (!yaz_matchstr(syn, "XML") || + !yaz_matchstr(syn, "text-XML") || + !yaz_matchstr(syn, "application-XML")) return XML; return UNKNOWN;