Documentation Source Text

Check-in [ac91a2d606]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Get althttpd to compile and run on linux by adding #include <errno.h&gt.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: ac91a2d6068189e61daa9e4a474cd2052d0097c6
User & Date: drh 2012-07-09 17:55:59
Context
2012-07-17
12:13
Fix the download page to use absolute rather than relative pathnames in order to work around a bug in the Google search engine. check-in: 90cc4b660f user: drh tags: trunk
2012-07-09
17:55
Get althttpd to compile and run on linux by adding #include <errno.h&gt. check-in: ac91a2d606 user: drh tags: trunk
2012-07-07
10:45
Add "-family ipv6" and "-family ipv4" options to althttpd.c to force it to use one or the other internet protocol version. check-in: 734d42b432 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to misc/althttpd.c.

76
77
78
79
80
81
82

83
84
85
86
87
88
89
..
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
#include <sys/wait.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <stdarg.h>
#include <time.h>
#include <sys/times.h>
#include <netdb.h>

#ifdef linux
#include <sys/sendfile.h>
#endif
#include <assert.h>

/*
** Configure the server by setting the following macros and recompiling.
................................................................................
#ifndef DEFAULT_PORT
#define DEFAULT_PORT "80"
#endif
#ifndef MAX_CONTENT_LENGTH
#define MAX_CONTENT_LENGTH 9000000
#endif


/*
** The error number from system calls.
*/
extern int errno;

/*
** We record most of the state information as global variables.  This
** saves having to pass information to subroutines as parameters, and
** makes the executable smaller...
*/
static char *zRoot = 0;          /* Root directory of the website */
static char *zTmpNam = 0;        /* Name of a temporary file */







>







 







<
<
<
<
<
<







76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
..
92
93
94
95
96
97
98






99
100
101
102
103
104
105
#include <sys/wait.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <stdarg.h>
#include <time.h>
#include <sys/times.h>
#include <netdb.h>
#include <errno.h>
#ifdef linux
#include <sys/sendfile.h>
#endif
#include <assert.h>

/*
** Configure the server by setting the following macros and recompiling.
................................................................................
#ifndef DEFAULT_PORT
#define DEFAULT_PORT "80"
#endif
#ifndef MAX_CONTENT_LENGTH
#define MAX_CONTENT_LENGTH 9000000
#endif







/*
** We record most of the state information as global variables.  This
** saves having to pass information to subroutines as parameters, and
** makes the executable smaller...
*/
static char *zRoot = 0;          /* Root directory of the website */
static char *zTmpNam = 0;        /* Name of a temporary file */