1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00

attempt to restore tabs

This commit is contained in:
rwachtfogel 2023-06-01 12:00:27 +03:00
parent 85161d3027
commit 0d04284b1a
2 changed files with 455 additions and 455 deletions

View file

@ -91,8 +91,8 @@ typedef unsigned long long lws_intptr_t;
#ifndef _WIN32_WCE
#include <fcntl.h>
#else
#define _O_RDONLY 0x0000
#define O_RDONLY _O_RDONLY
#define _O_RDONLY 0x0000
#define O_RDONLY _O_RDONLY
#endif
typedef int uid_t;
@ -330,25 +330,25 @@ typedef int suseconds_t;
static LWS_INLINE void
lws_pthread_mutex_init(pthread_mutex_t *lock)
{
pthread_mutex_init(lock, NULL);
pthread_mutex_init(lock, NULL);
}
static LWS_INLINE void
lws_pthread_mutex_destroy(pthread_mutex_t *lock)
{
pthread_mutex_destroy(lock);
pthread_mutex_destroy(lock);
}
static LWS_INLINE void
lws_pthread_mutex_lock(pthread_mutex_t *lock)
{
pthread_mutex_lock(lock);
pthread_mutex_lock(lock);
}
static LWS_INLINE void
lws_pthread_mutex_unlock(pthread_mutex_t *lock)
{
pthread_mutex_unlock(lock);
pthread_mutex_unlock(lock);
}
#else
@ -424,8 +424,8 @@ typedef int lws_filefd_type;
#if defined(LWS_PLAT_OPTEE)
#include <time.h>
struct timeval {
time_t tv_sec;
unsigned int tv_usec;
time_t tv_sec;
unsigned int tv_usec;
};
#if defined(LWS_WITH_NETWORK)
// #include <poll.h>
@ -435,10 +435,10 @@ struct timezone;
int gettimeofday(struct timeval *tv, struct timezone *tz);
/* Internet address. */
struct in_addr {
uint32_t s_addr; /* address in network byte order */
};
/* Internet address. */
struct in_addr {
uint32_t s_addr; /* address in network byte order */
};
typedef unsigned short sa_family_t;
typedef unsigned short in_port_t;
@ -447,27 +447,27 @@ typedef uint32_t socklen_t;
#include <libwebsockets/lws-optee.h>
#if !defined(TEE_SE_READER_NAME_MAX)
struct addrinfo {
int ai_flags;
int ai_family;
int ai_socktype;
int ai_protocol;
socklen_t ai_addrlen;
struct sockaddr *ai_addr;
char *ai_canonname;
struct addrinfo *ai_next;
};
struct addrinfo {
int ai_flags;
int ai_family;
int ai_socktype;
int ai_protocol;
socklen_t ai_addrlen;
struct sockaddr *ai_addr;
char *ai_canonname;
struct addrinfo *ai_next;
};
#endif
ssize_t recv(int sockfd, void *buf, size_t len, int flags);
ssize_t send(int sockfd, const void *buf, size_t len, int flags);
ssize_t read(int fd, void *buf, size_t count);
int getsockopt(int sockfd, int level, int optname,
void *optval, socklen_t *optlen);
int setsockopt(int sockfd, int level, int optname,
const void *optval, socklen_t optlen);
void *optval, socklen_t *optlen);
int setsockopt(int sockfd, int level, int optname,
const void *optval, socklen_t optlen);
int connect(int sockfd, const struct sockaddr *addr,
socklen_t addrlen);
socklen_t addrlen);
extern int errno;
@ -475,27 +475,27 @@ uint16_t ntohs(uint16_t netshort);
uint16_t htons(uint16_t hostshort);
int bind(int sockfd, const struct sockaddr *addr,
socklen_t addrlen);
socklen_t addrlen);
#define MSG_NOSIGNAL 0x4000
#define EAGAIN 11
#define EINTR 4
#define EAGAIN 11
#define EINTR 4
#define EWOULDBLOCK EAGAIN
#define EADDRINUSE 98
#define INADDR_ANY 0
#define AF_INET 2
#define AF_INET 2
#define SHUT_WR 1
#define AF_UNSPEC 0
#define PF_UNSPEC 0
#define AF_UNSPEC 0
#define PF_UNSPEC 0
#define SOCK_STREAM 1
#define SOCK_DGRAM 2
# define AI_PASSIVE 0x0001
#define IPPROTO_UDP 17
#define SOL_SOCKET 1
#define SO_SNDBUF 7
#define EISCONN 106
#define EALREADY 114
#define SO_SNDBUF 7
#define EISCONN 106
#define EALREADY 114
#define EINPROGRESS 115
int shutdown(int sockfd, int how);
int close(int fd);
@ -503,18 +503,18 @@ int atoi(const char *nptr);
long long atoll(const char *nptr);
int socket(int domain, int type, int protocol);
int getaddrinfo(const char *node, const char *service,
const struct addrinfo *hints,
struct addrinfo **res);
int getaddrinfo(const char *node, const char *service,
const struct addrinfo *hints,
struct addrinfo **res);
void freeaddrinfo(struct addrinfo *res);
void freeaddrinfo(struct addrinfo *res);
#if !defined(TEE_SE_READER_NAME_MAX)
struct lws_pollfd
{
int fd; /* File descriptor to poll. */
short int events; /* Types of events poller cares about. */
short int revents; /* Types of events that actually occurred. */
int fd; /* File descriptor to poll. */
short int events; /* Types of events poller cares about. */
short int revents; /* Types of events that actually occurred. */
};
#endif
@ -576,9 +576,9 @@ typedef uint32_t lws_fop_flags_t;
/** struct lws_pollargs - argument structure for all external poll related calls
* passed in via 'in' */
struct lws_pollargs {
lws_sockfd_type fd; /**< applicable socket descriptor */
int events; /**< the new event mask */
int prev_events; /**< the previous event mask */
lws_sockfd_type fd; /**< applicable socket descriptor */
int events; /**< the new event mask */
int prev_events; /**< the previous event mask */
};
#if !defined(LWS_SIZEOFPTR)
@ -586,12 +586,12 @@ struct lws_pollargs {
#endif
#if defined(__x86_64__)
#define _LWS_PAD_SIZE 16 /* Intel recommended for best performance */
#define _LWS_PAD_SIZE 16 /* Intel recommended for best performance */
#else
#define _LWS_PAD_SIZE LWS_SIZEOFPTR /* Size of a pointer on the target arch */
#define _LWS_PAD_SIZE LWS_SIZEOFPTR /* Size of a pointer on the target arch */
#endif
#define _LWS_PAD(n) (((n) % _LWS_PAD_SIZE) ? \
((n) + (_LWS_PAD_SIZE - ((n) % _LWS_PAD_SIZE))) : (n))
((n) + (_LWS_PAD_SIZE - ((n) % _LWS_PAD_SIZE))) : (n))
/* last 2 is for lws-meta */
#define LWS_PRE _LWS_PAD(4 + 10 + 2)
/* used prior to 1.7 and retained for backward compatibility */
@ -611,32 +611,32 @@ struct lws;
/* Generic stateful operation return codes */
typedef enum {
LWS_SRET_OK = 0,
LWS_SRET_WANT_INPUT = (1 << 16),
LWS_SRET_WANT_OUTPUT = (1 << 17),
LWS_SRET_FATAL = (1 << 18),
LWS_SRET_NO_FURTHER_IN = (1 << 19),
LWS_SRET_NO_FURTHER_OUT = (1 << 20),
LWS_SRET_AWAIT_RETRY = (1 << 21),
LWS_SRET_YIELD = (1 << 22), /* return to the event loop and continue */
LWS_SRET_OK = 0,
LWS_SRET_WANT_INPUT = (1 << 16),
LWS_SRET_WANT_OUTPUT = (1 << 17),
LWS_SRET_FATAL = (1 << 18),
LWS_SRET_NO_FURTHER_IN = (1 << 19),
LWS_SRET_NO_FURTHER_OUT = (1 << 20),
LWS_SRET_AWAIT_RETRY = (1 << 21),
LWS_SRET_YIELD = (1 << 22), /* return to the event loop and continue */
} lws_stateful_ret_t;
typedef struct lws_fixed3232 {
int32_t whole; /* signed 32-bit int */
int32_t frac; /* signed frac proportion from 0 to (100M - 1) */
int32_t whole; /* signed 32-bit int */
int32_t frac; /* signed frac proportion from 0 to (100M - 1) */
} lws_fx_t;
#define LWS_FX_FRACTION_MSD 100000000
#define lws_neg(a) (a->whole < 0 || a->frac < 0)
#define lws_fx_set(a, x, y) { a.whole = x; a.frac = x < 0 ? -y : y; }
#define lws_fix64(a) (((int64_t)a->whole << 32) + \
(((1ll << 32) * (a->frac < 0 ? -a->frac : a->frac)) / LWS_FX_FRACTION_MSD))
(((1ll << 32) * (a->frac < 0 ? -a->frac : a->frac)) / LWS_FX_FRACTION_MSD))
#define lws_fix64_abs(a) \
((((int64_t)(a->whole < 0 ? (-a->whole) : a->whole) << 32) + \
(((1ll << 32) * (a->frac < 0 ? -a->frac : a->frac)) / LWS_FX_FRACTION_MSD)))
((((int64_t)(a->whole < 0 ? (-a->whole) : a->whole) << 32) + \
(((1ll << 32) * (a->frac < 0 ? -a->frac : a->frac)) / LWS_FX_FRACTION_MSD)))
#define lws_fix3232(a, a64) { a->whole = (int32_t)(a64 >> 32); \
a->frac = (int32_t)((100000000 * (a64 & 0xffffffff)) >> 32); }
a->frac = (int32_t)((100000000 * (a64 & 0xffffffff)) >> 32); }
LWS_VISIBLE LWS_EXTERN const lws_fx_t *
lws_fx_add(lws_fx_t *r, const lws_fx_t *a, const lws_fx_t *b);

File diff suppressed because it is too large Load diff