develooper Front page | perl.perl6.internals | Postings from February 2002

Re: [PATCH] make core_ops_prederef.c compile with MS c++

Thread Previous
From:
Josh Wilmes
Date:
February 17, 2002 19:14
Subject:
Re: [PATCH] make core_ops_prederef.c compile with MS c++
Message ID:
200202180314.VAA11165@sky.net

Daniel,

I've actually got something equivalent for the inline portion of your 
patch in the patch I just sent to the list.

As far as the ssize_t part, yeah, this probably belongs in config.h_in or 
parrot.h or something.

--Josh

At 0:30 on 02/18/2002 +0100, "Ritz Daniel" <daniel_ritz@gmx.ch> wrote:

> this is a quick fix for CPrederef.pm to make to generated code compile with t
he MS compiler.
> 
> fixes:
> - ms compiler allows inline only for c++, for c there's __inline
> - ms header files knows nothing about ssize_t
> 
> may be this should go into parrot.h??
> 
> 
> 
> Index: CPrederef.pm
> ===================================================================
> RCS file: /cvs/public/parrot/lib/Parrot/OpTrans/CPrederef.pm,v
> retrieving revision 1.7
> diff -u -r1.7 CPrederef.pm
> --- CPrederef.pm 16 Feb 2002 04:38:18 -0000 1.7
> +++ CPrederef.pm 17 Feb 2002 23:11:52 -0000
> @@ -25,6 +25,11 @@
>  #define REL_PC ((size_t)(cur_opcode - interpreter->prederef_code))
>  #define CUR_OPCODE (interpreter->code->byte_code + REL_PC)
>  
> +#ifdef _MSC_VER
> +#define inline __inline
> +typedef int ssize_t;
> +#endif
> +
>  static inline opcode_t* prederef_to_opcode(struct Parrot_Interp* interpreter
,
>                                             void** prederef_addr)
>  {
> 



Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About