diff --git a/BUILD.gn b/BUILD.gn new file mode 100644 index 0000000000000000000000000000000000000000..7ebe16828d6c71f41de3dc3f9c8fb24ba2d60a58 --- /dev/null +++ b/BUILD.gn @@ -0,0 +1,50 @@ +# Copyright (c) Huawei Technologies Co., Ltd. 2019-2019. All rights reserved. + +import("//build/zidane.gni") + +config("zlib_config") { + include_dirs = [ "." ] + cflags = [ + "-Wno-incompatible-pointer-types", + "-Werror", + "-Wimplicit-function-declaration", + ] +} + +static_library("libz") { + sources = [ + "adler32.c", + "compress.c", + "crc32.c", + "crc32.h", + "deflate.c", + "deflate.h", + "gzclose.c", + "gzguts.h", + "gzlib.c", + "gzread.c", + "gzwrite.c", + "infback.c", + "inffast.c", + "inffast.h", + "inffixed.h", + "inflate.h", + "inflate.c", + "inftrees.c", + "inftrees.h", + "trees.c", + "trees.h", + "uncompr.c", + "zconf.h", + "zlib.h", + "zutil.c", + "zutil.h", + "contrib/minizip/ioapi.c", + "contrib/minizip/unzip.c", + ] + public_configs = [ ":zlib_config" ] +} + +static_library("libz_test") { + deps = [":libz"] +} diff --git a/gzguts.h b/gzguts.h index 990a4d2514933709883a7d949ed52146675fe2c1..96f30c5a243073ec879368a7e1bf82e00ab5a4aa 100644 --- a/gzguts.h +++ b/gzguts.h @@ -30,6 +30,7 @@ # define _POSIX_SOURCE #endif #include +#include #ifdef _WIN32 # include