]>
git.saurik.com Git - apple/security.git/blob - utilities/src/comparison.h
5 // Created by Mitch Adler on 6/14/12.
6 // Copyright (c) 2012 Apple Inc. All rights reserved.
9 #ifndef utilities_comparison_h
10 #define utilities_comparison_h
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; })
15 uint64_t constant_memcmp(const uint8_t *first
, const uint8_t *second
, size_t count
);