<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -34,6 +34,7 @@
 #include &quot;job.h&quot;
 #include &quot;binlog.h&quot;
 #include &quot;util.h&quot;
+#include &quot;config.h&quot;
 
 /* max size we will create a log file */
 size_t binlog_size_limit = 10 &lt;&lt; 20;
@@ -285,7 +286,12 @@ binlog_open(binlog log)
 
     if (fd &lt; 0) return twarn(&quot;Cannot open binlog %s&quot;, log-&gt;path), -1;
 
+#ifdef HAVE_POSIX_FALLOCATE
     r = posix_fallocate(fd, 0, binlog_size_limit);
+#else
+    #warning no known method to preallocate files on this platform
+    r = 0;
+#endif
     if (r) {
         close(fd);
         binlog_dref(log);</diff>
      <filename>binlog.c</filename>
    </modified>
    <modified>
      <diff>@@ -100,6 +100,8 @@ else
   CFLAGS=&quot;$CFLAGS -I$LIBEVENT_DIR/include&quot;
   LIBS=&quot;$LIBS -levent&quot;
 
+  AC_CHECK_FUNCS([posix_fallocate])
+
   AC_CHECK_LIB([socket], [bind], [
     LIBS=&quot;$LIBS -lsocket&quot;
   ])</diff>
      <filename>configure.in</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>d596e41c256f16864d7bf0b7b656aa21962d853e</id>
    </parent>
  </parents>
  <author>
    <name>Keith Rarick</name>
    <email>kr@xph.us</email>
  </author>
  <url>http://github.com/kr/beanstalkd/commit/b2740577e4d006acbe29061cf39bd00afb7b377f</url>
  <id>b2740577e4d006acbe29061cf39bd00afb7b377f</id>
  <committed-date>2009-05-13T01:13:08-07:00</committed-date>
  <authored-date>2009-05-13T01:13:08-07:00</authored-date>
  <message>Step one for preallocation on several platforms.</message>
  <tree>e4a9add5959653254b9988451db16da591a3a35a</tree>
  <committer>
    <name>Keith Rarick</name>
    <email>kr@xph.us</email>
  </committer>
</commit>
