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:
parent
7e06588478
commit
eeade4ccca
@ -38,6 +38,7 @@ the corresponding topic.
|
||||
\helpref{wxCHECK\_MSG}{wxcheckmsg}\\
|
||||
\helpref{wxCHECK\_RET}{wxcheckret}\\
|
||||
\helpref{wxCHECK\_VERSION}{wxcheckversion}\\
|
||||
\helpref{wxCHECK\_VERSION\_FULL}{wxcheckversionfull}\\
|
||||
\helpref{wxCHECK\_W32API\_VERSION}{wxcheckw32apiversion}\\
|
||||
\helpref{wxClientDisplayRect}{wxclientdisplayrect}\\
|
||||
\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 wxMINOR\_VERSION} is the minor version of wxWidgets
|
||||
\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}
|
||||
|
||||
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
|
||||
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}
|
||||
|
||||
<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}
|
||||
|
||||
\func{bool}{wxCHECK\_VERSION}{\param{}{major, minor, release}}
|
||||
@ -291,13 +306,12 @@ the following can be done:
|
||||
\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++
|
||||
compiler (g++) version major.minor.release or greater. Otherwise, and also if
|
||||
the compiler is not GNU C++ at all, returns $0$.
|
||||
Same as \helpref{wxCHECK\_VERSION}{wxcheckversion} but also checks that
|
||||
\texttt{wxSUBRELEASE\_NUMBER} is at least \arg{subrel}.
|
||||
|
||||
|
||||
\membersection{wxCHECK\_W32API\_VERSION}\label{wxcheckw32apiversion}
|
||||
|
@ -19,9 +19,10 @@
|
||||
|
||||
/* 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 */
|
||||
#define wxMAJOR_VERSION 2
|
||||
#define wxMINOR_VERSION 5
|
||||
#define wxRELEASE_NUMBER 2
|
||||
#define wxMAJOR_VERSION 2
|
||||
#define wxMINOR_VERSION 5
|
||||
#define wxRELEASE_NUMBER 2
|
||||
#define wxSUBRELEASE_NUMBER 1
|
||||
#define wxVERSION_STRING _T("wxWidgets 2.5.2")
|
||||
|
||||
/* 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) && 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_ */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user