Derek Price wrote:


I don't suppose you could come up with a configure test or a short C
program that fails to compile (preferrably) or run (if necessary) to
spot this, short of actually switching on the system name or something
similar?

The test would have to be a run test, which would mean having a cross-compile alternative switching on the system name (this is why gcc switches on name).

Just doing the same thing as gnulib does will show the failure:

int main(){
        void * address = NULL;
        static int fd =-1;
        int ret = 0;
        fd = open ("/dev/zero",O_RDONLY,666);
ret = mmap (NULL, 4096, PROT_READ | PROT_WRITE, MAP_FILE | MAP_PRIVATE, fd, 0);
        if (ret != MAP_FAILED) return 0;
return 1;
}

Hope this helps,
Peter


_______________________________________________
bug-gnulib mailing list
bug-gnulib@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-gnulib

Reply via email to