From 47f6d663d9b768a86910f3240273999d0f8e38a1 Mon Sep 17 00:00:00 2001 From: M4_used_Rollout Date: Mon, 21 Oct 2024 02:12:34 +0000 Subject: [PATCH] Fixed build on Haiku OS --- gcc/toplev.h | 6 ++++++ gcc_arm/toplev.h | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/gcc/toplev.h b/gcc/toplev.h index 62b0d5fb..11d34b65 100755 --- a/gcc/toplev.h +++ b/gcc/toplev.h @@ -21,6 +21,11 @@ Boston, MA 02111-1307, USA. */ #ifndef __GCC_TOPLEV_H__ #define __GCC_TOPLEV_H__ +#include +#ifndef _JBLEN +# define _JBLEN (sizeof(jmp_buf)/sizeof(jmp_buf[0])) +#endif + union tree_node; struct rtx_def; @@ -70,6 +75,7 @@ extern void error_for_asm (struct rtx_def *, char *, ...) ATTRIBUTE_PRINTF_2; extern void warning_for_asm (struct rtx_def *, char *, ...) ATTRIBUTE_PRINTF_2; + #if defined (_JBLEN) || defined (setjmp) extern void set_float_handler (jmp_buf); extern int push_float_handler (jmp_buf, jmp_buf); diff --git a/gcc_arm/toplev.h b/gcc_arm/toplev.h index 2f8698eb..8fb3e126 100755 --- a/gcc_arm/toplev.h +++ b/gcc_arm/toplev.h @@ -21,6 +21,11 @@ Boston, MA 02111-1307, USA. */ #ifndef __GCC_TOPLEV_H__ #define __GCC_TOPLEV_H__ +#include +#ifndef _JBLEN +# define _JBLEN (sizeof(jmp_buf)/sizeof(jmp_buf[0])) +#endif + #ifdef ANSI_PROTOTYPES union tree_node; struct rtx_def;