Description: <short summary of the patch>
 TODO: Put a short summary on the line above and replace this paragraph
 with a longer explanation of this change. Complete the meta-information
 with other relevant fields (see below for details). To make it easier, the
 information below has been extracted from the changelog. Adjust it or drop
 it.
 .
 gcl (2.6.7+dfsga-22) unstable; urgency=high
 .
   * fix stack definition issues on i386
Author: Camm Maguire <camm@debian.org>

---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: <vendor|upstream|other>, <url of original patch>
Bug: <url in upstream bugtracker>
Bug-Debian: http://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: <YYYY-MM-DD>

--- gcl-2.6.7+dfsga.orig/configure
+++ gcl-2.6.7+dfsga/configure
@@ -6472,6 +6472,7 @@ else
 	        #include <stdio.h>
 	        #include <stdlib.h>
 		void gprof_cleanup() {};
+		int *cs_org;
  		int main(int argc,char **argv,char **envp) {
 		#include "h/unrandomize.h"
 		return 0;}
@@ -6501,6 +6502,7 @@ else
 #include <stdio.h>
 	            #include <stdlib.h>
 		    void gprof_cleanup() {};
+		    int *cs_org;
 		    int main(int argc,char * argv[],char * envp[]) {
 			FILE *f;
 			#ifdef CAN_UNRANDOMIZE_SBRK
@@ -6532,6 +6534,7 @@ else
 #include <stdio.h>
 	            #include <stdlib.h>
 		    void gprof_cleanup() {};
+		    int *cs_org;
 		    int main(int argc,char * argv[],char * envp[]) {
 			FILE *f;
 			#ifdef CAN_UNRANDOMIZE_SBRK
@@ -6599,6 +6602,7 @@ else
         }
 
 	void gprof_cleanup() {};
+	int *cs_org;
 	int main(int argc,char **argv,char **envp) {
 	void *v ;
 	FILE *fp = fopen("conftest1","w");
@@ -6651,6 +6655,7 @@ else
 	#include <stdio.h>
 	#include <stdlib.h>
 	void gprof_cleanup() {};
+	int *cs_org;
 	int main(int argc,char **argv,char **envp) {
 	#ifdef CAN_UNRANDOMIZE_SBRK
 	#include "h/unrandomize.h"
@@ -6688,6 +6693,7 @@ else
 	#include <stdio.h>
 	#include <stdlib.h>
 	void gprof_cleanup() {};
+	int *cs_org;
 	int main(int argc,char **argv,char **envp) {
 	void *b,*c;
 	FILE *fp = fopen("conftest1","w");
@@ -6741,6 +6747,7 @@ else
 	}
 
 	void gprof_cleanup() {};
+	int *cs_org;
 	int main(int argc,char **argv,char **envp) {
 	char *b;
 	FILE *fp = fopen("conftest1","w");
--- gcl-2.6.7+dfsga.orig/configure.in
+++ gcl-2.6.7+dfsga/configure.in
@@ -1275,6 +1275,7 @@ if test "$HAVE_SBRK" = "1" ; then
 	        #include <stdio.h>
 	        #include <stdlib.h>
 		void gprof_cleanup() {};
+		int *cs_org;
  		int main(int argc,char **argv,char **envp) {
 		#include "h/unrandomize.h"
 		return 0;}]])],
@@ -1286,6 +1287,7 @@ if test "$HAVE_SBRK" = "1" ; then
 	AC_TRY_RUN([#include <stdio.h>
 	            #include <stdlib.h>
 		    void gprof_cleanup() {};
+		    int *cs_org;
 		    int main(int argc,char * argv[],char * envp[]) {
 			FILE *f;
 			#ifdef CAN_UNRANDOMIZE_SBRK
@@ -1301,6 +1303,7 @@ if test "$HAVE_SBRK" = "1" ; then
 	AC_TRY_RUN([#include <stdio.h>
 	            #include <stdlib.h>
 		    void gprof_cleanup() {};
+		    int *cs_org;
 		    int main(int argc,char * argv[],char * envp[]) {
 			FILE *f;
 			#ifdef CAN_UNRANDOMIZE_SBRK
@@ -1385,6 +1388,7 @@ AC_RUN_IFELSE([AC_LANG_SOURCE([[
         }
 
 	void gprof_cleanup() {};
+	int *cs_org;
 	int main(int argc,char **argv,char **envp) {
 	void *v ;
 	FILE *fp = fopen("conftest1","w");
@@ -1413,6 +1417,7 @@ AC_RUN_IFELSE([AC_LANG_SOURCE([[
 	#include <stdio.h>
 	#include <stdlib.h>
 	void gprof_cleanup() {};
+	int *cs_org;
 	int main(int argc,char **argv,char **envp) {
 	#ifdef CAN_UNRANDOMIZE_SBRK
 	#include "h/unrandomize.h"
@@ -1428,6 +1433,7 @@ AC_RUN_IFELSE([AC_LANG_SOURCE([[
 	#include <stdio.h>
 	#include <stdlib.h>
 	void gprof_cleanup() {};
+	int *cs_org;
 	int main(int argc,char **argv,char **envp) {
 	void *b,*c;
 	FILE *fp = fopen("conftest1","w");
@@ -1457,6 +1463,7 @@ AC_RUN_IFELSE([AC_LANG_SOURCE([[
 	}
 
 	void gprof_cleanup() {};
+	int *cs_org;
 	int main(int argc,char **argv,char **envp) {
 	char *b;
 	FILE *fp = fopen("conftest1","w");
--- gcl-2.6.7+dfsga.orig/h/unrandomize.h
+++ gcl-2.6.7+dfsga/h/unrandomize.h
@@ -22,8 +22,9 @@
       if (personality(pers | flag) != -1 && (personality(0xffffffffUL) & flag)==flag) {
 	int i;
 	char **n,**a;
-	for (i=0;envp[i];i++);
+	extern int *cs_org;
 	cs_org=(void *)&flag;/*get right stack for potential gc in malloc*/
+	for (i=0;envp[i];i++);
 	n=malloc((i+2)*sizeof(*n));
 	n[i+1]=0;
 	n[i--]="GCL_UNRANDOMIZE=t";
