xref: /curl/docs/VERSIONS.md (revision 86d33001)
1<!--
2Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
3
4SPDX-License-Identifier: curl
5-->
6
7Version Numbers and Releases
8============================
9
10 Curl is not only curl. Curl is also libcurl. They are actually individually
11 versioned, but they usually follow each other closely.
12
13 The version numbering is always built up using the same system:
14
15        X.Y.Z
16
17  - X is main version number
18  - Y is release number
19  - Z is patch number
20
21## Bumping numbers
22
23 One of these numbers get bumped in each new release. The numbers to the right
24 of a bumped number are reset to zero.
25
26 The main version number is bumped when *really* big, world colliding changes
27 are made. The release number is bumped when changes are performed or
28 things/features are added. The patch number is bumped when the changes are
29 mere bugfixes.
30
31 It means that after release 1.2.3, we can release 2.0.0 if something really
32 big has been made, 1.3.0 if not that big changes were made or 1.2.4 if only
33 bugs were fixed.
34
35 Bumping, as in increasing the number with 1, is unconditionally only
36 affecting one of the numbers (except the ones to the right of it, that may be
37 set to zero). 1 becomes 2, 3 becomes 4, 9 becomes 10, 88 becomes 89 and 99
38 becomes 100. So, after 1.2.9 comes 1.2.10. After 3.99.3, 3.100.0 might come.
39
40 All original curl source release archives are named according to the libcurl
41 version (not according to the curl client version that, as said before, might
42 differ).
43
44 As a service to any application that might want to support new libcurl
45 features while still being able to build with older versions, all releases
46 have the libcurl version stored in the `curl/curlver.h` file using a static
47 numbering scheme that can be used for comparison. The version number is
48 defined as:
49
50```c
51#define LIBCURL_VERSION_NUM 0xXXYYZZ
52```
53
54 Where `XX`, `YY` and `ZZ` are the main version, release and patch numbers in
55 hexadecimal. All three number fields are always represented using two digits
56 (eight bits each). 1.2 would appear as "0x010200" while version 9.11.7
57 appears as `0x090b07`.
58
59 This 6-digit hexadecimal number is always a greater number in a more recent
60 release. It makes comparisons with greater than and less than work.
61
62 This number is also available as three separate defines:
63 `LIBCURL_VERSION_MAJOR`, `LIBCURL_VERSION_MINOR` and `LIBCURL_VERSION_PATCH`.
64