----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, April 08, 2001 11:57 PM
Subject: cvs commit: apr/test testnames.c
> rbb 01/04/08 21:57:46
>
> Modified: test testnames.c
> Log:
> gets is an unsafe function, and it outputs and error message on Linux.
> Using fgets makes this compile quietly.
>
> - if (!gets(rootpath))
> + if (!fgets(rootpath, 256, stdin))
> exit(0);
> fprintf(stdout, "Enter an add path$ ");
> - if (!gets(addpath))
> + if (!fgets(addpath, 256, stdin))
> exit(0);
Fair enough ... however, don't you need to eat the newline with this patch?
stroff = strlen(path) - 1;
while (stroff >= path && apr_isspace(stroff)) {
path[stroff--] = '\0';
}