@@ -19,17 +19,17 @@ This file contains functions dealing with error reporting and termination
1919/* These are the jmp_buf for the graceful exit in case of severe errors.
2020 Multiple buffers are defined to allow for recursive invokation. */
2121#define MAX_JBUFS 128
22- __thread int gk_cur_jbufs = -1 ;
23- __thread jmp_buf gk_jbufs [MAX_JBUFS ];
24- __thread jmp_buf gk_jbuf ;
22+ thread_local int gk_cur_jbufs = -1 ;
23+ thread_local jmp_buf gk_jbufs [MAX_JBUFS ];
24+ thread_local jmp_buf gk_jbuf ;
2525
2626typedef void (* gksighandler_t )(int );
2727
2828/* These are the holders of the old singal handlers for the trapped signals */
29- static __thread gksighandler_t old_SIGMEM_handler ; /* Custom signal */
30- static __thread gksighandler_t old_SIGERR_handler ; /* Custom signal */
31- static __thread gksighandler_t old_SIGMEM_handlers [MAX_JBUFS ]; /* Custom signal */
32- static __thread gksighandler_t old_SIGERR_handlers [MAX_JBUFS ]; /* Custom signal */
29+ static thread_local gksighandler_t old_SIGMEM_handler ; /* Custom signal */
30+ static thread_local gksighandler_t old_SIGERR_handler ; /* Custom signal */
31+ static thread_local gksighandler_t old_SIGMEM_handlers [MAX_JBUFS ]; /* Custom signal */
32+ static thread_local gksighandler_t old_SIGERR_handlers [MAX_JBUFS ]; /* Custom signal */
3333
3434/* The following is used to control if the gk_errexit() will actually abort or not.
3535 There is always a single copy of this variable */
@@ -178,7 +178,7 @@ char *gk_strerror(int errnum)
178178 return strerror (errnum );
179179#else
180180#ifndef SUNOS
181- static __thread char buf [1024 ];
181+ static thread_local char buf [1024 ];
182182
183183 strerror_r (errnum , buf , 1024 );
184184
0 commit comments