Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [pull request] Pull request for branch fixes
@ 2010-02-09 23:46 Thomas Petazzoni
  2010-02-17 10:05 ` Peter Korsgaard
  0 siblings, 1 reply; 14+ messages in thread
From: Thomas Petazzoni @ 2010-02-09 23:46 UTC (permalink / raw)
  To: buildroot

The following changes since commit f0bdacdb5b8fe0fbc276ed510fc58e9a219f5cf8:
  Peter Korsgaard (1):
        update for 2010.02-rc1

are available in the git repository at:

  git://git.busybox.net/~tpetazzoni/git/buildroot fixes

Thomas Petazzoni (3):
      Create $(STAGING_DIR)/usr/bin unconditionnally
      argus: fix compile breakage
      at: fix compile breakage when flex isn't on the target

 Makefile                                           |    1 +
 .../argus-3.0.0.rc.34-01-use-pcap-header.patch     |   27 ++++++++++++++++++++
 package/at/at-3.1.12-0007-include-config-h.patch   |   16 +++++++++++
 3 files changed, 44 insertions(+), 0 deletions(-)
 create mode 100644 package/argus/argus-3.0.0.rc.34-01-use-pcap-header.patch
 create mode 100644 package/at/at-3.1.12-0007-include-config-h.patch

Thanks,
-- 
Thomas Petazzoni

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Buildroot] [pull request] Pull request for branch fixes
  2010-02-09 23:46 Thomas Petazzoni
@ 2010-02-17 10:05 ` Peter Korsgaard
  0 siblings, 0 replies; 14+ messages in thread
From: Peter Korsgaard @ 2010-02-17 10:05 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 Thomas> The following changes since commit f0bdacdb5b8fe0fbc276ed510fc58e9a219f5cf8:
 Thomas>   Peter Korsgaard (1):
 Thomas>         update for 2010.02-rc1

 Thomas> are available in the git repository at:

 Thomas>   git://git.busybox.net/~tpetazzoni/git/buildroot fixes

Committed, thanks!

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Buildroot] [pull request] Pull request for branch fixes
@ 2010-02-24 21:16 Thomas Petazzoni
  2010-02-24 21:16 ` [Buildroot] [PATCH 01/10] netsnmp: use the autoconf built by Buildroot Thomas Petazzoni
                   ` (10 more replies)
  0 siblings, 11 replies; 14+ messages in thread
From: Thomas Petazzoni @ 2010-02-24 21:16 UTC (permalink / raw)
  To: buildroot

The following changes since commit 4f05a61b33e5d87f23837109fb0dd538a5bd5d62:
  Peter Korsgaard (1):
        Merge branch 'misc-fixes5' of git://git.busybox.net/~tpetazzoni/git/buildroot

are available in the git repository at:

  git://git.busybox.net/~tpetazzoni/git/buildroot fixes

Thomas Petazzoni (10):
      netsnmp: use the autoconf built by Buildroot
      ipsec-tools: add host-flex dependency
      openmotif: remove package
      xpdf: remove package
      libgtk2: host version needs host-libpng
      pango: remove gtk-doc patch
      pango: re-enable thai module
      pango: remove dependency on host-pango
      sylpheed: add dependency on libgtk2
      madplay: add patch to switch to the new ALSA API

 package/Config.in                                  |    2 -
 package/ipsec-tools/ipsec-tools.mk                 |    2 +-
 package/libgtk2/libgtk2.mk                         |    2 +-
 .../madplay-0.15.2b-switch-to-new-alsa-api.patch   |  173 ++++
 package/netsnmp/netsnmp.mk                         |    4 +-
 package/openmotif/Config.in                        |    7 -
 package/openmotif/README                           |    2 -
 .../openmotif/openmotif-2.3.0-cross-compile.patch  |  106 ---
 .../openmotif-2.3.0-legacy-bzero-must-die.patch    |  758 ------------------
 package/openmotif/openmotif.mk                     |   94 ---
 package/pango/pango-gtk-doc.patch                  |   59 --
 package/pango/pango-no-libthai.patch               |   10 -
 package/pango/pango.mk                             |   13 +-
 package/sylpheed/Config.in                         |    1 +
 package/sylpheed/sylpheed.mk                       |    2 +-
 package/xpdf/Config.in                             |    9 -
 package/xpdf/xpdf-3.02pl1.patch                    |   33 -
 package/xpdf/xpdf-3.02pl2.patch                    |  823 --------------------
 package/xpdf/xpdf.mk                               |   31 -
 19 files changed, 182 insertions(+), 1949 deletions(-)
 create mode 100644 package/multimedia/madplay/madplay-0.15.2b-switch-to-new-alsa-api.patch
 delete mode 100644 package/openmotif/Config.in
 delete mode 100644 package/openmotif/README
 delete mode 100644 package/openmotif/openmotif-2.3.0-cross-compile.patch
 delete mode 100644 package/openmotif/openmotif-2.3.0-legacy-bzero-must-die.patch
 delete mode 100644 package/openmotif/openmotif.mk
 delete mode 100644 package/pango/pango-gtk-doc.patch
 delete mode 100644 package/pango/pango-no-libthai.patch
 delete mode 100644 package/xpdf/Config.in
 delete mode 100644 package/xpdf/xpdf-3.02pl1.patch
 delete mode 100644 package/xpdf/xpdf-3.02pl2.patch
 delete mode 100644 package/xpdf/xpdf.mk

Thanks,
-- 
Thomas Petazzoni

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Buildroot] [PATCH 01/10] netsnmp: use the autoconf built by Buildroot
  2010-02-24 21:16 [Buildroot] [pull request] Pull request for branch fixes Thomas Petazzoni
@ 2010-02-24 21:16 ` Thomas Petazzoni
  2010-02-24 21:16 ` [Buildroot] [PATCH 02/10] ipsec-tools: add host-flex dependency Thomas Petazzoni
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 14+ messages in thread
From: Thomas Petazzoni @ 2010-02-24 21:16 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/netsnmp/netsnmp.mk |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/netsnmp/netsnmp.mk b/package/netsnmp/netsnmp.mk
index cfe9905..c589e25 100644
--- a/package/netsnmp/netsnmp.mk
+++ b/package/netsnmp/netsnmp.mk
@@ -58,7 +58,7 @@ endif
 
 $(NETSNMP_DIR)/.configured: $(NETSNMP_DIR)/.unpacked
 	(cd $(NETSNMP_DIR); rm -f config.cache; \
-		autoconf && \
+		$(AUTOCONF) && \
 		ac_cv_NETSNMP_CAN_USE_SYSCTL=yes \
 		$(NETSNMP_CONFIGURE_PERL_ENV) \
 		$(TARGET_CONFIGURE_OPTS) \
@@ -130,7 +130,7 @@ endif
 	$(INSTALL) -D -m 0644 $(NETSNMP_DIR)/agent/mibgroup/header_complex.h $(STAGING_DIR)/usr/include/net-snmp/agent/header_complex.h
 	$(INSTALL) -D -m 0755 package/netsnmp/S59snmpd $(TARGET_DIR)/etc/init.d/S59snmpd
 
-netsnmp: $(if $(BR2_PACKAGE_OPENSSL),openssl) $(TARGET_DIR)/usr/sbin/snmpd
+netsnmp: host-autoconf $(if $(BR2_PACKAGE_OPENSSL),openssl) $(TARGET_DIR)/usr/sbin/snmpd
 
 netsnmp-headers: $(TARGET_DIR)/usr/include/net-snmp/net-snmp-config.h
 	$(INSTALL) -d $(TARGET_DIR)/usr/include/net-snmp
-- 
1.6.3.3

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [Buildroot] [PATCH 02/10] ipsec-tools: add host-flex dependency
  2010-02-24 21:16 [Buildroot] [pull request] Pull request for branch fixes Thomas Petazzoni
  2010-02-24 21:16 ` [Buildroot] [PATCH 01/10] netsnmp: use the autoconf built by Buildroot Thomas Petazzoni
@ 2010-02-24 21:16 ` Thomas Petazzoni
  2010-02-24 21:16 ` [Buildroot] [PATCH 03/10] openmotif: remove package Thomas Petazzoni
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 14+ messages in thread
From: Thomas Petazzoni @ 2010-02-24 21:16 UTC (permalink / raw)
  To: buildroot

This fixes the following build failure:

checking lex output file root...
configure: error: cannot find output from flex; giving up

Caused by the fact that a host version of flex is missing
in $(HOST_DIR).

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/ipsec-tools/ipsec-tools.mk |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/package/ipsec-tools/ipsec-tools.mk b/package/ipsec-tools/ipsec-tools.mk
index a8b87a6..38cd57b 100644
--- a/package/ipsec-tools/ipsec-tools.mk
+++ b/package/ipsec-tools/ipsec-tools.mk
@@ -145,7 +145,7 @@ ifeq ($(BR2_PACKAGE_IPSEC_TOOLS_ADMINPORT), y)
 IPSEC_TOOLS_PROGS+= $(TARGET_DIR)/$(IPSEC_TOOLS_TARGET_BINARY_RACOONCTL)
 endif
 
-ipsec-tools: openssl flex $(IPSEC_TOOLS_PROGS)
+ipsec-tools: openssl flex host-flex $(IPSEC_TOOLS_PROGS)
 
 ipsec-tools-source: $(DL_DIR)/$(IPSEC_TOOLS_SOURCE)
 
-- 
1.6.3.3

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [Buildroot] [PATCH 03/10] openmotif: remove package
  2010-02-24 21:16 [Buildroot] [pull request] Pull request for branch fixes Thomas Petazzoni
  2010-02-24 21:16 ` [Buildroot] [PATCH 01/10] netsnmp: use the autoconf built by Buildroot Thomas Petazzoni
  2010-02-24 21:16 ` [Buildroot] [PATCH 02/10] ipsec-tools: add host-flex dependency Thomas Petazzoni
@ 2010-02-24 21:16 ` Thomas Petazzoni
  2010-02-24 21:16 ` [Buildroot] [PATCH 04/10] xpdf: " Thomas Petazzoni
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 14+ messages in thread
From: Thomas Petazzoni @ 2010-02-24 21:16 UTC (permalink / raw)
  To: buildroot

This is an old package. It is currently broken, and probably nobody
uses it. So let's get rid of it.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/Config.in                                  |    1 -
 package/openmotif/Config.in                        |    7 -
 package/openmotif/README                           |    2 -
 .../openmotif/openmotif-2.3.0-cross-compile.patch  |  106 ---
 .../openmotif-2.3.0-legacy-bzero-must-die.patch    |  758 --------------------
 package/openmotif/openmotif.mk                     |   94 ---
 6 files changed, 0 insertions(+), 968 deletions(-)
 delete mode 100644 package/openmotif/Config.in
 delete mode 100644 package/openmotif/README
 delete mode 100644 package/openmotif/openmotif-2.3.0-cross-compile.patch
 delete mode 100644 package/openmotif/openmotif-2.3.0-legacy-bzero-must-die.patch
 delete mode 100644 package/openmotif/openmotif.mk

diff --git a/package/Config.in b/package/Config.in
index 37cae2e..e3b1743 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -342,7 +342,6 @@ source "package/gtk2-engines/Config.in"
 source "package/gtk2-themes/Config.in"
 source "package/libsexy/Config.in"
 source "package/fltk/Config.in"
-source "package/openmotif/Config.in"
 source "package/fontconfig/Config.in"
 source "package/freetype/Config.in"
 source "package/tslib/Config.in"
diff --git a/package/openmotif/Config.in b/package/openmotif/Config.in
deleted file mode 100644
index 56cb651..0000000
--- a/package/openmotif/Config.in
+++ /dev/null
@@ -1,7 +0,0 @@
-config BR2_PACKAGE_OPENMOTIF
-	bool "openmotif"
-	help
-	  OpenMotif is the publicly licensed version of Motif, the
-	  industry standard user interface toolkit for UNIX systems.
-
-	  ftp://ftp.ics.com/openmotif/2.3/2.3.0
diff --git a/package/openmotif/README b/package/openmotif/README
deleted file mode 100644
index e93bc65..0000000
--- a/package/openmotif/README
+++ /dev/null
@@ -1,2 +0,0 @@
-Compiling OpenMotif may require byacc (or just yacc) 
-to be installed on the host build system 
diff --git a/package/openmotif/openmotif-2.3.0-cross-compile.patch b/package/openmotif/openmotif-2.3.0-cross-compile.patch
deleted file mode 100644
index 3d5480b..0000000
--- a/package/openmotif/openmotif-2.3.0-cross-compile.patch
+++ /dev/null
@@ -1,106 +0,0 @@
---- a/lib/Xm/Makefile.in	2007-08-09 03:27:55.000000000 -0400
-+++ b/lib/Xm/Makefile.in	2008-02-27 10:45:45.000000000 -0500
-@@ -1130,7 +1130,7 @@ $(STRING_FILES): Makefile $(XMSTRING_LIS
- 	test -f XmStrDefs23.ht || $(LN_S) $(srcdir)/XmStrDefs23.ht XmStrDefs23.ht
- 	test -f XmStrDefsI.ht || $(LN_S) $(srcdir)/XmStrDefsI.ht XmStrDefsI.ht
- 	test -f XmStrDefs.ct || $(LN_S) $(srcdir)/XmStrDefs.ct XmStrDefs.ct
--	$(top_builddir)/config/util/makestrs -f $(XMSTRING_LIST) >XmStrDefs.c
-+	$(top_builddir)/config/util/makestrs-host -f $(XMSTRING_LIST) >XmStrDefs.c
- 
- @MessageCatalog_TRUE@$(CAT_FILES): Xm.msg
- @MessageCatalog_TRUE@	$(mkinstalldirs) $(top_builddir)/localized/C/msg
-
---- a/lib/Xm/Makefile.am	2005-12-17 10:04:02.000000000 -0500
-+++ b/lib/Xm/Makefile.am	2008-02-27 10:40:01.000000000 -0500
-@@ -284,7 +284,7 @@ $(STRING_FILES): Makefile $(XMSTRING_LIS
- 	test -f XmStrDefs23.ht || $(LN_S) $(srcdir)/XmStrDefs23.ht XmStrDefs23.ht
- 	test -f XmStrDefsI.ht || $(LN_S) $(srcdir)/XmStrDefsI.ht XmStrDefsI.ht
- 	test -f XmStrDefs.ct || $(LN_S) $(srcdir)/XmStrDefs.ct XmStrDefs.ct
--	$(top_builddir)/config/util/makestrs -f $(XMSTRING_LIST) >XmStrDefs.c
-+	$(top_builddir)/config/util/makestrs-host -f $(XMSTRING_LIST) >XmStrDefs.c
- 
- if MessageCatalog
-
---- a/tools/wml/Makefile.in	2008-02-27 11:24:14.000000000 -0500
-+++ b/tools/wml/Makefile.in	2008-02-27 11:32:33.000000000 -0500
-@@ -617,9 +617,9 @@ UilLexPars.c: Uil.c
- 
- $(WMLTARGETS): wmluiltok wml UilLexPars.c $(TABLE)
- 	$(RM) $(WMLTARGETS) wml.report wml-uil.mm
--	./wmluiltok <$(srcdir)/Uil.y >tokens.dat
-+	./wmluiltok-host <$(srcdir)/Uil.y >tokens.dat
- 	$(RM) wml-uil.mm
--	./wml $(srcdir)/$(TABLE)
-+	./wml-host $(srcdir)/$(TABLE)
- 	$(RM) tokens.dat
- 
- all: motif.wmd
-
---- a/tools/wml/Makefile.am	2002-10-06 09:08:48.000000000 -0400
-+++ b/tools/wml/Makefile.am	2008-02-27 11:33:04.000000000 -0500
-@@ -50,9 +50,9 @@ UilLexPars.c: Uil.c
- 
- $(WMLTARGETS): wmluiltok wml UilLexPars.c $(TABLE)
- 	$(RM) $(WMLTARGETS) wml.report wml-uil.mm
--	./wmluiltok <$(srcdir)/Uil.y >tokens.dat
-+	./wmluiltok-host <$(srcdir)/Uil.y >tokens.dat
- 	$(RM) wml-uil.mm
--	./wml $(srcdir)/$(TABLE)
-+	./wml-host $(srcdir)/$(TABLE)
- 	$(RM) tokens.dat
- 
- all: motif.wmd
-
---- a/demos/lib/Exm/wml/Makefile.am	2002-10-06 09:08:47.000000000 -0400
-+++ b/demos/lib/Exm/wml/Makefile.am	2008-02-27 13:29:08.000000000 -0500
-@@ -65,11 +65,11 @@ $(TARGETS):	$(TABLE) $(WMLDIR)/motif.wml
- # 	$(YACC) -d $(YACCFLAGS) $(UILY)
- # 	$(MV) y.tab.c UilLexPars.c
- # 	$(MV) y.tab.h UilLexPars.h
--	$(top_builddir)/tools/wml/wmluiltok < $(UILY) > tokens.dat
-+	$(top_builddir)/tools/wml/wmluiltok-host < $(UILY) > tokens.dat
- # 	$(RM) wml-uil.mm
- 	$(RM) Exm.h
- 	$(LN_S) $(srcdir)/$(TABLE) ./Exm.h
--	$(CPP) -I$(WMLDIR) Exm.h | $(top_builddir)/tools/wml/wml
-+	$(CPP) -I$(WMLDIR) Exm.h | $(top_builddir)/tools/wml/wml-host
- 	$(RM) Exm.h
- # 	$(RM) tokens.dat
- # 
-
---- a/tools/wml/wmluiltok.c	2007-08-09 03:47:17.000000000 -0400
-+++ b/tools/wml/wmluiltok.c	2008-02-27 12:13:02.000000000 -0500
-@@ -1689,13 +1689,13 @@ void *ptr;
- 	free( ptr );
- 	}
- 
--#if YY_MAIN
-+//#if YY_MAIN
- int main()
- 	{
- 	yylex();
- 	return 0;
- 	}
--#endif
-+//#endif
- #line 183 "wmluiltok.l"
-
-
---- a/ltmain.sh	2006-07-13 03:12:13.000000000 -0400
-+++ b/ltmain.sh	2008-02-27 14:50:40.000000000 -0500
-@@ -5427,13 +5427,13 @@ else
- 	# Backslashes separate directories on plain windows
- 	*-*-mingw | *-*-os2*)
- 	  $echo >> $output "\
--      exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
-+      exec \"\$progdir\\\\\$program-host\" \${1+\"\$@\"}
- "
- 	  ;;
- 
- 	*)
- 	  $echo >> $output "\
--      exec \"\$progdir/\$program\" \${1+\"\$@\"}
-+      exec \"\$progdir/\$program-host\" \${1+\"\$@\"}
- "
- 	  ;;
- 	esac
diff --git a/package/openmotif/openmotif-2.3.0-legacy-bzero-must-die.patch b/package/openmotif/openmotif-2.3.0-legacy-bzero-must-die.patch
deleted file mode 100644
index d661f0d..0000000
--- a/package/openmotif/openmotif-2.3.0-legacy-bzero-must-die.patch
+++ /dev/null
@@ -1,758 +0,0 @@
-diff -rup a/lib/Xm/BaseClass.c b/lib/Xm/BaseClass.c
---- a/lib/Xm/BaseClass.c	2002-01-10 15:56:19.000000000 -0500
-+++ b/lib/Xm/BaseClass.c	2008-02-27 12:56:46.000000000 -0500
-@@ -56,7 +56,7 @@ static char rcsid[] = "$TOG: BaseClass.c
- #include <Xm/ExtObjectP.h>
- #include <Xm/Screen.h>
- #include <Xm/VendorSEP.h>
--#include <Xm/XmosP.h>		/* for bzero */
-+#include <Xm/XmosP.h>		
- #include "BaseClassI.h"
- #include "CallbackI.h"
- #include "DropSMgrI.h"
-diff -rup a/lib/Xm/Color.c b/lib/Xm/Color.c
---- a/lib/Xm/Color.c	2002-01-10 15:56:22.000000000 -0500
-+++ b/lib/Xm/Color.c	2008-02-27 12:57:01.000000000 -0500
-@@ -50,7 +50,7 @@
- #include <Xm/ManagerP.h>
- #include <Xm/PrimitiveP.h>
- #include <Xm/XmP.h>
--#include <Xm/XmosP.h>		/* for bzero */
-+#include <Xm/XmosP.h>		
- #include "ColorI.h"
- #include "ImageCachI.h"
- #include "MessagesI.h"
-diff -rup a/lib/Xm/ComboBox.c b/lib/Xm/ComboBox.c
---- a/lib/Xm/ComboBox.c	2005-05-18 07:43:44.000000000 -0400
-+++ b/lib/Xm/ComboBox.c	2008-02-27 12:57:20.000000000 -0500
-@@ -45,7 +45,7 @@
- #include <stdio.h>
- #include <string.h>
- #include <Xm/XmP.h>
--#include <Xm/XmosP.h>		/* for bzero et al */
-+#include <Xm/XmosP.h>		
- #include <X11/Shell.h>
- #include <X11/cursorfont.h>
- #include <X11/keysym.h>
-@@ -1431,7 +1431,7 @@ ComboBoxParentProcess(Widget		  wid,
- 	    {
- 	      XmListCallbackStruct call_data;
- 	
--	      bzero((char*) &call_data, sizeof(XmListCallbackStruct));
-+	      memset((char*) &call_data, 0, sizeof(XmListCallbackStruct));
- 	      if (pos)
- 		{
- 		  call_data.item		    = XmStringCopy(item);
-diff -rup a/lib/Xm/Container.c b/lib/Xm/Container.c
---- a/lib/Xm/Container.c	2005-07-13 05:25:16.000000000 -0400
-+++ b/lib/Xm/Container.c	2008-02-27 12:57:46.000000000 -0500
-@@ -79,7 +79,7 @@
- #include "CareVisualTI.h"
- #include "MessagesI.h"
- #include "ClipWindTI.h"
--#include <Xm/XmosP.h>                /* for bzero et al */
-+#include <Xm/XmosP.h>                
- 
- #define	ZERO_DIM	0
- #define	DEFAULT_INDENTATION	40
-@@ -9417,7 +9417,7 @@ ScrollProc(
- 	/* get the current position */
- 	nav_data.valueMask =
- 	    NavValue | NavIncrement | NavMinimum | NavMaximum | NavSliderSize;
--	bzero(&nav_data,sizeof(XmNavigatorDataRec));
-+	memset(&nav_data, 0, sizeof(XmNavigatorDataRec));
- 	navigatorTrait->getValue(*nav, &nav_data);
- 
- 	/* compute the new position */
-diff -rup a/lib/Xm/DropSMgr.c b/lib/Xm/DropSMgr.c
---- a/lib/Xm/DropSMgr.c	2006-04-20 07:26:07.000000000 -0400
-+++ b/lib/Xm/DropSMgr.c	2008-02-27 12:58:12.000000000 -0500
-@@ -98,7 +98,7 @@ static char rcsid[] = "$TOG: DropSMgr.c 
- #include <Xm/ManagerP.h>
- #include <Xm/DragC.h>
- #include <Xm/DropTrans.h>
--#include <Xm/XmosP.h>		/* for bzero */
-+#include <Xm/XmosP.h>		
- #include "XmI.h"
- #include "DisplayI.h"
- #include "DragBSI.h"
-@@ -2401,7 +2401,7 @@ PutDSToStream(
- 	 * that the widget does not define resources all of the required
- 	 * animation resources.
- 	 */
--	bzero(((void *) &iccInfo), sizeof(iccInfo));
-+	memset(((void *) &iccInfo), 0, sizeof(iccInfo));
- 
- 	if (last)
- 		tType |= XmDSM_T_CLOSE;
-@@ -3283,7 +3283,7 @@ CreateInfo(
- 	size_t size;
- 
- 	/* zero out the working info struct */
--	bzero((void *)(&fullInfoRec), sizeof(fullInfoRec));
-+	memset((void *)(&fullInfoRec), 0, sizeof(fullInfoRec));
- 
- 	/* Load that puppy */
- 	SetDSLeaf(&fullInfoRec, True);
-@@ -3448,7 +3448,7 @@ int index;
- 	/*
- 	 * Clear the full info back to the default (kind of) state.
- 	 */
--	bzero((void *)(full_info), sizeof(XmDSFullInfoRec));
-+	memset((void *)(full_info), 0, sizeof(XmDSFullInfoRec));
- 	full_info->animation_pixmap = XmUNSPECIFIED_PIXMAP;
- 	full_info->animation_mask = XmUNSPECIFIED_PIXMAP;
- 
-diff -rup a/lib/Xm/FileSB.c b/lib/Xm/FileSB.c
---- a/lib/Xm/FileSB.c	2005-12-27 06:14:13.000000000 -0500
-+++ b/lib/Xm/FileSB.c	2008-02-27 12:49:09.000000000 -0500
-@@ -2643,7 +2643,7 @@ SetValues(
-     *   picked-up there by the XmNqualifySearchDataProc routine to fill
-     *   in the value field of the search data.
-     */
--    bzero( (char*)&searchData, sizeof( XmFileSelectionBoxCallbackStruct)) ;
-+    memset( (char*)&searchData, 0, sizeof( XmFileSelectionBoxCallbackStruct)) ;
- 
-     if(    FS_DirMask( new_w) != FS_DirMask( current)    )
-     {   
-diff -rup a/lib/Xm/List.c b/lib/Xm/List.c
---- a/lib/Xm/List.c	2007-01-24 12:07:35.000000000 -0500
-+++ b/lib/Xm/List.c	2008-02-27 12:49:27.000000000 -0500
-@@ -5696,7 +5696,7 @@ ClickElement(XmListWidget lw,
-   unsigned char selection_policy;
-   XmListCallbackStruct cb;
- 
--  bzero((char*) &cb, sizeof(XmListCallbackStruct));
-+  memset((char*) &cb, 0, sizeof(XmListCallbackStruct));
-   item = lw->list.LastHLItem;
-   lw->list.DidSelection = TRUE;
- 
-diff -rup a/lib/Xm/Obso2_0.c b/lib/Xm/Obso2_0.c
---- a/lib/Xm/Obso2_0.c	2002-05-14 17:29:03.000000000 -0400
-+++ b/lib/Xm/Obso2_0.c	2008-02-27 12:50:04.000000000 -0500
-@@ -512,7 +512,7 @@ _XmGetDefaultThresholdsForScreen( Screen
-   * that call this routine don't have a widget, we need this hack
-   * to create a dummy widget.
-   */
--  bzero((void*) &widget, sizeof(widget) );
-+  memset((void*) &widget, 0, sizeof(widget) );
-   widget.core.self = &widget;
-   widget.core.widget_class = coreWidgetClass;
-   widget.core.screen = screen;
-diff -rup a/lib/Xm/Protocols.c b/lib/Xm/Protocols.c
---- a/lib/Xm/Protocols.c	2002-05-14 17:29:23.000000000 -0400
-+++ b/lib/Xm/Protocols.c	2008-02-27 12:58:54.000000000 -0500
-@@ -48,7 +48,7 @@ static char rcsid[] = "$XConsortium: Pro
- 
- /* (c) Copyright 1987, 1988, 1989, 1990, 1991, 1992 HEWLETT-PACKARD COMPANY */
- 
--#include <Xm/XmosP.h>           /* for bzero et al */
-+#include <Xm/XmosP.h>          
- #include <Xm/ProtocolsP.h>
- #include "BaseClassI.h"
- #include "CallbackI.h"
-@@ -327,7 +327,7 @@ RemoveAllPMgr(
- 
-     XtInsertEventHandler( w, KeyPressMask, TRUE, RemoveAllPMgrHandler,
-                                                          closure, XtListHead) ;
--    bzero((void *) &ev, sizeof(XEvent));
-+    memset((void *) &ev, 0, sizeof(XEvent));
-     ev.xkey.type = KeyPress ;
-     ev.xkey.display = XtDisplay( w) ;
-     ev.xkey.time = XtLastTimestampProcessed( XtDisplay( w)) ;
-diff -rup a/lib/Xm/RCLayout.c b/lib/Xm/RCLayout.c
---- a/lib/Xm/RCLayout.c	2002-01-30 10:47:18.000000000 -0500
-+++ b/lib/Xm/RCLayout.c	2008-02-27 12:58:35.000000000 -0500
-@@ -62,7 +62,7 @@ static char *rcsid = "$XConsortium: RCLa
- #include <Xm/RowColumnP.h>
- #include <Xm/TearOffBP.h>
- #include <Xm/TearOffP.h>
--#include <Xm/XmosP.h>		/* for bzero */
-+#include <Xm/XmosP.h>		
- #include "LabelGI.h"
- #include "GeoUtilsI.h"
- #include "RCLayoutI.h"
-@@ -1947,7 +1947,7 @@ _XmRC_SetOrGetTextMargins(
- 
-   if (op == XmBASELINE_GET) {
-     /* in case the class does not have this procedure */
--    bzero((void *) textMargins, sizeof(XmBaselineMargins));
-+    memset((void *) textMargins, 0, sizeof(XmBaselineMargins));
-   }
- 
-   textMargins->get_or_set = op;
-diff -rup a/lib/Xm/ResConvert.c b/lib/Xm/ResConvert.c
---- a/lib/Xm/ResConvert.c	2003-10-22 12:26:08.000000000 -0400
-+++ b/lib/Xm/ResConvert.c	2008-02-27 12:51:24.000000000 -0500
-@@ -2600,7 +2600,7 @@ GetNextTab(char **s,
-   char 	sign[2];
-   char	*tmp;
- 
--  bzero(sign, sizeof(sign));
-+  memset(sign, 0, sizeof(sign));
-   unitType[0] = '\0';
-   
-   if (sscanf(*s, " %2[+]", sign) == 1)
-diff -rup a/lib/Xm/TearOff.c b/lib/Xm/TearOff.c
---- a/lib/Xm/TearOff.c	2003-10-06 06:10:24.000000000 -0400
-+++ b/lib/Xm/TearOff.c	2008-02-27 12:59:10.000000000 -0500
-@@ -63,7 +63,7 @@ static char rcsid[] = "$TOG: TearOff.c /
- #include <Xm/SeparatorP.h>
- #include <Xm/TraitP.h>
- #include <Xm/VirtKeysP.h>
--#include <Xm/XmosP.h>		/* for bzero */
-+#include <Xm/XmosP.h>		
- #include "MenuStateI.h"
- #include "MenuUtilI.h"
- #include "RCMenuI.h"
-@@ -1095,7 +1095,7 @@ _XmTearOffInitiate(
-    }
-    else
-    {
--      bzero((void *)&sprop, sizeof(sprop));
-+      memset((void *)&sprop, 0, sizeof(sprop));
-       /* Fix for 9346,  use sizeof(long) to calculate total
- 	 size of block from get property */
-       memcpy(&sprop, rprop, (size_t)sizeof(long) * num_items);
-diff -rup a/lib/Xm/TxtPropCv.c b/lib/Xm/TxtPropCv.c
---- a/lib/Xm/TxtPropCv.c	2005-06-10 07:50:56.000000000 -0400
-+++ b/lib/Xm/TxtPropCv.c	2008-02-27 12:52:24.000000000 -0500
-@@ -192,7 +192,7 @@ GetTextSegment(Display *display, /* unus
- 	      /* The text should be already be valid locale text */
- 	      char *tmp = XtMalloc(char_count + sizeof(wchar_t));
- 	      memcpy(tmp, text, char_count);
--	      bzero(tmp + char_count, sizeof(wchar_t));
-+	      memset(tmp + char_count, 0, sizeof(wchar_t));
- 
- 	      *buffer = tmp;
- 	    }
-@@ -216,7 +216,7 @@ GetTextSegment(Display *display, /* unus
- 		     already be valid locale text. */
- 		  char *tmp = XtMalloc(char_count + sizeof(wchar_t));
- 		  memcpy(tmp, text, char_count);
--		  bzero(tmp + char_count, sizeof(wchar_t));
-+		  memset(tmp + char_count, 0, sizeof(wchar_t));
- 
- 		  *buffer = tmp;
- 		}
-@@ -226,7 +226,7 @@ GetTextSegment(Display *display, /* unus
- 		  /* The text is valid STRING text */
- 		  char *tmp = XtMalloc(char_count + sizeof(wchar_t));
- 		  memcpy(tmp, text, char_count);
--		  bzero(tmp + char_count, sizeof(wchar_t));
-+		  memset(tmp + char_count, 0, sizeof(wchar_t));
- 
- 		  *buffer = tmp;
- 		}
-diff -rup a/lib/Xm/VendorS.c b/lib/Xm/VendorS.c
---- a/lib/Xm/VendorS.c	2006-11-08 09:18:05.000000000 -0500
-+++ b/lib/Xm/VendorS.c	2008-02-27 12:59:26.000000000 -0500
-@@ -65,7 +65,7 @@ static char rcsid[] = "$TOG: VendorS.c /
- #include <Xm/UnitTypeT.h>
- #include <Xm/VendorSEP.h>
- #include <Xm/VendorSP.h>
--#include <Xm/XmosP.h>		/* for bzero */
-+#include <Xm/XmosP.h>		
- #include <Xm/ToolTipCT.h>
- #include "BaseClassI.h"
- #include "CallbackI.h"
-@@ -1818,7 +1818,7 @@ MotifWarningHandler (String name,
-      char *par[10];
-      if (i > 10) i = 10;
-      memcpy((char*)par, (char*)params, i * sizeof(String));
--     bzero((char *)&par[i], (10-i) * sizeof(String));
-+     memset((char *)&par[i], 0, (10-i) * sizeof(String));
-      (void) sprintf(&buf[strlen(buf)], buf2, par[0], par[1], par[2], par[3],
- 		    par[4], par[5], par[6], par[7], par[8], par[9]);
-    } else
-diff -rup a/lib/Xm/Xmfuncs.h b/lib/Xm/Xmfuncs.h
---- a/lib/Xm/Xmfuncs.h	2002-01-04 16:23:20.000000000 -0500
-+++ b/lib/Xm/Xmfuncs.h	2008-02-27 12:36:01.000000000 -0500
-@@ -36,14 +36,14 @@ in this Software without prior written a
- 
- #ifdef X_USEBFUNCS
- void bcopy();
--void bzero();
-+//void bzero();
- int bcmp();
- #else
- #if (__STDC__ && !defined(X_NOT_STDC_ENV) && !defined(sun) && !defined(macII) && !defined(apollo)) || defined(SVR4) || defined(hpux) || defined(_IBMR2) || defined(_SEQUENT_)
- #include <string.h>
- #define _XFUNCS_H_INCLUDED_STRING_H
- #define bcopy(b1,b2,len) memmove(b2, b1, (size_t)(len))
--#define bzero(b,len) memset(b, 0, (size_t)(len))
-+//#define bzero(b,len) memset(b, 0, (size_t)(len))
- #define bcmp(b1,b2,len) memcmp(b1, b2, (size_t)(len))
- #else
- #ifdef sgi
-@@ -52,11 +52,11 @@ int bcmp();
- #ifdef SYSV
- #include <memory.h>
- void bcopy();
--#define bzero(b,len) memset(b, 0, len)
-+//#define bzero(b,len) memset(b, 0, len)
- #define bcmp(b1,b2,len) memcmp(b1, b2, len)
- #else /* bsd */
- void bcopy();
--void bzero();
-+//void bzero();
- int bcmp();
- #endif /* SYSV */
- #endif /* sgi */
-@@ -70,8 +70,8 @@ int bcmp();
- #ifndef _XFUNCS_H_INCLUDED_STRING_H
- #include <string.h>
- #endif
--#undef bzero
--#define bzero(b,len) memset(b,0,len)
-+//#undef bzero
-+//#define bzero(b,len) memset(b,0,len)
- #else /* else X_NOT_STDC_ENV or SunOS 4 */
- #if defined(SYSV) || defined(luna) || defined(sun) || defined(__sxg__)
- #include <memory.h>
-diff -rup a/lib/Xm/XmIm.c b/lib/Xm/XmIm.c
---- a/lib/Xm/XmIm.c	2005-07-18 09:01:07.000000000 -0400
-+++ b/lib/Xm/XmIm.c	2008-02-27 12:59:39.000000000 -0500
-@@ -60,7 +60,7 @@ static char rcsid[] = "$TOG: XmIm.c /mai
- #include <Xm/PrimitiveP.h>
- #include <Xm/VendorSEP.h>
- #include <Xm/VendorSP.h>
--#include <Xm/XmosP.h>		/* for bzero */
-+#include <Xm/XmosP.h>		
- #include "BaseClassI.h"
- #include "MessagesI.h"
- #include "XmI.h"
-@@ -1035,7 +1035,7 @@ recreate_xic_info(XIC		  xic,
-   
-   /* This XIC must have been created by the application directly. */
-   xic_info = XtNew(XmImXICRec);
--  bzero((char*) xic_info, sizeof(XmImXICRec));
-+  memset((char*) xic_info, 0, sizeof(XmImXICRec));
-   (void) XGetICValues(xic, XNInputStyle, &xic_info->input_style, NULL);
-   xic_info->next = im_info->iclist;
-   im_info->iclist = xic_info;
-@@ -1128,11 +1128,11 @@ create_xic_info(Widget		shell,
-   
-   /* Create the XIC info record. */
-   xic_info = XtNew(XmImXICRec);
--  bzero((char*) xic_info, sizeof(XmImXICRec));
-+  memset((char*) xic_info, 0, sizeof(XmImXICRec));
-   xic_info->input_style = style;
-   xic_info->anonymous = True;
-   xic_info->preedit_buffer = XtNew(PreeditBufferRec);
--  bzero((char *) xic_info->preedit_buffer, sizeof(PreeditBufferRec));
-+  memset((char *) xic_info->preedit_buffer, 0, sizeof(PreeditBufferRec));
-   
-   xic_info->next = im_info->iclist;
-   im_info->iclist = xic_info;
-@@ -1215,9 +1215,9 @@ set_values(Widget w,
-       icp->focus_window && icp->focus_window != XtWindow(w))
-     return;
-   
--  bzero((char*) &status_vlist, sizeof(VaArgListRec));
--  bzero((char*) &preedit_vlist, sizeof(VaArgListRec));
--  bzero((char*) &xic_vlist, sizeof(VaArgListRec));
-+  memset((char*) &status_vlist, 0, sizeof(VaArgListRec));
-+  memset((char*) &preedit_vlist, 0, sizeof(VaArgListRec));
-+  memset((char*) &xic_vlist, 0, sizeof(VaArgListRec));
-   for (i = num_args; i > 0; i--, argp++) {
-     name = XrmStringToName(argp->name);
-     if (name == area_name && !(icp->input_style & XIMPreeditPosition))
-@@ -1490,7 +1490,7 @@ ImPreeditDoneCallback(XIC xic,
-     XtFree((char *)icp->preedit_buffer->text);
-   if (icp->preedit_buffer->feedback)
-     XtFree((char *)icp->preedit_buffer->feedback);
--  bzero((char *)icp->preedit_buffer, sizeof(PreeditBufferRec)); 
-+  memset((char *)icp->preedit_buffer, 0, sizeof(PreeditBufferRec)); 
- }
- 
- static void
-@@ -1589,9 +1589,9 @@ ImPreeditDrawCallback(XIC xic,
- 		text->length * sizeof(XIMFeedback));
- 
-       pb->length = pb->length + text->length - data->chg_length;
--      bzero((char *)pb->text + pb->length * sizeof(wchar_t),
-+      memset((char *)pb->text + pb->length * sizeof(wchar_t), 0,
- 	    sizeof(wchar_t));
--      bzero((char *)pb->feedback + pb->length * sizeof(XIMFeedback),
-+      memset((char *)pb->feedback + pb->length * sizeof(XIMFeedback), 0,
- 	    sizeof(XIMFeedback));
- 
-       XtFree((char *) wchar);
-@@ -1609,9 +1609,9 @@ ImPreeditDrawCallback(XIC xic,
- 	    ml * sizeof(XIMFeedback));
- 
-     pb->length = pb->length - data->chg_length;
--    bzero((char *)pb->text + pb->length * sizeof(wchar_t),
-+    memset((char *)pb->text + pb->length * sizeof(wchar_t), 0,
- 	  data->chg_length * sizeof(wchar_t));
--    bzero((char *)pb->feedback + pb->length * sizeof(XIMFeedback),
-+    memset((char *)pb->feedback + pb->length * sizeof(XIMFeedback), 0,
- 	  data->chg_length * sizeof(XIMFeedback));
-   }
- 
-@@ -2217,7 +2217,7 @@ get_xim_info(Widget  widget)
-   
-   /* Create a record so that we only try XOpenIM() once. */
-   xim_info = XtNew(XmImDisplayRec);
--  bzero((char*) xim_info, sizeof(XmImDisplayRec));
-+  memset((char*) xim_info, 0, sizeof(XmImDisplayRec));
-   xmDisplay->display.xmim_info = (XtPointer)xim_info;
-   
-   /* Setup any specified locale modifiers. */
-@@ -2305,7 +2305,7 @@ get_im_info_ptr(Widget  w,
-   if ((ve->vendor.im_info == NULL) && create)
-     {
-       im_info = XtNew(XmImShellRec);
--      bzero((char*) im_info, sizeof(XmImShellRec));
-+      memset((char*) im_info, 0, sizeof(XmImShellRec));
-       ve->vendor.im_info = (XtPointer)im_info;
-       
-       xim_info = get_xim_info(p);
-diff -rup a/lib/Xm/XmosP.h b/lib/Xm/XmosP.h
---- a/lib/Xm/XmosP.h	2002-06-17 16:36:30.000000000 -0400
-+++ b/lib/Xm/XmosP.h	2008-02-27 13:00:08.000000000 -0500
-@@ -42,8 +42,8 @@
- #ifndef _XmosP_h
- #define _XmosP_h
- 
--/* Some SVR4 systems don't have bzero. */
--#include <Xm/Xmfuncs.h>		/* for bzero et al */
-+
-+#include <Xm/Xmfuncs.h>		
- 
- /*
-  * Fix for 8975 - using LOGNAME instead of USER on SYSV and SVR4 
-diff -rup a/lib/Xm/Xmos_r.h b/lib/Xm/Xmos_r.h
---- a/lib/Xm/Xmos_r.h	2002-06-17 16:36:30.000000000 -0400
-+++ b/lib/Xm/Xmos_r.h	2008-02-27 13:01:20.000000000 -0500
-@@ -502,13 +502,13 @@ typedef struct {
-   struct servent_data sdata;
- } _Xgetservbynameparams;
- #  define _XGethostbyname(h,hp) \
--  (bzero((char*)&(hp).hdata,sizeof((hp).hdata)),	\
-+  (memset((char*)&(hp).hdata,sizeof((hp).hdata)), 0,	\
-    ((gethostbyname_r((h),&(hp).hent,&(hp).hdata) == -1) ? NULL : &(hp).hent))
- #  define _XGethostbyaddr(a,al,t,hp) \
--  (bzero((char*)&(hp).hdata,sizeof((hp).hdata)),	\
-+  (memset((char*)&(hp).hdata,sizeof((hp).hdata)), 0,	\
-    ((gethostbyaddr_r((a),(al),(t),&(hp).hent,&(hp).hdata) == -1) ? NULL : &(hp).hent))
- #  define _XGetservbyname(s,p,sp) \
--  (bzero((char*)&(sp).sdata,sizeof((sp).sdata)),	\
-+  (memset((char*)&(sp).sdata,sizeof((sp).sdata)), 0,	\
-    ((getservbyname_r((s),(p),&(sp).sent,&(sp).sdata) == -1) ? NULL : &(sp).sent) )
- # endif
- # ifdef X_POSIX_THREAD_SAFE_FUNCTIONS
-diff -rup a/lib/Xm/Xmpoll.h b/lib/Xm/Xmpoll.h
---- a/lib/Xm/Xmpoll.h	2002-06-17 16:36:30.000000000 -0400
-+++ b/lib/Xm/Xmpoll.h	2008-02-27 13:01:38.000000000 -0500
-@@ -110,7 +110,7 @@ typedef struct fd_set {
- #define FD_ISSET(n, p)  ((p)->fds_bits[(n)/NFDBITS] & ((fd_mask)1 << ((n) % NFDBITS)))
- #endif
- #ifndef FD_ZERO
--#define FD_ZERO(p)      bzero((char *)(p), sizeof(*(p)))
-+#define FD_ZERO(p)      memset((char *)(p), 0, sizeof(*(p)))
- #endif
- 
- /*
-diff -rup a/lib/Xm/XmRenderT.c b/lib/Xm/XmRenderT.c
---- a/lib/Xm/XmRenderT.c	2005-09-07 05:06:10.000000000 -0400
-+++ b/lib/Xm/XmRenderT.c	2008-02-27 13:02:27.000000000 -0500
-@@ -435,7 +435,7 @@ GetResources(XmRendition rend,
-   /* Initialize found */
-   if (found == NULL)
-     found = (Boolean *)XtMalloc(_XmNumRenditionResources * sizeof(Boolean));
--  bzero(found, _XmNumRenditionResources * sizeof(Boolean));
-+  memset(found, 0, _XmNumRenditionResources * sizeof(Boolean));
- 
-   /* Compile names and classes. */
-   if (wid != NULL)
-@@ -588,7 +588,7 @@ GetResources(XmRendition rend,
- 		memcpy(((char *)GetPtr(rend) + res->xrm_offset),
- 		       value.addr, res->xrm_size);
- 	      else 
--		bzero(((char *)GetPtr(rend) + res->xrm_offset), res->xrm_size);
-+		memset(((char *)GetPtr(rend) + res->xrm_offset), 0, res->xrm_size);
- 	    }
- 	      
- 	}
-@@ -1185,7 +1185,7 @@ CloneRendition(XmRendition rend)
-   if (rend == NULL) return(NULL);
-   
-   copy = (_XmRendition)XtMalloc(sizeof(_XmRenditionRec));
--  bzero((char*)copy, sizeof(_XmRenditionRec));
-+  memset((char*)copy, 0, sizeof(_XmRenditionRec));
-   copy_handle = GetHandle(_XmRendition);
-   SetPtr(copy_handle, copy);
-   
-@@ -1341,7 +1341,7 @@ XmRenderTableAddRenditions(XmRenderTable
-     {
-       matches =
- 	(Boolean *)ALLOCATE_LOCAL(rendition_count * sizeof(Boolean));
--      bzero(matches, rendition_count * sizeof(Boolean));
-+      memset(matches, 0, rendition_count * sizeof(Boolean));
-       
-       /* May have to copy table if shared. */
-       if (_XmRTRefcount(oldtable) > 1)
-@@ -2201,7 +2201,7 @@ _XmRenditionCreate(Display *display,
- 
-   /* Allocate rendition. */
-   rend_int = (_XmRendition)XtMalloc(sizeof(_XmRenditionRec));
--  bzero((char*)rend_int, sizeof(_XmRenditionRec));
-+  memset((char*)rend_int, 0, sizeof(_XmRenditionRec));
-   rend = GetHandle(_XmRendition);
-   SetPtr(rend, rend_int);
-
-diff -rup a/lib/Xm/XmString.c b/lib/Xm/XmString.c
---- a/lib/Xm/XmString.c	2005-12-19 05:32:36.000000000 -0500
-+++ b/lib/Xm/XmString.c	2008-02-27 13:03:31.000000000 -0500
-@@ -3133,7 +3133,7 @@ XmStringExtent(
-       XmRendition	rend;
-       _XmStringArraySegRec array_seg;
-       
--      bzero((char*) &scratch, sizeof(_XmRenditionRec));
-+      memset((char*) &scratch, 0, sizeof(_XmRenditionRec));
-       tmp = &scratch;
-       rend = &tmp;
-       
-@@ -4087,7 +4087,7 @@ _XmStringDrawSegment(Display *d,
- 		 * text data, since optimized string does not have padding. 
- 		 */
- 		{
--		  bzero((char*)&under_seg, sizeof(_XmStringOptSegRec));
-+		  memset((char*)&under_seg, 0, sizeof(_XmStringOptSegRec));
- 		  _XmEntryType(&under_seg) = XmSTRING_ENTRY_OPTIMIZED;
- 		  _XmEntryTagIndex(&under_seg) = _XmStrTagIndex(*underline);
- 		  _XmEntryByteCountSet(&under_seg, _XmStrByteCount(*underline));
-@@ -5069,10 +5069,10 @@ _render(Display *d,
-   if (!string) return;
-   
-   tmp1 = &scratch1;
--  bzero((char *)tmp1, sizeof(_XmRenditionRec));
-+  memset((char *)tmp1, 0, sizeof(_XmRenditionRec));
-   rend1 = &tmp1;
-   tmp2 = &scratch2;
--  bzero((char *)tmp2, sizeof(_XmRenditionRec));
-+  memset((char *)tmp2, 0, sizeof(_XmRenditionRec));
-   rend2 = &tmp2;
- 
-   _XmRendDisplay(rend1) = _XmRendDisplay(rend2) = d;
-@@ -7010,7 +7010,7 @@ XmStringBaseline(
- 	_XmProcessLock();
-   }
- #endif
--  bzero((char*) &scratch, sizeof(_XmRenditionRec));
-+  memset((char*) &scratch, 0, sizeof(_XmRenditionRec));
-   tmp = &scratch;
-   rend = &tmp;
-       
-@@ -7095,7 +7095,7 @@ _XmStringGetBaselines(XmRenderTable rend
-       *baselines = (Dimension*) XtMalloc(*line_count * sizeof(Dimension));
- 
-       /* Initialize the scratch rendition for tabs. */
--      bzero((char*) &scratch, sizeof(_XmRenditionRec));
-+      memset((char*) &scratch, 0, sizeof(_XmRenditionRec));
-       _XmRendDisplay(rend) = 
- 	((_XmRTDisplay(rendertable) == NULL) ?
- 	 _XmGetDefaultDisplay() : _XmRTDisplay(rendertable));
-@@ -9057,7 +9057,7 @@ XmeStringGetComponent(_XmStringContext c
- 	    {
- 	      char* tmp = XtMalloc(char_count + sizeof(wchar_t));
- 	      memcpy(tmp, seg_text, char_count);
--	      bzero(tmp + char_count, sizeof(wchar_t));
-+	      memset(tmp + char_count, 0, sizeof(wchar_t));
- 	      *value = (XtPointer) tmp;
- 	    }
- 	  else
-@@ -9207,7 +9207,7 @@ _XmStringContextReInit(_XmStringContext 
- 		       _XmString	string)
- {
-   assert(context != NULL);
--  bzero((char*) context, sizeof(_XmStringContextRec));
-+  memset((char*) context, 0, sizeof(_XmStringContextRec));
- 
-   _XmStrContString(context) = string;
-   _XmStrContOpt(context)    = _XmStrOptimized(string);
-@@ -9526,7 +9526,7 @@ XmParseMappingCreate(ArgList  arg_list,
- {
-   /* Allocate and initialize the return value. */
-   XmParseMapping result = XtNew(_XmParseMappingRec);
--  bzero((char*)result, sizeof(_XmParseMappingRec));
-+  memset((char*)result, 0, sizeof(_XmParseMappingRec));
- 
-   /* Default values are established by bzero().
-    *
-diff -rup a/lib/Xm/XmStringFunc.c b/lib/Xm/XmStringFunc.c
---- a/lib/Xm/XmStringFunc.c	2002-01-10 15:57:05.000000000 -0500
-+++ b/lib/Xm/XmStringFunc.c	2008-02-27 13:03:50.000000000 -0500
-@@ -715,7 +715,7 @@ XmStringTableProposeTablist(XmStringTabl
-     return ((XmTabList)NULL);
-   }
-   
--  bzero((char*) &scratch, sizeof(_XmRenditionRec));
-+  memset((char*) &scratch, 0, sizeof(_XmRenditionRec));
-   tmp = &scratch;
-   rend = &tmp;
-   
-diff -rup a/lib/Xm/XmStringI.h b/lib/Xm/XmStringI.h
---- a/lib/Xm/XmStringI.h	2002-01-04 16:23:19.000000000 -0500
-+++ b/lib/Xm/XmStringI.h	2008-02-27 13:05:00.000000000 -0500
-@@ -492,7 +492,7 @@ typedef struct __XmStringArraySegRec *_X
- {									   \
-   switch (type) { 							   \
-   case XmSTRING_OPTIMIZED : 						   \
--    bzero((char*)str, sizeof(_XmStringOptRec));				   \
-+    memset((char*)str, 0, sizeof(_XmStringOptRec));				   \
-     _XmStrType(str) = type; 						   \
-     _XmStrTextType(str) = XmNO_TEXT;                                       \
-     _XmStrDirection(str) = XmSTRING_DIRECTION_UNSET;			   \
-@@ -501,7 +501,7 @@ typedef struct __XmStringArraySegRec *_X
-     _XmStrRefCountSet(str, 1);			 	 	 	   \
-     break; 								   \
-   case XmSTRING_MULTIPLE_ENTRY : 					   \
--    bzero((char*)str, sizeof(_XmStringMultiRec));			   \
-+    memset((char*)str, 0, sizeof(_XmStringMultiRec));			   \
-     _XmStrType(str) = type; 						   \
-     _XmStrRefCountSet(str, 1);			 	 	 	   \
-     break; 								   \
-@@ -524,7 +524,7 @@ typedef struct __XmStringArraySegRec *_X
-     (str) = (_XmString)							   \
-       _XmStrMalloc(sizeof(_XmStringOptRec) +                               \
- 		   (text_len ? (text_len - TEXT_BYTES_IN_STRUCT) : 0));    \
--    bzero((char*)str, sizeof(_XmStringOptRec)); 			   \
-+    memset((char*)str, 0, sizeof(_XmStringOptRec)); 			   \
-     _XmStrType(str) = type; 						   \
-     _XmStrTextType(str) = XmNO_TEXT;                                       \
-     _XmStrDirection(str) = XmSTRING_DIRECTION_UNSET;			   \
-@@ -535,7 +535,7 @@ typedef struct __XmStringArraySegRec *_X
-     break; 								   \
-   case XmSTRING_MULTIPLE_ENTRY : 					   \
-     (str) = (_XmString)_XmStrMalloc(sizeof(_XmStringMultiRec));		   \
--    bzero((char*)str, sizeof(_XmStringMultiRec));			   \
-+    memset((char*)str, 0, sizeof(_XmStringMultiRec));			   \
-     _XmStrType(str) = type; 						   \
-     _XmStrRefCountSet(str, 1);			 	 	 	   \
-     break; 								   \
-@@ -661,15 +661,15 @@ typedef struct __XmStringArraySegRec *_X
- {									   \
-   switch (type) { 							   \
-   case XmSTRING_ENTRY_OPTIMIZED : 					   \
--    bzero((char*)entry, sizeof(_XmStringOptSegRec));			   \
-+    memset((char*)entry, 0, sizeof(_XmStringOptSegRec));			   \
-     _XmEntryTagIndex(entry) = TAG_INDEX_UNSET;			 	   \
-     _XmEntryRendIndex(entry) = REND_INDEX_UNSET;		 	   \
-     break; 								   \
-   case XmSTRING_ENTRY_ARRAY : 						   \
--    bzero((char*)entry, sizeof(_XmStringArraySegRec));			   \
-+    memset((char*)entry, 0, sizeof(_XmStringArraySegRec));			   \
-     break; 								   \
-   case XmSTRING_ENTRY_UNOPTIMIZED :					   \
--    bzero((char*)entry, sizeof(_XmStringUnoptSegRec));		   \
-+    memset((char*)entry, 0, sizeof(_XmStringUnoptSegRec));		   \
-     break; 								   \
-   } 									   \
-   _XmEntryType(entry) = type; 						   \
-@@ -683,17 +683,17 @@ typedef struct __XmStringArraySegRec *_X
-   switch (type) { 							   \
-   case XmSTRING_ENTRY_OPTIMIZED : 					   \
-     (entry) = (_XmStringEntry)XtMalloc(sizeof(_XmStringOptSegRec));	   \
--    bzero((char*)entry, sizeof(_XmStringOptSegRec));			   \
-+    memset((char*)entry, 0, sizeof(_XmStringOptSegRec));			   \
-     _XmEntryTagIndex(entry) = TAG_INDEX_UNSET;			 	   \
-     _XmEntryRendIndex(entry) = REND_INDEX_UNSET;		 	   \
-     break; 								   \
-   case XmSTRING_ENTRY_ARRAY : 						   \
-     (entry) = (_XmStringEntry)XtMalloc(sizeof(_XmStringArraySegRec));	   \
--    bzero((char*)entry, sizeof(_XmStringArraySegRec));			   \
-+    memset((char*)entry, 0, sizeof(_XmStringArraySegRec));			   \
-     break; 								   \
-   case XmSTRING_ENTRY_UNOPTIMIZED :					   \
-     (entry) = (_XmStringEntry)XtMalloc(sizeof(_XmStringUnoptSegRec));  \
--    bzero((char*)entry, sizeof(_XmStringUnoptSegRec));		   \
-+    memset((char*)entry, 0, sizeof(_XmStringUnoptSegRec));		   \
-     break; 								   \
-   } 									   \
-   if (entry) {                                                             \
-diff -rup a/lib/Xm/XmStringSeg.c b/lib/Xm/XmStringSeg.c
---- a/lib/Xm/XmStringSeg.c	2002-01-10 15:57:06.000000000 -0500
-+++ b/lib/Xm/XmStringSeg.c	2008-02-27 13:05:16.000000000 -0500
-@@ -291,7 +291,7 @@ _XmStringGetSegment(_XmStringContext   c
- 	{
- 	  char *tmp = XtMalloc(*char_count + sizeof(wchar_t));
- 	  memcpy(tmp, *text, *char_count);
--	  bzero(tmp + *char_count, sizeof(wchar_t));
-+	  memset(tmp + *char_count, 0, sizeof(wchar_t));
- 
- 	  *text = (XtPointer) tmp;
- 	}
-diff -rup a/lib/Xm/XmTabList.c b/lib/Xm/XmTabList.c
---- a/lib/Xm/XmTabList.c	2002-01-30 10:47:25.000000000 -0500
-+++ b/lib/Xm/XmTabList.c	2008-02-27 13:00:38.000000000 -0500
-@@ -225,7 +225,7 @@ _XmCreateTabList(Widget parent,
-   if (_XmRendTabs(rend) == NULL) 
-     {
-       tl = (XmTabList)XtMalloc(sizeof(_XmTabListRec));
--      bzero((char *)tl, sizeof(_XmTabListRec));
-+      memset((char *)tl, 0, sizeof(_XmTabListRec));
-       _XmRendTabs(rend) = tl;
-     }
-   
-diff -rup a/lib/Xm/Xpmcreate.c b/lib/Xm/Xpmcreate.c
---- a/lib/Xm/Xpmcreate.c	2005-12-06 12:31:15.000000000 -0500
-+++ b/lib/Xm/Xpmcreate.c	2008-02-27 12:55:24.000000000 -0500
-@@ -2254,7 +2254,7 @@ ParseAndPutPixels(dc, data, width, heigh
-  	    if (ncolors > 256)
-  		return (XpmFileInvalid);
- 
--	    bzero((char *)colidx, 256 * sizeof(short));
-+	    memset((char *)colidx, 0, 256 * sizeof(short));
- 	    for (a = 0; a < ncolors; a++)
- 		colidx[(unsigned char)colorTable[a].string[0]] = a + 1;
- 
-@@ -2296,7 +2296,7 @@ if (cidx[f]) XpmFree(cidx[f]);}
- 	    unsigned short *cidx[256];
- 	    unsigned int char1;
- 
--	    bzero((char *)cidx, 256 * sizeof(unsigned short *)); /* init */
-+	    memset((char *)cidx, 0, 256 * sizeof(unsigned short *)); /* init */
- 	    for (a = 0; a < ncolors; a++) {
- 		char1 = (unsigned char) colorTable[a].string[0];
- 		if (cidx[char1] == NULL) { /* get new memory */
-diff -rup a/lib/Xm/XpmI.h b/lib/Xm/XpmI.h
---- a/lib/Xm/XpmI.h	2005-12-05 11:31:46.000000000 -0500
-+++ b/lib/Xm/XpmI.h	2008-02-27 12:55:57.000000000 -0500
-@@ -139,9 +139,9 @@ extern FILE *popen();
- #ifndef bcopy
- #define bcopy(source, dest, count) memcpy(dest, source, count)
- #endif
--#ifndef bzero
--#define bzero(b, len) memset(b, 0, len)
--#endif
-+//#ifndef bzero
-+//#define bzero(b, len) memset(b, 0, len)
-+//#endif
- #endif
- 
- /* the following is defined in X11R6 but not in previous versions */
-diff -rup a/lib/Xm/Xpmparse.c b/lib/Xm/Xpmparse.c
---- a/lib/Xm/Xpmparse.c	2005-12-05 11:31:46.000000000 -0500
-+++ b/lib/Xm/Xpmparse.c	2008-02-27 12:56:18.000000000 -0500
-@@ -555,7 +555,7 @@ ParsePixels(data, width, height, ncolors
- 	        return (XpmFileInvalid);
- 	    }
- 
--	    bzero((char *)colidx, 256 * sizeof(short));
-+	    memset((char *)colidx, 0, 256 * sizeof(short));
- 	    for (a = 0; a < ncolors; a++)
- 		colidx[(unsigned char)colorTable[a].string[0]] = a + 1;
- 
-@@ -591,7 +591,7 @@ do \
- 	    unsigned short *cidx[256];
- 	    unsigned int char1;
- 
--	    bzero((char *)cidx, 256 * sizeof(unsigned short *)); /* init */
-+	    memset((char *)cidx, 0, 256 * sizeof(unsigned short *)); /* init */
- 	    for (a = 0; a < ncolors; a++) {
- 		char1 = (unsigned char) colorTable[a].string[0];
- 		if (cidx[char1] == NULL) { /* get new memory */
-
diff --git a/package/openmotif/openmotif.mk b/package/openmotif/openmotif.mk
deleted file mode 100644
index f0213e2..0000000
--- a/package/openmotif/openmotif.mk
+++ /dev/null
@@ -1,94 +0,0 @@
-#############################################################
-#
-# openmotif
-#
-#############################################################
-
-OPENMOTIF_VERSION = 2.3.0
-OPENMOTIF_SOURCE = openmotif-$(OPENMOTIF_VERSION).tar.gz
-OPENMOTIF_SITE = ftp://ftp.ics.com/openmotif/2.3/2.3.0
-OPENMOTIF_CAT:=$(ZCAT)
-OPENMOTIF_DIR:=$(BUILD_DIR)/openmotif-$(OPENMOTIF_VERSION)
-OPENMOTIF_HOST_DIR:=$(BUILD_DIR)/openmotif-$(OPENMOTIF_VERSION)-host
-
-$(DL_DIR)/$(OPENMOTIF_SOURCE):
-	 $(call DOWNLOAD,$(OPENMOTIF_SITE),$(OPENMOTIF_SOURCE))
-
-openmotif-source: $(DL_DIR)/$(OPENMOTIF_SOURCE)
-
-$(OPENMOTIF_DIR)/.unpacked: $(DL_DIR)/$(OPENMOTIF_SOURCE)
-	$(OPENMOTIF_CAT) $(DL_DIR)/$(OPENMOTIF_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
-	$(CONFIG_UPDATE) $(OPENMOTIF_DIR)
-	cp -a $(OPENMOTIF_DIR) $(OPENMOTIF_DIR)-host
-	toolchain/patch-kernel.sh $(OPENMOTIF_DIR) package/openmotif/ \*.patch
-	touch $(OPENMOTIF_DIR)/.unpacked
-
-$(OPENMOTIF_HOST_DIR)/.configured: $(OPENMOTIF_DIR)/.unpacked
-	(if [ ! -e "/usr/include/X11/extensions/Print.h" ]; then \
-		echo "Please install libXp-devel and re-run make."; \
-		exit 1; fi )
-	(if [ ! -e "/usr/include/X11/bitmaps" ]; then \
-		echo "Please install xorg-x11-xbitmaps and re-run make."; \
-		exit 1; fi )
-	(cd $(OPENMOTIF_HOST_DIR); rm -rf config.cache; \
-		aclocal; automake --foreign --add-missing; autoconf; \
-		./configure $(QUIET) \
-		--prefix=/usr -C;);
-	touch $(OPENMOTIF_HOST_DIR)/.configured
-
-$(OPENMOTIF_DIR)/.configured: $(OPENMOTIF_HOST_DIR)/.configured
-	(cd $(OPENMOTIF_DIR); rm -rf config.cache; \
-		aclocal; automake --foreign --add-missing; autoconf; \
-		$(TARGET_CONFIGURE_OPTS) \
-		$(TARGET_CONFIGURE_ARGS) \
-		ac_cv_file__usr_X_include_X11_X_h=yes \
-		ac_cv_func_setpgrp_void=yes \
-		./configure $(QUIET) \
-		--target=$(GNU_TARGET_NAME) \
-		--host=$(GNU_TARGET_NAME) \
-		--build=$(GNU_HOST_NAME) \
-		--prefix=/usr \
-		--mandir=/usr/man \
-		--infodir=/usr/info \
-		--includedir=/usr/include \
-		--with-x --program-prefix="" \
-	);
-	touch $(OPENMOTIF_DIR)/.configured
-
-$(OPENMOTIF_HOST_DIR)/.done: $(OPENMOTIF_DIR)/.configured
-	$(MAKE) -C $(OPENMOTIF_HOST_DIR)
-	ln -s -f $(OPENMOTIF_HOST_DIR)/config/util/makestrs $(OPENMOTIF_DIR)/config/util/makestrs-host
-	ln -s -f $(OPENMOTIF_HOST_DIR)/tools/wml/wmluiltok $(OPENMOTIF_DIR)/tools/wml/wmluiltok-host
-	ln -s -f $(OPENMOTIF_HOST_DIR)/tools/wml/wml $(OPENMOTIF_DIR)/tools/wml/wml-host
-	ln -s -f $(OPENMOTIF_HOST_DIR)/tools/wml/wmldbcreate $(OPENMOTIF_DIR)/tools/wml/wmldbcreate-host
-	mkdir -p $(OPENMOTIF_DIR)/tools/wml/.libs
-	ln -s -f $(OPENMOTIF_HOST_DIR)/tools/wml/.libs/lt-wmldbcreate $(OPENMOTIF_DIR)/tools/wml/.libs/lt-wmldbcreate-host
-	mkdir -p $(OPENMOTIF_DIR)/demos/lib/Exm/wml/.libs
-	ln -s -f $(OPENMOTIF_HOST_DIR)/demos/lib/Exm/wml/.libs/lt-wmldbcreate $(OPENMOTIF_DIR)/demos/lib/Exm/wml/.libs/lt-wmldbcreate-host
-	mkdir -p $(OPENMOTIF_DIR)/clients/uil/.libs
-	ln -s -f $(OPENMOTIF_HOST_DIR)/clients/uil/.libs/lt-uil $(OPENMOTIF_DIR)/clients/uil/.libs/lt-uil-host
-	touch $(OPENMOTIF_HOST_DIR)/.done
-
-$(OPENMOTIF_DIR)/.done: $(OPENMOTIF_HOST_DIR)/.done
-	$(MAKE) -C $(OPENMOTIF_DIR)
-	$(MAKE) -C $(OPENMOTIF_DIR) install DESTDIR=$(STAGING_DIR)
-	$(MAKE) -C $(OPENMOTIF_DIR) install DESTDIR=$(TARGET_DIR)
-	touch $(OPENMOTIF_DIR)/.done
-
-openmotif: $(OPENMOTIF_DIR)/.done
-
-openmotif-clean:
-	rm -f $(TARGET_DIR)/bin/openmotif
-	-$(MAKE) -C $(OPENMOTIF_DIR) clean
-
-openmotif-dirclean:
-	rm -rf $(OPENMOTIF_DIR)
-
-#############################################################
-#
-# Toplevel Makefile options
-#
-#############################################################
-ifeq ($(BR2_PACKAGE_OPENMOTIF),y)
-TARGETS+=openmotif
-endif
-- 
1.6.3.3

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [Buildroot] [PATCH 04/10] xpdf: remove package
  2010-02-24 21:16 [Buildroot] [pull request] Pull request for branch fixes Thomas Petazzoni
                   ` (2 preceding siblings ...)
  2010-02-24 21:16 ` [Buildroot] [PATCH 03/10] openmotif: remove package Thomas Petazzoni
@ 2010-02-24 21:16 ` Thomas Petazzoni
  2010-02-24 21:16 ` [Buildroot] [PATCH 05/10] libgtk2: host version needs host-libpng Thomas Petazzoni
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 14+ messages in thread
From: Thomas Petazzoni @ 2010-02-24 21:16 UTC (permalink / raw)
  To: buildroot

This package depends on openmotif, which has been removed.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/Config.in               |    1 -
 package/xpdf/Config.in          |    9 -
 package/xpdf/xpdf-3.02pl1.patch |   33 --
 package/xpdf/xpdf-3.02pl2.patch |  823 ---------------------------------------
 package/xpdf/xpdf.mk            |   31 --
 5 files changed, 0 insertions(+), 897 deletions(-)
 delete mode 100644 package/xpdf/Config.in
 delete mode 100644 package/xpdf/xpdf-3.02pl1.patch
 delete mode 100644 package/xpdf/xpdf-3.02pl2.patch
 delete mode 100644 package/xpdf/xpdf.mk

diff --git a/package/Config.in b/package/Config.in
index e3b1743..b21604d 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -369,7 +369,6 @@ source "package/sylpheed/Config.in"
 source "package/synergy/Config.in"
 source "package/torsmo/Config.in"
 source "package/x11vnc/Config.in"
-source "package/xpdf/Config.in"
 source "package/xstroke/Config.in"
 source "package/xvkbd/Config.in"
 endmenu
diff --git a/package/xpdf/Config.in b/package/xpdf/Config.in
deleted file mode 100644
index 4846383..0000000
--- a/package/xpdf/Config.in
+++ /dev/null
@@ -1,9 +0,0 @@
-config BR2_PACKAGE_XPDF
-	bool "xpdf"
-	select BR2_PACKAGE_OPENMOTIF
-	select BR2_PACKAGE_FREETYPE
-	help
-	  Xpdf is an open source viewer for Portable Document Format
-	  (PDF) files.
-
-	  ftp://ftp.foolabs.com/pub/xpdf
diff --git a/package/xpdf/xpdf-3.02pl1.patch b/package/xpdf/xpdf-3.02pl1.patch
deleted file mode 100644
index cd42fb9..0000000
--- a/package/xpdf/xpdf-3.02pl1.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-*** xpdf-3.02.orig/xpdf/Stream.cc	Tue Feb 27 14:05:52 2007
---- xpdf-3.02/xpdf/Stream.cc	Thu Jul 26 14:44:43 2007
-***************
-*** 410,424 ****
-    ok = gFalse;
-  
-    nVals = width * nComps;
--   if (width <= 0 || nComps <= 0 || nBits <= 0 ||
--       nComps >= INT_MAX / nBits ||
--       width >= INT_MAX / nComps / nBits ||
--       nVals * nBits + 7 < 0) {
--     return;
--   }
-    pixBytes = (nComps * nBits + 7) >> 3;
-    rowBytes = ((nVals * nBits + 7) >> 3) + pixBytes;
-!   if (rowBytes <= 0) {
-      return;
-    }
-    predLine = (Guchar *)gmalloc(rowBytes);
---- 410,422 ----
-    ok = gFalse;
-  
-    nVals = width * nComps;
-    pixBytes = (nComps * nBits + 7) >> 3;
-    rowBytes = ((nVals * nBits + 7) >> 3) + pixBytes;
-!   if (width <= 0 || nComps <= 0 || nBits <= 0 ||
-!       nComps > gfxColorMaxComps ||
-!       nBits > 16 ||
-!       width >= INT_MAX / nComps ||      // check for overflow in nVals 
-!       nVals >= (INT_MAX - 7) / nBits) { // check for overflow in rowBytes
-      return;
-    }
-    predLine = (Guchar *)gmalloc(rowBytes);
diff --git a/package/xpdf/xpdf-3.02pl2.patch b/package/xpdf/xpdf-3.02pl2.patch
deleted file mode 100644
index ab9e3c6..0000000
--- a/package/xpdf/xpdf-3.02pl2.patch
+++ /dev/null
@@ -1,823 +0,0 @@
-diff -c -r xpdf-3.02pl1.orig/xpdf/Stream.cc xpdf-3.02/xpdf/Stream.cc
-*** xpdf-3.02pl1.orig/xpdf/Stream.cc	Thu Oct 25 15:47:38 2007
---- xpdf-3.02/xpdf/Stream.cc	Thu Oct 25 15:48:19 2007
-***************
-*** 1243,1265 ****
-    columns = columnsA;
-    if (columns < 1) {
-      columns = 1;
-!   }
-!   if (columns + 4 <= 0) {
-!     columns = INT_MAX - 4;
-    }
-    rows = rowsA;
-    endOfBlock = endOfBlockA;
-    black = blackA;
-!   refLine = (short *)gmallocn(columns + 3, sizeof(short));
-!   codingLine = (short *)gmallocn(columns + 2, sizeof(short));
-  
-    eof = gFalse;
-    row = 0;
-    nextLine2D = encoding < 0;
-    inputBits = 0;
-!   codingLine[0] = 0;
-!   codingLine[1] = refLine[2] = columns;
-!   a0 = 1;
-  
-    buf = EOF;
-  }
---- 1243,1268 ----
-    columns = columnsA;
-    if (columns < 1) {
-      columns = 1;
-!   } else if (columns > INT_MAX - 2) {
-!     columns = INT_MAX - 2;
-    }
-    rows = rowsA;
-    endOfBlock = endOfBlockA;
-    black = blackA;
-!   // 0 <= codingLine[0] < codingLine[1] < ... < codingLine[n] = columns
-!   // ---> max codingLine size = columns + 1
-!   // refLine has one extra guard entry at the end
-!   // ---> max refLine size = columns + 2
-!   codingLine = (int *)gmallocn(columns + 1, sizeof(int));
-!   refLine = (int *)gmallocn(columns + 2, sizeof(int));
-  
-    eof = gFalse;
-    row = 0;
-    nextLine2D = encoding < 0;
-    inputBits = 0;
-!   codingLine[0] = columns;
-!   a0i = 0;
-!   outputBits = 0;
-  
-    buf = EOF;
-  }
-***************
-*** 1278,1286 ****
-    row = 0;
-    nextLine2D = encoding < 0;
-    inputBits = 0;
-!   codingLine[0] = 0;
-!   codingLine[1] = columns;
-!   a0 = 1;
-    buf = EOF;
-  
-    // skip any initial zero bits and end-of-line marker, and get the 2D
---- 1281,1289 ----
-    row = 0;
-    nextLine2D = encoding < 0;
-    inputBits = 0;
-!   codingLine[0] = columns;
-!   a0i = 0;
-!   outputBits = 0;
-    buf = EOF;
-  
-    // skip any initial zero bits and end-of-line marker, and get the 2D
-***************
-*** 1297,1507 ****
-    }
-  }
-  
-  int CCITTFaxStream::lookChar() {
-    short code1, code2, code3;
-!   int a0New;
-!   GBool err, gotEOL;
-!   int ret;
-!   int bits, i;
-  
-!   // if@eof just return EOF
-!   if (eof && codingLine[a0] >= columns) {
-!     return EOF;
-    }
-  
-    // read the next row
-!   err = gFalse;
-!   if (codingLine[a0] >= columns) {
-  
-      // 2-D encoding
-      if (nextLine2D) {
--       // state:
--       //   a0New = current position in coding line (0 <= a0New <= columns)
--       //   codingLine[a0] = last change in coding line
--       //                    (black-to-white if a0 is even,
--       //                     white-to-black if a0 is odd)
--       //   refLine[b1] = next change in reference line of opposite color
--       //                 to a0
--       // invariants:
--       //   0 <= codingLine[a0] <= a0New
--       //           <= refLine[b1] <= refLine[b1+1] <= columns
--       //   0 <= a0 <= columns+1
--       //   refLine[0] = 0
--       //   refLine[n] = refLine[n+1] = columns
--       //     -- for some 1 <= n <= columns+1
--       // end condition:
--       //   0 = codingLine[0] <= codingLine[1] < codingLine[2] < ...
--       //     < codingLine[n-1] < codingLine[n] = columns
--       //     -- where 1 <= n <= columns+1
-        for (i = 0; codingLine[i] < columns; ++i) {
-  	refLine[i] = codingLine[i];
-        }
-!       refLine[i] = refLine[i + 1] = columns;
-!       b1 = 1;
-!       a0New = codingLine[a0 = 0] = 0;
-!       do {
-  	code1 = getTwoDimCode();
-  	switch (code1) {
-  	case twoDimPass:
-! 	  if (refLine[b1] < columns) {
-! 	    a0New = refLine[b1 + 1];
-! 	    b1 += 2;
-  	  }
-  	  break;
-  	case twoDimHoriz:
-! 	  if ((a0 & 1) == 0) {
-! 	    code1 = code2 = 0;
-  	    do {
-! 	      code1 += code3 = getWhiteCode();
-  	    } while (code3 >= 64);
-  	    do {
-! 	      code2 += code3 = getBlackCode();
-  	    } while (code3 >= 64);
-  	  } else {
-- 	    code1 = code2 = 0;
-  	    do {
-! 	      code1 += code3 = getBlackCode();
-  	    } while (code3 >= 64);
-  	    do {
-! 	      code2 += code3 = getWhiteCode();
-  	    } while (code3 >= 64);
-  	  }
-! 	  if (code1 > 0 || code2 > 0) {
-! 	    if (a0New + code1 <= columns) {
-! 	      codingLine[a0 + 1] = a0New + code1;
-! 	    } else {
-! 	      codingLine[a0 + 1] = columns;
-! 	    }
-! 	    ++a0;
-! 	    if (codingLine[a0] + code2 <= columns) {
-! 	      codingLine[a0 + 1] = codingLine[a0] + code2;
-! 	    } else {
-! 	      codingLine[a0 + 1] = columns;
-! 	    }
-! 	    ++a0;
-! 	    a0New = codingLine[a0];
-! 	    while (refLine[b1] <= a0New && refLine[b1] < columns) {
-! 	      b1 += 2;
-  	    }
-  	  }
-  	  break;
-! 	case twoDimVert0:
-! 	  if (refLine[b1] < columns) {
-! 	    a0New = codingLine[++a0] = refLine[b1];
-! 	    ++b1;
-! 	    while (refLine[b1] <= a0New && refLine[b1] < columns) {
-! 	      b1 += 2;
-  	    }
-- 	  } else {
-- 	    a0New = codingLine[++a0] = columns;
-  	  }
-  	  break;
-  	case twoDimVertR1:
-! 	  if (refLine[b1] + 1 < columns) {
-! 	    a0New = codingLine[++a0] = refLine[b1] + 1;
-! 	    ++b1;
-! 	    while (refLine[b1] <= a0New && refLine[b1] < columns) {
-! 	      b1 += 2;
-  	    }
-- 	  } else {
-- 	    a0New = codingLine[++a0] = columns;
-  	  }
-  	  break;
-! 	case twoDimVertL1:
-! 	  if (refLine[b1] - 1 > a0New || (a0 == 0 && refLine[b1] == 1)) {
-! 	    a0New = codingLine[++a0] = refLine[b1] - 1;
-! 	    --b1;
-! 	    while (refLine[b1] <= a0New && refLine[b1] < columns) {
-! 	      b1 += 2;
-  	    }
-  	  }
-  	  break;
-! 	case twoDimVertR2:
-! 	  if (refLine[b1] + 2 < columns) {
-! 	    a0New = codingLine[++a0] = refLine[b1] + 2;
-! 	    ++b1;
-! 	    while (refLine[b1] <= a0New && refLine[b1] < columns) {
-! 	      b1 += 2;
-  	    }
-- 	  } else {
-- 	    a0New = codingLine[++a0] = columns;
-  	  }
-  	  break;
-  	case twoDimVertL2:
-! 	  if (refLine[b1] - 2 > a0New || (a0 == 0 && refLine[b1] == 2)) {
-! 	    a0New = codingLine[++a0] = refLine[b1] - 2;
-! 	    --b1;
-! 	    while (refLine[b1] <= a0New && refLine[b1] < columns) {
-! 	      b1 += 2;
-  	    }
-! 	  }
-! 	  break;
-! 	case twoDimVertR3:
-! 	  if (refLine[b1] + 3 < columns) {
-! 	    a0New = codingLine[++a0] = refLine[b1] + 3;
-! 	    ++b1;
-! 	    while (refLine[b1] <= a0New && refLine[b1] < columns) {
-! 	      b1 += 2;
-  	    }
-- 	  } else {
-- 	    a0New = codingLine[++a0] = columns;
-  	  }
-  	  break;
-! 	case twoDimVertL3:
-! 	  if (refLine[b1] - 3 > a0New || (a0 == 0 && refLine[b1] == 3)) {
-! 	    a0New = codingLine[++a0] = refLine[b1] - 3;
-! 	    --b1;
-! 	    while (refLine[b1] <= a0New && refLine[b1] < columns) {
-! 	      b1 += 2;
-  	    }
-  	  }
-  	  break;
-  	case EOF:
-  	  eof = gTrue;
-! 	  codingLine[a0 = 0] = columns;
-! 	  return EOF;
-  	default:
-  	  error(getPos(), "Bad 2D code %04x in CCITTFax stream", code1);
-  	  err = gTrue;
-  	  break;
-  	}
-!       } while (codingLine[a0] < columns);
-  
-      // 1-D encoding
-      } else {
-!       codingLine[a0 = 0] = 0;
-!       while (1) {
-  	code1 = 0;
-! 	do {
-! 	  code1 += code3 = getWhiteCode();
-! 	} while (code3 >= 64);
-! 	codingLine[a0+1] = codingLine[a0] + code1;
-! 	++a0;
-! 	if (codingLine[a0] >= columns) {
-! 	  break;
-! 	}
-! 	code2 = 0;
-! 	do {
-! 	  code2 += code3 = getBlackCode();
-! 	} while (code3 >= 64);
-! 	codingLine[a0+1] = codingLine[a0] + code2;
-! 	++a0;
-! 	if (codingLine[a0] >= columns) {
-! 	  break;
-  	}
-        }
-      }
-  
--     if (codingLine[a0] != columns) {
--       error(getPos(), "CCITTFax row is wrong length (%d)", codingLine[a0]);
--       // force the row to be the correct length
--       while (codingLine[a0] > columns) {
-- 	--a0;
--       }
--       codingLine[++a0] = columns;
--       err = gTrue;
--     }
-- 
-      // byte-align the row
-      if (byteAlign) {
-        inputBits &= ~7;
---- 1300,1529 ----
-    }
-  }
-  
-+ inline void CCITTFaxStream::addPixels(int a1, int blackPixels) {
-+   if (a1 > codingLine[a0i]) {
-+     if (a1 > columns) {
-+       error(getPos(), "CCITTFax row is wrong length (%d)", a1);
-+       err = gTrue;
-+       a1 = columns;
-+     }
-+     if ((a0i & 1) ^ blackPixels) {
-+       ++a0i;
-+     }
-+     codingLine[a0i] = a1;
-+   }
-+ }
-+ 
-+ inline void CCITTFaxStream::addPixelsNeg(int a1, int blackPixels) {
-+   if (a1 > codingLine[a0i]) {
-+     if (a1 > columns) {
-+       error(getPos(), "CCITTFax row is wrong length (%d)", a1);
-+       err = gTrue;
-+       a1 = columns;
-+     }
-+     if ((a0i & 1) ^ blackPixels) {
-+       ++a0i;
-+     }
-+     codingLine[a0i] = a1;
-+   } else if (a1 < codingLine[a0i]) {
-+     if (a1 < 0) {
-+       error(getPos(), "Invalid CCITTFax code");
-+       err = gTrue;
-+       a1 = 0;
-+     }
-+     while (a0i > 0 && a1 <= codingLine[a0i - 1]) {
-+       --a0i;
-+     }
-+     codingLine[a0i] = a1;
-+   }
-+ }
-+ 
-  int CCITTFaxStream::lookChar() {
-    short code1, code2, code3;
-!   int b1i, blackPixels, i, bits;
-!   GBool gotEOL;
-  
-!   if (buf != EOF) {
-!     return buf;
-    }
-  
-    // read the next row
-!   if (outputBits == 0) {
-! 
-!     // if at eof just return EOF
-!     if (eof) {
-!       return EOF;
-!     }
-! 
-!     err = gFalse;
-  
-      // 2-D encoding
-      if (nextLine2D) {
-        for (i = 0; codingLine[i] < columns; ++i) {
-  	refLine[i] = codingLine[i];
-        }
-!       refLine[i++] = columns;
-!       refLine[i] = columns;
-!       codingLine[0] = 0;
-!       a0i = 0;
-!       b1i = 0;
-!       blackPixels = 0;
-!       // invariant:
-!       // refLine[b1i-1] <= codingLine[a0i] < refLine[b1i] < refLine[b1i+1]
-!       //                                                             <= columns
-!       // exception at left edge:
-!       //   codingLine[a0i = 0] = refLine[b1i = 0] = 0 is possible
-!       // exception@right edge:
-!       //   refLine[b1i] = refLine[b1i+1] = columns is possible
-!       while (codingLine[a0i] < columns) {
-  	code1 = getTwoDimCode();
-  	switch (code1) {
-  	case twoDimPass:
-! 	  addPixels(refLine[b1i + 1], blackPixels);
-! 	  if (refLine[b1i + 1] < columns) {
-! 	    b1i += 2;
-  	  }
-  	  break;
-  	case twoDimHoriz:
-! 	  code1 = code2 = 0;
-! 	  if (blackPixels) {
-  	    do {
-! 	      code1 += code3 = getBlackCode();
-  	    } while (code3 >= 64);
-  	    do {
-! 	      code2 += code3 = getWhiteCode();
-  	    } while (code3 >= 64);
-  	  } else {
-  	    do {
-! 	      code1 += code3 = getWhiteCode();
-  	    } while (code3 >= 64);
-  	    do {
-! 	      code2 += code3 = getBlackCode();
-  	    } while (code3 >= 64);
-  	  }
-! 	  addPixels(codingLine[a0i] + code1, blackPixels);
-! 	  if (codingLine[a0i] < columns) {
-! 	    addPixels(codingLine[a0i] + code2, blackPixels ^ 1);
-! 	  }
-! 	  while (refLine[b1i] <= codingLine[a0i] && refLine[b1i] < columns) {
-! 	    b1i += 2;
-! 	  }
-! 	  break;
-! 	case twoDimVertR3:
-! 	  addPixels(refLine[b1i] + 3, blackPixels);
-! 	  blackPixels ^= 1;
-! 	  if (codingLine[a0i] < columns) {
-! 	    ++b1i;
-! 	    while (refLine[b1i] <= codingLine[a0i] && refLine[b1i] < columns) {
-! 	      b1i += 2;
-  	    }
-  	  }
-  	  break;
-! 	case twoDimVertR2:
-! 	  addPixels(refLine[b1i] + 2, blackPixels);
-! 	  blackPixels ^= 1;
-! 	  if (codingLine[a0i] < columns) {
-! 	    ++b1i;
-! 	    while (refLine[b1i] <= codingLine[a0i] && refLine[b1i] < columns) {
-! 	      b1i += 2;
-  	    }
-  	  }
-  	  break;
-  	case twoDimVertR1:
-! 	  addPixels(refLine[b1i] + 1, blackPixels);
-! 	  blackPixels ^= 1;
-! 	  if (codingLine[a0i] < columns) {
-! 	    ++b1i;
-! 	    while (refLine[b1i] <= codingLine[a0i] && refLine[b1i] < columns) {
-! 	      b1i += 2;
-  	    }
-  	  }
-  	  break;
-! 	case twoDimVert0:
-! 	  addPixels(refLine[b1i], blackPixels);
-! 	  blackPixels ^= 1;
-! 	  if (codingLine[a0i] < columns) {
-! 	    ++b1i;
-! 	    while (refLine[b1i] <= codingLine[a0i] && refLine[b1i] < columns) {
-! 	      b1i += 2;
-  	    }
-  	  }
-  	  break;
-! 	case twoDimVertL3:
-! 	  addPixelsNeg(refLine[b1i] - 3, blackPixels);
-! 	  blackPixels ^= 1;
-! 	  if (codingLine[a0i] < columns) {
-! 	    if (b1i > 0) {
-! 	      --b1i;
-! 	    } else {
-! 	      ++b1i;
-! 	    }
-! 	    while (refLine[b1i] <= codingLine[a0i] && refLine[b1i] < columns) {
-! 	      b1i += 2;
-  	    }
-  	  }
-  	  break;
-  	case twoDimVertL2:
-! 	  addPixelsNeg(refLine[b1i] - 2, blackPixels);
-! 	  blackPixels ^= 1;
-! 	  if (codingLine[a0i] < columns) {
-! 	    if (b1i > 0) {
-! 	      --b1i;
-! 	    } else {
-! 	      ++b1i;
-  	    }
-! 	    while (refLine[b1i] <= codingLine[a0i] && refLine[b1i] < columns) {
-! 	      b1i += 2;
-  	    }
-  	  }
-  	  break;
-! 	case twoDimVertL1:
-! 	  addPixelsNeg(refLine[b1i] - 1, blackPixels);
-! 	  blackPixels ^= 1;
-! 	  if (codingLine[a0i] < columns) {
-! 	    if (b1i > 0) {
-! 	      --b1i;
-! 	    } else {
-! 	      ++b1i;
-! 	    }
-! 	    while (refLine[b1i] <= codingLine[a0i] && refLine[b1i] < columns) {
-! 	      b1i += 2;
-  	    }
-  	  }
-  	  break;
-  	case EOF:
-+ 	  addPixels(columns, 0);
-  	  eof = gTrue;
-! 	  break;
-  	default:
-  	  error(getPos(), "Bad 2D code %04x in CCITTFax stream", code1);
-+ 	  addPixels(columns, 0);
-  	  err = gTrue;
-  	  break;
-  	}
-!       }
-  
-      // 1-D encoding
-      } else {
-!       codingLine[0] = 0;
-!       a0i = 0;
-!       blackPixels = 0;
-!       while (codingLine[a0i] < columns) {
-  	code1 = 0;
-! 	if (blackPixels) {
-! 	  do {
-! 	    code1 += code3 = getBlackCode();
-! 	  } while (code3 >= 64);
-! 	} else {
-! 	  do {
-! 	    code1 += code3 = getWhiteCode();
-! 	  } while (code3 >= 64);
-  	}
-+ 	addPixels(codingLine[a0i] + code1, blackPixels);
-+ 	blackPixels ^= 1;
-        }
-      }
-  
-      // byte-align the row
-      if (byteAlign) {
-        inputBits &= ~7;
-***************
-*** 1560,1573 ****
-      // this if we know the stream contains end-of-line markers because
-      // the "just plow on" technique tends to work better otherwise
-      } else if (err && endOfLine) {
-!       do {
-  	if (code1 == EOF) {
-  	  eof = gTrue;
-  	  return EOF;
-  	}
-  	eatBits(1);
-! 	code1 = lookBits(13);
-!       } while ((code1 >> 1) != 0x001);
-        eatBits(12); 
-        if (encoding > 0) {
-  	eatBits(1);
---- 1582,1598 ----
-      // this if we know the stream contains end-of-line markers because
-      // the "just plow on" technique tends to work better otherwise
-      } else if (err && endOfLine) {
-!       while (1) {
-! 	code1 = lookBits(13);
-  	if (code1 == EOF) {
-  	  eof = gTrue;
-  	  return EOF;
-  	}
-+ 	if ((code1 >> 1) == 0x001) {
-+ 	  break;
-+ 	}
-  	eatBits(1);
-!       }
-        eatBits(12); 
-        if (encoding > 0) {
-  	eatBits(1);
-***************
-*** 1575,1585 ****
-        }
-      }
-  
-!     a0 = 0;
-!     outputBits = codingLine[1] - codingLine[0];
-!     if (outputBits == 0) {
-!       a0 = 1;
-!       outputBits = codingLine[2] - codingLine[1];
-      }
-  
-      ++row;
---- 1600,1610 ----
-        }
-      }
-  
-!     // set up for output
-!     if (codingLine[0] > 0) {
-!       outputBits = codingLine[a0i = 0];
-!     } else {
-!       outputBits = codingLine[a0i = 1];
-      }
-  
-      ++row;
-***************
-*** 1587,1625 ****
-  
-    // get a byte
-    if (outputBits >= 8) {
-!     ret = ((a0 & 1) == 0) ? 0xff : 0x00;
-!     if ((outputBits -= 8) == 0) {
-!       ++a0;
-!       if (codingLine[a0] < columns) {
-! 	outputBits = codingLine[a0 + 1] - codingLine[a0];
-!       }
-      }
-    } else {
-      bits = 8;
-!     ret = 0;
-      do {
-        if (outputBits > bits) {
-! 	i = bits;
-! 	bits = 0;
-! 	if ((a0 & 1) == 0) {
-! 	  ret |= 0xff >> (8 - i);
-  	}
-! 	outputBits -= i;
-        } else {
-! 	i = outputBits;
-! 	bits -= outputBits;
-! 	if ((a0 & 1) == 0) {
-! 	  ret |= (0xff >> (8 - i)) << bits;
-  	}
-  	outputBits = 0;
-! 	++a0;
-! 	if (codingLine[a0] < columns) {
-! 	  outputBits = codingLine[a0 + 1] - codingLine[a0];
-  	}
-        }
-!     } while (bits > 0 && codingLine[a0] < columns);
-    }
--   buf = black ? (ret ^ 0xff) : ret;
-    return buf;
-  }
-  
---- 1612,1654 ----
-  
-    // get a byte
-    if (outputBits >= 8) {
-!     buf = (a0i & 1) ? 0x00 : 0xff;
-!     outputBits -= 8;
-!     if (outputBits == 0 && codingLine[a0i] < columns) {
-!       ++a0i;
-!       outputBits = codingLine[a0i] - codingLine[a0i - 1];
-      }
-    } else {
-      bits = 8;
-!     buf = 0;
-      do {
-        if (outputBits > bits) {
-! 	buf <<= bits;
-! 	if (!(a0i & 1)) {
-! 	  buf |= 0xff >> (8 - bits);
-  	}
-! 	outputBits -= bits;
-! 	bits = 0;
-        } else {
-! 	buf <<= outputBits;
-! 	if (!(a0i & 1)) {
-! 	  buf |= 0xff >> (8 - outputBits);
-  	}
-+ 	bits -= outputBits;
-  	outputBits = 0;
-! 	if (codingLine[a0i] < columns) {
-! 	  ++a0i;
-! 	  outputBits = codingLine[a0i] - codingLine[a0i - 1];
-! 	} else if (bits > 0) {
-! 	  buf <<= bits;
-! 	  bits = 0;
-  	}
-        }
-!     } while (bits);
-!   }
-!   if (black) {
-!     buf ^= 0xff;
-    }
-    return buf;
-  }
-  
-***************
-*** 1661,1666 ****
---- 1690,1698 ----
-    code = 0; // make gcc happy
-    if (endOfBlock) {
-      code = lookBits(12);
-+     if (code == EOF) {
-+       return 1;
-+     }
-      if ((code >> 5) == 0) {
-        p = &whiteTab1[code];
-      } else {
-***************
-*** 1673,1678 ****
---- 1705,1713 ----
-    } else {
-      for (n = 1; n <= 9; ++n) {
-        code = lookBits(n);
-+       if (code == EOF) {
-+ 	return 1;
-+       }
-        if (n < 9) {
-  	code <<= 9 - n;
-        }
-***************
-*** 1684,1689 ****
---- 1719,1727 ----
-      }
-      for (n = 11; n <= 12; ++n) {
-        code = lookBits(n);
-+       if (code == EOF) {
-+ 	return 1;
-+       }
-        if (n < 12) {
-  	code <<= 12 - n;
-        }
-***************
-*** 1709,1717 ****
-    code = 0; // make gcc happy
-    if (endOfBlock) {
-      code = lookBits(13);
-      if ((code >> 7) == 0) {
-        p = &blackTab1[code];
-!     } else if ((code >> 9) == 0) {
-        p = &blackTab2[(code >> 1) - 64];
-      } else {
-        p = &blackTab3[code >> 7];
---- 1747,1758 ----
-    code = 0; // make gcc happy
-    if (endOfBlock) {
-      code = lookBits(13);
-+     if (code == EOF) {
-+       return 1;
-+     }
-      if ((code >> 7) == 0) {
-        p = &blackTab1[code];
-!     } else if ((code >> 9) == 0 && (code >> 7) != 0) {
-        p = &blackTab2[(code >> 1) - 64];
-      } else {
-        p = &blackTab3[code >> 7];
-***************
-*** 1723,1728 ****
---- 1764,1772 ----
-    } else {
-      for (n = 2; n <= 6; ++n) {
-        code = lookBits(n);
-+       if (code == EOF) {
-+ 	return 1;
-+       }
-        if (n < 6) {
-  	code <<= 6 - n;
-        }
-***************
-*** 1734,1739 ****
---- 1778,1786 ----
-      }
-      for (n = 7; n <= 12; ++n) {
-        code = lookBits(n);
-+       if (code == EOF) {
-+ 	return 1;
-+       }
-        if (n < 12) {
-  	code <<= 12 - n;
-        }
-***************
-*** 1747,1752 ****
---- 1794,1802 ----
-      }
-      for (n = 10; n <= 13; ++n) {
-        code = lookBits(n);
-+       if (code == EOF) {
-+ 	return 1;
-+       }
-        if (n < 13) {
-  	code <<= 13 - n;
-        }
-***************
-*** 1961,1966 ****
---- 2011,2022 ----
-      // allocate a buffer for the whole image
-      bufWidth = ((width + mcuWidth - 1) / mcuWidth) * mcuWidth;
-      bufHeight = ((height + mcuHeight - 1) / mcuHeight) * mcuHeight;
-+     if (bufWidth <= 0 || bufHeight <= 0 ||
-+ 	bufWidth > INT_MAX / bufWidth / (int)sizeof(int)) {
-+       error(getPos(), "Invalid image size in DCT stream");
-+       y = height;
-+       return;
-+     }
-      for (i = 0; i < numComps; ++i) {
-        frameBuf[i] = (int *)gmallocn(bufWidth * bufHeight, sizeof(int));
-        memset(frameBuf[i], 0, bufWidth * bufHeight * sizeof(int));
-***************
-*** 3036,3041 ****
---- 3092,3102 ----
-    }
-    scanInfo.firstCoeff = str->getChar();
-    scanInfo.lastCoeff = str->getChar();
-+   if (scanInfo.firstCoeff < 0 || scanInfo.lastCoeff > 63 ||
-+       scanInfo.firstCoeff > scanInfo.lastCoeff) {
-+     error(getPos(), "Bad DCT coefficient numbers in scan info block");
-+     return gFalse;
-+   }
-    c = str->getChar();
-    scanInfo.ah = (c >> 4) & 0x0f;
-    scanInfo.al = c & 0x0f;
-diff -c -r xpdf-3.02pl1.orig/xpdf/Stream.h xpdf-3.02/xpdf/Stream.h
-*** xpdf-3.02pl1.orig/xpdf/Stream.h	Tue Feb 27 14:05:52 2007
---- xpdf-3.02/xpdf/Stream.h	Thu Oct 25 15:48:15 2007
-***************
-*** 528,540 ****
-    int row;			// current row
-    int inputBuf;			// input buffer
-    int inputBits;		// number of bits in input buffer
-!   short *refLine;		// reference line changing elements
-!   int b1;			// index into refLine
-!   short *codingLine;		// coding line changing elements
-!   int a0;			// index into codingLine
-    int outputBits;		// remaining ouput bits
-    int buf;			// character buffer
-  
-    short getTwoDimCode();
-    short getWhiteCode();
-    short getBlackCode();
---- 528,542 ----
-    int row;			// current row
-    int inputBuf;			// input buffer
-    int inputBits;		// number of bits in input buffer
-!   int *codingLine;		// coding line changing elements
-!   int *refLine;			// reference line changing elements
-!   int a0i;			// index into codingLine
-!   GBool err;			// error on current line
-    int outputBits;		// remaining ouput bits
-    int buf;			// character buffer
-  
-+   void addPixels(int a1, int black);
-+   void addPixelsNeg(int a1, int black);
-    short getTwoDimCode();
-    short getWhiteCode();
-    short getBlackCode();
diff --git a/package/xpdf/xpdf.mk b/package/xpdf/xpdf.mk
deleted file mode 100644
index 6bbfed6..0000000
--- a/package/xpdf/xpdf.mk
+++ /dev/null
@@ -1,31 +0,0 @@
-#############################################################
-#
-# xpdf
-#
-#############################################################
-XPDF_VERSION = 3.02
-XPDF_SOURCE = xpdf-$(XPDF_VERSION).tar.gz
-XPDF_SITE = ftp://ftp.foolabs.com/pub/xpdf
-XPDF_AUTORECONF = NO
-XPDF_INSTALL_STAGING = NO
-XPDF_INSTALL_TARGET = YES
-XPDF_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) install
-
-XPDF_CONF_OPT = --enable-multithreaded
-
-ifeq ($(BR2_SOFT_FLOAT),y)
-	XPDF_CONF_OPT += --enable-fixedpoint
-endif
-
-ifeq ($(BR2_PACKAGE_XORG7),y)
-	XPDF_DEPENDENCIES += xserver_xorg-server openmotif
-	XPDF_CONF_OPT += --with-Xm-library=$(STAGING_DIR)/usr/lib --with-Xm-includes=$(STAGING_DIR)/usr/include/Xm \
-					--with-x --with-freetype2-includes=$(STAGING_DIR)/usr/include \
-					--with-freetype2-library=$(STAGING_DIR)/usr/lib CFLAGS="-I$(STAGING_DIR)/usr/include/freetype2" \
-					CXXFLAGS="-I$(STAGING_DIR)/usr/include/freetype2"
-endif
-
-XPDF_DEPENDENCIES = freetype
-
-$(eval $(call AUTOTARGETS,package,xpdf))
-
-- 
1.6.3.3

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [Buildroot] [PATCH 05/10] libgtk2: host version needs host-libpng
  2010-02-24 21:16 [Buildroot] [pull request] Pull request for branch fixes Thomas Petazzoni
                   ` (3 preceding siblings ...)
  2010-02-24 21:16 ` [Buildroot] [PATCH 04/10] xpdf: " Thomas Petazzoni
@ 2010-02-24 21:16 ` Thomas Petazzoni
  2010-02-24 21:16 ` [Buildroot] [PATCH 06/10] pango: remove gtk-doc patch Thomas Petazzoni
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 14+ messages in thread
From: Thomas Petazzoni @ 2010-02-24 21:16 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/libgtk2/libgtk2.mk |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/package/libgtk2/libgtk2.mk b/package/libgtk2/libgtk2.mk
index cc62c73..1e732d0 100644
--- a/package/libgtk2/libgtk2.mk
+++ b/package/libgtk2/libgtk2.mk
@@ -126,7 +126,7 @@ endif
 # gtk-update-icon-cache, which are the host tools needed to build Gtk
 # for the target.
 
-HOST_LIBGTK2_DEPENDENCIES = host-libglib2
+HOST_LIBGTK2_DEPENDENCIES = host-libglib2 host-libpng
 HOST_LIBGTK2_AUTORECONF = YES
 HOST_LIBGTK2_CONF_OPT = \
 		--disable-static \
-- 
1.6.3.3

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [Buildroot] [PATCH 06/10] pango: remove gtk-doc patch
  2010-02-24 21:16 [Buildroot] [pull request] Pull request for branch fixes Thomas Petazzoni
                   ` (4 preceding siblings ...)
  2010-02-24 21:16 ` [Buildroot] [PATCH 05/10] libgtk2: host version needs host-libpng Thomas Petazzoni
@ 2010-02-24 21:16 ` Thomas Petazzoni
  2010-02-24 21:16 ` [Buildroot] [PATCH 07/10] pango: re-enable thai module Thomas Petazzoni
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 14+ messages in thread
From: Thomas Petazzoni @ 2010-02-24 21:16 UTC (permalink / raw)
  To: buildroot

The gtk-doc.m4 file is now installed globally (see the automake
package), so there's no point in including a pango-specific patch.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/pango/pango-gtk-doc.patch |   59 -------------------------------------
 1 files changed, 0 insertions(+), 59 deletions(-)
 delete mode 100644 package/pango/pango-gtk-doc.patch

diff --git a/package/pango/pango-gtk-doc.patch b/package/pango/pango-gtk-doc.patch
deleted file mode 100644
index bee5fe6..0000000
--- a/package/pango/pango-gtk-doc.patch
+++ /dev/null
@@ -1,59 +0,0 @@
---- pango/acinclude.m4.old	2004-05-08 11:31:48.000000000 +0100
-+++ pango/acinclude.m4	2004-05-08 11:31:58.000000000 +0100
-@@ -55,3 +55,56 @@
- ])
- 
- 
-+dnl -*- mode: autoconf -*-
-+
-+# serial 1
-+
-+dnl Usage:
-+dnl   GTK_DOC_CHECK([minimum-gtk-doc-version])
-+AC_DEFUN([GTK_DOC_CHECK],
-+[
-+  AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
-+  AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
-+  dnl for overriding the documentation installation directory
-+  AC_ARG_WITH(html-dir,
-+    AC_HELP_STRING([--with-html-dir=PATH], [path to installed docs]),,
-+    [with_html_dir='${datadir}/gtk-doc/html'])
-+  HTML_DIR="$with_html_dir"
-+  AC_SUBST(HTML_DIR)
-+
-+  dnl enable/disable documentation building
-+  AC_ARG_ENABLE(gtk-doc,
-+    AC_HELP_STRING([--enable-gtk-doc],
-+                   [use gtk-doc to build documentation [default=no]]),,
-+    enable_gtk_doc=no)
-+
-+  have_gtk_doc=no
-+  if test -z "$PKG_CONFIG"; then
-+    AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
-+  fi
-+  if test "$PKG_CONFIG" != "no" && $PKG_CONFIG --exists gtk-doc; then
-+    have_gtk_doc=yes
-+  fi
-+
-+  dnl do we want to do a version check?
-+ifelse([$1],[],,
-+  [gtk_doc_min_version=$1
-+  if test "$have_gtk_doc" = yes; then
-+    AC_MSG_CHECKING([gtk-doc version >= $gtk_doc_min_version])
-+    if $PKG_CONFIG --atleast-version $gtk_doc_min_version gtk-doc; then
-+      AC_MSG_RESULT(yes)
-+    else
-+      AC_MSG_RESULT(no)
-+      have_gtk_doc=no
-+    fi
-+  fi
-+])
-+  if test x$enable_gtk_doc = xyes; then
-+    if test "$have_gtk_doc" != yes; then
-+      enable_gtk_doc=no
-+    fi
-+  fi
-+
-+  AM_CONDITIONAL(ENABLE_GTK_DOC, test x$enable_gtk_doc = xyes)
-+  AM_CONDITIONAL(GTK_DOC_USE_LIBTOOL, test -n "$LIBTOOL")
-+])
-- 
1.6.3.3

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [Buildroot] [PATCH 07/10] pango: re-enable thai module
  2010-02-24 21:16 [Buildroot] [pull request] Pull request for branch fixes Thomas Petazzoni
                   ` (5 preceding siblings ...)
  2010-02-24 21:16 ` [Buildroot] [PATCH 06/10] pango: remove gtk-doc patch Thomas Petazzoni
@ 2010-02-24 21:16 ` Thomas Petazzoni
  2010-02-24 21:16 ` [Buildroot] [PATCH 08/10] pango: remove dependency on host-pango Thomas Petazzoni
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 14+ messages in thread
From: Thomas Petazzoni @ 2010-02-24 21:16 UTC (permalink / raw)
  To: buildroot

This module got disabled when pango was upgraded to 1.19.3. But now,
the module builds fine. And even more: disabling it breaks the build
when modules are compiled statically into pango.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/pango/pango-no-libthai.patch |   10 ----------
 1 files changed, 0 insertions(+), 10 deletions(-)
 delete mode 100644 package/pango/pango-no-libthai.patch

diff --git a/package/pango/pango-no-libthai.patch b/package/pango/pango-no-libthai.patch
deleted file mode 100644
index 78a3baf..0000000
--- a/package/pango/pango-no-libthai.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/modules/Makefile.am	2007-07-05 17:30:28.000000000 -0400
-+++ b/modules/Makefile.am	2008-02-09 19:37:13.000000000 -0500
-@@ -8,7 +8,6 @@ SUBDIRS = 		\
- 	indic           \
- 	khmer		\
- 	syriac		\
--	thai		\
- 	tibetan
- 
- EXTRA_DIST =		\
-- 
1.6.3.3

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [Buildroot] [PATCH 08/10] pango: remove dependency on host-pango
  2010-02-24 21:16 [Buildroot] [pull request] Pull request for branch fixes Thomas Petazzoni
                   ` (6 preceding siblings ...)
  2010-02-24 21:16 ` [Buildroot] [PATCH 07/10] pango: re-enable thai module Thomas Petazzoni
@ 2010-02-24 21:16 ` Thomas Petazzoni
  2010-02-24 21:16 ` [Buildroot] [PATCH 09/10] sylpheed: add dependency on libgtk2 Thomas Petazzoni
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 14+ messages in thread
From: Thomas Petazzoni @ 2010-02-24 21:16 UTC (permalink / raw)
  To: buildroot

Pango was depending on host-pango because of the pango-querymodules
utility. Compiling pango for the host is a mess because it depends on
Cairo, which itself depends on X.org.

Therefore, we remove the dependency of pango on pango-querymodules by
using statically compiled rendering libraries instead of modules. For
the moment, all rendering libraries are included, but we could imagine
adding more configuration options in the future.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/pango/pango.mk |   13 +++----------
 1 files changed, 3 insertions(+), 10 deletions(-)

diff --git a/package/pango/pango.mk b/package/pango/pango.mk
index 38e163e..08f6610 100644
--- a/package/pango/pango.mk
+++ b/package/pango/pango.mk
@@ -38,14 +38,15 @@ PANGO_CONF_ENV = ac_cv_func_posix_getpwuid_r=yes glib_cv_stack_grows=no \
 		ac_cv_path_FREETYPE_CONFIG=$(STAGING_DIR)/usr/bin/freetype-config
 
 PANGO_CONF_OPT = --enable-shared --enable-static \
-		--enable-explicit-deps=no --disable-debug
+		--enable-explicit-deps=no --disable-debug \
+		--without-dynamic-modules --with-included-modules=yes
 
 HOST_PANGO_CONF_OPT = \
 		--disable-static \
 		$(if $(BR2_PACKAGE_XORG7),--with-x,--without-x) \
 		--disable-debug \
 
-PANGO_DEPENDENCIES = gettext libintl host-pkg-config host-pango libglib2 cairo
+PANGO_DEPENDENCIES = gettext libintl host-pkg-config libglib2 cairo
 
 HOST_PANGO_DEPENDENCIES = host-pkg-config host-cairo host-libglib2 host-autoconf host-automake
 
@@ -62,11 +63,3 @@ endif
 
 $(eval $(call AUTOTARGETS,package,pango))
 $(eval $(call AUTOTARGETS,package,pango,host))
-
-$(PANGO_HOOK_POST_INSTALL):
-	mkdir -p $(TARGET_DIR)/etc/pango
-	$(PANGO_HOST_BINARY) > $(TARGET_DIR)/etc/pango/pango.modules
-	$(SED) 's~$(HOST_DIR)~~g' $(TARGET_DIR)/etc/pango/pango.modules
-	touch $@
-
-PANGO_HOST_BINARY:=$(HOST_DIR)/usr/bin/pango-querymodules
-- 
1.6.3.3

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [Buildroot] [PATCH 09/10] sylpheed: add dependency on libgtk2
  2010-02-24 21:16 [Buildroot] [pull request] Pull request for branch fixes Thomas Petazzoni
                   ` (7 preceding siblings ...)
  2010-02-24 21:16 ` [Buildroot] [PATCH 08/10] pango: remove dependency on host-pango Thomas Petazzoni
@ 2010-02-24 21:16 ` Thomas Petazzoni
  2010-02-24 21:16 ` [Buildroot] [PATCH 10/10] madplay: add patch to switch to the new ALSA API Thomas Petazzoni
  2010-02-24 22:01 ` [Buildroot] [pull request] Pull request for branch fixes Peter Korsgaard
  10 siblings, 0 replies; 14+ messages in thread
From: Thomas Petazzoni @ 2010-02-24 21:16 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/sylpheed/Config.in   |    1 +
 package/sylpheed/sylpheed.mk |    2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/package/sylpheed/Config.in b/package/sylpheed/Config.in
index 2c4aa3a..fe5aee6 100644
--- a/package/sylpheed/Config.in
+++ b/package/sylpheed/Config.in
@@ -1,5 +1,6 @@
 config BR2_PACKAGE_SYLPHEED
 	bool "sylpheed"
+	select BR2_PACKAGE_LIBGTK2
 	help
 	  lightweight and user-friendly e-mail client.
 
diff --git a/package/sylpheed/sylpheed.mk b/package/sylpheed/sylpheed.mk
index 96eca9c..bc2872d 100644
--- a/package/sylpheed/sylpheed.mk
+++ b/package/sylpheed/sylpheed.mk
@@ -13,7 +13,7 @@ SYLPHEED_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) install
 
 SYLPHEED_CONF_OPT = --disable-gtkspell --program-prefix=""
 
-SYLPHEED_DEPENDENCIES = host-pkg-config
+SYLPHEED_DEPENDENCIES = host-pkg-config libgtk2
 
 $(eval $(call AUTOTARGETS,package,sylpheed))
 
-- 
1.6.3.3

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [Buildroot] [PATCH 10/10] madplay: add patch to switch to the new ALSA API
  2010-02-24 21:16 [Buildroot] [pull request] Pull request for branch fixes Thomas Petazzoni
                   ` (8 preceding siblings ...)
  2010-02-24 21:16 ` [Buildroot] [PATCH 09/10] sylpheed: add dependency on libgtk2 Thomas Petazzoni
@ 2010-02-24 21:16 ` Thomas Petazzoni
  2010-02-24 22:01 ` [Buildroot] [pull request] Pull request for branch fixes Peter Korsgaard
  10 siblings, 0 replies; 14+ messages in thread
From: Thomas Petazzoni @ 2010-02-24 21:16 UTC (permalink / raw)
  To: buildroot

madplay was failing to build with errors such as :

audio_alsa.o: In function `config':
audio_alsa.c:(.text+0x200): undefined reference to `snd_pcm_hw_params_set_rate_near at ALSA_0.9'
audio_alsa.c:(.text+0x25c): undefined reference to `snd_pcm_hw_params_set_buffer_time_near at ALSA_0.9'
audio_alsa.c:(.text+0x284): undefined reference to `snd_pcm_hw_params_get_buffer_size at ALSA_0.9'
audio_alsa.c:(.text+0x2a4): undefined reference to `snd_pcm_hw_params_set_period_time_near at ALSA_0.9'
audio_alsa.c:(.text+0x2d4): undefined reference to `snd_pcm_hw_params_get_period_size at ALSA_0.9'

The ALSA library uses symbol versioning by default, to handle ABI
changes. However, since uClibc doesn't seem to support symbol
versioning, we disable this when building the ALSA library by passing
--without-versioned.

However, madplay relies on the old ALSA ABI, so even without symbol
versioning, references to versioned symbols are generated (functions
with the same name, but different API, exist in the old and new API).

The easiest solution is to switch madplay to the new API. This is done
thanks to a patch written by Micha Nelissen <micha@neli.hopto.org> and
available at http://article.gmane.org/gmane.comp.audio.mad.devel/729.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 .../madplay-0.15.2b-switch-to-new-alsa-api.patch   |  173 ++++++++++++++++++++
 1 files changed, 173 insertions(+), 0 deletions(-)
 create mode 100644 package/multimedia/madplay/madplay-0.15.2b-switch-to-new-alsa-api.patch

diff --git a/package/multimedia/madplay/madplay-0.15.2b-switch-to-new-alsa-api.patch b/package/multimedia/madplay/madplay-0.15.2b-switch-to-new-alsa-api.patch
new file mode 100644
index 0000000..60d7bd3
--- /dev/null
+++ b/package/multimedia/madplay/madplay-0.15.2b-switch-to-new-alsa-api.patch
@@ -0,0 +1,173 @@
+Switch madplay to the new API. This is done thanks to a patch written
+by Micha Nelissen <micha@neli.hopto.org> and available at
+http://article.gmane.org/gmane.comp.audio.mad.devel/729.
+
+--- madplay-0.15.2b/audio_alsa.c	2008-10-18 15:10:16.000000000 +0200
++++ madplay-0.15.2b/audio_alsa.c.new	2008-10-18 15:03:27.000000000 +0200
+@@ -28,31 +28,30 @@
+
+ #include <errno.h>
+
+-#define ALSA_PCM_OLD_HW_PARAMS_API
+-#define ALSA_PCM_OLD_SW_PARAMS_API
+ #include <alsa/asoundlib.h>
+
+ #include <mad.h>
+
+ #include "audio.h"
+
+-char *buf	= NULL;
+-int paused	= 0;
++#define BUFFER_TIME_MAX     500000
+
+-int rate	= -1;
+-int channels	= -1;
+-int bitdepth	= -1;
+-int sample_size	= -1;
+-
+-int buffer_time		= 500000;
+-int period_time		= 100000;
+-char *defaultdev	= "plughw:0,0";
++unsigned char *buf  = NULL;
++int paused	    = 0;
++
++unsigned int rate           = 0;
++unsigned int channels	    = -1;
++unsigned int bitdepth	    = -1;
++unsigned int sample_size    = -1;
++
++unsigned int buffer_time;
++unsigned int period_time;
++char *defaultdev	    = "plughw:0,0";
+
+ snd_pcm_hw_params_t *alsa_hwparams;
+ snd_pcm_sw_params_t *alsa_swparams;
+
+-snd_pcm_sframes_t buffer_size;
+-snd_pcm_sframes_t period_size;
++snd_pcm_uframes_t buffer_size;
+
+ snd_pcm_format_t  alsa_format = -1;
+ snd_pcm_access_t  alsa_access = SND_PCM_ACCESS_MMAP_INTERLEAVED;
+@@ -66,14 +65,20 @@
+ 		 snd_pcm_hw_params_t *params,
+ 		 snd_pcm_access_t access)
+ {
+-	int err, dir;
+-	
++	int err;
++
+ 	/* choose all parameters */
+ 	err = snd_pcm_hw_params_any(handle,params);
+ 	if (err < 0) {
+ 		printf("Access type not available for playback: %s\n", snd_strerror(err));
+ 		return err;
+ 	}
++	/* set the access type */
++	err = snd_pcm_hw_params_set_access(handle, params, alsa_access);
++	if (err < 0) {
++		printf("Sample format not available for playback: %s\n", snd_strerror(err));
++		return err;
++	}
+ 	/* set the sample format */
+ 	err = snd_pcm_hw_params_set_format(handle, params, alsa_format);
+ 	if (err < 0) {
+@@ -87,29 +92,38 @@
+ 		return err;
+ 	}
+ 	/* set the stream rate */
+-	err = snd_pcm_hw_params_set_rate_near(handle, params, rate, 0);
++	err = snd_pcm_hw_params_set_rate(handle, params, rate, 0);
+ 	if (err < 0) {
+ 		printf("Rate %iHz not available for playback: %s\n", rate, snd_strerror(err));
+ 		return err;
+ 	}
+-	if (err != rate) {
+-		printf("Rate doesn't match (requested %iHz, get %iHz)\n", rate, err);
+-		return -EINVAL;
+-	}
++	err = snd_pcm_hw_params_get_buffer_time_max(params, &buffer_time, NULL);
++        if (err < 0) {
++                printf("Unable to retrieve buffer time: %s\n", snd_strerror(err));
++                return err;
++        }
++        if (buffer_time > BUFFER_TIME_MAX)
++                buffer_time = BUFFER_TIME_MAX;
+ 	/* set buffer time */
+-	err = snd_pcm_hw_params_set_buffer_time_near(handle, params, buffer_time, &dir);
++	err = snd_pcm_hw_params_set_buffer_time_near(handle, params, &buffer_time, 0);
+ 	if (err < 0) {
+ 		printf("Unable to set buffer time %i for playback: %s\n", buffer_time, snd_strerror(err));
+ 		return err;
+ 	}
+-	buffer_size = snd_pcm_hw_params_get_buffer_size(params);
++        if (period_time * 4 > buffer_time)
++                period_time = buffer_time / 4;
+ 	/* set period time */
+-	err = snd_pcm_hw_params_set_period_time_near(handle, params, period_time, &dir);
++	err = snd_pcm_hw_params_set_period_time_near(handle, params, &period_time, NULL);
+ 	if (err < 0) {
+ 		printf("Unable to set period time %i for playback: %s\n", period_time, snd_strerror(err));
+ 		return err;
+ 	}
+-	period_size = snd_pcm_hw_params_get_period_size(params, &dir);
++        /* retrieve buffer size */
++	err = snd_pcm_hw_params_get_buffer_size(params, &buffer_size);
++        if (err < 0) {
++                printf("Unable to retrieve buffer size: %s\n", snd_strerror(err));
++                return err;
++        }
+ 	/* write the parameters to device */
+ 	err = snd_pcm_hw_params(handle, params);
+ 	if (err < 0) {
+@@ -123,6 +137,7 @@
+ int set_swparams(snd_pcm_t *handle,
+ 		 snd_pcm_sw_params_t *params)
+ {
++        unsigned int start_threshold;
+ 	int err;
+
+         /* get current swparams */
+@@ -136,13 +151,7 @@
+         if (err < 0) {
+                 printf("Unable to set start threshold mode for playback: %s\n", snd_strerror(err));
+                 return err;
+-										        }
+-        /* allow transfer when@least period_size samples can be processed */
+-        err = snd_pcm_sw_params_set_avail_min(handle, params, period_size);
+-        if (err < 0) {
+-                printf("Unable to set avail min for playback: %s\n", snd_strerror(err));
+-                return err;
+-												        }
++	}
+         /* align all transfers to 1 samples */
+         err = snd_pcm_sw_params_set_xfer_align(handle, params, 1);
+         if (err < 0) {
+@@ -190,7 +199,7 @@
+ 	rate		= config->speed;
+
+ 	if ( bitdepth == 0 )
+-		config->precision = bitdepth = 32;
++		config->precision = bitdepth = 16;
+
+ 	switch (bitdepth)
+ 	{
+@@ -241,7 +250,7 @@
+ 		return -1;
+ 	}
+
+-	buf = malloc(buffer_size);
++	buf = malloc(buffer_size * sample_size);
+ 	if (buf == NULL) {
+ 		audio_error="unable to allocate output buffer table";
+ 		return -1;
+@@ -279,7 +288,7 @@
+ int play(struct audio_play *play)
+ {
+ 	int err, len;
+-	char *ptr;
++	unsigned char *ptr;
+
+ 	ptr = buf;
+ 	len = play->nsamples;
+
-- 
1.6.3.3

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [Buildroot] [pull request] Pull request for branch fixes
  2010-02-24 21:16 [Buildroot] [pull request] Pull request for branch fixes Thomas Petazzoni
                   ` (9 preceding siblings ...)
  2010-02-24 21:16 ` [Buildroot] [PATCH 10/10] madplay: add patch to switch to the new ALSA API Thomas Petazzoni
@ 2010-02-24 22:01 ` Peter Korsgaard
  10 siblings, 0 replies; 14+ messages in thread
From: Peter Korsgaard @ 2010-02-24 22:01 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 Thomas> The following changes since commit 4f05a61b33e5d87f23837109fb0dd538a5bd5d62:
 Thomas>   Peter Korsgaard (1):
 Thomas>         Merge branch 'misc-fixes5' of git://git.busybox.net/~tpetazzoni/git/buildroot

 Thomas> are available in the git repository at:

 Thomas>   git://git.busybox.net/~tpetazzoni/git/buildroot fixes

Thanks! I'm not feeling confident about the pango change (as discussed
on IRC), but the rest has been pulled and pushed.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2010-02-24 22:01 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-24 21:16 [Buildroot] [pull request] Pull request for branch fixes Thomas Petazzoni
2010-02-24 21:16 ` [Buildroot] [PATCH 01/10] netsnmp: use the autoconf built by Buildroot Thomas Petazzoni
2010-02-24 21:16 ` [Buildroot] [PATCH 02/10] ipsec-tools: add host-flex dependency Thomas Petazzoni
2010-02-24 21:16 ` [Buildroot] [PATCH 03/10] openmotif: remove package Thomas Petazzoni
2010-02-24 21:16 ` [Buildroot] [PATCH 04/10] xpdf: " Thomas Petazzoni
2010-02-24 21:16 ` [Buildroot] [PATCH 05/10] libgtk2: host version needs host-libpng Thomas Petazzoni
2010-02-24 21:16 ` [Buildroot] [PATCH 06/10] pango: remove gtk-doc patch Thomas Petazzoni
2010-02-24 21:16 ` [Buildroot] [PATCH 07/10] pango: re-enable thai module Thomas Petazzoni
2010-02-24 21:16 ` [Buildroot] [PATCH 08/10] pango: remove dependency on host-pango Thomas Petazzoni
2010-02-24 21:16 ` [Buildroot] [PATCH 09/10] sylpheed: add dependency on libgtk2 Thomas Petazzoni
2010-02-24 21:16 ` [Buildroot] [PATCH 10/10] madplay: add patch to switch to the new ALSA API Thomas Petazzoni
2010-02-24 22:01 ` [Buildroot] [pull request] Pull request for branch fixes Peter Korsgaard
  -- strict thread matches above, loose matches on Subject: below --
2010-02-09 23:46 Thomas Petazzoni
2010-02-17 10:05 ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox