<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 14-02-20 10:33 AM, Arnaud Fontaine
wrote:<br>
</div>
<blockquote cite="mid:5306204D.3030807@gmail.com" type="cite">
<pre wrap="">while compiling mesa on Linux/ARM (and for Linux/ARM), I had a problem
with the servermd.h file coming from xorg-server.
I found incorrect conditional tests on "linux" variable while it should
be on "__linux__" variable. This mistake occurs at several places in the
servermd.h file. The attached patch is actually fixing this issue.
</pre>
</blockquote>
Grepping the server shows both "__linux__" and "linux" are used,
twice as many of the former.<br>
<br>
On my Ubuntu system:<br>
<blockquote>gcc -dM -E - < /dev/null | grep linux<br>
<br>
#define __linux 1<br>
#define __linux__ 1<br>
#define __gnu_linux__ 1<br>
#define linux 1<br>
</blockquote>
On a site which I referred to for OS identifying macros:<br>
<blockquote>Linux kernel<br>
<br>
Systems based on the Linux kernel define these macros. There are
two major Linux-based operating systems: <br>
GNU/Linux and Android, and numerous others like Ångström or
OpenEmbedded<br>
<br>
<tt>Type Macro Description</tt><tt><br>
</tt><tt>Identification __linux__ 1</tt><tt><br>
</tt><tt>Identification linux Obsolete (not POSIX
compliant)</tt><tt><br>
</tt><tt>Identification __linux Obsolete (not POSIX
compliant)</tt><tt><br>
</tt></blockquote>
<br>
Here is a bug report because __linux__ is not defined:<br>
<blockquote><a class="moz-txt-link-freetext" href="https://bugs.launchpad.net/linaro-android/+bug/868550">https://bugs.launchpad.net/linaro-android/+bug/868550</a><br>
</blockquote>
A bug report because "linux" is being checked rather than
"__linux__"<br>
<blockquote><a class="moz-txt-link-freetext" href="http://bugs.python.org/issue6558">http://bugs.python.org/issue6558</a><br>
</blockquote>
Someone must have the authoritative answer by now, as I have seen
this question being asked in 1998. Still cannot easily find an
answer.<br>
<br>
Given that both are used on the server, there would be no arm is
using __linux__. It already works every where. Could you amend the
commit text to name the compiler you use, and if gcc, provide the
list of defines for linux.<br>
<br>
<br>
</body>
</html>