diff options
author | Jason Rumney <jasonr@gnu.org> | 2007-08-06 12:52:52 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@sun.com> | 2007-08-06 12:52:52 -0700 |
commit | 43dfc6be8128139888426d8c709aa78efc207953 (patch) | |
tree | 4f0f6f9f6ccb5d3e1db56ebebf21e3faaa37b81d /src/simx.h | |
parent | 290f0b9115428dab0cbf2880d154468c557b3e7e (diff) | |
download | xorg-lib-libXpm-43dfc6be8128139888426d8c709aa78efc207953.tar.gz |
X.Org Bug #11863: Build libXpm on MS Windows (with MinGW)
* src/XpmI.h [FOR_MSW]: Include simx.h instead of real X headers.
* src/simx.h (_XFUNCPROTOBEGIN, _XFUNCPROTOEND, NO_ZPIPE): Define.
(XAllocColor): Fix arg list in prototype.
(bzero, close, fdopen, index, rindex, open, strdup, O_RDONLY):
Map to W32 equivalents.
* src/RdFToI.c [FOR_MSW]: Include fcntl.h.
Diffstat (limited to 'src/simx.h')
-rw-r--r-- | src/simx.h | 17 |
1 files changed, 16 insertions, 1 deletions
@@ -40,6 +40,9 @@ #ifdef FOR_MSW #include "windows.h" /* MS windows GDI types */ +#define _XFUNCPROTOBEGIN +#define _XFUNCPROTOEND +#define NO_ZPIPE /* * minimal portability layer between ansi and KR C @@ -101,7 +104,7 @@ extern "C" { /* color related */ FUNC(XParseColor, int, (Display *, Colormap *, char *, XColor *)); - FUNC(XAllocColor, int, (Display *, Colormap *, XColor *)); + FUNC(XAllocColor, int, (Display *, Colormap, XColor *)); FUNC(XQueryColors, void, (Display *display, Colormap *colormap, XColor *xcolors, int ncolors)); FUNC(XFreeColors, int, (Display *d, Colormap cmap, @@ -134,6 +137,18 @@ typedef BOOL Bool; /* take MSW bool */ #undef LFUNC #undef FUNC +/* Some functions and constants that have non-standard names in the + MS library. */ +#define bzero(addr,sz) memset(addr, 0, sz) +#define close _close +#define fdopen _fdopen +#define index strchr +#define open _open +#define O_RDONLY _O_RDONLY +#define rindex strrchr +#define strdup _strdup + + #endif /* def FOR_MSW */ #endif /* _SIMX_H */ |