httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 36032] New: - apr_common.m4: proper [] escaping is missing in main()'s proto
Date Thu, 04 Aug 2005 20:29:20 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=36032>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=36032

           Summary: apr_common.m4: proper [] escaping is missing in main()'s
                    proto
           Product: Apache httpd-2.0
           Version: 2.0.54
          Platform: All
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Build
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: lavr@ncbi.nlm.nih.gov


The problem manifests when CFLAGS is defined to contain -Wall, then
configure run on Linux fails to detect glibc2 style of gethostbyname_r()
(neither getnameinfo() nor getaddrinfo() available, like with
-Dgetnameinfo=xx1 -Dgetaddrinfo=xx2) 

As a result, sockaddr.c compilation fails (due to unmatched number
of arguments vs. gethostbyname_r's prototype).

Synopsis:
./configure produces:
checking style of gethostbyname_r routine... none

./srclib/apr/config.log:
configure:40481: checking style of gethostbyname_r routine
conftest.c:19: warning: second argument of 'main' should be 'char **'
configure: failed or warning program:
#include "confdefs.h"

#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_ARPA_INET_H
#include <arpa/inet.h>
#endif
#ifdef HAVE_NETDB_H
#include <netdb.h>
#endif
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif

int main(int argc, const char * const argv) {

int tmp = gethostbyname_r((const char *) 0, (struct hostent *) 0,
                          (char *) 0, 0, (struct hostent **) 0, &tmp);

; return 0; }
configure:40534: result: none

Reason:
BAD main() prototyping is coming from:

./srclib/apr/build/apr_common.m4:466:
int main(int argc, const char * const argv[])

with the square brakets get stripped.


CORRECTION NEEDED:
Proper escaping of the square brakets to be preserved for argv.


2.0.52 has exactly the same problem, and I did not check how
deep in revision history the problem goes..

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


Mime
View raw message