Description: fix FTBFS on Alpha due to missing architecture support
 Provides the missing function needed to compile on Alpha.
Author: Michael Cree <mcree@orcon.net.nz>
Last-Update: 2014-02-01

---

--- /dev/null
+++ python-greenlet-0.4.2/platform/switch_alpha_unix.h
@@ -0,0 +1,39 @@
+/*
+ * this is the internal transfer function.
+ *
+ * HISTORY
+ * 2012-11-01 M. J. Cree
+ *      Ported from extant code for other arches.
+ */
+
+#define STACK_REFPLUS 1
+
+#ifdef SLP_EVAL
+
+#define STACK_MAGIC 0
+
+
+#define REGS_TO_SAVE "$9", "$10", "$11", "$12", "$13", "$14", "$15", \
+       "$26"
+
+static int
+slp_switch(void)
+{
+    register int *stackref, stsizediff;
+    __asm__ __volatile__ ("" : : : REGS_TO_SAVE);
+    __asm__ ("mov $sp, %0" : "=r" (stackref) : );
+    {
+        SLP_SAVE_STATE(stackref, stsizediff);
+        __asm__ __volatile__ (
+            "addq $sp, %0, $sp\n"
+            "addq $fp, %0, $fp\n"
+            : /* no outputs */
+            : "r" (stsizediff)
+            );
+        SLP_RESTORE_STATE();
+    }
+    __asm__ __volatile__ ("" : : : REGS_TO_SAVE);
+    return 0;
+}
+
+#endif
--- python-greenlet-0.4.2.orig/slp_platformselect.h
+++ python-greenlet-0.4.2/slp_platformselect.h
@@ -38,4 +38,6 @@
 #include "platform/switch_aarch64_gcc.h" /* Aarch64 ABI */
 #elif defined(__GNUC__) && defined(__mc68000__)
 #include "platform/switch_m68k_gcc.h" /* gcc on m68k */
+#elif defined(__GNUC__) && defined(__alpha__)
+#include "platform/switch_alpha_unix.h" /* Alpha AXP */
 #endif
