File tree Expand file tree Collapse file tree 6 files changed +17
-258
lines changed Expand file tree Collapse file tree 6 files changed +17
-258
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,6 @@ m4_include([m4.include/ax_append_flag.m4])
13
13
m4_include ( [ m4.include/ax_append_compile_flags.m4] )
14
14
m4_include ( [ m4.include/mc-cflags.m4] )
15
15
m4_include ( [ m4.include/mc-stdckdint.m4] )
16
- m4_include ( [ m4.include/ax_gcc_func_attribute.m4] )
17
16
m4_include ( [ m4.include/mc-get-fs-info.m4] )
18
17
m4_include ( [ m4.include/mc-with-x.m4] )
19
18
m4_include ( [ m4.include/mc-use-termcap.m4] )
Original file line number Diff line number Diff line change @@ -64,16 +64,6 @@ if test "x$enable_werror" = xyes; then
64
64
AX_APPEND_COMPILE_FLAGS ( [ -Werror] , [ mc_configured_cflags] )
65
65
fi
66
66
67
- dnl Compiler can generate warnings for unrecognized flags added to CFLAGS
68
- dnl which causes attribute checks to fail
69
- ax_gcc_func_attribute_save_flags=$[ ] _AC_LANG_PREFIX[ ] FLAGS
70
- _AC_LANG_PREFIX[ ] FLAGS=
71
- AX_GCC_FUNC_ATTRIBUTE ( [ fallthrough] )
72
- AX_GCC_FUNC_ATTRIBUTE ( [ weak] )
73
- AX_GCC_FUNC_ATTRIBUTE ( [ unused] )
74
- _AC_LANG_PREFIX[ ] FLAGS=$ax_gcc_func_attribute_save_flags
75
- unset ax_gcc_func_attribute_save_flags
76
-
77
67
LT_INIT
78
68
79
69
Original file line number Diff line number Diff line change 9
9
10
10
#include <glib.h>
11
11
12
- #if defined(HAVE_FUNC_ATTRIBUTE_WEAK ) && defined(HAVE_TESTS )
12
+ #if defined(__has_attribute )
13
+ #define MC_HAS_ATTRIBUTE (ATTR ) __has_attribute (ATTR)
14
+ #else
15
+ #define MC_HAS_ATTRIBUTE (ATTR ) 0
16
+ #endif
17
+
18
+ #if MC_HAS_ATTRIBUTE (weak ) && defined(HAVE_TESTS )
13
19
#define MC_MOCKABLE __attribute__ ((weak))
14
20
#else
15
21
#define MC_MOCKABLE
44
50
#define N_ (String ) (String)
45
51
#endif
46
52
47
- #ifdef HAVE_FUNC_ATTRIBUTE_FALLTHROUGH
53
+ #if MC_HAS_ATTRIBUTE ( fallthrough )
48
54
#define MC_FALLTHROUGH __attribute__ ((fallthrough))
49
55
#else
50
56
#define MC_FALLTHROUGH
51
57
#endif
52
58
53
- #ifdef HAVE_FUNC_ATTRIBUTE_UNUSED
59
+ #if MC_HAS_ATTRIBUTE ( unused )
54
60
#define MC_UNUSED __attribute__ ((unused))
55
61
#else
56
62
#define MC_UNUSED
57
63
#endif
58
64
65
+ #if MC_HAS_ATTRIBUTE (nonstring )
66
+ #define MC_NONSTRING __attribute__ ((nonstring))
67
+ #else
68
+ #define MC_NONSTRING
69
+ #endif
70
+
59
71
#ifdef USE_MAINTAINER_MODE
60
72
#include "lib/logging.h"
61
73
#endif
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -1220,7 +1220,7 @@ static void
1220
1220
find_rotate_dash (const WDialog * h , gboolean show )
1221
1221
{
1222
1222
static size_t pos = 0 ;
1223
- static const char rotating_dash [4 ] = "|/-\\" ;
1223
+ static const char rotating_dash [4 ] MC_NONSTRING = "|/-\\" ;
1224
1224
const Widget * w = CONST_WIDGET (h );
1225
1225
const int * colors ;
1226
1226
Original file line number Diff line number Diff line change @@ -1066,7 +1066,7 @@ rotate_dash (gboolean show)
1066
1066
tty_print_alt_char (ACS_URCORNER , FALSE);
1067
1067
else
1068
1068
{
1069
- static const char rotating_dash [4 ] = "|/-\\" ;
1069
+ static const char rotating_dash [4 ] MC_NONSTRING = "|/-\\" ;
1070
1070
static size_t pos = 0 ;
1071
1071
1072
1072
tty_print_char (rotating_dash [pos ]);
You can’t perform that action at this time.
0 commit comments