static VersionCmpResult CompareVersionsEqual(EvalContext *ctx, const char *v1, const char *v2, Attributes a, Promise *pp) { if (a.packages.package_version_equal_command) { return RunCmpCommand(ctx, a.packages.package_version_equal_command, v1, v2, a, pp); } else if (a.packages.package_version_less_command) { /* emulate v1 == v2 by !(v1 < v2) && !(v2 < v1) */ return AndResults(InvertResult(CompareVersionsLess(ctx, v1, v2, a, pp)), InvertResult(CompareVersionsLess(ctx, v2, v1, a, pp))); } else { /* Built-in fallback */ return ComparePackageVersionsInternal(v1, v2, PACKAGE_VERSION_COMPARATOR_EQ); } }
static VersionCmpResult CompareVersionsEqual(const char *v1, const char *v2, Attributes a, Promise *pp) { if (a.packages.package_version_equal_command) { return RunCmpCommand(a.packages.package_version_equal_command, v1, v2, a, pp); } else if (a.packages.package_version_less_command) { /* emulate v1 == v2 by !(v1 < v2) && !(v2 < v1) */ return AndResults(InvertResult(CompareVersionsLess(v1, v2, a, pp)), InvertResult(CompareVersionsLess(v2, v1, a, pp))); } else { /* Built-in fallback */ return ComparePackageVersionsInternal(v1, v2, cfa_eq); } }