Mercurial > dwindows
comparison dwcompat.c @ 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 | b217cf9161c7 |
children | 02a23143334c |
comparison
equal
deleted
inserted
replaced
1838:ca304f28de3b | 1839:22225eb286e5 |
---|---|
1 /* $Id$ */ | 1 /* $Id: dwcompat.c 1717 2012-05-05 22:44:27Z bsmith $ */ |
2 #undef UNICODE | 2 #undef UNICODE |
3 #undef _UNICODE | 3 #undef _UNICODE |
4 | 4 |
5 #ifdef __WIN32__ | 5 #ifdef __WIN32__ |
6 #include <direct.h> | 6 #include <direct.h> |
7 #endif | 7 #endif |
8 #if defined(__OS2__) || defined(__WIN32__) | 8 #if defined(__OS2__) || defined(__WIN32__) |
9 #include <share.h> | 9 #include <share.h> |
10 #endif | 10 #endif |
11 #define _DW_INTERNAL | |
11 #include "dwcompat.h" | 12 #include "dwcompat.h" |
12 #include "dw.h" | 13 #include "dw.h" |
13 | 14 |
14 #if defined(__UNIX__) || defined(__MAC__) | 15 #if defined(__UNIX__) || defined(__MAC__) |
15 #if defined(__FreeBSD__) || defined(__MAC__) | 16 #if defined(__FreeBSD__) || defined(__MAC__) |
51 } | 52 } |
52 #endif | 53 #endif |
53 | 54 |
54 int API makedir(char *path) | 55 int API makedir(char *path) |
55 { | 56 { |
56 #if defined(__IBMC__) || defined(__WATCOMC__) || (defined(__WIN32__) && !defined(__CYGWIN32__)) | 57 #if defined(__IBMC__) || defined(__WATCOMC__) || defined(_MSC_VER) || defined(__MINGW32__) || defined(__MINGW64__) |
57 return mkdir(path, 0); | 58 return mkdir(path); |
58 #else | 59 #else |
59 return mkdir(path,S_IRWXU); | 60 return mkdir(path,S_IRWXU); |
60 #endif | 61 #endif |
61 } | 62 } |
62 | 63 |