diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2015-08-07 22:30:10 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2015-08-07 22:30:10 -0700 |
commit | 2c903943d95b6af00a4819ac03ec5f010ba91076 (patch) | |
tree | d92ac4d464fe4a4d9a179bfba8f0dced5cebc6a5 /lib.h | |
parent | af996f5191f3385769e2eb58153cc9039d0fcc28 (diff) | |
download | txr-2c903943d95b6af00a4819ac03ec5f010ba91076.tar.gz txr-2c903943d95b6af00a4819ac03ec5f010ba91076.tar.bz2 txr-2c903943d95b6af00a4819ac03ec5f010ba91076.zip |
C++ static forward issue.
* lib.h (static_forward, static_def): New macros
for dealing with C++ static forward declaration problem.
* syslog.c (syslog_strm_ops): Use static
forward macros.
Diffstat (limited to 'lib.h')
-rw-r--r-- | lib.h | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -954,3 +954,11 @@ loc list_collect_append(loc pptail, val obj); #define negone num_fast(-1) #define maxint num_fast(NUM_MAX) #define minint num_fast(NUM_MIN) + +#ifdef __cplusplus +#define static_forward(decl) namespace { extern decl; } +#define static_def(def) namespace { def; } +#else +#define static_forward(decl) static decl; +#define static_def(def) static def; +#endif |