FreeBSD ports system.
- Mike Revi discovered some swapped speed switches documented in the curl man
page.
-- Checked in some grammatical and minor other fixes in the documentation and
- examples that I found in the FreeBSD ports system.
+- Checked in some documentation and code improvements and fixes that I
+ discovered in the FreeBSD ports system.
Daniel Stenberg (8 Sep 2008)
- Dmitry Kurochkin patched a problem: I have found bug in pipelining through
m4_ifdef([AC_LIBTOOL_F77], [m4_undefine([AC_LIBTOOL_F77])])
m4_defun([AC_LIBTOOL_F77],[])
-dnl force libtool to build static libraries with PIC on AMD64-linux
-AC_MSG_CHECKING([if arch-OS host is AMD64-linux (to build static libraries with PIC)])
+dnl force libtool to build static libraries with PIC on AMD64-Linux & FreeBSD
+AC_MSG_CHECKING([if arch-OS host is AMD64-Linux/FreeBSD (to build static libraries with PIC)])
case $host in
- x86_64*linux*)
+ x86_64*linux*|amd64*freebsd*|ia64*freebsd*)
AC_MSG_RESULT([yes])
with_pic=yes
;;
case $host in
#
- x86_64*linux*)
+ x86_64*linux*|amd64*freebsd*|ia64*freebsd*)
#
dnl find out if icc is being used
if test "z$ICC" = "z"; then
/* treat the negative resume offset value as the case of "-" */
if(data->state.resume_from < 0) {
- if(stat(file->path, &file_stat)) {
+ if(fstat(fileno(fp), &file_stat)) {
fclose(fp);
failf(data, "Can't get the size of %s", file->path);
return CURLE_WRITE_ERROR;
{
(void) k1_len; (void) k2_len;
- return ((*((int* ) k1)) == (*((int* ) k2))) ? 1 : 0;
+ return (*((int* ) k1)) == (*((int* ) k2));
}
static size_t hash_fd(void* key, size_t key_length, size_t slots_num)
*/
infd= open(uploadfile, O_RDONLY | O_BINARY);
- if ((infd == -1) || stat(uploadfile, &fileinfo)) {
+ if ((infd == -1) || fstat(infd, &fileinfo)) {
helpf(config->errors, "Can't open '%s'!\n", uploadfile);
if(infd != -1)
close(infd);
char fname[PATH_MAX];
strncpy(fname, file_name, PATH_MAX-1);
- fname[PATH_MAX-2] = 0; /* Leave room for an extra _ */
+ fname[PATH_MAX-1] = 0;
base = basename (fname);
if (((stat(base, &st_buf)) == 0) && (S_ISCHR(st_buf.st_mode))) {
size_t blen = strlen (base);
+ if (strlen(fname) >= PATH_MAX-1) {
+ /* Make room for the '_' */
+ blen--;
+ base[blen] = 0;
+ }
/* Prepend a '_'. */
memmove (base + 1, base, blen + 1);
base[0] = '_';