Select Git revision
codec_resample.c
private-libwebsockets.h 51.40 KiB
/*
* libwebsockets - small server side websockets and web server implementation
*
* Copyright (C) 2010 - 2016 Andy Green <andy@warmcat.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation:
* version 2.1 of the License.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*/
#include "lws_config.h"
#include "lws_config_private.h"
#if defined(LWS_WITH_CGI) && defined(LWS_HAVE_VFORK)
#define _GNU_SOURCE
#endif
#ifdef LWS_HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <ctype.h>
#include <limits.h>
#include <stdarg.h>
#if defined(LWS_WITH_ESP32)
#define MSG_NOSIGNAL 0
#define SOMAXCONN 3
#endif
#if defined(LWS_WITH_ESP8266)
#include <user_interface.h>
#define assert(n)
/* rom-provided stdc functions for free, ensure use these instead of libc ones */
int ets_vsprintf(char *str, const char *format, va_list argptr);
int ets_vsnprintf(char *buffer, size_t sizeOfBuffer, const char *format, va_list argptr);
int ets_snprintf(char *str, size_t size, const char *format, ...);
int ets_sprintf(char *str, const char *format, ...);
int os_printf_plus(const char *format, ...);
#undef malloc
#undef realloc
#undef free
void *pvPortMalloc(size_t s, const char *f, int line);
#define malloc(s) pvPortMalloc(s, "", 0)
void *pvPortRealloc(void *p, size_t s, const char *f, int line);
#define realloc(p, s) pvPortRealloc(p, s, "", 0)
void vPortFree(void *p, const char *f, int line);
#define free(p) vPortFree(p, "", 0)
#undef memcpy
void *ets_memcpy(void *dest, const void *src, size_t n);
#define memcpy ets_memcpy
void *ets_memset(void *dest, int v, size_t n);