http://www.cvstrac.org/cvstrac/chngview?cn=994
Avoid using sqlite internal functions.

Index: cgi.c
--- cgi.c.orig
+++ cgi.c
@@ -57,13 +57,6 @@
 #endif /* INTERFACE */
 
 /*
-** Provide a reliable implementation of a caseless string comparison
-** function.
-*/
-#define stricmp sqlite3StrICmp
-extern int sqlite3StrICmp(const char*, const char*);
-
-/*
 ** The body of the HTTP reply text is stored here.
 */
 static int nAllocTxt = 0; /* Amount of space allocated for HTTP reply text */
@@ -669,17 +662,17 @@ static void process_multipart_form_data(char *z, int l
       nArg = tokenize_line(zLine, sizeof(azArg)/sizeof(azArg[0]), azArg);
       for(i=0; i<nArg; i++){
         int c = tolower(azArg[i][0]);
-        if( c=='c' && stricmp(azArg[i],"content-disposition:")==0 ){
+        if( c=='c' && strcasecmp(azArg[i],"content-disposition:")==0 ){
           i++;
-        }else if( c=='n' && stricmp(azArg[i],"name=")==0 ){
+        }else if( c=='n' && strcasecmp(azArg[i],"name=")==0 ){
           zName = azArg[++i];
-        }else if( c=='f' && stricmp(azArg[i],"filename=")==0 ){
+        }else if( c=='f' && strcasecmp(azArg[i],"filename=")==0 ){
           char *z = azArg[++i];
           if( zName && z ){
             cgi_set_parameter_nocopy(mprintf("%s:filename",zName), z);
           }
           showBytes = 1;
-        }else if( c=='c' && stricmp(azArg[i],"content-type:")==0 ){
+        }else if( c=='c' && strcasecmp(azArg[i],"content-type:")==0 ){
           char *z = azArg[++i];
           if( zName && z ){
             cgi_set_parameter_nocopy(mprintf("%s:mimetype",zName), z);
@@ -2464,7 +2457,7 @@ void cgi_handle_http_request(void){
   char *z, *zToken;
   int i;
   struct sockaddr_in remoteName;
-  size_t size = sizeof(struct sockaddr_in);
+  socklen_t size = sizeof(struct sockaddr_in);
   char zLine[2000];     /* A single line of input. */
 
   fullHttpReply = 1;
@@ -2542,7 +2535,7 @@ void cgi_http_server(int iPort){
   int listener;                /* The server socket */
   int connection;              /* A socket for each individual connection */
   fd_set readfds;              /* Set of file descriptors for select() */
-  size_t lenaddr;              /* Length of the inaddr structure */
+  socklen_t lenaddr;              /* Length of the inaddr structure */
   int child;                   /* PID of the child process */
   int nchildren = 0;           /* Number of child processes */
   struct timeval delay;        /* How long to wait inside select() */
