]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Stop using incbin and use od & sed to generate constant string data.
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Wed, 9 Dec 2020 14:33:58 +0000 (15:33 +0100)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Wed, 9 Dec 2020 14:36:21 +0000 (15:36 +0100)
pdns/incfiles

index c2a99c0d0e6518b3a3bda5c6ec51c79418a5c028..0cda32e6ac4e71633f4d76e84cef146f5828ba18 100755 (executable)
@@ -6,6 +6,8 @@ export LANG=C.UTF-8
 for a in $@
 do
        c=$(echo $a | tr "/.-" "___")
-       echo "INCBIN(${c}, \"${a}\");"
-       echo "static const string g_${c}{(const char*)g${c}Data, g${c}Size};"
+       echo "static const unsigned char ${c}Data[] = {"
+       od -v -t x "$a" | sed  's/^[0-9]*//' | sed 's/\([0-9a-f][0-9a-f]\)/0x\1,/g'
+       echo "0x0 };"
+       echo "static const string g_$c{(const char*)${c}Data};"
 done