diff -rpcd orig/src/interfaces/ecpg/preproc/output.c new/src/interfaces/ecpg/preproc/output.c *** orig/src/interfaces/ecpg/preproc/output.c 2013-06-25 03:55:41.000000000 +0900 --- new/src/interfaces/ecpg/preproc/output.c 2013-07-03 14:07:18.000000000 +0900 *************** hashline_number(void) *** 95,103 **** #endif ) { ! char *line = mm_alloc(strlen("\n#line %d \"%s\"\n") + sizeof(int) * CHAR_BIT * 10 / 3 + strlen(input_filename)); ! sprintf(line, "\n#line %d \"%s\"\n", yylineno, input_filename); return line; } --- 95,116 ---- #endif ) { ! /* "* 2" here is for escaping \s below */ ! char *line = mm_alloc(strlen("\n#line %d \"%s\"\n") + sizeof(int) * CHAR_BIT * 10 / 3 + strlen(input_filename) *2); ! char *src, ! *dest; ! sprintf(line, "\n#line %d \"", yylineno); ! src = input_filename; ! dest = line + strlen(line); ! while (*src) ! { ! if (*src == '\\') ! *dest++ = '\\'; ! *dest++ = *src++; ! } ! *dest = '\0'; ! strcat(dest, "\"\n"); return line; }