File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed
src/interfaces/ecpg/preproc Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -42,11 +42,9 @@ PostgreSQL documentation
42
42
<para>
43
43
<command>ecpg</command> will convert each input file given on the
44
44
command line to the corresponding C output file. Input files
45
- preferably have the extension <filename>.pgc</filename>, in which
46
- case the extension will be replaced by <filename>.c</filename> to
47
- determine the output file name. If the extension of the input file
48
- is not <filename>.pgc</filename>, then the output file name is
49
- computed by appending <literal>.c</literal> to the full file name.
45
+ preferably have the extension <filename>.pgc</filename>.
46
+ The extension will be replaced by <filename>.c</filename> to
47
+ determine the output file name.
50
48
The output file name can also be overridden using the
51
49
<option>-o</option> option.
52
50
</para>
Original file line number Diff line number Diff line change @@ -309,7 +309,8 @@ main(int argc, char *const argv[])
309
309
base_yyout = stdout ;
310
310
else
311
311
{
312
- output_filename = strdup (input_filename );
312
+ output_filename = mm_alloc (strlen (input_filename ) + 3 );
313
+ strcpy (output_filename , input_filename );
313
314
314
315
ptr2ext = strrchr (output_filename , '.' );
315
316
/* make extension = .c resp. .h */
You can’t perform that action at this time.
0 commit comments