unsigned char randbuf[41];
char *tempstore = NULL;
#ifndef _WIN32
- curl_struct_stat sb;
+ curlx_struct_stat sb;
#endif
int fd = -1;
char *dir = NULL;
return result;
}
-int curlx_win32_stat(const char *path, curl_struct_stat *buffer)
+int curlx_win32_stat(const char *path, curlx_struct_stat *buffer)
{
int result = -1;
TCHAR *fixed = NULL;
HANDLE hTemplateFile);
#endif /* !CURL_WINDOWS_UWP */
#define curlx_fstat _fstati64
-#define curl_struct_stat struct _stati64
+#define curlx_struct_stat struct _stati64
FILE *curlx_win32_fopen(const char *filename, const char *mode);
FILE *curlx_win32_freopen(const char *filename, const char *mode, FILE *fh);
-int curlx_win32_stat(const char *path, curl_struct_stat *buffer);
+int curlx_win32_stat(const char *path, curlx_struct_stat *buffer);
int curlx_win32_open(const char *filename, int oflag, ...);
int curlx_win32_rename(const char *oldpath, const char *newpath);
#define CURLX_FOPEN_LOW curlx_win32_fopen
#define curlx_rename curlx_win32_rename
#else
#define curlx_fstat fstat
-#define curl_struct_stat struct stat
+#define curlx_struct_stat struct stat
#define CURLX_FOPEN_LOW fopen
#define CURLX_FREOPEN_LOW freopen
#define CURLX_FDOPEN_LOW fdopen
CURLcode result = CURLE_OK;
char *xfer_ulbuf;
size_t xfer_ulblen;
- curl_struct_stat file_stat;
+ curlx_struct_stat file_stat;
const char *sendbuf;
bool eos = FALSE;
*/
struct FILEPROTO *file = Curl_meta_get(data, CURL_META_FILE_EASY);
CURLcode result = CURLE_OK;
- curl_struct_stat statbuf;
+ curlx_struct_stat statbuf;
curl_off_t expected_size = -1;
bool size_known;
bool fstated = FALSE;
* and CD/DVD images should be either a STREAM_LF format or a fixed format.
*
*/
-curl_off_t VmsRealFileSize(const char *name, const curl_struct_stat *stat_buf)
+curl_off_t VmsRealFileSize(const char *name, const curlx_struct_stat *stat_buf)
{
char buffer[8192];
curl_off_t count;
*
*/
static curl_off_t VmsSpecialSize(const char *name,
- const curl_struct_stat *stat_buf)
+ const curlx_struct_stat *stat_buf)
{
switch(stat_buf->st_fab_rfm) {
case FAB$C_VAR:
*/
static FILE *vmsfopenread(const char *file, const char *mode)
{
- curl_struct_stat statbuf;
+ curlx_struct_stat statbuf;
int result;
result = curlx_stat(file, &statbuf);
if(filename) {
char *base;
- curl_struct_stat sbuf;
+ curlx_struct_stat sbuf;
if(curlx_stat(filename, &sbuf))
result = CURLE_READ_ERROR;
/* To ponder about: should really the lib be messing about with the
HOME environment variable etc? */
char *home = curl_getenv("HOME");
- curl_struct_stat sbuf;
+ curlx_struct_stat sbuf;
/* If no private key file is specified, try some common paths. */
if(home) {
* to rename such files. */
char *p, *base, *buffer;
#ifdef MSDOS
- curl_struct_stat st_buf;
+ curlx_struct_stat st_buf;
#endif
size_t len, bufsize;
GetLastError());
}
#else
- curl_struct_stat statbuf;
+ curlx_struct_stat statbuf;
if(curlx_stat(filename, &statbuf) != -1) {
*stamp = (curl_off_t)statbuf.st_mtime;
rc = 0;
char *data = NULL;
curl_off_t size;
curl_off_t origin;
- curl_struct_stat sbuf;
+ curlx_struct_stat sbuf;
CURLX_SET_BINMODE(stdin);
origin = ftell(stdin);
const struct LongShort *a,
const char *filename)
{
- curl_struct_stat info;
+ curlx_struct_stat info;
if(curlx_stat(filename, &info)) {
errorf("The file '%s' provided to --%s does not exist",
filename, a->lname);
*
*/
static curl_off_t vms_realfilesize(const char *name,
- const curl_struct_stat *stat_buf)
+ const curlx_struct_stat *stat_buf)
{
char buffer[8192];
curl_off_t count;
*
*/
static curl_off_t VmsSpecialSize(const char *name,
- const curl_struct_stat *stat_buf)
+ const curlx_struct_stat *stat_buf)
{
switch(stat_buf->st_fab_rfm) {
case FAB$C_VAR:
static CURLcode pre_transfer(struct per_transfer *per)
{
curl_off_t uploadfilesize = -1;
- curl_struct_stat fileinfo;
+ curlx_struct_stat fileinfo;
CURLcode result = CURLE_OK;
if(per->uploadfile && !stdin_upload(per->uploadfile)) {
}
if(truncate && outs->bytes && outs->filename && outs->stream) {
- curl_struct_stat fileinfo;
+ curlx_struct_stat fileinfo;
/* The output can be a named pipe or a character device etc that
cannot be truncated. Only truncate regular files. */
errorf("curl: (%d) Failed writing body", result);
}
if(result && config->rm_partial) {
- curl_struct_stat st;
+ curlx_struct_stat st;
if(!curlx_stat(outs->filename, &st) && S_ISREG(st.st_mode)) {
if(!unlink(outs->filename))
notef("Removed output file: %s", outs->filename);
}
if(config->skip_existing) {
- curl_struct_stat fileinfo;
+ curlx_struct_stat fileinfo;
if(!curlx_stat(per->outfile, &fileinfo)) {
/* file is present */
notef("skips transfer, \"%s\" exists locally", per->outfile);
if(config->resume_from_current) {
/* We are told to continue from where we are now. Get the size
of the file as it is now and open it for append instead */
- curl_struct_stat fileinfo;
+ curlx_struct_stat fileinfo;
/* VMS -- Danger, the filesize is only valid for stream files */
if(curlx_stat(per->outfile, &fileinfo) == 0)
/* set offset to current file size: */
char errbuf[STRERROR_LEN];
FILE *hd_src;
int hd;
- curl_struct_stat file_info;
+ curlx_struct_stat file_info;
struct curl_slist *hl;
struct curl_slist *headerlist = NULL;
char errbuf[STRERROR_LEN];
FILE *hd_src = NULL;
int hd;
- curl_struct_stat file_info;
+ curlx_struct_stat file_info;
CURLM *multi = NULL;
int running;
char errbuf[STRERROR_LEN];
FILE *hd_src;
int hd;
- curl_struct_stat file_info;
+ curlx_struct_stat file_info;
if(!libtest_arg2) {
curl_mfprintf(stderr, "Usage: <url> <file-to-upload>\n");
char errbuf[STRERROR_LEN];
int sdp;
FILE *sdpf = NULL;
- curl_struct_stat file_info;
+ curlx_struct_stat file_info;
char *stream_uri = NULL;
int request = 1;
struct curl_slist *custom_headers = NULL;
char errbuf[STRERROR_LEN];
int params;
FILE *paramsf = NULL;
- curl_struct_stat file_info;
+ curlx_struct_stat file_info;
char *stream_uri = NULL;
int request = 1;
struct curl_slist *custom_headers = NULL;
char errbuf[STRERROR_LEN];
FILE *hd_src = NULL;
int hd;
- curl_struct_stat file_info;
+ curlx_struct_stat file_info;
CURLM *multi = NULL;
struct t582_ReadWriteSockets sockets = { { NULL, 0, 0 }, { NULL, 0, 0 } };
int success = 0;
curlx_strcopy(sau->sun_path, sizeof(sau->sun_path), unix_socket, len);
rc = bind(sock, (struct sockaddr *)sau, sizeof(struct sockaddr_un));
if(rc && SOCKERRNO == SOCKEADDRINUSE) {
- curl_struct_stat statbuf;
+ curlx_struct_stat statbuf;
/* socket already exists. Perhaps it is stale? */
curl_socket_t unixfd = socket(AF_UNIX, SOCK_STREAM, 0);
if(CURL_SOCKET_BAD == unixfd) {