1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 06:57:45 +00:00

LibC: Add MIN, MAX and howmany macros to sys/param.h

This commit is contained in:
Andreas Kling 2022-04-29 20:29:05 +02:00
parent 89f9454785
commit 577b4c73b0

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2018-2022, Andreas Kling <kling@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -8,3 +8,15 @@
#include <endian.h>
#include <limits.h>
#ifndef MIN
# define MIN(a, b) (((a) < (b)) ? (a) : (b))
#endif
#ifndef MAX
# define MAX(a, b) (((a) > (b)) ? (a) : (b))
#endif
#ifndef howmany
# define howmany(x, y) (((x) + ((y)-1)) / (y))
#endif