Andrew Dunstan wrote:
>
> Attached are 2 patches and one additional alternative contrib regression
> test file (for cube). The patches fix a misleading message in
> pg_regress.sh, and strip the .exe suffix from the result of
> get_progname() as previously discussed. This lets us get much further
> with contrib regression tests - there are 2 remaining issues preventing
> a clean run - one odd one in the seg module and a path issue in
> tsearch2. I am looking into these. (Why am I bothered with all this?
> Because I want the buildfarm system to run on Windows).
I have changed the .exe patch to use pg_strcasecmp() rather than
stricmp(), and changed it to use sizeof(EXE) rather than '4'. Patch
attached and applied.
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
Index: src/port/path.c
===================================================================
RCS file: /cvsroot/pgsql/src/port/path.c,v
retrieving revision 1.38
diff -c -c -r1.38 path.c
*** src/port/path.c 27 Oct 2004 17:17:09 -0000 1.38
--- src/port/path.c 1 Nov 2004 04:21:56 -0000
***************
*** 195,202 ****
#if defined(__CYGWIN__) || defined(WIN32)
/* strip .exe suffix, regardless of case */
! if (strlen(nodir_name) > 4 &&
! stricmp(nodir_name + (strlen(nodir_name) - 4), EXE) == 0)
{
char *progname;
--- 195,202 ----
#if defined(__CYGWIN__) || defined(WIN32)
/* strip .exe suffix, regardless of case */
! if (strlen(nodir_name) > sizeof(EXE) &&
! pg_strcasecmp(nodir_name + strlen(nodir_name) - sizeof(EXE), EXE) == 0)
{
char *progname;
***************
*** 206,212 ****
fprintf(stderr, "%s: out of memory\n", nodir_name);
exit(1);
}
! progname[strlen(progname) - 4] = '\0';
nodir_name = progname;
}
#endif
--- 206,212 ----
fprintf(stderr, "%s: out of memory\n", nodir_name);
exit(1);
}
! progname[strlen(progname) - sizeof(EXE)] = '\0';
nodir_name = progname;
}
#endif