mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-10-03 12:56:54 +02:00
This patch should enable 6.5 to build on Motorola 68000 architecture.
It comes from Roman Hodek <Roman.Hodek@informatik.uni-erlangen.de>.
This commit is contained in:
parent
70dfc8c11e
commit
d852d31ea3
@ -6,7 +6,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 1995, Regents of the University of California
|
* Copyright (c) 1995, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: postgres.h,v 1.22 1999/05/03 19:10:14 momjian Exp $
|
* $Id: postgres.h,v 1.23 1999/06/10 22:59:22 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -63,7 +63,21 @@ typedef Oid regproc;
|
|||||||
typedef Oid RegProcedure;
|
typedef Oid RegProcedure;
|
||||||
|
|
||||||
/* ptr to func returning (char *) */
|
/* ptr to func returning (char *) */
|
||||||
|
#if defined(__mc68000__) && defined(__ELF__)
|
||||||
|
/* The m68k SVR4 ABI defines that pointers are returned in %a0 instead of
|
||||||
|
* %d0. So if a function pointer is declared to return a pointer, the
|
||||||
|
* compiler may look only into %a0, but if the called function was declared
|
||||||
|
* to return return an integer type, it puts its value only into %d0. So the
|
||||||
|
* caller doesn't pink up the correct return value. The solution is to
|
||||||
|
* declare the function pointer to return int, so the compiler picks up the
|
||||||
|
* return value from %d0. (Functions returning pointers put their value
|
||||||
|
* *additionally* into %d0 for compability.) The price is that there are
|
||||||
|
* some warnings about int->pointer conversions...
|
||||||
|
*/
|
||||||
|
typedef int32 ((*func_ptr) ());
|
||||||
|
#else
|
||||||
typedef char *((*func_ptr) ());
|
typedef char *((*func_ptr) ());
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#define RegProcedureIsValid(p) OidIsValid(p)
|
#define RegProcedureIsValid(p) OidIsValid(p)
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/include/storage/s_lock.h,v 1.59 1999/04/13 17:42:26 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/include/storage/s_lock.h,v 1.60 1999/06/10 22:59:22 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -157,6 +157,24 @@ tas(volatile slock_t *lock)
|
|||||||
#endif /* sparc */
|
#endif /* sparc */
|
||||||
|
|
||||||
|
|
||||||
|
#if defined(__mc68000__)
|
||||||
|
#define TAS(lock) tas(lock)
|
||||||
|
|
||||||
|
static __inline__ int
|
||||||
|
tas(volatile slock_t *lock)
|
||||||
|
{
|
||||||
|
register int rv;
|
||||||
|
|
||||||
|
__asm__ __volatile__ (
|
||||||
|
"tas %1; sne %0"
|
||||||
|
: "=d" (rv), "=m"(*lock)
|
||||||
|
: "1" (*lock)
|
||||||
|
: "cc" );
|
||||||
|
return rv;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* defined(__mc68000__) */
|
||||||
|
|
||||||
|
|
||||||
#if defined(NEED_VAX_TAS_ASM)
|
#if defined(NEED_VAX_TAS_ASM)
|
||||||
/*
|
/*
|
||||||
@ -372,3 +390,4 @@ int tas(volatile slock_t *lock); /* port/.../tas.s, or
|
|||||||
|
|
||||||
#endif /* HAS_TEST_AND_SET */
|
#endif /* HAS_TEST_AND_SET */
|
||||||
#endif /* S_LOCK_H */
|
#endif /* S_LOCK_H */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user