From: Michael Meskes Date: Fri, 12 Jan 2018 14:59:43 +0000 (+0100) Subject: Fix parsing of compatibility mode argument. X-Git-Tag: REL_11_BETA1~942 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ca4587f3f94f5c33da6543535f666a9f20f3ef33;p=postgresql Fix parsing of compatibility mode argument. Patch by Ashutosh Sharma --- diff --git a/src/interfaces/ecpg/preproc/ecpg.c b/src/interfaces/ecpg/preproc/ecpg.c index 8a14572261..cd770c8b15 100644 --- a/src/interfaces/ecpg/preproc/ecpg.c +++ b/src/interfaces/ecpg/preproc/ecpg.c @@ -198,12 +198,12 @@ main(int argc, char *const argv[]) system_includes = true; break; case 'C': - if (strncmp(optarg, "INFORMIX", strlen("INFORMIX")) == 0) + if (pg_strcasecmp(optarg, "INFORMIX") == 0 || pg_strcasecmp(optarg, "INFORMIX_SE") == 0) { char pkginclude_path[MAXPGPATH]; char informix_path[MAXPGPATH]; - compat = (strcmp(optarg, "INFORMIX") == 0) ? ECPG_COMPAT_INFORMIX : ECPG_COMPAT_INFORMIX_SE; + compat = (pg_strcasecmp(optarg, "INFORMIX") == 0) ? ECPG_COMPAT_INFORMIX : ECPG_COMPAT_INFORMIX_SE; get_pkginclude_path(my_exec_path, pkginclude_path); snprintf(informix_path, MAXPGPATH, "%s/informix/esql", pkginclude_path); add_include_path(informix_path);