|
Message
From: cvs at opencores.org<cvs@o...>
Date: Sun Sep 17 02:56:59 CEST 2006
Subject: [cvs-checkins] MODIFIED: mlite ...
Date: 00/06/09 17:02:56 Modified: mlite/tools convert.c Log: Support little endian MIPS code if -DLITTLE_ENDIAN Revision Changes Path 1.11 mlite/tools/convert.c http://www.opencores.org/cvsweb.shtml/mlite/tools/convert.c.diff?r1=1.10&r2=1.11 (In the diff below, changes in quantity of whitespace are not shown.) Index: convert.c =================================================================== RCS file: /cvsroot/rhoads/mlite/tools/convert.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -b -r1.10 -r1.11 --- convert.c 6 Mar 2006 01:55:09 -0000 1.10 +++ convert.c 17 Sep 2006 00:56:59 -0000 1.11 @@ -8,8 +8,13 @@ #define BUF_SIZE (1024*1024*4) /*Assumes running on PC little endian*/ +#ifndef LITTLE_ENDIAN #define ntohl(A) (((A)>>24)|(((A)&0x00ff0000)>>8)|(((A)&0xff00)<<8)|((A)<<24)) #define ntohs(A) (unsigned short)((((A)&0xff00)>>8)|((A)<<8)) +#else +#define ntohl(A) A +#define ntohs(A) A +#endif #define EI_NIDENT 16 #define SHT_PROGBITS 1
|