From 5595ba643e126462e1fc6ff92a4dde850558983c Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Wed, 22 Apr 2015 23:03:29 +0900 Subject: [PATCH 1/5] travis: Use container-based infrastructure --- .travis.yml | 41 +++++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/.travis.yml b/.travis.yml index 59d8c3a2..c13f8a25 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,28 +3,29 @@ compiler: - clang #Disable gcc build for the moment... # - gcc +sudo: false +addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - g++-4.8 + - libstdc++-4.8-dev + - autoconf + - automake + - autotools-dev + - libtool + - pkg-config + - zlib1g-dev + - libcunit1-dev + - libssl-dev + - libxml2-dev + - libev-dev + - libevent-dev + - libjansson-dev + - libjemalloc-dev before_install: - $CC --version - - sudo add-apt-repository --yes ppa:ubuntu-toolchain-r/test - - sudo apt-get update -qq - #Install and use gcc-4.8 (don't build with gcc-4.6) - #libstdc++-4.8 is needed by Clang to build too - - sudo apt-get -qq install g++-4.8 libstdc++-4.8-dev - - > - sudo apt-get install --no-install-recommends -qq - autoconf - automake - autotools-dev - libtool - pkg-config - zlib1g-dev - libcunit1-dev - libssl-dev - libxml2-dev - libev-dev - libevent-dev - libjansson-dev - libjemalloc-dev - if [ "$CXX" = "g++" ]; then export CXX="g++-4.8" CC="gcc-4.8"; fi - $CC --version before_script: From 4069aab4f79f71f3f9d630b964d36ee3664ad885 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Wed, 22 Apr 2015 23:17:21 +0900 Subject: [PATCH 2/5] travis: Attempt to enable gcc --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index c13f8a25..678bb016 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,7 @@ language: cpp compiler: - clang #Disable gcc build for the moment... -# - gcc + - gcc sudo: false addons: apt: From 58b7f4a096dccdefd8c5302aac267a1b2806f167 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Wed, 22 Apr 2015 23:25:54 +0900 Subject: [PATCH 3/5] Fix inline error with travis gcc-4.8 --- lib/nghttp2_hd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/nghttp2_hd.c b/lib/nghttp2_hd.c index b26fbbc3..3a97ac71 100644 --- a/lib/nghttp2_hd.c +++ b/lib/nghttp2_hd.c @@ -114,7 +114,7 @@ static int memeq(const void *s1, const void *s2, size_t n) { * This function was generated by genlibtokenlookup.py. Inspired by * h2o header lookup. https://github.com/h2o/h2o */ -static inline int lookup_token(const uint8_t *name, size_t namelen) { +static int lookup_token(const uint8_t *name, size_t namelen) { switch (namelen) { case 2: switch (name[1]) { From 86ddda5c0ee084b2b236bff9d2645c3c80dcce83 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Wed, 22 Apr 2015 23:36:32 +0900 Subject: [PATCH 4/5] tiny-nghttpd: Fix compile error with travis gcc-4.8 --- examples/tiny-nghttpd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/tiny-nghttpd.c b/examples/tiny-nghttpd.c index b25293fe..a7677ee1 100644 --- a/examples/tiny-nghttpd.c +++ b/examples/tiny-nghttpd.c @@ -699,7 +699,8 @@ static ssize_t fd_read_callback(nghttp2_session *session _U_, nghttp2_data_source *source, void *user_data _U_) { stream *strm = source->ptr; - ssize_t nread = (int64_t)length < strm->fileleft ? length : strm->fileleft; + ssize_t nread = + (int64_t)length < strm->fileleft ? (int64_t)length : strm->fileleft; *data_flags |= NGHTTP2_DATA_FLAG_NO_COPY; From 6b8aa36c989f39b893ad059b7f50eaf7cc89d94e Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Wed, 22 Apr 2015 23:47:13 +0900 Subject: [PATCH 5/5] travis: Use gcc-4.9 instead of gcc-4.8 --- .travis.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 678bb016..78e69d34 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,6 @@ language: cpp compiler: - clang -#Disable gcc build for the moment... - gcc sudo: false addons: @@ -9,8 +8,8 @@ addons: sources: - ubuntu-toolchain-r-test packages: - - g++-4.8 - - libstdc++-4.8-dev + - g++-4.9 + - libstdc++-4.9-dev - autoconf - automake - autotools-dev @@ -26,7 +25,7 @@ addons: - libjemalloc-dev before_install: - $CC --version - - if [ "$CXX" = "g++" ]; then export CXX="g++-4.8" CC="gcc-4.8"; fi + - if [ "$CXX" = "g++" ]; then export CXX="g++-4.9" CC="gcc-4.9"; fi - $CC --version before_script: - autoreconf -i