freebsd-ports/www/quickie/files/patch-lib_file_regular.cc
Renato Botelho 29ce428a7c Quickie is a small footprint, fast C++ Wiki engine; hence the name.
The fundamental insight for this engine is that wiki pages are read far
more often than they are modified. Thus, the generated HTML can be
cached. It follows that the main code path will check that the .html
file exists and simply copy it to stdout in the vast majority of cases.

The .html file generated from each .wiki file is about the same size as
the .wiki file itself, so there will be no particular I/O advantage,
but there is a huge CPU advantage, and a significant memory footprint
advantage, and since I want to run a wiki on a geriatric 20MB 33MHz 386
machine, this is a good thing.

    Online demo: http://quickie.sourceforge.net/cgi-bin/quickie

WWW: http://quickie.sourceforge.net/

PR:		ports/97376
Submitted by:	Shaun Amott <shaun@inerd.com>
2006-05-17 13:48:19 +00:00

24 lines
519 B
C++

--- lib/file/regular.cc.orig Mon Jun 13 12:21:49 2005
+++ lib/file/regular.cc Tue May 16 15:38:03 2006
@@ -29,6 +29,11 @@
#include <fcntl.h>
#include <unistd.h>
+#ifdef __FreeBSD__
+#include <sys/types.h>
+#include <sys/stat.h>
+#endif
+
#include <careful.h>
#include <cgi.h>
#include <configuration.h>
@@ -386,7 +391,7 @@
output_stdout op;
op << "Content-Type: text/html\n"
"Content-Length: "
- << st.st_size
+ << (char)st.st_size
<< "\n"
"\n";
for (;;)