[PD-dev] snprintf vs. sprintf_s?
Russell Bryant
russell at russellbryant.net
Wed Jan 16 19:41:38 CET 2008
zmoelnig at iem.at wrote:
> btw, is there a way to specify at compile-time which file to include?
> something like:
>
> #define CONFIG_H_FILE "config.h"
>
> #ifdef CONFIG_H_FILE
> # include CONFIG_H_FILE
> #endif
>
> (this won't work, but is there something similar?)
The only thing I can think of is just something like this, assuming ahead of
time you know the defined set of headers you might potentially include.
#if defined(INCLUDE_CONFIG_H)
#include "config.h"
#elif defined(INCLUDE_CONFIGMSW_H)
#include "configMSW.h"
#endif
In the case of using a configure script, you can certainly dynamically generate
content for a generated header file.
MY_HEADER=something.h
AH_TOP(
#include "${MY_HEADER}"
)
--
Russell Bryant
More information about the Pd-dev
mailing list