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

Re: rlim_t



> Zoltan's rlim_t patch contains:
> 
> +AC_CACHE_CHECK(for rlim_t, zsh_cv_type_rlim_t,
> +[AC_TRY_COMPILE([
> +#include <sys/types.h>
> +#ifdef HAVE_SYS_TIME_H
> +#include <sys/time.h>
> +#endif
> +#include <sys/resource.h>],
> +[rlim_t l;],
> +zsh_cv_type_rlim_t=yes,
> +zsh_cv_type_rlim_t=no)])
> +if test $zsh_cv_type_rlim_t = no; then
> +  AC_DEFINE_UNQUOTED(rlim_t, $DEFAULT_RLIM_T)
>  fi
> 
> Shouldn't that be
> 
> AC_CHECK_TYPE(rlim_t, $DEFAULT_RLIM_T)

AC_CHECK_TYPE does not do shell expansion on the second argument.  Also:

 - Macro: AC_CHECK_TYPE (TYPE, DEFAULT)
     If the type TYPE is not defined in `sys/types.h', or `stdlib.h' or
     `stddef.h' if they exist, define it to be the C (or C++) builtin
     type DEFAULT; e.g., `short' or `unsigned'.

So this does not include sys/resource.h.

Zoli



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