From 7d0ca0e42091bc22762c16669fe03d54d1bfa013 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Tue, 5 Sep 2017 14:56:12 +0000 Subject: Recognise "-rc" also as part of version ranges (was missing from previous commit) --- doc/GetVersion.3 | 3 ++- generic/tclPkg.c | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/GetVersion.3 b/doc/GetVersion.3 index 3672382..a35c631 100644 --- a/doc/GetVersion.3 +++ b/doc/GetVersion.3 @@ -25,7 +25,8 @@ The patch level of the Tcl library (or alpha or beta number). .AP Tcl_ReleaseType *type out The type of release, also indicates the type of patch level. Can be one of \fBTCL_ALPHA_RELEASE\fR, \fBTCL_BETA_RELEASE\fR, or -\fBTCL_FINAL_RELEASE\fR. +\fBTCL_FINAL_RELEASE\fR. This function cannot distinguish between +final and rc releases, both will be considered final. .BE .SH DESCRIPTION diff --git a/generic/tclPkg.c b/generic/tclPkg.c index 87f3f3e..1171531 100644 --- a/generic/tclPkg.c +++ b/generic/tclPkg.c @@ -1754,10 +1754,10 @@ CheckRequirement( char *dash = NULL, *buf; dash = strchr(string, '-'); - if ((dash != NULL) && (dash[1]=='a' || dash[1]=='b')) { + if ((dash != NULL) && (dash[1]=='a' || dash[1]=='b' || dash[1]=='r')) { dash = strchr(dash+1, '-'); } - if ((dash == NULL) || dash[1]=='a' || dash[1]=='b') { + if ((dash == NULL) || dash[1]=='a' || dash[1]=='b' || dash[1]=='r') { /* * No dash found, has to be a simple version. */ -- cgit v0.12