diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2007-09-30 08:38:38 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2007-09-30 08:38:38 +0000 |
commit | f7c76eb933b14f483e672c1058e0d6ffc71579ed (patch) | |
tree | a5e6e31b792eb40b96d74dc91e979c04f755887f /lib/libXpm | |
parent | ab46062b36b731294fec4d86ffbae38627a5a46f (diff) |
libXpm 3.5.7
Diffstat (limited to 'lib/libXpm')
-rw-r--r-- | lib/libXpm/acinclude.m4 | 47 | ||||
-rw-r--r-- | lib/libXpm/src/simx.h | 17 |
2 files changed, 63 insertions, 1 deletions
diff --git a/lib/libXpm/acinclude.m4 b/lib/libXpm/acinclude.m4 new file mode 100644 index 000000000..f3d8734f3 --- /dev/null +++ b/lib/libXpm/acinclude.m4 @@ -0,0 +1,47 @@ +##### http://autoconf-archive.cryp.to/ac_define_dir.html +# +# SYNOPSIS +# +# AC_DEFINE_DIR(VARNAME, DIR [, DESCRIPTION]) +# +# DESCRIPTION +# +# This macro sets VARNAME to the expansion of the DIR variable, +# taking care of fixing up ${prefix} and such. +# +# VARNAME is then offered as both an output variable and a C +# preprocessor symbol. +# +# Example: +# +# AC_DEFINE_DIR([DATADIR], [datadir], [Where data are placed to.]) +# +# LAST MODIFICATION +# +# 2006-10-13 +# +# COPYLEFT +# +# Copyright (c) 2006 Stepan Kasal <kasal@ucw.cz> +# Copyright (c) 2006 Andreas Schwab <schwab@suse.de> +# Copyright (c) 2006 Guido U. Draheim <guidod@gmx.de> +# Copyright (c) 2006 Alexandre Oliva +# +# Copying and distribution of this file, with or without +# modification, are permitted in any medium without royalty provided +# the copyright notice and this notice are preserved. + +AC_DEFUN([AC_DEFINE_DIR], [ + prefix_NONE= + exec_prefix_NONE= + test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix + test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix +dnl In Autoconf 2.60, ${datadir} refers to ${datarootdir}, which in turn +dnl refers to ${prefix}. Thus we have to use `eval' twice. + eval ac_define_dir="\"[$]$2\"" + eval ac_define_dir="\"$ac_define_dir\"" + AC_SUBST($1, "$ac_define_dir") + AC_DEFINE_UNQUOTED($1, "$ac_define_dir", [$3]) + test "$prefix_NONE" && prefix=NONE + test "$exec_prefix_NONE" && exec_prefix=NONE +]) diff --git a/lib/libXpm/src/simx.h b/lib/libXpm/src/simx.h index 001cfdb4e..7c4c4b9ec 100644 --- a/lib/libXpm/src/simx.h +++ b/lib/libXpm/src/simx.h @@ -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 */ |