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
This commit is contained in:
parent
d8b44c1281
commit
bb5cce33f0
15 changed files with 523 additions and 76 deletions
26
os.h
Normal file
26
os.h
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
#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
|
||||
Loading…
Add table
Add a link
Reference in a new issue