You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by tr...@apache.org on 2002/05/10 20:20:29 UTC

cvs commit: httpd-2.0/support htdigest.c htpasswd.c logresolve.c

trawick     02/05/10 11:20:29

  Modified:    support  htdigest.c htpasswd.c logresolve.c
  Log:
  avoid colliding with getline() as defined by glibc
  (it breaks if you need to turn on _GNU_SOURCE)
  
  Revision  Changes    Path
  1.32      +2 -2      httpd-2.0/support/htdigest.c
  
  Index: htdigest.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/support/htdigest.c,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- htdigest.c	13 Apr 2002 19:35:18 -0000	1.31
  +++ htdigest.c	10 May 2002 18:20:29 -0000	1.32
  @@ -118,7 +118,7 @@
       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 @@
       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;
  
  
  
  1.42      +2 -2      httpd-2.0/support/htpasswd.c
  
  Index: htpasswd.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/support/htpasswd.c,v
  retrieving revision 1.41
  retrieving revision 1.42
  diff -u -r1.41 -r1.42
  --- htpasswd.c	13 Apr 2002 19:35:18 -0000	1.41
  +++ htpasswd.c	10 May 2002 18:20:29 -0000	1.42
  @@ -154,7 +154,7 @@
    * 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 @@
   	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')) {
  
  
  
  1.17      +3 -3      httpd-2.0/support/logresolve.c
  
  Index: logresolve.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/support/logresolve.c,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- logresolve.c	30 Aug 2001 05:52:25 -0000	1.16
  +++ logresolve.c	10 May 2002 18:20:29 -0000	1.17
  @@ -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 @@
    * 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 @@
       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++;