diff options
Diffstat (limited to 'libXfont/src')
-rw-r--r-- | libXfont/src/FreeType/Makefile.in | 23 | ||||
-rw-r--r-- | libXfont/src/Makefile.in | 23 | ||||
-rw-r--r-- | libXfont/src/bitmap/Makefile.in | 23 | ||||
-rw-r--r-- | libXfont/src/bitmap/bdfread.c | 35 | ||||
-rw-r--r-- | libXfont/src/builtins/Makefile.in | 23 | ||||
-rw-r--r-- | libXfont/src/fc/Makefile.in | 23 | ||||
-rw-r--r-- | libXfont/src/fc/fslibos.h | 220 | ||||
-rw-r--r-- | libXfont/src/fontfile/Makefile.in | 23 | ||||
-rw-r--r-- | libXfont/src/fontfile/fileio.c | 5 | ||||
-rw-r--r-- | libXfont/src/fontfile/filewr.c | 12 | ||||
-rw-r--r-- | libXfont/src/stubs/Makefile.in | 23 | ||||
-rw-r--r-- | libXfont/src/util/Makefile.in | 23 |
12 files changed, 287 insertions, 169 deletions
diff --git a/libXfont/src/FreeType/Makefile.in b/libXfont/src/FreeType/Makefile.in index 9c0e25006..b77fbf66f 100644 --- a/libXfont/src/FreeType/Makefile.in +++ b/libXfont/src/FreeType/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,7 +15,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -79,12 +89,11 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/FreeType -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ - $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h \ $(top_builddir)/include/X11/fonts/fontconf.h @@ -158,6 +167,7 @@ am__define_uniq_tagged_files = \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ @@ -338,7 +348,6 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/FreeType/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/FreeType/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -612,6 +621,8 @@ uninstall-am: mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am +.PRECIOUS: Makefile + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/libXfont/src/Makefile.in b/libXfont/src/Makefile.in index 7396a7d46..494fb4d39 100644 --- a/libXfont/src/Makefile.in +++ b/libXfont/src/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -36,7 +36,17 @@ # PERFORMANCE OF THIS SOFTWARE. VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -100,12 +110,11 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ - $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h \ $(top_builddir)/include/X11/fonts/fontconf.h @@ -231,6 +240,7 @@ am__define_uniq_tagged_files = \ ETAGS = etags CTAGS = ctags DIST_SUBDIRS = fontfile FreeType bitmap builtins fc util stubs +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ @@ -449,7 +459,6 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -821,6 +830,8 @@ uninstall-am: uninstall-libLTLIBRARIES mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-libLTLIBRARIES +.PRECIOUS: Makefile + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/libXfont/src/bitmap/Makefile.in b/libXfont/src/bitmap/Makefile.in index 4f654aa67..e58f7ab4c 100644 --- a/libXfont/src/bitmap/Makefile.in +++ b/libXfont/src/bitmap/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,7 +15,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -83,12 +93,11 @@ host_triplet = @host@ @XFONT_PCFFORMAT_TRUE@am__append_3 = pcfwrite.c @XFONT_SNFFORMAT_TRUE@am__append_4 = snfread.c snfstr.h subdir = src/bitmap -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ - $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h \ $(top_builddir)/include/X11/fonts/fontconf.h @@ -171,6 +180,7 @@ am__define_uniq_tagged_files = \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ @@ -345,7 +355,6 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/bitmap/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/bitmap/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -625,6 +634,8 @@ uninstall-am: mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am +.PRECIOUS: Makefile + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/libXfont/src/bitmap/bdfread.c b/libXfont/src/bitmap/bdfread.c index 914a0244e..a0ace8f85 100644 --- a/libXfont/src/bitmap/bdfread.c +++ b/libXfont/src/bitmap/bdfread.c @@ -62,8 +62,16 @@ from The Open Group. #if HAVE_STDINT_H #include <stdint.h> -#elif !defined(INT32_MAX) -#define INT32_MAX 0x7fffffff +#else +# ifndef INT32_MAX +# define INT32_MAX 0x7fffffff +# endif +# ifndef INT16_MAX +# define INT16_MAX 0x7fff +# endif +# ifndef INT16_MIN +# define INT16_MIN (0 - 0x8000) +# endif #endif #define INDICES 256 @@ -417,6 +425,12 @@ bdfReadCharacters(FontFilePtr file, FontPtr pFont, bdfFileState *pState, bdfError("DWIDTH y value must be zero\n"); goto BAILOUT; } + /* xCharInfo metrics are stored as INT16 */ + if ((wx < 0) || (wx > INT16_MAX)) { + bdfError("character '%s' has out of range width, %d\n", + charName, wx); + goto BAILOUT; + } line = bdfGetLine(file, lineBuf, BDFLINELEN); if ((!line) || (sscanf((char *) line, "BBX %d %d %d %d", &bw, &bh, &bl, &bb) != 4)) { bdfError("bad 'BBX'\n"); @@ -427,6 +441,14 @@ bdfReadCharacters(FontFilePtr file, FontPtr pFont, bdfFileState *pState, charName, bw, bh); goto BAILOUT; } + /* xCharInfo metrics are read as int, but stored as INT16 */ + if ((bl > INT16_MAX) || (bl < INT16_MIN) || + (bb > INT16_MAX) || (bb < INT16_MIN) || + (bw > (INT16_MAX - bl)) || (bh > (INT16_MAX - bb))) { + bdfError("character '%s' has out of range metrics, %d %d %d %d\n", + charName, bl, (bl+bw), (bh+bb), -bb); + goto BAILOUT; + } line = bdfGetLine(file, lineBuf, BDFLINELEN); if ((line) && (bdfIsPrefix(line, "ATTRIBUTES"))) { for (p = line + strlen("ATTRIBUTES "); @@ -458,7 +480,10 @@ bdfReadCharacters(FontFilePtr file, FontPtr pFont, bdfFileState *pState, ci->metrics.descent = -bb; ci->metrics.characterWidth = wx; ci->bits = NULL; - bdfReadBitmap(ci, file, bit, byte, glyph, scan, bitmapsSizes); + if (!bdfReadBitmap(ci, file, bit, byte, glyph, scan, bitmapsSizes)) { + bdfError("could not read bitmap for character '%s'\n", charName); + goto BAILOUT; + } ci++; ndx++; } else @@ -604,7 +629,9 @@ bdfReadProperties(FontFilePtr file, FontPtr pFont, bdfFileState *pState) bdfError("missing 'STARTPROPERTIES'\n"); return (FALSE); } - if (sscanf((char *) line, "STARTPROPERTIES %d", &nProps) != 1) { + if ((sscanf((char *) line, "STARTPROPERTIES %d", &nProps) != 1) || + (nProps <= 0) || + (nProps > ((INT32_MAX / sizeof(FontPropRec)) - BDF_GENPROPS))) { bdfError("bad 'STARTPROPERTIES'\n"); return (FALSE); } diff --git a/libXfont/src/builtins/Makefile.in b/libXfont/src/builtins/Makefile.in index 0f03cc924..68beafab5 100644 --- a/libXfont/src/builtins/Makefile.in +++ b/libXfont/src/builtins/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,7 +15,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -79,12 +89,11 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/builtins -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ - $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h \ $(top_builddir)/include/X11/fonts/fontconf.h @@ -158,6 +167,7 @@ am__define_uniq_tagged_files = \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ @@ -339,7 +349,6 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/builtins/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/builtins/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -614,6 +623,8 @@ uninstall-am: mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am +.PRECIOUS: Makefile + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/libXfont/src/fc/Makefile.in b/libXfont/src/fc/Makefile.in index 5200ab7e6..a3e671f86 100644 --- a/libXfont/src/fc/Makefile.in +++ b/libXfont/src/fc/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,7 +15,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -79,12 +89,11 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/fc -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ - $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h \ $(top_builddir)/include/X11/fonts/fontconf.h @@ -158,6 +167,7 @@ am__define_uniq_tagged_files = \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ @@ -339,7 +349,6 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/fc/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/fc/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -613,6 +622,8 @@ uninstall-am: mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am +.PRECIOUS: Makefile + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/libXfont/src/fc/fslibos.h b/libXfont/src/fc/fslibos.h index c1f0eded2..1ef362dfc 100644 --- a/libXfont/src/fc/fslibos.h +++ b/libXfont/src/fc/fslibos.h @@ -43,176 +43,174 @@ from The Open Group. * makedepend screws up on #undef OPEN_MAX, so we define a new symbol */ -#ifndef FONT_OPEN_MAX - -#ifndef X_NOT_POSIX -# ifdef _POSIX_SOURCE -# include <limits.h> -# else -# define _POSIX_SOURCE -# include <limits.h> -# undef _POSIX_SOURCE -# endif -#endif -#ifndef SIZE_MAX -# ifdef ULONG_MAX -# define SIZE_MAX ULONG_MAX +# ifndef FONT_OPEN_MAX + +# ifdef _POSIX_SOURCE +# include <limits.h> +# else +# define _POSIX_SOURCE +# include <limits.h> +# undef _POSIX_SOURCE +# endif +# ifndef SIZE_MAX +# ifdef ULONG_MAX +# define SIZE_MAX ULONG_MAX +# else +# define SIZE_MAX UINT_MAX +# endif +# endif +# ifndef OPEN_MAX +# if defined(SVR4) +# define OPEN_MAX 256 +# else +# include <sys/param.h> +# ifndef OPEN_MAX +# ifdef __OSF1__ +# define OPEN_MAX 256 +# else +# ifdef NOFILE +# define OPEN_MAX NOFILE +# else +# define OPEN_MAX NOFILES_MAX +# endif +# endif +# endif +# endif +# endif + +# if OPEN_MAX > 256 +# define FONT_OPEN_MAX 256 +# else +# define FONT_OPEN_MAX OPEN_MAX +# endif + +# endif /* FONT_OPEN_MAX */ + +# ifdef WORD64 +# define NMSKBITS 64 # else -# define SIZE_MAX UINT_MAX +# define NMSKBITS 32 # endif -#endif -#ifndef OPEN_MAX -#if defined(SVR4) -#define OPEN_MAX 256 -#else -#include <sys/param.h> -#ifndef OPEN_MAX -#ifdef __OSF1__ -#define OPEN_MAX 256 -#else -#ifdef NOFILE -#define OPEN_MAX NOFILE -#else -#define OPEN_MAX NOFILES_MAX -#endif -#endif -#endif -#endif -#endif - -#if OPEN_MAX > 256 -#define FONT_OPEN_MAX 256 -#else -#define FONT_OPEN_MAX OPEN_MAX -#endif - -#endif /* FONT_OPEN_MAX */ - -#ifdef WORD64 -#define NMSKBITS 64 -#else -#define NMSKBITS 32 -#endif -#define MSKCNT ((FONT_OPEN_MAX + NMSKBITS - 1) / NMSKBITS) +# define MSKCNT ((FONT_OPEN_MAX + NMSKBITS - 1) / NMSKBITS) typedef unsigned long FdSet[MSKCNT]; typedef FdSet FdSetPtr; -#if (MSKCNT==1) -#define BITMASK(i) (1 << (i)) -#define MASKIDX(i) 0 -#endif +# if (MSKCNT==1) +# define BITMASK(i) (1 << (i)) +# define MASKIDX(i) 0 +# endif -#if (MSKCNT>1) -#define BITMASK(i) (1 << ((i) & (NMSKBITS - 1))) -#define MASKIDX(i) ((i) / NMSKBITS) -#endif +# if (MSKCNT>1) +# define BITMASK(i) (1 << ((i) & (NMSKBITS - 1))) +# define MASKIDX(i) ((i) / NMSKBITS) +# endif -#define MASKWORD(buf, i) buf[MASKIDX(i)] -#define BITSET(buf, i) MASKWORD(buf, i) |= BITMASK(i) -#define BITCLEAR(buf, i) MASKWORD(buf, i) &= ~BITMASK(i) -#define GETBIT(buf, i) (MASKWORD(buf, i) & BITMASK(i)) - -#if (MSKCNT==1) -#define COPYBITS(src, dst) dst[0] = src[0] -#define CLEARBITS(buf) buf[0] = 0 -#define MASKANDSETBITS(dst, b1, b2) dst[0] = (b1[0] & b2[0]) -#define ORBITS(dst, b1, b2) dst[0] = (b1[0] | b2[0]) -#define UNSETBITS(dst, b1) (dst[0] &= ~b1[0]) -#define ANYSET(src) (src[0]) -#endif +# define MASKWORD(buf, i) buf[MASKIDX(i)] +# define BITSET(buf, i) MASKWORD(buf, i) |= BITMASK(i) +# define BITCLEAR(buf, i) MASKWORD(buf, i) &= ~BITMASK(i) +# define GETBIT(buf, i) (MASKWORD(buf, i) & BITMASK(i)) + +# if (MSKCNT==1) +# define COPYBITS(src, dst) dst[0] = src[0] +# define CLEARBITS(buf) buf[0] = 0 +# define MASKANDSETBITS(dst, b1, b2) dst[0] = (b1[0] & b2[0]) +# define ORBITS(dst, b1, b2) dst[0] = (b1[0] | b2[0]) +# define UNSETBITS(dst, b1) (dst[0] &= ~b1[0]) +# define ANYSET(src) (src[0]) +# endif -#if (MSKCNT==2) -#define COPYBITS(src, dst) { dst[0] = src[0]; dst[1] = src[1]; } -#define CLEARBITS(buf) { buf[0] = 0; buf[1] = 0; } -#define MASKANDSETBITS(dst, b1, b2) {\ +# if (MSKCNT==2) +# define COPYBITS(src, dst) { dst[0] = src[0]; dst[1] = src[1]; } +# define CLEARBITS(buf) { buf[0] = 0; buf[1] = 0; } +# define MASKANDSETBITS(dst, b1, b2) {\ dst[0] = (b1[0] & b2[0]);\ dst[1] = (b1[1] & b2[1]); } -#define ORBITS(dst, b1, b2) {\ +# define ORBITS(dst, b1, b2) {\ dst[0] = (b1[0] | b2[0]);\ dst[1] = (b1[1] | b2[1]); } -#define UNSETBITS(dst, b1) {\ +# define UNSETBITS(dst, b1) {\ dst[0] &= ~b1[0]; \ dst[1] &= ~b1[1]; } -#define ANYSET(src) (src[0] || src[1]) -#endif +# define ANYSET(src) (src[0] || src[1]) +# endif -#if (MSKCNT==3) -#define COPYBITS(src, dst) { dst[0] = src[0]; dst[1] = src[1]; \ +# if (MSKCNT==3) +# define COPYBITS(src, dst) { dst[0] = src[0]; dst[1] = src[1]; \ dst[2] = src[2]; } -#define CLEARBITS(buf) { buf[0] = 0; buf[1] = 0; buf[2] = 0; } -#define MASKANDSETBITS(dst, b1, b2) {\ +# define CLEARBITS(buf) { buf[0] = 0; buf[1] = 0; buf[2] = 0; } +# define MASKANDSETBITS(dst, b1, b2) {\ dst[0] = (b1[0] & b2[0]);\ dst[1] = (b1[1] & b2[1]);\ dst[2] = (b1[2] & b2[2]); } -#define ORBITS(dst, b1, b2) {\ +# define ORBITS(dst, b1, b2) {\ dst[0] = (b1[0] | b2[0]);\ dst[1] = (b1[1] | b2[1]);\ dst[2] = (b1[2] | b2[2]); } -#define UNSETBITS(dst, b1) {\ +# define UNSETBITS(dst, b1) {\ dst[0] &= ~b1[0]; \ dst[1] &= ~b1[1]; \ dst[2] &= ~b1[2]; } -#define ANYSET(src) (src[0] || src[1] || src[2]) -#endif +# define ANYSET(src) (src[0] || src[1] || src[2]) +# endif -#if (MSKCNT==4) -#define COPYBITS(src, dst) dst[0] = src[0]; dst[1] = src[1]; \ +# if (MSKCNT==4) +# define COPYBITS(src, dst) dst[0] = src[0]; dst[1] = src[1]; \ dst[2] = src[2]; dst[3] = src[3] -#define CLEARBITS(buf) buf[0] = 0; buf[1] = 0; buf[2] = 0; buf[3] = 0 -#define MASKANDSETBITS(dst, b1, b2) \ +# define CLEARBITS(buf) buf[0] = 0; buf[1] = 0; buf[2] = 0; buf[3] = 0 +# define MASKANDSETBITS(dst, b1, b2) \ dst[0] = (b1[0] & b2[0]);\ dst[1] = (b1[1] & b2[1]);\ dst[2] = (b1[2] & b2[2]);\ dst[3] = (b1[3] & b2[3]) -#define ORBITS(dst, b1, b2) \ +# define ORBITS(dst, b1, b2) \ dst[0] = (b1[0] | b2[0]);\ dst[1] = (b1[1] | b2[1]);\ dst[2] = (b1[2] | b2[2]);\ dst[3] = (b1[3] | b2[3]) -#define UNSETBITS(dst, b1) \ +# define UNSETBITS(dst, b1) \ dst[0] &= ~b1[0]; \ dst[1] &= ~b1[1]; \ dst[2] &= ~b1[2]; \ dst[3] &= ~b1[3] -#define ANYSET(src) (src[0] || src[1] || src[2] || src[3]) -#endif +# define ANYSET(src) (src[0] || src[1] || src[2] || src[3]) +# endif -#if (MSKCNT>4) -#define COPYBITS(src, dst) memmove((caddr_t) dst, (caddr_t) src,\ +# if (MSKCNT>4) +# define COPYBITS(src, dst) memmove((caddr_t) dst, (caddr_t) src,\ MSKCNT*sizeof(long)) -#define CLEARBITS(buf) bzero((caddr_t) buf, MSKCNT*sizeof(long)) -#define MASKANDSETBITS(dst, b1, b2) \ +# define CLEARBITS(buf) bzero((caddr_t) buf, MSKCNT*sizeof(long)) +# define MASKANDSETBITS(dst, b1, b2) \ { int cri; \ for (cri=MSKCNT; --cri>=0; ) \ dst[cri] = (b1[cri] & b2[cri]); } -#define ORBITS(dst, b1, b2) \ +# define ORBITS(dst, b1, b2) \ { int cri; \ for (cri=MSKCNT; --cri>=0; ) \ dst[cri] = (b1[cri] | b2[cri]); } -#define UNSETBITS(dst, b1) \ +# define UNSETBITS(dst, b1) \ { int cri; \ for (cri=MSKCNT; --cri>=0; ) \ dst[cri] &= ~b1[cri]; } -#if (MSKCNT==8) -#define ANYSET(src) (src[0] || src[1] || src[2] || src[3] || \ +# if (MSKCNT==8) +# define ANYSET(src) (src[0] || src[1] || src[2] || src[3] || \ src[4] || src[5] || src[6] || src[7]) -#endif -#endif +# endif +# endif #else /* not WIN32 */ -#include <X11/Xwinsock.h> -#include <X11/Xw32defs.h> +# include <X11/Xwinsock.h> +# include <X11/Xw32defs.h> typedef fd_set FdSet; typedef FdSet *FdSetPtr; -#define CLEARBITS(set) FD_ZERO(&set) -#define BITSET(set,s) FD_SET(s,&set) -#define BITCLEAR(set,s) FD_CLR(s,&set) -#define GETBIT(set,s) FD_ISSET(s,&set) -#define ANYSET(set) set->fd_count +# define CLEARBITS(set) FD_ZERO(&set) +# define BITSET(set,s) FD_SET(s,&set) +# define BITCLEAR(set,s) FD_CLR(s,&set) +# define GETBIT(set,s) FD_ISSET(s,&set) +# define ANYSET(set) set->fd_count #endif diff --git a/libXfont/src/fontfile/Makefile.in b/libXfont/src/fontfile/Makefile.in index 527859c98..3b0260168 100644 --- a/libXfont/src/fontfile/Makefile.in +++ b/libXfont/src/fontfile/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,7 +15,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -80,12 +90,11 @@ build_triplet = @build@ host_triplet = @host@ @X_BZIP2_FONT_COMPRESSION_TRUE@am__append_1 = bunzip2.c subdir = src/fontfile -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ - $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h \ $(top_builddir)/include/X11/fonts/fontconf.h @@ -168,6 +177,7 @@ am__define_uniq_tagged_files = \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ @@ -344,7 +354,6 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/fontfile/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/fontfile/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -630,6 +639,8 @@ uninstall-am: mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am +.PRECIOUS: Makefile + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/libXfont/src/fontfile/fileio.c b/libXfont/src/fontfile/fileio.c index 80af51193..d44cecdc4 100644 --- a/libXfont/src/fontfile/fileio.c +++ b/libXfont/src/fontfile/fileio.c @@ -36,6 +36,9 @@ in this Software without prior written authorization from The Open Group. #ifndef O_BINARY #define O_BINARY O_RDONLY #endif +#ifndef O_CLOEXEC +#define O_CLOEXEC 0 +#endif FontFilePtr FontFileOpen (const char *name) @@ -44,7 +47,7 @@ FontFileOpen (const char *name) int len; BufFilePtr raw, cooked; - fd = open (name, O_BINARY); + fd = open (name, O_BINARY|O_CLOEXEC); if (fd < 0) return 0; raw = BufFileOpenRead (fd); diff --git a/libXfont/src/fontfile/filewr.c b/libXfont/src/fontfile/filewr.c index bcc7b1eda..859a0bec1 100644 --- a/libXfont/src/fontfile/filewr.c +++ b/libXfont/src/fontfile/filewr.c @@ -33,17 +33,19 @@ in this Software without prior written authorization from The Open Group. #endif #include <X11/fonts/fntfilio.h> #include <X11/Xos.h> +#ifndef O_BINARY +#define O_BINARY 0 +#endif +#ifndef O_CLOEXEC +#define O_CLOEXEC 0 +#endif FontFilePtr FontFileOpenWrite (const char *name) { int fd; -#if defined(WIN32) || defined(__CYGWIN__) - fd = open (name, O_CREAT|O_TRUNC|O_RDWR|O_BINARY, 0666); -#else - fd = creat (name, 0666); -#endif + fd = open (name, O_CREAT|O_TRUNC|O_RDWR|O_BINARY|O_CLOEXEC, 0666); if (fd < 0) return 0; return (FontFilePtr) BufFileOpenWrite (fd); diff --git a/libXfont/src/stubs/Makefile.in b/libXfont/src/stubs/Makefile.in index 83336e1ac..ce0cd6b99 100644 --- a/libXfont/src/stubs/Makefile.in +++ b/libXfont/src/stubs/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,7 +15,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -79,12 +89,11 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/stubs -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ - $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h \ $(top_builddir)/include/X11/fonts/fontconf.h @@ -161,6 +170,7 @@ am__define_uniq_tagged_files = \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ @@ -351,7 +361,6 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/stubs/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/stubs/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -637,6 +646,8 @@ uninstall-am: mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am +.PRECIOUS: Makefile + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/libXfont/src/util/Makefile.in b/libXfont/src/util/Makefile.in index 2b2c721d8..6ac1d17fc 100644 --- a/libXfont/src/util/Makefile.in +++ b/libXfont/src/util/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,7 +15,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -79,12 +89,11 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/util -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ - $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h \ $(top_builddir)/include/X11/fonts/fontconf.h @@ -160,6 +169,7 @@ am__define_uniq_tagged_files = \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ @@ -344,7 +354,6 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/util/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/util/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -624,6 +633,8 @@ uninstall-am: mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am +.PRECIOUS: Makefile + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. |