]> git.saurik.com Git - wxWidgets.git/blame - include/wx/version.h
Don't define __STRICT_ANSI__, we should build both with and without it.
[wxWidgets.git] / include / wx / version.h
CommitLineData
cdd8d745
VZ
1/*
2 * Name: wx/version.h
3 * Purpose: wxWidgets version numbers
4 * Author: Julian Smart
5 * Modified by: Ryan Norton (Converted to C)
6 * Created: 29/01/98
cdd8d745
VZ
7 * Copyright: (c) 1998 Julian Smart
8 * Licence: wxWindows licence
9 */
34cbe514
RN
10
11/* THIS IS A C FILE, DON'T USE C++ FEATURES (IN PARTICULAR COMMENTS) IN IT */
c801d85f 12
1fd4a033
VZ
13#ifndef _WX_VERSION_H_
14#define _WX_VERSION_H_
c801d85f 15
cdd8d745 16#include "wx/cpp.h" /* for wxSTRINGIZE */
386f7c47 17
34cbe514
RN
18/* the constants below must be changed with each new version */
19/* ---------------------------------------------------------------------------- */
c0589c62 20
151815eb
VZ
21/*
22 Don't forget to update WX_CURRENT, WX_REVISION and WX_AGE in
23 build/bakefiles/version.bkl and regenerate the makefiles when you change
24 this!
25 */
26
27/* NB: this file is parsed by automatic tools so don't change its format! */
eeade4cc 28#define wxMAJOR_VERSION 2
7fd3acaf 29#define wxMINOR_VERSION 9
14b682f7 30#define wxRELEASE_NUMBER 5
7fd3acaf 31#define wxSUBRELEASE_NUMBER 0
14b682f7 32#define wxVERSION_STRING wxT("wxWidgets 2.9.5")
1fd4a033 33
34cbe514
RN
34/* nothing to update below this line when updating the version */
35/* ---------------------------------------------------------------------------- */
c0589c62 36
67d124f6
MW
37/* Users can pre-define wxABI_VERSION to a lower value in their
38 * makefile/project settings to compile code that will be binary compatible
39 * with earlier versions of the ABI within the same minor version (between
40 * minor versions binary compatibility breaks anyway). The default is the
41 * version of wxWidgets being used. A single number with two decimal digits
42 * for each component, e.g. 20601 for 2.6.1 */
43#ifndef wxABI_VERSION
45a9a137 44#define wxABI_VERSION ( wxMAJOR_VERSION * 10000 + wxMINOR_VERSION * 100 + 99 )
67d124f6
MW
45#endif
46
34cbe514 47/* helpers for wxVERSION_NUM_XXX */
d70471fe
VZ
48#define wxMAKE_VERSION_STRING(x, y, z) \
49 wxSTRINGIZE(x) wxSTRINGIZE(y) wxSTRINGIZE(z)
50#define wxMAKE_VERSION_DOT_STRING(x, y, z) \
51 wxSTRINGIZE(x) "." wxSTRINGIZE(y) "." wxSTRINGIZE(z)
1fd4a033 52
860037d1
VZ
53#define wxMAKE_VERSION_STRING_T(x, y, z) \
54 wxSTRINGIZE_T(x) wxSTRINGIZE_T(y) wxSTRINGIZE_T(z)
55#define wxMAKE_VERSION_DOT_STRING_T(x, y, z) \
9a83f860 56 wxSTRINGIZE_T(x) wxT(".") wxSTRINGIZE_T(y) wxT(".") wxSTRINGIZE_T(z)
860037d1 57
34cbe514 58/* these are used by src/msw/version.rc and should always be ASCII, not Unicode */
c0589c62
VZ
59#define wxVERSION_NUM_STRING \
60 wxMAKE_VERSION_STRING(wxMAJOR_VERSION, wxMINOR_VERSION, wxRELEASE_NUMBER)
61#define wxVERSION_NUM_DOT_STRING \
62 wxMAKE_VERSION_DOT_STRING(wxMAJOR_VERSION, wxMINOR_VERSION, wxRELEASE_NUMBER)
860037d1
VZ
63
64/* those are Unicode-friendly */
65#define wxVERSION_NUM_STRING_T \
66 wxMAKE_VERSION_STRING_T(wxMAJOR_VERSION, wxMINOR_VERSION, wxRELEASE_NUMBER)
67#define wxVERSION_NUM_DOT_STRING_T \
68 wxMAKE_VERSION_DOT_STRING_T(wxMAJOR_VERSION, wxMINOR_VERSION, wxRELEASE_NUMBER)
1fd4a033 69
34cbe514 70/* some more defines, not really sure if they're [still] useful */
d0ee33f5 71#define wxVERSION_NUMBER ( (wxMAJOR_VERSION * 1000) + (wxMINOR_VERSION * 100) + wxRELEASE_NUMBER )
d5a07b9e 72#define wxBETA_NUMBER 0
d0ee33f5 73#define wxVERSION_FLOAT ( wxMAJOR_VERSION + (wxMINOR_VERSION/10.0) + (wxRELEASE_NUMBER/100.0) + (wxBETA_NUMBER/10000.0) )
c801d85f 74
34cbe514 75/* check if the current version is at least major.minor.release */
f6bcfd97
BP
76#define wxCHECK_VERSION(major,minor,release) \
77 (wxMAJOR_VERSION > (major) || \
78 (wxMAJOR_VERSION == (major) && wxMINOR_VERSION > (minor)) || \
79 (wxMAJOR_VERSION == (major) && wxMINOR_VERSION == (minor) && wxRELEASE_NUMBER >= (release)))
80
eeade4cc
VZ
81/* the same but check the subrelease also */
82#define wxCHECK_VERSION_FULL(major,minor,release,subrel) \
d0ee33f5 83 (wxCHECK_VERSION(major, minor, release) && \
eeade4cc
VZ
84 ((major) != wxMAJOR_VERSION || \
85 (minor) != wxMINOR_VERSION || \
86 (release) != wxRELEASE_NUMBER || \
d0ee33f5 87 (subrel) <= wxSUBRELEASE_NUMBER))
eeade4cc 88
34cbe514 89#endif /* _WX_VERSION_H_ */
1fd4a033 90