Fix build with gcc-4.5.

This commit is contained in:
wiz 2011-12-19 15:52:18 +00:00
parent 4769243699
commit 89a4b2b664
21 changed files with 324 additions and 6 deletions

View file

@ -1,10 +1,29 @@
$NetBSD: distinfo,v 1.9 2007/10/14 08:14:11 rillig Exp $
$NetBSD: distinfo,v 1.10 2011/12/19 15:52:18 wiz Exp $
SHA1 (gpsim-0.21.11.tar.gz) = 05337560a6b48a9afb7a3f4be1ba606709f6b30a
RMD160 (gpsim-0.21.11.tar.gz) = 36001180948fc2394043d8283dc1dd028ee4f922
Size (gpsim-0.21.11.tar.gz) = 1218332 bytes
SHA1 (patch-aa) = 0d102952cb8dbe7faaf50416a2d9bec24683c300
SHA1 (patch-ab) = 199403ee700b145dcb44f42c258903903af20785
SHA1 (patch-ab) = 14cae18eeb413e9bc911e1fcf0213d318bf88a1a
SHA1 (patch-ac) = 1c2cf1059db73c385817199bb35672f4f2246a67
SHA1 (patch-ad) = f172ec71e2c2ef6bb798da79e1f73c063ff27d5b
SHA1 (patch-ae) = 5185e3cbea6d5e036020f1de9636907efe54c851
SHA1 (patch-cli_cmd__clear.cc) = 72f0f069692c6d9b8e6ba2abb4286a01de0d9a82
SHA1 (patch-cli_cmd__help.cc) = 90d3df16dd7c1746f68b850f8dc86a751352b9d2
SHA1 (patch-cli_cmd__list.cc) = 5f20122097f3be39b7a714b46ca0e71b6356a9b9
SHA1 (patch-cli_cmd__x.cc) = c9730d62932455dcaf99ab1db9352219a0976188
SHA1 (patch-cli_socket.cc) = 6b8b0c0e071ca6d78f943e6445bb5e2e1c4a941c
SHA1 (patch-gui_gui__regwin.cc) = 218b41e9e4a0eb9336757c842686eef3b35ea403
SHA1 (patch-gui_gui__src.cc) = 1622d9a75451230d74bc4aee907eeb7dd64f7aa2
SHA1 (patch-gui_gui__stack.cc) = badf2fbda9f2f8a1f0005dab5bde4adf814aafe4
SHA1 (patch-gui_gui__symbols.cc) = 2f36fb615029823065214a030b309ca4f36336cc
SHA1 (patch-gui_settings__exdbm.cc) = 957854ab58bde81857a2729120a710346f89ecf6
SHA1 (patch-modules_binary__indicator.cc) = a666710d4d93077c57163176428075416483719e
SHA1 (patch-src_cmd__manager.h) = 1fda88495f6c4ff8a244787f19e64558f86675e0
SHA1 (patch-src_modules.cc) = bc01b99a564051bce16c5d010635691a2b651c72
SHA1 (patch-src_operator.cc) = 303dd4744aabc3a42fa97db3d3bebc3994c80e8a
SHA1 (patch-src_processor.cc) = b77bc4710c14fd519dd5b72e0700172c9b2dc02e
SHA1 (patch-src_processor.h) = 29cd80b086f7267c7d092e22d9f5780310d8d006
SHA1 (patch-src_program__files.cc) = 25e3b4ee2e8ad91eaa54a64d7ccc2f1ff51b51a9
SHA1 (patch-src_symbol.cc) = cb84a108f2a79a1d3eb40da33cd11f3276682bc0
SHA1 (patch-src_value.cc) = 8a97172012cccb14c7b4654e4da1b60041b7733f

View file

@ -1,8 +1,16 @@
$NetBSD: patch-ab,v 1.5 2006/06/19 22:05:14 joerg Exp $
$NetBSD: patch-ab,v 1.6 2011/12/19 15:52:20 wiz Exp $
--- src/os_dependent.cc.orig 2005-08-25 21:57:41.000000000 +0000
+++ src/os_dependent.cc
@@ -37,6 +37,10 @@ Boston, MA 02111-1307, USA. */
@@ -27,6 +27,7 @@ Boston, MA 02111-1307, USA. */
#include <stdlib.h>
#include <unistd.h>
#include <string>
+#include <string.h>
#include <iostream>
#include <iomanip>
@@ -37,6 +38,10 @@ Boston, MA 02111-1307, USA. */
#include "exports.h"
#include "modules.h"
@ -13,7 +21,7 @@ $NetBSD: patch-ab,v 1.5 2006/06/19 22:05:14 joerg Exp $
#ifndef _WIN32
#include <dlfcn.h>
#define STRICMP strcasecmp
@@ -348,7 +352,9 @@ unsigned long get_error() {
@@ -348,7 +353,9 @@ unsigned long get_error() {
}
char * get_error_message() {
@ -24,7 +32,7 @@ $NetBSD: patch-ab,v 1.5 2006/06/19 22:05:14 joerg Exp $
return dlerror();
#else
return g_win32_error_message(GetLastError());
@@ -357,7 +363,7 @@ char * get_error_message() {
@@ -357,7 +364,7 @@ char * get_error_message() {
void free_error_message(char * pszError)
{

View file

@ -0,0 +1,14 @@
$NetBSD: patch-cli_cmd__clear.cc,v 1.1 2011/12/19 15:52:20 wiz Exp $
Add missing include.
--- cli/cmd_clear.cc.orig 2005-06-25 03:25:30.000000000 +0000
+++ cli/cmd_clear.cc
@@ -22,6 +22,7 @@ Boston, MA 02111-1307, USA. */
#include <iostream>
#include <iomanip>
#include <string>
+#include <typeinfo>
#include "command.h"
#include "cmd_clear.h"

View file

@ -0,0 +1,14 @@
$NetBSD: patch-cli_cmd__help.cc,v 1.1 2011/12/19 15:52:20 wiz Exp $
Add missing include.
--- cli/cmd_help.cc.orig 2005-06-25 03:25:31.000000000 +0000
+++ cli/cmd_help.cc
@@ -22,6 +22,7 @@ Boston, MA 02111-1307, USA. */
#include <iostream>
#include <iomanip>
#include <string>
+#include <string.h>
#include "command.h"
#include "cmd_help.h"

View file

@ -0,0 +1,15 @@
$NetBSD: patch-cli_cmd__list.cc,v 1.1 2011/12/19 15:52:20 wiz Exp $
Avoid conflict with C++ list<>.
--- cli/cmd_list.cc.orig 2005-05-11 13:29:01.000000000 +0000
+++ cli/cmd_list.cc
@@ -76,7 +76,7 @@ void cmd_list::list(void)
if(!have_cpu(1))
return;
- GetActiveCPU()->list(file_id,GetActiveCPU()->pc->value,starting_line,ending_line);
+ GetActiveCPU()->plist(file_id,GetActiveCPU()->pc->value,starting_line,ending_line);
}
void cmd_list::list(cmd_options *opt)

View file

@ -0,0 +1,14 @@
$NetBSD: patch-cli_cmd__x.cc,v 1.1 2011/12/19 15:52:20 wiz Exp $
Add missing include.
--- cli/cmd_x.cc.orig 2005-05-11 13:29:02.000000000 +0000
+++ cli/cmd_x.cc
@@ -22,6 +22,7 @@ Boston, MA 02111-1307, USA. */
#include <iostream>
#include <iomanip>
#include <string>
+#include <typeinfo>
#include "command.h"

View file

@ -0,0 +1,14 @@
$NetBSD: patch-cli_socket.cc,v 1.1 2011/12/19 15:52:20 wiz Exp $
Add missing include.
--- cli/socket.cc.orig 2005-02-02 01:59:04.000000000 +0000
+++ cli/socket.cc
@@ -27,6 +27,7 @@ Boston, MA 02111-1307, USA. */
#endif
#include <stdio.h>
+#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/types.h>

View file

@ -0,0 +1,14 @@
$NetBSD: patch-gui_gui__regwin.cc,v 1.1 2011/12/19 15:52:20 wiz Exp $
Add missing include.
--- gui/gui_regwin.cc.orig 2005-10-03 13:46:22.000000000 +0000
+++ gui/gui_regwin.cc
@@ -23,6 +23,7 @@ Boston, MA 02111-1307, USA. */
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
+#include <typeinfo>
#include "../config.h"
#ifdef HAVE_GUI

View file

@ -0,0 +1,14 @@
$NetBSD: patch-gui_gui__src.cc,v 1.1 2011/12/19 15:52:20 wiz Exp $
Add missing include.
--- gui/gui_src.cc.orig 2005-06-10 02:46:20.000000000 +0000
+++ gui/gui_src.cc
@@ -22,6 +22,7 @@ Boston, MA 02111-1307, USA. */
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
+#include <typeinfo>
#include "../config.h"
#ifdef HAVE_GUI

View file

@ -0,0 +1,14 @@
$NetBSD: patch-gui_gui__stack.cc,v 1.1 2011/12/19 15:52:20 wiz Exp $
Add missing include.
--- gui/gui_stack.cc.orig 2005-04-18 14:30:50.000000000 +0000
+++ gui/gui_stack.cc
@@ -21,6 +21,7 @@ Boston, MA 02111-1307, USA. */
#include <stdio.h>
#include <stdlib.h>
+#include <typeinfo>
#include <errno.h>
#include "../config.h"

View file

@ -0,0 +1,14 @@
$NetBSD: patch-gui_gui__symbols.cc,v 1.1 2011/12/19 15:52:20 wiz Exp $
Add missing include.
--- gui/gui_symbols.cc.orig 2005-09-24 03:59:20.000000000 +0000
+++ gui/gui_symbols.cc
@@ -22,6 +22,7 @@ Boston, MA 02111-1307, USA. */
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
+#include <typeinfo>
#include "../config.h"
#ifdef HAVE_GUI

View file

@ -0,0 +1,14 @@
$NetBSD: patch-gui_settings__exdbm.cc,v 1.1 2011/12/19 15:52:21 wiz Exp $
Add missing include.
--- gui/settings_exdbm.cc.orig 2004-07-06 05:20:20.000000000 +0000
+++ gui/settings_exdbm.cc
@@ -19,6 +19,7 @@ along with gpsim; see the file COPYING.
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#include <stdlib.h>
#include "settings_exdbm.h"

View file

@ -0,0 +1,14 @@
$NetBSD: patch-modules_binary__indicator.cc,v 1.1 2011/12/19 15:52:21 wiz Exp $
Add missing include.
--- modules/binary_indicator.cc.orig 2005-08-25 21:57:51.000000000 +0000
+++ modules/binary_indicator.cc
@@ -32,6 +32,7 @@ Boston, MA 02111-1307, USA. */
#include <errno.h>
#include <stdlib.h>
#include <string>
+#include <string.h>
#include "binary_indicator.h"

View file

@ -0,0 +1,14 @@
$NetBSD: patch-src_cmd__manager.h,v 1.1 2011/12/19 15:52:21 wiz Exp $
Add missing include.
--- src/cmd_manager.h.orig 2005-08-25 21:57:43.000000000 +0000
+++ src/cmd_manager.h
@@ -5,6 +5,7 @@
#include "gpsim_interface.h"
#include <vector>
#include <string>
+#include <string.h>
#include <functional>
using namespace std;

View file

@ -0,0 +1,14 @@
$NetBSD: patch-src_modules.cc,v 1.1 2011/12/19 15:52:21 wiz Exp $
Add missing include.
--- src/modules.cc.orig 2005-09-16 13:58:24.000000000 +0000
+++ src/modules.cc
@@ -28,6 +28,7 @@ Boston, MA 02111-1307, USA. */
#include <string>
#include <list>
#include <vector>
+#include <typeinfo>
#include "../config.h"

View file

@ -0,0 +1,12 @@
$NetBSD: patch-src_operator.cc,v 1.1 2011/12/19 15:52:21 wiz Exp $
Add missing include.
--- src/operator.cc.orig 2005-09-07 13:34:23.000000000 +0000
+++ src/operator.cc
@@ -1,4 +1,5 @@
#include <iostream>
+#include <typeinfo>
#include "operator.h"
#include "errors.h"

View file

@ -0,0 +1,38 @@
$NetBSD: patch-src_processor.cc,v 1.1 2011/12/19 15:52:21 wiz Exp $
Add missing include.
Avoid conflict with C++ list<>.
--- src/processor.cc.orig 2005-10-01 21:12:55.000000000 +0000
+++ src/processor.cc
@@ -36,6 +36,7 @@ Boston, MA 02111-1307, USA. */
#include <iostream>
#include <iomanip>
#include <string>
+#include <typeinfo>
#include "../config.h"
#include "gpsim_def.h"
@@ -628,11 +629,11 @@ void Processor::read_src_files(void)
//-------------------------------------------------------------------
//
-// processor -- list
+// processor -- plist
//
// Display the contents of either a source or list file
//
-void Processor::list(unsigned int file_id,
+void Processor::plist(unsigned int file_id,
unsigned int pc_val,
unsigned int start_line,
unsigned int end_line)
@@ -2122,7 +2123,7 @@ void FileContext::ReadSource(void)
line_seek = new vector<int>(max_line()+1);
pm_address = new vector<int>(max_line()+1);
- std::rewind(fptr);
+ ::rewind(fptr);
char buf[256],*s;
(*line_seek)[0] = 0;

View file

@ -0,0 +1,15 @@
$NetBSD: patch-src_processor.h,v 1.1 2011/12/19 15:52:21 wiz Exp $
Avoid conflict with C++ list<>.
--- src/processor.h.orig 2005-08-31 03:57:38.000000000 +0000
+++ src/processor.h
@@ -544,7 +544,7 @@ public:
virtual void disassemble (signed int start_address,
signed int end_address);
- virtual void list(unsigned int file_id,
+ virtual void plist(unsigned int file_id,
unsigned int pcval,
unsigned int start_line,
unsigned int end_line);

View file

@ -0,0 +1,15 @@
$NetBSD: patch-src_program__files.cc,v 1.1 2011/12/19 15:52:21 wiz Exp $
Fix namespace.
--- src/program_files.cc.orig 2005-08-25 21:57:41.000000000 +0000
+++ src/program_files.cc
@@ -136,7 +136,7 @@ ProgramFileBuf::int_type ProgramFileBuf:
if (numPutback > 4) {
numPutback = 4;
}
- std::memcpy (m_Buffer+(4-numPutback), gptr() - numPutback, numPutback);
+ memcpy (m_Buffer+(4-numPutback), gptr() - numPutback, numPutback);
int num;
if((num = ::fread((void*)( m_Buffer + 4), 1, m_iBufferSize - 4, m_pFile)) <= 0) {

View file

@ -0,0 +1,14 @@
$NetBSD: patch-src_symbol.cc,v 1.1 2011/12/19 15:52:21 wiz Exp $
Add missing include.
--- src/symbol.cc.orig 2005-09-07 13:34:24.000000000 +0000
+++ src/symbol.cc
@@ -30,6 +30,7 @@ Boston, MA 02111-1307, USA. */
#include <iostream>
#include <iomanip>
#include <sstream>
+#include <typeinfo>
#include <string>
#include <vector>

View file

@ -0,0 +1,14 @@
$NetBSD: patch-src_value.cc,v 1.1 2011/12/19 15:52:21 wiz Exp $
Add missing include.
--- src/value.cc.orig 2005-09-10 13:45:30.000000000 +0000
+++ src/value.cc
@@ -22,6 +22,7 @@ Boston, MA 02111-1307, USA. */
#include <stdio.h>
#include <iostream>
#include <iomanip>
+#include <typeinfo>
#include "processor.h"