<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://forum.eggheads.org/app.php/feed/topic/10244" />

	<title>egghelp/eggheads community</title>
	<subtitle>Discussion of eggdrop bots, shell accounts and tcl scripts.</subtitle>
	<link href="https://forum.eggheads.org/index.php" />
	<updated>2005-08-11T08:09:48-04:00</updated>

	<author><name><![CDATA[egghelp/eggheads community]]></name></author>
	<id>https://forum.eggheads.org/app.php/feed/topic/10244</id>

		<entry>
		<author><name><![CDATA[makam]]></name></author>
		<updated>2005-08-11T08:05:36-04:00</updated>

		<published>2005-08-11T08:05:36-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=54059#p54059</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=54059#p54059"/>
		<title type="html"><![CDATA[Fixed!]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=54059#p54059"><![CDATA[
Well, the solution is very elegant <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>I include the curl's headers file BEFORE src/mod/module.h header <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>So, in the <strong class="text-strong">curl.c</strong> is "empty"... and the <strong class="text-strong">htlive.c</strong>:<br><div class="codebox"><p>Code: </p><pre><code>.....#include &lt;string.h&gt; #include &lt;curl/curl.h&gt;#include &lt;curl/easy.h&gt; #undef global#include "src/mod/module.h" ....#include "curl.c"...</code></pre></div><br>I think that the macros defined in module.h doesnt like very much to curl <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br><br>It works!!! <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"> <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"> <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"> <br> <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_cool.gif" width="15" height="15" alt="8)" title="Cool"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5167">makam</a> — Thu Aug 11, 2005 8:05 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2005-08-11T00:55:30-04:00</updated>

		<published>2005-08-11T00:55:30-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=54045#p54045</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=54045#p54045"/>
		<title type="html"><![CDATA[Problems with &quot;global&quot;.. on compile-time (with my]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=54045#p54045"><![CDATA[
there is no <em class="text-italics">global</em> identifier in curl.h, you somehow messed up that in your code<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Thu Aug 11, 2005 12:55 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[makam]]></name></author>
		<updated>2005-08-10T10:46:03-04:00</updated>

		<published>2005-08-10T10:46:03-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=53992#p53992</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=53992#p53992"/>
		<title type="html"><![CDATA[Problems with &quot;global&quot;.. on compile-time (with my]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=53992#p53992"><![CDATA[
<blockquote class="uncited"><div>What happens when you comment the part of global in this line (line 64 in htlive.c:<br><div class="codebox"><p>Code: </p><pre><code>static Function *global = NULL, *channels_funcs = NULL,*server_funcs = NULL;</code></pre></div>change to<div class="codebox"><p>Code: </p><pre><code>static Function *channels_funcs = NULL,*server_funcs = NULL;</code></pre></div></div></blockquote><br>But it dont resolve anything.<br>I use nmalloc, where is defined in the <em class="text-italics">global</em> variable.<br>Also i need register the module, in the _start function.<br><div class="codebox"><p>Code: </p><pre><code>char *htlive_start(Function *global_funcs) {  p_tcl_bind_list H_temp;  global = global_funcs;  module_register(MODULE_NAME, htlive_table, HTLIVE_MAJORV, HTLIVE_MINORV);</code></pre></div> <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_evil.gif" width="15" height="15" alt=":evil:" title="Evil or Very Mad">  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_evil.gif" width="15" height="15" alt=":evil:" title="Evil or Very Mad"> ............. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_cry.gif" width="15" height="15" alt=":cry:" title="Crying or Very sad"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5167">makam</a> — Wed Aug 10, 2005 10:46 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Galadhrim]]></name></author>
		<updated>2005-08-10T05:17:32-04:00</updated>

		<published>2005-08-10T05:17:32-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=53987#p53987</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=53987#p53987"/>
		<title type="html"><![CDATA[Problems with &quot;global&quot;.. on compile-time (with my]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=53987#p53987"><![CDATA[
What happens when you comment the part of global in this line (line 64 in htlive.c:<br><div class="codebox"><p>Code: </p><pre><code>static Function *global = NULL, *channels_funcs = NULL,*server_funcs = NULL;</code></pre></div>change to<div class="codebox"><p>Code: </p><pre><code>static Function *channels_funcs = NULL,*server_funcs = NULL;</code></pre></div>I think demond is right as you have no real error in your code. It would not be advisable to change the name of eggdrop's <em class="text-italics">global </em>variable, but then again it is not advisable to change the curl's <em class="text-italics">global </em>variable either :S<br>Be sure to replace the name in all the files of either program if you do.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2999">Galadhrim</a> — Wed Aug 10, 2005 5:17 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2005-08-09T21:01:56-04:00</updated>

		<published>2005-08-09T21:01:56-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=53974#p53974</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=53974#p53974"/>
		<title type="html"><![CDATA[Problems with &quot;global&quot;.. on compile-time (with my]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=53974#p53974"><![CDATA[
of course, eggdrop exports the <em class="text-italics">global</em> array of function/variable pointers which are available for module use; try to fix curl not to interfere with that (or fix eggdrop to use another name, however that would be more dificult)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Tue Aug 09, 2005 9:01 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[makam]]></name></author>
		<updated>2005-08-09T15:58:07-04:00</updated>

		<published>2005-08-09T15:58:07-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=53970#p53970</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=53970#p53970"/>
		<title type="html"><![CDATA[:(]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=53970#p53970"><![CDATA[
Doesnt work!  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_cry.gif" width="15" height="15" alt=":cry:" title="Crying or Very sad"> <br><br>The same error.<br>Perhaps, the error is not the "#undef global", because i removed it and<br>enclose it, like u said.<br><br>hmhm....  Function *global?  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_confused.gif" width="15" height="15" alt=":?" title="Confused">  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_confused.gif" width="15" height="15" alt=":?" title="Confused"> <br><br>Make log -&gt; <a href="http://hteggviewer.makam.org/errors/make.log" class="postlink">http://hteggviewer.makam.org/errors/make.log</a><br><br>The files:<br><a href="http://hteggviewer.makam.org/errors/curl.c" class="postlink">http://hteggviewer.makam.org/errors/curl.c</a><br><a href="http://hteggviewer.makam.org/errors/htlive.c" class="postlink">http://hteggviewer.makam.org/errors/htlive.c</a><br><br>Rest of the files:<br><a href="http://hteggviewer.makam.org/errors/" class="postlink">http://hteggviewer.makam.org/errors/</a><br><br><br><br><strong class="text-strong">More ideas?</strong><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5167">makam</a> — Tue Aug 09, 2005 3:58 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2005-08-09T14:18:09-04:00</updated>

		<published>2005-08-09T14:18:09-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=53961#p53961</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=53961#p53961"/>
		<title type="html"><![CDATA[Problems with &quot;global&quot;.. on compile-time (with my]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=53961#p53961"><![CDATA[
remove that #undef or enclose it in #ifdef,#endif<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Tue Aug 09, 2005 2:18 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[makam]]></name></author>
		<updated>2005-08-11T08:09:48-04:00</updated>

		<published>2005-08-09T13:04:37-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=53958#p53958</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=53958#p53958"/>
		<title type="html"><![CDATA[Problems with &quot;global&quot;.. on compile-time (with my]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=53958#p53958"><![CDATA[
Hi, i'm written my C module + xml + curl librarys<br><br>And my problems show up (it looks like) when i include the curl.h<br>in my module.  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_evil.gif" width="15" height="15" alt=":evil:" title="Evil or Very Mad"> <br><br>My main file is: <strong class="text-strong">htlive.c</strong><br><br>and some part of the code is:<br><div class="codebox"><p>Code: </p><pre><code>....#include &lt;string.h&gt;#undef global#include "src/mod/module.h"#include "src/users.h"#include "src/chan.h"#include "channels.mod/channels.h"#include "htlive.h"static Function *global = NULL, *channels_funcs = NULL,*server_funcs = NULL;static char htlive_login[32];// (Read htlive.conf)static char htlive_passwd[32];// (Read htlive.conf)#include "curl.c"....</code></pre></div>In <strong class="text-strong">curl.c</strong> is where i include curl's headers...<div class="codebox"><p>Code: </p><pre><code>#include &lt;curl/curl.h&gt;#include &lt;curl/easy.h&gt;</code></pre></div><br>Well, the problems is when i type "make"<br><div class="codebox"><p>Code: </p><pre><code>gcc -pipe -fPIC -g -O2 -Wall -I. -I../../.. -I../../.. -I../../../src/mod -DHAVE_CONFIG_H  `xml2-config --cflags`  `curl-config --cflags`  -DMAKING_MODS \-c .././htlive.mod/htlive.c -Ixml En el fichero incluído de ../htlive.mod/curl.c:5,                 de ../htlive.mod/htlive.c:71:/usr/include/curl/curl.h:772: error de decodificación antes de "global"</code></pre></div>(Yes, its in spanish..)<br>The translation is something like this:<br>error de decodificación antes de "global"  --&gt; parsing error before "global"<br><br>I was thinking a lot, but any solution found.<br>Perhaps, the problems is that i dont know really why this <br>"#undef global" is there...  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_redface.gif" width="15" height="15" alt=":oops:" title="Embarassed"> <br><br><br><br>...any idea?<br><br>Thanks.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5167">makam</a> — Tue Aug 09, 2005 1:04 pm</p><hr />
]]></content>
	</entry>
	</feed>
