Bug 222617 - util.h contains bad HAVE_CONFIG_H conditional
util.h contains bad HAVE_CONFIG_H conditional
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: audacious (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Ralf Ertzinger
Fedora Extras Quality Assurance
http://bugs-meta.atheme.org/view.php?...
: EasyFix
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-01-15 04:46 EST by Michael Schwendt
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-04-06 17:45:58 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
patch against audacious 1.2.2 (383 bytes, patch)
2007-01-15 09:47 EST, Michael Schwendt
no flags Details | Diff

  None (edit)
Description Michael Schwendt 2007-01-15 04:46:35 EST
Upstream http://bugs-meta.atheme.org/view.php?id=760

Audacious' API does this in its "util.h":

#ifdef HAVE_CONFIG_H
# include "config.h"
#endif

This is a bad assumption. First of all, you don't include a "config.h" header in
your API headers,

In file included from configure.c:2:
/usr/include/audacious/util.h:26:22: error: config.h: No such file or directory

and secondly, with GNU Automake, it is possible to redefine the config
autoheader like this:

  AM_CONFIG_HEADER(somewhere/NewConfigName.h)

Still HAVE_CONFIG_H will be set, but since the autoheaders file is not named
"config.h", your API headers fail.

The fix is simple. Never expose autoheaders to your API.
Comment 1 Ralf Ertzinger 2007-01-15 07:24:20 EST
The clean solution for this would be to create util.h from util.h.in with the
correct definition for bmp_menu_translate, I think.

This is way beyond my non-existing autofoo-skills, though.
Comment 2 Michael Schwendt 2007-01-15 09:47:22 EST
Created attachment 145577 [details]
patch against audacious 1.2.2
Comment 3 Ralf Ertzinger 2007-01-15 09:54:03 EST
I'm not sure this is right. config.h defines ENABLE_NLS, which is used later in
the file.

(Of course, given that there most likely is no config.h file at compile time
against this header (when not building audacious itself) anyway your patch does
not change the current behaviour.)
Comment 4 Michael Schwendt 2007-01-15 10:22:27 EST
config.h is included in every file before util.h is included

That ENABLE_NLS is undefined, but alters the API, is even worse
(audacious/util.c).
Comment 5 Ralf Ertzinger 2007-04-06 17:45:58 EDT
Fixed in the 1.3.x releases.

Note You need to log in before you can comment on or make changes to this bug.