diff --git a/README.CentOS-7 b/README.CentOS-7 new file mode 100644 index 00000000..1dfaaa70 --- /dev/null +++ b/README.CentOS-7 @@ -0,0 +1,7 @@ +## Cent OS 7 / RHEL 7 + +CentOS 7 has a lower version of gcc (4.8.7) that is barely C++11 capable and this library +needs a better compiler. We recommend at least gcc 5+ + +We recommend installing devtoolset-8 +https://www.softwarecollections.org/en/scls/rhscl/devtoolset-8/ diff --git a/README.FreeBSD b/README.FreeBSD new file mode 100644 index 00000000..853c5589 --- /dev/null +++ b/README.FreeBSD @@ -0,0 +1,9 @@ +## Building on FreeBSD (Tested on 12.0) + +# Due to the differences in the directory structures on BSD systems some minor tweaks need to occur +# Also, FreeBSD and AIX "make" command is not compatible with gmake, like Linux and Mingw are + +export MAKE=gmake +bootstrap +configure CPPFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib +gmake diff --git a/README.md b/README.md index 14ec4b7a..ba3ea6b0 100644 --- a/README.md +++ b/README.md @@ -76,7 +76,7 @@ Additionally, clients can specify resource limits on the overall number of conne [Back to TOC](#table-of-contents) ## Requirements -libhttpserver can be used without any dependencies aside for libmicrohttpd. +libhttpserver can be used without any dependencies aside from libmicrohttpd. The minimum versions required are: * g++ >= 5.5.0 or clang-3.6 @@ -92,6 +92,8 @@ For versions before 0.18.0, on MinGW, you will need: Furthermore, the testcases use [libcurl](http://curl.haxx.se/libcurl/) but you don't need it to compile the library. +Please refer to the readme file for your particular distribution if there is one for important notes. + [Back to TOC](#table-of-contents) ## Building diff --git a/bootstrap b/bootstrap index 67425d32..bc1ad731 100755 --- a/bootstrap +++ b/bootstrap @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # This file is part of libhttpserver # Copyright (C) 2011, 2012, 2013, 2014, 2015 Sebastiano Merlino diff --git a/configure.ac b/configure.ac index 4328f078..8fc0e314 100644 --- a/configure.ac +++ b/configure.ac @@ -284,6 +284,9 @@ case $host_os in AM_CXXFLAGS="$AM_CXXFLAGS -DDARWIN" AM_CFLAGS="$AM_CFLAGS -DDARWIN" ;; + freebsd* ) + AM_LDFLAGS="" + ;; esac AC_MSG_CHECKING([whether to build with coverage information]) diff --git a/src/httpserver/deferred_response.hpp b/src/httpserver/deferred_response.hpp index 170d5e82..2193f960 100644 --- a/src/httpserver/deferred_response.hpp +++ b/src/httpserver/deferred_response.hpp @@ -70,7 +70,7 @@ class deferred_response : public string_response ssize_t (*cycle_callback)(std::shared_ptr, char*, size_t); std::shared_ptr closure_data; - static ssize_t cb(void* cls, uint64_t pos, char* buf, size_t max) + static ssize_t cb(void* cls, uint64_t, char* buf, size_t max) { deferred_response* dfr = static_cast*>(cls); return dfr->cycle_callback(dfr->closure_data, buf, max); diff --git a/src/httpserver/details/http_endpoint.hpp b/src/httpserver/details/http_endpoint.hpp index 147956a7..37fd0d8c 100644 --- a/src/httpserver/details/http_endpoint.hpp +++ b/src/httpserver/details/http_endpoint.hpp @@ -120,12 +120,12 @@ class http_endpoint return chunk_positions; } - const bool is_family_url() const + bool is_family_url() const { return family_url; } - const bool is_regex_compiled() const + bool is_regex_compiled() const { return reg_compiled; }