Ignore:
Timestamp:
10/22/13 10:24:02 (11 years ago)
Author:
lyard
Message:
Adapted compilation on older Gcc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mars/mcore/factofits.h

    r17264 r17304  
    88#ifndef FACTOFITS_H_
    99#define FACTOFITS_H_
     10
     11#define GCC_VERSION (__GNUC__ * 10000  + __GNUC_MINOR__ * 100  + __GNUC_PATCHLEVEL__)
    1012
    1113#include "zofits.h"
     
    235237            Checksum rawsum;
    236238            rawsum.add((char*)(fOffsetCalibration.data()), 1024*1440*sizeof(int16_t));
     239#if GCC_VERSION < 40603
     240            c.SetStr("RAWSUM", std::to_string((long long unsigned int)(rawsum.val())));
     241#else
    237242            c.SetStr("RAWSUM", std::to_string(rawsum.val()));
     243#endif
    238244
    239245            //compress data and calculate final, compressed size
     
    245251
    246252            //Write tile header
    247             FITS::TileHeader th;
     253            FITS::TileHeader th(0, 0);
    248254            std::vector<uint16_t> seq(1, FITS::kFactHuffman16);
    249255            FITS::Compression bh(seq, FITS::kOrderByRow);
     
    275281            c.SetFloat("ZRATIO", (float)(1024*1440*2)/(float)(compressed_size));
    276282            c.SetInt("PCOUNT", compressed_size + catalog_size);
     283
     284#if GCC_VERSION < 40603
     285            c.SetStr("DATASUM", std::to_string((long long unsigned int)(datasum.val())));
     286#else
    277287            c.SetStr("DATASUM", std::to_string(datasum.val()));
     288#endif
    278289
    279290            datasum += c.WriteHeader(*this);
Note: See TracChangeset for help on using the changeset viewer.