xref: /dflybsd-src/sys/dev/drm/include/linux/limits.h (revision 3f2dd94a569761201b5b0a18b2f697f97fe1b9dc)
12cecdd68SFrançois Tigeot /*
22cecdd68SFrançois Tigeot  * Copyright (c) 2020 François Tigeot <ftigeot@wolfpond.org>
32cecdd68SFrançois Tigeot  * All rights reserved.
42cecdd68SFrançois Tigeot  *
52cecdd68SFrançois Tigeot  * Redistribution and use in source and binary forms, with or without
62cecdd68SFrançois Tigeot  * modification, are permitted provided that the following conditions
72cecdd68SFrançois Tigeot  * are met:
82cecdd68SFrançois Tigeot  * 1. Redistributions of source code must retain the above copyright
92cecdd68SFrançois Tigeot  *    notice unmodified, this list of conditions, and the following
102cecdd68SFrançois Tigeot  *    disclaimer.
112cecdd68SFrançois Tigeot  * 2. Redistributions in binary form must reproduce the above copyright
122cecdd68SFrançois Tigeot  *    notice, this list of conditions and the following disclaimer in the
132cecdd68SFrançois Tigeot  *    documentation and/or other materials provided with the distribution.
142cecdd68SFrançois Tigeot  *
152cecdd68SFrançois Tigeot  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
162cecdd68SFrançois Tigeot  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
172cecdd68SFrançois Tigeot  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
182cecdd68SFrançois Tigeot  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
192cecdd68SFrançois Tigeot  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
202cecdd68SFrançois Tigeot  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
212cecdd68SFrançois Tigeot  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
222cecdd68SFrançois Tigeot  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
232cecdd68SFrançois Tigeot  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
242cecdd68SFrançois Tigeot  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
252cecdd68SFrançois Tigeot  */
262cecdd68SFrançois Tigeot 
272cecdd68SFrançois Tigeot #ifndef _LINUX_LIMITS_H_
282cecdd68SFrançois Tigeot #define _LINUX_LIMITS_H_
292cecdd68SFrançois Tigeot 
30*3f2dd94aSFrançois Tigeot #include <uapi/linux/limits.h>
312cecdd68SFrançois Tigeot #include <linux/types.h>
322cecdd68SFrançois Tigeot 
332cecdd68SFrançois Tigeot #define SIZE_MAX	(~(size_t)0)
342cecdd68SFrançois Tigeot 
35*3f2dd94aSFrançois Tigeot #define INT_MAX		((int)(~0U >> 1))
36*3f2dd94aSFrançois Tigeot #define INT_MIN		(-INT_MAX - 1)
37*3f2dd94aSFrançois Tigeot 
382cecdd68SFrançois Tigeot #endif /* _LINUX_LIMITS_H_ */
39