wslay: Sync with upstream 0e7d106ff from godot.

This commit is contained in:
Relintai 2023-08-30 11:23:07 +02:00
parent 5868fa025f
commit a96e650b7e
11 changed files with 31 additions and 37 deletions

View File

@ -449,7 +449,7 @@ folder.
## wslay
- Upstream: https://github.com/tatsuhiro-t/wslay
- Version: 1.1.1+git (45d22583b488f79d5a4e598cc7675c191c5ab53f, 2021)
- Version: 1.1.1+git (0e7d106ff89ad6638090fd811a9b2e4c5dda8d40, 2022)
- License: MIT
File extracted from upstream release tarball:

View File

@ -1,10 +1,18 @@
#ifndef CONFIG_H
#define CONFIG_H
// -- PANDEMONIUM start --
/* This configuration file is custom written for Godot.
* When updating the library, generate it with CMake upstream and compare
* the contents to see if new options should be backported here.
*/
// Those are handled in our SCsub.
/* #undef HAVE_ARPA_INET_H */
/* #undef HAVE_NETINET_IN_H */
/* #undef HAVE_WINSOCK2_H */
#ifdef BIG_ENDIAN_ENABLED
#define WORDS_BIGENDIAN
#endif
// -- PANDEMONIUM end --
#endif /* CONFIG_H */

View File

@ -6,12 +6,12 @@ index 77a4e8253f..ac6873613f 100644
#include <stdlib.h>
#include <sys/types.h>
+/* PANDEMONIUM ADDITTION */
+/* GODOT ADDITTION */
+#if defined(_MSC_VER)
+#include <BaseTsd.h>
+typedef SSIZE_T ssize_t;
+#endif
+/* PANDEMONIUM END */
+/* GODOT END */
+
/*
* wslay/wslayver.h is generated from wslay/wslayver.h.in by

View File

@ -1,5 +1,3 @@
#ifndef WSLAY_H
#define WSLAY_H
/*
* Wslay - The WebSocket Library
*
@ -24,8 +22,8 @@
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#ifndef WSLAY_H
#define WSLAY_H
#ifdef __cplusplus
extern "C" {
@ -35,12 +33,12 @@ extern "C" {
#include <stdlib.h>
#include <sys/types.h>
/* PANDEMONIUM ADDITTION */
/* GODOT ADDITTION */
#if defined(_MSC_VER)
#include <BaseTsd.h>
typedef SSIZE_T ssize_t;
#endif
/* PANDEMONIUM END */
/* GODOT END */
/*
* wslay/wslayver.h is generated from wslay/wslayver.h.in by
@ -487,7 +485,7 @@ void wslay_event_config_set_max_recv_msg_length(wslay_event_context_ptr ctx,
uint64_t val);
/*
* Sets callbacks to ctx. The callbacks previouly set by this function
* Sets callbacks to ctx. The callbacks previously set by this function
* or wslay_event_context_server_init() or
* wslay_event_context_client_init() are replaced with callbacks.
*/

View File

@ -1,5 +1,3 @@
#ifndef WSLAYVER_H
#define WSLAYVER_H
/*
* Wslay - The WebSocket Library
*
@ -24,8 +22,8 @@
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#ifndef WSLAYVER_H
#define WSLAYVER_H
/* Version number of wslay release */
#define WSLAY_VERSION "1.1.1"

View File

@ -1,5 +1,3 @@
#ifndef WSLAY_EVENT_H
#define WSLAY_EVENT_H
/*
* Wslay - The WebSocket Library
*
@ -24,8 +22,8 @@
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#ifndef WSLAY_EVENT_H
#define WSLAY_EVENT_H
#ifdef HAVE_CONFIG_H
# include <config.h>

View File

@ -109,7 +109,7 @@ ssize_t wslay_frame_send(wslay_frame_context_ptr ctx,
int flags = 0;
if (iocb->data_length > 0) {
flags |= WSLAY_MSG_MORE;
};
}
r = ctx->callbacks.send_callback(ctx->oheadermark, (size_t)len, flags,
ctx->user_data);
if (r > 0) {

View File

@ -1,5 +1,3 @@
#ifndef WSLAY_FRAME_H
#define WSLAY_FRAME_H
/*
* Wslay - The WebSocket Library
*
@ -24,8 +22,8 @@
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#ifndef WSLAY_FRAME_H
#define WSLAY_FRAME_H
#ifdef HAVE_CONFIG_H
# include <config.h>

View File

@ -1,5 +1,3 @@
#ifndef WSLAY_MACRO_H
#define WSLAY_MACRO_H
/*
* Wslay - The WebSocket Library
*
@ -24,8 +22,8 @@
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#ifndef WSLAY_MACRO_H
#define WSLAY_MACRO_H
#ifdef HAVE_CONFIG_H
# include "config.h"

View File

@ -1,5 +1,3 @@
#ifndef WSLAY_NET_H
#define WSLAY_NET_H
/*
* Wslay - The WebSocket Library
*
@ -24,8 +22,8 @@
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#ifndef WSLAY_NET_H
#define WSLAY_NET_H
#ifdef HAVE_CONFIG_H
# include <config.h>

View File

@ -1,5 +1,3 @@
#ifndef WSLAY_QUEUE_H
#define WSLAY_QUEUE_H
/*
* Wslay - The WebSocket Library
*
@ -24,8 +22,8 @@
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#ifndef WSLAY_QUEUE_H
#define WSLAY_QUEUE_H
#ifdef HAVE_CONFIG_H
# include "config.h"