i386/57783: UINT32_MAX is missing from FreeBSD 4.X

Ted Mittelstaedt tedm at ipinc.net
Wed Oct 8 22:50:21 PDT 2003


>Number:         57783
>Category:       i386
>Synopsis:       UINT32_MAX is missing from FreeBSD 4.X
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-i386
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Oct 08 22:50:19 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator:     Ted Mittelstaedt
>Release:        FreeBSD 4.8-RELEASE i386
>Organization:
Internet Partners Inc.
>Environment:
System: FreeBSD atlas.ipinc.net 4.8-RELEASE FreeBSD 4.8-RELEASE #1: Sun Oct 5 01:40:14 PDT 2003 tedm at atlas.ipinc.net:/usr/src/sys/compile/ATLASKER i386


	
>Description:

A definition of UINT32_MAX is missing from /usr/include/machine/limits.h

This is an obvious oversight as the manpage for arc4random() shows it
returning u_int32_t

I found a note on Usenet to the effect that this was (may have been?)
fixed in FreeBSD 5?
	
>How-To-Repeat:
	
>Fix:

I think that adding

#define UINT32_MAX      0xffffffffU     /* max value for an unsigned int */

to limits.h will fix this.

Note also that /usr/src/usr.bin/jot/jot.c uses the UINT32_MAX on line
number 280, but someone has replaced this with the actual constant.
(If jot.c is ever updated this may be a problem again)

	


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-i386 mailing list