Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#17 Patch to compile on 64-bit Apple OSX

closed-fixed
nobody
None
5
2009-06-07
2009-03-18
Martin Otte
No

For some reason, on OSX 10.5 xdr_long actually takes an int instead of a long and xdr_u_long really takes an unsigned int when compiling for 64-bit. Here are the relevant lines from /usr/include/rpc/xdr.h:

#ifdef __LP64__
extern bool_t xdr_long(XDR *, int *);
extern bool_t xdr_u_long(XDR *, unsigned int *);
#else
extern bool_t xdr_long(XDR *, long *);
extern bool_t xdr_u_long(XDR *, unsigned long *);
#endif

I can only guess that they did this so that xdr_long and xdr_u_long take the same datasize whether compiling in 32-bit or 64-bit mode.

I include a patch here to slightly modify default_io.cpp to work around Apple's craziness and let gdl compile and run on 64-bit Apple Intel.

Discussion

  • Martin Otte
    Martin Otte
    2009-03-18

    patch for 64-bit Apple Intel

     
    • status: open --> closed-fixed
     
  • Thanks, it's in the CVS now.

    Sylwester