help / color / mirror / Atom feed
* mdocml [CVS_2015_11_07] C++ Declaration Guards
@ 2015-11-07  3:29 Peter Bray
  2015-11-07  3:37 ` Guy Harris
  2015-11-07 14:06 ` Ingo Schwarze
  0 siblings, 2 replies; 7+ messages in thread
From: Peter Bray @ 2015-11-07  3:29 UTC (permalink / raw)
  To: discuss


Many of the header files in the mdocml project use the cpp(1) macros
'__BEGIN_DECLS' && '__END_DECLS', which IMHO is "A Good Thing(TM)".

But neither Solaris 10 or 11.2 define these macros in any standard
header files, so the project has to provide them.

Currently, this is done by generating the appropriate code into 'config.h'.

This is not sufficient to allow the code to compile on Solaris 10.

To progress the build, the files 'mandoc.h' and 'mandoc_aux.h' can be
edited to include the line '#include "config.h"'. And the build will

Unfortunately, this is not a desirable solution, as these header files
get installed via 'make install'. So the correct solution will
probably involve having these definitions moved from 'config.h' to an
installed header file. If users of the library will always load a
common header file, than the declaration could go there. But the
project's own code, requires that at least two files be edited to
allow the build to proceed (as mentioned above).

Alternatively, maybe a generated header, say mandoc_compat.h could be
generated by the configure scripts and all the (installed) header
files using '__BEGIN_DECLS' && '__END_DECLS', could
'#include"mandoc_compat.h", as an example.

I'll leave it to the developers and maintainers to choose the
appropriate solution for their code base.


Peter Bray
Sydney, Australia
 To unsubscribe send an email to discuss+unsubscribe@mdocml.bsd.lv

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-11-11 10:57 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-07  3:29 mdocml [CVS_2015_11_07] C++ Declaration Guards Peter Bray
2015-11-07  3:37 ` Guy Harris
2015-11-07 14:06 ` Ingo Schwarze
2015-11-07 14:25   ` Joerg Sonnenberger
2015-11-07 14:34     ` Ingo Schwarze
2015-11-07 14:37       ` Joerg Sonnenberger
2015-11-11 10:57     ` Steffen Nurpmeso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).