You can subscribe to this list here.
| 2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(31) |
Jul
(1) |
Aug
(5) |
Sep
|
Oct
|
Nov
|
Dec
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
(8) |
Dec
(4) |
| 2012 |
Jan
(9) |
Feb
(1) |
Mar
(20) |
Apr
(41) |
May
(8) |
Jun
(7) |
Jul
|
Aug
(5) |
Sep
|
Oct
|
Nov
|
Dec
|
| 2013 |
Jan
|
Feb
(2) |
Mar
(1) |
Apr
(2) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2018 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(9) |
Oct
|
Nov
|
Dec
|
|
From: <fe...@us...> - 2018-09-20 08:33:23
|
Revision: 173
http://sourceforge.net/p/ehs/code/173
Author: felfert
Date: 2018-09-20 08:33:21 +0000 (Thu, 20 Sep 2018)
Log Message:
-----------
Fixed mingw spec
Modified Paths:
--------------
trunk/conf/mingw-ehs.spec.in
Modified: trunk/conf/mingw-ehs.spec.in
===================================================================
--- trunk/conf/mingw-ehs.spec.in 2018-09-20 08:29:49 UTC (rev 172)
+++ trunk/conf/mingw-ehs.spec.in 2018-09-20 08:33:21 UTC (rev 173)
@@ -107,7 +107,7 @@
%setup -q -n %{basepkg}-%{version}
%build
-%{mingw_configure} --enable-static --disable-shared --enable-warn
+%{mingw_configure} --enable-static --enable-shared --enable-warn
%{mingw_make} %{?smp_mflags} %{make_verbose_flags}
%install
@@ -116,6 +116,8 @@
MINGW64_MAKE_ARGS=transform=s/x86_64-w64-mingw32-//
%{mingw_make} DESTDIR=%{buildroot} %{make_verbose_flags} install
# Libtool files don't need to be bundled
+find %{buildroot} -name "*.la" -delete
+
%clean
%{__rm} -rf %{buildroot}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <fe...@us...> - 2018-09-20 08:29:51
|
Revision: 172
http://sourceforge.net/p/ehs/code/172
Author: felfert
Date: 2018-09-20 08:29:49 +0000 (Thu, 20 Sep 2018)
Log Message:
-----------
Updated svn:ignore
Modified Paths:
--------------
trunk/conf/mingw-ehs.spec.in
Property Changed:
----------------
trunk/
trunk/conf/
trunk/doc/
Index: trunk
===================================================================
--- trunk 2018-09-19 11:51:58 UTC (rev 171)
+++ trunk 2018-09-20 08:29:49 UTC (rev 172)
Property changes on: trunk
___________________________________________________________________
Modified: svn:ignore
## -9,8 +9,11 ##
ehstypes.h
.deps
*.tar.gz
+*.xz
+*.dsc
.libs
libtool
+ChangeLog
Makefile
Makefile.in
stamp-h1
Index: trunk/conf
===================================================================
--- trunk/conf 2018-09-19 11:51:58 UTC (rev 171)
+++ trunk/conf 2018-09-20 08:29:49 UTC (rev 172)
Property changes on: trunk/conf
___________________________________________________________________
Modified: svn:ignore
## -1,4 +1,4 ##
-*.spec
+compile
config.guess
config.sub
depcomp
## -6,3 +6,5 ##
install-sh
ltmain.sh
missing
+*.pc
+*.spec
Modified: trunk/conf/mingw-ehs.spec.in
===================================================================
--- trunk/conf/mingw-ehs.spec.in 2018-09-19 11:51:58 UTC (rev 171)
+++ trunk/conf/mingw-ehs.spec.in 2018-09-20 08:29:49 UTC (rev 172)
@@ -22,16 +22,18 @@
BuildRequires: mingw32-filesystem >= 95
BuildRequires: mingw32-binutils
BuildRequires: mingw32-gcc-c++
-BuildRequires: mingw32-openssl
BuildRequires: mingw32-pthreads
+BuildRequires: mingw32-openssl-static
BuildRequires: mingw32-boost-static
+BuildRequires: mingw32-zlib-static
BuildRequires: mingw64-filesystem >= 95
BuildRequires: mingw64-gcc-c++
BuildRequires: mingw64-binutils
-BuildRequires: mingw64-openssl
BuildRequires: mingw64-pthreads
+BuildRequires: mingw64-openssl-static
BuildRequires: mingw64-boost-static
+BuildRequires: mingw64-zlib-static
%if 0%{?enable_setup}
BuildRequires: iscc
@@ -105,7 +107,7 @@
%setup -q -n %{basepkg}-%{version}
%build
-%{mingw_configure} --enable-static --enable-shared --enable-warn
+%{mingw_configure} --enable-static --disable-shared --enable-warn
%{mingw_make} %{?smp_mflags} %{make_verbose_flags}
%install
@@ -114,8 +116,6 @@
MINGW64_MAKE_ARGS=transform=s/x86_64-w64-mingw32-//
%{mingw_make} DESTDIR=%{buildroot} %{make_verbose_flags} install
# Libtool files don't need to be bundled
-find %{buildroot} -name "*.la" -delete
-
%clean
%{__rm} -rf %{buildroot}
Index: trunk/doc
===================================================================
--- trunk/doc 2018-09-19 11:51:58 UTC (rev 171)
+++ trunk/doc 2018-09-20 08:29:49 UTC (rev 172)
Property changes on: trunk/doc
___________________________________________________________________
Modified: svn:ignore
## -1,2 +1,3 ##
+ehs.tag
html
manual.dox
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <fe...@us...> - 2018-09-19 11:52:00
|
Revision: 171
http://sourceforge.net/p/ehs/code/171
Author: felfert
Date: 2018-09-19 11:51:58 +0000 (Wed, 19 Sep 2018)
Log Message:
-----------
Fix include dir in pkgconfig
Modified Paths:
--------------
trunk/conf/ehs.pc.in
Modified: trunk/conf/ehs.pc.in
===================================================================
--- trunk/conf/ehs.pc.in 2018-09-12 11:58:05 UTC (rev 170)
+++ trunk/conf/ehs.pc.in 2018-09-19 11:51:58 UTC (rev 171)
@@ -11,4 +11,4 @@
Requires: openssl
Conflicts:
Libs: -L${libdir} -lehs
-Cflags: -I${includedir}
+Cflags: -I${includedir}/ehs
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <fe...@us...> - 2018-09-12 11:58:07
|
Revision: 170
http://sourceforge.net/p/ehs/code/170
Author: felfert
Date: 2018-09-12 11:58:05 +0000 (Wed, 12 Sep 2018)
Log Message:
-----------
Fixed debian changelog genrator
Modified Paths:
--------------
trunk/debian/mkchangelog.pl
Modified: trunk/debian/mkchangelog.pl
===================================================================
--- trunk/debian/mkchangelog.pl 2018-09-12 11:49:01 UTC (rev 169)
+++ trunk/debian/mkchangelog.pl 2018-09-12 11:58:05 UTC (rev 170)
@@ -15,7 +15,7 @@
if ($inmsg) {
$inmsg = 0;
next if ($msg eq '');
- print 'ehs (' . $version . '-' . $rev . ') unstable; urgency=low' . "\n";
+ print 'ehs (' . $version . '.' . $rev . ') unstable; urgency=low' . "\n";
print $msg;
print ' -- ' . $name . ' ' . $stamp . "\n\n";
if ($msg =~ /Bumped up version/) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <fe...@us...> - 2018-09-12 11:49:05
|
Revision: 169
http://sourceforge.net/p/ehs/code/169
Author: felfert
Date: 2018-09-12 11:49:01 +0000 (Wed, 12 Sep 2018)
Log Message:
-----------
Add pkgconfig
Modified Paths:
--------------
trunk/debian/libehs-dev.dirs
trunk/debian/libehs-dev.install
Modified: trunk/debian/libehs-dev.dirs
===================================================================
--- trunk/debian/libehs-dev.dirs 2018-09-12 10:28:05 UTC (rev 168)
+++ trunk/debian/libehs-dev.dirs 2018-09-12 11:49:01 UTC (rev 169)
@@ -1,3 +1,4 @@
+usr/lib/pkgconfig
usr/lib
usr/include
usr/bin
Modified: trunk/debian/libehs-dev.install
===================================================================
--- trunk/debian/libehs-dev.install 2018-09-12 10:28:05 UTC (rev 168)
+++ trunk/debian/libehs-dev.install 2018-09-12 11:49:01 UTC (rev 169)
@@ -1,3 +1,4 @@
usr/include/*
usr/lib/lib*.a
usr/lib/lib*.so
+usr/lib/pkgconfig/ehs.pc
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <fe...@us...> - 2018-09-12 10:28:07
|
Revision: 168
http://sourceforge.net/p/ehs/code/168
Author: felfert
Date: 2018-09-12 10:28:05 +0000 (Wed, 12 Sep 2018)
Log Message:
-----------
Add pkgconfig support
Modified Paths:
--------------
trunk/conf/ehs.spec.in
trunk/conf/mingw-ehs.spec.in
Modified: trunk/conf/ehs.spec.in
===================================================================
--- trunk/conf/ehs.spec.in 2018-09-12 09:33:49 UTC (rev 167)
+++ trunk/conf/ehs.spec.in 2018-09-12 10:28:05 UTC (rev 168)
@@ -91,6 +91,7 @@
%doc AUTHORS COPYING INSTALL NEWS README ehs_development_guide.txt doc/html
%{_libdir}/*.so
%{_libdir}/*.*a
+%{_libdir}/pkgconfig/ehs.pc
%{_includedir}/%{name}
%changelog
Modified: trunk/conf/mingw-ehs.spec.in
===================================================================
--- trunk/conf/mingw-ehs.spec.in 2018-09-12 09:33:49 UTC (rev 167)
+++ trunk/conf/mingw-ehs.spec.in 2018-09-12 10:28:05 UTC (rev 168)
@@ -61,6 +61,7 @@
Summary: Embedded HTTP server - 32bit libs example programs and headers
Group: Development/Libraries
Requires: mingw32-%{basepkg} = %{version}-%{release}
+Requires: pkgconfig
%description -n mingw32-%{basepkg}-devel
Embedded HTTP Server (EHS) is a C++ class which can be inherited from in order
@@ -71,6 +72,7 @@
Summary: Embedded HTTP server - 64bit libs, example programs and headers
Group: Development/Libraries
Requires: mingw64-%{basepkg} = %{version}-%{release}
+Requires: pkgconfig
%description -n mingw64-%{basepkg}-devel
Embedded HTTP Server (EHS) is a C++ class which can be inherited from in order
@@ -126,6 +128,7 @@
%doc AUTHORS COPYING INSTALL NEWS README ehs_development_guide.txt doc/html
%{mingw32_bindir}/*.exe
%{mingw32_libdir}/*.dll.a
+%{mingw32_libdir}/pkgconfig/ehs.pc
%{mingw32_includedir}/%{basepkg}
%files -n mingw32-%{basepkg}-static
@@ -141,6 +144,7 @@
%doc AUTHORS COPYING INSTALL NEWS README ehs_development_guide.txt doc/html
%{mingw64_bindir}/*.exe
%{mingw64_libdir}/*.dll.a
+%{mingw64_libdir}/pkgconfig/ehs.pc
%{mingw64_includedir}/%{basepkg}
%files -n mingw64-%{basepkg}-static
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <fe...@us...> - 2018-09-12 09:33:52
|
Revision: 167
http://sourceforge.net/p/ehs/code/167
Author: felfert
Date: 2018-09-12 09:33:49 +0000 (Wed, 12 Sep 2018)
Log Message:
-----------
Add pkg-config support
Modified Paths:
--------------
trunk/Makefile.am
trunk/configure.ac
Added Paths:
-----------
trunk/conf/ehs.pc.in
Modified: trunk/Makefile.am
===================================================================
--- trunk/Makefile.am 2018-09-11 13:29:27 UTC (rev 166)
+++ trunk/Makefile.am 2018-09-12 09:33:49 UTC (rev 167)
@@ -25,9 +25,12 @@
libehs_la_DEPENDENCIES = $(LIBEHS_RES)
EXTRA_libehs_la_SOURCES = ehsrc.rc
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = conf/ehs.pc
+
# Extra stuff to distribute in tarball
EXTRA_DIST = $(DX_CONFIG) ehs_development_guide.txt \
- ehs-stress.pl ehs-chunktest.pl conf/ehs.spec \
+ ehs-stress.pl ehs-chunktest.pl conf/ehs.pc.in conf/ehs.spec \
ChangeLog debian conf/authors.xml
# We want the maintainer-clean to REALLY remove anything that can be
Added: trunk/conf/ehs.pc.in
===================================================================
--- trunk/conf/ehs.pc.in (rev 0)
+++ trunk/conf/ehs.pc.in 2018-09-12 09:33:49 UTC (rev 167)
@@ -0,0 +1,14 @@
+# ehs pkg-config file
+
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: ehs
+Description: ehs is an embedded HTTP server
+Version: @VERSION@
+Requires: openssl
+Conflicts:
+Libs: -L${libdir} -lehs
+Cflags: -I${includedir}
Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac 2018-09-11 13:29:27 UTC (rev 166)
+++ trunk/configure.ac 2018-09-12 09:33:49 UTC (rev 167)
@@ -385,6 +385,6 @@
DX_INIT_DOXYGEN([EHS], [conf/doxygen.cfg], [doc])
AC_CONFIG_FILES([Makefile samples/Makefile setup/Makefile
- conf/doxygen.cfg doc/manual.dox conf/ehs.spec conf/mingw-ehs.spec
+ conf/doxygen.cfg doc/manual.dox conf/ehs.spec conf/mingw-ehs.spec conf/ehs.pc
setup/findrequires.pl setup/isccwrap.sh ehsrc.rc ehstypes.h])
AC_OUTPUT
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <fe...@us...> - 2018-09-11 13:29:29
|
Revision: 166
http://sourceforge.net/p/ehs/code/166
Author: felfert
Date: 2018-09-11 13:29:27 +0000 (Tue, 11 Sep 2018)
Log Message:
-----------
Fix build with newer compilers
Add support for dual-arch build with mingw on Fedora
Bumped up version
Modified Paths:
--------------
trunk/Makefile.am
trunk/configure.ac
trunk/ehsconnection.h
trunk/ehstypes.h.in
trunk/osdep.cpp
trunk/samples/common.h
Added Paths:
-----------
trunk/conf/mingw-ehs.spec.in
Removed Paths:
-------------
trunk/conf/mingw32-ehs.spec.in
Modified: trunk/Makefile.am
===================================================================
--- trunk/Makefile.am 2018-09-05 11:18:17 UTC (rev 165)
+++ trunk/Makefile.am 2018-09-11 13:29:27 UTC (rev 166)
@@ -11,7 +11,7 @@
datum.h httpresponse.h httprequest.h \
ehstypes.h formvalue.h contentdisposition.h
-noinst_HEADERS = config.h socket.h securesocket.h sslerror.h debug.h \
+noinst_HEADERS = socket.h securesocket.h sslerror.h debug.h \
staticssllocking.h dynamicssllocking.h ehsconnection.h ehsserver.h \
mutexhelper.h
@@ -32,9 +32,8 @@
# We want the maintainer-clean to REALLY remove anything that can be
# generated by running make -f Makefile.am
-MAINTAINERCLEANFILES = -r aclocal.m4 config.h.in* configure Makefile.in \
- conf/missing conf/depcomp conf/ltmain.sh conf/install-sh \
- conf/config.sub conf/config.guess m4/lt~obsolete.m4 \
+MAINTAINERCLEANFILES = -r aclocal.m4 configure Makefile.in \
+ m4/lt~obsolete.m4 \
m4/ltoptions.m4 m4/libtool.m4 m4/ltversion.m4 m4/ltsugar.m4 \
mingw32-config.cache autom4te.cache
Added: trunk/conf/mingw-ehs.spec.in
===================================================================
--- trunk/conf/mingw-ehs.spec.in (rev 0)
+++ trunk/conf/mingw-ehs.spec.in 2018-09-11 13:29:27 UTC (rev 166)
@@ -0,0 +1,150 @@
+%{?mingw_package_header}
+
+%global make_verbose_flags %{?_with_verbose: V=1 AM_DEFAULT_VERBOSITY=1}
+
+%define rel @SVNREV@%{?dist}
+%define basepkg ehs
+
+Summary: Embedded HTTP server
+Name: mingw-%{basepkg}
+Version: @VERSION@
+Release: %{rel}
+License: LGPL
+Group: Development/Libraries
+URL: http://sourceforge.net/projects/ehs/
+Source0: %{basepkg}-%{version}.tar.gz
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -u -n)
+
+BuildArch: noarch
+
+Buildrequires: doxygen, graphviz, automake, libtool
+
+BuildRequires: mingw32-filesystem >= 95
+BuildRequires: mingw32-binutils
+BuildRequires: mingw32-gcc-c++
+BuildRequires: mingw32-openssl
+BuildRequires: mingw32-pthreads
+BuildRequires: mingw32-boost-static
+
+BuildRequires: mingw64-filesystem >= 95
+BuildRequires: mingw64-gcc-c++
+BuildRequires: mingw64-binutils
+BuildRequires: mingw64-openssl
+BuildRequires: mingw64-pthreads
+BuildRequires: mingw64-boost-static
+
+%if 0%{?enable_setup}
+BuildRequires: iscc
+%endif
+
+%description
+Embedded HTTP Server (EHS) is a C++ class which can be inherited from in order
+to give HTTP server functionality to any class or application. It supports form
+data via POST or GET, and uploads via multi-part form attachments.
+
+
+%package -n mingw32-%{basepkg}
+Summary: Embedded HTTP server - 32bit DLLs
+%description -n mingw32-%{basepkg}
+Embedded HTTP Server (EHS) is a C++ class which can be inherited from in order
+to give HTTP server functionality to any class or application. It supports form
+data via POST or GET, and uploads via multi-part form attachments.
+
+%package -n mingw64-%{basepkg}
+Summary: Embedded HTTP server - 64bit DLLs
+%description -n mingw64-%{basepkg}
+Embedded HTTP Server (EHS) is a C++ class which can be inherited from in order
+to give HTTP server functionality to any class or application. It supports form
+data via POST or GET, and uploads via multi-part form attachments.
+
+%package -n mingw32-%{basepkg}-devel
+Summary: Embedded HTTP server - 32bit libs example programs and headers
+Group: Development/Libraries
+Requires: mingw32-%{basepkg} = %{version}-%{release}
+
+%description -n mingw32-%{basepkg}-devel
+Embedded HTTP Server (EHS) is a C++ class which can be inherited from in order
+to give HTTP server functionality to any class or application. It supports form
+data via POST or GET, and uploads via multi-part form attachments.
+
+%package -n mingw64-%{basepkg}-devel
+Summary: Embedded HTTP server - 64bit libs, example programs and headers
+Group: Development/Libraries
+Requires: mingw64-%{basepkg} = %{version}-%{release}
+
+%description -n mingw64-%{basepkg}-devel
+Embedded HTTP Server (EHS) is a C++ class which can be inherited from in order
+to give HTTP server functionality to any class or application. It supports form
+data via POST or GET, and uploads via multi-part form attachments.
+
+%package -n mingw32-%{basepkg}-static
+Summary: Embedded HTTP server - 32bit static libs
+Group: Development/Libraries
+Requires: mingw32-%{basepkg}-devel = %{version}-%{release}
+
+%description -n mingw32-%{basepkg}-static
+Embedded HTTP Server (EHS) is a C++ class which can be inherited from in order
+to give HTTP server functionality to any class or application. It supports form
+data via POST or GET, and uploads via multi-part form attachments.
+
+%package -n mingw64-%{basepkg}-static
+Summary: Embedded HTTP server - 64bit static libs
+Group: Development/Libraries
+Requires: mingw64-%{basepkg}-devel = %{version}-%{release}
+
+%description -n mingw64-%{basepkg}-static
+Embedded HTTP Server (EHS) is a C++ class which can be inherited from in order
+to give HTTP server functionality to any class or application. It supports form
+data via POST or GET, and uploads via multi-part form attachments.
+
+%{?mingw_debug_package}
+
+%prep
+%setup -q -n %{basepkg}-%{version}
+
+%build
+%{mingw_configure} --enable-static --enable-shared --enable-warn
+%{mingw_make} %{?smp_mflags} %{make_verbose_flags}
+
+%install
+%{__rm} -rf %{buildroot}
+MINGW32_MAKE_ARGS=transform=s/i686-w64-mingw32-//
+MINGW64_MAKE_ARGS=transform=s/x86_64-w64-mingw32-//
+%{mingw_make} DESTDIR=%{buildroot} %{make_verbose_flags} install
+# Libtool files don't need to be bundled
+find %{buildroot} -name "*.la" -delete
+
+%clean
+%{__rm} -rf %{buildroot}
+
+%files -n mingw32-%{basepkg}
+%defattr(-,root,root,-)
+%{mingw32_bindir}/*.dll
+
+%files -n mingw32-%{basepkg}-devel
+%defattr(644, root, root, 0755)
+%doc AUTHORS COPYING INSTALL NEWS README ehs_development_guide.txt doc/html
+%{mingw32_bindir}/*.exe
+%{mingw32_libdir}/*.dll.a
+%{mingw32_includedir}/%{basepkg}
+
+%files -n mingw32-%{basepkg}-static
+%defattr(-,root,root,-)
+%{mingw32_libdir}/libehs.a
+
+%files -n mingw64-%{basepkg}
+%defattr(-,root,root,-)
+%{mingw64_bindir}/*.dll
+
+%files -n mingw64-%{basepkg}-devel
+%defattr(644, root, root, 0755)
+%doc AUTHORS COPYING INSTALL NEWS README ehs_development_guide.txt doc/html
+%{mingw64_bindir}/*.exe
+%{mingw64_libdir}/*.dll.a
+%{mingw64_includedir}/%{basepkg}
+
+%files -n mingw64-%{basepkg}-static
+%defattr(-,root,root,-)
+%{mingw64_libdir}/libehs.a
+
+%changelog
Deleted: trunk/conf/mingw32-ehs.spec.in
===================================================================
--- trunk/conf/mingw32-ehs.spec.in 2018-09-05 11:18:17 UTC (rev 165)
+++ trunk/conf/mingw32-ehs.spec.in 2018-09-11 13:29:27 UTC (rev 166)
@@ -1,79 +0,0 @@
-%global __strip %{_mingw32_strip}
-%global __objdump %{_mingw32_objdump}
-%global _use_internal_dependency_generator 0
-%global __find_requires %{_mingw32_findrequires}
-%global __find_provides %{_mingw32_findprovides}
-%define __debug_install_post %{_mingw32_debug_install_post}
-%define make_verbose_flags %{?_with_verbose: V=1 AM_DEFAULT_VERBOSITY=1}
-
-%define rel @SVNREV@%{?dist}
-%define xname ehs
-
-Summary: Embedded HTTP server
-Name: mingw32-%{xname}
-Version: @VERSION@
-Release: %{rel}
-License: LGPL
-Group: Development/Libraries
-URL: http://sourceforge.net/projects/ehs/
-Source0: %{xname}-%{version}.tar.gz
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -u -n)
-
-BuildArch: noarch
-
-Buildrequires: doxygen, graphviz, automake, libtool
-BuildRequires: mingw32-filesystem >= 49
-BuildRequires: mingw32-gcc-c++
-BuildRequires: mingw32-binutils
-BuildRequires: mingw32-openssl
-BuildRequires: mingw32-pthreads
-BuildRequires: mingw32-boost-static
-BuildRequires: iscc
-
-%description
-Embedded HTTP Server (EHS) is a C++ class which can be inherited from in order
-to give HTTP server functionality to any class or application. It supports form
-data via POST or GET, and uploads via multi-part form attachments.
-
-%package devel
-Summary: Embedded HTTP server
-Group: Development/Libraries
-Requires: mingw32-%{xname} = %{version}-%{release}
-
-%description devel
-Embedded HTTP Server (EHS) is a C++ class which can be inherited from in order
-to give HTTP server functionality to any class or application. It supports form
-data via POST or GET, and uploads via multi-part form attachments.
-
-This package contains the development headers as well as a static library.
-
-%{_mingw32_debug_package}
-
-%prep
-%setup -q -n %{xname}-%{version}
-
-%build
-%{_mingw32_configure} --enable-static --enable-shared --enable-warn \
- --with-dllpath=/usr/i686-pc-mingw32/sys-root/mingw/bin \
- --program-transform-name=s/i686-pc-mingw32-//
-make %{?_smp_mflags} %{make_verbose_flags}
-
-%install
-rm -rf $RPM_BUILD_ROOT
-make DESTDIR=$RPM_BUILD_ROOT %{make_verbose_flags} install
-
-%clean
-%{__rm} -rf %{buildroot}
-
-%files
-%defattr(-,root,root,-)
-%{_mingw32_bindir}/*.dll
-
-%files devel
-%defattr(644, root, root, 0755)
-%doc AUTHORS COPYING INSTALL NEWS README ehs_development_guide.txt doc/html
-%{_mingw32_bindir}/*.exe
-%{_mingw32_libdir}/*
-%{_mingw32_includedir}/%{xname}
-
-%changelog
Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac 2018-09-05 11:18:17 UTC (rev 165)
+++ trunk/configure.ac 2018-09-11 13:29:27 UTC (rev 166)
@@ -1,5 +1,5 @@
dnl Process this file with autoconf to produce a configure script.
-AC_INIT([ehs],[1.5.0],[eh...@fr...])
+AC_INIT([ehs],[1.5.1],[eh...@fr...])
AC_REVISION([$Id$])
AC_CONFIG_AUX_DIR([conf])
AC_CONFIG_MACRO_DIR([m4])
@@ -385,6 +385,6 @@
DX_INIT_DOXYGEN([EHS], [conf/doxygen.cfg], [doc])
AC_CONFIG_FILES([Makefile samples/Makefile setup/Makefile
- conf/doxygen.cfg doc/manual.dox conf/ehs.spec conf/mingw32-ehs.spec
+ conf/doxygen.cfg doc/manual.dox conf/ehs.spec conf/mingw-ehs.spec
setup/findrequires.pl setup/isccwrap.sh ehsrc.rc ehstypes.h])
AC_OUTPUT
Modified: trunk/ehsconnection.h
===================================================================
--- trunk/ehsconnection.h 2018-09-05 11:18:17 UTC (rev 165)
+++ trunk/ehsconnection.h 2018-09-11 13:29:27 UTC (rev 166)
@@ -27,6 +27,7 @@
#define _EHSCONNECTION_H_
#include <ehstypes.h>
+#include <ctime>
class EHSServer;
class NetworkAbstraction;
Modified: trunk/ehstypes.h.in
===================================================================
--- trunk/ehstypes.h.in 2018-09-05 11:18:17 UTC (rev 165)
+++ trunk/ehstypes.h.in 2018-09-11 13:29:27 UTC (rev 166)
@@ -70,7 +70,7 @@
#ifdef _WIN32
#include <pthread.h>
-typedef unsigned long ehs_threadid_t;
+typedef uint64_t ehs_threadid_t;
extern ehs_threadid_t THREADID(pthread_t t);
#else
typedef pthread_t ehs_threadid_t;
Modified: trunk/osdep.cpp
===================================================================
--- trunk/osdep.cpp 2018-09-05 11:18:17 UTC (rev 165)
+++ trunk/osdep.cpp 2018-09-11 13:29:27 UTC (rev 166)
@@ -33,15 +33,19 @@
ehs_threadid_t THREADID(pthread_t t) {
# define _NOT_IMPLEMENTED
# ifdef HAVE_PTHREAD_GETW32THREADID_NP
- return pthread_getw32threadid_np(t);
+ ehs_threadid_t ret = pthread_getw32threadid_np(t);
+ return ret;
# undef _NOT_IMPLEMENTED
# endif
# ifdef HAVE_PTHREAD_GETW32THREADHANDLE_NP
- return (unsigned long)pthread_getw32threadhandle_np(t);
+ ehs_threadid_t ret = static_cast<ehs_threadid_t>(pthread_getw32threadhandle_np(t));
+ return ret;
# undef _NOT_IMPLEMENTED
# endif
# ifdef _NOT_IMPLEMENTED
-# error No suitable function for retrieving a thread-ID on this platform
+ // Worst case: simply cast the pointer
+ ehs_threadid_t ret = static_cast<ehs_threadid_t>(t);
+ return ret;
# endif
}
#endif
Modified: trunk/samples/common.h
===================================================================
--- trunk/samples/common.h 2018-09-05 11:18:17 UTC (rev 165)
+++ trunk/samples/common.h 2018-09-11 13:29:27 UTC (rev 166)
@@ -41,10 +41,6 @@
#endif
#include <string>
-#ifdef _WIN32
-inline void sleep(int seconds) { Sleep(seconds * 1000); }
-#endif
-
// A small helper class for providing
// non-blocking keyboard input.
class kbdio {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <fe...@us...> - 2018-09-05 11:18:18
|
Revision: 165
http://sourceforge.net/p/ehs/code/165
Author: felfert
Date: 2018-09-05 11:18:17 +0000 (Wed, 05 Sep 2018)
Log Message:
-----------
Upgrade boost.m4 to latest upstream
Modified Paths:
--------------
trunk/m4/boost.m4
Modified: trunk/m4/boost.m4
===================================================================
--- trunk/m4/boost.m4 2013-04-11 08:44:21 UTC (rev 164)
+++ trunk/m4/boost.m4 2018-09-05 11:18:17 UTC (rev 165)
@@ -1,5 +1,5 @@
# boost.m4: Locate Boost headers and libraries for autoconf-based projects.
-# Copyright (C) 2007, 2008, 2009, 2010, 2011 Benoit Sigoure <ts...@lr...>
+# Copyright (C) 2007-2011, 2014 Benoit Sigoure <ts...@lr...>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -22,7 +22,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
m4_define([_BOOST_SERIAL], [m4_translit([
-# serial 16
+# serial 27
], [#
], [])])
@@ -46,12 +46,6 @@
# simply read the README, it will show you what to do step by step.
m4_pattern_forbid([^_?(BOOST|Boost)_])
-m4_pattern_allow([BOOST_ROOT])
-m4_pattern_allow([BOOST_CPPFLAGS])
-m4_pattern_allow([BOOST_REGEX_LDPATH])
-m4_pattern_allow([BOOST_REGEX_LDFLAGS])
-m4_pattern_allow([BOOST_REGEX_LIBS])
-m4_pattern_allow([BOOST_LDPATH])
# _BOOST_SED_CPP(SED-PROGRAM, PROGRAM,
@@ -65,7 +59,9 @@
# It could be useful to turn this into a macro which extracts the
# value of any macro.
m4_define([_BOOST_SED_CPP],
-[AC_LANG_PREPROC_REQUIRE()dnl
+[AC_LANG_PUSH([C++])dnl
+AC_LANG_PREPROC_REQUIRE()dnl
+AC_REQUIRE([AC_PROG_SED])dnl
AC_LANG_CONFTEST([AC_LANG_SOURCE([[$2]])])
AS_IF([dnl eval is necessary to expand ac_cpp.
dnl Ultrix and Pyramid sh refuse to redirect output of eval, so use subshell.
@@ -76,13 +72,32 @@
dnl boost_cv_lib_version='1_37\r' for instance, which breaks
dnl everything else.
dnl Cannot use 'dnl' after [$4] because a trailing dnl may break AC_CACHE_CHECK
+dnl
+dnl Beware that GCC 5, when expanding macros, may embed # line directives
+dnl a within single line:
+dnl
+dnl # 1 "conftest.cc"
+dnl # 1 "<built-in>"
+dnl # 1 "<command-line>"
+dnl # 1 "conftest.cc"
+dnl # 1 "/opt/local/include/boost/version.hpp" 1 3
+dnl # 2 "conftest.cc" 2
+dnl boost-lib-version =
+dnl # 2 "conftest.cc" 3
+dnl "1_56"
+dnl
+dnl So get rid of the # and empty lines, and glue the remaining ones together.
(eval "$ac_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD |
+ grep -v '#' |
+ grep -v '^[[[:space:]]]*$' |
tr -d '\r' |
- sed -n -e "$1" >conftest.i 2>&1],
+ tr -s '\n' ' ' |
+ $SED -n -e "$1" >conftest.i 2>&1],
[$3],
[$4])
rm -rf conftest*
-])# AC_EGREP_CPP
+AC_LANG_POP([C++])dnl
+])# _BOOST_SED_CPP
@@ -96,8 +111,9 @@
# On # success, defines HAVE_BOOST. On failure, calls the optional
# ACTION-IF-NOT-FOUND action if one was supplied.
# Otherwise aborts with an error message.
-AC_DEFUN([BOOST_REQUIRE],
+AC_DEFUN_ONCE([BOOST_REQUIRE],
[AC_REQUIRE([AC_PROG_CXX])dnl
+AC_REQUIRE([AC_PROG_GREP])dnl
echo "$as_me: this is boost.m4[]_BOOST_SERIAL" >&AS_MESSAGE_LOG_FD
boost_save_IFS=$IFS
boost_version_req=$1
@@ -155,7 +171,7 @@
#
# I didn't indent this loop on purpose (to avoid over-indented code)
boost_layout_system_search_list=`cd "$boost_dir" 2>/dev/null \
- && ls -1 | grep '^boost-' | sort -rn -t- -k2 \
+ && ls -1 | "${GREP}" '^boost-' | sort -rn -t- -k2 \
&& echo .`
for boost_inc in $boost_layout_system_search_list
do
@@ -210,7 +226,7 @@
AC_CACHE_CHECK([for Boost's header version],
[boost_cv_lib_version],
[m4_pattern_allow([^BOOST_LIB_VERSION$])dnl
- _BOOST_SED_CPP([/^boost-lib-version = /{s///;s/\"//g;p;q;}],
+ _BOOST_SED_CPP([[/^boost-lib-version = /{s///;s/[\" ]//g;p;q;}]],
[#include <boost/version.hpp>
boost-lib-version = BOOST_LIB_VERSION],
[boost_cv_lib_version=`cat conftest.i`])])
@@ -218,7 +234,7 @@
boost_major_version=`echo "$boost_cv_lib_version" | sed 's/_//;s/_.*//'`
case $boost_major_version in #(
'' | *[[!0-9]]*)
- AC_MSG_ERROR([invalid value: boost_major_version=$boost_major_version])
+ AC_MSG_ERROR([invalid value: boost_major_version='$boost_major_version'])
;;
esac
fi
@@ -225,6 +241,7 @@
CPPFLAGS=$boost_save_CPPFLAGS
])# BOOST_REQUIRE
+
# BOOST_STATIC()
# --------------
# Add the "--enable-static-boost" configure argument. If this argument is given
@@ -231,11 +248,12 @@
# on the command line, static versions of the libraries will be looked up.
AC_DEFUN([BOOST_STATIC],
[AC_ARG_ENABLE([static-boost],
- [AC_HELP_STRING([--enable-static-boost],
+ [AS_HELP_STRING([--enable-static-boost],
[Prefer the static boost libraries over the shared ones [no]])],
[enable_static_boost=yes],
[enable_static_boost=no])])# BOOST_STATIC
+
# BOOST_FIND_HEADER([HEADER-NAME], [ACTION-IF-NOT-FOUND], [ACTION-IF-FOUND])
# --------------------------------------------------------------------------
# Wrapper around AC_CHECK_HEADER for Boost headers. Useful to check for
@@ -268,14 +286,16 @@
])# BOOST_FIND_HEADER
-# BOOST_FIND_LIB([LIB-NAME], [PREFERRED-RT-OPT], [HEADER-NAME], [CXX-TEST],
-# [CXX-PROLOGUE])
-# -------------------------------------------------------------------------
-# Look for the Boost library LIB-NAME (e.g., LIB-NAME = `thread', for
-# libboost_thread). Check that HEADER-NAME works and check that
-# libboost_LIB-NAME can link with the code CXX-TEST. The optional argument
-# CXX-PROLOGUE can be used to include some C++ code before the `main'
-# function.
+# BOOST_FIND_LIBS([COMPONENT-NAME], [CANDIDATE-LIB-NAMES],
+# [PREFERRED-RT-OPT], [HEADER-NAME], [CXX-TEST],
+# [CXX-PROLOGUE])
+# --------------------------------------------------------------
+# Look for the Boost library COMPONENT-NAME (e.g., `thread', for
+# libboost_thread) under the possible CANDIDATE-LIB-NAMES (e.g.,
+# "thread_win32 thread"). Check that HEADER-NAME works and check that
+# libboost_LIB-NAME can link with the code CXX-TEST. The optional
+# argument CXX-PROLOGUE can be used to include some C++ code before
+# the `main' function.
#
# Invokes BOOST_FIND_HEADER([HEADER-NAME]) (see above).
#
@@ -289,7 +309,7 @@
# builds. Some sample values for PREFERRED-RT-OPT: (nothing), mt, d, mt-d, gdp
# ... If you want to make sure you have a specific version of Boost
# (eg, >= 1.33) you *must* invoke BOOST_REQUIRE before this macro.
-AC_DEFUN([BOOST_FIND_LIB],
+AC_DEFUN([BOOST_FIND_LIBS],
[AC_REQUIRE([BOOST_REQUIRE])dnl
AC_REQUIRE([_BOOST_FIND_COMPILER_TAG])dnl
AC_REQUIRE([BOOST_STATIC])dnl
@@ -297,28 +317,68 @@
if test x"$boost_cv_inc_path" = xno; then
AC_MSG_NOTICE([Boost not available, not searching for the Boost $1 library])
else
-dnl The else branch is huge and wasn't intended on purpose.
+dnl The else branch is huge and wasn't indented on purpose.
AC_LANG_PUSH([C++])dnl
AS_VAR_PUSHDEF([Boost_lib], [boost_cv_lib_$1])dnl
AS_VAR_PUSHDEF([Boost_lib_LDFLAGS], [boost_cv_lib_$1_LDFLAGS])dnl
AS_VAR_PUSHDEF([Boost_lib_LDPATH], [boost_cv_lib_$1_LDPATH])dnl
AS_VAR_PUSHDEF([Boost_lib_LIBS], [boost_cv_lib_$1_LIBS])dnl
-BOOST_FIND_HEADER([$3])
+BOOST_FIND_HEADER([$4])
boost_save_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
-# Now let's try to find the library. The algorithm is as follows: first look
-# for a given library name according to the user's PREFERRED-RT-OPT. For each
-# library name, we prefer to use the ones that carry the tag (toolset name).
-# Each library is searched through the various standard paths were Boost is
-# usually installed. If we can't find the standard variants, we try to
-# enforce -mt (for instance on MacOSX, libboost_threads.dylib doesn't exist
-# but there's -obviously- libboost_threads-mt.dylib).
AC_CACHE_CHECK([for the Boost $1 library], [Boost_lib],
- [Boost_lib=no
- case "$2" in #(
- mt | mt-) boost_mt=-mt; boost_rtopt=;; #(
- mt* | mt-*) boost_mt=-mt; boost_rtopt=`expr "X$2" : 'Xmt-*\(.*\)'`;; #(
- *) boost_mt=; boost_rtopt=$2;;
+ [_BOOST_FIND_LIBS($@)])
+case $Boost_lib in #(
+ (yes) _AC_MSG_LOG_CONFTEST
+ AC_DEFINE(AS_TR_CPP([HAVE_BOOST_$1]), [1], [Defined if the Boost $1 library is available])dnl
+ AC_SUBST(AS_TR_CPP([BOOST_$1_LDFLAGS]), [$Boost_lib_LDFLAGS])dnl
+ AC_SUBST(AS_TR_CPP([BOOST_$1_LDPATH]), [$Boost_lib_LDPATH])dnl
+ AC_SUBST([BOOST_LDPATH], [$Boost_lib_LDPATH])dnl
+ AC_SUBST(AS_TR_CPP([BOOST_$1_LIBS]), [$Boost_lib_LIBS])dnl
+ ;;
+ (no) _AC_MSG_LOG_CONFTEST
+ AC_MSG_ERROR([cannot find flags to link with the Boost $1 library (libboost-$1)])
+ ;;
+esac
+CPPFLAGS=$boost_save_CPPFLAGS
+AS_VAR_POPDEF([Boost_lib])dnl
+AS_VAR_POPDEF([Boost_lib_LDFLAGS])dnl
+AS_VAR_POPDEF([Boost_lib_LDPATH])dnl
+AS_VAR_POPDEF([Boost_lib_LIBS])dnl
+AC_LANG_POP([C++])dnl
+fi
+])
+
+
+# BOOST_FIND_LIB([LIB-NAME],
+# [PREFERRED-RT-OPT], [HEADER-NAME], [CXX-TEST],
+# [CXX-PROLOGUE])
+# --------------------------------------------------------------
+# Backward compatibility wrapper for BOOST_FIND_LIBS.
+AC_DEFUN([BOOST_FIND_LIB],
+[BOOST_FIND_LIBS([$1], $@)])
+
+
+# _BOOST_FIND_LIBS([LIB-NAME], [CANDIDATE-LIB-NAMES],
+# [PREFERRED-RT-OPT], [HEADER-NAME], [CXX-TEST],
+# [CXX-PROLOGUE])
+# --------------------------------------------------------------
+# Real implementation of BOOST_FIND_LIBS: rely on these local macros:
+# Boost_lib, Boost_lib_LDFLAGS, Boost_lib_LDPATH, Boost_lib_LIBS
+#
+# The algorithm is as follows: first look for a given library name
+# according to the user's PREFERRED-RT-OPT. For each library name, we
+# prefer to use the ones that carry the tag (toolset name). Each
+# library is searched through the various standard paths were Boost is
+# usually installed. If we can't find the standard variants, we try
+# to enforce -mt (for instance on MacOSX, libboost_thread.dylib
+# doesn't exist but there's -obviously- libboost_thread-mt.dylib).
+AC_DEFUN([_BOOST_FIND_LIBS],
+[Boost_lib=no
+ case "$3" in #(
+ (mt | mt-) boost_mt=-mt; boost_rtopt=;; #(
+ (mt* | mt-*) boost_mt=-mt; boost_rtopt=`expr "X$3" : 'Xmt-*\(.*\)'`;; #(
+ (*) boost_mt=; boost_rtopt=$3;;
esac
if test $enable_static_boost = yes; then
boost_rtopt="s$boost_rtopt"
@@ -325,10 +385,10 @@
fi
# Find the proper debug variant depending on what we've been asked to find.
case $boost_rtopt in #(
- *d*) boost_rt_d=$boost_rtopt;; #(
- *[[sgpn]]*) # Insert the `d' at the right place (in between `sg' and `pn')
+ (*d*) boost_rt_d=$boost_rtopt;; #(
+ (*[[sgpn]]*) # Insert the `d' at the right place (in between `sg' and `pn')
boost_rt_d=`echo "$boost_rtopt" | sed 's/\(s*g*\)\(p*n*\)/\1\2/'`;; #(
- *) boost_rt_d='-d';;
+ (*) boost_rt_d='-d';;
esac
# If the PREFERRED-RT-OPT are not empty, prepend a `-'.
test -n "$boost_rtopt" && boost_rtopt="-$boost_rtopt"
@@ -339,8 +399,9 @@
AC_MSG_ERROR([the libext variable is empty, did you invoke Libtool?])
boost_save_ac_objext=$ac_objext
# Generate the test file.
- AC_LANG_CONFTEST([AC_LANG_PROGRAM([#include <$3>
-$5], [$4])])
+ AC_LANG_CONFTEST([AC_LANG_PROGRAM([$7
+#include <$4>
+$6], [$5])])
dnl Optimization hacks: compiling C++ is slow, especially with Boost. What
dnl we're trying to do here is guess the right combination of link flags
dnl (LIBS / LDFLAGS) to use a given library. This can take several
@@ -362,21 +423,25 @@
[AC_MSG_ERROR([cannot compile a test that uses Boost $1])])
ac_objext=$boost_save_ac_objext
boost_failed_libs=
-# Don't bother to ident the 6 nested for loops, only the 2 innermost ones
-# matter.
+# Don't bother to ident the following nested for loops, only the 2
+# innermost ones matter.
+for boost_lib_ in $2; do
for boost_tag_ in -$boost_cv_lib_tag ''; do
for boost_ver_ in -$boost_cv_lib_version ''; do
for boost_mt_ in $boost_mt -mt ''; do
for boost_rtopt_ in $boost_rtopt '' -d; do
- for boost_lib in \
- boost_$1$boost_tag_$boost_mt_$boost_rtopt_$boost_ver_ \
- boost_$1$boost_tag_$boost_rtopt_$boost_ver_ \
- boost_$1$boost_tag_$boost_mt_$boost_ver_ \
- boost_$1$boost_tag_$boost_ver_
+ for boost_full_suffix in \
+ $boost_last_suffix \
+ x$boost_tag_$boost_mt_$boost_rtopt_$boost_ver_ \
+ x$boost_tag_$boost_rtopt_$boost_ver_ \
+ x$boost_tag_$boost_mt_$boost_ver_ \
+ x$boost_tag_$boost_ver_
do
+ boost_real_suffix=`echo "$boost_full_suffix" | sed 's/^x//'`
+ boost_lib="boost_$boost_lib_$boost_real_suffix"
# Avoid testing twice the same lib
case $boost_failed_libs in #(
- *@$boost_lib@*) continue;;
+ (*@$boost_lib@*) continue;;
esac
# If with_boost is empty, we'll search in /lib first, which is not quite
# right so instead we'll try to a location based on where the headers are.
@@ -386,14 +451,17 @@
/opt/local/lib* /usr/local/lib* /opt/lib* /usr/lib* \
"$with_boost" C:/Boost/lib /lib*
do
- test -e "$boost_ldpath" || continue
+ # Don't waste time with directories that don't exist.
+ if test x"$boost_ldpath" != x && test ! -e "$boost_ldpath"; then
+ continue
+ fi
boost_save_LDFLAGS=$LDFLAGS
# Are we looking for a static library?
case $boost_ldpath:$boost_rtopt_ in #(
- *?*:*s*) # Yes (Non empty boost_ldpath + s in rt opt)
+ (*?*:*s*) # Yes (Non empty boost_ldpath + s in rt opt)
Boost_lib_LIBS="$boost_ldpath/lib$boost_lib.$libext"
test -e "$Boost_lib_LIBS" || continue;; #(
- *) # No: use -lboost_foo to find the shared library.
+ (*) # No: use -lboost_foo to find the shared library.
Boost_lib_LIBS="-l$boost_lib";;
esac
boost_save_LIBS=$LIBS
@@ -407,9 +475,36 @@
LDFLAGS=$boost_save_LDFLAGS
LIBS=$boost_save_LIBS
if test x"$Boost_lib" = xyes; then
- Boost_lib_LDFLAGS="-L$boost_ldpath -Wl,-R$boost_ldpath"
+ # Check or used cached result of whether or not using -R or
+ # -rpath makes sense. Some implementations of ld, such as for
+ # Mac OSX, require -rpath but -R is the flag known to work on
+ # other systems. https://github.com/tsuna/boost.m4/issues/19
+ AC_CACHE_VAL([boost_cv_rpath_link_ldflag],
+ [case $boost_ldpath in
+ '') # Nothing to do.
+ boost_cv_rpath_link_ldflag=
+ boost_rpath_link_ldflag_found=yes;;
+ *)
+ for boost_cv_rpath_link_ldflag in -Wl,-R, -Wl,-rpath,; do
+ LDFLAGS="$boost_save_LDFLAGS -L$boost_ldpath $boost_cv_rpath_link_ldflag$boost_ldpath"
+ LIBS="$Boost_lib_LIBS $boost_save_LIBS"
+ _BOOST_AC_LINK_IFELSE([],
+ [boost_rpath_link_ldflag_found=yes
+ break],
+ [boost_rpath_link_ldflag_found=no])
+ done
+ ;;
+ esac
+ AS_IF([test "x$boost_rpath_link_ldflag_found" != "xyes"],
+ [AC_MSG_ERROR([Unable to determine whether to use -R or -rpath])])
+ LDFLAGS=$boost_save_LDFLAGS
+ LIBS=$boost_save_LIBS
+ ])
+ test x"$boost_ldpath" != x &&
+ Boost_lib_LDFLAGS="-L$boost_ldpath $boost_cv_rpath_link_ldflag$boost_ldpath"
Boost_lib_LDPATH="$boost_ldpath"
- break 6
+ boost_last_suffix="$boost_full_suffix"
+ break 7
else
boost_failed_libs="$boost_failed_libs@$boost_lib@"
fi
@@ -419,27 +514,12 @@
done
done
done
+done # boost_lib_
rm -f conftest.$ac_objext
])
-case $Boost_lib in #(
- no) _AC_MSG_LOG_CONFTEST
- AC_MSG_ERROR([cannot find the flags to link with Boost $1])
- ;;
-esac
-AC_SUBST(AS_TR_CPP([BOOST_$1_LDFLAGS]), [$Boost_lib_LDFLAGS])dnl
-AC_SUBST(AS_TR_CPP([BOOST_$1_LDPATH]), [$Boost_lib_LDPATH])dnl
-AC_SUBST([BOOST_LDPATH], [$Boost_lib_LDPATH])dnl
-AC_SUBST(AS_TR_CPP([BOOST_$1_LIBS]), [$Boost_lib_LIBS])dnl
-CPPFLAGS=$boost_save_CPPFLAGS
-AS_VAR_POPDEF([Boost_lib])dnl
-AS_VAR_POPDEF([Boost_lib_LDFLAGS])dnl
-AS_VAR_POPDEF([Boost_lib_LDPATH])dnl
-AS_VAR_POPDEF([Boost_lib_LIBS])dnl
-AC_LANG_POP([C++])dnl
-fi
-])# BOOST_FIND_LIB
+
# --------------------------------------- #
# Checks for the various Boost libraries. #
# --------------------------------------- #
@@ -462,6 +542,14 @@
])
])
+
+# BOOST_ANY()
+# ------------
+# Look for Boost.Any
+BOOST_DEFUN([Any],
+[BOOST_FIND_HEADER([boost/any.hpp])])
+
+
# BOOST_ARRAY()
# -------------
# Look for Boost.Array
@@ -476,23 +564,61 @@
[AC_REQUIRE([BOOST_SYSTEM])dnl
BOOST_FIND_HEADER([boost/asio.hpp])])
+# BOOST_BIMAP()
+# ------------
+# Look for Boost.Bimap
+BOOST_DEFUN([Bimap],
+[BOOST_FIND_HEADER([boost/bimap.hpp])])
+
+# BOOST_ASSIGN()
+# -------------
+# Look for Boost.Assign
+BOOST_DEFUN([Assign],
+[BOOST_FIND_HEADER([boost/assign.hpp])])
+
+
+# BOOST_ATOMIC([PREFERRED-RT-OPT])
+# -------------------------------
+# Look for Boost.Atomic. For the documentation of PREFERRED-RT-OPT, see the
+# documentation of BOOST_FIND_LIB above.
+BOOST_DEFUN([Atomic],
+[BOOST_FIND_LIB([atomic], [$1],
+ [boost/atomic.hpp],
+ [boost::atomic<int> a;],
+ [ ],
+ [#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_STDINT_H
+#include <stdint.h>
+#endif])
+])# BOOST_ATOMIC
+
+
# BOOST_BIND()
# ------------
-# Look for Boost.Bind
+# Look for Boost.Bind.
BOOST_DEFUN([Bind],
[BOOST_FIND_HEADER([boost/bind.hpp])])
+# BOOST_CAST()
+# ------------
+# Look for Boost.Cast
+BOOST_DEFUN([Cast],
+[BOOST_FIND_HEADER([boost/cast.hpp])])
+
+
# BOOST_CHRONO()
-# ------------------
-# Look for Boost.Chrono
+# --------------
+# Look for Boost.Chrono.
BOOST_DEFUN([Chrono],
[# Do we have to check for Boost.System? This link-time dependency was
# added as of 1.35.0. If we have a version <1.35, we must not attempt to
# find Boost.System as it didn't exist by then.
if test $boost_major_version -ge 135; then
-BOOST_SYSTEM([$1])
+ BOOST_SYSTEM([$1])
fi # end of the Boost.System check.
boost_filesystem_save_LIBS=$LIBS
boost_filesystem_save_LDFLAGS=$LDFLAGS
@@ -503,14 +629,92 @@
[boost/chrono.hpp],
[boost::chrono::thread_clock d;])
if test $enable_static_boost = yes && test $boost_major_version -ge 135; then
- AC_SUBST([BOOST_FILESYSTEM_LIBS], ["$BOOST_FILESYSTEM_LIBS $BOOST_SYSTEM_LIBS"])
+ BOOST_CHRONO_LIBS="$BOOST_CHRONO_LIBS $BOOST_SYSTEM_LIBS"
fi
LIBS=$boost_filesystem_save_LIBS
-LDFLAGS=$boost_filesystem_save_LDFLAGS
-
+LDFLAGS=$boost_filesystem_save_LDFLAGS
])# BOOST_CHRONO
+# BOOST_CONTEXT([PREFERRED-RT-OPT])
+# -----------------------------------
+# Look for Boost.Context. For the documentation of PREFERRED-RT-OPT, see the
+# documentation of BOOST_FIND_LIB above.
+#
+# * This library was introduced in Boost 1.51.0
+# * The signatures of make_fcontext() and jump_fcontext were changed in 1.56.0
+# * A dependency on boost_thread appears in 1.57.0
+BOOST_DEFUN([Context],
+[boost_context_save_LIBS=$LIBS
+ boost_context_save_LDFLAGS=$LDFLAGS
+if test $boost_major_version -ge 157; then
+ BOOST_THREAD([$1])
+ m4_pattern_allow([^BOOST_THREAD_(LIBS|LDFLAGS)$])dnl
+ LIBS="$LIBS $BOOST_THREAD_LIBS"
+ LDFLAGS="$LDFLAGS $BOOST_THREAD_LDFLAGS"
+fi
+BOOST_FIND_LIB([context], [$1],
+ [boost/context/fcontext.hpp],[[
+
+// creates a stack
+void * stack_pointer = new void*[4096];
+std::size_t const size = sizeof(void*[4096]);
+
+#if BOOST_VERSION <= 105100
+ctx::make_fcontext(&fc, f);
+return ctx::jump_fcontext(&fcm, &fc, 3) == 6;
+
+#else
+
+fc = ctx::make_fcontext(stack_pointer, size, f);
+return ctx::jump_fcontext(&fcm, fc, 3) == 6;
+
+#endif
+
+
+]],[dnl
+
+#include <boost/version.hpp>
+#if BOOST_VERSION <= 105100
+
+namespace ctx = boost::ctx;
+
+static ctx::fcontext_t fcm, fc;
+
+static void f(intptr_t i) {
+ ctx::jump_fcontext(&fc, &fcm, i * 2);
+}
+
+#elif BOOST_VERSION <= 105500
+
+namespace ctx = boost::context;
+
+// context
+static ctx::fcontext_t fcm, *fc;
+
+// context-function
+static void f(intptr_t i) {
+ ctx::jump_fcontext(fc, &fcm, i * 2);
+}
+
+#else
+
+namespace ctx = boost::context;
+
+// context
+static ctx::fcontext_t fcm, fc;
+
+// context-function
+static void f(intptr_t i) {
+ ctx::jump_fcontext(&fc, fcm, i * 2);
+}
+#endif
+])
+LIBS=$boost_context_save_LIBS
+LDFLAGS=$boost_context_save_LDFLAGS
+])# BOOST_CONTEXT
+
+
# BOOST_CONVERSION()
# ------------------
# Look for Boost.Conversion (cast / lexical_cast)
@@ -520,6 +724,63 @@
])# BOOST_CONVERSION
+# BOOST_COROUTINE([PREFERRED-RT-OPT])
+# -----------------------------------
+# Look for Boost.Coroutine. For the documentation of PREFERRED-RT-OPT, see the
+# documentation of BOOST_FIND_LIB above. This library was introduced in Boost
+# 1.53.0
+BOOST_DEFUN([Coroutine],
+[
+boost_coroutine_save_LIBS=$LIBS
+boost_coroutine_save_LDFLAGS=$LDFLAGS
+# Link-time dependency from coroutine to context
+BOOST_CONTEXT([$1])
+# Starting from Boost 1.55 a dependency on Boost.System is added
+if test $boost_major_version -ge 155; then
+ BOOST_SYSTEM([$1])
+fi
+m4_pattern_allow([^BOOST_(CONTEXT|SYSTEM)_(LIBS|LDFLAGS)])
+LIBS="$LIBS $BOOST_CONTEXT_LIBS $BOOST_SYSTEM_LIBS"
+LDFLAGS="$LDFLAGS $BOOST_CONTEXT_LDFLAGS"
+
+# in 1.53 coroutine was a header only library
+if test $boost_major_version -eq 153; then
+ BOOST_FIND_HEADER([boost/coroutine/coroutine.hpp])
+else
+ BOOST_FIND_LIB([coroutine], [$1],
+ [boost/coroutine/coroutine.hpp],
+ [
+ #include <boost/version.hpp>
+ #if BOOST_VERSION <= 105500
+ boost::coroutines::coroutine<int(int)> coro; coro.get();
+ #else
+ boost::coroutines::asymmetric_coroutine<int>::pull_type coro; coro.get();
+ #endif
+ ])
+fi
+# Link-time dependency from coroutine to context, existed only in 1.53, in 1.54
+# coroutine doesn't use context from its headers but from its library.
+if test $boost_major_version -eq 153 || test $enable_static_boost = yes && test $boost_major_version -ge 154; then
+ BOOST_COROUTINE_LIBS="$BOOST_COROUTINE_LIBS $BOOST_CONTEXT_LIBS"
+ BOOST_COROUTINE_LDFLAGS="$BOOST_COROUTINE_LDFLAGS $BOOST_CONTEXT_LDFLAGS"
+fi
+if test $enable_static_boost = yes && test $boost_major_version -ge 155; then
+ BOOST_COROUTINE_LIBS="$BOOST_COROUTINE_LIBS $BOOST_SYSTEM_LIBS"
+ BOOST_COROUTINE_LDFLAGS="$BOOST_COROUTINE_LDFLAGS $BOOST_SYSTEM_LDFLAGS"
+fi
+LIBS=$boost_coroutine_save_LIBS
+LDFLAGS=$boost_coroutine_save_LDFLAGS
+])# BOOST_COROUTINE
+
+
+# BOOST_CRC()
+# -----------
+# Look for Boost.CRC
+BOOST_DEFUN([CRC],
+[BOOST_FIND_HEADER([boost/crc.hpp])
+])# BOOST_CRC
+
+
# BOOST_DATE_TIME([PREFERRED-RT-OPT])
# -----------------------------------
# Look for Boost.Date_Time. For the documentation of PREFERRED-RT-OPT, see the
@@ -531,6 +792,13 @@
])# BOOST_DATE_TIME
+# BOOST_EXCEPTION()
+# ------------
+# Look for Boost.Exception
+BOOST_DEFUN([Exception],
+[BOOST_FIND_HEADER([boost/exception/all.hpp])])
+
+
# BOOST_FILESYSTEM([PREFERRED-RT-OPT])
# ------------------------------------
# Look for Boost.Filesystem. For the documentation of PREFERRED-RT-OPT, see
@@ -542,7 +810,7 @@
# added as of 1.35.0. If we have a version <1.35, we must not attempt to
# find Boost.System as it didn't exist by then.
if test $boost_major_version -ge 135; then
-BOOST_SYSTEM([$1])
+ BOOST_SYSTEM([$1])
fi # end of the Boost.System check.
boost_filesystem_save_LIBS=$LIBS
boost_filesystem_save_LDFLAGS=$LDFLAGS
@@ -552,7 +820,7 @@
BOOST_FIND_LIB([filesystem], [$1],
[boost/filesystem/path.hpp], [boost::filesystem::path p;])
if test $enable_static_boost = yes && test $boost_major_version -ge 135; then
- AC_SUBST([BOOST_FILESYSTEM_LIBS], ["$BOOST_FILESYSTEM_LIBS $BOOST_SYSTEM_LIBS"])
+ BOOST_FILESYSTEM_LIBS="$BOOST_FILESYSTEM_LIBS $BOOST_SYSTEM_LIBS"
fi
LIBS=$boost_filesystem_save_LIBS
LDFLAGS=$boost_filesystem_save_LDFLAGS
@@ -559,9 +827,20 @@
])# BOOST_FILESYSTEM
+# BOOST_FLYWEIGHT()
+# -----------------
+# Look for Boost.Flyweight.
+BOOST_DEFUN([Flyweight],
+[dnl There's a hidden dependency on pthreads.
+AC_REQUIRE([_BOOST_PTHREAD_FLAG])dnl
+BOOST_FIND_HEADER([boost/flyweight.hpp])
+AC_SUBST([BOOST_FLYWEIGHT_LIBS], [$boost_cv_pthread_flag])
+])
+
+
# BOOST_FOREACH()
# ---------------
-# Look for Boost.Foreach
+# Look for Boost.Foreach.
BOOST_DEFUN([Foreach],
[BOOST_FIND_HEADER([boost/foreach.hpp])])
@@ -568,7 +847,7 @@
# BOOST_FORMAT()
# --------------
-# Look for Boost.Format
+# Look for Boost.Format.
# Note: we can't check for boost/format/format_fwd.hpp because the header isn't
# standalone. It can't be compiled because it triggers the following error:
# boost/format/detail/config_macros.hpp:88: error: 'locale' in namespace 'std'
@@ -584,16 +863,49 @@
[BOOST_FIND_HEADER([boost/function.hpp])])
+# BOOST_FUSION()
+# -----------------
+# Look for Boost.Fusion
+BOOST_DEFUN([Fusion],
+[BOOST_FIND_HEADER([boost/fusion/sequence.hpp])])
+
+
+# BOOST_GEOMETRY()
+# ----------------
+# Look for Boost.Geometry (new since 1.47.0).
+BOOST_DEFUN([Geometry],
+[BOOST_FIND_HEADER([boost/geometry.hpp])
+])# BOOST_GEOMETRY
+
+
# BOOST_GRAPH([PREFERRED-RT-OPT])
# -------------------------------
# Look for Boost.Graphs. For the documentation of PREFERRED-RT-OPT, see the
# documentation of BOOST_FIND_LIB above.
BOOST_DEFUN([Graph],
-[BOOST_FIND_LIB([graph], [$1],
+[boost_graph_save_LIBS=$LIBS
+boost_graph_save_LDFLAGS=$LDFLAGS
+# Link-time dependency from graph to regex was added as of 1.40.0.
+if test $boost_major_version -ge 140; then
+ BOOST_REGEX([$1])
+ m4_pattern_allow([^BOOST_REGEX_(LIBS|LDFLAGS)$])dnl
+ LIBS="$LIBS $BOOST_REGEX_LIBS"
+ LDFLAGS="$LDFLAGS $BOOST_REGEX_LDFLAGS"
+fi
+BOOST_FIND_LIB([graph], [$1],
[boost/graph/adjacency_list.hpp], [boost::adjacency_list<> g;])
+LIBS=$boost_graph_save_LIBS
+LDFLAGS=$boost_graph_save_LDFLAGS
])# BOOST_GRAPH
+# BOOST_HASH()
+# ------------
+# Look for Boost.Functional/Hash
+BOOST_DEFUN([Hash],
+[BOOST_FIND_HEADER([boost/functional/hash.hpp])])
+
+
# BOOST_IOSTREAMS([PREFERRED-RT-OPT])
# -----------------------------------
# Look for Boost.IOStreams. For the documentation of PREFERRED-RT-OPT, see the
@@ -605,11 +917,11 @@
])# BOOST_IOSTREAMS
-# BOOST_HASH()
+# BOOST_ITERATOR()
# ------------
-# Look for Boost.Functional/Hash
-BOOST_DEFUN([Hash],
-[BOOST_FIND_HEADER([boost/functional/hash.hpp])])
+# Look for Boost.Iterator
+BOOST_DEFUN([Iterator],
+[BOOST_FIND_HEADER([boost/iterator/iterator_adaptor.hpp])])
# BOOST_LAMBDA()
@@ -619,26 +931,64 @@
[BOOST_FIND_HEADER([boost/lambda/lambda.hpp])])
+# BOOST_LOCALE()
+# --------------
+# Look for Boost.Locale
+BOOST_DEFUN([Locale],
+[
+boost_locale_save_LIBS=$LIBS
+boost_locale_save_LDFLAGS=$LDFLAGS
+# require SYSTEM for boost-1.50.0 and up
+if test $boost_major_version -ge 150; then
+ BOOST_SYSTEM([$1])
+ m4_pattern_allow([^BOOST_SYSTEM_(LIBS|LDFLAGS)$])dnl
+ LIBS="$LIBS $BOOST_SYSTEM_LIBS"
+ LDFLAGS="$LDFLAGS $BOOST_SYSTEM_LDFLAGS"
+fi # end of the Boost.System check.
+BOOST_FIND_LIB([locale], [$1],
+ [boost/locale.hpp],
+ [[boost::locale::generator gen; std::locale::global(gen(""));]])
+LIBS=$boost_locale_save_LIBS
+LDFLAGS=$boost_locale_save_LDFLAGS
+])# BOOST_LOCALE
+
# BOOST_LOG([PREFERRED-RT-OPT])
# -----------------------------
-# Look for Boost.Log For the documentation of PREFERRED-RT-OPT, see the
+# Look for Boost.Log. For the documentation of PREFERRED-RT-OPT, see the
# documentation of BOOST_FIND_LIB above.
BOOST_DEFUN([Log],
-[BOOST_FIND_LIB([log], [$1],
+[boost_log_save_LIBS=$LIBS
+boost_log_save_LDFLAGS=$LDFLAGS
+BOOST_SYSTEM([$1])
+BOOST_FILESYSTEM([$1])
+BOOST_DATE_TIME([$1])
+m4_pattern_allow([^BOOST_(SYSTEM|FILESYSTEM|DATE_TIME)_(LIBS|LDFLAGS)$])dnl
+LIBS="$LIBS $BOOST_DATE_TIME_LIBS $BOOST_FILESYSTEM_LIBS $BOOST_SYSTEM_LIBS"
+LDFLAGS="$LDFLAGS $BOOST_DATE_TIME_LDFLAGS $BOOST_FILESYSTEM_LDFLAGS $BOOST_SYSTEM_LDFLAGS"
+BOOST_FIND_LIB([log], [$1],
[boost/log/core/core.hpp],
[boost::log::attribute a; a.get_value();])
+LIBS=$boost_log_save_LIBS
+LDFLAGS=$boost_log_save_LDFLAGS
])# BOOST_LOG
# BOOST_LOG_SETUP([PREFERRED-RT-OPT])
# -----------------------------------
-# Look for Boost.Log For the documentation of PREFERRED-RT-OPT, see the
+# Look for Boost.Log. For the documentation of PREFERRED-RT-OPT, see the
# documentation of BOOST_FIND_LIB above.
BOOST_DEFUN([Log_Setup],
-[AC_REQUIRE([BOOST_LOG])dnl
+[boost_log_setup_save_LIBS=$LIBS
+boost_log_setup_save_LDFLAGS=$LDFLAGS
+BOOST_LOG([$1])
+m4_pattern_allow([^BOOST_LOG_(LIBS|LDFLAGS)$])dnl
+LIBS="$LIBS $BOOST_LOG_LIBS"
+LDFLAGS="$LDFLAGS $BOOST_LOG_LDFLAGS"
BOOST_FIND_LIB([log_setup], [$1],
- [boost/log/utility/init/from_settings.hpp],
+ [boost/log/utility/setup/from_settings.hpp],
[boost::log::basic_settings<char> bs; bs.empty();])
+LIBS=$boost_log_setup_save_LIBS
+LDFLAGS=$boost_log_setup_save_LDFLAGS
])# BOOST_LOG_SETUP
@@ -654,6 +1004,36 @@
[BOOST_FIND_HEADER([boost/math/special_functions.hpp])])
+# BOOST_MPI([PREFERRED-RT-OPT])
+# -------------------------------
+# Look for Boost MPI. For the documentation of PREFERRED-RT-OPT, see the
+# documentation of BOOST_FIND_LIB above. Uses MPICXX variable if it is
+# set, otherwise tries CXX
+#
+BOOST_DEFUN([MPI],
+[boost_save_CXX=${CXX}
+boost_save_CXXCPP=${CXXCPP}
+if test x"${MPICXX}" != x; then
+ CXX=${MPICXX}
+ CXXCPP="${MPICXX} -E"
+fi
+BOOST_FIND_LIB([mpi], [$1],
+ [boost/mpi.hpp],
+ [int argc = 0;
+ char **argv = 0;
+ boost::mpi::environment env(argc,argv);])
+CXX=${boost_save_CXX}
+CXXCPP=${boost_save_CXXCPP}
+])# BOOST_MPI
+
+
+# BOOST_MPL()
+# ------------------
+# Look for Boost.MPL
+BOOST_DEFUN([MPL],
+[BOOST_FIND_HEADER([boost/mpl/for_each.hpp])])
+
+
# BOOST_MULTIARRAY()
# ------------------
# Look for Boost.MultiArray
@@ -661,6 +1041,21 @@
[BOOST_FIND_HEADER([boost/multi_array.hpp])])
+# BOOST_MULTIINDEXCCONTAINER()
+# ------------------
+# Look for Boost.MultiIndexContainer
+BOOST_DEFUN([MultiIndexContainer],
+[BOOST_FIND_HEADER([boost/multi_index_container.hpp])])
+
+
+# BOOST_NUMERIC_UBLAS()
+# --------------------------
+# Look for Boost.NumericUblas (Basic Linear Algebra)
+BOOST_DEFUN([Numeric_Ublas],
+[BOOST_FIND_HEADER([boost/numeric/ublas/vector.hpp])
+])# BOOST_NUMERIC_UBLAS
+
+
# BOOST_NUMERIC_CONVERSION()
# --------------------------
# Look for Boost.NumericConversion (policy-based numeric conversion)
@@ -683,6 +1078,30 @@
[BOOST_FIND_HEADER([boost/preprocessor/repeat.hpp])])
+# BOOST_PROPERTY_TREE([PREFERRED-RT-OPT])
+# -----------------------------------------
+# Look for Boost.Property_Tree. For the documentation of PREFERRED-RT-OPT,
+# see the documentation of BOOST_FIND_LIB above.
+BOOST_DEFUN([Property_Tree],
+[BOOST_FIND_LIB([property_tree], [$1],
+ [boost/property_tree/ptree.hpp],
+ [boost::property_tree::ptree pt; boost::property_tree::read_xml d("test", pt);])
+])# BOOST_PROPERTY_TREE
+
+
+# BOOST_RANDOM()
+# --------------------
+# Look for Boost.Random
+BOOST_DEFUN([Random],
+[BOOST_FIND_HEADER([boost/random/random_number_generator.hpp])])
+
+
+# BOOST_RANGE()
+# --------------------
+# Look for Boost.Range
+BOOST_DEFUN([Range],
+[BOOST_FIND_HEADER([boost/range/adaptors.hpp])])
+
# BOOST_UNORDERED()
# -----------------
# Look for Boost.Unordered
@@ -729,9 +1148,9 @@
_BOOST_PYTHON_CONFIG([LDFLAGS], [ldflags])
_BOOST_PYTHON_CONFIG([LIBS], [libs])
m4_pattern_allow([^BOOST_PYTHON_MODULE$])dnl
-BOOST_FIND_LIB([python], [$1],
- [boost/python.hpp],
- [], [BOOST_PYTHON_MODULE(empty) {}])
+BOOST_FIND_LIBS([python], [python python3], [$1],
+ [boost/python.hpp],
+ [], [BOOST_PYTHON_MODULE(empty) {}])
CPPFLAGS=$boost_python_save_CPPFLAGS
LDFLAGS=$boost_python_save_LDFLAGS
LIBS=$boost_python_save_LIBS
@@ -779,6 +1198,14 @@
])# BOOST_SIGNALS
+# BOOST_SIGNALS2()
+# ----------------
+# Look for Boost.Signals2 (new since 1.39.0).
+BOOST_DEFUN([Signals2],
+[BOOST_FIND_HEADER([boost/signals2.hpp])
+])# BOOST_SIGNALS2
+
+
# BOOST_SMART_PTR()
# -----------------
# Look for Boost.SmartPtr
@@ -829,19 +1256,18 @@
])# BOOST_TEST
-# BOOST_THREADS([PREFERRED-RT-OPT])
+# BOOST_THREAD([PREFERRED-RT-OPT])
# ---------------------------------
# Look for Boost.Thread. For the documentation of PREFERRED-RT-OPT, see the
# documentation of BOOST_FIND_LIB above.
-# FIXME: Provide an alias "BOOST_THREAD".
-BOOST_DEFUN([Threads],
+BOOST_DEFUN([Thread],
[dnl Having the pthread flag is required at least on GCC3 where
dnl boost/thread.hpp would complain if we try to compile without
dnl -pthread on GNU/Linux.
AC_REQUIRE([_BOOST_PTHREAD_FLAG])dnl
-boost_threads_save_LIBS=$LIBS
-boost_threads_save_LDFLAGS=$LDFLAGS
-boost_threads_save_CPPFLAGS=$CPPFLAGS
+boost_thread_save_LIBS=$LIBS
+boost_thread_save_LDFLAGS=$LDFLAGS
+boost_thread_save_CPPFLAGS=$CPPFLAGS
# Link-time dependency from thread to system was added as of 1.49.0.
if test $boost_major_version -ge 149; then
BOOST_SYSTEM([$1])
@@ -849,23 +1275,37 @@
m4_pattern_allow([^BOOST_SYSTEM_(LIBS|LDFLAGS)$])dnl
LIBS="$LIBS $BOOST_SYSTEM_LIBS $boost_cv_pthread_flag"
LDFLAGS="$LDFLAGS $BOOST_SYSTEM_LDFLAGS"
-# Yes, we *need* to put the -pthread thing in CPPFLAGS because with GCC3,
-# boost/thread.hpp will trigger a #error if -pthread isn't used:
-# boost/config/requires_threads.hpp:47:5: #error "Compiler threading support
-# is not turned on. Please set the correct command line options for
-# threading: -pthread (Linux), -pthreads (Solaris) or -mthreads (Mingw32)"
CPPFLAGS="$CPPFLAGS $boost_cv_pthread_flag"
-BOOST_FIND_LIB([thread], [$1],
- [boost/thread.hpp], [boost::thread t; boost::mutex m;])
-BOOST_THREAD_LIBS="$BOOST_THREAD_LIBS $BOOST_SYSTEM_LIBS $boost_cv_pthread_flag"
+
+# When compiling for the Windows platform, the threads library is named
+# differently. This suffix doesn't exist in new versions of Boost, or
+# possibly new versions of GCC on mingw I am assuming it's Boost's change for
+# now and I am setting version to 1.48, for lack of knowledge as to when this
+# change occurred.
+if test $boost_major_version -lt 148; then
+ case $host_os in
+ (*mingw*) boost_thread_lib_ext=_win32;;
+ esac
+fi
+BOOST_FIND_LIBS([thread], [thread$boost_thread_lib_ext],
+ [$1],
+ [boost/thread.hpp], [boost::thread t; boost::mutex m;])
+
+case $host_os in
+ (*mingw*) boost_thread_w32_socket_link=-lws2_32;;
+esac
+
+BOOST_THREAD_LIBS="$BOOST_THREAD_LIBS $BOOST_SYSTEM_LIBS $boost_cv_pthread_flag $boost_thread_w32_socket_link"
BOOST_THREAD_LDFLAGS="$BOOST_SYSTEM_LDFLAGS"
BOOST_CPPFLAGS="$BOOST_CPPFLAGS $boost_cv_pthread_flag"
-LIBS=$boost_threads_save_LIBS
-LDFLAGS=$boost_threads_save_LDFLAGS
-CPPFLAGS=$boost_threads_save_CPPFLAGS
-])# BOOST_THREADS
+LIBS=$boost_thread_save_LIBS
+LDFLAGS=$boost_thread_save_LDFLAGS
+CPPFLAGS=$boost_thread_save_CPPFLAGS
+])# BOOST_THREAD
+AU_ALIAS([BOOST_THREADS], [BOOST_THREAD])
+
# BOOST_TOKENIZER()
# -----------------
# Look for Boost.Tokenizer
@@ -912,10 +1352,23 @@
BOOST_FIND_HEADER([boost/variant.hpp])])
+# BOOST_POINTER_CONTAINER()
+# ------------------------
+# Look for Boost.PointerContainer
+BOOST_DEFUN([Pointer_Container],
+[BOOST_FIND_HEADER([boost/ptr_container/ptr_deque.hpp])
+BOOST_FIND_HEADER([boost/ptr_container/ptr_list.hpp])
+BOOST_FIND_HEADER([boost/ptr_container/ptr_vector.hpp])
+BOOST_FIND_HEADER([boost/ptr_container/ptr_array.hpp])
+BOOST_FIND_HEADER([boost/ptr_container/ptr_set.hpp])
+BOOST_FIND_HEADER([boost/ptr_container/ptr_map.hpp])
+])# BOOST_POINTER_CONTAINER
+
+
# BOOST_WAVE([PREFERRED-RT-OPT])
# ------------------------------
# NOTE: If you intend to use Wave/Spirit with thread support, make sure you
-# call BOOST_THREADS first.
+# call BOOST_THREAD first.
# Look for Boost.Wave. For the documentation of PREFERRED-RT-OPT, see the
# documentation of BOOST_FIND_LIB above.
BOOST_DEFUN([Wave],
@@ -950,8 +1403,16 @@
# _BOOST_PTHREAD_FLAG()
# ---------------------
-# Internal helper for BOOST_THREADS. Based on ACX_PTHREAD:
-# http://autoconf-archive.cryp.to/acx_pthread.html
+# Internal helper for BOOST_THREAD. Computes boost_cv_pthread_flag
+# which must be used in CPPFLAGS and LIBS.
+#
+# Yes, we *need* to put the -pthread thing in CPPFLAGS because with GCC3,
+# boost/thread.hpp will trigger a #error if -pthread isn't used:
+# boost/config/requires_threads.hpp:47:5: #error "Compiler threading support
+# is not turned on. Please set the correct command line options for
+# threading: -pthread (Linux), -pthreads (Solaris) or -mthreads (Mingw32)"
+#
+# Based on ACX_PTHREAD: http://autoconf-archive.cryp.to/acx_pthread.html
AC_DEFUN([_BOOST_PTHREAD_FLAG],
[AC_REQUIRE([AC_PROG_CXX])dnl
AC_REQUIRE([AC_CANONICAL_HOST])dnl
@@ -1019,7 +1480,15 @@
m4_define([_BOOST_gcc_test],
["defined __GNUC__ && __GNUC__ == $1 && __GNUC_MINOR__ == $2 && !defined __ICC @ gcc$1$2"])dnl
+# _BOOST_mingw_test(MAJOR, MINOR)
+# -----------------------------
+# Internal helper for _BOOST_FIND_COMPILER_TAG.
+m4_define([_BOOST_mingw_test],
+["defined __GNUC__ && __GNUC__ == $1 && __GNUC_MINOR__ == $2 && !defined __ICC && \
+ (defined WIN32 || defined WINNT || defined _WIN32 || defined __WIN32 \
+ || defined __WIN32__ || defined __WINNT || defined __WINNT__) @ mgw$1$2"])dnl
+
# _BOOST_FIND_COMPILER_TAG()
# --------------------------
# Internal. When Boost is installed without --layout=system, each library
@@ -1028,7 +1497,8 @@
AC_DEFUN([_BOOST_FIND_COMPILER_TAG],
[AC_REQUIRE([AC_PROG_CXX])dnl
AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_CACHE_CHECK([for the toolset name used by Boost for $CXX], [boost_cv_lib_tag],
+AC_CACHE_CHECK([for the toolset name used by Boost for $CXX],
+ [boost_cv_lib_tag],
[boost_cv_lib_tag=unknown
if test x$boost_cv_inc_path != xno; then
AC_LANG_PUSH([C++])dnl
@@ -1046,13 +1516,63 @@
# I'm not sure about my test for `il' (be careful: Intel's ICC pre-defines
# the same defines as GCC's).
for i in \
+ _BOOST_mingw_test(8, 2) \
+ _BOOST_gcc_test(8, 2) \
+ _BOOST_mingw_test(8, 1) \
+ _BOOST_gcc_test(8, 1) \
+ _BOOST_mingw_test(8, 0) \
+ _BOOST_gcc_test(8, 0) \
+ _BOOST_mingw_test(7, 3) \
+ _BOOST_gcc_test(7, 3) \
+ _BOOST_mingw_test(7, 2) \
+ _BOOST_gcc_test(7, 2) \
+ _BOOST_mingw_test(7, 1) \
+ _BOOST_gcc_test(7, 1) \
+ _BOOST_mingw_test(7, 0) \
+ _BOOST_gcc_test(7, 0) \
+ _BOOST_mingw_test(6, 4) \
+ _BOOST_gcc_test(6, 4) \
+ _BOOST_mingw_test(6, 3) \
+ _BOOST_gcc_test(6, 3) \
+ _BOOST_mingw_test(6, 2) \
+ _BOOST_gcc_test(6, 2) \
+ _BOOST_mingw_test(6, 1) \
+ _BOOST_gcc_test(6, 1) \
+ _BOOST_mingw_test(6, 0) \
+ _BOOST_gcc_test(6, 0) \
+ _BOOST_mingw_test(5, 5) \
+ _BOOST_gcc_test(5, 5) \
+ _BOOST_mingw_test(5, 4) \
+ _BOOST_gcc_test(5, 4) \
+ _BOOST_mingw_test(5, 3) \
+ _BOOST_gcc_test(5, 3) \
+ _BOOST_mingw_test(5, 2) \
+ _BOOST_gcc_test(5, 2) \
+ _BOOST_mingw_test(5, 1) \
+ _BOOST_gcc_test(5, 1) \
+ _BOOST_mingw_test(5, 0) \
+ _BOOST_gcc_test(5, 0) \
+ _BOOST_mingw_test(4, 10) \
+ _BOOST_gcc_test(4, 10) \
+ _BOOST_mingw_test(4, 9) \
+ _BOOST_gcc_test(4, 9) \
+ _BOOST_mingw_test(4, 8) \
+ _BOOST_gcc_test(4, 8) \
+ _BOOST_mingw_test(4, 7) \
_BOOST_gcc_test(4, 7) \
+ _BOOST_mingw_test(4, 6) \
_BOOST_gcc_test(4, 6) \
+ _BOOST_mingw_test(4, 5) \
_BOOST_gcc_test(4, 5) \
+ _BOOST_mingw_test(4, 4) \
_BOOST_gcc_test(4, 4) \
+ _BOOST_mingw_test(4, 3) \
_BOOST_gcc_test(4, 3) \
+ _BOOST_mingw_test(4, 2) \
_BOOST_gcc_test(4, 2) \
+ _BOOST_mingw_test(4, 1) \
_BOOST_gcc_test(4, 1) \
+ _BOOST_mingw_test(4, 0) \
_BOOST_gcc_test(4, 0) \
"defined __GNUC__ && __GNUC__ == 3 && !defined __ICC \
&& (defined WIN32 || defined WINNT || defined _WIN32 || defined __WIN32 \
@@ -1118,6 +1638,7 @@
# Thread) flavors of Boost. Sets boost_guess_use_mt accordingly.
AC_DEFUN([_BOOST_GUESS_WHETHER_TO_USE_MT],
[# Check whether we do better use `mt' even though we weren't ask to.
+AC_LANG_PUSH([C++])dnl
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#if defined _REENTRANT || defined _MT || defined __MT__
/* use -mt */
@@ -1125,6 +1646,7 @@
# error MT not needed
#endif
]])], [boost_guess_use_mt=:], [boost_guess_use_mt=false])
+AC_LANG_POP([C++])dnl
])
# _BOOST_AC_LINK_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
@@ -1148,11 +1670,11 @@
test -f conftest.$ac_objext && ac_ext=$ac_objext && boost_use_source=false &&
_AS_ECHO_LOG([re-using the existing conftest.$ac_objext])
AS_IF([_AC_DO_STDERR($ac_link) && {
- test -z "$ac_[]_AC_LANG_ABBREV[]_werror_flag" ||
- test ! -s conftest.err
+ test -z "$ac_[]_AC_LANG_ABBREV[]_werror_flag" ||
+ test ! -s conftest.err
} && test -s conftest$ac_exeext && {
- test "$cross_compiling" = yes ||
- $as_executable_p conftest$ac_exeext
+ test "$cross_compiling" = yes ||
+ $as_executable_p conftest$ac_exeext
dnl FIXME: use AS_TEST_X instead when 2.61 is widespread enough.
}],
[$2],
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: Basile S. <ba...@st...> - 2013-04-16 19:22:36
|
Hello All, How should I code an EHS server serving pages all having the same prefix, i.e. foo/ so http://localhost:8087/foo/bar and http://localhost:8087/foo/ would both be accepted, but http://localhost:8087/gee would be not found (404 HTTP error)? The reason I would like such a common prefix is because I might use some redirection on a real web server (lighttpd) to redirect all urls like http://myhome.org/foo/ to http://localhost:8087/foo/ while having other contents (like http://myhome.org/index.html) handled by the lighttpd server. BTW (and I have reported that privately) it would be much better if all the internal #include-s for EHS where using #include "somepath.h" not #include <somepath.h>. I also would like the debug message to be disabled with some variable. The attached patch to EHS trunk svn rev 162 is providing both. Cheers. -- Basile STARYNKEVITCH http://starynkevitch.net/Basile/ email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359 8, rue de la Faiencerie, 92340 Bourg La Reine, France *** opinions {are only mines, sont seulement les miennes} *** |
|
From: <vax...@us...> - 2013-04-11 08:44:23
|
Revision: 164
http://sourceforge.net/p/ehs/code/164
Author: vaxpower
Date: 2013-04-11 08:44:21 +0000 (Thu, 11 Apr 2013)
Log Message:
-----------
- Added missing assignment operator for unsigned int
Modified Paths:
--------------
trunk/datum.cpp
trunk/datum.h
Modified: trunk/datum.cpp
===================================================================
--- trunk/datum.cpp 2013-03-05 13:49:06 UTC (rev 163)
+++ trunk/datum.cpp 2013-04-11 08:44:21 UTC (rev 164)
@@ -54,6 +54,14 @@
return *this;
}
+Datum & Datum::operator= ( unsigned int inUI )
+{
+ char psBuffer [ 100 ];
+ sprintf ( psBuffer, "%u", inUI );
+ sDatum = psBuffer;
+ return *this;
+}
+
Datum & Datum::operator= ( int inInt )
{
char psBuffer [ 100 ];
Modified: trunk/datum.h
===================================================================
--- trunk/datum.h 2013-03-05 13:49:06 UTC (rev 163)
+++ trunk/datum.h 2013-04-11 08:44:21 UTC (rev 164)
@@ -56,6 +56,9 @@
/// assignment operator for longs
Datum & operator= ( long inLong );
+ /// assignment operator for unsigned int
+ Datum & operator= ( unsigned int inUI );
+
/// assignment operator for ints
Datum & operator= ( int inInt );
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vax...@us...> - 2013-03-05 13:49:08
|
Revision: 163
http://sourceforge.net/p/ehs/code/163
Author: vaxpower
Date: 2013-03-05 13:49:06 +0000 (Tue, 05 Mar 2013)
Log Message:
-----------
- Fixed OSX build issue
Modified Paths:
--------------
trunk/conf/authors.xml
trunk/staticssllocking.cpp
Modified: trunk/conf/authors.xml
===================================================================
--- trunk/conf/authors.xml 2013-02-27 00:34:38 UTC (rev 162)
+++ trunk/conf/authors.xml 2013-03-05 13:49:06 UTC (rev 163)
@@ -4,4 +4,7 @@
<author uid="felfert">
Fritz Elfert <eh...@fr...>
</author>
+ <author uid="vaxpower">
+ Michael Kukat <eh...@ku...>
+ </author>
</authors>
Modified: trunk/staticssllocking.cpp
===================================================================
--- trunk/staticssllocking.cpp 2013-02-27 00:34:38 UTC (rev 162)
+++ trunk/staticssllocking.cpp 2013-03-05 13:49:06 UTC (rev 163)
@@ -53,7 +53,12 @@
unsigned long StaticSslLocking::SslThreadIdCallback ( )
{
+#ifdef __APPLE__
+ // TODO pthread_t is a pointer on OSX, so this conversion is everything else than clean
+ return reinterpret_cast<unsigned long>(THREADID(pthread_self()));
+#else // __APPLE__
return static_cast<unsigned long>(THREADID(pthread_self()));
+#endif // __APPLE__
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <fe...@us...> - 2013-02-27 00:34:45
|
Revision: 162
http://ehs.svn.sourceforge.net/ehs/?rev=162&view=rev
Author: felfert
Date: 2013-02-27 00:34:38 +0000 (Wed, 27 Feb 2013)
Log Message:
-----------
- Don't check for boost system lib with boost 1.48 or below
- Fixed an effective c++ warning
Modified Paths:
--------------
trunk/configure.ac
trunk/ehs.cpp
Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac 2013-02-27 00:02:04 UTC (rev 161)
+++ trunk/configure.ac 2013-02-27 00:34:38 UTC (rev 162)
@@ -241,7 +241,10 @@
BOOST_STATIC
BOOST_REQUIRE([1.33.1])
BOOST_REGEX([mt])
+dnl With newer boost, we need boost_system as well
+if test $boost_major_version -gt 148; then
BOOST_SYSTEM([mt])
+fi
dnl Check for boost::lock_guard
Modified: trunk/ehs.cpp
===================================================================
--- trunk/ehs.cpp 2013-02-27 00:02:04 UTC (rev 161)
+++ trunk/ehs.cpp 2013-02-27 00:34:38 UTC (rev 162)
@@ -192,6 +192,7 @@
m_nRemotePort(ipoNetworkAbstraction->GetRemotePort()),
m_nLocalPort(ipoNetworkAbstraction->GetLocalPort()),
m_nMaxRequestSize(MAX_REQUEST_SIZE_DEFAULT),
+ m_sParseContentType(""),
m_oMutex(pthread_mutex_t())
{
UpdateLastActivity();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <fe...@us...> - 2013-02-27 00:02:26
|
Revision: 161
http://ehs.svn.sourceforge.net/ehs/?rev=161&view=rev
Author: felfert
Date: 2013-02-27 00:02:04 +0000 (Wed, 27 Feb 2013)
Log Message:
-----------
- Applied fixes for some race conditions by Michael Kukat
- Added new feature to limit multipart parsing to specific content types by Michael Kukat
- Adaptions to newer boost resp. gcc.
Modified Paths:
--------------
trunk/configure.ac
trunk/ehs.cpp
trunk/ehs_development_guide.txt
trunk/ehsconnection.h
trunk/httprequest.cpp
trunk/httprequest.h
trunk/samples/Makefile.am
Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac 2012-08-07 13:36:13 UTC (rev 160)
+++ trunk/configure.ac 2013-02-27 00:02:04 UTC (rev 161)
@@ -241,6 +241,7 @@
BOOST_STATIC
BOOST_REQUIRE([1.33.1])
BOOST_REGEX([mt])
+BOOST_SYSTEM([mt])
dnl Check for boost::lock_guard
Modified: trunk/ehs.cpp
===================================================================
--- trunk/ehs.cpp 2012-08-07 13:36:13 UTC (rev 160)
+++ trunk/ehs.cpp 2013-02-27 00:02:04 UTC (rev 161)
@@ -278,7 +278,7 @@
}
}
// create the initial request
- m_poCurrentHttpRequest = new HttpRequest(++m_nRequests, this);
+ m_poCurrentHttpRequest = new HttpRequest(++m_nRequests, this, m_sParseContentType);
m_poCurrentHttpRequest->m_bSecure = m_poNetworkAbstraction->IsSecure();
}
// parse through the current data
@@ -305,8 +305,9 @@
MutexHelper mh(&m_oMutex);
if (!m_oHttpRequestList.empty()) {
ret = m_oHttpRequestList.front();
+ // increment active requests before removing the request from the list to avoid idle-detection race conditions
+ ++m_nActiveRequests;
m_oHttpRequestList.pop_front();
- ++m_nActiveRequests;
}
return ret;
}
@@ -769,6 +770,12 @@
EHS_TRACE("Setting connections MaxRequestSize to %lu\n", n);
poEHSConnection->SetMaxRequestSize ( n );
}
+ if (m_poTopLevelEHS->m_oParams.find("parsecontenttype") !=
+ m_poTopLevelEHS->m_oParams.end()) {
+ string pct = m_poTopLevelEHS->m_oParams["parsecontenttype"];
+ EHS_TRACE("Setting parse content type to %s\n", pct.c_str());
+ poEHSConnection->SetParseContentType ( pct );
+ }
{
MutexHelper mutex(&m_oMutex);
m_oEHSConnectionList.push_back(poEHSConnection);
@@ -890,6 +897,7 @@
int r = 0;
HttpResponse *response = dynamic_cast<HttpResponse *>(gresp);
+ bool processed = false;
if (NULL == response) {
// only send it if the client isn't disconnected
if (Disconnected()) {
@@ -907,10 +915,11 @@
DoneReading(false);
}
} else {
- --m_nActiveRequests;
- ++m_nResponses;
+ processed = true;
// only send it if the client isn't disconnected
if (Disconnected()) {
+ --m_nActiveRequests;
+ ++m_nResponses;
return;
}
EHS_TRACE("Sending HTTP response", "");
@@ -951,6 +960,9 @@
if (rsh) {
rsh->OnConnect(this);
}
+ mutex.Lock();
+ --m_nActiveRequests;
+ ++m_nResponses;
return;
}
@@ -963,9 +975,16 @@
}
}
}
+ mutex.Lock();
if (forceClose || (-1 == r)) {
DoneReading(false);
}
+
+ // moved here to avoid race conditions deleting the connection during sending the response
+ if(processed) {
+ --m_nActiveRequests;
+ ++m_nResponses;
+ }
}
void EHSServer::EndServerThread()
Modified: trunk/ehs_development_guide.txt
===================================================================
--- trunk/ehs_development_guide.txt 2012-08-07 13:36:13 UTC (rev 160)
+++ trunk/ehs_development_guide.txt 2013-02-27 00:02:04 UTC (rev 161)
@@ -123,6 +123,11 @@
oSP [ "maxrequestsize" ] = "262144" -- The maximum size of an incoming request.
You may want to increase this, if you
want to handle file uploads.
+oSP [ "parsecontenttype" ] = "application/x-www-form-urlencoded"
+ -- By default, the request's POST body is always
+ parsed by scanning for URL-encoded form data.
+ Using this option, this can be limited to just
+ the given content type.
oSP [ "bindaddress" ] = "127.0.0.1" -- Specifies the address to bind to. The
default is "0.0.0.0" which listens on
all interfaces.
Modified: trunk/ehsconnection.h
===================================================================
--- trunk/ehsconnection.h 2012-08-07 13:36:13 UTC (rev 160)
+++ trunk/ehsconnection.h 2013-02-27 00:02:04 UTC (rev 161)
@@ -92,6 +92,9 @@
size_t m_nMaxRequestSize;
+ /// parse form data for content type given here - always if string is empty
+ std::string m_sParseContentType;
+
pthread_mutex_t m_oMutex; ///< mutex protecting entire object
public:
@@ -205,6 +208,9 @@
/// Sets the maximum request size
void SetMaxRequestSize(size_t n) { m_nMaxRequestSize = n; }
+ /// Sets the content type to parse form data for
+ void SetParseContentType(const std::string & s) { m_sParseContentType = s; }
+
friend class EHSServer;
};
Modified: trunk/httprequest.cpp
===================================================================
--- trunk/httprequest.cpp 2012-08-07 13:36:13 UTC (rev 160)
+++ trunk/httprequest.cpp 2013-02-27 00:02:04 UTC (rev 161)
@@ -437,7 +437,10 @@
} else {
// else the body is just one piece
// check for any form data
- GetFormDataFromString(m_sBody);
+ if(m_sParseContentType.empty() ||
+ m_oRequestHeaders["Content-Type"].compare(m_sParseContentType) == 0) {
+ GetFormDataFromString(m_sBody);
+ }
#ifdef EHS_DEBUG
cerr << "Done with body, done with entire chunked request" << endl;
#endif
@@ -569,7 +572,10 @@
// else the body is just one piece
// check for any form data
- GetFormDataFromString(m_sBody);
+ if(m_sParseContentType.empty() ||
+ m_oRequestHeaders["Content-Type"].compare(m_sParseContentType) == 0) {
+ GetFormDataFromString(m_sBody);
+ }
#ifdef EHS_DEBUG
cerr << "Done with body, done with entire request" << endl;
#endif
@@ -594,7 +600,8 @@
}
HttpRequest::HttpRequest (int inRequestId,
- EHSConnection * ipoSourceEHSConnection) :
+ EHSConnection * ipoSourceEHSConnection,
+ const string & irsParseContentType) :
m_nCurrentHttpParseState(HTTPPARSESTATE_REQUEST),
m_nRequestMethod(REQUESTMETHOD_UNKNOWN),
m_sUri(""),
@@ -609,7 +616,8 @@
m_nRequestId(inRequestId),
m_poSourceEHSConnection(ipoSourceEHSConnection),
m_bChunked(false),
- m_nChunkLen(0)
+ m_nChunkLen(0),
+ m_sParseContentType(irsParseContentType)
{
if (NULL == m_poSourceEHSConnection) {
#ifdef EHS_DEBUG
Modified: trunk/httprequest.h
===================================================================
--- trunk/httprequest.h 2012-08-07 13:36:13 UTC (rev 160)
+++ trunk/httprequest.h 2013-02-27 00:02:04 UTC (rev 161)
@@ -56,8 +56,10 @@
* Constructs a ne instance.
* @param inRequestId A unique Id (normally incremented by EHS).
* @param ipoSourceEHSConnection The connection on which this request was received.
+ * @param irsParseContentType Content type to parse form data for, empty string to always parse
*/
- HttpRequest (int inRequestId, EHSConnection *ipoSourceEHSConnection);
+ HttpRequest (int inRequestId, EHSConnection *ipoSourceEHSConnection,
+ const std::string & irsParseContentType);
public:
@@ -316,6 +318,9 @@
size_t m_nChunkLen;
+ /// content-type to parse form data for. if empty, always parse
+ std::string m_sParseContentType;
+
friend class EHSConnection;
friend class EHS;
};
Modified: trunk/samples/Makefile.am
===================================================================
--- trunk/samples/Makefile.am 2012-08-07 13:36:13 UTC (rev 160)
+++ trunk/samples/Makefile.am 2013-02-27 00:02:04 UTC (rev 161)
@@ -54,7 +54,7 @@
ehs_wsgate_SOURCES = ehs_wsgate.cpp btexception.cpp base64.cpp sha1.cpp
ehs_wsgate_CPPFLAGS = $(AM_CPPFLAGS) $(TRACE_CPPFLAGS)
-ehs_wsgate_LDADD = $(top_builddir)/libehs.la $(TRACE_LIBS)
+ehs_wsgate_LDADD = $(top_builddir)/libehs.la $(TRACE_LIBS) $(BOOST_SYSTEM_LIBS)
bindhelper_SOURCES = bindhelper.c
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <fe...@us...> - 2012-08-07 13:36:22
|
Revision: 160
http://ehs.svn.sourceforge.net/ehs/?rev=160&view=rev
Author: felfert
Date: 2012-08-07 13:36:13 +0000 (Tue, 07 Aug 2012)
Log Message:
-----------
- Removed last remnants of pcrepp dependency.
- regex stuff now taken from boost.
Modified Paths:
--------------
trunk/conf/ehs.spec.in
trunk/conf/mingw32-ehs.spec.in
trunk/configure.ac
trunk/ehs_development_guide.txt
trunk/httprequest.cpp
trunk/samples/ehs_formtest.cpp
Modified: trunk/conf/ehs.spec.in
===================================================================
--- trunk/conf/ehs.spec.in 2012-08-05 17:32:27 UTC (rev 159)
+++ trunk/conf/ehs.spec.in 2012-08-07 13:36:13 UTC (rev 160)
@@ -25,7 +25,7 @@
Source99: %{name}.rpmlintrc
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -u -n)
-Buildrequires: openssl-devel, gcc-c++, pcre-devel, boost-devel
+Buildrequires: openssl-devel, gcc-c++, boost-devel
Buildrequires: doxygen, graphviz, automake, libtool
%if %{is_fc}
Modified: trunk/conf/mingw32-ehs.spec.in
===================================================================
--- trunk/conf/mingw32-ehs.spec.in 2012-08-05 17:32:27 UTC (rev 159)
+++ trunk/conf/mingw32-ehs.spec.in 2012-08-07 13:36:13 UTC (rev 160)
@@ -28,7 +28,6 @@
BuildRequires: mingw32-openssl
BuildRequires: mingw32-pthreads
BuildRequires: mingw32-boost-static
-BuildRequires: mingw32-pcre
BuildRequires: iscc
%description
Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac 2012-08-05 17:32:27 UTC (rev 159)
+++ trunk/configure.ac 2012-08-07 13:36:13 UTC (rev 160)
@@ -67,12 +67,6 @@
])
dnl Checks for libraries.
-
-AC_ARG_WITH([pcre],AS_HELP_STRING([--with-pcre=DIR],[Specifies the location of the PCRE library]),
- [CPPFLAGS="$CPPFLAGS -I${withval}/include"
- CXXFLAGS="$CXXFLAGS -I${withval}/include"
- LDFLAGS="$LDFLAGS -L${withval}/lib"],[])
-
ac_cv_dllpath=
AC_ARG_WITH([dllpath],
AS_HELP_STRING([--with-dllpath=PATH],
@@ -80,20 +74,15 @@
[ac_cv_dllpath=$withval])
-dnl Replace `main' with a function in -lpcre:
BFDLIB1=
BFDLIB2=
DWLIB=
dnl The following headers have to be checked *before* invoking
-dnl AC_CHECK_LIB for pcrecpp, ssl and crypto in order for those
+dnl AC_CHECK_LIB for ssl and crypto in order for those
dnl checks to work correctly in mingw
-AC_CHECK_HEADERS([openssl/ssl.h openssl/err.h pcre.h])
-AC_LANG_PUSH([C++])
-AC_CHECK_HEADERS([pcrecpp.h])
-AC_LANG_POP
+AC_CHECK_HEADERS([openssl/ssl.h openssl/err.h])
-AC_CHECK_LIB(pcrecpp, main)
AC_CHECK_LIB(pthread, pthread_create)
AC_CHECK_LIB(sokt, socket)
AC_CHECK_LIB(z, inflate)
Modified: trunk/ehs_development_guide.txt
===================================================================
--- trunk/ehs_development_guide.txt 2012-08-05 17:32:27 UTC (rev 159)
+++ trunk/ehs_development_guide.txt 2012-08-07 13:36:13 UTC (rev 160)
@@ -9,9 +9,9 @@
C++ class to have HTTP (web) server capabilities.
-How to build EHS (for UNIX):
+How to build EHS (on UNIX):
------------------
-./configure --with-ssl --enable-debug --enable-memory --enable-warn
+./configure --enable-warn
--with-ssl: compile with HTTPS support. Requires OpenSSL library installed.
If not specified, configure will enable SSL support automatically,
@@ -20,12 +20,12 @@
build a new application, but rather spammy.
--enable-warn: Enable additional compiler warnings
+For info about more options, run ./configure --help
+
Requirements:
--------------
-PCRECPP (Perl Compatible Regular Expressions for C++) can be found at
-http://www.pcre.org. EHS 1.4 was tested against version 7.8. Earlier and
-later versions may work as well, but have not been tested.
+Boost (libboost_regex)
OpenSSL is required for HTTPS support (./configure --with-ssl). It can be
found at http://www.openssl.org.
Modified: trunk/httprequest.cpp
===================================================================
--- trunk/httprequest.cpp 2012-08-05 17:32:27 UTC (rev 159)
+++ trunk/httprequest.cpp 2012-08-07 13:36:13 UTC (rev 160)
@@ -31,7 +31,6 @@
#include "ehsconnection.h"
#include "debug.h"
-#include <pcrecpp.h>
#include <string>
#include <algorithm>
#include <set>
@@ -134,18 +133,21 @@
string sHeaders(isSubbody, 0, nBlankLinePosition);
// First line MUST be the content-disposition header line, so that
// we know what the name of the field is.. otherwise, we're in trouble
- string sContentDisposition;
- string sNameValuePairs;
- pcrecpp::RE re("Content-Disposition:[ ]?([^;]+);[ ]?(.*)");
- if (re.PartialMatch(sHeaders, &sContentDisposition, &sNameValuePairs)) {
+ boost::smatch match;
+ boost::regex re("Content-Disposition:[ ]?([^;]+);[ ]?(.*)");
+ if (boost::regex_match(sHeaders, match, re)) {
+ string sContentDisposition(match[1]);
+ string sPairs(match[2]);
StringCaseMap oStringCaseMap;
- string sName;
- string sValue;
- pcrecpp::StringPiece nvp(sNameValuePairs);
- pcrecpp::RE nvre("[ ]?([^= ]+)=\"([^\"]+)\"[;]?");
- while (nvre.FindAndConsume(&nvp, &sName, &sValue)) {
+ boost::regex nvre("[ ]?([^= ]+)=\"([^\"]+)\"[;]?");
+ boost::sregex_iterator i(sPairs.begin(), sPairs.end(), nvre);
+ boost::sregex_iterator end;
+ while (i != end) {
+ string sName((*i)[1]);
+ string sValue((*i)[2]);
EHS_TRACE("Subbody header found: '%s' => '%s'", sName.c_str(), sValue.c_str());
oStringCaseMap[sName] = sValue;
+ ++i;
}
// Take oStringCaseMap and actually fill the right object with its data
@@ -156,7 +158,7 @@
roFormValue.m_sBody = isSubbody.substr(nBlankLinePosition + 4);
} else {
// couldn't find content-disposition line -- FATAL ERROR
- EHS_TRACE("ERROR: Couldn't find content-disposition line", "");
+ EHS_TRACE("ERROR: Couldn't find content-disposition line sHeaders='%s'", sHeaders.c_str());
return PARSESUBBODY_INVALIDSUBBODY;
}
return PARSESUBBODY_SUCCESS;
@@ -195,8 +197,8 @@
return PARSEMULTIPARTFORMDATA_FAILED;
}
- // go past the initial boundary
- string sRemainingBody = m_sBody.substr(blen);
+ // go past the initial boundary and it's terminating CRLF
+ string sRemainingBody = m_sBody.substr(blen + 2);
// while we're at a boundary after we grab a part, keep going
string::size_type nNextPartPosition;
Modified: trunk/samples/ehs_formtest.cpp
===================================================================
--- trunk/samples/ehs_formtest.cpp 2012-08-05 17:32:27 UTC (rev 159)
+++ trunk/samples/ehs_formtest.cpp 2012-08-07 13:36:13 UTC (rev 160)
@@ -64,7 +64,7 @@
}
cerr << "Got name of " << sName << endl;
- oss << "Hi " << sName << "</body></html>";
+ oss << "Hi " << sName << "<p><a href=\"/\">Back to login form</a></body></html>";
m_oNameList.push_back ( sName );
response->SetBody( oss.str().c_str(), oss.str().length() );
@@ -75,7 +75,7 @@
// otherwise, present the form to the user to fill in
cerr << "Got no form data" << endl;
- oss << "<p>Please log in</p>" << endl << "<form action = \"/\" method=\"GET\">" << endl
+ oss << "<p>Please log in</p>" << endl << "<form action = \"/\" method=\"POST\">" << endl
<< "User name: <input type=\"text\" name=\"user\"><br />" << endl
<< "<select name=\"existinguser\" width=\"20\">" << endl;
for ( StringList::iterator i = m_oNameList.begin(); i != m_oNameList.end ( ); ++i ) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <fe...@us...> - 2012-08-05 17:32:33
|
Revision: 159
http://ehs.svn.sourceforge.net/ehs/?rev=159&view=rev
Author: felfert
Date: 2012-08-05 17:32:27 +0000 (Sun, 05 Aug 2012)
Log Message:
-----------
- Removed obsolete copy command
Modified Paths:
--------------
trunk/Makefile.am
Modified: trunk/Makefile.am
===================================================================
--- trunk/Makefile.am 2012-08-05 17:03:23 UTC (rev 158)
+++ trunk/Makefile.am 2012-08-05 17:32:27 UTC (rev 159)
@@ -72,7 +72,6 @@
dpkg-source -b $(PACKAGE)-$(VERSION)
rpm: dist conf/$(PACKAGE).spec
- cp $(distdir).tar.gz ~/rpmbuild/SOURCES/
rm -f *.rpm
QA_RPATHS=3 rpmbuild $(RPMBUILD_OPTS) -ta $(distdir).tar.gz 2>&1 | tee rpmbuild.log
test -n "`grep ^Wrote: rpmbuild.log`" || exit 1
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <fe...@us...> - 2012-08-05 17:03:29
|
Revision: 158
http://ehs.svn.sourceforge.net/ehs/?rev=158&view=rev
Author: felfert
Date: 2012-08-05 17:03:23 +0000 (Sun, 05 Aug 2012)
Log Message:
-----------
- Added some cppcheck suppressions
- Added ability to specify RPMBUILD_OPTS
Modified Paths:
--------------
trunk/Makefile.am
trunk/samples/wsendpoint.h
Modified: trunk/Makefile.am
===================================================================
--- trunk/Makefile.am 2012-08-05 04:16:07 UTC (rev 157)
+++ trunk/Makefile.am 2012-08-05 17:03:23 UTC (rev 158)
@@ -74,9 +74,9 @@
rpm: dist conf/$(PACKAGE).spec
cp $(distdir).tar.gz ~/rpmbuild/SOURCES/
rm -f *.rpm
- QA_RPATHS=3 rpmbuild -ba conf/$(PACKAGE).spec 2>&1 | tee rpmbuild.log
+ QA_RPATHS=3 rpmbuild $(RPMBUILD_OPTS) -ta $(distdir).tar.gz 2>&1 | tee rpmbuild.log
test -n "`grep ^Wrote: rpmbuild.log`" || exit 1
- for rpm in `grep ^Wrote: rpmbuild.log|awk '{print $$2}'` ; do ln -snf $$rpm . ; done
+ for rpm in `grep ^Wrote: rpmbuild.log|awk '{print $$2}'` ; do cp $$rpm . ; done
rm -f rpmbuild.log
setup: all doxygen-doc
Modified: trunk/samples/wsendpoint.h
===================================================================
--- trunk/samples/wsendpoint.h 2012-08-05 04:16:07 UTC (rev 157)
+++ trunk/samples/wsendpoint.h 2012-08-05 17:03:23 UTC (rev 158)
@@ -258,6 +258,7 @@
#ifdef HAVE_BOOST_LOCK_GUARD
boost::lock_guard<boost::recursive_mutex> lock(m_lock);
#else
+ // cppcheck-suppress unusedScopedObject
MutexHelper((pthread_mutex_t *)&m_lock);
#endif
@@ -283,6 +284,7 @@
#ifdef HAVE_BOOST_LOCK_GUARD
boost::lock_guard<boost::recursive_mutex> lock(m_lock);
#else
+ // cppcheck-suppress unusedScopedObject
MutexHelper((pthread_mutex_t *)&m_lock);
#endif
@@ -318,6 +320,7 @@
#ifdef HAVE_BOOST_LOCK_GUARD
boost::lock_guard<boost::recursive_mutex> lock(m_lock);
#else
+ // cppcheck-suppress unusedScopedObject
MutexHelper((pthread_mutex_t *)&m_lock);
#endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <fe...@us...> - 2012-08-05 04:16:14
|
Revision: 157
http://ehs.svn.sourceforge.net/ehs/?rev=157&view=rev
Author: felfert
Date: 2012-08-05 04:16:07 +0000 (Sun, 05 Aug 2012)
Log Message:
-----------
- Fixed cppcheck warnings/errors
Modified Paths:
--------------
trunk/ehs.cpp
trunk/httpresponse.cpp
trunk/samples/ehs_basicauth.cpp
trunk/samples/ehs_formtest.cpp
trunk/samples/ehs_privport.cpp
trunk/samples/ehs_testharness.cpp
trunk/samples/ehs_wsgate.cpp
trunk/samples/sha1.cpp
trunk/samples/wsendpoint.h
trunk/staticssllocking.cpp
Modified: trunk/ehs.cpp
===================================================================
--- trunk/ehs.cpp 2012-08-05 02:31:12 UTC (rev 156)
+++ trunk/ehs.cpp 2012-08-05 04:16:07 UTC (rev 157)
@@ -114,7 +114,7 @@
FD_SET(m_poNetworkAbstraction->GetFd(), &m_oReadFds);
ehs_socket_t nHighestFd = m_poNetworkAbstraction->GetFd();
for (EHSConnectionList::iterator i = m_oEHSConnectionList.begin();
- i != m_oEHSConnectionList.end(); i++) {
+ i != m_oEHSConnectionList.end(); ++i) {
/// skip this one if it's already been used
if ((*i)->StillReading()) {
ehs_socket_t nCurrentFd = (*i)->GetNetworkAbstraction()->GetFd();
@@ -138,7 +138,7 @@
{
// don't lock mutex, as this is only called from within locked sections
for (EHSConnectionList::iterator i = m_oEHSConnectionList.begin();
- i != m_oEHSConnectionList.end(); i++) {
+ i != m_oEHSConnectionList.end(); ++i) {
MutexHelper mh(&(*i)->m_oMutex);
// if it's been more than N seconds since a response has been
@@ -165,7 +165,7 @@
RemoveEHSConnection(*i);
i = m_oEHSConnectionList.begin();
} else {
- i++;
+ ++i;
}
}
}
@@ -495,9 +495,9 @@
int nWhich = (int)(((double)m_oEHSConnectionList.size()) * rand() / (RAND_MAX + 1.0));
// go to that element
EHSConnectionList::iterator i = m_oEHSConnectionList.begin();
- int nCounter = 0;
- for (nCounter = 0; nCounter < nWhich; nCounter++) {
- i++;
+ int nCounter;
+ for (nCounter = 0; nCounter < nWhich; ++nCounter) {
+ ++i;
}
// now get the next available request treating the list as circular
EHSConnectionList::iterator iStartPoint = i;
@@ -543,7 +543,7 @@
delete *i;
i = m_oEHSConnectionList.erase(i);
} else {
- i++;
+ ++i;
}
}
EHS_TRACE("%d connections remaining", m_oEHSConnectionList.size());
@@ -782,7 +782,7 @@
{
// go through all the sockets from which we're still reading
for (EHSConnectionList::iterator i = m_oEHSConnectionList.begin();
- i != m_oEHSConnectionList.end(); i++) {
+ i != m_oEHSConnectionList.end(); ++i) {
if (FD_ISSET((*i)->GetNetworkAbstraction()->GetFd(), &m_oReadFds)) {
// do the actual read
char buf[8192];
@@ -926,14 +926,14 @@
StringCaseMap::iterator ith = response->GetHeaders().begin();
while (ith != response->GetHeaders().end()) {
oss << ith->first << ": " << ith->second << "\r\n";
- ith++;
+ ++ith;
}
// now push out all the cookies
StringList::iterator itl = response->GetCookies().begin ( );
while (itl != response->GetCookies().end()) {
oss << "Set-Cookie: " << *itl << "\r\n";
- itl++;
+ ++itl;
}
// extra line break signalling end of headers
@@ -1004,8 +1004,7 @@
m_poParent->UnregisterEHS(m_sRegisteredAs.c_str());
}
} catch (...) {
- delete m_poEHSServer;
- throw;
+ // destructors don't trow
}
delete m_poEHSServer;
}
Modified: trunk/httpresponse.cpp
===================================================================
--- trunk/httpresponse.cpp 2012-08-05 02:31:12 UTC (rev 156)
+++ trunk/httpresponse.cpp 2012-08-05 04:16:07 UTC (rev 157)
@@ -160,7 +160,7 @@
}
for ( CookieParameters::iterator i = iroCookieParameters.begin ( );
- i != iroCookieParameters.end ( ); i++ ) {
+ i != iroCookieParameters.end ( ); ++i ) {
if ( i->first != "name" && i->first != "value" ) {
ssBuffer << "; " << i->first << "=" << i->second.GetCharString ( );
}
Modified: trunk/samples/ehs_basicauth.cpp
===================================================================
--- trunk/samples/ehs_basicauth.cpp 2012-08-05 02:31:12 UTC (rev 156)
+++ trunk/samples/ehs_basicauth.cpp 2012-08-05 04:16:07 UTC (rev 157)
@@ -75,13 +75,13 @@
<< "<tr><td>client-port:</td><td>" << request->RemotePort() << "</td></tr>" << endl;
for (StringMap::iterator i = request->Headers().begin();
- i != request->Headers().end(); i++) {
+ i != request->Headers().end(); ++i) {
oss << "<tr><td>Request Header:</td><td>"
<< i->first << " => " << i->second << "</td></tr>" << endl;
}
for ( CookieMap::iterator i = request->Cookies().begin ( );
- i != request->Cookies().end ( ); i++ ) {
+ i != request->Cookies().end ( ); ++i ) {
oss << "<tr><td>Cookie:</td><td>"
<< i->first << " => " << i->second << "</td></tr>" << endl;
}
@@ -100,7 +100,7 @@
bool CheckAuthHeader(HttpRequest *r)
{
StringMap::iterator i;
- for (i = r->Headers().begin() ; i != r->Headers().end() ; i++) {
+ for (i = r->Headers().begin() ; i != r->Headers().end() ; ++i) {
if (0 == i->first.compare("Authorization")) {
if (0 == i->second.compare(0, 6, "Basic ")) {
string decoded = base64_decode(i->second.substr(6));
Modified: trunk/samples/ehs_formtest.cpp
===================================================================
--- trunk/samples/ehs_formtest.cpp 2012-08-05 02:31:12 UTC (rev 156)
+++ trunk/samples/ehs_formtest.cpp 2012-08-05 04:16:07 UTC (rev 157)
@@ -78,7 +78,7 @@
oss << "<p>Please log in</p>" << endl << "<form action = \"/\" method=\"GET\">" << endl
<< "User name: <input type=\"text\" name=\"user\"><br />" << endl
<< "<select name=\"existinguser\" width=\"20\">" << endl;
- for ( StringList::iterator i = m_oNameList.begin(); i != m_oNameList.end ( ); i++ ) {
+ for ( StringList::iterator i = m_oNameList.begin(); i != m_oNameList.end ( ); ++i ) {
oss << "<option>" << i->substr ( 0, 150 ) << endl;
}
oss << "</select> <input type=\"submit\">" << endl << "</form>" << endl;
Modified: trunk/samples/ehs_privport.cpp
===================================================================
--- trunk/samples/ehs_privport.cpp 2012-08-05 02:31:12 UTC (rev 156)
+++ trunk/samples/ehs_privport.cpp 2012-08-05 04:16:07 UTC (rev 157)
@@ -74,12 +74,12 @@
<< "<tr><td>client-port:</td><td>" << request->RemotePort ( ) << "</td></tr>" << endl;
for ( StringMap::iterator i = request->Headers().begin ( );
- i != request->Headers().end ( ); i++ ) {
+ i != request->Headers().end ( ); ++i ) {
oss << "<tr><td>Request Header:</td><td>" << i->first << " => " << i->second << "</td></tr>" << endl;
}
for ( CookieMap::iterator i = request->Cookies().begin ( );
- i != request->Cookies().end ( ); i++ ) {
+ i != request->Cookies().end ( ); ++i ) {
oss << "<tr><td>Cookie:</td><td>" << i->first << " => " << i->second << "</td></tr>" << endl;
}
oss << "</table></body></html>" << endl;
Modified: trunk/samples/ehs_testharness.cpp
===================================================================
--- trunk/samples/ehs_testharness.cpp 2012-08-05 02:31:12 UTC (rev 156)
+++ trunk/samples/ehs_testharness.cpp 2012-08-05 04:16:07 UTC (rev 157)
@@ -51,13 +51,13 @@
<< "<tr><td>client-port:</td><td>" << request->RemotePort() << "</td></tr>" << endl;
for (StringMap::iterator i = request->Headers().begin();
- i != request->Headers().end(); i++) {
+ i != request->Headers().end(); ++i) {
oss << "<tr><td>Request Header:</td><td>"
<< i->first << " => " << i->second << "</td></tr>" << endl;
}
for ( CookieMap::iterator i = request->Cookies().begin ( );
- i != request->Cookies().end ( ); i++ ) {
+ i != request->Cookies().end ( ); ++i ) {
oss << "<tr><td>Cookie:</td><td>"
<< i->first << " => " << i->second << "</td></tr>" << endl;
}
Modified: trunk/samples/ehs_wsgate.cpp
===================================================================
--- trunk/samples/ehs_wsgate.cpp 2012-08-05 02:31:12 UTC (rev 156)
+++ trunk/samples/ehs_wsgate.cpp 2012-08-05 04:16:07 UTC (rev 157)
@@ -121,7 +121,7 @@
f.read (buf,fsize);
f.close();
response->SetBody(buf, fsize);
- delete buf;
+ delete[] buf;
return HTTPRESPONSECODE_200_OK;
}
if (0 == request->Uri().compare("/wsgate")) {
@@ -261,14 +261,14 @@
ehs_autoptr<GenericResponse> r(new GenericResponse(0, m_econn));
m_ehs->AddResponse(ehs_move(r));
}
- virtual bool on_ping(const std::string data) {
+ virtual bool on_ping(const std::string & data) {
cerr << "GOT Ping: '" << data << "'" << endl;
return true;
}
- virtual void on_pong(const std::string data) {
+ virtual void on_pong(const std::string & data) {
cerr << "GOT Pong: '" << data << "'" << endl;
}
- virtual void do_response(const std::string data) {
+ virtual void do_response(const std::string & data) {
cerr << "Send WS response '" << data << "'" << endl;
ehs_autoptr<GenericResponse> r(new GenericResponse(0, m_econn));
r->SetBody(data.data(), data.length());
Modified: trunk/samples/sha1.cpp
===================================================================
--- trunk/samples/sha1.cpp 2012-08-05 02:31:12 UTC (rev 156)
+++ trunk/samples/sha1.cpp 2012-08-05 04:16:07 UTC (rev 157)
@@ -58,6 +58,7 @@
SHA1::SHA1()
: Length_Low(0)
, Length_High(0)
+ , Message_Block()
, Message_Block_Index(0)
, Computed(false)
, Corrupted(false)
Modified: trunk/samples/wsendpoint.h
===================================================================
--- trunk/samples/wsendpoint.h 2012-08-05 02:31:12 UTC (rev 156)
+++ trunk/samples/wsendpoint.h 2012-08-05 04:16:07 UTC (rev 157)
@@ -86,7 +86,7 @@
* Send a text message to the remote client.
* @param data The payload to send.
*/
- void send_text(const std::string data) {
+ void send_text(const std::string & data) {
send(data, frame::opcode::TEXT);
}
@@ -94,7 +94,7 @@
* Send a binary message to the remote client.
* @param data The payload to send.
*/
- void send_binary(const std::string data) {
+ void send_binary(const std::string & data) {
send(data, frame::opcode::BINARY);
}
@@ -107,9 +107,9 @@
private:
virtual void on_message(std::string header, std::string data) = 0;
virtual void on_close() = 0;
- virtual bool on_ping(const std::string data) = 0;
- virtual void on_pong(const std::string data) = 0;
- virtual void do_response(const std::string data) = 0;
+ virtual bool on_ping(const std::string & data) = 0;
+ virtual void on_pong(const std::string & data) = 0;
+ virtual void do_response(const std::string & data) = 0;
void send(const std::string& payload, frame::opcode::value op);
Modified: trunk/staticssllocking.cpp
===================================================================
--- trunk/staticssllocking.cpp 2012-08-05 02:31:12 UTC (rev 156)
+++ trunk/staticssllocking.cpp 2012-08-05 04:16:07 UTC (rev 157)
@@ -80,14 +80,16 @@
StaticSslLocking::~StaticSslLocking()
{
if (NULL == StaticSslLocking::poMutexes) {
- throw runtime_error("StaticSslLocking::~StaticSslLocking: poMutexes is NULL");
+ // Destructors don't thow
+ // throw runtime_error("StaticSslLocking::~StaticSslLocking: poMutexes is NULL");
}
CRYPTO_set_id_callback(NULL);
CRYPTO_set_locking_callback(NULL);
for ( int i = 0; i < CRYPTO_num_locks(); i++) {
if (0 != pthread_mutex_destroy(&StaticSslLocking::poMutexes[i])) {
- throw runtime_error("StaticSslLocking::~StaticSslLocking: Could not destroy CRYPTO mutex");
+ // Destructors don't thow
+ // throw runtime_error("StaticSslLocking::~StaticSslLocking: Could not destroy CRYPTO mutex");
}
}
delete [] StaticSslLocking::poMutexes;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <fe...@us...> - 2012-08-05 02:31:18
|
Revision: 156
http://ehs.svn.sourceforge.net/ehs/?rev=156&view=rev
Author: felfert
Date: 2012-08-05 02:31:12 +0000 (Sun, 05 Aug 2012)
Log Message:
-----------
- Make RPM builds verbosity configurable
Modified Paths:
--------------
trunk/conf/ehs.spec.in
trunk/conf/mingw32-ehs.spec.in
Modified: trunk/conf/ehs.spec.in
===================================================================
--- trunk/conf/ehs.spec.in 2012-06-12 15:04:07 UTC (rev 155)
+++ trunk/conf/ehs.spec.in 2012-08-05 02:31:12 UTC (rev 156)
@@ -5,6 +5,7 @@
%define with_staticssl %{?_with_staticssl: 1} %{?!_with_staticssl: 0}
# Enable debugging
%define with_debug %{?_with_debug: 1} %{?!_with_debug: 0}
+%define make_verbose_flags %{?_with_verbose: V=1 AM_DEFAULT_VERBOSITY=1}
%define rel @SVNREV@%{?dist}
%define is_fc 0%{?fedora}%{?fedora_version}
@@ -61,6 +62,7 @@
export CFLAGS="$RPM_OPT_FLAGS -DSPECIAL_STDERR"
%endif
%configure \
+ --enable-warn \
%if %{with_debug}
--enable-debug \
%endif
@@ -68,10 +70,10 @@
--enable-static --with-ssl=/opt/openssl-static
%endif
-%{__make} %{?_smp_mflags} V=1
+%{__make} %{?_smp_mflags} %{make_verbose_flags}
%install
-%{__make} DESTDIR=%{buildroot} install
+%{__make} DESTDIR=%{buildroot} %{make_verbose_flags} install
%clean
%{__rm} -rf %{buildroot}
Modified: trunk/conf/mingw32-ehs.spec.in
===================================================================
--- trunk/conf/mingw32-ehs.spec.in 2012-06-12 15:04:07 UTC (rev 155)
+++ trunk/conf/mingw32-ehs.spec.in 2012-08-05 02:31:12 UTC (rev 156)
@@ -4,6 +4,7 @@
%global __find_requires %{_mingw32_findrequires}
%global __find_provides %{_mingw32_findprovides}
%define __debug_install_post %{_mingw32_debug_install_post}
+%define make_verbose_flags %{?_with_verbose: V=1 AM_DEFAULT_VERBOSITY=1}
%define rel @SVNREV@%{?dist}
%define xname ehs
@@ -53,14 +54,14 @@
%setup -q -n %{xname}-%{version}
%build
-%{_mingw32_configure} --enable-static --enable-shared \
+%{_mingw32_configure} --enable-static --enable-shared --enable-warn \
--with-dllpath=/usr/i686-pc-mingw32/sys-root/mingw/bin \
--program-transform-name=s/i686-pc-mingw32-//
-make %{?_smp_mflags} V=1 AM_DEFAULT_VERBOSITY=1
+make %{?_smp_mflags} %{make_verbose_flags}
%install
rm -rf $RPM_BUILD_ROOT
-make DESTDIR=$RPM_BUILD_ROOT V=1 AM_DEFAULT_VERBOSITY=1 install
+make DESTDIR=$RPM_BUILD_ROOT %{make_verbose_flags} install
%clean
%{__rm} -rf %{buildroot}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <fe...@us...> - 2012-06-12 15:04:13
|
Revision: 155
http://ehs.svn.sourceforge.net/ehs/?rev=155&view=rev
Author: felfert
Date: 2012-06-12 15:04:07 +0000 (Tue, 12 Jun 2012)
Log Message:
-----------
- Fixed bug in request body handling.
Modified Paths:
--------------
trunk/httprequest.cpp
Modified: trunk/httprequest.cpp
===================================================================
--- trunk/httprequest.cpp 2012-06-12 13:26:25 UTC (rev 154)
+++ trunk/httprequest.cpp 2012-06-12 15:04:07 UTC (rev 155)
@@ -530,7 +530,7 @@
// get the content length
unsigned int nContentLength = 0;
try {
- boost::lexical_cast<unsigned int>(m_oRequestHeaders["Content-Length"]);
+ nContentLength = boost::lexical_cast<unsigned int>(m_oRequestHeaders["Content-Length"]);
} catch (const boost::bad_lexical_cast &e) {
m_nCurrentHttpParseState = HTTPPARSESTATE_INVALIDREQUEST;
continue;
@@ -549,8 +549,8 @@
// otherwise, we've gotten enough data from the client, handle it now
// grab out the actual body from the request and leave the rest
- m_sBody = irsData.substr(0, nContentLength);
- irsData = irsData.substr(nContentLength);
+ m_sBody.assign(irsData.substr(0, nContentLength));
+ irsData.erase(0, nContentLength);
// if we're dealing with multi-part form attachments
if (m_oRequestHeaders["Content-Type"].substr(0, 9) == "multipart") {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <fe...@us...> - 2012-06-12 13:26:36
|
Revision: 154
http://ehs.svn.sourceforge.net/ehs/?rev=154&view=rev
Author: felfert
Date: 2012-06-12 13:26:25 +0000 (Tue, 12 Jun 2012)
Log Message:
-----------
- Fixed a typo
Modified Paths:
--------------
trunk/conf/ehs.spec.in
Modified: trunk/conf/ehs.spec.in
===================================================================
--- trunk/conf/ehs.spec.in 2012-06-12 13:20:42 UTC (rev 153)
+++ trunk/conf/ehs.spec.in 2012-06-12 13:26:25 UTC (rev 154)
@@ -62,7 +62,7 @@
%endif
%configure \
%if %{with_debug}
- --enable-debug
+ --enable-debug \
%endif
%if %{with_staticssl}
--enable-static --with-ssl=/opt/openssl-static
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <fe...@us...> - 2012-06-12 13:20:53
|
Revision: 153
http://ehs.svn.sourceforge.net/ehs/?rev=153&view=rev
Author: felfert
Date: 2012-06-12 13:20:42 +0000 (Tue, 12 Jun 2012)
Log Message:
-----------
- Add debug build option in spec
Modified Paths:
--------------
trunk/conf/ehs.spec.in
Modified: trunk/conf/ehs.spec.in
===================================================================
--- trunk/conf/ehs.spec.in 2012-06-08 03:29:07 UTC (rev 152)
+++ trunk/conf/ehs.spec.in 2012-06-12 13:20:42 UTC (rev 153)
@@ -3,6 +3,8 @@
%define with_specialstderr %{?_with_specialstderr: 1} %{?!_with_specialstderr: 0}
# use static SSL libs
%define with_staticssl %{?_with_staticssl: 1} %{?!_with_staticssl: 0}
+# Enable debugging
+%define with_debug %{?_with_debug: 1} %{?!_with_debug: 0}
%define rel @SVNREV@%{?dist}
%define is_fc 0%{?fedora}%{?fedora_version}
@@ -59,6 +61,9 @@
export CFLAGS="$RPM_OPT_FLAGS -DSPECIAL_STDERR"
%endif
%configure \
+%if %{with_debug}
+ --enable-debug
+%endif
%if %{with_staticssl}
--enable-static --with-ssl=/opt/openssl-static
%endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <fe...@us...> - 2012-06-08 03:29:14
|
Revision: 152
http://ehs.svn.sourceforge.net/ehs/?rev=152&view=rev
Author: felfert
Date: 2012-06-08 03:29:07 +0000 (Fri, 08 Jun 2012)
Log Message:
-----------
- Fixed close handling
Modified Paths:
--------------
trunk/ehs.cpp
Modified: trunk/ehs.cpp
===================================================================
--- trunk/ehs.cpp 2012-06-07 15:43:04 UTC (rev 151)
+++ trunk/ehs.cpp 2012-06-08 03:29:07 UTC (rev 152)
@@ -915,11 +915,8 @@
}
EHS_TRACE("Sending HTTP response", "");
HttpResponse *response = reinterpret_cast<HttpResponse *>(gresp);
- if (HTTPRESPONSECODE_101_SWITCHING_PROTOCOLS == response->GetResponseCode()) {
- // Make shure, that we don't close the connaction when switching protocols
- response->RemoveHeader("Connection");
- }
- forceClose = (0 == response->Header("connection").compare("close"));
+ forceClose = ((0 == response->Header("connection").compare("close")) &&
+ (HTTPRESPONSECODE_101_SWITCHING_PROTOCOLS != response->GetResponseCode()));
ostringstream oss;
// add in the response code
oss << "HTTP/1.1 " << response->GetResponseCode()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <fe...@us...> - 2012-06-07 15:43:13
|
Revision: 151
http://ehs.svn.sourceforge.net/ehs/?rev=151&view=rev
Author: felfert
Date: 2012-06-07 15:43:04 +0000 (Thu, 07 Jun 2012)
Log Message:
-----------
- Fixed warning about including winsock2.h
Modified Paths:
--------------
trunk/ehs.cpp
trunk/samples/ehs_wsgate.cpp
trunk/securesocket.cpp
trunk/socket.cpp
Modified: trunk/ehs.cpp
===================================================================
--- trunk/ehs.cpp 2012-06-07 14:57:34 UTC (rev 150)
+++ trunk/ehs.cpp 2012-06-07 15:43:04 UTC (rev 151)
@@ -27,6 +27,10 @@
# include "config.h"
#endif
+#ifdef HAVE_WINSOCK2_H
+# include <winsock2.h>
+#endif
+
#include <pthread.h>
#include "ehs.h"
Modified: trunk/samples/ehs_wsgate.cpp
===================================================================
--- trunk/samples/ehs_wsgate.cpp 2012-06-07 14:57:34 UTC (rev 150)
+++ trunk/samples/ehs_wsgate.cpp 2012-06-07 15:43:04 UTC (rev 151)
@@ -27,6 +27,10 @@
# include "config.h"
#endif
+#ifdef HAVE_WINSOCK2_H
+# include <winsock2.h>
+#endif
+
#include <ehs.h>
#include <vector>
#include <sstream>
Modified: trunk/securesocket.cpp
===================================================================
--- trunk/securesocket.cpp 2012-06-07 14:57:34 UTC (rev 150)
+++ trunk/securesocket.cpp 2012-06-07 15:43:04 UTC (rev 151)
@@ -28,6 +28,11 @@
#endif
#ifdef COMPILE_WITH_SSL
+
+#ifdef HAVE_WINSOCK2_H
+# include <winsock2.h>
+#endif
+
#include "ehs.h"
#include "securesocket.h"
#include "debug.h"
Modified: trunk/socket.cpp
===================================================================
--- trunk/socket.cpp 2012-06-07 14:57:34 UTC (rev 150)
+++ trunk/socket.cpp 2012-06-07 15:43:04 UTC (rev 151)
@@ -27,6 +27,10 @@
# include "config.h"
#endif
+#ifdef HAVE_WINSOCK2_H
+# include <winsock2.h>
+#endif
+
/*
* Solaris 2.6 troubles
*/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <fe...@us...> - 2012-06-07 14:57:40
|
Revision: 150
http://ehs.svn.sourceforge.net/ehs/?rev=150&view=rev
Author: felfert
Date: 2012-06-07 14:57:34 +0000 (Thu, 07 Jun 2012)
Log Message:
-----------
Make ab happy (close connection when responding to HTTP/1.0 requests)
Modified Paths:
--------------
trunk/ehs.cpp
trunk/httpresponse.h
Modified: trunk/ehs.cpp
===================================================================
--- trunk/ehs.cpp 2012-06-01 15:39:25 UTC (rev 149)
+++ trunk/ehs.cpp 2012-06-07 14:57:34 UTC (rev 150)
@@ -882,6 +882,7 @@
void EHSConnection::SendResponse(GenericResponse *gresp)
{
MutexHelper mutex(&m_oMutex);
+ bool forceClose = false;
int r = 0;
HttpResponse *response = dynamic_cast<HttpResponse *>(gresp);
@@ -910,6 +911,11 @@
}
EHS_TRACE("Sending HTTP response", "");
HttpResponse *response = reinterpret_cast<HttpResponse *>(gresp);
+ if (HTTPRESPONSECODE_101_SWITCHING_PROTOCOLS == response->GetResponseCode()) {
+ // Make shure, that we don't close the connaction when switching protocols
+ response->RemoveHeader("Connection");
+ }
+ forceClose = (0 == response->Header("connection").compare("close"));
ostringstream oss;
// add in the response code
oss << "HTTP/1.1 " << response->GetResponseCode()
@@ -948,7 +954,7 @@
}
// now send the body
- int blen = atoi(response->GetHeaders()["content-length"].c_str());
+ int blen = atoi(response->Header("content-length").c_str());
if (blen > 0) {
EHS_TRACE("Sending %d bytes in thread %08x", blen, pthread_self());
int r = m_poNetworkAbstraction->Send(response->GetBody().data(), blen);
@@ -956,7 +962,7 @@
}
}
}
- if (-1 == r) {
+ if (forceClose || (-1 == r)) {
DoneReading(false);
}
}
@@ -1072,6 +1078,13 @@
ehs_autoptr<HttpResponse> response(new HttpResponse(request->m_nRequestId,
request->m_poSourceEHSConnection));
// get the actual response and return code
+ if (0 == request->HttpVersion().compare("1.0")) {
+ if (0 == request->Headers("Connection").compare("keep-alive")) {
+ response->SetHeader("Connection", "keep-alive");
+ } else {
+ response->SetHeader("Connection", "close");
+ }
+ }
response->SetResponseCode(HandleRequest(request, response.get()));
return ehs_move(response);
}
Modified: trunk/httpresponse.h
===================================================================
--- trunk/httpresponse.h 2012-06-01 15:39:25 UTC (rev 149)
+++ trunk/httpresponse.h 2012-06-07 14:57:34 UTC (rev 150)
@@ -174,6 +174,19 @@
*/
std::string HttpTime(time_t stamp);
+ /**
+ * Retrieves a specific HTTP header.
+ * @param name The name of the HTTP header to be retrieved.
+ * @return The value of the specified header.
+ */
+ std::string Header(const std::string & name)
+ {
+ if (m_oResponseHeaders.find(name) != m_oResponseHeaders.end()) {
+ return m_oResponseHeaders[name];
+ }
+ return std::string();
+ }
+
private:
/// the response code to be sent back
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|