-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for Ubuntu 16.04's packaged nghttp2. (#29)
Motivation: We'd done all our development against newer copies of nghttp2, that behaved a bit differently. We should support Ubuntu's copy, at least while nghttp2 is relevant to us. Modifications: - Shimmed over a version difference. - Fixed the tests to stop relying on differences. - Removed the Swift 4.0.3 dockerfiles as we don't support Swift 4.0 anyway. Result: Users can build against Ubuntu 16.04's nghttp2 package.
- Loading branch information
Showing
8 changed files
with
81 additions
and
56 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
//===----------------------------------------------------------------------===// | ||
// | ||
// This source file is part of the SwiftNIO open source project | ||
// | ||
// Copyright (c) 2017-2018 Apple Inc. and the SwiftNIO project authors | ||
// Licensed under Apache License v2.0 | ||
// | ||
// See LICENSE.txt for license information | ||
// See CONTRIBUTORS.txt for the list of SwiftNIO project authors | ||
// | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
//===----------------------------------------------------------------------===// | ||
#include <c_nio_nghttp2.h> | ||
|
||
// This file provides an implementation of a number of shim functions to | ||
// handle different versions of nghttp2. | ||
|
||
// This shim only works on recent versions of nghttp2, otherwise it does | ||
// nothing. | ||
void CNIONghttp2_nghttp2_session_callbacks_set_error_callback( | ||
nghttp2_session_callbacks *cbs, | ||
CNIONghttp2_nghttp2_error_callback error_callback) { | ||
#if NGHTTP2_VERSION_NUM >= 0x010900 | ||
return nghttp2_session_callbacks_set_error_callback(cbs, error_callback); | ||
#endif | ||
} | ||
|
||
// This shim turns the macro into something we can see. | ||
int CNIONghttp2_nghttp2_version_number(void) { | ||
return NGHTTP2_VERSION_NUM; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters