<div dir="ltr"><div>Since there were no objections, I committed the patch in r58435. Patch tested on Mac OS X Mavericks (clang)‎ and Ubuntu (gcc, clang).</div><div><br></div><div>[r58435] <a href="https://trac.osgeo.org/grass/changeset/58435">https://trac.osgeo.org/grass/changeset/58435</a></div>

<div><br></div><div>On Mac:</div><div><span style="font-family:arial,sans-serif;font-size:13px">$ gcc --version</span><br style="font-family:arial,sans-serif;font-size:13px"><span style="font-family:arial,sans-serif;font-size:13px">Configured with: --prefix=/Appli</span><span style="font-family:arial,sans-serif;font-size:13px">cations/Xcode.a</span><span style="font-family:arial,sans-serif;font-size:13px">pp/Contents/Dev</span><span style="font-family:arial,sans-serif;font-size:13px">eloper/usr --with-gxx-incl</span><span style="font-family:arial,sans-serif;font-size:13px">ude-dir=/usr/in</span><span style="font-family:arial,sans-serif;font-size:13px">clude/c++/4.2.1</span><br style="font-family:arial,sans-serif;font-size:13px">

<span style="font-family:arial,sans-serif;font-size:13px">Apple LLVM version 5.0 (clang-500.2.79</span><span style="font-family:arial,sans-serif;font-size:13px">) (based on LLVM 3.3svn)</span><br style="font-family:arial,sans-serif;font-size:13px">

<span style="font-family:arial,sans-serif;font-size:13px">Target: x86_64-apple-da</span><span style="font-family:arial,sans-serif;font-size:13px">rwin13.0.0</span><br style="font-family:arial,sans-serif;font-size:13px"><span style="font-family:arial,sans-serif;font-size:13px">Thread model: posix</span></div>

<div>(note that gcc on new mac is clang not gcc)</div><div><br></div><div>On Ubuntu:</div><div><div>$ clang --version</div><div>Ubuntu clang version 3.0-6ubuntu3 (tags/RELEASE_30/final) (based on LLVM 3.0)</div><div>Target: i386-pc-linux-gnu</div>

<div>Thread model: posix</div></div><div><br></div><div><div>$ gcc --version</div><div>gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3</div><div>Copyright (C) 2011 Free Software Foundation, Inc.</div></div><div><br></div></div>
<div class="gmail_extra">
<br><br><div class="gmail_quote">On Thu, Dec 5, 2013 at 10:57 PM, Vaclav Petras <span dir="ltr"><<a href="mailto:wenzeslaus@gmail.com" target="_blank">wenzeslaus@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div dir="ltr">Hi all,<div><br></div><div>there are some preprocessor ifndefs which I don't completely understand but, from what I understand, they should be removed.</div><div><br></div><div>There are two contexts where it is used:</div>


<div><br></div><div><div>#ifndef _STDIO_H</div><div>#include <stdio.h></div><div>#endif</div></div><div><br></div><div>which is useless since this check should be done in stdio.h.</div><div><br></div><div>The other usage is:</div>


<div><br></div><div><div>#ifdef _STDIO_H</div><div>int do_label(FILE *, int);</div><div>#endif</div></div><div><br></div><div>which in case of not defined _STDIO_H will not declare that function and so it will break the code later in the compilation where this function is used (depending code is not marked by #ifdef).</div>


<div><br></div><div>It actually breaks with standard C library which does not define _STDIO_H but something else, e.g. the one which goes with the latest Mac OS X XCode (at least to my current understanding). I guess there is not reason to to "ifdef stdio.h" any parts of code now, so we can just remove all these.</div>


<div><br></div><div>Patch attached, once it is approved I will commit it. Compiled so far only on Ubuntu.</div><div><br></div><div>Objections? Explanations?</div><span class="HOEnZb"><font color="#888888"><div><br></div>

<div>Vaclav</div><div><br></div></font></span></div>
</blockquote></div><br></div>