Re: Regression (semi)fix for netbsd-mac68k
От | Rémi Zara |
---|---|
Тема | Re: Regression (semi)fix for netbsd-mac68k |
Дата | |
Msg-id | 1B9E18A0-56BA-11D9-9127-003065B81B34@mac.com обсуждение исходный текст |
Ответ на | Re: Regression (semi)fix for netbsd-mac68k (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-hackers |
Le 23 déc. 04, à 16:09, Tom Lane a écrit : > "Andrew Dunstan" <andrew@dunslane.net> writes: >> Now we just need to work out why the box is failing the >> oldstyle_length test >> - see >> http://www.pgbuildfarm.org/cgi-bin/show_log.pl?nm=osprey&dt=2004-12 >> -23%2005:00:22 > > Either the passing of arguments or the passing of the return value > isn't > working the way we think. Put a printf into oldstyle_length to see > what > value it thinks it's returning. I suspect it is receiving the right > arguments and computing the right value, but the return convention is > messed up. Some fooling around with the func_ptr definition near the > top of fmgr.c might fix it. Indeed. NetBSD mac68k's gcc does not define __mc68000__, but __m68k__ The following patch makes the oldstyle_length test pass ! The change in miscinit is not necessary but for consistency sake (the return value of the func is not read). Index: src/backend/utils/fmgr/fmgr.c =================================================================== RCS file: /projects/cvsroot/pgsql/src/backend/utils/fmgr/fmgr.c,v retrieving revision 1.86 diff -u -r1.86 fmgr.c --- src/backend/utils/fmgr/fmgr.c 25 Oct 2004 00:46:42 -0000 1.86 +++ src/backend/utils/fmgr/fmgr.c 25 Dec 2004 21:10:53 -0000 @@ -40,7 +40,7 @@ * *additionally* into %d0 for compatibility.) The price is that there are * some warnings about int->pointer conversions... */ -#if defined(__mc68000__) && defined(__ELF__) +#if (defined(__mc68000__) || (defined(__m68k__))) && defined(__ELF__) typedef int32 ((*func_ptr) ()); #else Index: src/backend/utils/init/miscinit.c =================================================================== RCS file: /projects/cvsroot/pgsql/src/backend/utils/init/miscinit.c,v retrieving revision 1.135 diff -u -r1.135 miscinit.c --- src/backend/utils/init/miscinit.c 9 Oct 2004 23:13:06 -0000 1.135 +++ src/backend/utils/init/miscinit.c 25 Dec 2004 21:10:54 -0000 @@ -915,7 +915,7 @@ *----------------------------------------------------------------------- -- */ -#if defined(__mc68000__) && defined(__ELF__) +#if (defined(__mc68000__) || (defined(__m68k__))) && defined(__ELF__) typedef int32 ((*func_ptr) ()); #else Regards, Rémi Zara -- Rémi Zara http://www.remi-zara.net/
В списке pgsql-hackers по дате отправления: