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/backend/libpq/hba.c | |
parent | bf1c8f2b3b067c29f1abdf6fe866fb485ade96e9 (diff) | |
download | postgresql-cc2b5e5815aa596dbbdd288d0d178019f2d521aa.tar.gz postgresql-cc2b5e5815aa596dbbdd288d0d178019f2d521aa.zip |
Remove NT-specific file open defines by defining our own open macros for
"rb" and "wb".
Diffstat (limited to 'src/backend/libpq/hba.c')
-rw-r--r-- | src/backend/libpq/hba.c | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/src/backend/libpq/hba.c b/src/backend/libpq/hba.c index 2bdf5fbf4b4..61c6b9f4361 100644 --- a/src/backend/libpq/hba.c +++ b/src/backend/libpq/hba.c @@ -5,7 +5,7 @@ * wherein you authenticate a user by seeing what IP address the system * says he comes from and possibly using ident). * - * $Id: hba.c,v 1.51 2000/04/12 17:15:14 momjian Exp $ + * $Id: hba.c,v 1.52 2000/06/02 15:57:20 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -397,11 +397,7 @@ find_hba_entry(hbaPort *port, bool *hba_ok_p) old_conf_file = (char *) palloc(bufsize); snprintf(old_conf_file, bufsize, "%s/%s", DataDir, OLD_CONF_FILE); -#ifndef __CYGWIN32__ - if ((fd = open(old_conf_file, O_RDONLY, 0)) != -1) -#else - if ((fd = open(old_conf_file, O_RDONLY | O_BINARY, 0)) != -1) -#endif + if ((fd = open(old_conf_file, O_RDONLY | PG_BINARY, 0)) != -1) { /* Old config file exists. Tell this guy he needs to upgrade. */ close(fd); @@ -810,11 +806,7 @@ verify_against_usermap(const char *pguser, map_file = (char *) palloc(bufsize); snprintf(map_file, bufsize, "%s/%s", DataDir, USERMAP_FILE); -#ifndef __CYGWIN32__ - file = AllocateFile(map_file, "r"); -#else - file = AllocateFile(map_file, "rb"); -#endif + file = AllocateFile(map_file, PG_BINARY_R); if (file == NULL) { /* The open of the map file failed. */ @@ -986,11 +978,7 @@ GetCharSetByHost(char *TableName, int host, const char *DataDir) bufsize = (strlen(DataDir) + strlen(CHARSET_FILE) + 2) * sizeof(char); map_file = (char *) palloc(bufsize); snprintf(map_file, bufsize, "%s/%s", DataDir, CHARSET_FILE); -#ifndef __CYGWIN32__ - file = AllocateFile(map_file, "r"); -#else - file = AllocateFile(map_file, "rb"); -#endif + file = AllocateFile(map_file, PG_BINARY_R); if (file == NULL) return; while (!eof) |