xref: /openbsd-src/sys/arch/sparc64/include/limits.h (revision 39ef54bd3c88f782799e8263a3c3a00d355071fb)
1*39ef54bdSmillert /*	$OpenBSD: limits.h,v 1.11 2015/04/30 13:42:08 millert Exp $	*/
2de24d0bcSjason /*	$NetBSD: limits.h,v 1.8 2000/08/08 22:31:14 tshiozak Exp $ */
3de24d0bcSjason 
4de24d0bcSjason /*
5de24d0bcSjason  * Copyright (c) 1988 The Regents of the University of California.
6de24d0bcSjason  * All rights reserved.
7de24d0bcSjason  *
8de24d0bcSjason  * Redistribution and use in source and binary forms, with or without
9de24d0bcSjason  * modification, are permitted provided that the following conditions
10de24d0bcSjason  * are met:
11de24d0bcSjason  * 1. Redistributions of source code must retain the above copyright
12de24d0bcSjason  *    notice, this list of conditions and the following disclaimer.
13de24d0bcSjason  * 2. Redistributions in binary form must reproduce the above copyright
14de24d0bcSjason  *    notice, this list of conditions and the following disclaimer in the
15de24d0bcSjason  *    documentation and/or other materials provided with the distribution.
1629295d1cSmillert  * 3. Neither the name of the University nor the names of its contributors
17de24d0bcSjason  *    may be used to endorse or promote products derived from this software
18de24d0bcSjason  *    without specific prior written permission.
19de24d0bcSjason  *
20de24d0bcSjason  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21de24d0bcSjason  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22de24d0bcSjason  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23de24d0bcSjason  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24de24d0bcSjason  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25de24d0bcSjason  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26de24d0bcSjason  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27de24d0bcSjason  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28de24d0bcSjason  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29de24d0bcSjason  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30de24d0bcSjason  * SUCH DAMAGE.
31de24d0bcSjason  *
32de24d0bcSjason  *	@(#)limits.h	8.3 (Berkeley) 1/4/94
33de24d0bcSjason  */
34de24d0bcSjason 
35de24d0bcSjason #ifndef	_MACHINE_LIMITS_H_
36de24d0bcSjason #define	_MACHINE_LIMITS_H_
37de24d0bcSjason 
387c2ef5d9Smillert #include <sys/cdefs.h>
397c2ef5d9Smillert 
407c2ef5d9Smillert #if __POSIX_VISIBLE || __XPG_VISIBLE
41de24d0bcSjason #define	SSIZE_MAX	LONG_MAX	/* max value for a ssize_t */
427c2ef5d9Smillert #endif
43de24d0bcSjason 
447c2ef5d9Smillert #if __BSD_VISIBLE
457c2ef5d9Smillert #define	SIZE_T_MAX	ULONG_MAX	/* max value for a size_t (historic) */
46de24d0bcSjason 
47de24d0bcSjason /* GCC requires that quad constants be written as expressions. */
48de24d0bcSjason #define	UQUAD_MAX	((u_quad_t)0-1)	/* max value for a uquad_t */
49de24d0bcSjason 					/* max value for a quad_t */
50de24d0bcSjason #define	QUAD_MAX	((quad_t)(UQUAD_MAX >> 1))
51de24d0bcSjason #define	QUAD_MIN	(-QUAD_MAX-1)	/* min value for a quad_t */
52de24d0bcSjason 
537c2ef5d9Smillert #endif /* __BSD_VISIBLE */
54de24d0bcSjason 
55de24d0bcSjason #endif	/* _MACHINE_LIMITS_H_ */
56