mirror of
https://github.com/postgres/postgres.git
synced 2025-11-04 20:11:56 +03:00
Apply Win32 patch from Horak Daniel.
This commit is contained in:
@@ -15,10 +15,10 @@ OBJ=y.tab.o pgc.o type.o ecpg.o ecpg_keywords.o ../../../backend/parser/scansup.
|
||||
all:: ecpg
|
||||
|
||||
clean:
|
||||
rm -f *.o core a.out ecpg y.tab.h y.tab.c pgc.c *~
|
||||
rm -f *.o core a.out ecpg$(X) y.tab.h y.tab.c pgc.c *~
|
||||
|
||||
install: all
|
||||
$(INSTALL) $(INSTL_EXE_OPTS) ecpg $(DESTDIR)$(BINDIR)
|
||||
$(INSTALL) $(INSTL_EXE_OPTS) ecpg$(X) $(DESTDIR)$(BINDIR)
|
||||
|
||||
uninstall:
|
||||
rm -f $(DESTDIR)$(BINDIR)/ecpg
|
||||
|
||||
@@ -61,7 +61,11 @@ main(int argc, char *const argv[])
|
||||
switch (c)
|
||||
{
|
||||
case 'o':
|
||||
#ifndef __CYGWIN32__
|
||||
yyout = fopen(optarg, "w");
|
||||
#else
|
||||
yyout = fopen(optarg, "wb");
|
||||
#endif
|
||||
if (yyout == NULL)
|
||||
perror(optarg);
|
||||
else
|
||||
@@ -126,7 +130,11 @@ main(int argc, char *const argv[])
|
||||
ptr2ext[1] = 'c';
|
||||
ptr2ext[2] = '\0';
|
||||
|
||||
#ifndef __CYGWIN32__
|
||||
yyout = fopen(output_filename, "w");
|
||||
#else
|
||||
yyout = fopen(output_filename, "wb");
|
||||
#endif
|
||||
if (yyout == NULL)
|
||||
{
|
||||
perror(output_filename);
|
||||
@@ -136,7 +144,11 @@ main(int argc, char *const argv[])
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef __CYGWIN32__
|
||||
yyin = fopen(input_filename, "r");
|
||||
#else
|
||||
yyin = fopen(input_filename, "rb");
|
||||
#endif
|
||||
if (yyin == NULL)
|
||||
perror(argv[fnr]);
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user