mix Fortran/C code - Big and little endian issue

mix Fortran/C code - Big and little endian issue

Hi,

I have a legacy code essentially written in f77 running on Linux. It calls few C-routines for reading and writting data file. The input files have been created on an IRIX64 (bigendian) machine.

I use ifort and icc (both lastest version) for compiling.

The question is : how to tell the C compiler that my machine is little endian (Linux PC - Red hat) ??

for the fortran compiler I found to ways : either

* set the environnement variable : setenv F_UFMTENDIAN big
* or usinf the option ifort -convert big_endian.

Does anyone know how to proceed with the c-compiler ?

Thanks

1 post / 0 new
For more complete information about compiler optimizations, see our Optimization Notice.