[libsigc++2] Don't use __file__ in the FIREWALL m4 macro.
- From: Kjell Ahlstedt <kjellahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsigc++2] Don't use __file__ in the FIREWALL m4 macro.
- Date: Wed, 1 May 2013 13:52:56 +0000 (UTC)
commit 1d0cb5c554fe57648d26689ca1854153a153a8e5
Author: Kjell Ahlstedt <kjell ahlstedt bredband net>
Date: Wed May 1 15:40:17 2013 +0200
Don't use __file__ in the FIREWALL m4 macro.
* sigc++/adaptors/lambda/macros/group.h.m4:
* sigc++/adaptors/macros/*.h.m4:
* sigc++/functors/macros/*.h.m4:
* sigc++/macros/class_slot.h.m4:
* sigc++/macros/hide.h.m4:
* sigc++/macros/limit_reference.h.m4:
* sigc++/macros/method_slot.h.m4:
* sigc++/macros/retype.h.m4:
* sigc++/macros/slot.h.m4: Replace __FIREWALL__ with _FIREWALL(filename).
* sigc++/macros/template.macros.m4: Replace __FIREWALL__ with _FIREWALL,
taking a parameter. Don't use __file__ to generate the name of the C++
preprocessor macro. __file__ may expand to an absolute path, containing
almost all sorts of special characters and being excessively long.
Bug #699168.
ChangeLog | 19 +++++++++++++++++++
sigc++/adaptors/lambda/macros/group.h.m4 | 2 +-
sigc++/adaptors/macros/adaptor_trait.h.m4 | 2 +-
sigc++/adaptors/macros/bind.h.m4 | 2 +-
sigc++/adaptors/macros/bind_return.h.m4 | 2 +-
sigc++/adaptors/macros/compose.h.m4 | 2 +-
sigc++/adaptors/macros/deduce_result_type.h.m4 | 3 +--
sigc++/adaptors/macros/exception_catch.h.m4 | 2 +-
sigc++/adaptors/macros/hide.h.m4 | 2 +-
sigc++/adaptors/macros/retype.h.m4 | 2 +-
sigc++/adaptors/macros/retype_return.h.m4 | 2 +-
sigc++/adaptors/macros/track_obj.h.m4 | 2 +-
sigc++/functors/macros/functor_trait.h.m4 | 3 +--
sigc++/functors/macros/mem_fun.h.m4 | 2 +-
sigc++/functors/macros/ptr_fun.h.m4 | 2 +-
sigc++/functors/macros/slot.h.m4 | 2 +-
sigc++/macros/class_slot.h.m4 | 2 +-
sigc++/macros/hide.h.m4 | 2 +-
sigc++/macros/limit_reference.h.m4 | 7 +------
sigc++/macros/method_slot.h.m4 | 2 +-
sigc++/macros/retype.h.m4 | 2 +-
sigc++/macros/slot.h.m4 | 2 +-
sigc++/macros/template.macros.m4 | 11 ++++-------
23 files changed, 44 insertions(+), 35 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index e2bb620..580831b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,22 @@
+2013-05-01 Kjell Ahlstedt <kjell ahlstedt bredband net>
+
+ Don't use __file__ in the FIREWALL m4 macro.
+
+ * sigc++/adaptors/lambda/macros/group.h.m4:
+ * sigc++/adaptors/macros/*.h.m4:
+ * sigc++/functors/macros/*.h.m4:
+ * sigc++/macros/class_slot.h.m4:
+ * sigc++/macros/hide.h.m4:
+ * sigc++/macros/limit_reference.h.m4:
+ * sigc++/macros/method_slot.h.m4:
+ * sigc++/macros/retype.h.m4:
+ * sigc++/macros/slot.h.m4: Replace __FIREWALL__ with _FIREWALL(filename).
+ * sigc++/macros/template.macros.m4: Replace __FIREWALL__ with _FIREWALL,
+ taking a parameter. Don't use __file__ to generate the name of the C++
+ preprocessor macro. __file__ may expand to an absolute path, containing
+ almost all sorts of special characters and being excessively long.
+ Bug #699168.
+
2013-04-11 Kjell Ahlstedt <kjell ahlstedt bredband net>
Use DOXYGEN_SHOULD_SKIP_THIS consistently.
diff --git a/sigc++/adaptors/lambda/macros/group.h.m4 b/sigc++/adaptors/lambda/macros/group.h.m4
index fb7ccdd..353d6e6 100644
--- a/sigc++/adaptors/lambda/macros/group.h.m4
+++ b/sigc++/adaptors/lambda/macros/group.h.m4
@@ -119,7 +119,7 @@ FOR(1, $1,[
])
divert(0)dnl
-__FIREWALL__
+_FIREWALL([LAMBDA_GROUP])
#include <sigc++/adaptors/lambda/base.h>
_DEPRECATE_IFDEF_START
diff --git a/sigc++/adaptors/macros/adaptor_trait.h.m4 b/sigc++/adaptors/macros/adaptor_trait.h.m4
index b0782af..76a936b 100644
--- a/sigc++/adaptors/macros/adaptor_trait.h.m4
+++ b/sigc++/adaptors/macros/adaptor_trait.h.m4
@@ -71,7 +71,7 @@ FOR(1, $1,[
])
divert(0)dnl
-__FIREWALL__
+_FIREWALL([ADAPTORS_ADAPTOR_TRAIT])
#include <sigc++config.h> //To get SIGC_TEMPLATE_KEYWORD_OPERATOR_OVERLOAD
#include <sigc++/visit_each.h>
#include <sigc++/functors/functor_trait.h>
diff --git a/sigc++/adaptors/macros/bind.h.m4 b/sigc++/adaptors/macros/bind.h.m4
index 1d230cd..84fab5b 100644
--- a/sigc++/adaptors/macros/bind.h.m4
+++ b/sigc++/adaptors/macros/bind.h.m4
@@ -227,7 +227,7 @@ FOR(1,eval($1-1),[
])
divert(0)dnl
-__FIREWALL__
+_FIREWALL([ADAPTORS_BIND])
#include <sigc++/adaptors/adaptor_trait.h>
#include <sigc++/adaptors/bound_argument.h>
diff --git a/sigc++/adaptors/macros/bind_return.h.m4 b/sigc++/adaptors/macros/bind_return.h.m4
index 2c22488..12d8e70 100644
--- a/sigc++/adaptors/macros/bind_return.h.m4
+++ b/sigc++/adaptors/macros/bind_return.h.m4
@@ -41,7 +41,7 @@ FOR(1, $1,[
])
divert(0)dnl
-__FIREWALL__
+_FIREWALL([ADAPTORS_BIND_RETURN])
#include <sigc++/adaptors/adaptor_trait.h>
#include <sigc++/adaptors/bound_argument.h>
diff --git a/sigc++/adaptors/macros/compose.h.m4 b/sigc++/adaptors/macros/compose.h.m4
index 1e445db..8e890ee 100644
--- a/sigc++/adaptors/macros/compose.h.m4
+++ b/sigc++/adaptors/macros/compose.h.m4
@@ -40,7 +40,7 @@ define([COMPOSE2_OPERATOR],[dnl
])
divert(0)
-__FIREWALL__
+_FIREWALL([ADAPTORS_COMPOSE])
#include <sigc++/adaptors/adaptor_trait.h>
namespace sigc {
diff --git a/sigc++/adaptors/macros/deduce_result_type.h.m4 b/sigc++/adaptors/macros/deduce_result_type.h.m4
index 743103e..1c1f416 100644
--- a/sigc++/adaptors/macros/deduce_result_type.h.m4
+++ b/sigc++/adaptors/macros/deduce_result_type.h.m4
@@ -42,10 +42,9 @@ dnl ])
divert(0)dnl
/*
*/
-__FIREWALL__
+_FIREWALL([ADAPTORS_DEDUCE_RESULT_TYPE])
#include <sigc++/functors/functor_trait.h>
-
namespace sigc {
/** A hint to the compiler.
diff --git a/sigc++/adaptors/macros/exception_catch.h.m4 b/sigc++/adaptors/macros/exception_catch.h.m4
index ddde45c..f9a9a73 100644
--- a/sigc++/adaptors/macros/exception_catch.h.m4
+++ b/sigc++/adaptors/macros/exception_catch.h.m4
@@ -35,7 +35,7 @@ define([EXCEPTION_CATCH_OPERATOR],[dnl
])
divert(0)dnl
-__FIREWALL__
+_FIREWALL([ADAPTORS_EXCEPTION_CATCH])
#include <sigc++/adaptors/adaptor_trait.h>
namespace sigc {
diff --git a/sigc++/adaptors/macros/hide.h.m4 b/sigc++/adaptors/macros/hide.h.m4
index 11d9060..3140323 100644
--- a/sigc++/adaptors/macros/hide.h.m4
+++ b/sigc++/adaptors/macros/hide.h.m4
@@ -131,7 +131,7 @@ ifelse($1,eval(CALL_SIZE-1),[#endif // DOXYGEN_SHOULD_SKIP_THIS
])dnl end HIDE_FUNCTOR
divert(0)dnl
-__FIREWALL__
+_FIREWALL([ADAPTORS_HIDE])
#include <sigc++/adaptors/adaptor_trait.h>
namespace sigc {
diff --git a/sigc++/adaptors/macros/retype.h.m4 b/sigc++/adaptors/macros/retype.h.m4
index 69ea38f..dda09b3 100644
--- a/sigc++/adaptors/macros/retype.h.m4
+++ b/sigc++/adaptors/macros/retype.h.m4
@@ -75,7 +75,7 @@ retype(const $2[]mem_functor$1<LIST(T_return, T_obj, LOOP(T_arg%1, $1))>& _A_fun
])
divert(0)dnl
-__FIREWALL__
+_FIREWALL([ADAPTORS_RETYPE])
#include <sigc++/adaptors/adaptor_trait.h>
#include <sigc++/functors/ptr_fun.h>
#include <sigc++/functors/mem_fun.h>
diff --git a/sigc++/adaptors/macros/retype_return.h.m4 b/sigc++/adaptors/macros/retype_return.h.m4
index cc3e0d8..7bcec1c 100644
--- a/sigc++/adaptors/macros/retype_return.h.m4
+++ b/sigc++/adaptors/macros/retype_return.h.m4
@@ -52,7 +52,7 @@ define([RETYPE_RETURN_VOID_OPERATOR],[dnl
])
divert(0)dnl
-__FIREWALL__
+_FIREWALL([ADAPTORS_RETYPE_RETURN])
#include <sigc++/adaptors/adaptor_trait.h>
namespace sigc {
diff --git a/sigc++/adaptors/macros/track_obj.h.m4 b/sigc++/adaptors/macros/track_obj.h.m4
index 18e469b..f7cde4e 100644
--- a/sigc++/adaptors/macros/track_obj.h.m4
+++ b/sigc++/adaptors/macros/track_obj.h.m4
@@ -128,7 +128,7 @@ track_obj(const T_functor& _A_func, LOOP(const T_obj%1& _A_obj%1, $1))
])dnl end TRACK_OBJECT
divert(0)dnl
-__FIREWALL__
+_FIREWALL([ADAPTORS_TRACK_OBJ])
#include <sigc++/adaptors/adaptor_trait.h>
#include <sigc++/limit_reference.h>
diff --git a/sigc++/functors/macros/functor_trait.h.m4 b/sigc++/functors/macros/functor_trait.h.m4
index 9a6052a..915e27d 100644
--- a/sigc++/functors/macros/functor_trait.h.m4
+++ b/sigc++/functors/macros/functor_trait.h.m4
@@ -46,10 +46,9 @@ struct functor_trait<T_return (T_obj::*)(LOOP(T_arg%1, $1)) const, false>
])
divert(0)dnl
-__FIREWALL__
+_FIREWALL([FUNCTORS_FUNCTOR_TRAIT])
#include <sigc++/type_traits.h>
-
namespace sigc {
/** nil struct type.
diff --git a/sigc++/functors/macros/mem_fun.h.m4 b/sigc++/functors/macros/mem_fun.h.m4
index 718a967..814aa56 100644
--- a/sigc++/functors/macros/mem_fun.h.m4
+++ b/sigc++/functors/macros/mem_fun.h.m4
@@ -184,7 +184,7 @@ divert(0)
// - we do not use bind here, because it would introduce
// an extra copy and complicate the header include order if bind is
// to have automatic conversion for member pointers.
-__FIREWALL__
+_FIREWALL([FUNCTORS_MEM_FUN])
#include <sigc++/type_traits.h>
#include <sigc++/functors/functor_trait.h>
#include <sigc++/limit_reference.h>
diff --git a/sigc++/functors/macros/ptr_fun.h.m4 b/sigc++/functors/macros/ptr_fun.h.m4
index 0dbd4bc..6bd734e 100644
--- a/sigc++/functors/macros/ptr_fun.h.m4
+++ b/sigc++/functors/macros/ptr_fun.h.m4
@@ -72,7 +72,7 @@ ptr_fun[]ifelse($2,, $1)(T_return (*_A_func)(LOOP(T_arg%1,$1)))
])
divert(0)
-__FIREWALL__
+_FIREWALL([FUNCTORS_PTR_FUN])
#include <sigc++/type_traits.h>
#include <sigc++/functors/functor_trait.h>
diff --git a/sigc++/functors/macros/slot.h.m4 b/sigc++/functors/macros/slot.h.m4
index f5a45c0..1a125ef 100644
--- a/sigc++/functors/macros/slot.h.m4
+++ b/sigc++/functors/macros/slot.h.m4
@@ -200,7 +200,7 @@ ifelse($1,0,[
])
divert(0)dnl
-__FIREWALL__
+_FIREWALL([FUNCTORS_SLOT])
#include <sigc++/trackable.h>
#include <sigc++/visit_each.h>
#include <sigc++/adaptors/adaptor_trait.h>
diff --git a/sigc++/macros/class_slot.h.m4 b/sigc++/macros/class_slot.h.m4
index 16ca94b..b84b837 100644
--- a/sigc++/macros/class_slot.h.m4
+++ b/sigc++/macros/class_slot.h.m4
@@ -20,7 +20,7 @@ include(template.macros.m4)
divert(0)
-__FIREWALL__
+_FIREWALL([CLASS_SLOT])
#include <sigc++/slot.h>
#include <sigc++/functors/mem_fun.h>
diff --git a/sigc++/macros/hide.h.m4 b/sigc++/macros/hide.h.m4
index ff13062..938cdba 100644
--- a/sigc++/macros/hide.h.m4
+++ b/sigc++/macros/hide.h.m4
@@ -20,4 +20,4 @@ include(template.macros.m4)
divert(0)dnl
-__FIREWALL__
+_FIREWALL([HIDE])
diff --git a/sigc++/macros/limit_reference.h.m4 b/sigc++/macros/limit_reference.h.m4
index d8f0801..1780611 100644
--- a/sigc++/macros/limit_reference.h.m4
+++ b/sigc++/macros/limit_reference.h.m4
@@ -133,16 +133,13 @@ visit_each(const T_action& _A_action,
divert(0)
-__FIREWALL__
-
+_FIREWALL([LIMIT_REFERENCE])
#include <sigc++/type_traits.h>
#include <sigc++/trackable.h>
-
namespace sigc {
-
LIMIT_REFERENCE([],[],[])dnl
@@ -154,7 +151,5 @@ LIMIT_REFERENCE([volatile_],[],[volatile ])dnl
LIMIT_REFERENCE([const_volatile_],[const ],[const volatile ])dnl
-
} /* namespace sigc */
-
diff --git a/sigc++/macros/method_slot.h.m4 b/sigc++/macros/method_slot.h.m4
index 5729fca..21e6207 100644
--- a/sigc++/macros/method_slot.h.m4
+++ b/sigc++/macros/method_slot.h.m4
@@ -20,4 +20,4 @@ include(template.macros.m4)
divert(0)
-__FIREWALL__
+_FIREWALL([METHOD_SLOT])
diff --git a/sigc++/macros/retype.h.m4 b/sigc++/macros/retype.h.m4
index 03ab082..7b7dde8 100644
--- a/sigc++/macros/retype.h.m4
+++ b/sigc++/macros/retype.h.m4
@@ -69,7 +69,7 @@ retype(const Slot$1<LIST(T_ret, LOOP(T_type%1, $1))>& _A_slot)
])
divert(0)dnl
-__FIREWALL__
+_FIREWALL([RETYPE])
#include <sigc++/adaptors/adaptor_trait.h>
#include <sigc++/slot.h>
diff --git a/sigc++/macros/slot.h.m4 b/sigc++/macros/slot.h.m4
index 04c7ad7..ce8d461 100644
--- a/sigc++/macros/slot.h.m4
+++ b/sigc++/macros/slot.h.m4
@@ -20,6 +20,6 @@ include(template.macros.m4)
divert(0)
-__FIREWALL__
+_FIREWALL([SLOT])
#include <sigc++/functors/slot.h>
diff --git a/sigc++/macros/template.macros.m4 b/sigc++/macros/template.macros.m4
index dc1259e..03b0667 100644
--- a/sigc++/macros/template.macros.m4
+++ b/sigc++/macros/template.macros.m4
@@ -31,14 +31,11 @@ dnl
define([CALL_SIZE],7)
#Generate header guards:
-define([__FIREWALL__],[dnl
-define(__hfile_temp__,[translit(__file__,/., _)])dnl
-define(__hfile_temp2__,[translit(__hfile_temp__,+., _)])dnl
-define(__hfile__,[_SIGC_[]patsubst(translit(__hfile_temp2__,a-z.,A-Z_), _M4$)_])dnl
-#ifndef __hfile__
-#define __hfile__[]dnl
+define([_FIREWALL],[dnl
+#ifndef _SIGC_$1_H_
+#define _SIGC_$1_H_[]dnl
divert(1)dnl
-#endif /* __hfile__ */
+#endif /* _SIGC_$1_H_ */
divert(0)dnl
])
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]