Skip to content

Commit

Permalink
deps: update nghttp2 to 1.58.0
Browse files Browse the repository at this point in the history
PR-URL: #50441
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Marco Ippolito <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
  • Loading branch information
nodejs-github-bot authored and richardlau committed Apr 26, 2024
1 parent 5e93eae commit e28316d
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 9 deletions.
4 changes: 2 additions & 2 deletions deps/nghttp2/lib/includes/nghttp2/nghttp2ver.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@
* @macro
* Version number of the nghttp2 library release
*/
#define NGHTTP2_VERSION "1.57.0"
#define NGHTTP2_VERSION "1.58.0"

/**
* @macro
* Numerical representation of the version number of the nghttp2 library
* release. This is a 24 bit number with 8 bits for major number, 8 bits
* for minor and 8 bits for patch. Version 1.2.3 becomes 0x010203.
*/
#define NGHTTP2_VERSION_NUM 0x013900
#define NGHTTP2_VERSION_NUM 0x013a00

#endif /* NGHTTP2VER_H */
2 changes: 2 additions & 0 deletions deps/nghttp2/lib/nghttp2_map.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ static void map_bucket_set_data(nghttp2_map_bucket *bkt, uint32_t hash,
bkt->data = data;
}

#ifndef WIN32
void nghttp2_map_print_distance(nghttp2_map *map) {
uint32_t i;
size_t idx;
Expand All @@ -145,6 +146,7 @@ void nghttp2_map_print_distance(nghttp2_map *map) {
distance(map->tablelen, map->tablelenbits, bkt, idx));
}
}
#endif /* !WIN32 */

static int insert(nghttp2_map_bucket *table, uint32_t tablelen,
uint32_t tablelenbits, uint32_t hash,
Expand Down
2 changes: 2 additions & 0 deletions deps/nghttp2/lib/nghttp2_map.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ size_t nghttp2_map_size(nghttp2_map *map);
int nghttp2_map_each(nghttp2_map *map, int (*func)(void *data, void *ptr),
void *ptr);

#ifndef WIN32
void nghttp2_map_print_distance(nghttp2_map *map);
#endif /* !WIN32 */

#endif /* NGHTTP2_MAP_H */
14 changes: 7 additions & 7 deletions deps/nghttp2/lib/nghttp2_time.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
# include <sysinfoapi.h>
#endif /* HAVE_SYSINFOAPI_H */

#ifndef HAVE_GETTICKCOUNT64
#if !defined(HAVE_GETTICKCOUNT64) || defined(__CYGWIN__)
static uint64_t time_now_sec(void) {
time_t t = time(NULL);

Expand All @@ -42,9 +42,11 @@ static uint64_t time_now_sec(void) {

return (uint64_t)t;
}
#endif /* HAVE_GETTICKCOUNT64 */
#endif /* !HAVE_GETTICKCOUNT64 || __CYGWIN__ */

#ifdef HAVE_CLOCK_GETTIME
#if defined(HAVE_GETTICKCOUNT64) && !defined(__CYGWIN__)
uint64_t nghttp2_time_now_sec(void) { return GetTickCount64() / 1000; }
#elif defined(HAVE_CLOCK_GETTIME)
uint64_t nghttp2_time_now_sec(void) {
struct timespec tp;
int rv = clock_gettime(CLOCK_MONOTONIC, &tp);
Expand All @@ -55,8 +57,6 @@ uint64_t nghttp2_time_now_sec(void) {

return (uint64_t)tp.tv_sec;
}
#elif defined(HAVE_GETTICKCOUNT64)
uint64_t nghttp2_time_now_sec(void) { return GetTickCount64() / 1000; }
#else /* !HAVE_CLOCK_GETTIME && !HAVE_GETTICKCOUNT64 */
#else /* (!HAVE_CLOCK_GETTIME || __CYGWIN__) && !HAVE_GETTICKCOUNT64 */
uint64_t nghttp2_time_now_sec(void) { return time_now_sec(); }
#endif /* !HAVE_CLOCK_GETTIME && !HAVE_GETTICKCOUNT64 */
#endif /* (!HAVE_CLOCK_GETTIME || __CYGWIN__) && !HAVE_GETTICKCOUNT64 */

0 comments on commit e28316d

Please sign in to comment.