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