This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
die_unwind(): global destruction
[perl5.git] / patchlevel.h
CommitLineData
d6376244
JH
1/* patchlevel.h
2 *
eb3b8c7b
NC
3 * Copyright (C) 1993, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
4 * 2003, 2004, 2005, 2006, 2007, 2008, 2009, by Larry Wall and others
d6376244
JH
5 *
6 * You may distribute under the terms of either the GNU General Public
7 * License or the Artistic License, as specified in the README file.
8 *
9 */
10
8971fdd9
KW
11/*
12=head1 Handy Values
13
14=for apidoc AmDnU|U8|PERL_REVISION
15The major number component of the perl interpreter currently being compiled or
16executing. This has been C<5> from 1993 into 2020.
17
18Instead use one of the version comparison macros. See C<L</PERL_VERSION_EQ>>.
19
20=for apidoc AmDnU|U8|PERL_VERSION
21The minor number component of the perl interpreter currently being compiled or
22executing. Between 1993 into 2020, this has ranged from 0 to 33.
23
24Instead use one of the version comparison macros. See C<L</PERL_VERSION_EQ>>.
25
26=for apidoc AmDnU|U8|PERL_SUBVERSION
27The micro number component of the perl interpreter currently being compiled or
28executing. In stable releases this gives the dot release number for
29maintenance updates. In development releases this gives a tag for a snapshot
30of the status at various points in the development cycle.
31
32Instead use one of the version comparison macros. See C<L</PERL_VERSION_EQ>>.
33
34=cut
35*/
36
f7d144c8 37#ifndef __PATCHLEVEL_H_INCLUDED__
4d8076ea 38
a9fb271f
GS
39/* do not adjust the whitespace! Configure expects the numbers to be
40 * exactly on the third column */
41
42#define PERL_REVISION 5 /* age */
f69f4f3b 43#define PERL_VERSION 33 /* epoch */
331e27a1 44#define PERL_SUBVERSION 2 /* generation */
4d8076ea 45
273cf8d1
GS
46/* The following numbers describe the earliest compatible version of
47 Perl ("compatibility" here being defined as sufficient binary/API
48 compatibility to run XS code built with the older version).
75347591 49 Normally this should not change across maintenance releases.
75347591 50
ea3df0f8
GS
51 Note that this only refers to an out-of-the-box build. Many non-default
52 options such as usemultiplicity tend to break binary compatibility
53 more often.
54
52c1368c 55 This is used by Configure et al to figure out
ff935051
JH
56 PERL_INC_VERSION_LIST, which lists version libraries
57 to include in @INC. See INSTALL for how this works.
52c1368c
FR
58
59 Porting/bump-perl-version will automatically set these to the version of perl
60 to be released for blead releases, and to 5.X.0 for maint releases. Manually
61 changing them should not be necessary.
75347591 62*/
52c1368c 63#define PERL_API_REVISION 5
f69f4f3b 64#define PERL_API_VERSION 33
331e27a1 65#define PERL_API_SUBVERSION 2
ff935051
JH
66/*
67 XXX Note: The selection of non-default Configure options, such
68 as -Duselonglong may invalidate these settings. Currently, Configure
69 does not adequately test for this. A.D. Jan 13, 2000
70*/
75347591 71
e3321bb0
GS
72#define __PATCHLEVEL_H_INCLUDED__
73#endif
74
7f0a50ff 75/*
76 local_patches -- list of locally applied less-than-subversion patches.
77 If you're distributing such a patch, please give it a name and a
78 one-line description, placed just before the last NULL in the array
79 below. If your patch fixes a bug in the perlbug database, please
80 mention the bugid. If your patch *IS* dependent on a prior patch,
81 please place your applied patch line after its dependencies. This
82 will help tracking of patch dependencies.
83
2c9b9644 84 Please either use 'diff --unified=0' if your diff supports
22adf171
A
85 that or edit the hunk of the diff output which adds your patch
86 to this list, to remove context lines which would give patch
87 problems. For instance, if the original context diff is
88
7f0a50ff 89 *** patchlevel.h.orig <date here>
90 --- patchlevel.h <date here>
91 *** 38,43 ***
92 --- 38,44 ---
93 ,"FOO1235 - some patch"
94 ,"BAR3141 - another patch"
95 ,"BAZ2718 - and another patch"
96 + ,"MINE001 - my new patch"
97 ,NULL
98 };
52c1368c
FR
99
100 please change it to
7f0a50ff 101 *** patchlevel.h.orig <date here>
102 --- patchlevel.h <date here>
103 *** 41,43 ***
104 --- 41,44 ---
105 + ,"MINE001 - my new patch"
2c9b9644 106 ,NULL
7f0a50ff 107 };
52c1368c 108
7f0a50ff 109 (Note changes to line numbers as well as removal of context lines.)
110 This will prevent patch from choking if someone has previously
111 applied different patches than you.
f7047380
A
112
113 History has shown that nobody distributes patches that also
114 modify patchlevel.h. Do it yourself. The following perl
115 program can be used to add a comment to patchlevel.h:
116
117#!perl
118die "Usage: perl -x patchlevel.h comment ..." unless @ARGV;
1ae6ead9
JL
119open PLIN, "<", "patchlevel.h" or die "Couldn't open patchlevel.h : $!";
120open PLOUT, ">", "patchlevel.new" or die "Couldn't write on patchlevel.new : $!";
f7047380
A
121my $seen=0;
122while (<PLIN>) {
123 if (/\t,NULL/ and $seen) {
124 while (my $c = shift @ARGV){
321e50c7
GA
125 $c =~ s|\\|\\\\|g;
126 $c =~ s|"|\\"|g;
f7047380
A
127 print PLOUT qq{\t,"$c"\n};
128 }
129 }
130 $seen++ if /local_patches\[\]/;
131 print PLOUT;
132}
22adf171
A
133close PLOUT or die "Couldn't close filehandle writing to patchlevel.new : $!";
134close PLIN or die "Couldn't close filehandle reading from patchlevel.h : $!";
538f996c 135close DATA; # needed to allow unlink to work win32.
f7047380
A
136unlink "patchlevel.bak" or warn "Couldn't unlink patchlevel.bak : $!"
137 if -e "patchlevel.bak";
138rename "patchlevel.h", "patchlevel.bak" or
139 die "Couldn't rename patchlevel.h to patchlevel.bak : $!";
140rename "patchlevel.new", "patchlevel.h" or
141 die "Couldn't rename patchlevel.new to patchlevel.h : $!";
142__END__
143
22adf171
A
144Please keep empty lines below so that context diffs of this file do
145not ever collect the lines belonging to local_patches() into the same
146hunk.
f7047380 147
7f0a50ff 148 */
f7047380 149
e3321bb0 150#if !defined(PERL_PATCHLEVEL_H_IMPLICIT) && !defined(LOCAL_PATCH_COUNT)
486cd780
NC
151# if defined(PERL_IS_MINIPERL)
152# define PERL_PATCHNUM "UNKNOWN-miniperl"
486cd780 153# define PERL_GIT_UNPUSHED_COMMITS /*leave-this-comment*/
ec47230b
NC
154# elif defined(PERL_MICRO)
155# define PERL_PATCHNUM "UNKNOWN-microperl"
ec47230b 156# define PERL_GIT_UNPUSHED_COMMITS /*leave-this-comment*/
486cd780 157# else
dcff826f 158#include "git_version.h"
486cd780 159# endif
27da23d5 160static const char * const local_patches[] = {
3255d14b 161 NULL
691ce773
GA
162#ifdef PERL_GIT_UNCOMMITTED_CHANGES
163 ,"uncommitted-changes"
164#endif
eb5c076f 165 PERL_GIT_UNPUSHED_COMMITS /* do not remove this line */
3255d14b 166 ,NULL
7f0a50ff 167};
168
22adf171
A
169
170
b33f1439 171/* Initial space prevents this variable from being inserted in config.sh */
172# define LOCAL_PATCH_COUNT \
c3caa5c3 173 ((int)(C_ARRAY_LENGTH(local_patches)-2))
f7d144c8 174
cceca5ed 175/* the old terms of reference, add them only when explicitly included */
cceca5ed
GS
176#define PATCHLEVEL PERL_VERSION
177#undef SUBVERSION /* OS/390 has a SUBVERSION in a system header */
178#define SUBVERSION PERL_SUBVERSION
179#endif