| 1 | Patch-Source: https://salsa.debian.org/debian/libapreq2/-/blob/debian/2.17-7/debian/patches/32-bit-build.patch
|
| 2 | --
|
| 3 | Description: fix type mismatch of MGVTBL.svt_copy namelen argument
|
| 4 | Since Perl 5.12, the type of the namelen argument of the svt_copy member of
|
| 5 | MGVTBL struct has changed its type from `int` to `I32`.
|
| 6 | .
|
| 7 | Perl commit:
|
| 8 | https://github.com/Perl/perl5/commit/3468c7eaa8d7687e8ae89928492b408a4d6c752f
|
| 9 | .
|
| 10 | On 64-bit platforms `int` and `I32` are both 32-bit integers, but on 32-bit
|
| 11 | platforms I32 is `long int` and a simple `int` is 16-bit.
|
| 12 | Author: Damyan Ivanov <[email protected]>
|
| 13 | Forwarded: https://bz.apache.org/bugzilla/show_bug.cgi?id=69346
|
| 14 |
|
| 15 | |
| 16 | |
| 17 | @@ -24,6 +24,11 @@
|
| 18 |
|
| 19 | /**************************************************/
|
| 20 |
|
| 21 | +#if (PERL_VERSION >= 12)
|
| 22 | +#define MG_COPY_NAMELEN I32
|
| 23 | +#else
|
| 24 | +#define MG_COPY_NAMELEN int
|
| 25 | +#endif
|
| 26 |
|
| 27 | #if (PERL_VERSION >= 8) /* MAGIC ITERATOR REQUIRES 5.8 */
|
| 28 |
|
| 29 | @@ -42,7 +47,7 @@
|
| 30 | */
|
| 31 |
|
| 32 | static int apreq_xs_cookie_table_magic_copy(pTHX_ SV *sv, MAGIC *mg, SV *nsv,
|
| 33 | - const char *name, int namelen)
|
| 34 | + const char *name, MG_COPY_NAMELEN namelen)
|
| 35 | {
|
| 36 | /* Prefetch the value whenever the table iterator is > 0 */
|
| 37 | MAGIC *tie_magic = mg_find(nsv, PERL_MAGIC_tiedelem);
|
| 38 | @@ -151,7 +156,7 @@ static int apreq_xs_cookie_table_values(
|
| 39 | */
|
| 40 |
|
| 41 | static int apreq_xs_param_table_magic_copy(pTHX_ SV *sv, MAGIC *mg, SV *nsv,
|
| 42 | - const char *name, int namelen)
|
| 43 | + const char *name, MG_COPY_NAMELEN namelen)
|
| 44 | {
|
| 45 | /* Prefetch the value whenever the table iterator is > 0 */
|
| 46 | MAGIC *tie_magic = mg_find(nsv, PERL_MAGIC_tiedelem);
|