Mercurial > dwindows
comparison dwcompat.h @ 1839:22225eb286e5
Fixes for building with MINGW64 (specifically http://tdm-gcc.tdragon.net/).
Currently a few things are missing, themes and HTML rendering but it builds
in both 32bit and 64bit mode. There are also warnings generated by gcc
every time the source calls a Windows API macro. (unused result warning).
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Mon, 19 Nov 2012 19:52:36 +0000 |
parents | e6b139e0b64d |
children | 123d1a900f54 |
comparison
equal
deleted
inserted
replaced
1838:ca304f28de3b | 1839:22225eb286e5 |
---|---|
1 /* $Id$ */ | 1 /* $Id: dwcompat.h 1722 2012-05-08 17:14:40Z bsmith $ */ |
2 | 2 |
3 #ifndef _DWCOMPAT_H | 3 #ifndef _DWCOMPAT_H |
4 #define _DWCOMPAT_H | 4 #define _DWCOMPAT_H |
5 | 5 |
6 /* This header includes and defines everything needed for a given OS/compiler */ | 6 /* This header includes and defines everything needed for a given OS/compiler */ |
207 # define strncasecmp(a, b, c) _strnicmp(a, b, c) | 207 # define strncasecmp(a, b, c) _strnicmp(a, b, c) |
208 # define strdup(a) _strdup(a) | 208 # define strdup(a) _strdup(a) |
209 # define snprintf _snprintf | 209 # define snprintf _snprintf |
210 # define unlink(a) _unlink(a) | 210 # define unlink(a) _unlink(a) |
211 # define close(a) _close(a) | 211 # define close(a) _close(a) |
212 # define mkdir(a,b) _mkdir(a) | |
213 # define fdopen(a, b) _fdopen(a, b) | 212 # define fdopen(a, b) _fdopen(a, b) |
214 # define chdir(a) _chdir(a) | 213 # define chdir(a) _chdir(a) |
214 #ifndef _DW_INTERNAL | |
215 # define mkdir(a,b) _mkdir(a) | |
216 #endif | |
215 # else | 217 # else |
216 # define strcasecmp(a, b) stricmp(a, b) | 218 # define strcasecmp(a, b) stricmp(a, b) |
217 # define strncasecmp(a, b, c) strnicmp(a, b, c) | 219 # define strncasecmp(a, b, c) strnicmp(a, b, c) |
218 # endif | 220 # endif |
219 #endif | 221 #endif |
387 /* Make sure O_BINARY is defined */ | 389 /* Make sure O_BINARY is defined */ |
388 #ifndef O_BINARY | 390 #ifndef O_BINARY |
389 #define O_BINARY 0 | 391 #define O_BINARY 0 |
390 #endif | 392 #endif |
391 | 393 |
392 #if defined(__IBMC__) || defined(__WATCOMC__) || (defined(__WIN32__) && !defined(__CYGWIN32__) && _MSC_VER < 1400) | 394 #if defined(__IBMC__) || defined(__WATCOMC__) || (defined(_MSC_VER) && _MSC_VER < 1400) || defined(__MINGW32__) || defined(__MINGW64__) |
393 #undef mkdir | 395 #ifndef _DW_INTERNAL |
394 #define mkdir(a,b) mkdir(a) | 396 # undef mkdir |
397 # define mkdir(a,b) mkdir(a) | |
398 #endif | |
395 #endif | 399 #endif |
396 | 400 |
397 #define socksprint(a, b) sockwrite(a, b, strlen(b), 0) | 401 #define socksprint(a, b) sockwrite(a, b, strlen(b), 0) |
398 | 402 |
399 char * API vargs(char *buf, int len, char *format, ...); | 403 char * API vargs(char *buf, int len, char *format, ...); |