Ticket #8670: patch-machine.h.diff

File patch-machine.h.diff, 1.0 KB (added by cssdev@…, 19 years ago)

Patch machine.h

  • lib/database/include/machine.h

    old new  
    157157
    158158#ifdef __APPLE__
    159159
     160#ifdef __LITTLE_ENDIAN__
     161#define MACHINE_WORD_FORMAT     DGL_LITTLE_ENDIAN
     162#define MACHINE_FLOAT_FORMAT    DGL_NON_IEEE
     163#else /* __LITTLE_ENDIAN */
    160164#define MACHINE_WORD_FORMAT     DGL_BIG_ENDIAN
    161165#define MACHINE_FLOAT_FORMAT    DGL_BIG_IEEE
     166#endif /* __LITTLE_ENDIAN */
    162167
    163168#endif /* __APPLE__ */
    164169
     
    321326 */
    322327
    323328#if MACHINE_FLOAT_FORMAT == DGL_NON_IEEE
    324 #if __i386__ || __ia64__
     329#if __i386__ || __ia64__ || (__APPLE__ && __LITTLE_ENDIAN__)
    325330void mem_hton_float(float *t, float *f);
    326331void mem_ntoh_float(float *t, float *f);
    327332void mem_hton_double(double *t, double *f);
    328333void mem_ntoh_double(double *t, double *f);
    329 #endif /* __i386__ || __ia64__ */
     334#endif /* __i386__ || __ia64__ || (__APPLE__ && __LITTLE_ENDIAN__) */
    330335#define DGL_HTON_FLOAT(t,f) mem_hton_float(&t,&f)
    331336#define DGL_NTOH_FLOAT(t,f) mem_ntoh_float(&t,&f)
    332337#define DGL_HTON_DOUBLE(t,f) mem_hton_double(&t,&f)