diff options
author | Baptiste Daroussin <bapt@FreeBSD.org> | 2016-10-23 00:24:25 +0000 |
---|---|---|
committer | Baptiste Daroussin <bapt@FreeBSD.org> | 2016-10-23 00:24:25 +0000 |
commit | ab1717bb35d85041e0184f79daa1313a1306dc01 (patch) | |
tree | fa0739f76b49b902269f8f7c1e1c7c5ea30c0556 /include/global.h | |
parent | aa7798c94fa57f6c00fab4393c9fe91334864371 (diff) |
Notes
Diffstat (limited to 'include/global.h')
-rw-r--r-- | include/global.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/include/global.h b/include/global.h index 8e41045d1aa8..e0a1c31135b9 100644 --- a/include/global.h +++ b/include/global.h @@ -15,3 +15,23 @@ #else # define n_wcscpy(dst, src, size ) wcscpy(dst, src) #endif + +#define min(x,y) ((x) < (y) ? (x) : (y)) +#define max(x,y) ((x) > (y) ? (x) : (y)) +#define prefix(str, pfx) (strncmp(pfx, str, strlen(pfx)) == 0) + +#undef __unused +#define __unused __attribute__((unused)) + +#ifdef __GLIBC__ +#ifdef _IO_getc_unlocked +#undef getc +#define getc(f) _IO_getc_unlocked(f) +#endif +#ifdef _IO_putc_unlocked +#undef putc +#undef putchar +#define putc(c, f) _IO_putc_unlocked(c, f) +#define putchar(c) _IO_putc_unlocked(c, stdout) +#endif +#endif |