gwion-util
utilities for the Gwion project
Loading...
Searching...
No Matches
windows_missing.h
Go to the documentation of this file.
1
4#pragma once
5#include <windows.h>
6#include <stddef.h>
7
8// needed for clang
9#ifndef PATH_MAX
10#ifndef MAX_PATH
11#define MAX_PATH 260
12#endif
13#define PATH_MAX MAX_PATH
14#endif
15
16typedef unsigned int uint;
17char * strdup(const char *s);
18char * strndup(const char *s, size_t n);
19char * strsep(char **stringp, const char *delim);
20int getline(char **lineptr, size_t *n, FILE *fp);
21FILE * fmemopen(void *buf, size_t len, const char *type NUSED);
22#define realpath(N,R) _fullpath((R),(N),_MAX_PATH)
23#ifdef __clang__
24#define strdup _strdup
25
26#ifdef USE_DOUBLE
27#define creal(a) creal(*(_Dcomplex *)&a)
28#define cimag(a) cimag(*(_Dcomplex *)&a)
29#else
30#define crealf(a) crealf(*(_Fcomplex *)&a)
31#define cimagf(a) cimagf(*(_Fcomplex *)&a)
32#endif
33#endif
#define NUSED
Definition defs.h:22
unsigned int uint
Definition defs.h:62
char * strsep(char **stringp, const char *delim)
FILE * fmemopen(void *buf, size_t len, const char *type NUSED)
char * strdup(const char *s)
int getline(char **lineptr, size_t *n, FILE *fp)
char * strndup(const char *s, size_t n)