[PD-dev] PD_LONGINTTYPE

Christof Ressi christof.ressi at gmx.at
Wed Jun 20 03:12:26 CEST 2018


some more ideas:

<WinDef.h> defines INT_PTR (https://msdn.microsoft.com/en-us/library/windows/desktop/aa383751%28v=vs.85%29.aspx).

<stdint.h> defines intptr_t (the standard says it's optional, but is there actually a platform which doesn't provide it?)


> Gesendet: Mittwoch, 20. Juni 2018 um 02:51 Uhr
> Von: "Miller Puckette" <msp at ucsd.edu>
> An: "Christof Ressi" <christof.ressi at gmx.at>
> Cc: pd-dev <pd-dev at lists.iem.at>
> Betreff: Re: [PD-dev] PD_LONGINTTYPE
>
> I think m_pd.h should make a reasonable guess, in a way that makes it
> easy to override.  Perhaps like this:
> 
> #if !defined(PD_LONGINTTYPE)
> #if (sizeof(void *) > sizeof(long))
> #define PD_LONGINTTYPE long long
> #else
> #define PD_LONGINTTYPE long
> #endif
> #endif
> 
> There's a patch on github I haven't yet looked at closely - perhpas there's
> a better fix there.
> 
> cheers
> Miller
> 
> On Wed, Jun 20, 2018 at 02:36:04AM +0200, Christof Ressi wrote:
> > currently, we have to manually set PD_LONGINTTYPE to "long long" when compiling 64bit Pd for Windows (because on Windows "long" is always 32 bit, even in 64 bit programs). now my question:
> > 
> > should we fix this in the makefile or directly in m_pd.h?
> > 
> > _______________________________________________
> > Pd-dev mailing list
> > Pd-dev at lists.iem.at
> > https://lists.puredata.info/listinfo/pd-dev
> 



More information about the Pd-dev mailing list