X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=m4%2Fmknod.m4;h=d9f68f4c28b8a2bae92b47211bb0bd5c6c048e5d;hb=8f3cd38b6c08109ec9edea0e7712e9a7a920a2d8;hp=4d9214d0449118d41401b6cae1b1a9a7bb07c91c;hpb=b2e2010c7c902235b5efb5bd3c6529f61b093aa4;p=gnulib.git diff --git a/m4/mknod.m4 b/m4/mknod.m4 index 4d9214d04..d9f68f4c2 100644 --- a/m4/mknod.m4 +++ b/m4/mknod.m4 @@ -1,7 +1,7 @@ -# serial 1 +# serial 3 # See if we need to provide mknod replacement. -dnl Copyright (C) 2009, 2010 Free Software Foundation, Inc. +dnl Copyright (C) 2009-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -27,9 +27,14 @@ AC_DEFUN([gl_FUNC_MKNOD], #include ]], [[/* Indeterminate for super-user, assume no. Why are you running configure as root, anyway? */ - if (!geteuid ()) return 1; + if (!geteuid ()) return 99; if (mknod ("conftest.fifo", S_IFIFO | 0600, 0)) return 2;]])], - [gl_cv_func_mknod_works=yes], [gl_cv_func_mknod_works=no], + [gl_cv_func_mknod_works=yes], + [if test $? = 99 && test x"$FORCE_UNSAFE_CONFIGURE" = x; then + AC_MSG_FAILURE([you should not run configure as root ]dnl +[(set FORCE_UNSAFE_CONFIGURE=1 in environment to bypass this check)]) + fi + gl_cv_func_mknod_works=no], [gl_cv_func_mknod_works="guessing no"]) rm -f conftest.fifo]) if test "$gl_cv_func_mknod_works" != yes; then