utils: move macro defines to before they're used

Signed-off-by: Ran Benita <ran@unusedvar.com>
master
Ran Benita 2019-12-27 13:55:24 +02:00
parent 64137a4ab5
commit 0fdd29bb7b
1 changed files with 8 additions and 8 deletions

View File

@ -36,6 +36,14 @@
switch (0) { case 0: case (expr): ; } \
} while (0)
#define ARRAY_SIZE(arr) ((sizeof(arr) / sizeof(*(arr))))
#define MIN(a, b) ((a) < (b) ? (a) : (b))
#define MAX(a, b) ((a) > (b) ? (a) : (b))
/* Round up @a so it's divisible by @b. */
#define ROUNDUP(a, b) (((a) + (b) - 1) / (b) * (b))
char
to_lower(char c);
@ -194,14 +202,6 @@ map_file(FILE *file, char **string_out, size_t *size_out);
void
unmap_file(char *string, size_t size);
#define ARRAY_SIZE(arr) ((sizeof(arr) / sizeof(*(arr))))
#define MIN(a, b) ((a) < (b) ? (a) : (b))
#define MAX(a, b) ((a) > (b) ? (a) : (b))
/* Round up @a so it's divisible by @b. */
#define ROUNDUP(a, b) (((a) + (b) - 1) / (b) * (b))
#if defined(HAVE_SECURE_GETENV)
# define secure_getenv secure_getenv
#elif defined(HAVE___SECURE_GETENV)