colla/os.h
snarmph bb5cce33f0 added:
* coroutines
 * string
modified:
 * http: fixed a couple of bugs
 * strutils: renamed to os, it is now a header for some generic platform-indipendent code
 * tracelog: added option to not print newline at the end of a message + bug fixes
2021-10-05 17:57:27 +02:00

26 lines
No EOL
534 B
C

#pragma once
#ifdef __cplusplus
extern "C" {
#endif
#include <stddef.h>
#include <string.h>
#ifdef _WIN32
#include <stdio.h>
#include <BaseTsd.h> // SSIZE_T
typedef SSIZE_T ssize_t;
ssize_t getdelim(char **buf, size_t *bufsz, int delimiter, FILE *fp);
ssize_t getline(char **line_ptr, size_t *n, FILE *stream);
#define stricmp _stricmp
#else
#define stricmp strcasecmp
#define _GNU_SOURCE
#include <stdio.h>
#include <sys/types.h> // ssize_t
#endif
#ifdef __cplusplus
} // extern "C"
#endif