yann@103: Patch to correctly handle the MIPS case. yann@103: yann@103: It was build up by Yann E. MORIN from some yann@103: bits gathered from buildroot, which is LGPL v2.1 yann@103: License for dmalloc is: yann@103: * Permission to use, copy, modify, and distribute this software for yann@103: * any purpose and without fee is hereby granted, provided that the yann@103: * above copyright notice and this permission notice appear in all yann@103: * copies, and that the name of Gray Watson not be used in advertising yann@103: * or publicity pertaining to distribution of the document or software yann@103: * without specific, written prior permission. yann@103: * yann@103: * Gray Watson makes no representations about the suitability of the yann@103: * software described herein for any purpose. It is provided "as is" yann@103: * without express or implied warranty. yann@103: yann@103: I personnaly believe that the resulting code should therefore be yann@103: LGPL v2.1, but don't believe me, ask your lawyers! yann@103: yann@103: diff -dur dmalloc-5.5.2.orig/configure dmalloc-5.5.2/configure yann@103: --- dmalloc-5.5.2.orig/configure 2007-05-18 12:15:39.000000000 +0200 yann@103: +++ dmalloc-5.5.2/configure 2007-05-18 12:15:48.000000000 +0200 yann@103: @@ -7107,7 +7107,7 @@ yann@103: echo $ECHO_N "checking return.h macros work... $ECHO_C" >&6 yann@103: if test "$cross_compiling" = yes; then yann@103: cat >>confdefs.h <<\_ACEOF yann@103: -#define RETURN_MACROS_WORK 0 yann@103: +#define RETURN_MACROS_WORK 1 yann@103: _ACEOF yann@103: echo "$as_me:$LINENO: result: no" >&5 yann@103: echo "${ECHO_T}no" >&6 yann@103: diff -dur dmalloc-5.5.2.orig/return.h dmalloc-5.5.2/return.h yann@103: --- dmalloc-5.5.2.orig/return.h 2007-05-14 19:26:14.000000000 +0200 yann@103: +++ dmalloc-5.5.2/return.h 2007-05-18 12:15:48.000000000 +0200 yann@103: @@ -106,26 +106,16 @@ yann@103: /*************************************/ yann@103: yann@103: /* yann@103: - * For DEC Mips machines running Ultrix yann@103: + * For Mips machines running Linux yann@103: */ yann@103: #if __mips yann@103: yann@103: /* yann@103: - * I have no idea how to get inline assembly with the default cc. yann@103: - * Anyone know how? yann@103: - */ yann@103: - yann@103: -#if 0 yann@103: - yann@103: -/* yann@103: * NOTE: we assume here that file is global. yann@103: * yann@103: - * $31 is the frame pointer. $2 looks to be the return address but maybe yann@103: - * not consistently. yann@103: + * $31 is the return address. yann@103: */ yann@103: -#define GET_RET_ADDR(file) asm("sw $2, file") yann@103: - yann@103: -#endif yann@103: +#define GET_RET_ADDR(file) asm("sw $31, %0" : "=m" (file)) yann@103: yann@103: #endif /* __mips */ yann@103: