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