diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-07-06 12:00:35 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-07-06 12:00:35 (GMT) |
commit | 698d338b0f99491fa29224dbfa20aabad7efad67 (patch) | |
tree | 0d82925d246872e732646e7ab48ae4193e5d867d /generic/tclPkg.c | |
parent | 11f905cd0ac504734130b3c41a7b434b83557b7c (diff) | |
parent | 20c87d8e2377d5d7f88a6f170e92e5a70fbddf3b (diff) | |
download | tcl-698d338b0f99491fa29224dbfa20aabad7efad67.zip tcl-698d338b0f99491fa29224dbfa20aabad7efad67.tar.gz tcl-698d338b0f99491fa29224dbfa20aabad7efad67.tar.bz2 |
Merge 8.7. Provide both major and minor version number for gcc/clang/msvc
Diffstat (limited to 'generic/tclPkg.c')
-rw-r--r-- | generic/tclPkg.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/generic/tclPkg.c b/generic/tclPkg.c index c2fb18e..d1fb2e8 100644 --- a/generic/tclPkg.c +++ b/generic/tclPkg.c @@ -1998,23 +1998,16 @@ CheckRequirement( char *dash = NULL, *buf; - dash = (char *)strchr(string, '-'); - while ((dash != NULL) && dash[1] && !isdigit(UCHAR(dash[1]))) { - dash = strchr(dash+1, '-'); - } + dash = strchr(string, '+') ? NULL : (char *)strchr(string, '-'); if (dash == NULL) { /* - * No dash found, has to be a simple version. + * '+' found or no dash found: has to be a simple version. */ return CheckVersionAndConvert(interp, string, NULL, NULL); } - buf = strchr(dash+1, '-'); - while ((buf != NULL) && buf[1] && !isdigit(UCHAR(buf[1]))) { - buf = strchr(buf+1, '-'); - } - if (buf != NULL) { + if (strchr(dash+1, '-') != NULL) { /* * More dashes found after the first. This is wrong. */ |