colla/os.h
alessandrobason bce93361b1 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
2021-11-24 10:15:47 +00:00

31 lines
No EOL
634 B
C

#pragma once
#ifdef __cplusplus
extern "C" {
#endif
#include <stddef.h>
#include <string.h>
#include "str.h"
#ifdef _WIN32
#include <stdio.h>
#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
#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