https://bugs.ruby-lang.org/https://bugs.ruby-lang.org/favicon.ico?17113305112008-12-29T03:17:14ZRuby Issue Tracking SystemRuby master - Bug #940: ruby/config.h:1:1: warning: "PACKAGE_NAME" redefinedhttps://bugs.ruby-lang.org/issues/940?journal_id=24012008-12-29T03:17:14Zshyouhei (Shyouhei Urabe)shyouhei@ruby-lang.org
<ul><li><strong>Category</strong> set to <i>ext</i></li><li><strong>Priority</strong> changed from <i>Normal</i> to <i>3</i></li></ul><p>=begin<br>
Can't reproduce.</p>
<p>I suspect you defined PACKAGE_NAME somewhere else.<br>
=end</p> Ruby master - Bug #940: ruby/config.h:1:1: warning: "PACKAGE_NAME" redefinedhttps://bugs.ruby-lang.org/issues/940?journal_id=24962009-01-01T16:59:31Zyugui (Yuki Sonoda)yugui@yugui.jp
<ul><li><strong>Target version</strong> set to <i>1.9.1 RC2</i></li></ul><p>=begin</p>
<p>=end</p> Ruby master - Bug #940: ruby/config.h:1:1: warning: "PACKAGE_NAME" redefinedhttps://bugs.ruby-lang.org/issues/940?journal_id=26022009-01-13T20:25:11Zyugui (Yuki Sonoda)yugui@yugui.jp
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Rejected</i></li></ul><p>=begin</p>
<p>=end</p> Ruby master - Bug #940: ruby/config.h:1:1: warning: "PACKAGE_NAME" redefinedhttps://bugs.ruby-lang.org/issues/940?journal_id=43762009-06-23T08:24:42Zshammash (Luca Bigliardi)shammash@artha.org
<ul></ul><p>=begin<br>
How to reproduce:</p>
<ul>
<li>start a project with autotools (including autoheader)</li>
<li>create a C/C++ file including both ruby.h and config.h generated by autotools<br>
=end</li>
</ul> Ruby master - Bug #940: ruby/config.h:1:1: warning: "PACKAGE_NAME" redefinedhttps://bugs.ruby-lang.org/issues/940?journal_id=43772009-06-23T09:50:35Zmatz (Yukihiro Matsumoto)matz@ruby.or.jp
<ul></ul><p>=begin<br>
Hi,</p>
<p>In message "Re: <a href="https://blade.ruby-lang.org/ruby-core/23973">[ruby-core:23973]</a> [Bug <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: ruby/config.h:1:1: warning: "PACKAGE_NAME" redefined (Closed)" href="https://bugs.ruby-lang.org/issues/940">#940</a>] ruby/config.h:1:1: warning: "PACKAGE_NAME" redefined"<br>
on Tue, 23 Jun 2009 08:24:42 +0900, Luca Bigliardi <a href="mailto:redmine@ruby-lang.org" class="email">redmine@ruby-lang.org</a> writes:</p>
<p>|How to reproduce:<br>
|<br>
|- start a project with autotools (including autoheader)<br>
|- create a C/C++ file including both ruby.h and config.h generated by autotools</p>
<p>I have no idea to fix this issue when including independently<br>
generated header files in single source file. Probably people behind<br>
autotools know how to resolve.</p>
<pre><code> matz.
</code></pre>
<p>=end</p> Ruby master - Bug #940: ruby/config.h:1:1: warning: "PACKAGE_NAME" redefinedhttps://bugs.ruby-lang.org/issues/940?journal_id=43782009-06-23T19:03:37Zshammash (Luca Bigliardi)shammash@artha.org
<ul></ul><p>=begin<br>
Let me explain you a bit more what's happening:</p>
<ul>
<li>Autotools are a widely used, long time existing tool for handling C/C++<br>
projects ( <a href="http://en.wikipedia.org/wiki/GNU_build_system" class="external">http://en.wikipedia.org/wiki/GNU_build_system</a> )</li>
<li>If in your project you have to do conditional compilation depending<br>
on the features found by the "./configure" script then the way to<br>
do it is let autotools define in config.h something like HAVE_FEATURE<br>
so in your code you simply do:<br>
#ifdef HAVE_FEATURE<br>
....<br>
#endif</li>
<li>If in a C/C++ module you have to deal at the same time with conditional<br>
compilation and ruby bindings then you have to include both config.h and ruby.h</li>
<li>Ruby somewhere defines its own PACKAGE_NAME PACKAGE_STRING PACKAGE_TARNAME<br>
PACKAGE_VERSION which are already defined in config.h created by your "./configure".</li>
</ul>
<p>To me it sounds like the problem comes our from the fact that you're installing your own<br>
config.h and referencing it from an header you provide as an interface.</p>
<p>Thank you,</p>
<p>luca</p>
<p>=end</p> Ruby master - Bug #940: ruby/config.h:1:1: warning: "PACKAGE_NAME" redefinedhttps://bugs.ruby-lang.org/issues/940?journal_id=43792009-06-23T20:25:27Znobu (Nobuyoshi Nakada)nobu@ruby-lang.org
<ul><li><strong>Status</strong> changed from <i>Rejected</i> to <i>Assigned</i></li><li><strong>Assignee</strong> set to <i>yugui (Yuki Sonoda)</i></li><li><strong>Target version</strong> changed from <i>1.9.1 RC2</i> to <i>1.9.1</i></li><li><strong>ruby -v</strong> set to <i>ruby 1.9.2dev</i></li></ul><p>=begin<br>
fixed at r23827<br>
=end</p> Ruby master - Bug #940: ruby/config.h:1:1: warning: "PACKAGE_NAME" redefinedhttps://bugs.ruby-lang.org/issues/940?journal_id=46762009-07-14T00:17:19Zyugui (Yuki Sonoda)yugui@yugui.jp
<ul><li><strong>Status</strong> changed from <i>Assigned</i> to <i>Closed</i></li></ul><p>=begin</p>
<p>=end</p>