summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2010-01-03 17:45:53 +0000
committerph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2010-01-03 17:45:53 +0000
commitcb91d5e16c65f408d68094e3cca3ce96acaeede4 (patch)
tree62521fa110a7f5ce61ad0e23daa5d3e1a8c3ea2c
parent43f7ac18246b83e73908d6318e9eecdcfd1467c6 (diff)
downloadpcre-cb91d5e16c65f408d68094e3cca3ce96acaeede4.tar.gz
Forbid 08 and 09 as minor version numbers.
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@481 2f5784b3-3f2a-0410-8824-cb99058d5e15
-rw-r--r--ChangeLog7
-rw-r--r--configure.ac21
2 files changed, 23 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 3754c38..70c9535 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -81,6 +81,13 @@ Version 8.01 11-Dec-09
most of the time, it *can* run out if it is given a pattern that contains a
runaway infinite recursion. I updated the discussion in the pcrestack man
page.
+
+13. Now that we have gone to the x.xx style of version numbers, the minor
+ version may start with zero. Using 08 or 09 is a bad idea because users
+ might check the value of PCRE_MINOR in their code, and 08 or 09 may be
+ interpreted as invalid octal numbers. I've updated the previous comment in
+ configure.ac, and also added a check that gives an error if 08 or 09 are
+ used.
diff --git a/configure.ac b/configure.ac
index 11ff9d3..c63b492 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,10 +1,12 @@
dnl Process this file with autoconf to produce a configure script.
-dnl NOTE FOR MAINTAINERS: Do not use major or minor version numbers with
-dnl leading zeros, because they may be treated as octal constants. The
-dnl PCRE_PRERELEASE feature is for identifying release candidates. It might
-dnl be defined as -RC2, for example. For real releases, it should be defined
-dnl empty.
+dnl NOTE FOR MAINTAINERS: Do not use minor version numbers 08 or 09 because
+dnl the leading zeros may cause them to be treated as invalid octal constants
+dnl if a PCRE user writes code that uses PCRE_MINOR as a number. There is now
+dnl a check further down that throws an error if 08 or 09 are used.
+
+dnl The PCRE_PRERELEASE feature is for identifying release candidates. It might
+dnl be defined as -RC2, for example. For real releases, it should be empty.
m4_define(pcre_major, [8])
m4_define(pcre_minor, [01])
@@ -82,6 +84,15 @@ PCRE_MINOR="pcre_minor"
PCRE_PRERELEASE="pcre_prerelease"
PCRE_DATE="pcre_date"
+if test "$PCRE_MINOR" = "08" -o "$PCRE_MINOR" = "09"
+then
+ echo "***"
+ echo "*** Minor version number $PCRE_MINOR must not be used. ***"
+ echo "*** Use only 01 to 07 or 10 onwards, to avoid octal issues. ***"
+ echo "***"
+ exit 1
+fi
+
AC_SUBST(PCRE_MAJOR)
AC_SUBST(PCRE_MINOR)
AC_SUBST(PCRE_PRERELEASE)