|
From: Steve C. <ste...@mq...> - 2001-03-30 01:39:31
|
The only thing stopping my application compiling now is a problem with stat in one file:
// find out the number of records in the file by stat'ing it and
// subtracting the size of the header
struct stat statbuff;
if( Tcl_Stat( filename, &statbuff ) != 0 ) {
free( In->File_Data );
SSFF_Close( In );
return 0;
}
track->file_num_rec = (statbuff.st_size In->Data_Seek_Pos)/In->One_Rec_Size;
track->file_end_time = track->file_start_time + track->file_num_rec*track->rate;
Note that originally this was a call to stat() but I replaced it with Tcl_Stat for the mac.
I've been through various troubles with stat eventually finding out that you can't include
<fcntl.h> anywhere as it gives a duplicate definition of stat.
When compiling this I get:
Error : illegal use of incomplete struct/union/class 'struct stat'
trackdata_ssff.cpp line 84 stat *statbuff = new stat;
Project: emu.¼, Target: Emu Shared Lib, Source File: trackdata_ssff.cpp
Error : illegal use of incomplete struct/union/class 'struct stat'
trackdata_ssff.cpp line 91 track->file_num_rec = (statbuff->st_size
- In->Data_Seek_Pos)/In->One_Rec_Size;
Project: emu.¼, Target: Emu Shared Lib, Source File: trackdata_ssff.cpp
I've no idea what this means or how to get rid of it. My next step is to try to use stat
in a small program but I wondered if anyone else had any insight that might help.
Steve
|