/* Define if you have the strstr function. */
#define HAVE_STRSTR 1
+/* Define if you have the ftruncate function. */
+#define HAVE_FTRUNCATE 1
+
/* Define if you have the uname function. */
#define HAVE_UNAME 1
@echo $(DL)#define HAVE_ERR_H 1$(DL) >> $@
@echo $(DL)#define HAVE_FCNTL_H 1$(DL) >> $@
@echo $(DL)#define HAVE_FIONBIO 1$(DL) >> $@
+ @echo $(DL)#define HAVE_FTRUNCATE 1$(DL) >> $@
@echo $(DL)#define HAVE_GETHOSTBYADDR 1$(DL) >> $@
@echo $(DL)#define HAVE_GETTIMEOFDAY 1$(DL) >> $@
@echo $(DL)#define HAVE_INET_ADDR 1$(DL) >> $@
#define HAVE_TIME_H 1
#define TIME_WITH_SYS_TIME 1
#define HAVE_TERMIOS_H 1
+#define HAVE_FTRUNCATE 1
#define HAVE_PWD_H 1
#define HAVE_SETVBUF 1
#define HAVE_UTIME 1
+#define HAVE_FTRUNCATE 1
#define main(x,y) curl_main(x,y)
/* Define if you have the <fcntl.h> header file. */
#define HAVE_FCNTL_H
+/* Define if you have the `ftruncate' function. */
+#define HAVE_FTRUNCATE
+
/* Define if getaddrinfo exists and works */
#define HAVE_GETADDRINFO
/* Define if you have the <io.h> header file. */
#undef HAVE_IO_H
+/* Define if you have ftruncate() */
+#define HAVE_FTRUNCATE 1
+
/* Define if you have strdup() */
#define HAVE_STRDUP 1
/* Define if you have the <limits.h> header file */
#define HAVE_LIMITS_H 1
+/* Define if you have the ftruncate function. */
+#define HAVE_FTRUNCATE 1
+
/* Define if you have the strdup function. */
#define HAVE_STRDUP 1
" bytes\n", outs.bytes);
fflush(outs.stream);
/* truncate file at the position where we started appending */
+#ifdef HAVE_FTRUNCATE
ftruncate( fileno(outs.stream), outs.init);
+#endif
/* now seek to the end of the file, the position where we
just truncated the file */
- fseek(outs.stream, 0, SEEK_END);
+ fseek(outs.stream, outs.init, SEEK_SET);
outs.bytes = 0; /* clear for next round */
}
continue;