Opened 15 years ago
Closed 15 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 15 years ago by
comment:2 Changed 15 years ago by
comment:3 Changed 15 years ago by
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 15 years ago by
Yes that is my plan B. I hope there is a better solution, though.
Yesterday's modification was highly temporary.
comment:5 Changed 15 years ago by
comment:6 Changed 15 years ago by
Status: | new → assigned |
---|
Ok, that solution compiled on Tiger. Will try to see if we can add some kind of test...
comment:8 Changed 15 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Note: See
TracTickets for help on using
tickets.
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