During build some header guards are created based on full path where
build is happening. If one directory contains @ character build breaks
because compiler believes it's a macro declaration.
Jenkins adds `@${EXECUTOR_NUMBER}` suffix to workspace directory when
it uses more than one executor for that job, breaking the build.
Replace any @ character on guard name by _ to get it fixed.
Type: fix
Change-Id: Id0f4cfc33fda95e168541aa4e353a0d08aa3b664
Signed-off-by: Renato Botelho do Couto <renato@netgate.com>
sys.stdout = io
include_guard = "__included_%s" % (
j.replace(".", "_").replace("/", "_").replace("-", "_").replace(
- "+", "_"))
+ "+", "_").replace("@", "_"))
print("#ifndef %s" % include_guard)
print("#define %s" % include_guard)
print("")
sys.stdout = io
d, f = os.path.split(j)
include_guard = "__included_hpp_%s" % (
- f.replace(".", "_").replace("/", "_").replace("-", "_"))
+ f.replace(".", "_").replace("/", "_").replace("-", "_").replace(
+ "@", "_"))
print("#ifndef %s" % include_guard)
print("#define %s" % include_guard)
print("")