Bug 9707 - sigscheme.h includes config.h and cause compiler warning
Summary: sigscheme.h includes config.h and cause compiler warning
Status: RESOLVED NOTOURBUG
Alias: None
Product: UIM
Classification: Unclassified
Component: libuim: Scheme interpreter (show other bugs)
Version: unspecified
Hardware: x86 (IA32) Linux (All)
: high normal
Assignee: uim-bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-19 07:17 UTC by Yusuke TABATA
Modified: 2007-01-19 23:15 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Yusuke TABATA 2007-01-19 07:17:06 UTC
sigscheme.h includes sigscheme/config.h and my source code uses its own
config.h generated by autotools. So C macros like PACKAGE, VERSION and so on
would be re-defined.
Comment 1 YamaKen 2007-01-19 09:25:28 UTC
Notice: Since uim is not sufferring from this bug, the resolution is marked as
NOTOURBUG. This bug only affects libsscm users (libuim does not use libsscm).

I accept this bug as a SigScheme devleoper and will fix future version (likely
0.8.0).Notice: Since uim is not sufferring a problem from this bug, the
resolution is marked as NOTOURBUG. This bug only affects libsscm users (libuim
does not use libsscm).

Thanks for the report. I accept this bug as a SigScheme devleoper and will fix
it in a future version (probably 0.8.0). There are two workaround until the fix:

1. Use the combined-source mode of SigScheme
   http://uim.freedesktop.org/doc/sigscheme-0.7.4/global-obj.html

2. Import sigscheme-combined.h to your project, and include it
   immediately after sigscheme.h as follows:

     #include <sigscheme/sigscheme.h>
     #include "sigscheme-combined.h"
     
     #include "config.h"

   Both sigscheme.h and sigscheme-combined.h must be included in prior to your
project's own config.h.
Comment 2 Etsushi Kato 2007-01-19 18:48:53 UTC
Since SigScheme headers depend private config.h and install it, I suggest using
name like "sigscheme-config.h" for AC_CONFIG_HEADERS to avoid such a problem.
Comment 3 YamaKen 2007-01-19 19:25:46 UTC
AC_CONFIG_HEADERS does not resolve the definitions conflict problem, and since
SigScheme's config.h is intended to be included as <sigscheme/config.h>, the
filename conflict will not occur.
Comment 4 Etsushi Kato 2007-01-19 22:58:33 UTC
> AC_CONFIG_HEADERS does not resolve the definitions conflict problem, and since
> SigScheme's config.h is intended to be included as <sigscheme/config.h>, the
> filename conflict will not occur.

No.  Packages using SigScheme probably uses "pkg-config --cflags sigscheme" for
CFLAGS, and since it contains include/sigscheme directory it conflicts config.h
inclusion.
Comment 5 Etsushi Kato 2007-01-19 23:04:43 UTC
Another way to solve these kind of problem without renaming config.h is using
include/sigscheme/private directory for config.h.
Comment 6 YamaKen 2007-01-19 23:15:57 UTC
(In reply to comment #4)
> > SigScheme's config.h is intended to be included as <sigscheme/config.h>, the
> > filename conflict will not occur.
> 
> No.  Packages using SigScheme probably uses "pkg-config --cflags sigscheme" for
> CFLAGS, and since it contains include/sigscheme directory it conflicts config.h
> inclusion.

Oops. It's a sigscheme.pc.in bug. Thanks for letting me know. I'll exclude
-I${prefix}/include/sigscheme from it.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.