Subject: kern/30571: Cannot set MAXDSIZ to values >2GB on some platforms
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: None <njoly@pasteur.fr>
List: netbsd-bugs
Date: 06/21/2005 08:55:00
>Number:         30571
>Category:       kern
>Synopsis:       Cannot set MAXDSIZ to values >2GB on some platforms
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jun 21 08:55:00 +0000 2005
>Originator:     Nicolas Joly
>Release:        NetBSD 3.99.6
>Organization:
Institut Pasteur
>Environment:
System: NetBSD hal.sis.pasteur.fr 3.99.6 NetBSD 3.99.6 (HAL.BIG) #0: Mon Jun 20 22:29:09 CEST 2005 njoly@hal.sis.pasteur.fr:/local/src/NetBSD/obj/i386/sys/arch/i386/compile/HAL.BIG i386
Architecture: i386
Machine: i386
>Description:
While trying to compile a i386 -current kernel with 3GB for MAXDSIZ, i'm
getting an error in `sys/kern/kern_resource.c':

#   compile  HAL.BIG/kern_resource.o
/local/src/NetBSD/tool/i386/bin/i386--netbsdelf-gcc -ffreestanding -O2 -Werror -Wall -Wno-main -Wno-format-zero-length -Wpointer-arith -Wmissing-prototypes -Wstrict-prototypes -Wreturn-type -Wswitch -Wshadow -Wcast-qual -Wwrite-strings -Wno-sign-compare -fno-zero-initialized-in-bss -Di386 -I. -I/local/src/NetBSD/src/sys/arch -I/local/src/NetBSD/src/sys -nostdinc -DLKM -DNMBCLUSTERS=4096 -DMAXDSIZ=3221225472 -DMAXUSERS=32 -D_KERNEL -D_KERNEL_OPT -I/local/src/NetBSD/src/sys/dist/ipf -c /local/src/NetBSD/src/sys/kern/kern_resource.c
/local/src/NetBSD/src/sys/kern/kern_resource.c:62: warning: this decimal constant is unsigned only in ISO C90

For now it passed by making the value unsigned:

options 	MAXDSIZ="3221225472U"

NB: This seems to be a 32bit platform issue as the same value worked
flawlessly on NetBSD/alpha and NetBSD/amd64.

>How-To-Repeat:
compile a kernel, at least on i386, with:
options 	MAXDSIZ=3221225472
>Fix: