34 #include <sys/types.h> 39 #if LIBCURL_VERSION_NUM < 0x070c03 40 #error "upgrade your libcurl to no less than 7.12.3" 57 int *fdp = (
int *)userp;
65 if(-1 == lseek(fd, 0, SEEK_SET))
83 int *fdp = (
int *)stream;
86 retcode = read(fd, ptr, size * nmemb);
91 " bytes from file\n", nread);
96 int main(
int argc,
char **argv)
101 struct stat file_info;
113 hd = open(file, O_RDONLY);
114 fstat(hd, &file_info);
158 fprintf(stderr,
"curl_easy_perform() failed: %s\n",
int stat(const char *path, struct stat *buffer)
UNITTEST_START char * ptr
#define curl_easy_setopt(handle, option, value)
CURL_EXTERN CURL * curl_easy_init(void)
CURL_EXTERN void curl_easy_cleanup(CURL *curl)
CURL_TYPEOF_CURL_OFF_T curl_off_t
int main(int argc, char **argv)
CURL_EXTERN CURLcode curl_global_init(long flags)
curl_global_init() globally initializes curl given a bitwise set of the different features of what to...
static curlioerr my_ioctl(CURL *handle, curliocmd cmd, void *userp)
static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *stream)
CURL_EXTERN void curl_global_cleanup(void)
curl_global_cleanup() globally cleanups curl, uses the value of "init_flags" to determine what needs ...
CURL_EXTERN const char * curl_easy_strerror(CURLcode)
CURL_EXTERN CURLcode curl_easy_perform(CURL *curl)
#define CURL_FORMAT_CURL_OFF_T