summaryrefslogtreecommitdiffabout
authorMichael Krelin <hacker@klever.net>2005-02-13 21:48:37 (UTC)
committer Michael Krelin <hacker@klever.net>2005-02-13 21:48:37 (UTC)
commitace26447603d3f7ecd82fd3910174f603c2c7464 (patch) (side-by-side diff)
tree3a82346bd7fff177f74424ed61a6a2c6aa7a308e
parent4fa4a0071ef9a04c02f8934b2e1d3b7628a65c80 (diff)
downloadkingate-ace26447603d3f7ecd82fd3910174f603c2c7464.zip
kingate-ace26447603d3f7ecd82fd3910174f603c2c7464.tar.gz
kingate-ace26447603d3f7ecd82fd3910174f603c2c7464.tar.bz2
portabiity improvements
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--configure.ac3
-rw-r--r--src/Makefile.am2
-rw-r--r--src/plaincgi.cc5
3 files changed, 9 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 5ae7b27..b3141f1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -8,12 +8,15 @@ AC_PROG_AWK
AC_PROG_CXX
AC_PROG_CC
AC_PROG_LIBTOOL
AC_HEADER_STDC
AC_CHECK_HEADERS([sys/types.h sys/stat.h])
+AC_CHECK_DECLS([environ],,,[
+ #include <unistd.h>
+])
HAVE_FCGI=false
AC_LANG_PUSH(C++)
AC_CHECK_HEADERS([fcgio.h],[
AC_CHECK_LIB(fcgi,FCGX_Init,[
LIBS="-lfcgi ${LIBS}"
diff --git a/src/Makefile.am b/src/Makefile.am
index e5c6778..d516d37 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,13 +1,13 @@
lib_LTLIBRARIES = libkingate.la libkingate-plaincgi.la
if HAVE_FCGI
lib_LTLIBRARIES += libkingate-fcgi.la
endif
-INCLUDES = -I${top_srcdir}/include
+INCLUDES = -I${top_srcdir}/include -I${top_srcdir}
AM_CXXFLAGS = ${KONFORKA_CFLAGS}
LDADD = ${KONFORKA_LIBS}
libkingate_la_SOURCES = \
cgi_gateway.cc \
cgi_interface.cc \
diff --git a/src/plaincgi.cc b/src/plaincgi.cc
index 6934748..1cb7dc6 100644
--- a/src/plaincgi.cc
+++ b/src/plaincgi.cc
@@ -1,11 +1,16 @@
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include "kingate/plaincgi.h"
#include "kingate/exception.h"
+#include "config.h"
+
+#if !HAVE_DECL_ENVIRON
+extern char **environ;
+#endif /* HAVE_DECL_ENVIRON */
namespace kingate {
plaincgi_interface::plaincgi_interface() {
for(char **p = environ; *p; p++) {
const char *e = strchr(*p,'=');