Mail Archives: djgpp-workers/2001/10/07/13:21:43
With bash 2.05, autoconf 2.50 testsuite reports 225 failures out
of 252 tests (!), because virtually every configure scripts outputs
an extra '/dev/null: not a regular file' line to stderr. I found
the reason: broken test -f. It should check if file exists and is
regular. However, bash does not check the later under DJGPP. My
patch fixes that, autoconf testsuite looking much better now.
Note that I've replaced access with stat, so further tweaking might
be welcome, if performance is an issue.
Laurynas
--- test.c.orig Sun May 13 20:25:06 2001
+++ test.c Sun Oct 7 19:07:20 2001
@@ -638,14 +638,15 @@
if (test_stat (arg, &stat_buf) < 0)
return (FALSE);
#else
- if (access (arg, F_OK) == 0 && (access (arg, D_OK) != 0))
- return TRUE;
- if (test_finds_exe)
- {
- const char *path = find_one_extension (arg, "exe");
- return (path != NULL);
- }
- return FALSE;
+ if (test_stat (arg, &stat_buf) < 0)
+ {
+ if (test_finds_exe)
+ {
+ const char *path = find_one_extension (arg, "exe");
+ return (path != NULL);
+ }
+ return (FALSE);
+ }
#endif
/* -f is true if the given file exists and is a regular file. */
#if defined (S_IFMT)
- Raw text -