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

Re: zsh-3.0.1-test2 compilation problem



Thomas Winder wrote:
> Trying to compile zsh-3.0.1-test2 on sparclinux-961210 shows the
> following: 
[...]
> builtin.c:3686: #error there are some unknown limits.  Fix me!

I compiled zsh on plain RedHad-4.0-sparc which has an old resources.h
that's why I did not notice it.  The patch below should fix it.  I'm in the
process of replacing SunOS 4 to SparcLinux here and as a test I installed
it on a SUN ELC but that's a lot slower than a 386 DX/40 so I do not have
time to compile the kernel on it, I only use binary kernel images, and I
forgot to upgrage the includes.

That compiles on SparcLinux fine, but it may break something else, so
please test it (especially those using UP-UX-10.20, Digital Unix 4.x or
AIX-4.x).

I know this preprocessor trickery is ugly but the alternatives are not much
better either.  We can generate limits with an awk script but it took more
than a year to make the awk script generating signames.h portable.  And for
that we have to find out where are the RLIMIT_ macros defined (that seems
to be always in /usr/include/sys/resource.h but on Linux it is under asm).

Zoltan


*** Src/builtin.c	1996/12/11 02:27:28	3.1.0.10
--- Src/builtin.c	1996/12/12 14:08:25
***************
*** 2556,2566 ****
  #  define NEXT_RLIM (RLIMIT_MEMLOCK + 1)
      "memorylocked",
  # endif /* RLIMIT_MEMLOCK */
- # if defined RLIMIT_AS && RLIMIT_AS == NEXT_RLIM
- #  undef NEXT_RLIM
- #  define NEXT_RLIM (RLIMIT_AS + 1)
-     "addressspace",
- # endif /* RLIMIT_AS */
  # if defined RLIMIT_NPROC && RLIMIT_NPROC == NEXT_RLIM
  #  undef NEXT_RLIM
  #  define NEXT_RLIM (RLIMIT_NPROC + 1)
--- 2556,2561 ----
***************
*** 2571,2576 ****
--- 2566,2576 ----
  #  define NEXT_RLIM (RLIMIT_MEMLOCK + 1)
      "memorylocked",
  # endif /* RLIMIT_MEMLOCK */
+ # if defined RLIMIT_AS && RLIMIT_AS == NEXT_RLIM
+ #  undef NEXT_RLIM
+ #  define NEXT_RLIM (RLIMIT_AS + 1)
+     "addressspace",
+ # endif /* RLIMIT_AS */
  # if defined RLIMIT_NOFILE && RLIMIT_NOFILE == NEXT_RLIM
  #  undef NEXT_RLIM
  #  define NEXT_RLIM (RLIMIT_NOFILE + 1)



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