Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: Re: rlimits.c recompiled on every make



On Jul 7, 12:22pm, Andrej Borsenkow wrote:
} Subject: RE: rlimits.c recompiled on every make
}
} > Here's the problem.  @RLIMITS_INC_H@ is being replaced by /dev/null; I
} > suspect the mod time of /dev/null changes whenever it's written-to, so
} > it's almost always newer than rlimits.h -- hence rlimits.h is remade,
} > and so rlimits.o is also remade.
} >
} > Please re-run configure and let me know whether you see the message
} >
} >     RLIMIT MACROS NOT FOUND:  please report to developers
} 
} No, I do no get this message. It is output only if getrlimit() is found
} but RLIMIT_* macros are missing. On Cygwin there is no getrlimit() at
} all and no message.

That is as I suspected.  OK, then, the patch below should handle it.
 
} In this case it is pretty useless to build rlimit module?

All of the rlimit commands get replaced with the `bin_notavail' stub, so
that you get a more informative error message than "command not found."

Index: configure.in
===================================================================
@@ -963,6 +963,9 @@
   AC_MSG_WARN(RLIMIT MACROS NOT FOUND:  please report to developers)
 fi])
 RLIMITS_INC_H=$zsh_cv_path_rlimit_h
+if test "$RLIMITS_INC_H" = "/dev/null"; then
+  RLIMITS_INC_H=''
+fi
 dnl rlimits.h only appears in dependencies if we are actually using it.
 dnl We are using it any time we have getrlimit, though if the macros were
 dnl not found we simply awk through /dev/null and fail to find them.
Index: Src/Builtins/rlimits.mdd
===================================================================
@@ -9,7 +9,7 @@
 
 # this file will not be made if limits are unavailable
 rlimits.h: rlimits.awk @RLIMITS_INC_H@
-	$(AWK) -f $(sdir)/rlimits.awk @RLIMITS_INC_H@ > rlimits.h
+	$(AWK) -f $(sdir)/rlimits.awk @RLIMITS_INC_H@ /dev/null > rlimits.h
 	@if grep ZLIMTYPE_UNKNOWN rlimits.h >/dev/null; then \
 	    echo >&2 WARNING: unknown limits: mail rlimits.h to developers; \
 	else :; fi

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   



Messages sorted by: Reverse Date, Date, Thread, Author