comparison src/if_perl.xs @ 9171:20e7b99c33d4 v7.4.1869

commit https://github.com/vim/vim/commit/cf190c6f017563de1bdbf854b3376522b8b2748f Author: Bram Moolenaar <Bram@vim.org> Date: Thu Jun 2 11:54:06 2016 +0200 patch 7.4.1869 Problem: Can't build with old version of Perl. Solution: Define PERLIO_FUNCS_DECL. (Tom G. Christensen)
author Christian Brabandt <cb@256bit.org>
date Thu, 02 Jun 2016 12:00:06 +0200
parents 6b003ff07234
children ee0564e3257d
comparison
equal deleted inserted replaced
9170:7cae03af1bb4 9171:20e7b99c33d4
57 #include <EXTERN.h> 57 #include <EXTERN.h>
58 #include <perl.h> 58 #include <perl.h>
59 #include <XSUB.h> 59 #include <XSUB.h>
60 #if defined(PERLIO_LAYERS) && !defined(USE_SFIO) 60 #if defined(PERLIO_LAYERS) && !defined(USE_SFIO)
61 # include <perliol.h> 61 # include <perliol.h>
62 #endif
63
64 /* Workaround for perl < 5.8.7 */
65 #ifndef PERLIO_FUNCS_DECL
66 # ifdef PERLIO_FUNCS_CONST
67 # define PERLIO_FUNCS_DECL(funcs) const PerlIO_funcs funcs
68 # define PERLIO_FUNCS_CAST(funcs) (PerlIO_funcs*)(funcs)
69 # else
70 # define PERLIO_FUNCS_DECL(funcs) PerlIO_funcs funcs
71 # define PERLIO_FUNCS_CAST(funcs) (funcs)
72 # endif
62 #endif 73 #endif
63 74
64 /* 75 /*
65 * Work around clashes between Perl and Vim namespace. proto.h doesn't 76 * Work around clashes between Perl and Vim namespace. proto.h doesn't
66 * include if_perl.pro and perlsfio.pro when IN_PERL_FILE is defined, because 77 * include if_perl.pro and perlsfio.pro when IN_PERL_FILE is defined, because