Opened 13 years ago

Closed 13 years ago

#426 closed defect (fixed)

FileUtil does not compile on Tiger

Reported by: Peter Owned by: Peter
Priority: major Milestone: yat 0.5
Component: build Version: trunk
Keywords: Cc:

Description

Error message:

FileUtil.cc: In member function 'int theplu::yat::utility::FileUtil::permissions(const std::string&) const':
FileUtil.cc:73: error: aggregate 'theplu::yat::utility::stat64 nodestat' has incomplete type and cannot be defined
FileUtil.cc:74: error: invalid use of undefined type 'struct theplu::yat::utility::stat64'
FileUtil.cc:73: error: forward declaration of 'struct theplu::yat::utility::stat64'
FileUtil.cc: In member function 'bool theplu::yat::utility::FileUtil::exists() const':
FileUtil.cc:89: error: aggregate 'theplu::yat::utility::stat64 statt' has incomplete type and cannot be defined
FileUtil.cc:90: error: invalid use of undefined type 'struct theplu::yat::utility::stat64'
FileUtil.cc:89: error: forward declaration of 'struct theplu::yat::utility::stat64'

Looks like related to ticket:378 so I guess this is an issue also in branch/stable-0.4 and perhaps it should be fixed there first.

Change History (8)

comment:1 Changed 13 years ago by Peter

Looks like one should not use stat64 directly (like we do), but use some flags to achieve the same effect but in a more portable way. It is still a bit unclear to me but these links seems useful

http://www.suse.de/~aj/linux_lfs.html

http://publib.boulder.ibm.com/iseries/v5r1/ic2924/index.htm?info/apis/stat64.htm

comment:2 Changed 13 years ago by Peter

(In [1446]) refs #426 make it compile on Tiger - but removed the Large File Support

comment:3 Changed 13 years ago by Jari Häkkinen

Isn't possible to solve with pre-processor macros? Check for something like

#if __mac_tiger_
  struct stat nodestat;
  stat(tryme.c_str(),&nodestat);
#else
  struct stat64 nodestat; 
  stat64(tryme.c_str(),&nodestat);
#endif

or similar while we are looking for a proper resolution of the issue?

comment:4 Changed 13 years ago by Peter

Yes that is my plan B. I hope there is a better solution, though.

Yesterday's modification was highly temporary.

comment:5 Changed 13 years ago by Peter

(In [1455]) refs #426 added a ac_macro that adds what is needed in config.h. I wanna test this on my Tiger before closing the ticket. Is it possible to test this without checking in a >2Gb file?

comment:6 Changed 13 years ago by Peter

Status: newassigned

Ok, that solution compiled on Tiger. Will try to see if we can add some kind of test...

comment:7 Changed 13 years ago by Peter

(In [1456]) adding test - refs #426

comment:8 Changed 13 years ago by Peter

Resolution: fixed
Status: assignedclosed

(In [1457]) fixes #426 - skipping test of LFS when configure option --disable-largefile is used.

Note: See TracTickets for help on using tickets.