Re: [AD] Fortify and Allegro |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
> Hopefully with the right format now :) Sorry about the hassle :)
The format is fine. I have a few questions/remarks:
--- base.h.fortify Mon Mar 24 23:57:31 2003
+++ base.h Tue Mar 18 03:10:05 2003
@@ -31,6 +31,15 @@
#include <time.h>
#endif
+#if defined DEBUGMODE && defined ALLEGRO_USE_FORTIFY
+#if defined ALLEGRO_LIB_BUILD || defined FORTIFY
+#ifndef FORTIFY
+#define FORTIFY
+#endif
+#include <fortify/fortify.h>
+#endif
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
There are two parts in the functionnality: (1) building Allegro against
Fortify and (2) allowing users to build their Allegro programs against
Fortify.
(1) You have conditionalized the Fortify build to the debug mode, I guess
that's fine. But where does this ALLEGRO_USE_FORTIFY symbol come from? You
want the user to pass it on the 'make' command line when building Allegro?
We currently support passing symbols on the 'make' command line only on
non-Unix ports, so I'd rather not change that. Moreover, don't you need to
link the library against Fortify or something like that?
So I'd think that we need configure options for the Unix port here:
--enable-fortlib and --enable-fortprog.
(2) The normal method for configuring Allegro when compiling user programs is
to define ALLEGRO_USE_* preprocessor symbols, so ALLEGRO_USE_FORTIFY would
be fine in that case. But I see that you use the symbol FORTIFY too: is it
a standard symbol for Fortify?
--
Eric Botcazou