[GRASS5] Re: [GRASSLIST:1899] ERROR in read/write portable short

Markus Neteler neteler at itc.it
Fri Nov 28 05:00:23 EST 2003


Hi Radim,

here darwin6.8 results:

[timonchiotwin:lib/vector/diglib] markus% otool -L OBJ.powerpc-apple-darwin6.8/test
OBJ.powerpc-apple-darwin6.8/test:
        /grass57exp/dist.powerpc-apple-darwin6.8/lib/libgrass_dig2.dylib (compatibility version 0.0.0, current version 0.0.0)
        /grass57exp/dist.powerpc-apple-darwin6.8/lib/libgrass_rtree.dylib (compatibility version 0.0.0, current version 0.0.0)
        /grass57exp/dist.powerpc-apple-darwin6.8/lib/libgrass_gis.dylib (compatibility version 0.0.0, current version 0.0.0)
        /grass57exp/dist.powerpc-apple-darwin6.8/lib/libgrass_datetime.dylib (compatibility version 0.0.0, current version 0.0.0)
        /sw/lib/libintl.1.dylib (compatibility version 2.0.0, current version 2.1.0)
        /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.0.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 71.0.0)

OBJ.powerpc-apple-darwin6.8/test
ERROR in read/write portable short, byte_order = 0
  Written: -32768
  Read   : 0
ERROR in read/write portable short, byte_order = 0
  Written: -12345
  Read   : -57
ERROR in read/write portable short, byte_order = 0
  Written: 12345
  Read   : 57
ERROR in read/write portable short, byte_order = 0
  Written: 32767
  Read   : -1

Find attached portable.h and test.tmp.gz

Markus
-------------- next part --------------
/* Architecture: powerpc-apple-darwin6.8 */

/* Native machine sizes */
#define NATIVE_DOUBLE 8
#define NATIVE_FLOAT  4
#define NATIVE_LONG   4
#define NATIVE_INT    4
#define NATIVE_SHORT  2
#define NATIVE_CHAR   1

/* Native machine byte orders */
#define DOUBLE_ORDER 1
#define FLOAT_ORDER  1
#define LONG_ORDER   1
#define INT_ORDER    1
#define SHORT_ORDER  1


/* Translation matrices from big endian to native */

/* Double format: */
static int dbl_cnvrt[] = {0, 1, 2, 3, 4, 5, 6, 7};

/* Float format : */
static int flt_cnvrt[] = {0, 1, 2, 3};

/* Long format  : */
static int lng_cnvrt[] = {0, 1, 2, 3};

/* Int format  : */
static int int_cnvrt[] = {0, 1, 2, 3};

/* Short format : */
static int shrt_cnvrt[] = {0, 1};

-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.tmp.gz
Type: application/x-gzip
Size: 305 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/grass-dev/attachments/20031128/ee275f7d/test.tmp.gz


More information about the grass-dev mailing list