diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c index bd8287e68d..ed5df86ab4 100644 --- a/src/backend/tcop/postgres.c +++ b/src/backend/tcop/postgres.c @@ -2686,10 +2686,15 @@ ProcessInterrupts(void) /* * IA64-specific code to fetch the AR.BSP register for stack depth checks. * - * We currently support gcc and icc here. + * We currently support gcc, icc, and HP-UX inline assembly here. */ #if defined(__ia64__) || defined(__ia64) +#if defined(__hpux) && !defined(__GNUC__) && !defined __INTEL_COMPILER +#include +#define ia64_get_bsp() ((char *) (_Asm_mov_from_ar(_AREG_BSP, _NO_FENCE))) +#else + #ifdef __INTEL_COMPILER #include #endif @@ -2710,7 +2715,7 @@ ia64_get_bsp(void) #endif return ret; } - +#endif #endif /* IA64 */