xref: /freebsd/contrib/ntp/sntp/libpkgver/pkgver.h (revision b5ff185e19f6013ca565b2a15bc2d6abce933f46)
1*276da39aSCy Schubert /*
2*276da39aSCy Schubert  *
3*276da39aSCy Schubert  *   Copyright 2015 Harlan Stenn.  Used by NTP with permission.
4*276da39aSCy Schubert  *
5*276da39aSCy Schubert  *   Author: Harlan Stenn <harlan@pfcs.com>
6*276da39aSCy Schubert  *
7*276da39aSCy Schubert  *   Copying and distribution of this file, with or without modification, are
8*276da39aSCy Schubert  *   permitted in any medium without royalty provided the copyright notice
9*276da39aSCy Schubert  *   and this notice are preserved. This file is offered as-is, without any
10*276da39aSCy Schubert  *   warranty.
11*276da39aSCy Schubert  */
12*276da39aSCy Schubert 
13*276da39aSCy Schubert extern int colcomp(char *s1, char *s2);
14*276da39aSCy Schubert 
15*276da39aSCy Schubert #define PKG_VER_LT(x)	(colcomp((x), PACKAGE_VERSION) < 0)
16*276da39aSCy Schubert #define PKG_VER_LE(x)	(colcomp((x), PACKAGE_VERSION) <= 0)
17*276da39aSCy Schubert #define PKG_VER_EQ(x)	(colcomp((x), PACKAGE_VERSION) == 0)
18*276da39aSCy Schubert #define PKG_VER_GE(x)	(colcomp((x), PACKAGE_VERSION) >= 0)
19*276da39aSCy Schubert #define PKG_VER_GT(x)	(colcomp((x), PACKAGE_VERSION) > 0)
20