Patch #824 2006-02-12 11:50
afb
Initial Patch for PowerPC- Download
- 824-Initial_Patch_f.patch (9.8 KB)
Index: configure.in
===================================================================
--- configure.in (revision 1964)
+++ configure.in (arbetskopia)
@@ -25,7 +25,7 @@
dnl Checks for header files.
AC_HEADER_DIRENT
AC_HEADER_STDC
-AC_CHECK_HEADERS([fcntl.h limits.h stdlib.h string.h sys/param.h unistd.h])
+AC_CHECK_HEADERS([fcntl.h limits.h stdlib.h string.h sys/param.h unistd.h malloc.h])
dnl Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
Index: src/sdk/as/source/as_gcobject.cpp
===================================================================
--- src/sdk/as/source/as_gcobject.cpp (revision 1964)
+++ src/sdk/as/source/as_gcobject.cpp (arbetskopia)
@@ -29,9 +29,14 @@
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
#include <assert.h>
#include <new>
+#if defined(WIN32) || defined(HAVE_MALLOC_H)
#include <malloc.h>
+#endif
#include "as_config.h"
#include "as_scriptengine.h"
Index: src/sdk/as/source/as_scriptengine.cpp
===================================================================
--- src/sdk/as/source/as_scriptengine.cpp (revision 1964)
+++ src/sdk/as/source/as_scriptengine.cpp (arbetskopia)
@@ -36,7 +36,12 @@
//
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+#if defined(WIN32) || defined(HAVE_MALLOC_H)
#include <malloc.h>
+#endif
#include "as_config.h"
#include "as_scriptengine.h"
Index: src/sdk/as/source/as_arrayobject.cpp
===================================================================
--- src/sdk/as/source/as_arrayobject.cpp (revision 1964)
+++ src/sdk/as/source/as_arrayobject.cpp (arbetskopia)
@@ -28,10 +28,14 @@
andreas@angelcode.com
*/
-
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
#include <assert.h>
#include <new>
+#if defined(WIN32) || defined(HAVE_MALLOC_H)
#include <malloc.h>
+#endif
#include "as_config.h"
#include "as_arrayobject.h"
Index: src/sdk/as/source/as_config.h
===================================================================
--- src/sdk/as/source/as_config.h (revision 1964)
+++ src/sdk/as/source/as_config.h (arbetskopia)
@@ -165,6 +165,9 @@
// AS_X86
// Use assembler code for the x86 CPU family
+// AS_PPC
+// Use assembler code for the PPC CPU family
+
// AS_SH4
// Use assembler code for the SH4 CPU family
@@ -276,9 +279,21 @@
#define CDECL_RETURN_SIMPLE_IN_MEMORY
#define STDCALL_RETURN_SIMPLE_IN_MEMORY
#endif
+ #if defined(__APPLE__) && defined(__MACH__)
+ // Mach-O
+ #endif
#ifdef i386
#define AS_X86
#endif
+ #ifdef __i386__
+ #define AS_X86
+ #endif
+ #ifdef __ppc__
+ #define AS_PPC
+ #endif
+ #ifdef __powerpc__
+ #define AS_PPC
+ #endif
#endif
// Dreamcast console
Index: src/sdk/as/Makefile.am
===================================================================
--- src/sdk/as/Makefile.am (revision 1964)
+++ src/sdk/as/Makefile.am (arbetskopia)
@@ -21,6 +21,7 @@
$(srcdir)/source/as_c.cpp \
$(srcdir)/source/as_callfunc.cpp \
$(srcdir)/source/as_callfunc_sh4.cpp \
+$(srcdir)/source/as_callfunc_ppc.cpp \
$(srcdir)/source/as_callfunc_x86.cpp \
$(srcdir)/source/as_compiler.cpp \
$(srcdir)/source/as_configgroup.cpp \
Index: src/sdk/as/source/as_callfunc_ppc.cpp
===================================================================
--- /dev/null Tue Feb 7 23:24:08 2006
+++ src/sdk/as/source/as_callfunc_ppc.cpp Tue Feb 7 00:12:40 2006
@@ -0,0 +1,239 @@
+/*
+ AngelCode Scripting Library
+ Copyright (c) 2003-2006 Andreas Jönsson
+ Copyright (c) 2005-2006 Anders F Björklund
+
+ This software is provided 'as-is', without any express or implied
+ warranty. In no event will the authors be held liable for any
+ damages arising from the use of this software.
+
+ Permission is granted to anyone to use this software for any
+ purpose, including commercial applications, and to alter it and
+ redistribute it freely, subject to the following restrictions:
+
+ 1. The origin of this software must not be misrepresented; you
+ must not claim that you wrote the original software. If you use
+ this software in a product, an acknowledgment in the product
+ documentation would be appreciated but is not required.
+
+ 2. Altered source versions must be plainly marked as such, and
+ must not be misrepresented as being the original software.
+
+ 3. This notice may not be removed or altered from any source
+ distribution.
+
+*/
+
+
+//
+// as_callfunc.cpp
+//
+// These functions handle the actual calling of system functions
+//
+
+
+
+#include "as_config.h"
+
+#ifndef AS_MAX_PORTABILITY
+#ifdef AS_PPC
+
+#include "as_callfunc.h"
+#include "as_scriptengine.h"
+#include "as_texts.h"
+#include "as_tokendef.h"
+
+BEGIN_AS_NAMESPACE
+
+int DetectCallingConvention(bool isMethod, const asUPtr &ptr, int callConv, asSSystemFunctionInterface *internal)
+{
+ memset(internal, 0, sizeof(asSSystemFunctionInterface));
+
download for full patch...
History
mandrav 2006-02-17 08:18
Patch applied.
Thank you.