scandir.c used a variable named "new", which is valid ANSI C but

apparently not accepted by EGCS (EGCS BUG!)...


git-svn-id: file:///fltk/svn/fltk/trunk@396 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Michael R Sweet 1999-03-09 20:56:54 +00:00
parent 7a5dcb089b
commit 72d1391dbb

View File

@ -73,19 +73,19 @@ scandir (const char *dir, struct dirent ***namelist,
if (i == vsize)
{
struct dirent **new;
struct dirent **newv;
if (vsize == 0)
vsize = 10;
else
vsize *= 2;
new = (struct dirent **) realloc (v, vsize * sizeof (*v));
if (new == NULL)
newv = (struct dirent **) realloc (v, vsize * sizeof (*v));
if (newv == NULL)
{
lose:
errno = ENOMEM;
break;
}
v = new;
v = newv;
}
#define _D_EXACT_NAMLEN(d) (strlen ((d)->d_name))