postgres.git / summary / log / commit / refs

commit    0e28fc4c92a8ac0ade9390e8de2dcd8eda2861f6
Author:   Magnus Hagander <magnus@hagander.net>
Date:     Fri Apr 03 11:52:12 2009 +0000
First released in: 8.4.0, 8.2.14, 8.3.8

    Make directory name comparisons on Win32 case insensitive.
    
    This method will not catch all different ways since the locale
    handling in NTFS doesn't provide an easy way to do that, but it
    will hopefully solve the most common cases causing startup
    problems when the backend is found in the system PATH.
    
    Attempts to fix bug #4694.


src/port/path.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/port/path.c b/src/port/path.c index d353e6e17d1..c95cc7dcc53 100644 --- a/src/port/path.c +++ b/src/port/path.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/port/path.c,v 1.74 2008/01/01 19:46:00 momjian Exp $ + * $PostgreSQL: pgsql/src/port/path.c,v 1.74.2.1 2009/04/03 11:52:12 mha Exp $ * *------------------------------------------------------------------------- */ @@ -427,7 +427,12 @@ dir_strcmp(const char *s1, const char *s2) { while (*s1 && *s2) { +#ifndef WIN32 if (*s1 != *s2 && +#else + /* On windows, paths are case-insensitive */ + if (pg_tolower(*s1) != pg_tolower(*s2) && +#endif !(IS_DIR_SEP(*s1) && IS_DIR_SEP(*s2))) return (int) *s1 - (int) *s2; s1++, s2++; [parent: a1e9a25dc33e]