cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: struct_stat

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Mon, 14 Feb 2011 13:27:28 -0800

On Mon, Feb 14, 2011 at 01:04:50PM -0800, Prashant R wrote:
> I am working on porting liburl for an embedded system that does not support
> unix stat function .
[...]
> I do not plan on using the functionality for using file data  . Any ideas on
> resolving this ? 

It looks like you could define something like:

#define struct_stat struct{int st_size;}
#define stat(a,b) (-1)

and be done with it. That will error out all stat calls, which looks harmless
in the snippet you showed. You'll have to make sure stat isn't used elsewhere
where it won't be so benign. This assumes you're simply trying to avoid
modifying the libcurl source directly.

>>> Dan
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-02-14