From 625b59f61a33b356bcdec3a5f9ceb2aa2d566b9f Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Thu, 30 Dec 2010 00:53:11 +0000 Subject: First pass of AmigaOS 3 compatibility svn path=/trunk/netsurf/; revision=11155 --- amiga/arexx.c | 2 ++ amiga/download.h | 3 +++ amiga/gui.h | 1 + amiga/history_local.c | 1 + amiga/login.c | 1 + amiga/os3support.h | 57 +++++++++++++++++++++++++++++++++++++++++++ amiga/schedule.c | 1 + amiga/schedule.h | 2 ++ amiga/search.c | 1 + amiga/stringview/stringview.c | 2 ++ amiga/stringview/stringview.h | 2 ++ amiga/stringview/urlhistory.c | 4 ++- amiga/tree.c | 4 ++- amiga/tree.h | 1 + 14 files changed, 80 insertions(+), 2 deletions(-) create mode 100644 amiga/os3support.h diff --git a/amiga/arexx.c b/amiga/arexx.c index ac577d7a7..f8afbde32 100755 --- a/amiga/arexx.c +++ b/amiga/arexx.c @@ -16,6 +16,8 @@ * along with this program. If not, see . */ +#include "amiga/os3support.h" + #include "arexx.h" #include #include diff --git a/amiga/download.h b/amiga/download.h index 3b411c0c8..b4315c74c 100755 --- a/amiga/download.h +++ b/amiga/download.h @@ -18,6 +18,9 @@ #ifndef AMIGA_DOWNLOAD_H #define AMIGA_DOWNLOAD_H + +#include "amiga/os3support.h" + #include "amiga/gui.h" struct download_context; diff --git a/amiga/gui.h b/amiga/gui.h index a567d88a8..637ba44bf 100755 --- a/amiga/gui.h +++ b/amiga/gui.h @@ -25,6 +25,7 @@ #include #include #include "desktop/gui.h" +#include "amiga/os3support.h" #include "amiga/plotters.h" #include "amiga/menu.h" diff --git a/amiga/history_local.c b/amiga/history_local.c index b129f358c..01897fb82 100755 --- a/amiga/history_local.c +++ b/amiga/history_local.c @@ -27,6 +27,7 @@ #include #include "desktop/history_core.h" #include "desktop/plotters.h" +#include "amiga/os3support.h" #include "amiga/object.h" #include "amiga/gui.h" #include "utils/log.h" diff --git a/amiga/login.c b/amiga/login.c index 18508fe8a..496898113 100755 --- a/amiga/login.c +++ b/amiga/login.c @@ -17,6 +17,7 @@ */ #include "desktop/401login.h" +#include "amiga/os3support.h" #include "amiga/gui.h" #include "amiga/object.h" #include "amiga/login.h" diff --git a/amiga/os3support.h b/amiga/os3support.h new file mode 100644 index 000000000..93dca85b7 --- /dev/null +++ b/amiga/os3support.h @@ -0,0 +1,57 @@ +/* + * Copyright 2010 John-Mark Bell + * + * This file is part of NetSurf, http://www.netsurf-browser.org/ + * + * NetSurf is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * NetSurf is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** \file + * Minimal compatibility header for AmigaOS 3 + */ + +#ifndef AMIGA_OS3SUPPORT_H_ +#define AMIGA_OS3SUPPORT_H_ + +#ifndef __amigaos4__ + +#include + +/* Include prototypes for amigalib */ +#include + +#ifndef EXEC_MEMORY_H +#include +#endif + +/* Define extra memory type flags */ +#define MEMF_PRIVATE MEMF_ANY +#define MEMF_SHARED MEMF_ANY + +/* Integral type definitions */ +typedef int8_t int8; +typedef uint8_t uint8; +typedef int16_t int16; +typedef uint16_t uint16; +typedef int32_t int32; +typedef uint32_t uint32; + +/* TimeVal */ +struct TimeVal { + uint32 Seconds; + uint32 Microseconds; +}; + +#endif + +#endif diff --git a/amiga/schedule.c b/amiga/schedule.c index dc4a0611c..32c6df497 100755 --- a/amiga/schedule.c +++ b/amiga/schedule.c @@ -17,6 +17,7 @@ */ #include "desktop/browser.h" +#include "amiga/os3support.h" #include "amiga/object.h" #include "amiga/schedule.h" #include diff --git a/amiga/schedule.h b/amiga/schedule.h index df040aaf5..bc983a0a2 100755 --- a/amiga/schedule.h +++ b/amiga/schedule.h @@ -21,6 +21,8 @@ #include #include +#include "amiga/os3support.h" + struct MinList *schedule_list; struct TimeRequest *tioreq; struct MsgPort *msgport; diff --git a/amiga/search.c b/amiga/search.c index c7213bf0f..c479687b8 100755 --- a/amiga/search.c +++ b/amiga/search.c @@ -35,6 +35,7 @@ #include "utils/log.h" #include "utils/messages.h" #include "utils/utils.h" +#include "amiga/os3support.h" #include "amiga/search.h" #include "amiga/object.h" #include diff --git a/amiga/stringview/stringview.c b/amiga/stringview/stringview.c index 2d99c1751..5aea939d5 100755 --- a/amiga/stringview/stringview.c +++ b/amiga/stringview/stringview.c @@ -32,6 +32,8 @@ #include #include +#include "amiga/os3support.h" + #include "stringview.h" #include "urlhistory.h" diff --git a/amiga/stringview/stringview.h b/amiga/stringview/stringview.h index b9786ecb0..f989b2a0f 100755 --- a/amiga/stringview/stringview.h +++ b/amiga/stringview/stringview.h @@ -17,6 +17,8 @@ * along with this program. If not, see . */ +#include "amiga/os3support.h" + #include #include #include diff --git a/amiga/stringview/urlhistory.c b/amiga/stringview/urlhistory.c index b8a0168db..659e7d4c7 100644 --- a/amiga/stringview/urlhistory.c +++ b/amiga/stringview/urlhistory.c @@ -22,7 +22,9 @@ #include #include -#include "proto/exec.h" +#include + +#include "amiga/os3support.h" #include "urlhistory.h" diff --git a/amiga/tree.c b/amiga/tree.c index f1d35b2c5..44ff43121 100755 --- a/amiga/tree.c +++ b/amiga/tree.c @@ -16,6 +16,8 @@ * along with this program. If not, see . */ +#include "amiga/os3support.h" + #include #include #include @@ -994,7 +996,7 @@ BOOL ami_tree_event(struct treeview_window *twin) ASLFR_InitialFile,"tree_export.html", TAG_DONE)) { - strlcpy(&fname,savereq->fr_Drawer,1024); + strlcpy(fname,savereq->fr_Drawer,1024); AddPart(fname,savereq->fr_File,1024); ami_update_pointer(twin->win,GUI_POINTER_WAIT); if(twin->type == AMI_TREE_HISTORY) diff --git a/amiga/tree.h b/amiga/tree.h index 0a0c29e87..07fa6e305 100755 --- a/amiga/tree.h +++ b/amiga/tree.h @@ -21,6 +21,7 @@ #include #include +#include "amiga/os3support.h" #include "amiga/gui.h" #include "desktop/tree.h" #include "desktop/sslcert.h" -- cgit v1.2.3