Add a one-deep CC-cache for condition code setting and usage.
[smatch.git] / compat-mingw.c
blob21ca51a776ed979b9685741add6a7d0ca8842954
1 /*
2 * Mingw Compatibility functions
3 *
4 *
5 * Licensed under the Open Software License version 1.1
6 */
10 #include <stdarg.h>
11 #include <windef.h>
12 #include <winbase.h>
13 #include <stdlib.h>
14 #include <string.h>
16 #include "lib.h"
17 #include "allocate.h"
18 #include "token.h"
20 void *blob_alloc(unsigned long size)
22 void *ptr;
23 ptr = malloc(size);
24 if (ptr != NULL)
25 memset(ptr, 0, size);
26 return ptr;
29 void blob_free(void *addr, unsigned long size)
31 free(addr);
34 long double string_to_ld(const char *nptr, char **endptr)
36 return strtod(nptr, endptr);