You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apache-bugdb@apache.org by Lee Berger <lb...@roy.org> on 1998/07/27 15:06:29 UTC
apache-api/2718: alloc.h conflicts with libstd++ installed header file
>Number: 2718
>Category: apache-api
>Synopsis: alloc.h conflicts with libstd++ installed header file
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: apache
>State: open
>Class: sw-bug
>Submitter-Id: apache
>Arrival-Date: Mon Jul 27 06:10:00 PDT 1998
>Last-Modified:
>Originator: lberger@roy.org
>Organization:
apache
>Release: 1.3.0
>Environment:
$ uname -a
Linux rob.roy.org 2.1.101 #1 SMP Thu May 14 15:30:40 EDT 1998 i686 unknown
$ gcc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.8.1/specs
gcc version 2.8.1
Running the RedHat distribution v5.0
>Description:
libstd++ installs a header file, alloc.h into /usr/include/g++ ... this header file conflicts with the alloc.h header file included into /usr/local/apache/include
This is a problem when the programmer attempts to use the various STL header files along with the Apache header files. -I/usr/local/apache/include confuses the STL header files, and -idirafter /usr/local/apache/include confuses the apache header files :)
>How-To-Repeat:
Simply compile a C++ program with the following includes:
#include <string>
#include <httpd.h>
>Fix:
I simply renamed Apache's alloc.h to ap_alloc.h, and modified httpd.h to point to the proper header file. This fixed the problem.
>Audit-Trail:
>Unformatted:
[In order for any reply to be added to the PR database, ]
[you need to include <ap...@Apache.Org> in the Cc line ]
[and leave the subject line UNCHANGED. This is not done]
[automatically because of the potential for mail loops. ]