Ignore:
Timestamp:
Sep 12, 2003, 11:47:00 AM (22 years ago)
Author:
ansari
Message:

Portage sous MacOSX 10.2 - g++ 3.1 (Pb avec classe SophyaInitiator statique, lecture last byte ds istream) , Reza 12/09/2003

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaLib/BaseTools/ppersist.cc

    r2322 r2430  
    478478
    479479  // Find tag entries at end of file
    480 #if (defined(Linux) || defined(Darwin)) &&  defined(__GNUG__) && (__GNUC__ < 3)
     480  // if (defined(Linux) || defined(Darwin)) &&  defined(__GNUG__) && (__GNUC__ < 3)
     481#if defined(__GNUG__) && (__GNUC__ < 3)
    481482  // There seems to be a bug where seekg with ios::end under Linux  with g++
     483  // prior to version gcc 3.1
     484  // The bug seems to be there also with Darwin/MacOSX
    482485  // So, we use seek with ios::beg
    483   // The bug seems to be there also with Darwin/MacOSX
    484486  s->seekg(0, ios::end);
    485487  int_8 tagpos = s->tellg() - (sizeof(int_8)+1);
     
    495497  int_8 pos;
    496498  GetRawI8(pos);
     499#if defined(Darwin)
     500  // Septembre 2003 - Reza : Pb avec MacOSX 10.2
     501  // Sur MacOSX (10.2, g++ 3.1), la lecture du dernier byte du flot cause
     502  // une erreur, et le flot ne se repositionne plus
     503  // On ferme le flot et on le rouvre ...
     504  delete s;
     505  s = new ifstream(FileName().c_str(), ios::in | IOS_BIN);
     506#endif
    497507  if (pos < 0) {  // no tags
    498508    s->seekg(debut);
Note: See TracChangeset for help on using the changeset viewer.