[PATCH 0 of 2] setup: don't build inotify extension when <sys/inotify.h> is too old

cboos at neuf.fr cboos at neuf.fr
Wed Jun 16 12:30:17 CDT 2010


When trying to build Mercurial on my SuSE Enterprise 10sp2 box,
I got some trivial errors when building the hgext/inotify extension.

hgext/inotify/linux/_inotify.c:164: error: ‘IN_ONLYDIR’ undeclared here (not in a function)
hgext/inotify/linux/_inotify.c:165: error: ‘IN_DONT_FOLLOW’ undeclared here (not in a function)
hgext/inotify/linux/_inotify.c:166: error: ‘IN_MASK_ADD’ undeclared here (not in a function)

This is admittedly because of my too old sys/inotify.h header,
or some other brokenness on my system, but as I don't want to use
the inotify extension anyway, I'd prefer to simply avoid building
inotify when it's anyway going to fail.

To that end, I added an "hasflags" function, which reuses the
"hasfunction" code.



More information about the Mercurial-devel mailing list