NetBSD/m68k port
От | Tatsuo Ishii |
---|---|
Тема | NetBSD/m68k port |
Дата | |
Msg-id | 199812261511.AAA00493@ext16.sra.co.jp обсуждение исходный текст |
Ответы |
Re: [PATCHES] NetBSD/m68k port
(Bruce Momjian <maillist@candle.pha.pa.us>)
|
Список | pgsql-hackers |
Long awaited port for NetBSD/m68k was finally done by Mr. Mutsuki Nakajima. Since he is not subscribing the mailing list, I'm posting his patches by his request. According to him, he has successfully compiled and passed the regression test on Mac SE/30 running NetBSD/m68k. Also, another person has reported that with the patches PostgreSQL is working on NetBSD/sun3 too. -- Tatsuo Ishii t-ishii@sra.co.jp ---------------------------- cut here ---------------------------- diff -crP postgresql-v6.4.org/src/include/utils/memutils.h postgresql-v6.4/src/include/utils/memutils.h *** postgresql-v6.4.org/src/include/utils/memutils.h Mon Sep 7 14:35:48 1998 --- postgresql-v6.4/src/include/utils/memutils.h Sat Dec 26 05:51:30 1998 *************** *** 58,70 **** #define SHORTALIGN(LEN)\ (((long)(LEN) + (sizeof (short) - 1)) & ~(sizeof (short) - 1)) #define INTALIGN(LEN)\ (((long)(LEN) + (sizeof (int) - 1)) & ~(sizeof (int) -1)) /* * LONGALIGN(LEN) - length(or address) aligned for longs */ ! #if defined(sun) && ! defined(sparc) #define LONGALIGN(LEN) SHORTALIGN(LEN) #elif defined (__alpha) --- 58,74 ---- #define SHORTALIGN(LEN)\ (((long)(LEN) + (sizeof (short) - 1)) & ~(sizeof (short) - 1)) + #if defined(m68k) + #define INTALIGN(LEN) SHORTALIGN(LEN) + #else #define INTALIGN(LEN)\ (((long)(LEN) + (sizeof (int) - 1)) & ~(sizeof (int) -1)) + #endif /* * LONGALIGN(LEN) - length (or address) aligned for longs */ ! #if (defined(sun) && ! defined(sparc)) || defined(m68k) #define LONGALIGN(LEN) SHORTALIGN(LEN) #elif defined (__alpha) *************** *** 81,87 **** (((long)(LEN) + (sizeof (long) - 1)) & ~(sizeof (long) -1)) #endif ! #if ! defined(sco) #define DOUBLEALIGN(LEN)\ (((long)(LEN) + (sizeof (double) - 1)) & ~(sizeof (double) -1)) --- 85,94 ---- (((long)(LEN) + (sizeof (long) - 1)) & ~(sizeof (long) -1)) #endif ! #if defined(m68k) ! #define DOUBLEALIGN(LEN) SHORTALIGN(LEN) ! #define MAXALIGN(LEN) SHORTALIGN(LEN) ! #elif ! defined(sco) #define DOUBLEALIGN(LEN)\ (((long)(LEN) + (sizeof (double) - 1)) & ~(sizeof (double) -1)) diff -crP postgresql-v6.4.org/src/backend/storage/buffer/s_lock.c postgresql-v6.4/src/backend/storage/buffer/s_lock.c *** postgresql-v6.4.org/src/backend/storage/buffer/s_lock.c Sat Sep 19 02:18:39 1998 --- postgresql-v6.4/src/backend/storage/buffer/s_lock.c Sat Dec 26 06:26:24 1998 *************** *** 117,122 **** --- 117,141 ---- #endif /* PPC */ + #if defined(__m68k__) + static void + tas_dummy() /* really means: extern int tas(slock_t **lock); */ + { + __asm__(" \n\ + .global _tas \n\ + _tas: \n\ + movel sp@(0x4),a0 \n\ + tas a0@ \n\ + beq _success \n\ + moveq #-128,d0 \n\ + rts \n\ + _success: \n\ + moveq #0,d0 \n\ + rts \n\ + "); + } + + #endif /* __m68k__ */ #else /* defined(__GNUC__) */
В списке pgsql-hackers по дате отправления: