mirror of
https://gitea.invidious.io/iv-org/litespeed-quic.git
synced 2024-08-15 00:53:43 +00:00
f07b3eae43
* fix MSVC compiler shared library issues - mostly around 'extern const' * add vcpkg install getopt to appveyor-windows.yml show appveyor where to get getopt from vcpkg (non-static lib to avoid LGPL violation) * add missing else case in lsquic_shared_support.h for windows static lib path * have cmake spit out it's version have cmake copy dependent dlls to build dir for tests on windows (getopt.dll) * copy getopt.dll dep for tests added commented version that requires >= 3.21 but handles any dll deps * try caching boringssl dir to reduce CI build time since it's always same commit specified in config file define VCPKG_ROOT in env since I can't seem to find it by VCPKG_ROOT or VCPKG_INSTALLED_DIR in appveyor's cmake v3.16 + vcpkg * make windows cache dependent on yml and cmd * sync up with changes to ls-qpack
38 lines
757 B
C
38 lines
757 B
C
/* Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc. See LICENSE. */
|
|
#include <assert.h>
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
#include <inttypes.h>
|
|
#ifdef _MSC_VER
|
|
#include "vc_compat.h"
|
|
#endif
|
|
#include "lsquic_int_types.h"
|
|
#include "lsquic_senhist.h"
|
|
#include "lsquic_types.h"
|
|
#include "lsquic_logger.h"
|
|
|
|
|
|
int
|
|
main (void)
|
|
{
|
|
struct lsquic_senhist hist = { 0, 0
|
|
#if !LSQUIC_SENHIST_FATAL
|
|
, 0
|
|
#endif
|
|
};
|
|
lsquic_packno_t packno;
|
|
|
|
lsquic_senhist_init(&hist, 0);
|
|
|
|
assert(0 == lsquic_senhist_largest(&hist));
|
|
|
|
for (packno = 1; packno < 100; ++packno)
|
|
lsquic_senhist_add(&hist, packno);
|
|
|
|
assert(99 == lsquic_senhist_largest(&hist));
|
|
|
|
lsquic_senhist_cleanup(&hist);
|
|
|
|
return 0;
|
|
}
|