<div dir="ltr"><div><div><div><div><div>From gcc man page<br><br><dl><dt><code>-w</code></dt><dd><a name="index-w-245"></a>Inhibit all warning messages.
<br></dd><dt><code>-Werror</code></dt><dd><a name="index-Werror-246"></a><a name="index-Wno-error-247"></a>Make all warnings into errors.
</dd></dl><p>From AIX compiler reference</p><p>-w<br>Category<br>Listings, messages, and compiler information<br>Chapter 4. Compiler options reference 299<br>Pragma equivalent<br>None.<br>Purpose<br>Suppresses informational, language-level and warning messages.<br>This option is equivalent to specifying -qflag=e : e.</p><p>Option I believe wanted is -qhalt</p><p>==============</p><p>-qhalt<br>Category<br>Error checking and debugging<br>Pragma equivalent<br>#pragma options halt<br>Purpose<br>Stops compilation before producing any object, executable, or assembler source<br>files if the maximum severity of compile-time messages equals or exceeds the<br>severity you specify.<br>Syntax<br>-qhalt syntax — C<br><br>s<br>-qhalt = i<br>w<br>e<br><br>Defaults<br>-qhalt=s</p><p>Parameters<br>i Specifies that compilation is to stop for all types of errors: warning, error and<br>informational. Informational diagnostics (I) are of the lowest severity.<br>w Specifies that compilation is to stop for warnings (W) and all types of errors.<br>e Specifies that compilation is to stop for errors (E), severe errors (S), and<br>unrecoverable errors (U).<br>s Specifies that compilation is to stop for severe errors (S) and unrecoverable<br>errors (U).<br></p><p>So, to make a warning a message that halts asif an error is needed</p><p><br></p><p>-qhalt=w<br></p>This patch:<br>diff -ur a/<a href="http://configure.ac">configure.ac</a> b/<a href="http://configure.ac">configure.ac</a><br>--- a/<a href="http://configure.ac">configure.ac</a> 2015-01-13 03:40:40 +0000<br>+++ b/<a href="http://configure.ac">configure.ac</a> 2015-02-15 15:49:33 +0000<br>@@ -159,7 +159,11 @@<br> if test "$os_win32" = "no"; then<br> AC_MSG_CHECKING([for scandir])<br> fc_saved_CFLAGS="$CFLAGS"<br>+if test "x$GCC" = "xyes"; then<br> CFLAGS="$CFLAGS $WARN_CFLAGS -Werror"<br>+else<br>+ CFLAGS="$CFLAGS $WARN_CFLAGS"<br>+fi<br> AC_TRY_COMPILE([<br> #include <dirent.h><br> int main(void);<br><br></div>resolves the configure issue here<br><br></div>I do not wish to attempt a real fix here - as I disagree with the logic of adding -Werror - in static text.<br></div>If a reaction like this is needed it should be a different variable - like WARN_CFLAGS - that gets set per compiler.<br><br></div>Another general problem I see is that --prefix is not being applied by configure (because libraries in /opt/lib, include files in /opt/include - are not being found. Just the standard hard-coded (it seems) check of /usr and /usr/local. Quite common that /usr/local is being checked, while --prefix value is not.<br><br></div>ANYWAY - for the key question - is scandir needed - the problem is <a href="http://configure.ac">configure.ac</a>, not scandir() availability.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Feb 15, 2015 at 2:01 PM, Raimund Steger <span dir="ltr"><<a href="mailto:rs@mytum.de" target="_blank">rs@mytum.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 02/12/15 03:59, Akira TAGOH wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
If the own scandir works on the platforms where don't have POSIX version<br>
of scandir, we could drop that check. if anyone confirm, that would be<br>
appreciated.<br>
</blockquote>
<br></span>
The question is, for what cases would we need our own scandir. Because:<br>
<br>
(1) On Win32, FcDirChecksum isn't used (we use FcStat/GetFileAttributesEx only)<br>
<br>
(2) On all platforms we supported before 38ab7ab2fbd83c0c62e4b78302b5fe<u></u>89da0cb79e (where the configure check was introduced), scandir *is* available. Either the POSIX one (in the sense of [1]) which uses dirent comparators or the one that uses void* [2].<br>
<br>
Because of that, we wouldn't need to specifically test for [1] and could just assume it's there, avoiding clashes with UNIX compilers that can't execute our test because of -Werror.<br>
<br>
Now what about platforms where there is indeed neither GetFileAttributesEx nor any version of scandir? I admit that these were probably supported before 0ac6c98294d666762960824d393294<u></u>59b22b48b7 (<a href="https://bugs.freedesktop.org/show_bug.cgi?id=25535" target="_blank">https://bugs.freedesktop.org/<u></u>show_bug.cgi?id=25535</a>) and aren't now. If we wanted to support those, then yes, we would need to check for both scandir versions, although the check for the POSIX variant could be a simple fallback that doesn't need -Werror. And even then, we could probably simply ignore the result of FcIsFsMtimeBroken as the change addressed FAT file systems on UNIX/Linux only. I mean, the set of UNIX/Linux systems that don't have scandir and at the same time use a font directory on FAT is probably rather small...<br>
<br>
Raimund<br>
<br>
<br>
[1] <a href="http://pubs.opengroup.org/onlinepubs/9699919799/functions/alphasort.html" target="_blank">http://pubs.opengroup.org/<u></u>onlinepubs/9699919799/<u></u>functions/alphasort.html</a><br>
[2] <a href="http://netbsd.gw.com/cgi-bin/man-cgi?scandir+3+NetBSD-current" target="_blank">http://netbsd.gw.com/cgi-bin/<u></u>man-cgi?scandir+3+NetBSD-<u></u>current</a><br>
<br>
<br>
<br>
<br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
On Thu, Feb 12, 2015 at 7:55 AM, Raimund Steger <<a href="mailto:rs@mytum.de" target="_blank">rs@mytum.de</a><br></span><span class="">
<mailto:<a href="mailto:rs@mytum.de" target="_blank">rs@mytum.de</a>>> wrote:<br>
<br>
On 02/11/15 19:40, Michael Felt wrote:<br>
<br>
Yes, xlC, and I was hoping it was just a stray gcc flag.<br>
<br>
<br>
If that's indeed the reason, you can:<br>
<br>
(0) To confirm whether it is, replace WERROR_CFLAGS="-Werror" with<br></span>
WERROR_CFLAGS="" in <a href="http://configure.ac" target="_blank">configure.ac</a> <<a href="http://configure.ac" target="_blank">http://configure.ac</a>>, run<span class=""><br>
autoconf, configure etc.<br>
<br>
If that works:<br>
<br>
(1) find an equivalent flag for XL C and create a patch, just like<br>
the one for SunPRO [1]. If I understand the documentation right [2],<br>
this could be "-qmaxerr=1:w" (increase the number 1 if some<br>
'statement not reached' stuff gets in your way), but it's difficult<br>
to say without an actual installation to test.<br>
<br>
(2) create a patch similar to (1), but set WERROR_CFLAGS="" or<br>
disable the scandir check altogether when compiling with XL C. I<br>
believe before [3] there wasn't even a scandir check, and the change<br>
was only to silence warnings on NetBSD if I read the commit right. I<br>
doubt you will have any problem on AIX.<br>
<br>
Actually I'm still somewhat unhappy that configure wants to<br>
acknowledge the POSIX version of scandir specially when only<br>
recognizing the NetBSD version would probably have sufficed ...<br>
would have saved us a lot of if's, maybe even the one for $os_win32.<br>
<br>
But I'll shut my mouth again.<br>
<br>
-Raimund<br>
<br>
<br>
<br>
[1]<br></span>
<a href="http://cgit.freedesktop.org/__fontconfig/commit/?id=__694368667a15341ea30b37a36e9540__e6b1492680" target="_blank">http://cgit.freedesktop.org/__<u></u>fontconfig/commit/?id=__<u></u>694368667a15341ea30b37a36e9540<u></u>__e6b1492680</a><br>
<<a href="http://cgit.freedesktop.org/fontconfig/commit/?id=694368667a15341ea30b37a36e9540e6b1492680" target="_blank">http://cgit.freedesktop.org/<u></u>fontconfig/commit/?id=<u></u>694368667a15341ea30b37a36e9540<u></u>e6b1492680</a>><br>
[2]<br>
<a href="http://www-01.ibm.com/support/__knowledgecenter/SSGH2K_13.1.0/__com.ibm.xlc131.aix.doc/__compiler_ref/opt_maxerr.html?__lang=en" target="_blank">http://www-01.ibm.com/support/<u></u>__knowledgecenter/SSGH2K_13.1.<u></u>0/__com.ibm.xlc131.aix.doc/__<u></u>compiler_ref/opt_maxerr.html?_<u></u>_lang=en</a><br>
<<a href="http://www-01.ibm.com/support/knowledgecenter/SSGH2K_13.1.0/com.ibm.xlc131.aix.doc/compiler_ref/opt_maxerr.html?lang=en" target="_blank">http://www-01.ibm.com/<u></u>support/knowledgecenter/<u></u>SSGH2K_13.1.0/com.ibm.xlc131.<u></u>aix.doc/compiler_ref/opt_<u></u>maxerr.html?lang=en</a>><br>
[3]<br>
<a href="http://cgit.freedesktop.org/__fontconfig/commit/?id=__38ab7ab2fbd83c0c62e4b78302b5fe__89da0cb79e" target="_blank">http://cgit.freedesktop.org/__<u></u>fontconfig/commit/?id=__<u></u>38ab7ab2fbd83c0c62e4b78302b5fe<u></u>__89da0cb79e</a><span class=""><br>
<<a href="http://cgit.freedesktop.org/fontconfig/commit/?id=38ab7ab2fbd83c0c62e4b78302b5fe89da0cb79e" target="_blank">http://cgit.freedesktop.org/<u></u>fontconfig/commit/?id=<u></u>38ab7ab2fbd83c0c62e4b78302b5fe<u></u>89da0cb79e</a>><br>
<br>
<br>
<br>
<br>
<br>
<br>
--<br>
Akira TAGOH<br>
</span></blockquote>
<br><div class="HOEnZb"><div class="h5">
<br>
-- <br>
Worringer Str 31 Duesseldorf 40211 DE home: <<a href="mailto:rs@mytum.de" target="_blank">rs@mytum.de</a>><br>
<a href="tel:%2B49-179-2981632" value="+491792981632" target="_blank">+49-179-2981632</a> icq 16845346 work: <<a href="mailto:rs@interface-ag.de" target="_blank">rs@interface-ag.de</a>><br>
</div></div></blockquote></div><br></div>