2022-01-24 03:28:16 +00:00
|
|
|
#ifndef LAIKA_LAIKA_H
|
|
|
|
#define LAIKA_LAIKA_H
|
|
|
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <stddef.h>
|
|
|
|
#include <stdint.h>
|
|
|
|
#include <stdbool.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <string.h>
|
|
|
|
|
2022-01-31 21:54:39 +00:00
|
|
|
#include "lconfig.h"
|
|
|
|
|
2022-01-25 17:58:36 +00:00
|
|
|
#ifdef DEBUG
|
2022-04-28 16:07:11 +00:00
|
|
|
# define LAIKA_DEBUG(...) printf("[~] " __VA_ARGS__); fflush(stdout);
|
2022-01-25 17:58:36 +00:00
|
|
|
#else
|
2022-04-28 16:07:11 +00:00
|
|
|
# define LAIKA_DEBUG(...) ((void)0) /* no op */
|
|
|
|
#endif
|
|
|
|
|
2022-04-28 23:10:15 +00:00
|
|
|
#ifndef _MSC_VER
|
2022-04-28 16:07:11 +00:00
|
|
|
# define LAIKA_FORCEINLINE __attribute__((always_inline)) inline
|
|
|
|
#else
|
|
|
|
# define LAIKA_FORCEINLINE __forceinline
|
2022-01-25 17:58:36 +00:00
|
|
|
#endif
|
|
|
|
|
2022-05-18 19:12:20 +00:00
|
|
|
LAIKA_FORCEINLINE int MIN(int a, int b) {
|
|
|
|
return a < b ? a : b;
|
|
|
|
}
|
|
|
|
|
|
|
|
LAIKA_FORCEINLINE int MAX(int a, int b) {
|
|
|
|
return a > b ? a : b;
|
|
|
|
}
|
2022-05-17 15:37:58 +00:00
|
|
|
|
|
|
|
struct sLaika_peer;
|
|
|
|
struct sLaika_socket;
|
|
|
|
struct sLaika_pollList;
|
|
|
|
struct sLaika_task;
|
|
|
|
struct sLaika_taskService;
|
2022-05-18 17:04:19 +00:00
|
|
|
struct sLaika_content;
|
|
|
|
struct sLaika_contentContext;
|
2022-05-17 15:37:58 +00:00
|
|
|
|
2022-01-24 03:28:16 +00:00
|
|
|
#endif
|