Commit a91b4078 authored by Jeff Trawick's avatar Jeff Trawick
Browse files

avoid colliding with getline() as defined by glibc

(it breaks if you need to turn on _GNU_SOURCE)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95035 13f79535-47bb-0310-9956-ffa450edef68
parent 9f1492f5
Loading
Loading
Loading
Loading
+2 −2
Changes for support/htdigest.c: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -118,7 +118,7 @@ static void getword(char *word, char *line, char stop)
    while ((line[y++] = line[x++]));
}

static int getline(char *s, int n, apr_file_t *f)
static int get_line(char *s, int n, apr_file_t *f)
{
    register int i = 0;
    char ch;
@@ -277,7 +277,7 @@ int main(int argc, const char * const argv[])
    strcpy(realm, argv[2]);

    found = 0;
    while (!(getline(line, MAX_STRING_LEN, f))) {
    while (!(get_line(line, MAX_STRING_LEN, f))) {
	if (found || (line[0] == '#') || (!line[0])) {
	    putline(tfp, line);
	    continue;
+2 −2
Changes for support/htpasswd.c: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -154,7 +154,7 @@ static char *tname_buf = NULL;
 * Get a line of input from the user, not including any terminating
 * newline.
 */
static int getline(char *s, int n, FILE *f)
static int get_line(char *s, int n, FILE *f)
{
    register int i = 0;

@@ -633,7 +633,7 @@ int main(int argc, const char * const argv[])
	char scratch[MAX_STRING_LEN];

	fpw = fopen(pwfilename, "r");
	while (! (getline(line, sizeof(line), fpw))) {
	while (! (get_line(line, sizeof(line), fpw))) {
	    char *colon;

	    if ((line[0] == '#') || (line[0] == '\0')) {
+3 −3
Changes for support/logresolve.c: 3 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -66,7 +66,7 @@
#endif

static void cgethost(struct in_addr ipnum, char *string, int check);
static int getline(char *s, int n);
static int get_line(char *s, int n);
static void stats(FILE *output);

#ifdef BEOS
@@ -282,7 +282,7 @@ static void stats (FILE *output)
 * gets a line from stdin
 */

static int getline (char *s, int n)
static int get_line (char *s, int n)
{
    char *cp;

@@ -332,7 +332,7 @@ int main (int argc, char *argv[])
    for (i = 0; i < MAX_ERR + 2; i++)
	errors[i] = 0;

    while (getline(line, MAXLINE)) {
    while (get_line(line, MAXLINE)) {
	if (line[0] == '\0')
	    continue;
	entries++;