Introduce shared/defines.h to collect commonly used macros. For now

it defines min() / max() macros.
This commit is contained in:
mmdolze
2009-11-22 15:15:53 +00:00
parent 30447dd905
commit 73b7ec00ff
12 changed files with 35 additions and 25 deletions
+1 -1
View File
@@ -8,6 +8,6 @@ libLCDstuff_a_LIBADD = @LIBOBJS@
AM_CPPFLAGS = -I$(top_srcdir)
EXTRA_DIST = getopt.c getopt1.c getopt.h
EXTRA_DIST = getopt.c getopt1.c getopt.h defines.h
## EOF
+23
View File
@@ -0,0 +1,23 @@
/** \file shared/defines.h
* Define macros commonly used in other parts of LCDproc.
*/
/*-
* This file is part of LCDproc.
*
* This file is released under the GNU General Public License.
* Refer to the COPYING file distributed with this package.
*/
#ifndef SHARED_DEFINES_H
#define SHARED_DEFINES_H
/* Define min() and max() */
#ifndef min
# define min(a,b) (((a) < (b)) ? (a) : (b))
#endif
#ifndef max
# define max(a,b) (((a) > (b)) ? (a) : (b))
#endif
#endif