apache
Conditional definition of ap_log_perror contains typo that prevents compilation
In function macro ap_do_log_perror__ there is a call to function ap_do_log_perror. However, there is no function with that name, the function's correct name being ap_log_perror_ . The condition __STDC_VERSION__ >= 199901L holds if the compiler accepts C99.
Bug fixed by commit 3407eccc321
| Type | UndefinedSymbol |
| Config | "__STDC_VERSION__ >= 199901L && APLOG_MAX_LOGLEVEL" (2nd degree) |
| Fix-in | code |
| Location | include/ |
#include <stdio.h>
#include <stdlib.h>
void ap_log_perror_(int level)
{
printf("%d\n", level);
}
#if __STDC_VERSION__ >= 199901L && defined(APLOG_MAX_LOGLEVEL)
#define ap_log_perror__(level) \
if (rand() % 2) { ap_do_log_perror_(level); } // ERROR: ap_do_log_perror_ undeclared
#endif
int main(void)
{
#if __STDC_VERSION__ >= 199901L && defined(APLOG_MAX_LOGLEVEL)
ap_log_perror__(2);
#endif
return 0;
}
diff --git a/apache/simple/3407ecc.c b/apache/simple/3407ecc.c
--- a/apache/simple/3407ecc.c
+++ b/apache/simple/3407ecc.c
@@ -8,7 +8,7 @@ void ap_log_perror_(int level)
#if __STDC_VERSION__ >= 199901L && defined(APLOG_MAX_LOGLEVEL)
#define ap_log_perror__(level) \
- if (rand() % 2) { ap_do_log_perror_(level); } // ERROR: ap_do_log_perror_ undeclared
+ if (rand() % 2) { ap_log_perror_(level); } // ERROR: ap_do_log_perror_ undeclared
#endif
int main(void)
. ERROR http_log.h.c:318:ap_do_log_perror(...);