diff options
author | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2015-01-18 23:54:21 +0000 |
---|---|---|
committer | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2015-01-18 23:54:21 +0000 |
commit | 73b158d27d95615439334b400c05bc1a9b8453db (patch) | |
tree | 5d743f01c9f8c3ffa8f4536266182943d4eb6750 | |
parent | 392fa2ea4cfc5df5a86b6cde0e05c909da26f1e5 (diff) | |
download | netsurf-73b158d27d95615439334b400c05bc1a9b8453db.tar.gz netsurf-73b158d27d95615439334b400c05bc1a9b8453db.tar.bz2 |
Fix remaining linker errors
-rwxr-xr-x | amiga/launch.c | 13 | ||||
-rw-r--r-- | amiga/os3support.c | 14 | ||||
-rw-r--r-- | amiga/os3support.h | 7 | ||||
-rwxr-xr-x | amiga/thumbnail.c | 2 |
4 files changed, 33 insertions, 3 deletions
diff --git a/amiga/launch.c b/amiga/launch.c index c3f993b28..5f22bdc23 100755 --- a/amiga/launch.c +++ b/amiga/launch.c @@ -124,8 +124,11 @@ static BOOL ami_openurl_check_list(struct MinList *list, nsurl *url) void ami_openurl_open(void) { if(nsoption_bool(use_openurl_lib)) { - if((OpenURLBase = OpenLibrary("openurl.library",0))) + if((OpenURLBase = OpenLibrary("openurl.library",0))) { +#ifdef __amigaos4__ IOpenURL = (struct OpenURLIFace *)GetInterface(OpenURLBase,"main",1,NULL); +#endif + } } NewMinList(&ami_unsupportedprotocols); @@ -133,7 +136,9 @@ void ami_openurl_open(void) void ami_openurl_close(void) { +#ifdef __amigaos4__ if(IOpenURL) DropInterface((struct Interface *)IOpenURL); +#endif if(OpenURLBase) CloseLibrary(OpenURLBase); ami_openurl_free_list(&ami_unsupportedprotocols); @@ -141,7 +146,9 @@ void ami_openurl_close(void) nserror gui_launch_url(struct nsurl *url) { +#ifdef __amigaos4__ APTR procwin = SetProcWindow((APTR)-1L); +#endif char *launchurl = NULL; if(ami_openurl_check_list(&ami_unsupportedprotocols, url) == FALSE) @@ -162,8 +169,8 @@ nserror gui_launch_url(struct nsurl *url) } } } - +#ifdef __amigaos4__ SetProcWindow(procwin); - +#endif return NSERROR_OK; } diff --git a/amiga/os3support.c b/amiga/os3support.c index 7eafc7db4..724ac2079 100644 --- a/amiga/os3support.c +++ b/amiga/os3support.c @@ -212,5 +212,19 @@ char *strlwr(char *str) return str; } + +int scandir(const char *dir, struct dirent ***namelist, + int (*filter)(const struct dirent *), + int (*compar)(const struct dirent **, const struct dirent **)) +{ + /*\todo stub function, needs writing, preferably into clib2 */ + return 0; +} + +long long int strtoll(const char *nptr, char **endptr, int base) +{ + return (long long int)strtol(nptr, endptr, base); +} + #endif diff --git a/amiga/os3support.h b/amiga/os3support.h index 4b5deb251..df88cd5a5 100644 --- a/amiga/os3support.h +++ b/amiga/os3support.h @@ -27,6 +27,7 @@ #ifndef __amigaos4__ #include <stdint.h> + #include <proto/exec.h> #include <proto/dos.h> @@ -37,6 +38,7 @@ #include <exec/memory.h> #endif +/* C macros */ #ifndef ASM #define ASM #endif @@ -45,6 +47,8 @@ #define REG(reg,arg) arg __asm(#reg) #endif +#define MIN(a,b) (((a)<(b))?(a):(b)) + /* Macros */ #define IsMinListEmpty(L) (L)->mlh_Head->mln_Succ == 0 #define LIB_IS_AT_LEAST(B,V,R) ((B)->lib_Version>(V)) || \ @@ -116,6 +120,9 @@ /* application */ #define Notify(...) (void)0 +/* DataTypes */ +#define SaveDTObjectA(O,W,R,F,M,I,A) DoDTMethod(O,W,R,DTM_WRITE,F,M,NULL) + /* diskfont */ /* Only used in one place we haven't ifdeffed, where it returns the charset name */ #define ObtainCharsetInfo(A,B,C) (const char *)"ISO-8859-1" diff --git a/amiga/thumbnail.c b/amiga/thumbnail.c index ea681d269..7b3c156eb 100755 --- a/amiga/thumbnail.c +++ b/amiga/thumbnail.c @@ -16,6 +16,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ +#include "amiga/os3support.h" + #include <proto/graphics.h> #include <proto/Picasso96API.h> #include <intuition/intuition.h> |