diff options
| author | Bruce Momjian <bruce@momjian.us> | 2000-06-02 15:57:44 +0000 |
|---|---|---|
| committer | Bruce Momjian <bruce@momjian.us> | 2000-06-02 15:57:44 +0000 |
| commit | cc2b5e5815aa596dbbdd288d0d178019f2d521aa (patch) | |
| tree | b82baecdde9295a977c530b10f8f15a91e012cda /src/interfaces/ecpg | |
| parent | bf1c8f2b3b067c29f1abdf6fe866fb485ade96e9 (diff) | |
| download | postgresql-cc2b5e5815aa596dbbdd288d0d178019f2d521aa.tar.gz | |
Remove NT-specific file open defines by defining our own open macros for
"rb" and "wb".
Diffstat (limited to 'src/interfaces/ecpg')
| -rw-r--r-- | src/interfaces/ecpg/preproc/ecpg.c | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/src/interfaces/ecpg/preproc/ecpg.c b/src/interfaces/ecpg/preproc/ecpg.c index 1cc00dbcc7..f6db59bec7 100644 --- a/src/interfaces/ecpg/preproc/ecpg.c +++ b/src/interfaces/ecpg/preproc/ecpg.c @@ -66,11 +66,7 @@ main(int argc, char *const argv[]) switch (c) { case 'o': -#ifndef __CYGWIN32__ - yyout = fopen(optarg, "w"); -#else - yyout = fopen(optarg, "wb"); -#endif + yyout = fopen(optarg, PG_BINARY_W); if (yyout == NULL) perror(optarg); else @@ -147,11 +143,7 @@ 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 + yyout = fopen(output_filename, PG_BINARY_W); if (yyout == NULL) { perror(output_filename); @@ -161,11 +153,7 @@ main(int argc, char *const argv[]) } } -#ifndef __CYGWIN32__ - yyin = fopen(input_filename, "r"); -#else - yyin = fopen(input_filename, "rb"); -#endif + yyin = fopen(input_filename, PG_BINARY_R); if (yyin == NULL) perror(argv[fnr]); else |
