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

pre1 on hpux bug



Compiling zsh-3.0-pre1 on HPUX 10.10 crashes with

gcc -c -I.. -I. -I.  -DHAVE_CONFIG_H -Wall -Wno-implicit
-Wmissing-prototypes -O2 -DDEBUG builtin.c
In file included from zsh.h:35,
                 from builtin.c:32:
system.h:366: warning: `RLIM_NLIMITS' redefined
/usr/include/sys/resource.h:134: warning: this is the location of the
previous definition
builtin.c:3590: #error there are some unknown limits.  Fix me!
make[1]: *** [builtin.o] Error 1

This is easiliy fixed by the following patch:

*** system.h.orig	Mon Jul  1 15:17:34 1996
--- system.h	Mon Jul  1 15:17:51 1996
***************
*** 350,371 ****
  
  #ifdef HAVE_SYS_RESOURCE_H
  # include <sys/resource.h>
- # ifdef __hpux
- /* HPUX does have the BSD rlimits in the kernel.  Officially they are *
-  * unsupported but quite a few of them like RLIMIT_CORE seem to work. *
-  * All the following are in the <sys/resource.h> but made visible     *
-  * only for the kernel.                                               */
- #  define	RLIMIT_CPU	0
- #  define	RLIMIT_FSIZE	1
- #  define	RLIMIT_DATA	2
- #  define	RLIMIT_STACK	3
- #  define	RLIMIT_CORE	4
- #  define	RLIMIT_RSS	5
- #  define	RLIMIT_NOFILE   6
- #  define	RLIMIT_OPEN_MAX	RLIMIT_NOFILE
- #  define	RLIM_NLIMITS	7
- #  define	RLIM_INFINITY	0x7fffffff
- # endif
  #endif
  
  /* we use the SVR4 constant instead of the BSD one */
--- 350,355 ----

Note that all these definitions are in <sys/resource.h>, but with
RLIMIT_AS added and RLIM_NLIMITS defined to 8.

The presence of this code suggests that some earlier version of hpux
needs this.  But as we don't have any other versions here, I'm afraid
I'll leave figuring out the details to someone else.

Bas.




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