aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Meskes <meskes@postgresql.org>2018-01-12 15:59:43 +0100
committerMichael Meskes <meskes@postgresql.org>2018-01-12 16:00:43 +0100
commitca4587f3f94f5c33da6543535f666a9f20f3ef33 (patch)
tree4584cfbde2cc0aa74ff6b8c6e7cb9780dbd4f573 /src
parent49c784ece766781250224a371be14af71e7eda93 (diff)
downloadpostgresql-ca4587f3f94f5c33da6543535f666a9f20f3ef33.tar.gz
postgresql-ca4587f3f94f5c33da6543535f666a9f20f3ef33.zip
Fix parsing of compatibility mode argument.
Patch by Ashutosh Sharma <ashu.coek88@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/interfaces/ecpg/preproc/ecpg.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/interfaces/ecpg/preproc/ecpg.c b/src/interfaces/ecpg/preproc/ecpg.c
index 8a145722612..cd770c8b156 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);