I don’t think this will work… AFAIK stringify is to convert macro arguments into strings… we need to replace the contents of a string. … but I’m not cpp expert so I might be wrong…
Esteban
On 24 Feb 2016, at 15:55, Holger Freyther holger@freyther.de wrote:
On 24 Feb 2016, at 12:31, Esteban Lorenzano estebanlm@gmail.com wrote:
Hi!
# define IA32FFIPlugin SqueakFFIPrims
will not work either because preprocessor does not works inside strings :(
I don't know the context but the classic is a "stringify" macro
echo '#define STRINGIFY1(x...) #x
#define STRINGIFY(x) STRINGIFY1(x) const char* = STRINGIFY(MYPLACE);' | cc - -E -DMYPLACE=BLABLABLA
# 1 "<stdin>" # 1 "<built-in>" 1 # 1 "<built-in>" 3 # 325 "<built-in>" 3 # 1 "<command line>" 1 # 1 "<built-in>" 2 # 1 "<stdin>" 2
const char* = "BLABLABLA";