On Fri, Oct 8, 2010 at 8:36 AM, narendra babu <[email protected]> wrote:
> One more input in need from you isĀ  as i mentioned i have solaris generated 
> big endian binary file and i need to read the same big endian file in Linux 
> which is little endian or on intel machine .
>
> So is there anyway i can read big endian file in linux and process it and 
> write the binary in big endian .

When you read the data into a struct, it will be read as big-endian
and you can write it back as is, so long as you don't want to
interpret the numbers. To interpret, you can use macros defined in
/usr/include/endian.h.


-- 
Siddhesh Poyarekar
http://siddhesh.in
_______________________________________________
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc

Reply via email to