1*39ef54bdSmillert /* $OpenBSD: limits.h,v 1.4 2015/04/30 13:42:08 millert Exp $ */ 295c7671fSmiod /* $NetBSD: limits.h,v 1.1 1996/09/30 16:34:28 ws Exp $ */ 395c7671fSmiod 495c7671fSmiod /*- 595c7671fSmiod * Copyright (C) 1995, 1996 Wolfgang Solfrank. 695c7671fSmiod * Copyright (C) 1995, 1996 TooLs GmbH. 795c7671fSmiod * All rights reserved. 895c7671fSmiod * 995c7671fSmiod * Redistribution and use in source and binary forms, with or without 1095c7671fSmiod * modification, are permitted provided that the following conditions 1195c7671fSmiod * are met: 1295c7671fSmiod * 1. Redistributions of source code must retain the above copyright 1395c7671fSmiod * notice, this list of conditions and the following disclaimer. 1495c7671fSmiod * 2. Redistributions in binary form must reproduce the above copyright 1595c7671fSmiod * notice, this list of conditions and the following disclaimer in the 1695c7671fSmiod * documentation and/or other materials provided with the distribution. 1795c7671fSmiod * 3. All advertising materials mentioning features or use of this software 1895c7671fSmiod * must display the following acknowledgement: 1995c7671fSmiod * This product includes software developed by TooLs GmbH. 2095c7671fSmiod * 4. The name of TooLs GmbH may not be used to endorse or promote products 2195c7671fSmiod * derived from this software without specific prior written permission. 2295c7671fSmiod * 2395c7671fSmiod * THIS SOFTWARE IS PROVIDED BY TOOLS GMBH ``AS IS'' AND ANY EXPRESS OR 2495c7671fSmiod * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 2595c7671fSmiod * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 2695c7671fSmiod * IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 2795c7671fSmiod * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 2895c7671fSmiod * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 2995c7671fSmiod * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 3095c7671fSmiod * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 3195c7671fSmiod * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 3295c7671fSmiod * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 3395c7671fSmiod */ 3495c7671fSmiod 3595c7671fSmiod #ifndef _SH_LIMITS_H_ 3695c7671fSmiod #define _SH_LIMITS_H_ 3795c7671fSmiod 3895c7671fSmiod #include <sys/cdefs.h> 3995c7671fSmiod 4095c7671fSmiod #if __POSIX_VISIBLE || __XPG_VISIBLE 418bc47e72Skettenis #define SSIZE_MAX LONG_MAX /* max value for a ssize_t */ 4295c7671fSmiod #endif 4395c7671fSmiod 4495c7671fSmiod #if __BSD_VISIBLE 458bc47e72Skettenis #define SIZE_T_MAX ULONG_MAX /* max value for a size_t (historic) */ 4695c7671fSmiod 4795c7671fSmiod #define UQUAD_MAX 0xffffffffffffffffULL /* max unsigned quad */ 4895c7671fSmiod #define QUAD_MAX 0x7fffffffffffffffLL /* max signed quad */ 4995c7671fSmiod #define QUAD_MIN (-0x7fffffffffffffffLL-1) /* min signed quad */ 5095c7671fSmiod #endif /* __BSD_VISIBLE */ 5195c7671fSmiod 5295c7671fSmiod #endif /* _SH_LIMITS_H_ */ 53