diff options
author | Andrea Canciani <ranma42@gmail.com> | 2012-08-01 20:01:31 +0200 |
---|---|---|
committer | Andrea Canciani <ranma42@gmail.com> | 2012-08-02 15:52:13 +0200 |
commit | 9240daf7d8feee0f7604a2ccfb905c78890d7b8b (patch) | |
tree | a3388425a89b3db9cdec2f5f3446bb7958a057c0 | |
parent | c4d58389a49c6f789ebf59ca1b46cd7f9489382d (diff) |
Fix #pragma detection on SunCC
The correct syntax is:
Reported-by: Uli Schlachter <psychon@znc.in>
-rw-r--r-- | initfini/impl/simpleops-initfini-impl-pragma.h | 15 | ||||
-rw-r--r-- | m4/ax_c_pragma.m4 | 2 |
2 files changed, 3 insertions, 14 deletions
diff --git a/initfini/impl/simpleops-initfini-impl-pragma.h b/initfini/impl/simpleops-initfini-impl-pragma.h index 82f67d7..b7f23e9 100644 --- a/initfini/impl/simpleops-initfini-impl-pragma.h +++ b/initfini/impl/simpleops-initfini-impl-pragma.h @@ -39,19 +39,8 @@ #define SIMPLEOPS_HAVE_INITFINI_IMPL 1 #define SIMPLEOPS_HAVE_INITFINI_IMPL_PRAGMA 1 -#pragma init -static void -simpleops_constructor (void) -{ - simpleops_init (); -} - -#pragma fini -static void -simpleops_destructor (void) -{ - simpleops_fini (); -} +#pragma init (simpleops_init) +#pragma fini (simpleops_fini) #endif diff --git a/m4/ax_c_pragma.m4 b/m4/ax_c_pragma.m4 index 1848c5e..d541909 100644 --- a/m4/ax_c_pragma.m4 +++ b/m4/ax_c_pragma.m4 @@ -53,7 +53,7 @@ static void foo (void) { return; } ]], [[foo ()]])], [AC_LANG_PROGRAM( [[ -@%:@pragma $1 +@%:@pragma $1 (foo) static void foo (void) { return; } ]], [[foo ()]])], [ax_cv_pragma_$1=yes], |