From b144fb399719d4ae0d3e96a34211068d9a98a64c Mon Sep 17 00:00:00 2001 From: hhchinasoft Date: Thu, 23 Dec 2021 14:21:24 +0800 Subject: [PATCH 1/2] libwebsocket add BUILG.gn and config header file Signed-off-by: hhchinasoft --- BUILD.gn | 142 +++++++++++++++++++++++++++++++++ lws_config.h | 184 +++++++++++++++++++++++++++++++++++++++++++ lws_config_private.h | 123 +++++++++++++++++++++++++++++ 3 files changed, 449 insertions(+) create mode 100644 BUILD.gn create mode 100644 lws_config.h create mode 100644 lws_config_private.h diff --git a/BUILD.gn b/BUILD.gn new file mode 100644 index 00000000..56f0596b --- /dev/null +++ b/BUILD.gn @@ -0,0 +1,142 @@ +# Copyright (c) 2021 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build/ohos.gni") + +ohos_shared_library("websockets") { + sources = [ + "//third_party/libwebsockets/lib/core/alloc.c", + "//third_party/libwebsockets/lib/core/buflist.c", + "//third_party/libwebsockets/lib/core/context.c", + "//third_party/libwebsockets/lib/core/lws_dll2.c", + "//third_party/libwebsockets/lib/core/libwebsockets.c", + "//third_party/libwebsockets/lib/core/logs.c", + "//third_party/libwebsockets/lib/system/system.c", + "//third_party/libwebsockets/lib/misc/base64-decode.c", + "//third_party/libwebsockets/lib/misc/lws-ring.c", + "//third_party/libwebsockets/lib/core/vfs.c", + "//third_party/libwebsockets/lib/core-net/dummy-callback.c", + "//third_party/libwebsockets/lib/core-net/output.c", + "//third_party/libwebsockets/lib/core-net/close.c", + "//third_party/libwebsockets/lib/core-net/network.c", + "//third_party/libwebsockets/lib/core-net/vhost.c", + "//third_party/libwebsockets/lib/core-net/pollfd.c", + "//third_party/libwebsockets/lib/core-net/service.c", + "//third_party/libwebsockets/lib/core-net/sorted-usec-list.c", + "//third_party/libwebsockets/lib/core-net/state.c", + "//third_party/libwebsockets/lib/core-net/stats.c", + "//third_party/libwebsockets/lib/core-net/wsi.c", + "//third_party/libwebsockets/lib/core-net/wsi-timeout.c", + "//third_party/libwebsockets/lib/core-net/adopt.c", + "//third_party/libwebsockets/lib/roles/pipe/ops-pipe.c", + "//third_party/libwebsockets/lib/core-net/sequencer.c", + "//third_party/libwebsockets/lib/misc/dir.c", + "//third_party/libwebsockets/lib/roles/http/header.c", + "//third_party/libwebsockets/lib/roles/http/parsers.c", + "//third_party/libwebsockets/lib/roles/h1/ops-h1.c", + "//third_party/libwebsockets/lib/roles/ws/ops-ws.c", + "//third_party/libwebsockets/lib/roles/ws/client-ws.c", + "//third_party/libwebsockets/lib/roles/ws/client-parser-ws.c", + "//third_party/libwebsockets/lib/roles/ws/server-ws.c", + "//third_party/libwebsockets/lib/roles/raw-skt/ops-raw-skt.c", + "//third_party/libwebsockets/lib/roles/raw-file/ops-raw-file.c", + "//third_party/libwebsockets/lib/misc/lwsac/lwsac.c", + "//third_party/libwebsockets/lib/misc/lwsac/cached-file.c", + "//third_party/libwebsockets/lib/core-net/connect.c", + "//third_party/libwebsockets/lib/core-net/client.c", + "//third_party/libwebsockets/lib/roles/http/client/client-http.c", + "//third_party/libwebsockets/lib/roles/http/client/client-handshake.c", + "//third_party/libwebsockets/lib/core-net/server.c", + "//third_party/libwebsockets/lib/roles/listen/ops-listen.c", + "//third_party/libwebsockets/lib/tls/tls.c", + "//third_party/libwebsockets/lib/tls/tls-network.c", + "//third_party/libwebsockets/lib/tls/openssl/openssl-tls.c", + "//third_party/libwebsockets/lib/tls/openssl/openssl-x509.c", + "//third_party/libwebsockets/lib/tls/openssl/openssl-ssl.c", + "//third_party/libwebsockets/lib/tls/tls-server.c", + "//third_party/libwebsockets/lib/tls/openssl/openssl-server.c", + "//third_party/libwebsockets/lib/tls/tls-client.c", + "//third_party/libwebsockets/lib/tls/openssl/openssl-client.c", + "//third_party/libwebsockets/lib/misc/sha-1.c", + "//third_party/libwebsockets/lib/roles/h2/http2.c", + "//third_party/libwebsockets/lib/roles/h2/hpack.c", + "//third_party/libwebsockets/lib/roles/h2/ops-h2.c", + "//third_party/libwebsockets/lib/plat/unix/unix-caps.c", + "//third_party/libwebsockets/lib/plat/unix/unix-misc.c", + "//third_party/libwebsockets/lib/plat/unix/unix-init.c", + "//third_party/libwebsockets/lib/plat/unix/unix-file.c", + "//third_party/libwebsockets/lib/plat/unix/unix-pipe.c", + "//third_party/libwebsockets/lib/plat/unix/unix-service.c", + "//third_party/libwebsockets/lib/plat/unix/unix-sockets.c", + "//third_party/libwebsockets/lib/plat/unix/unix-fds.c", + "//third_party/libwebsockets/lib/roles/http/server/server.c", + "//third_party/libwebsockets/lib/roles/http/server/lws-spa.c", + "//third_party/libwebsockets/lib/event-libs/poll/poll.c", + "//third_party/libwebsockets/lib/misc/lejp.c", + "//third_party/libwebsockets/lib/roles/http/server/lejp-conf.c" + ] + + include_dirs = [ + "//third_party/libwebsockets", + "//third_party/libwebsockets/include", + "//third_party/libwebsockets/include/libwebsockets", + "//third_party/libwebsockets/include/libwebsockets/abstract", + "//third_party/libwebsockets/include/libwebsockets/abstract/protocols", + "//third_party/libwebsockets/lib", + "//third_party/libwebsockets/lib/tls", + "//third_party/libwebsockets/lib/tls/mbedtls/wrapper/include/internal", + "//third_party/libwebsockets/lib/tls/mbedtls/wrapper/include/platform", + "//third_party/libwebsockets/lib/secure-streams", + "//third_party/libwebsockets/lib/core-net", + "//third_party/libwebsockets/lib/roles", + "//third_party/libwebsockets/lib/roles/http", + "//third_party/libwebsockets/lib/roles/raw-proxy", + "//third_party/libwebsockets/lib/roles/h1", + "//third_party/libwebsockets/lib/roles/h2", + "//third_party/libwebsockets/lib/roles/ws", + "//third_party/libwebsockets/lib/event-libs", + "//third_party/libwebsockets/lib/event-libs/poll", + "//third_party/libwebsockets/lib/abstract", + "//third_party/libwebsockets/lib/abstract/protocols/smtp", + "//third_party/libwebsockets/lib/core", + "//third_party/libwebsockets/lib/jose", + "//third_party/libwebsockets/lib/jose/jwe", + "//third_party/libwebsockets/lib/plat/unix", + "//third_party/openssl/include/openssl", + "//third_party/openssl/crypto/evp", + "//third_party/glib/glib", + "//third_party/glib" + ] + + cflags = [ + "-fPIC", + "-Os", + "-g", + "-Wall", + "-DOPENSSL_NO_TLS1_2_METHOD", + "-fno-strict-aliasing", + "-fvisibility=hidden", + "-Wmissing-declarations", + "-Waggregate-return", + "-pipe", + ] + + deps = [ + "//third_party/openssl:crypto_source", + "//third_party/openssl:ssl_source", + "//third_party/zlib:libz", + ] + + part_name = "netstack" + subsystem_name = "communication" +} diff --git a/lws_config.h b/lws_config.h new file mode 100644 index 00000000..888a328f --- /dev/null +++ b/lws_config.h @@ -0,0 +1,184 @@ +/* lws_config.h Generated from lws_config.h.in */ + +#ifndef NDEBUG + #ifndef _DEBUG + #define _DEBUG + #endif +#endif + +#define LWS_INSTALL_DATADIR "/usr/local/share" +#define LWS_LIBRARY_VERSION_MAJOR 4 +#define LWS_LIBRARY_VERSION_MINOR 0 +#define LWS_LIBRARY_VERSION_PATCH 20 +/* LWS_LIBRARY_VERSION_NUMBER looks like 1005001 for e.g. version 1.5.1 */ +#define LWS_LIBRARY_VERSION_NUMBER (LWS_LIBRARY_VERSION_MAJOR * 1000000) + \ + (LWS_LIBRARY_VERSION_MINOR * 1000) + \ + LWS_LIBRARY_VERSION_PATCH +#define LWS_MAX_SMP 1 + +/* #undef LWS_LIBRARY_VERSION_NUMBER */ + +/* #undef LWS_AVOID_SIGPIPE_IGN */ +/* #undef LWS_BUILD_HASH */ +/* #undef LWS_BUILTIN_GETIFADDRS */ +#define LWS_CLIENT_HTTP_PROXYING +/* #undef LWS_DETECTED_PLAT_IOS */ +/* #undef LWS_FALLBACK_GETHOSTBYNAME */ +#define LWS_HAS_INTPTR_T +#define LWS_HAS_GETOPT_LONG +/* #undef LWS_HAVE__ATOI64 */ +#define LWS_HAVE_ATOLL +#define LWS_HAVE_BN_bn2binpad +/* #undef LWS_HAVE_BN_bn2binpad */ +#define LWS_HAVE_CLOCK_GETTIME +/* #undef LWS_HAVE_EC_POINT_get_affine_coordinates */ +#define LWS_HAVE_ECDSA_SIG_set0 +#define LWS_HAVE_EVP_MD_CTX_free +/* #undef LWS_HAVE_ECDSA_SIG_set0 */ +/* #undef LWS_HAVE_EVP_MD_CTX_free */ +#define LWS_HAVE_EVP_aes_128_wrap +#define LWS_HAVE_EVP_aes_128_cfb8 +#define LWS_HAVE_EVP_aes_128_cfb128 +#define LWS_HAVE_EVP_aes_192_cfb8 +#define LWS_HAVE_EVP_aes_192_cfb128 +#define LWS_HAVE_EVP_aes_256_cfb8 +#define LWS_HAVE_EVP_aes_256_cfb128 +#define LWS_HAVE_EVP_aes_128_xts +#define LWS_HAVE_EXECVPE +/* #undef LWS_HAVE_LIBCAP */ +#define LWS_HAVE_HMAC_CTX_new +/* #undef LWS_HAVE_HMAC_CTX_new */ +#define LWS_HAVE_MALLOC_H +#define LWS_HAVE_MALLOC_TRIM +#define LWS_HAVE_MALLOC_USABLE_SIZE +/* #undef LWS_HAVE_mbedtls_net_init */ +/* #undef LWS_HAVE_mbedtls_ssl_conf_alpn_protocols */ +/* #undef LWS_HAVE_mbedtls_ssl_get_alpn_protocol */ +/* #undef LWS_HAVE_mbedtls_ssl_conf_sni */ +/* #undef LWS_HAVE_mbedtls_ssl_set_hs_ca_chain */ +/* #undef LWS_HAVE_mbedtls_ssl_set_hs_own_cert */ +/* #undef LWS_HAVE_mbedtls_ssl_set_hs_authmode */ +/* #undef LWS_HAVE_MBEDTLS_NET_SOCKETS */ +/* #undef LWS_HAVE_NEW_UV_VERSION_H */ +#define LWS_HAVE_OPENSSL_ECDH_H +#define LWS_HAVE_PIPE2 +#define LWS_HAVE_EVENTFD +#define LWS_HAVE_PTHREAD_H +#define LWS_HAVE_RSA_SET0_KEY +/* #undef LWS_HAVE_RSA_SET0_KEY */ +/* #undef LWS_HAVE_RSA_verify_pss_mgf1 */ +#define LWS_HAVE_SSL_CTX_get0_certificate +#define LWS_HAVE_SSL_CTX_set1_param +/* #undef LWS_HAVE_SSL_CTX_set_ciphersuites */ +#define LWS_HAVE_SSL_EXTRA_CHAIN_CERTS +#define LWS_HAVE_SSL_get0_alpn_selected +/* #undef LWS_HAVE_SSL_CTX_EVP_PKEY_new_raw_private_key */ +#define LWS_HAVE_SSL_set_alpn_protos +#define LWS_HAVE_SSL_SET_INFO_CALLBACK +/* #undef LWS_HAVE__STAT32I64 */ +#define LWS_HAVE_STDINT_H +/* #undef LWS_HAVE_SYS_CAPABILITY_H */ +/* #undef LWS_HAVE_TLS_CLIENT_METHOD */ +#define LWS_HAVE_TLS_CLIENT_METHOD +/* #undef LWS_HAVE_UV_VERSION_H */ +#define LWS_HAVE_VFORK +/* #undef LWS_HAVE_X509_get_key_usage */ +#define LWS_HAVE_X509_VERIFY_PARAM_set1_host +#define LWS_LIBRARY_VERSION "4.0.20" +#define LWS_LOGGING_BITFIELD_CLEAR 0 +#define LWS_LOGGING_BITFIELD_SET 0 +/* #undef LWS_MINGW_SUPPORT */ +/* #undef LWS_NO_CLIENT */ +#define LWS_NO_DAEMONIZE +#define LWS_OPENSSL_CLIENT_CERTS "../share" +#define LWS_OPENSSL_SUPPORT +/* #undef LWS_PLAT_OPTEE */ +#define LWS_PLAT_UNIX +/* #undef LWS_PLAT_FREERTOS */ +/* #undef LWS_ROLE_CGI */ +/* #undef LWS_ROLE_DBUS */ +#define LWS_ROLE_H1 +#define LWS_ROLE_H2 +#define LWS_ROLE_RAW +#define LWS_ROLE_RAW_FILE +/* #undef LWS_ROLE_RAW_PROXY */ +#define LWS_ROLE_WS +/* #undef LWS_ROLE_MQTT */ +/* #undef LWS_SHA1_USE_OPENSSL_NAME */ +#define LWS_SSL_CLIENT_USE_OS_CA_CERTS +/* #undef LWS_SSL_SERVER_WITH_ECDH_CERT */ +/* #undef LWS_WITH_ABSTRACT */ +/* #undef LWS_WITH_ACCESS_LOG */ +/* #undef LWS_WITH_ACME */ +/* #undef LWS_WITH_ALSA */ +/* #undef LWS_WITH_SYS_ASYNC_DNS */ +/* #undef LWS_WITH_BORINGSSL */ +/* #undef LWS_WITH_CGI */ +#define LWS_WITH_CUSTOM_HEADERS +#define LWS_WITH_DEPRECATED_LWS_DLL +/* #undef LWS_WITH_DEPRECATED_LWS_DLL */ +/* #undef LWS_WITH_DETAILED_LATENCY */ +#define LWS_WITH_DIR +/* #undef LWS_WITH_ESP32 */ +/* #undef LWS_HAVE_EVBACKEND_LINUXAIO */ +/* #undef LWS_HAVE_EVBACKEND_IOURING */ +/* #undef LWS_WITH_EXTERNAL_POLL */ +#define LWS_WITH_FILE_OPS +/* #undef LWS_WITH_FSMOUNT */ +/* #undef LWS_WITH_FTS */ +/* #undef LWS_WITH_GENCRYPTO */ +/* #undef LWS_WITH_GENERIC_SESSIONS */ +/* #undef LWS_WITH_GLIB */ +/* #undef LWS_WITH_GTK */ +#define LWS_WITH_HTTP2 +#define LWS_WITH_HTTP_BASIC_AUTH +/* #undef LWS_WITH_HTTP_BROTLI */ +/* #undef LWS_WITH_HTTP_PROXY */ +/* #undef LWS_WITH_HTTP_STREAM_COMPRESSION */ +#define LWS_WITH_HTTP_UNCOMMON_HEADERS +/* #undef LWS_WITH_IPV6 */ +/* #undef LWS_WITH_JOSE */ +#define LWS_WITH_LEJP +/* #undef LWS_WITH_LIBEV */ +/* #undef LWS_WITH_LIBEVENT */ +/* #undef LWS_WITH_LIBUV */ +#define LWS_WITH_LWSAC +#define LWS_LOGS_TIMESTAMP +/* #undef LWS_WITH_MBEDTLS */ +/* #undef LWS_WITH_MINIZ */ +#define LWS_WITH_NETWORK +/* #undef LWS_WITH_NO_LOGS */ +#define LWS_WITH_CLIENT +#define LWS_WITHOUT_EXTENSIONS +#define LWS_WITH_SERVER +/* #undef LWS_WITH_SPAWN */ +/* #undef LWS_WITH_PEER_LIMITS */ +/* #undef LWS_WITH_PLUGINS */ +/* #undef LWS_WITH_POLARSSL */ +#define LWS_WITH_POLL +/* #undef LWS_WITH_RANGES */ +/* #undef LWS_WITH_SECURE_STREAMS */ +/* #undef LWS_WITH_SECURE_STREAMS_SYS_AUTH_API_AMAZON_COM */ +/* #undef LWS_WITH_SECURE_STREAMS_PROXY_API */ +/* #undef LWS_WITH_SELFTESTS */ +#define LWS_WITH_SEQUENCER +/* #undef LWS_WITH_SERVER_STATUS */ +#define LWS_WITH_SMTP +/* #undef LWS_WITH_SMTP */ +/* #undef LWS_WITH_SOCKS5 */ +/* #undef LWS_WITH_STATEFUL_URLDECODE */ +/* #undef LWS_WITH_STATS */ +/* #undef LWS_WITH_STRUCT_SQLITE3 */ +/* #undef LWS_WITH_STRUCT_JSON */ +/* #undef LWS_WITH_SQLITE3 */ +/* #undef LWS_WITH_SYS_NTPCLIENT */ +/* #undef LWS_WITH_SYS_DHCP_CLIENT */ +/* #undef LWS_WITH_THREADPOOL */ +#define LWS_WITH_TLS +#define LWS_WITH_UDP +/* #undef LWS_WITH_UNIX_SOCK */ +/* #undef LWS_WITH_ZIP_FOPS */ +/* #undef USE_OLD_CYASSL */ +/* #undef USE_WOLFSSL */ + + diff --git a/lws_config_private.h b/lws_config_private.h new file mode 100644 index 00000000..c86feeb4 --- /dev/null +++ b/lws_config_private.h @@ -0,0 +1,123 @@ +/* lws_config_private.h.in. Private compilation options. */ + +#ifndef NDEBUG + #ifndef _DEBUG + #define _DEBUG + #endif +#endif + +/* Define to 1 to use CyaSSL as a replacement for OpenSSL. + * LWS_OPENSSL_SUPPORT needs to be set also for this to work. */ +/* #undef USE_CYASSL */ + +/* Define to 1 if you have the header file. */ +#define LWS_HAVE_DLFCN_H + +/* Define to 1 if you have the header file. */ +#define LWS_HAVE_FCNTL_H + +/* Define to 1 if you have the `fork' function. */ +#define LWS_HAVE_FORK + +/* Define to 1 if you have the `getenv' function. */ +#define LWS_HAVE_GETENV + +/* Define to 1 if you have the header file. */ +/* #undef LWS_HAVE_IN6ADDR_H */ + +/* Define to 1 if your system has a GNU libc compatible `malloc' function, and + to 0 otherwise. */ +#define LWS_HAVE_MALLOC + +/* Define to 1 if you have the header file. */ +#define LWS_HAVE_MEMORY_H + +/* Define to 1 if you have the `memset' function. */ +#define LWS_HAVE_MEMSET + +/* Define to 1 if you have the header file. */ +#define LWS_HAVE_NETINET_IN_H + +/* Define to 1 if your system has a GNU libc compatible `realloc' function, + and to 0 otherwise. */ +#define LWS_HAVE_REALLOC + +/* Define to 1 if you have the `socket' function. */ +#define LWS_HAVE_SOCKET + +/* Define to 1 if you have the header file. */ +#define LWS_HAVE_STDINT_H + +/* Define to 1 if you have the header file. */ +#define LWS_HAVE_STDLIB_H + +/* Define to 1 if you have the `strerror' function. */ +#define LWS_HAVE_STRERROR + +/* Define to 1 if you have the header file. */ +#define LWS_HAVE_STRINGS_H + +/* Define to 1 if you have the header file. */ +#define LWS_HAVE_STRING_H + +/* Define to 1 if you have the header file. */ +#define LWS_HAVE_SYS_PRCTL_H + +/* Define to 1 if you have the header file. */ +#define LWS_HAVE_SYS_SOCKET_H + +/* Define to 1 if you have the header file. */ +/* #undef LWS_HAVE_SYS_SOCKIO_H */ + +/* Define to 1 if you have the header file. */ +#define LWS_HAVE_SYS_STAT_H + +/* Define to 1 if you have the header file. */ +#define LWS_HAVE_SYS_TYPES_H + +/* Define to 1 if you have the header file. */ +#define LWS_HAVE_UNISTD_H + +#define LWS_HAVE_TCP_USER_TIMEOUT + +/* Define to 1 if you have the `vfork' function. */ +#define LWS_HAVE_VFORK + +/* Define to 1 if you have the header file. */ +/* #undef LWS_HAVE_VFORK_H */ + +/* Define to 1 if `fork' works. */ +#define LWS_HAVE_WORKING_FORK + +/* Define to 1 if `vfork' works. */ +#define LWS_HAVE_WORKING_VFORK + +/* Define to 1 if execvpe() exists */ +#define LWS_HAVE_EXECVPE + +/* Define to 1 if you have the header file. */ +/* #undef LWS_HAVE_ZLIB_H */ + +#define LWS_HAVE_GETLOADAVG + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#undef LT_OBJDIR // We're not using libtool + +/* Define to rpl_malloc if the replacement function should be used. */ +/* #undef malloc */ + +/* Define to rpl_realloc if the replacement function should be used. */ +/* #undef realloc */ + +/* Define to 1 if we have getifaddrs */ +#define LWS_HAVE_GETIFADDRS + +/* Define if the inline keyword doesn't exist. */ +/* #undef inline */ + +/* #undef LWS_WITH_ZLIB */ +#define LWS_HAS_PTHREAD_SETNAME_NP + +/* Defined if you have the header file. */ +#define LWS_HAVE_INTTYPES_H -- Gitee From a009bcb38bde3b2646d768549303c1d596eb5ff3 Mon Sep 17 00:00:00 2001 From: hhchinasoft Date: Mon, 27 Dec 2021 18:54:19 +0800 Subject: [PATCH 2/2] add lws_config.h and lws_config_private.h copyright information Signed-off-by: hhchinasoft --- lws_config.h | 30 +++++++++++++++++++++++++++--- lws_config_private.h | 30 +++++++++++++++++++++++++++--- 2 files changed, 54 insertions(+), 6 deletions(-) diff --git a/lws_config.h b/lws_config.h index 888a328f..01d942ad 100644 --- a/lws_config.h +++ b/lws_config.h @@ -1,9 +1,33 @@ +/* + * libwebsockets - small server side websockets and web server implementation + * + * Copyright (C) 2021 Huawei Device Co., Ltd. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to + * deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + */ + /* lws_config.h Generated from lws_config.h.in */ #ifndef NDEBUG - #ifndef _DEBUG - #define _DEBUG - #endif + #ifndef _DEBUG + #define _DEBUG + #endif #endif #define LWS_INSTALL_DATADIR "/usr/local/share" diff --git a/lws_config_private.h b/lws_config_private.h index c86feeb4..510cb2aa 100644 --- a/lws_config_private.h +++ b/lws_config_private.h @@ -1,9 +1,33 @@ +/* + * libwebsockets - small server side websockets and web server implementation + * + * Copyright (C) 2021 Huawei Device Co., Ltd. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to + * deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + */ + /* lws_config_private.h.in. Private compilation options. */ #ifndef NDEBUG - #ifndef _DEBUG - #define _DEBUG - #endif + #ifndef _DEBUG + #define _DEBUG + #endif #endif /* Define to 1 to use CyaSSL as a replacement for OpenSSL. -- Gitee