mirror of
				https://github.com/postgres/postgres.git
				synced 2025-11-03 09:13:20 +03:00 
			
		
		
		
	Remove special handling for open() in initdb for Windows
40cfe86 enforces the translation mode to text for all frontends, so this
special handling in initdb is not needed anymore.
			
			
This commit is contained in:
		@@ -491,15 +491,7 @@ readfile(const char *path)
 | 
				
			|||||||
	char	   *buffer;
 | 
						char	   *buffer;
 | 
				
			||||||
	int			c;
 | 
						int			c;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef WIN32
 | 
					 | 
				
			||||||
	/*
 | 
					 | 
				
			||||||
	 * On Windows, we have to open the file in text mode so that carriage
 | 
					 | 
				
			||||||
	 * returns are stripped.
 | 
					 | 
				
			||||||
	 */
 | 
					 | 
				
			||||||
	if ((infile = fopen(path, "rt")) == NULL)
 | 
					 | 
				
			||||||
#else
 | 
					 | 
				
			||||||
	if ((infile = fopen(path, "r")) == NULL)
 | 
						if ((infile = fopen(path, "r")) == NULL)
 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		fprintf(stderr, _("%s: could not open file \"%s\" for reading: %s\n"),
 | 
							fprintf(stderr, _("%s: could not open file \"%s\" for reading: %s\n"),
 | 
				
			||||||
				progname, path, strerror(errno));
 | 
									progname, path, strerror(errno));
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user