diff --git a/include/misc.h b/include/misc.h index 7a2bd7776..3c04594eb 100644 --- a/include/misc.h +++ b/include/misc.h @@ -122,7 +122,7 @@ typedef int XRetCode; #undef min #undef max - +/* @deprecated */ #define min(a, b) (((a) < (b)) ? (a) : (b)) #define max(a, b) (((a) > (b)) ? (a) : (b)) /* abs() is a function, not a macro; include the file declaring diff --git a/os/mathx_priv.h b/os/mathx_priv.h new file mode 100644 index 000000000..956be0a37 --- /dev/null +++ b/os/mathx_priv.h @@ -0,0 +1,16 @@ +/* SPDX-License-Identifier: MIT OR X11 + * + * Copyright © 2024 Enrico Weigelt, metux IT consult + */ +#ifndef _XSERVER_OS_MATHX_PRIV_H_ +#define _XSERVER_OS_MATHX_PRIV_H_ + +#ifndef MIN +#define MIN(a,b) (((a)<(b))?(a):(b)) +#endif + +#ifndef MAX +#define MAX(a,b) (((a)>(b))?(a):(b)) +#endif + +#endif /* _XSERVER_OS_MATHX_PRIV_H_ */