Created
April 1, 2012 02:52
-
-
Save yohgaki/2270853 to your computer and use it in GitHub Desktop.
Apache 1.3.42 build fix patch. Recent libc has getline
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -ur httpd-1.3.42.orig//src/support/htdigest.c httpd-1.3.42/src/support/htdigest.c | |
--- httpd-1.3.42.orig//src/support/htdigest.c 2006-07-12 17:16:05.000000000 +0900 | |
+++ httpd-1.3.42/src/support/htdigest.c 2012-04-01 11:48:49.705771078 +0900 | |
@@ -71,7 +71,7 @@ | |
while ((line[y++] = line[x++])); | |
} | |
-static int getline(char *s, int n, FILE *f) | |
+static int my_getline(char *s, int n, FILE *f) | |
{ | |
register int i = 0; | |
@@ -158,7 +158,7 @@ | |
{ | |
static char line[MAX_STRING_LEN]; | |
- while (!(getline(line, MAX_STRING_LEN, source))) { | |
+ while (!(my_getline(line, MAX_STRING_LEN, source))) { | |
putline(target, line); | |
} | |
} | |
@@ -216,7 +216,7 @@ | |
ap_cpystrn(realm, argv[2], sizeof(realm)); | |
found = 0; | |
- while (!(getline(line, MAX_STRING_LEN, f))) { | |
+ while (!(my_getline(line, MAX_STRING_LEN, f))) { | |
if (found || (line[0] == '#') || (!line[0])) { | |
putline(tfp, line); | |
continue; | |
diff -ur httpd-1.3.42.orig//src/support/htpasswd.c httpd-1.3.42/src/support/htpasswd.c | |
--- httpd-1.3.42.orig//src/support/htpasswd.c 2006-07-12 17:16:05.000000000 +0900 | |
+++ httpd-1.3.42/src/support/htpasswd.c 2012-04-01 11:46:43.131341905 +0900 | |
@@ -98,7 +98,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 my_getline(char *s, int n, FILE *f) | |
{ | |
register int i = 0; | |
@@ -547,7 +547,7 @@ | |
char scratch[MAX_STRING_LEN]; | |
fpw = fopen(pwfilename, "r"); | |
- while (! (getline(line, sizeof(line), fpw))) { | |
+ while (! (my_getline(line, sizeof(line), fpw))) { | |
char *colon; | |
if ((line[0] == '#') || (line[0] == '\0')) { | |
diff -ur httpd-1.3.42.orig//src/support/logresolve.c httpd-1.3.42/src/support/logresolve.c | |
--- httpd-1.3.42.orig//src/support/logresolve.c 2008-10-06 23:29:12.000000000 +0900 | |
+++ httpd-1.3.42/src/support/logresolve.c 2012-04-01 11:49:26.259894983 +0900 | |
@@ -71,7 +71,7 @@ | |
#endif /* !MPE && !WIN32*/ | |
static void cgethost(struct in_addr ipnum, char *string, int check); | |
-static int getline(char *s, int n); | |
+static int my_getline(char *s, int n); | |
static void stats(FILE *output); | |
@@ -278,7 +278,7 @@ | |
* gets a line from stdin | |
*/ | |
-static int getline (char *s, int n) | |
+static int my_getline (char *s, int n) | |
{ | |
char *cp; | |
@@ -326,7 +326,7 @@ | |
for (i = 0; i < MAX_ERR + 2; i++) | |
errors[i] = 0; | |
- while (getline(line, MAXLINE)) { | |
+ while (my_getline(line, MAXLINE)) { | |
if (line[0] == '\0') | |
continue; | |
entries++; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment