You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2002/06/16 04:40:38 UTC

DO NOT REPLY [Bug 9894] New: - getline sub in support progs collides with existing getline def'n

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9894>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9894

getline sub in support progs collides with existing getline def'n

           Summary: getline sub in support progs collides with existing
                    getline def'n
           Product: Apache httpd-1.3
           Version: 1.3.24
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: Major
          Priority: Other
         Component: core
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: info@infonium.com


This a continuation of proxy_http1.1_chunking.patch. I would ask that the same
changes be made to htpasswd, htdigest, & logresolve.

Attached is a patch that solves problems I've encountered between httpd-1.3.24,
mod_perl 1.27 & Perl 5.8.0 RC1. Really - just a simple rename to eliminate the
collision.

Thanks for your attention on this matter!
Jay

diff -Naur support-old/htdigest.c support/htdigest.c
--- support-old/htdigest.c      Wed Mar 13 16:05:37 2002
+++ support/htdigest.c  Sat Jun 15 22:07:30 2002
@@ -112,7 +112,7 @@
     while ((line[y++] = line[x++]));
 }

-static int getline(char *s, int n, FILE *f)
+API_EXPORT(int) ap_getline(char *s, int n, FILE *f)
 {
     register int i = 0;

@@ -199,7 +199,7 @@
 {
     static char line[MAX_STRING_LEN];

-    while (!(getline(line, MAX_STRING_LEN, source))) {
+    while (!(ap_getline(line, MAX_STRING_LEN, source))) {
        putline(target, line);
     }
 }
@@ -257,7 +257,7 @@
     strcpy(realm, argv[2]);

     found = 0;
-    while (!(getline(line, MAX_STRING_LEN, f))) {
+    while (!(ap_getline(line, MAX_STRING_LEN, f))) {
        if (found || (line[0] == '#') || (!line[0])) {
            putline(tfp, line);
            continue;
diff -Naur support-old/htpasswd.c support/htpasswd.c
--- support-old/htpasswd.c      Wed Mar 13 16:05:37 2002
+++ support/htpasswd.c  Sat Jun 15 22:06:35 2002
@@ -141,7 +141,7 @@
  * Get a line of input from the user, not including any terminating
  * newline.
  */
-static int getline(char *s, int n, FILE *f)
+API_EXPORT(int) ap_getline(char *s, int n, FILE *f)
 {
     register int i = 0;

@@ -590,7 +590,7 @@
        char scratch[MAX_STRING_LEN];

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

            if ((line[0] == '#') || (line[0] == '\0')) {
diff -Naur support-old/logresolve.c support/logresolve.c
--- support-old/logresolve.c    Tue May 22 18:52:21 2001
+++ support/logresolve.c        Sat Jun 15 22:08:40 2002
@@ -55,7 +55,7 @@
 #endif /* !MPE && !WIN32*/

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


@@ -262,7 +262,7 @@
  * gets a line from stdin
  */

-static int getline (char *s, int n)
+API_EXPORT(int) ap_getline (char *s, int n)
 {
     char *cp;

@@ -310,7 +310,7 @@
     for (i = 0; i < MAX_ERR + 2; i++)
        errors[i] = 0;

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

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org