Quantcast
Channel: Tools
Viewing all articles
Browse latest Browse all 91781

Forum Post: stat( ) function or equivalent in CCS v3.3

$
0
0

Hi

I am compiling an image compression code on the DSK6713. The code is originally written in C for windows. I am porting the code on the DSP. a large part of code is compatible with standard C and DSP CCS. I am using CCS V3.3. but i am stuck at one part where the code has following include file:

#include <sys/stat.h>

the ccs gives the error : could not open <sys/stat.h>

now the inside of code I have a stat structure and a function stat( ).

basically these are windows C library functions.

the function stat is used to examine the attributes of files. They return the attribute information in a struct stat object. 

function is declared in the header file sys/stat.h.

 int stat (const char *filename, struct stat *buf)
Now here is the listing of a portion of my code where the problem arises:

struct stat status;
int res;

res = stat(PtrStructCodingPara->InputFile, &status);
if (res != 0)
{
return (-1);
}
img_len = status.st_size;

we can clearly see that there is a stat( ) function call and the returning structure is stored in the stat structure named status here.

So can somebody help me how can i implement these windows library functions and structures on DSK6713 in CCS v3.3. these windows header files when included in CCS contain a series of other header files and give error for WIN_32 target only.

i shall be very thankful to you if you tell me a way around.


Viewing all articles
Browse latest Browse all 91781

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>