Skip to content

Commit 6ede3c9

Browse files
authored
Update configure and bootstrap, fix warnings in http_endpoint (etr#205)
* Update configure and bootstrap, fix compiler warnings in http_endpoint and deferred_response, add OS specific readme for commonly seen issues * Move const to end to satisfy both clang and g++
1 parent 3fa034c commit 6ede3c9

File tree

7 files changed

+26
-5
lines changed

7 files changed

+26
-5
lines changed

README.CentOS-7

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
## Cent OS 7 / RHEL 7
2+
3+
CentOS 7 has a lower version of gcc (4.8.7) that is barely C++11 capable and this library
4+
needs a better compiler. We recommend at least gcc 5+
5+
6+
We recommend installing devtoolset-8
7+
https://www.softwarecollections.org/en/scls/rhscl/devtoolset-8/

README.FreeBSD

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
## Building on FreeBSD (Tested on 12.0)
2+
3+
# Due to the differences in the directory structures on BSD systems some minor tweaks need to occur
4+
# Also, FreeBSD and AIX "make" command is not compatible with gmake, like Linux and Mingw are
5+
6+
export MAKE=gmake
7+
bootstrap
8+
configure CPPFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib
9+
gmake

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ Additionally, clients can specify resource limits on the overall number of conne
7676
[Back to TOC](#table-of-contents)
7777

7878
## Requirements
79-
libhttpserver can be used without any dependencies aside for libmicrohttpd.
79+
libhttpserver can be used without any dependencies aside from libmicrohttpd.
8080

8181
The minimum versions required are:
8282
* g++ >= 5.5.0 or clang-3.6
@@ -92,6 +92,8 @@ For versions before 0.18.0, on MinGW, you will need:
9292

9393
Furthermore, the testcases use [libcurl](http://curl.haxx.se/libcurl/) but you don't need it to compile the library.
9494

95+
Please refer to the readme file for your particular distribution if there is one for important notes.
96+
9597
[Back to TOC](#table-of-contents)
9698

9799
## Building

bootstrap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
#
33
# This file is part of libhttpserver
44
# Copyright (C) 2011, 2012, 2013, 2014, 2015 Sebastiano Merlino

configure.ac

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,9 @@ case $host_os in
284284
AM_CXXFLAGS="$AM_CXXFLAGS -DDARWIN"
285285
AM_CFLAGS="$AM_CFLAGS -DDARWIN"
286286
;;
287+
freebsd* )
288+
AM_LDFLAGS=""
289+
;;
287290
esac
288291

289292
AC_MSG_CHECKING([whether to build with coverage information])

src/httpserver/deferred_response.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ class deferred_response : public string_response
7070
ssize_t (*cycle_callback)(std::shared_ptr<T>, char*, size_t);
7171
std::shared_ptr<T> closure_data;
7272

73-
static ssize_t cb(void* cls, uint64_t pos, char* buf, size_t max)
73+
static ssize_t cb(void* cls, uint64_t, char* buf, size_t max)
7474
{
7575
deferred_response<T>* dfr = static_cast<deferred_response<T>*>(cls);
7676
return dfr->cycle_callback(dfr->closure_data, buf, max);

src/httpserver/details/http_endpoint.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,12 +120,12 @@ class http_endpoint
120120
return chunk_positions;
121121
}
122122

123-
const bool is_family_url() const
123+
bool is_family_url() const
124124
{
125125
return family_url;
126126
}
127127

128-
const bool is_regex_compiled() const
128+
bool is_regex_compiled() const
129129
{
130130
return reg_compiled;
131131
}

0 commit comments

Comments
 (0)