added wxSUBRELEAS_NUMBER and macro to check for it

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28420 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2004-07-23 10:38:25 +00:00
parent 7e06588478
commit eeade4ccca
2 changed files with 31 additions and 8 deletions

View File

@ -38,6 +38,7 @@ the corresponding topic.
\helpref{wxCHECK\_MSG}{wxcheckmsg}\\ \helpref{wxCHECK\_MSG}{wxcheckmsg}\\
\helpref{wxCHECK\_RET}{wxcheckret}\\ \helpref{wxCHECK\_RET}{wxcheckret}\\
\helpref{wxCHECK\_VERSION}{wxcheckversion}\\ \helpref{wxCHECK\_VERSION}{wxcheckversion}\\
\helpref{wxCHECK\_VERSION\_FULL}{wxcheckversionfull}\\
\helpref{wxCHECK\_W32API\_VERSION}{wxcheckw32apiversion}\\ \helpref{wxCHECK\_W32API\_VERSION}{wxcheckw32apiversion}\\
\helpref{wxClientDisplayRect}{wxclientdisplayrect}\\ \helpref{wxClientDisplayRect}{wxclientdisplayrect}\\
\helpref{wxClipboardOpen}{functionwxclipboardopen}\\ \helpref{wxClipboardOpen}{functionwxclipboardopen}\\
@ -253,6 +254,8 @@ The following constants are defined in wxWidgets:
\item {\tt wxMAJOR\_VERSION} is the major version of wxWidgets \item {\tt wxMAJOR\_VERSION} is the major version of wxWidgets
\item {\tt wxMINOR\_VERSION} is the minor version of wxWidgets \item {\tt wxMINOR\_VERSION} is the minor version of wxWidgets
\item {\tt wxRELEASE\_NUMBER} is the release number \item {\tt wxRELEASE\_NUMBER} is the release number
\item {\tt wxSUBRELEASE\_NUMBER} is the subrelease number which is $0$ for all
official releases
\end{itemize} \end{itemize}
For example, the values or these constants for wxWidgets 2.1.15 are 2, 1 and For example, the values or these constants for wxWidgets 2.1.15 are 2, 1 and
@ -263,11 +266,23 @@ the full wxWidgets version and {\tt wxVERSION\_NUMBER} is a combination of the
three version numbers above: for 2.1.15, it is 2115 and it is 2200 for three version numbers above: for 2.1.15, it is 2115 and it is 2200 for
wxWidgets 2.2. wxWidgets 2.2.
The subrelease number is only used for the sources in between official releases
and so normally is not useful.
\wxheading{Include files} \wxheading{Include files}
<wx/version.h> or <wx/defs.h> <wx/version.h> or <wx/defs.h>
\membersection{wxCHECK\_GCC\_VERSION}\label{wxcheckgccversion}
\func{bool}{wxCHECK\_GCC\_VERSION}{\param{}{major, minor, release}}
Returns $1$ if the compiler being used to compile the code is GNU C++
compiler (g++) version major.minor.release or greater. Otherwise, and also if
the compiler is not GNU C++ at all, returns $0$.
\membersection{wxCHECK\_VERSION}\label{wxcheckversion} \membersection{wxCHECK\_VERSION}\label{wxcheckversion}
\func{bool}{wxCHECK\_VERSION}{\param{}{major, minor, release}} \func{bool}{wxCHECK\_VERSION}{\param{}{major, minor, release}}
@ -291,13 +306,12 @@ the following can be done:
\end{verbatim} \end{verbatim}
\membersection{wxCHECK\_GCC\_VERSION}\label{wxcheckgccversion} \membersection{wxCHECK\_VERSION\_FULL}\label{wxcheckversionfull}
\func{bool}{wxCHECK\_GCC\_VERSION}{\param{}{major, minor, release}} \func{bool}{wxCHECK\_VERSION\_FULL}{\param{}{major, minor, release, subrel}}
Returns $1$ if the compiler being used to compile the code is GNU C++ Same as \helpref{wxCHECK\_VERSION}{wxcheckversion} but also checks that
compiler (g++) version major.minor.release or greater. Otherwise, and also if \texttt{wxSUBRELEASE\_NUMBER} is at least \arg{subrel}.
the compiler is not GNU C++ at all, returns $0$.
\membersection{wxCHECK\_W32API\_VERSION}\label{wxcheckw32apiversion} \membersection{wxCHECK\_W32API\_VERSION}\label{wxcheckw32apiversion}

View File

@ -19,9 +19,10 @@
/* NB: this file is parsed by Perl code in tmake templates in distrib/msw/tmake */ /* NB: this file is parsed by Perl code in tmake templates in distrib/msw/tmake */
/* so don't change its format too much or they could break */ /* so don't change its format too much or they could break */
#define wxMAJOR_VERSION 2 #define wxMAJOR_VERSION 2
#define wxMINOR_VERSION 5 #define wxMINOR_VERSION 5
#define wxRELEASE_NUMBER 2 #define wxRELEASE_NUMBER 2
#define wxSUBRELEASE_NUMBER 1
#define wxVERSION_STRING _T("wxWidgets 2.5.2") #define wxVERSION_STRING _T("wxWidgets 2.5.2")
/* nothing to update below this line when updating the version */ /* nothing to update below this line when updating the version */
@ -48,5 +49,13 @@
(wxMAJOR_VERSION == (major) && wxMINOR_VERSION > (minor)) || \ (wxMAJOR_VERSION == (major) && wxMINOR_VERSION > (minor)) || \
(wxMAJOR_VERSION == (major) && wxMINOR_VERSION == (minor) && wxRELEASE_NUMBER >= (release))) (wxMAJOR_VERSION == (major) && wxMINOR_VERSION == (minor) && wxRELEASE_NUMBER >= (release)))
/* the same but check the subrelease also */
#define wxCHECK_VERSION_FULL(major,minor,release,subrel) \
wxCHECK_VERSION(major, minor, release) && \
((major) != wxMAJOR_VERSION || \
(minor) != wxMINOR_VERSION || \
(release) != wxRELEASE_NUMBER || \
(subrel) >= wxSUBRELEASE_NUMBER)
#endif /* _WX_VERSION_H_ */ #endif /* _WX_VERSION_H_ */