Bug 46578 - Flawed header
Summary: Flawed header
Status: NEW
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: Core (show other bugs)
Version: 2.5-HEAD
Hardware: All All
: P2 normal (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-21 12:25 UTC by Edwin van Vliet
Modified: 2012-07-22 21:54 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Edwin van Vliet 2009-01-21 12:25:59 UTC
The header file ap_config_auto.h is a bit flawed. It defines PACKAGE_NAME and PACKAGE_VERSION, and similar constants. If one would like to compile their own module, one could write something like:

#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <httpd.h>
#include <http_config.h>
#include <http_protocol.h>
#include <ap_config.h>

This would give compiler warnings (not errors) about PACKAGE_NAME being re-defined. This is a bit sloppy and certainly not necessary. Hardly any C program defines PACKAGE_NAME and similar constants outside config.h, and header files should certainly not re-define them.

It would be better to have this in ap_config_auto.h:

#ifndef PACKAGE_BUGREPORT
# define PACKAGE_BUGREPORT ""
#endif

So it's not very critical, but it's also not nice to cause warnings that need not be caused.