<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>boost::thread &amp; allegro</title>
		<link>http://www.allegro.cc/forums/view/600138</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Wed, 06 May 2009 09:15:54 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>hello, </p><p>I&#39;m trying to make a game with allegro, and I need threads. I&#39;ve found the boost library but it seems that there is a problem between allegro and boost ...</p><p>when I build my project I&#39;ve got this kind of errors :</p><p>1&gt;c:\program files\boost\boost_1_38\boost\cstdint.hpp(193) : warning C4114: même qualificateur de type utilisé plusieurs fois<br />1&gt;c:\program files\boost\boost_1_38\boost\cstdint.hpp(193) : error C2632: &#39;char&#39; ne peut pas être suivi de &#39;char&#39;<br />1&gt;c:\program files\boost\boost_1_38\boost\cstdint.hpp(193) : warning C4091: &#39;typedef &#39; : ignoré à gauche de &#39;signed char&#39; quand aucune variable n&#39;est déclarée<br />1&gt;c:\program files\boost\boost_1_38\boost\cstdint.hpp(196) : warning C4114: même qualificateur de type utilisé plusieurs fois</p><p>that only do it  when the include of allegro is before the boost one ...But I don&#39;t know how to control exactly the order of inclusion in my project (I&#39;ve got a lot of class using both allegro and boost ...)</p><p>Has someone a solution to solve this or does anyone know an other library for thread ?</p><p>(and excuse me for my english ...^^&#39;)
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Neaira)</author>
		<pubDate>Mon, 04 May 2009 18:11:10 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>An alternative to boost is POSIX threads, which POSIX compliant operating systems should support natively. It is definitely present in Linux, and I assume it would be also on Mac (though I am not sure). There is a port for Windows <a href="http://sourceware.org/pthreads-win32/">here</a>.
</p><div class="quote_container"><div class="title"><a href="http://translate.google.com/translate_t?text=1%3Ec:\program%20files\boost\boost_1_38\boost\cstdint.hpp(193)%20:%20warning%20C4114:%20m%EAme%20qualificateur%20de%20type%20utilis%E9%20plusieurs%20fois1%3Ec:\program%20files\boost\boost_1_38\boost\cstdint.hpp(193)%20:%20error%20C2632:%20%27char%27%20ne%20peut%20pas%20%EAtre%20suivi%20de%20%27char%271%3Ec:\program%20files\boost\boost_1_38\boost\cstdint.hpp(193)%20:%20warning%20C4091:%20%27typedef%20%27%20:%20ignor%E9%20%E0%20gauche%20de%20%27signed%20char%27%20quand%20aucune%20variable%20n%27est%20d%E9clar%E9e1%3Ec:\program%20files\boost\boost_1_38\boost\cstdint.hpp(196)%20:%20warning%20C4114:%20m%EAme%20qualificateur%20de%20type%20utilis%E9%20plusieurs%20fois#fr|en|1%3Ec%3A%5Cprogram%20files%5Cboost%5Cboost_1_38%5Cboost%5Ccstdint.hpp(193)%20%3A%20warning%20C4114%3A%20m%C3%AAme%20qualificateur%20de%20type%20utilis%C3%A9%20plusieurs%20fois%0A1%3Ec%3A%5Cprogram%20files%5Cboost%5Cboost_1_38%5Cboost%5Ccstdint.hpp(193)%20%3A%20error%20C2632%3A%20%27char%27%20ne%20peut%20pas%20%C3%AAtre%20suivi%20de%20%27char%27%0A1%3Ec%3A%5Cprogram%20files%5Cboost%5Cboost_1_38%5Cboost%5Ccstdint.hpp(193)%20%3A%20warning%20C4091%3A%20%27typedef%20%27%20%3A%20ignor%C3%A9%20%C3%A0%20gauche%20de%20%27signed%20char%27%20quand%20aucune%20variable%20n%27est%20d%C3%A9clar%C3%A9e%0A1%3Ec%3A%5Cprogram%20files%5Cboost%5Cboost_1_38%5Cboost%5Ccstdint.hpp(196)%20%3A%20warning%20C4114%3A%20m%C3%AAme%20qualificateur%20de%20type%20utilis%C3%A9%20plusieurs%20fois">Google Translate</a> said:</div><div class="quote"><p>1&gt; c: \ program files \ boost \ boost_1_38 \ boost \ cstdint.hpp (193): warning C4114: same type qualifier used more than once<br />1&gt; c: \ program files \ boost \ boost_1_38 \ boost \ cstdint.hpp (193): error C2632: &#39;char&#39; can not be followed by &#39;char&#39;<br />1&gt; c: \ program files \ boost \ boost_1_38 \ boost \ cstdint.hpp (193): warning C4091: &#39;typedef&#39;: ignored on left of &#39;signed char&#39; when no variable is declared<br />1&gt; c: \ program files \ boost \ boost_1_38 \ boost \ cstdint.hpp (196): warning C4114: same type qualifier used more than once</p></div></div><p>
I&#39;ve never used Boost&#39;s threads, but I have used Boost&#39;s smart pointers and some string algorithms... <img src="http://www.allegro.cc/forums/smileys/undecided.gif" alt=":-/" /> Never had problems, but I&#39;m not sure if cstdint.hpp would have been necessary for those things. I&#39;m downloading the 1.38.0 source to take a look at those lines to guess what might conflict from Allegro, if anything... <img src="http://www.allegro.cc/forums/smileys/lipsrsealed.gif" alt=":-X" /></p><p><i>** EDIT **</i></p><p>There is no line <tt>193</tt> or <tt>196</tt> in <tt>cstdlib.hpp</tt>... <img src="http://www.allegro.cc/forums/smileys/lipsrsealed.gif" alt=":-X" /> And Boost organizes their code into a <tt>boost</tt> namespace, so it shouldn&#39;t conflict with a C library. Maybe you&#39;re doing something wrong including it? Maybe if you show us some code or how you organize your project we can figure it out? <img src="http://www.allegro.cc/forums/smileys/undecided.gif" alt=":-/" /> I don&#39;t know... Hopefully somebody more experienced will come along. <img src="http://www.allegro.cc/forums/smileys/wink.gif" alt=";)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (bamccaig)</author>
		<pubDate>Mon, 04 May 2009 18:35:32 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>cstdint.hpp, not cstdlib.</p><p>This is pretty much a lesson in why you always, always, always should use typedefs for types instead of #defines.</p><p>In Allegro&#39;s astdint you have:</p><div class="source-code snippet"><div class="inner"><pre><span class="p">#define int8_t       signed char</span>
<span class="p">#define uint8_t      unsigned char</span>
</pre></div></div><p>

So then boost&#39;s cstdint implementation attempts to do:</p><div class="source-code snippet"><div class="inner"><pre><span class="k1">typedef</span> <span class="k1">signed</span> <span class="k1">char</span>     int8_t<span class="k2">;</span> <span class="c">// line 193</span>
<span class="k1">typedef</span> <span class="k1">unsigned</span> <span class="k1">char</span>   uint8_t<span class="k2">;</span> <span class="c">// line 196</span>
</pre></div></div><p>

But unforunately the compiler sees
</p><div class="source-code snippet"><div class="inner"><pre><span class="k1">typedef</span> <span class="k1">signed</span> <span class="k1">char</span> <span class="k1">signed</span> <span class="k1">char</span><span class="k2">;</span>
<span class="k1">typedef</span> <span class="k1">unsigned</span> <span class="k1">char</span> <span class="k1">unsigned</span> <span class="k1">char</span><span class="k2">;</span>
</pre></div></div><p>

Oopsie.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Speedo)</author>
		<pubDate>Mon, 04 May 2009 19:24:14 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>there si a sample of my code : </p><p>this is my class Construction, I use this class for inheritance (I&#39;m not sure this is the right word but ...) within it I need 2 mutex so:</p><p>#ifndef CONSTRUCTION_H<br />#define CONSTRUCTION_H</p><p>//the probleme include<br />#include &lt;boost/thread/mutex.hpp&gt;</p><p>#include &quot;Listing.h&quot;<br />#include &quot;AVector.h&quot;</p><p>class Construction<br />{</p><p>	//datas and functions, no need to detail here ...</p><p>};</p><p>#endif</p><p>in another file (.cpp) I&#39;ve got :<br />  #include &lt;allegro.h&gt; //this is for drawing BITMAP and other function<br />  #include &quot;Construction.h&quot;<br />and here : problem ...</p><p>I have supposed that it was a compability problem because when I try in a new file with :<br />    #include &lt;allegro.h&gt;<br />    #include &lt;boost/thread/mutex.hpp&gt;<br />it bug ...but in the other order :<br />    #include &lt;boost/thread/mutex.hpp&gt;<br />    #include &lt;allegro.h&gt;<br />it works fine (the problem then is the inclusion of my file with boot in the other...)</p><p>EDIT : <br />ok for the explanation thank you ... have you got a solution to avoid this?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Neaira)</author>
		<pubDate>Mon, 04 May 2009 19:27:50 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/600138/809598#target">Speedo</a> said:</div><div class="quote"><p>cstdint.hpp, not cstdlib.</p></div></div><p>
Ah, my bad. <img src="http://www.allegro.cc/forums/smileys/embarassed.gif" alt=":-[" />
</p><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/600138/809599#target">Neaira</a> said:</div><div class="quote"><p>have you got a solution to avoid this?</p></div></div><p>
I think you should be able to work around it by <span class="source-code"><span class="p">#undef</span></span>&#39;ing the troublesome macros between includes (AFAIK, those macros are internal and not needed by external code)... <img src="http://www.allegro.cc/forums/smileys/lipsrsealed.gif" alt=":-X" />
</p><div class="source-code snippet"><div class="inner"><pre><span class="p">#include &lt;allegro.h&gt;</span>

<span class="p">#undef int8_t</span>
<span class="p">#undef uint8_t</span>
...

<span class="p">#include "Construction.h"</span>
</pre></div></div><p>
You&#39;ll have to see if it works or wait for somebody to correct me. <img src="http://www.allegro.cc/forums/smileys/tongue.gif" alt=":P" /> Perhaps somebody should patch Allegro to use <span class="source-code"><span class="k1">typedef</span></span>s instead of macros. Or to at least use more unique names (<s>perhaps Allegro 5 is already doing this?</s> No, no, it&#39;s still there...).
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (bamccaig)</author>
		<pubDate>Mon, 04 May 2009 19:39:53 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I&#39;d probably just make a little wrapper for the allegro header:</p><div class="source-code snippet"><div class="inner"><pre><span class="p">#ifndef ALLEGROWRAPPER_H_INCLUDED</span>
<span class="p">#define ALLEGROWRAPPER_H_INCLUDED</span>

<span class="p">#include &lt;allegro.h&gt;</span>

<span class="p">#undef int8_t</span>
<span class="p">#undef uint8_t</span>
<span class="p">#undef int16_t</span>
<span class="p">#undef uint16_t</span>
<span class="p">#undef int32_t</span>
<span class="p">#undef uint32_t</span>
<span class="p">#undef intptr_t</span>
<span class="p">#undef uintptr_t</span>

<span class="p">#endif</span>
</pre></div></div><p>

Then #include AllegroWrapper.h in your files.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Speedo)</author>
		<pubDate>Mon, 04 May 2009 20:20:42 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p><img src="http://www.allegro.cc/forums/smileys/cheesy.gif" alt=":D" /><img src="http://www.allegro.cc/forums/smileys/cheesy.gif" alt=":D" /><img src="http://www.allegro.cc/forums/smileys/cheesy.gif" alt=":D" /> it works !!! thank you very much !!!^^</p><p>I hav had to add this lines too :<br />#undef  intmax_t<br />#undef    uintmax_t<br />#undef int64_t<br />#undef int_least64_t<br />#undef  int_fast64_t<br />#undef uint64_t<br />#undef uint_least64_t<br />#undef uint_fast64_t</p><p>but now it works fine and allegro is always ok ^^<br />thanks both of you ^^
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Neaira)</author>
		<pubDate>Mon, 04 May 2009 20:52:28 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/600138/809607#target">Speedo</a> said:</div><div class="quote"><p>I&#39;d probably just make a little wrapper for the allegro header:</p></div></div><p>

That&#39;s exactly why the #defines are used..
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Peter Wang)</author>
		<pubDate>Tue, 05 May 2009 06:50:45 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/600138/809693#target">Peter Wang</a> said:</div><div class="quote"><p>That&#39;s exactly why the #defines are used..</p></div></div><p>

Er...  Use an incorrect method so that people will be able to fix the problems caused by use of said incorrect method?  Does not compute.</p><p>Just do it right to begin with - a few lines of code in astdint.h and a few minutes with a halfway decent refactoring tool would fix the whole problem.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Speedo)</author>
		<pubDate>Tue, 05 May 2009 07:44:24 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Ok, how do we do it right? Library A and library B both want to &quot;typedef unsigned int uint32_t;&quot;. How can a user include both their headers without a conflict?  I&#39;m open to suggestions.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Peter Wang)</author>
		<pubDate>Tue, 05 May 2009 08:13:46 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Instead of overwriting the standard types, you create your own types which wrap around them - you don&#39;t clash with the standard names so it doesn&#39;t matter if the user has a 3rd party implentation of those standard types.</p><p>Change astdint.h to be along the lines of:</p><div class="source-code"><div class="toolbar"><span class="button numbers"><b>#</b></span><span class="button select">Select</span><span class="button expand">Expand</span></div><div class="inner"><span class="number">  1</span><span class="p">#if defined ALLEGRO_HAVE_INTTYPES_H || defined ALLEGRO_HAVE_STDINT_H</span>
<span class="number">  2</span>   <span class="p">#if defined ALLEGRO_HAVE_INTTYPES_H</span>
<span class="number">  3</span>      <span class="p">#include &lt;inttypes.h&gt;</span>
<span class="number">  4</span>   <span class="p">#elif defined ALLEGRO_HAVE_STDINT_H</span>
<span class="number">  5</span>      <span class="p">#include &lt;stdint.h&gt;</span>
<span class="number">  6</span>   <span class="p">#endif</span>
<span class="number">  7</span>   
<span class="number">  8</span>   <span class="k1">typedef</span> int8_t           al_int8<span class="k2">;</span>    
<span class="number">  9</span>   <span class="k1">typedef</span> uint8_t          al_uint8<span class="k2">;</span>    
<span class="number"> 10</span>   <span class="k1">typedef</span> int16_t          al_int16<span class="k2">;</span>   
<span class="number"> 11</span>   <span class="k1">typedef</span> uint16_t         al_uint16<span class="k2">;</span>    
<span class="number"> 12</span>   <span class="k1">typedef</span> int32_t          al_int32<span class="k2">;</span>   
<span class="number"> 13</span>   <span class="k1">typedef</span> uint32_t         al_uint32<span class="k2">;</span>   
<span class="number"> 14</span>   <span class="k1">typedef</span> intptr_t         al_intptr<span class="k2">;</span>  
<span class="number"> 15</span>   <span class="k1">typedef</span> uintptr_t        al_uintptr<span class="k2">;</span>
<span class="number"> 16</span>
<span class="number"> 17</span><span class="p">#elif defined ALLEGRO_I386 &amp;&amp; defined ALLEGRO_LITTLE_ENDIAN</span>
<span class="number"> 18</span>   <span class="p">#ifndef ALLEGRO_GUESS_INTTYPES_OK</span>
<span class="number"> 19</span>      <span class="p">#warning Guessing the definitions of fixed-width integer types.</span>
<span class="number"> 20</span>   <span class="p">#endif</span>
<span class="number"> 21</span>   
<span class="number"> 22</span>   <span class="k1">typedef</span> <span class="k1">signed</span> <span class="k1">char</span>      al_int8<span class="k2">;</span>    
<span class="number"> 23</span>   <span class="k1">typedef</span> <span class="k1">unsigned</span> <span class="k1">char</span>    al_uint8<span class="k2">;</span>     
<span class="number"> 24</span>   <span class="k1">typedef</span> <span class="k1">signed</span> <span class="k1">short</span>     al_int16<span class="k2">;</span>    
<span class="number"> 25</span>   <span class="k1">typedef</span> <span class="k1">unsigned</span> <span class="k1">short</span>   al_uint16<span class="k2">;</span>    
<span class="number"> 26</span>   <span class="k1">typedef</span> <span class="k1">signed</span> <span class="k1">int</span>       al_int32<span class="k2">;</span>   
<span class="number"> 27</span>   <span class="k1">typedef</span> <span class="k1">unsigned</span> <span class="k1">int</span>     al_uint32<span class="k2">;</span>    
<span class="number"> 28</span>   <span class="k1">typedef</span> al_int32         al_intptr<span class="k2">;</span>   
<span class="number"> 29</span>   <span class="k1">typedef</span> al_uint32        al_uintptr<span class="k2">;</span>   
<span class="number"> 30</span>   
<span class="number"> 31</span><span class="p">#else</span>
<span class="number"> 32</span>   <span class="p">#error I dunno how to get the definitions of fixed-width integer types on your platform.  Please report this to your friendly Allegro developer.</span>
<span class="number"> 33</span><span class="p">#endif</span>
</div></div><p>

And refactor existing code to use the new types.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Speedo)</author>
		<pubDate>Tue, 05 May 2009 08:35:48 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Well that&#39;s the path of least resistance that everybody takes, and it&#39;s a bloody pain. Now I could understand it before C99 but that standard is ten years old now (or close to it). The problem is MSVC.  Screw &#39;em.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Peter Wang)</author>
		<pubDate>Tue, 05 May 2009 08:42:08 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/600138/809708#target">Peter Wang</a> said:</div><div class="quote"><p>Well that&#39;s the path of least resistance that everybody takes, and it&#39;s a bloody pain.</p></div></div><p>

Hell, I just did the work for you and it took me all of one minute.  Gonna have to go rest now after that strenuous exertion.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>The problem is MSVC. Screw &#39;em.</p></div></div><p>

You know, if you really wanted to be a lazy sod you could just undef all the macros at the end of allegro.h.  But I guess then you couldn&#39;t take your awesome stand against teh evil Microsoft. <img src="http://www.allegro.cc/forums/smileys/rolleyes.gif" alt="::)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Speedo)</author>
		<pubDate>Tue, 05 May 2009 08:55:00 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Of course it&#39;s easy to rename stuff inside the Allegro tree. I could do it in a couple of minutes.  It&#39;s every damn library defining it&#39;s own types, and then the user needing to decide which ones to use where and whether they actually are all equivalent.  Isn&#39;t that what the standard is for?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Peter Wang)</author>
		<pubDate>Tue, 05 May 2009 09:07:00 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I&#39;d probably keep the current behavior and add something like:</p><div class="source-code snippet"><div class="inner"><pre><span class="p">#define ALLEGRO_NO_STD_TYPES</span>
<span class="p">#include &lt;allegro.h&gt;</span>
</pre></div></div><p>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Matthew Leverton)</author>
		<pubDate>Tue, 05 May 2009 17:34:36 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I think in C++ the <span class="source-code"><span class="k1">typedef</span></span>s make sense, where redefining the same type is allegedly supposed to be standard. However, in C, that&#39;s non-standard and can&#39;t be relied upon so the macros are the only way to get it done in a somewhat standard way. I don&#39;t think there&#39;s any harm in <span class="source-code"><span class="k1">typedef</span></span>&#39;ing your own internal types though either. It would certainly be nice to have standard types to use in the games written in Allegro, but those should technically be coming from the platform, not a game&#39;s library. So for those platforms that don&#39;t have them (I got the impression it&#39;s just MSVC), you&#39;re stuck redefining them again. I find it a little awkward to have Allegro define things that I wouldn&#39;t expect it to and standard types fall into that category.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (bamccaig)</author>
		<pubDate>Tue, 05 May 2009 18:37:25 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/600138/809710#target">Peter Wang</a> said:</div><div class="quote"><p>Of course it&#39;s easy to rename stuff inside the Allegro tree. I could do it in a couple of minutes. It&#39;s every damn library defining it&#39;s own types, and then the user needing to decide which ones to use where and whether they actually are all equivalent. Isn&#39;t that what the standard is for?</p></div></div><p>

That&#39;s just a laughable argument.  No one is relying on Allegro to define integer types for them (nor should they be).  The entire problem here is that you&#39;re taking things that are for internal use and exposing them to the user, resulting in behavior that the user does not expect (redefinition of standard types).
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Speedo)</author>
		<pubDate>Tue, 05 May 2009 19:25:20 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/600138/809601#target">bamccaig</a> said:</div><div class="quote"><p>those macros are internal and not needed by external code</p></div></div><p>
So the user is not supposed to rely on them.<br />In my opinion, if &lt;allegro.h&gt; adds macros to compensate for something that is &quot;missing&quot; in some combination of conditions (nested #if), then at the of &lt;allegro.h&gt;, in the same conditions, it should remove it.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Audric)</author>
		<pubDate>Tue, 05 May 2009 19:56:27 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>The problem is that Allegro can&#39;t undefine them at the bottom of it&#39;s header file(s) because I&#39;m sure the Allegro header files are also needed by Allegro&#39;s source files, which probably expect those macros to still exist. The only way for Allegro to remove them is to create a user-space header file that wraps around the original, as <a href="http://www.allegro.cc/forums/thread/600138/809607#target">Speedo suggested earlier</a>. That, or just define Allegro specific types that are unlikely to collide so this problem isn&#39;t likely to come up. <img src="http://www.allegro.cc/forums/smileys/tongue.gif" alt=":P" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (bamccaig)</author>
		<pubDate>Tue, 05 May 2009 20:02:03 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Argh, then yes it&#39;s not a minor change.</p><p>Out of curiosity, anybody knows if Boost&#39;s typedefs for the uint* types also &quot;leak out&quot; ? Or are they &quot;kept in containment&quot; by the namespace ?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Audric)</author>
		<pubDate>Tue, 05 May 2009 20:17:46 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>They reside in the boost namespace.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Speedo)</author>
		<pubDate>Tue, 05 May 2009 23:09:34 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/600138/809776#target">Speedo</a> said:</div><div class="quote"><p>That&#39;s just a laughable argument.</p></div></div><p>

How is it laughable? Here we have a common problem, solved by a ten year old standard, and the solution is to ignore it because <u>one</u> compiler doesn&#39;t implement it?  If it was some other compiler you wouldn&#39;t be making the same comment.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
The entire problem here is that you&#39;re taking things that are for internal use and exposing them to the user
</p></div></div><p>

For Allegro 5 that&#39;s delibrate as the types are part of the API (as in, we <u>document</u> functions to accept and return values of those types).<br />I forgot whether they are considered part of the Allegro 4 API.</p><p>However, in Allegro 5, we are not using the types are much as we might have so in this case we could probably use purpose-specific types for each case that needs fixed width types.</p><p>The same problem occurs for bool, possibly to a lesser extent because C++ has bool.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Peter Wang)</author>
		<pubDate>Wed, 06 May 2009 04:40:28 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I like Matthew Leverton&#39;s solution, just wrap the necessary emulation headers with that macro and let people who use sub-standard compilers define the macro. Naturally, it should be documented. Or perhaps just let people know the name of the header guard macro for those files (I assume defining it would have the same effect).
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (SiegeLord)</author>
		<pubDate>Wed, 06 May 2009 05:01:27 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Yes, me too. I just remembered that an important use of fixed width types is with al_lock_bitmap/region.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Peter Wang)</author>
		<pubDate>Wed, 06 May 2009 05:38:24 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/600138/809899#target">Peter Wang</a> said:</div><div class="quote"><p>Here we have a common problem, solved by a ten year old standard, and the solution is to ignore it because one compiler doesn&#39;t implement it? If it was some other compiler you wouldn&#39;t be making the same comment.</p></div></div><p>

That quite frankly is a load of bull.  Most libs <s>but Allegro in particular</s> expend a lot of effort to maintain support for antiquated compilers and platforms that pretty much no one in their right mind is going to use today.  But when we start talking about 30 second fix for one of your most popular platforms, the response is &quot;screw em&quot;?  Yeah, no ulterior motives involved there.  <img src="http://www.allegro.cc/forums/smileys/rolleyes.gif" alt="::)" /></p><p>Besides, your argument is moot.  A quick glance at the Allegro platform headers shows that at least 4 of the supported compilers do not have support for C99 int types.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Speedo)</author>
		<pubDate>Wed, 06 May 2009 09:07:47 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Look, the devs for allegro can do as they damn well please. Especially with Allegro 5. Its a new lib, and has no need to support broken C compilers. It works most of the time. If it breaks in some minority of strange cases, thats none of Allegro 5&#39;s business.</p><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/600138/809946#target">Speedo</a> said:</div><div class="quote"><p>A quick glance at the Allegro platform headers shows that at least 4 of the supported compilers do not have support for C99 int types.</p></div></div><p>The actual list of fully SUPPORTED compilers is GCC, GCC, and um, GCC. The rest have quirks that we can&#39;t properly support. Allegro can try and work around them, but thats about it.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Fjellstrom)</author>
		<pubDate>Wed, 06 May 2009 09:15:54 +0000</pubDate>
	</item>
</rss>
