summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2010-12-30 00:53:11 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2010-12-30 00:53:11 +0000
commit625b59f61a33b356bcdec3a5f9ceb2aa2d566b9f (patch)
treea195db6a7a7864efe425c37660ab5fe0975c057d
parent8a2247b3b38aff43ffe076acbb0674abbee2489b (diff)
downloadnetsurf-625b59f61a33b356bcdec3a5f9ceb2aa2d566b9f.tar.gz
netsurf-625b59f61a33b356bcdec3a5f9ceb2aa2d566b9f.tar.bz2
First pass of AmigaOS 3 compatibility
svn path=/trunk/netsurf/; revision=11155
-rwxr-xr-xamiga/arexx.c2
-rwxr-xr-xamiga/download.h3
-rwxr-xr-xamiga/gui.h1
-rwxr-xr-xamiga/history_local.c1
-rwxr-xr-xamiga/login.c1
-rw-r--r--amiga/os3support.h57
-rwxr-xr-xamiga/schedule.c1
-rwxr-xr-xamiga/schedule.h2
-rwxr-xr-xamiga/search.c1
-rwxr-xr-xamiga/stringview/stringview.c2
-rwxr-xr-xamiga/stringview/stringview.h2
-rw-r--r--amiga/stringview/urlhistory.c4
-rwxr-xr-xamiga/tree.c4
-rwxr-xr-xamiga/tree.h1
14 files changed, 80 insertions, 2 deletions
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 <http://www.gnu.org/licenses/>.
*/
+#include "amiga/os3support.h"
+
#include "arexx.h"
#include <reaction/reaction_macros.h>
#include <string.h>
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 <dos/dos.h>
#include <devices/inputevent.h>
#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 <string.h>
#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 <jmb@netsurf-browser.org>
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+
+/** \file
+ * Minimal compatibility header for AmigaOS 3
+ */
+
+#ifndef AMIGA_OS3SUPPORT_H_
+#define AMIGA_OS3SUPPORT_H_
+
+#ifndef __amigaos4__
+
+#include <stdint.h>
+
+/* Include prototypes for amigalib */
+#include <clib/alib_protos.h>
+
+#ifndef EXEC_MEMORY_H
+#include <exec/memory.h>
+#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 <proto/exec.h>
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 <exec/lists.h>
#include <proto/timer.h>
+#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 <proto/intuition.h>
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 <gadgets/layout.h>
#include <gadgets/listbrowser.h>
+#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 <http://www.gnu.org/licenses/>.
*/
+#include "amiga/os3support.h"
+
#include <exec/semaphores.h>
#include <intuition/classes.h>
#include <intuition/classusr.h>
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 <ctype.h>
#include <string.h>
-#include "proto/exec.h"
+#include <proto/exec.h>
+
+#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 <http://www.gnu.org/licenses/>.
*/
+#include "amiga/os3support.h"
+
#include <proto/window.h>
#include <proto/layout.h>
#include <proto/space.h>
@@ -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 <exec/types.h>
#include <intuition/classusr.h>
+#include "amiga/os3support.h"
#include "amiga/gui.h"
#include "desktop/tree.h"
#include "desktop/sslcert.h"