=== modified file 'libbase/rc.h'
--- libbase/rc.h	2009-02-25 02:00:44 +0000
+++ libbase/rc.h	2009-04-23 20:36:32 +0000
@@ -32,8 +32,10 @@
 #include <boost/cstdint.hpp>
 #include <boost/tokenizer.hpp>
 
-#ifndef _WIN32
+#if !defined(_WIN32) && !defined(__amigaos4__)
 #include <sys/shm.h>
+#elif defined(__amigaos4__)
+typedef long int key_t; // on bsd and also amigaos it should be defined into <sys/types.h>
 #else
 typedef boost::uint32_t key_t;
 #endif // _WIN32

=== modified file 'libbase/shm.cpp'
--- libbase/shm.cpp	2009-02-25 22:33:03 +0000
+++ libbase/shm.cpp	2009-04-23 20:50:03 +0000
@@ -24,11 +24,11 @@
 #include <unistd.h>
 #include <dirent.h>
 #include <fcntl.h>
-#if !defined(HAVE_WINSOCK_H) && !defined(__riscos__) && !defined(__OS2__)
+#if !defined(HAVE_WINSOCK_H) && !defined(__riscos__) && !defined(__OS2__) && !defined(__amigaos4__)
 #include <sys/mman.h>
 #include <sys/shm.h>
 #include <sys/ipc.h>
-#elif !defined(__riscos__) && !defined(__OS2__)
+#elif !defined(__riscos__) && !defined(__OS2__) && !defined(__amigaos4__)
 #include <windows.h>
 #include <process.h>
 #include <io.h>
@@ -135,6 +135,8 @@
 #endif
 
     return true;
+#elif defined(__amigaos4__)
+	return true;
 #else
 #error "You need SYSV Shared memory support to use this option"
 #endif	 // end of USE_SYSV_SHM
@@ -220,7 +222,7 @@
     }
     if (_shmfd <= 0 && errno == EEXIST)
 # else
-#  ifdef __riscos__
+#  if defined(__riscos__) || defined(__amigaos4__)
     if (0)
 #  else
 	_shmhandle = CreateFileMapping ((HANDLE) 0xFFFFFFFF, NULL,
@@ -246,7 +248,7 @@
 	// Get the shared memory id for this segment
 	_shmfd = shmget(_shmkey, _size, 0);
 #  else
-#   ifdef __riscos__
+#   if defined(__riscos__) || defined(__amigaos4__)
         // do nothing, we never get here.
 #   else
 	_shmhandle = CreateFileMapping ((HANDLE) 0xFFFFFFFF, NULL,
@@ -265,7 +267,7 @@
 #if defined(HAVE_SHMGET) || defined(HAVE_SHM_OPEN)
     if (_shmfd < 0 && errno == EINVAL)
 #else
-# ifdef __riscos__
+# if defined(__riscos__) || defined(__amigaos4__)
     if (0)
 # else
     if (_shmhandle <= 0 && errno == EINVAL)
@@ -292,7 +294,7 @@
 #if defined(HAVE_SHMGET) || defined(HAVE_SHM_OPEN)
     if (_shmfd >= 0)
 #else
-# ifdef __riscos__
+# if defined(__riscos__) || defined(__amigaos4__)
     if (1)
 # else
     if (_shmhandle >= 0)
@@ -320,7 +322,7 @@
 	    return false;
 	}
 # else
-#  ifdef __riscos__
+#  if defined(__riscos__) || defined(__amigaos4__)
         _addr = (char *)malloc(_size);
         if (_addr == 0) {
             log_error("malloc() failed\n");
@@ -377,7 +379,7 @@
 	shmdt(_addr);
 	_addr = (char *)shmat(_shmfd, (void *)addr, 0);
 # else
-#  ifdef __riscos__
+#  if defined(__riscos__) || defined(__amigaos4__)
         _addr = _addr;
 #  else
 	CloseHandle(_shmhandle);	
@@ -541,7 +543,7 @@
 #ifdef USE_SYSV_SHM
      shmctl(_shmfd, IPC_RMID, 0);
 #else
-# ifdef __riscos__
+#  if defined(__riscos__) || defined((__amigaos4__)
      free(_addr);
 # else
      CloseHandle(_shmhandle);

=== modified file 'libbase/shm.h'
--- libbase/shm.h	2009-02-25 22:33:03 +0000
+++ libbase/shm.h	2009-04-23 20:40:24 +0000
@@ -28,10 +28,10 @@
 #include "as_object.h" // for inheritance
 
 #include <sys/types.h>
-#if !defined(HAVE_WINSOCK_H) && !defined(__riscos__) && !defined(__OS2__)
+#if !defined(HAVE_WINSOCK_H) && !defined(__riscos__) && !defined(__OS2__) && !defined(__amigaos4__)
 # include <sys/ipc.h>
 # include <sys/shm.h>
-#elif !defined(__riscos__) && !defined(__OS2__)
+#elif !defined(__riscos__) && !defined(__OS2__) && !defined(__amigaos4__)
 # include <windows.h>
 # include <process.h>
 # include <fcntl.h>

=== modified file 'libbase/utf8.h'
--- libbase/utf8.h	2009-02-25 22:33:03 +0000
+++ libbase/utf8.h	2009-04-23 20:51:59 +0000
@@ -26,6 +26,13 @@
 #include <boost/cstdint.hpp> // for C99 int types
 #include <limits>
 
+#ifdef __amigaos4__
+namespace std
+{
+	typedef std::basic_string<wchar_t> wstring;
+};
+#endif
+
 /// Utilities to convert between std::string and std::wstring.
 //
 /// Strings in Gnash are generally stored as std::strings.

