diff options
Diffstat (limited to 'src/utils')
-rw-r--r-- | src/utils/Makefile | 5 | ||||
-rw-r--r-- | src/utils/version.c | 10 |
2 files changed, 13 insertions, 2 deletions
diff --git a/src/utils/Makefile b/src/utils/Makefile index cf38bc6eeb7..46ab610f118 100644 --- a/src/utils/Makefile +++ b/src/utils/Makefile @@ -4,7 +4,7 @@ # Makefile for utils # # IDENTIFICATION -# $Header: /cvsroot/pgsql/src/utils/Attic/Makefile,v 1.5 1998/04/06 00:32:26 momjian Exp $ +# $Header: /cvsroot/pgsql/src/utils/Attic/Makefile,v 1.6 1999/01/17 06:20:03 momjian Exp $ # # About strdup: Some systems have strdup in their standard library, others # don't. Ones that don't will use this make file to compile the strdup.c @@ -27,6 +27,9 @@ depend dep: clean: rm -f version.o +ifeq ($(PORTNAME), win) + rm -f dllinit.o +endif ifeq (depend,$(wildcard depend)) include depend diff --git a/src/utils/version.c b/src/utils/version.c index aef5de8b48a..7dafe60b313 100644 --- a/src/utils/version.c +++ b/src/utils/version.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/utils/Attic/version.c,v 1.9 1998/04/29 12:41:29 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/utils/Attic/version.c,v 1.10 1999/01/17 06:20:06 momjian Exp $ * * NOTES * XXX eventually, should be able to handle version identifiers @@ -68,7 +68,11 @@ ValidatePgVersion(const char *path, char **reason_p) PathSetVersionFilePath(path, full_path); +#ifndef __CYGWIN32__ if ((fd = open(full_path, O_RDONLY, 0)) == -1) +#else + if ((fd = open(full_path, O_RDONLY | O_BINARY, 0)) == -1) +#endif { *reason_p = malloc(200); sprintf(*reason_p, "File '%s' does not exist or no read permission.", full_path); @@ -123,7 +127,11 @@ SetPgVersion(const char *path, char **reason_p) PathSetVersionFilePath(path, full_path); +#ifndef __CYGWIN32__ fd = open(full_path, O_WRONLY | O_CREAT | O_EXCL, 0666); +#else + fd = open(full_path, O_WRONLY | O_CREAT | O_EXCL | O_BINARY, 0666); +#endif if (fd < 0) { *reason_p = malloc(100 + strlen(full_path)); |