Re: [gtk-list] Re: OT: size_t and 64 bits



>    This complication makes me think I should define everything in my main
>  header file so it's easy to change globally if I'm wrong:
>  
>  #define int32 long
>  #define int64 long long int

You can use the glib macros, gint32, gint64, etc., while being careful
that the 64-bit types are actually defined.

>  /*  "sysint" would therefore be the scalable type, defined by whatever
>  the system bus size is. Not exactly like the clumsy code below, but you
>  get the idea... */
>  #ifdef INTEL
>  #define sysint int32
>  #endif
>  #ifdef SGI
>  #define sysint int64
>  #endif

This is misleading, since the system "int" size is not what you want
it to be.  If you want the system int size, use plain int or gint.  If
you want to specify sizes, use size_t.

<pedant>
It is not the system bus size, either; consider the 386sx.  I guess
you don't care about those boxes :-)
</pedant>

  Federico



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]