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.
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/port/path.c,v 1.70 2006/10/04 00:30:14 momjian Exp $
+ * $PostgreSQL: pgsql/src/port/path.c,v 1.70.2.1 2009/04/03 11:52:10 mha Exp $
*
*-------------------------------------------------------------------------
*/
{
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++;