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