<div dir="ltr">dropped scandir check (as well as -Werror) and its use in the code. tested on NetBSD. not sure if there are any platforms where opendir/readdir stuff doesn't work.. if any, please let me know.</div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Feb 16, 2015 at 12:03 PM, Akira TAGOH <span dir="ltr"><<a href="mailto:akira@tagoh.org" target="_blank">akira@tagoh.org</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">the background is, we've added -Werror to address the build issue on older glibc against posix_fadvise()[1]. the error stopped on scandir() check was a side-effect coming from it. maybe it was wrong way. though I had no idea to address it other than that way.<div><br></div><div>let me take a look again and think more.</div><div><br></div><div>[1] <a href="https://bugs.freedesktop.org/show_bug.cgi?id=52573" rel="noreferrer" style="display:inline!important" target="_blank">https://bugs.freedesktop.org/show_bug.cgi?id=52573</a></div></div><div class="gmail_extra"><div><div class="h5"><br><div class="gmail_quote">On Sun, Feb 15, 2015 at 10: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>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>
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>
<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><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><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><div>
<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><br clear="all"><div><br></div></div></div><span class="HOEnZb"><font color="#888888">-- <br><div>Akira TAGOH</div>
</font></span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Akira TAGOH</div>
</div>