added:
* win32_slim.h: includes the minimal version of windows.h modified: * cthread: added lock_t c++ class * os: added getUserName() * socket: modified socket_len_t to sk_len_t to better follow naming convetions in file * str: added operator std::string() to str_t
This commit is contained in:
parent
7fdc8b5301
commit
bce93361b1
16 changed files with 187 additions and 70 deletions
9
os.h
9
os.h
|
|
@ -6,21 +6,26 @@ extern "C" {
|
|||
|
||||
#include <stddef.h>
|
||||
#include <string.h>
|
||||
#include "str.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <stdio.h>
|
||||
#include <BaseTsd.h> // SSIZE_T
|
||||
#include "win32_slim.h"
|
||||
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
|
||||
#ifndef _GNU_SOURCE
|
||||
#define _GNU_SOURCE
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h> // ssize_t
|
||||
#endif
|
||||
|
||||
str_t getUserName();
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue