|
8 | 8 | *
|
9 | 9 | *
|
10 | 10 | * IDENTIFICATION
|
11 |
| - * $PostgreSQL: pgsql/src/port/path.c,v 1.77 2009/04/0311:52:08 mha Exp $ |
| 11 | + * $PostgreSQL: pgsql/src/port/path.c,v 1.78 2009/04/0323:27:17 tgl Exp $ |
12 | 12 | *
|
13 | 13 | *-------------------------------------------------------------------------
|
14 | 14 | */
|
@@ -420,20 +420,22 @@ get_progname(const char *argv0)
|
420 | 420 |
|
421 | 421 |
|
422 | 422 | /*
|
423 |
| - * dir_strcmp: strcmp except any two DIR_SEP characters are considered equal |
| 423 | + * dir_strcmp: strcmp except any two DIR_SEP characters are considered equal, |
| 424 | + * and we honor filesystem case insensitivity if known |
424 | 425 | */
|
425 | 426 | staticint
|
426 | 427 | dir_strcmp(constchar*s1,constchar*s2)
|
427 | 428 | {
|
428 | 429 | while (*s1&&*s2)
|
429 | 430 | {
|
| 431 | +if ( |
430 | 432 | #ifndefWIN32
|
431 |
| -if (*s1!=*s2&& |
| 433 | +*s1!=*s2 |
432 | 434 | #else
|
433 | 435 | /* On windows, paths are case-insensitive */
|
434 |
| -if (pg_tolower(*s1)!=pg_tolower(*s2)&& |
| 436 | +pg_tolower((unsignedchar)*s1)!=pg_tolower((unsignedchar)*s2) |
435 | 437 | #endif
|
436 |
| -!(IS_DIR_SEP(*s1)&&IS_DIR_SEP(*s2))) |
| 438 | +&&!(IS_DIR_SEP(*s1)&&IS_DIR_SEP(*s2))) |
437 | 439 | return (int)*s1- (int)*s2;
|
438 | 440 | s1++,s2++;
|
439 | 441 | }
|
|