dbus ChangeLog,1.1140,1.1141 configure.in,1.184,1.185

Thiago Macieira thiago at kde.org
Wed Oct 11 11:55:16 PDT 2006


John (J5) Palmieri wrote:
>On Wed, 2006-10-11 at 20:08 +0200, Thiago Macieira wrote:
>> John Palmieri wrote:
>> >+               [AC_TRY_RUN([
>> >+#include <sys/types.h>
>> >+#include <dirent.h>
>> >+int main () {
>> >+       DIR *dirp;
>> >+       dirp = opendir(".");
>> >+       dirfd(dirp);
>> >+       closedir(dirp);
>> >+}],
>>
>> Do you need to run this program to test the dirfd availability?
>
>For freebsd you do since it is a macro and not a function.  Of course we
>could do an AC_CHECK_FUNCS (dirp) and if that fails run the program.  I
>don't know autofoo all that well though.

I meant: isn't compiling (AC_TRY_COMPILE) enough? Do you need to actually 
*run* the compiled code?

In special, you're not returning anything from main, so the test is 
actually returning whether closedir succeeded or not.

-- 
  Thiago Macieira  -  thiago (AT) macieira.info - thiago (AT) kde.org
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/dbus-commit/attachments/20061011/f3cef41a/attachment.pgp


More information about the dbus-commit mailing list