[unixODBC-support] stricmp support

Daniel Macks dmacks at netspace.org
Tue Dec 18 08:27:04 GMT 2007


Regarding sqp/sqpStoreDataType.c CVS revision 1.2->1.3, instead of
hardcoding strcasecmp in place of stricmp, could just take the same
approach that the unixodbc Drivers/ do:

#ifndef HAVE_STRICMP
#define stricmp(s1,s2) strcasecmp(s1,s2)
#define strnicmp(s1,s2,n) strncasecmp(s1,s2,n)
#endif

so those who have it get whatever added benefit it adds over the
compatibility function.

Alternately, that same compatibility game is played in many places.
Might be less error-prone to centralize it in config.h (conditional on
however HAVE_STRICMP is presently determined). But...whoa, there does
not (as of 2.2.12) appear to *be* anything to set that flag: not in
config.h.in, nothing related to those functions in configure.in.
Missing an AC_CHECK_FUNCS for it probably?

dan

-- 
Daniel Macks
dmacks at netspace.org
http://www.netspace.org/~dmacks




More information about the unixODBC-support mailing list