diff options
Diffstat (limited to 'src/interfaces/ecpg')
| -rw-r--r-- | src/interfaces/ecpg/lib/Makefile.in | 5 | ||||
| -rw-r--r-- | src/interfaces/ecpg/preproc/Makefile | 4 | ||||
| -rw-r--r-- | src/interfaces/ecpg/preproc/ecpg.c | 12 |
3 files changed, 18 insertions, 3 deletions
diff --git a/src/interfaces/ecpg/lib/Makefile.in b/src/interfaces/ecpg/lib/Makefile.in index 88d39846de..182fd65743 100644 --- a/src/interfaces/ecpg/lib/Makefile.in +++ b/src/interfaces/ecpg/lib/Makefile.in @@ -6,7 +6,7 @@ # Copyright (c) 1994, Regents of the University of California # # IDENTIFICATION -# $Header: /cvsroot/pgsql/src/interfaces/ecpg/lib/Attic/Makefile.in,v 1.38 1998/10/19 00:00:40 tgl Exp $ +# $Header: /cvsroot/pgsql/src/interfaces/ecpg/lib/Attic/Makefile.in,v 1.39 1999/01/17 06:19:24 momjian Exp $ # #------------------------------------------------------------------------- @@ -43,6 +43,9 @@ typename.o : typename.c ../include/ecpgtype.h .PHONY: clean clean: rm -f lib$(NAME).a $(shlib) $(OBJS) +ifeq ($(PORTNAME), win) + rm -f $(NAME).def +endif depend dep: $(CC) -MM $(CFLAGS) *.c >depend diff --git a/src/interfaces/ecpg/preproc/Makefile b/src/interfaces/ecpg/preproc/Makefile index 0a5a591cc5..cd4b989f7b 100644 --- a/src/interfaces/ecpg/preproc/Makefile +++ b/src/interfaces/ecpg/preproc/Makefile @@ -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 diff --git a/src/interfaces/ecpg/preproc/ecpg.c b/src/interfaces/ecpg/preproc/ecpg.c index 16cddc77b7..11ed36ef65 100644 --- a/src/interfaces/ecpg/preproc/ecpg.c +++ b/src/interfaces/ecpg/preproc/ecpg.c @@ -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 |
