Ticket #123 (closed defect: fixed)

Opened 6 years ago

Last modified 6 years ago

posix_fallocate is not detected by configure

Reported by: anonymous Owned by: rakshasa
Priority: normal Component: libtorrent
Version: HEAD Severity: normal
Keywords: Cc:

Description

when I specify these options "--with-fallocate --with-posix-fallocate" (don't which one is the good option) on the configure command line, posix_fallocate is never detected. Also when no option is specify. I"ve made the test using a debian sarge on x86-64 and glibc-2.3.2.ds1-22.

... checking for epoll support... yes checking for pkg-config... /usr/bin/pkg-config checking for openssl... yes ...

A quick dirty patch, is too change the file scripts/checks.m4

--- scripts/checks.m4   2005-12-31 16:51:54.000000000 +0100
+++ scripts/checks.m4.orig      2005-12-31 16:51:46.000000000 +0100
@@ -176,7 +176,7 @@
   AC_ARG_WITH(posix-fallocate,
     [  --with-fallocate        Check for posix_fallocate],
     [
-      if test "$withval" = "yes"; then
+      if test "$withval" = "no"; then
         TORRENT_CHECK_POSIX_FALLOCATE
       fi
     ])

I think the test is bogus, and need to be remove.

Change History

Changed 6 years ago by rakshasa

It's wrong and never used, but not bogus. The intent is to allow posix_fallocate to be used on newly created files, but no OS i know of has a good implementation of it yet. So it is by default turned off. I'll fix the test to work properly.

Changed 6 years ago by rakshasa

  • status changed from new to closed
  • resolution set to fixed
Note: See TracTickets for help on using tickets.