]>
Commit | Line | Data |
---|---|---|
427c49bc A |
1 | // |
2 | // comparison.h | |
3 | // utilities | |
4 | // | |
5 | // Created by Mitch Adler on 6/14/12. | |
6 | // Copyright (c) 2012 Apple Inc. All rights reserved. | |
7 | // | |
8 | ||
9 | #ifndef utilities_comparison_h | |
10 | #define utilities_comparison_h | |
11 | ||
12 | #define MIN(a, b) ({ __typeof__ (a) _a = (a); __typeof__ (b) _b = (b); _a <= _b ? _a : _b; }) | |
13 | #define MAX(a, b) ({ __typeof__ (a) _a = (a); __typeof__ (b) _b = (b); _a >= _b ? _a : _b; }) | |
14 | ||
15 | uint64_t constant_memcmp(const uint8_t *first, const uint8_t *second, size_t count); | |
16 | ||
17 | #endif |