gendef: wrap exported function names which include dots with double quotes to avoid linking problems

This commit is contained in:
Soar Qin 2017-06-30 11:45:51 +08:00
parent 657f4ac2d5
commit ec9f9d6a17

View File

@ -658,7 +658,10 @@ dump_def (void)
if (exp->name[0] == 0)
fprintf (fp, "ord_%u", (unsigned int) exp->ord);
else
fprintf (fp, "%s", exp->name);
{
const char *quote = strchr (exp->name, '.') ? "\"" : "";
fprintf (fp, "%s%s%s", quote, exp->name, quote);
}
if (exp->name[0] == '?' && exp->name[1] == '?')
{
if (!strncmp (exp->name, "??_7", 4))