aboutsummaryrefslogtreecommitdiff
path: root/src/fastcgi.cpp
diff options
context:
space:
mode:
authorDavid <david@xagasoft.com>2010-02-04 21:37:00 +0000
committerDavid <david@xagasoft.com>2010-02-04 21:37:00 +0000
commit1f29dc180b5a86ddf2115f97ad410e0e9b1beb4b (patch)
treebd4236dd6ffb7e7ca19eb3611e3c57e8f1ef924e /src/fastcgi.cpp
parent81b7d806028bd484e2765cbc57b9677544bf52b2 (diff)
downloadlibbu++-1f29dc180b5a86ddf2115f97ad410e0e9b1beb4b.tar.gz
libbu++-1f29dc180b5a86ddf2115f97ad410e0e9b1beb4b.tar.bz2
libbu++-1f29dc180b5a86ddf2115f97ad410e0e9b1beb4b.tar.xz
libbu++-1f29dc180b5a86ddf2115f97ad410e0e9b1beb4b.zip
david - Made a build-M3 file for building to windows (mingw). This one actually builds *.cpp, yay!... Although i took out Process, Plugger, and Regex... to be re-added later... also had to stubify a few more functions when compiling on WIN32.
Diffstat (limited to 'src/fastcgi.cpp')
-rw-r--r--src/fastcgi.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/fastcgi.cpp b/src/fastcgi.cpp
index 1662fe6..ede5cac 100644
--- a/src/fastcgi.cpp
+++ b/src/fastcgi.cpp
@@ -7,7 +7,10 @@
7 7
8#include "bu/fastcgi.h" 8#include "bu/fastcgi.h"
9 9
10#include <arpa/inet.h> 10#ifndef WIN32
11 #include <arpa/inet.h>
12#endif
13
11#include <errno.h> 14#include <errno.h>
12#include <unistd.h> 15#include <unistd.h>
13 16
@@ -37,6 +40,7 @@ Bu::FastCgi::~FastCgi()
37 40
38bool Bu::FastCgi::isEmbedded() 41bool Bu::FastCgi::isEmbedded()
39{ 42{
43#ifndef WIN32
40 struct sockaddr name; 44 struct sockaddr name;
41 socklen_t namelen = sizeof(name); 45 socklen_t namelen = sizeof(name);
42 if( getpeername( STDIN_FILENO, &name, &namelen ) != 0 && 46 if( getpeername( STDIN_FILENO, &name, &namelen ) != 0 &&
@@ -54,6 +58,10 @@ bool Bu::FastCgi::isEmbedded()
54 sio << "No socket detected, running in standalone mode" << sio.nl; 58 sio << "No socket detected, running in standalone mode" << sio.nl;
55 return false; 59 return false;
56 } 60 }
61#else
62 #warning Bu::FastCgi::isEmbedded IS A STUB for WIN32!!!!
63 return false;
64#endif
57} 65}
58 66
59void Bu::FastCgi::read( Bu::Socket &s, Bu::FastCgi::Record &r ) 67void Bu::FastCgi::read( Bu::Socket &s, Bu::FastCgi::Record &r )