gcc-4.3 compile fix

This commit is contained in:
Hu Zheng 2008-02-26 09:13:06 +00:00
parent e669245c33
commit d40c236830
2 changed files with 139 additions and 1 deletions

133
zhcon-0.2.6.gcc43.patch Normal file
View File

@ -0,0 +1,133 @@
diff -u -r zhcon-0.2.5/src/basefont.cpp zhcon-0.2.5.fix/src/basefont.cpp
--- zhcon-0.2.5/src/basefont.cpp 2006-04-25 00:38:27.000000000 +0800
+++ zhcon-0.2.5.fix/src/basefont.cpp 2008-02-26 17:00:11.000000000 +0800
@@ -16,6 +16,7 @@
* *
***************************************************************************/
+#include <cstring>
#include <unistd.h>
#include <fcntl.h>
#include <sys/types.h>
diff -u -r zhcon-0.2.5/src/display/fblinear4.cpp zhcon-0.2.5.fix/src/display/fblinear4.cpp
--- zhcon-0.2.5/src/display/fblinear4.cpp 2006-04-25 00:38:23.000000000 +0800
+++ zhcon-0.2.5.fix/src/display/fblinear4.cpp 2008-02-26 16:59:08.000000000 +0800
@@ -17,6 +17,7 @@
* *
***************************************************************************/
+#include <cstring>
#include <assert.h>
#include <endian.h>
#include "global.h"
diff -u -r zhcon-0.2.5/src/display/fblinear8.cpp zhcon-0.2.5.fix/src/display/fblinear8.cpp
--- zhcon-0.2.5/src/display/fblinear8.cpp 2006-04-25 00:38:23.000000000 +0800
+++ zhcon-0.2.5.fix/src/display/fblinear8.cpp 2008-02-26 16:59:23.000000000 +0800
@@ -17,6 +17,7 @@
* *
***************************************************************************/
+#include <cstring>
#include <assert.h>
#include <endian.h>
#include "global.h"
diff -u -r zhcon-0.2.5/src/display/fbvgaplanes.cpp zhcon-0.2.5.fix/src/display/fbvgaplanes.cpp
--- zhcon-0.2.5/src/display/fbvgaplanes.cpp 2006-04-25 00:38:23.000000000 +0800
+++ zhcon-0.2.5.fix/src/display/fbvgaplanes.cpp 2008-02-26 16:59:36.000000000 +0800
@@ -19,6 +19,7 @@
#include <config.h>
#endif
+#include <cstring>
#ifdef USING_VGA
#include <assert.h>
#include <unistd.h>
diff -u -r zhcon-0.2.5/src/display/vgadev.cpp zhcon-0.2.5.fix/src/display/vgadev.cpp
--- zhcon-0.2.5/src/display/vgadev.cpp 2008-02-26 16:25:27.000000000 +0800
+++ zhcon-0.2.5.fix/src/display/vgadev.cpp 2008-02-26 16:59:57.000000000 +0800
@@ -23,6 +23,7 @@
#endif
+#include <cstring>
#ifdef USING_VGA
#if defined(linux)
diff -u -r zhcon-0.2.5/src/graphdev.cpp zhcon-0.2.5.fix/src/graphdev.cpp
--- zhcon-0.2.5/src/graphdev.cpp 2006-04-25 00:38:26.000000000 +0800
+++ zhcon-0.2.5.fix/src/graphdev.cpp 2008-02-26 17:00:19.000000000 +0800
@@ -20,6 +20,8 @@
#include <config.h>
#endif
+#include <cstring>
+#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/ioctl.h>
diff -u -r zhcon-0.2.5/src/inputclient.cpp zhcon-0.2.5.fix/src/inputclient.cpp
--- zhcon-0.2.5/src/inputclient.cpp 2006-04-25 00:38:27.000000000 +0800
+++ zhcon-0.2.5.fix/src/inputclient.cpp 2008-02-26 17:00:59.000000000 +0800
@@ -16,6 +16,7 @@
* *
***************************************************************************/
+#include <stdlib.h>
#include "inputclient.h"
Console* InputClient::mpCon = NULL;
diff -u -r zhcon-0.2.5/src/inputmanager.cpp zhcon-0.2.5.fix/src/inputmanager.cpp
--- zhcon-0.2.5/src/inputmanager.cpp 2006-05-03 01:18:39.000000000 +0800
+++ zhcon-0.2.5.fix/src/inputmanager.cpp 2008-02-26 17:00:52.000000000 +0800
@@ -21,6 +21,7 @@
using namespace std;
+#include <stdlib.h>
#include <unistd.h>
#include <sys/time.h>
#include <string>
diff -u -r zhcon-0.2.5/src/inputmanager.h zhcon-0.2.5.fix/src/inputmanager.h
--- zhcon-0.2.5/src/inputmanager.h 2006-04-25 00:38:26.000000000 +0800
+++ zhcon-0.2.5.fix/src/inputmanager.h 2008-02-26 17:01:08.000000000 +0800
@@ -24,6 +24,7 @@
*@author ejoy
*/
using namespace std;
+#include <sys/select.h>
#include <cassert>
#include <vector>
diff -u -r zhcon-0.2.5/src/window.cpp zhcon-0.2.5.fix/src/window.cpp
--- zhcon-0.2.5/src/window.cpp 2006-04-25 00:38:25.000000000 +0800
+++ zhcon-0.2.5.fix/src/window.cpp 2008-02-26 17:00:29.000000000 +0800
@@ -16,6 +16,7 @@
* *
***************************************************************************/
+#include <cstring>
#include <cassert>
#include <algorithm>
#include <sys/time.h>
diff -u -r zhcon-0.2.5/src/winime.cpp zhcon-0.2.5.fix/src/winime.cpp
--- zhcon-0.2.5/src/winime.cpp 2008-02-26 16:25:27.000000000 +0800
+++ zhcon-0.2.5.fix/src/winime.cpp 2008-02-26 17:00:35.000000000 +0800
@@ -16,6 +16,7 @@
* *
***************************************************************************/
+#include <cstring>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
diff -u -r zhcon-0.2.5/src/zhcon.cpp zhcon-0.2.5.fix/src/zhcon.cpp
--- zhcon-0.2.5/src/zhcon.cpp 2008-02-26 16:25:27.000000000 +0800
+++ zhcon-0.2.5.fix/src/zhcon.cpp 2008-02-26 17:00:44.000000000 +0800
@@ -19,6 +19,7 @@
#include <config.h>
#endif
+#include <cstring>
#include <iostream>
#include <unistd.h>
#include <cstdlib>

View File

@ -1,7 +1,7 @@
Name: zhcon
Summary: A Fast Console CJK System Using FrameBuffer
Version: 0.2.6
Release: 6%{?dist}
Release: 7%{?dist}
Group: Applications/System
License: GPL
URL: http://www.sourceforge.net/projects/%{name}/
@ -11,6 +11,7 @@ Patch1: zhcon-0.2.6-path.patch
Patch2: zhcon-0.2.6-path-define.patch
Patch3: zhcon-0.2.6-flags.patch
Patch4: zhcon-0.2.6-64bit-fix.patch
Patch5: zhcon-0.2.6.gcc43.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Buildrequires: autoconf automake
@ -34,6 +35,7 @@ zhcon是一个工作在Linux控制台下的多内码中文平台。
%patch2 -p1 -b .path_define
%patch3 -p1 -b .flags
%patch4 -p1 -b .64bit_fix
%patch5 -p1 -b .gcc43_fix
iconv -f GB2312 -t UTF-8 ChangeLog -o ChangeLog.utf && mv -f ChangeLog.utf ChangeLog
( cd doc; tar -zxf html.tar.gz; chmod 755 manual)
@ -65,6 +67,9 @@ rm -rf ${RPM_BUILD_ROOT}
%{_datadir}/%{name}/
%changelog
* Tue Feb 26 2008 Hu Zheng <zhu@redhat.com> - 0.2.6-7
- Gcc-4.3 compile fix.
* Wed Feb 20 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 0.2.6-6
- Autorebuild for GCC 4.3