mirror of
				https://github.com/postgres/postgres.git
				synced 2025-11-03 09:13:20 +03:00 
			
		
		
		
	C comments: remove odd blank lines after #ifdef WIN32 lines
This commit is contained in:
		@@ -4182,7 +4182,6 @@ RemoveOldXlogFiles(XLogSegNo segno, XLogRecPtr endptr)
 | 
				
			|||||||
									xlde->d_name)));
 | 
														xlde->d_name)));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef WIN32
 | 
					#ifdef WIN32
 | 
				
			||||||
 | 
					 | 
				
			||||||
					/*
 | 
										/*
 | 
				
			||||||
					 * On Windows, if another process (e.g another backend)
 | 
										 * On Windows, if another process (e.g another backend)
 | 
				
			||||||
					 * holds the file open in FILE_SHARE_DELETE mode, unlink
 | 
										 * holds the file open in FILE_SHARE_DELETE mode, unlink
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -692,7 +692,6 @@ StreamConnection(pgsocket server_fd, Port *port)
 | 
				
			|||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef WIN32
 | 
					#ifdef WIN32
 | 
				
			||||||
 | 
					 | 
				
			||||||
		/*
 | 
							/*
 | 
				
			||||||
		 * This is a Win32 socket optimization.  The ideal size is 32k.
 | 
							 * This is a Win32 socket optimization.  The ideal size is 32k.
 | 
				
			||||||
		 * http://support.microsoft.com/kb/823764/EN-US/
 | 
							 * http://support.microsoft.com/kb/823764/EN-US/
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -107,7 +107,6 @@ main(int argc, char *argv[])
 | 
				
			|||||||
	set_pglocale_pgservice(argv[0], PG_TEXTDOMAIN("postgres"));
 | 
						set_pglocale_pgservice(argv[0], PG_TEXTDOMAIN("postgres"));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef WIN32
 | 
					#ifdef WIN32
 | 
				
			||||||
 | 
					 | 
				
			||||||
	/*
 | 
						/*
 | 
				
			||||||
	 * Windows uses codepages rather than the environment, so we work around
 | 
						 * Windows uses codepages rather than the environment, so we work around
 | 
				
			||||||
	 * that by querying the environment explicitly first for LC_COLLATE and
 | 
						 * that by querying the environment explicitly first for LC_COLLATE and
 | 
				
			||||||
@@ -183,7 +182,6 @@ main(int argc, char *argv[])
 | 
				
			|||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef WIN32
 | 
					#ifdef WIN32
 | 
				
			||||||
 | 
					 | 
				
			||||||
	/*
 | 
						/*
 | 
				
			||||||
	 * Start our win32 signal implementation
 | 
						 * Start our win32 signal implementation
 | 
				
			||||||
	 *
 | 
						 *
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1063,7 +1063,6 @@ PostmasterMain(int argc, char *argv[])
 | 
				
			|||||||
	InitPostmasterDeathWatchHandle();
 | 
						InitPostmasterDeathWatchHandle();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef WIN32
 | 
					#ifdef WIN32
 | 
				
			||||||
 | 
					 | 
				
			||||||
	/*
 | 
						/*
 | 
				
			||||||
	 * Initialize I/O completion port used to deliver list of dead children.
 | 
						 * Initialize I/O completion port used to deliver list of dead children.
 | 
				
			||||||
	 */
 | 
						 */
 | 
				
			||||||
@@ -2929,8 +2928,8 @@ CleanupBackend(int pid,
 | 
				
			|||||||
	 * assume everything is all right and proceed to remove the backend from
 | 
						 * assume everything is all right and proceed to remove the backend from
 | 
				
			||||||
	 * the active backend list.
 | 
						 * the active backend list.
 | 
				
			||||||
	 */
 | 
						 */
 | 
				
			||||||
#ifdef WIN32
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifdef WIN32
 | 
				
			||||||
	/*
 | 
						/*
 | 
				
			||||||
	 * On win32, also treat ERROR_WAIT_NO_CHILDREN (128) as nonfatal case,
 | 
						 * On win32, also treat ERROR_WAIT_NO_CHILDREN (128) as nonfatal case,
 | 
				
			||||||
	 * since that sometimes happens under load when the process fails to start
 | 
						 * since that sometimes happens under load when the process fails to start
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1957,7 +1957,6 @@ ReadDir(DIR *dir, const char *dirname)
 | 
				
			|||||||
		return dent;
 | 
							return dent;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef WIN32
 | 
					#ifdef WIN32
 | 
				
			||||||
 | 
					 | 
				
			||||||
	/*
 | 
						/*
 | 
				
			||||||
	 * This fix is in mingw cvs (runtime/mingwex/dirent.c rev 1.4), but not in
 | 
						 * This fix is in mingw cvs (runtime/mingwex/dirent.c rev 1.4), but not in
 | 
				
			||||||
	 * released version
 | 
						 * released version
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -463,7 +463,6 @@ PGLC_localeconv(void)
 | 
				
			|||||||
		save_lc_numeric = pstrdup(save_lc_numeric);
 | 
							save_lc_numeric = pstrdup(save_lc_numeric);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef WIN32
 | 
					#ifdef WIN32
 | 
				
			||||||
 | 
					 | 
				
			||||||
	/*
 | 
						/*
 | 
				
			||||||
	 * Ideally, monetary and numeric local symbols could be returned in any
 | 
						 * Ideally, monetary and numeric local symbols could be returned in any
 | 
				
			||||||
	 * server encoding.  Unfortunately, the WIN32 API does not allow
 | 
						 * server encoding.  Unfortunately, the WIN32 API does not allow
 | 
				
			||||||
@@ -645,7 +644,6 @@ cache_locale_time(void)
 | 
				
			|||||||
		save_lc_time = pstrdup(save_lc_time);
 | 
							save_lc_time = pstrdup(save_lc_time);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef WIN32
 | 
					#ifdef WIN32
 | 
				
			||||||
 | 
					 | 
				
			||||||
	/*
 | 
						/*
 | 
				
			||||||
	 * On WIN32, there is no way to get locale-specific time values in a
 | 
						 * On WIN32, there is no way to get locale-specific time values in a
 | 
				
			||||||
	 * specified locale, like we do for monetary/numeric.  We can only get
 | 
						 * specified locale, like we do for monetary/numeric.  We can only get
 | 
				
			||||||
@@ -1172,7 +1170,6 @@ wchar2char(char *to, const wchar_t *from, size_t tolen, pg_locale_t locale)
 | 
				
			|||||||
		return 0;
 | 
							return 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef WIN32
 | 
					#ifdef WIN32
 | 
				
			||||||
 | 
					 | 
				
			||||||
	/*
 | 
						/*
 | 
				
			||||||
	 * On Windows, the "Unicode" locales assume UTF16 not UTF8 encoding, and
 | 
						 * On Windows, the "Unicode" locales assume UTF16 not UTF8 encoding, and
 | 
				
			||||||
	 * for some reason mbstowcs and wcstombs won't do this for us, so we use
 | 
						 * for some reason mbstowcs and wcstombs won't do this for us, so we use
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -3950,7 +3950,6 @@ convert_string_datum(Datum value, Oid typid)
 | 
				
			|||||||
		xfrmlen = strxfrm(NULL, val, 0);
 | 
							xfrmlen = strxfrm(NULL, val, 0);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
#ifdef WIN32
 | 
					#ifdef WIN32
 | 
				
			||||||
 | 
					 | 
				
			||||||
		/*
 | 
							/*
 | 
				
			||||||
		 * On Windows, strxfrm returns INT_MAX when an error occurs. Instead
 | 
							 * On Windows, strxfrm returns INT_MAX when an error occurs. Instead
 | 
				
			||||||
		 * of trying to allocate this much memory (and fail), just return the
 | 
							 * of trying to allocate this much memory (and fail), just return the
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -2057,7 +2057,6 @@ write_console(const char *line, int len)
 | 
				
			|||||||
	int			rc;
 | 
						int			rc;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef WIN32
 | 
					#ifdef WIN32
 | 
				
			||||||
 | 
					 | 
				
			||||||
	/*
 | 
						/*
 | 
				
			||||||
	 * Try to convert the message to UTF16 and write it with WriteConsoleW().
 | 
						 * Try to convert the message to UTF16 and write it with WriteConsoleW().
 | 
				
			||||||
	 * Fall back on write() if anything fails.
 | 
						 * Fall back on write() if anything fails.
 | 
				
			||||||
@@ -2887,7 +2886,6 @@ send_message_to_server_log(ErrorData *edata)
 | 
				
			|||||||
		if (redirection_done && !am_syslogger)
 | 
							if (redirection_done && !am_syslogger)
 | 
				
			||||||
			write_pipe_chunks(buf.data, buf.len, LOG_DESTINATION_STDERR);
 | 
								write_pipe_chunks(buf.data, buf.len, LOG_DESTINATION_STDERR);
 | 
				
			||||||
#ifdef WIN32
 | 
					#ifdef WIN32
 | 
				
			||||||
 | 
					 | 
				
			||||||
		/*
 | 
							/*
 | 
				
			||||||
		 * In a win32 service environment, there is no usable stderr. Capture
 | 
							 * In a win32 service environment, there is no usable stderr. Capture
 | 
				
			||||||
		 * anything going there and write it to the eventlog instead.
 | 
							 * anything going there and write it to the eventlog instead.
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -2891,7 +2891,6 @@ void
 | 
				
			|||||||
get_restricted_token(void)
 | 
					get_restricted_token(void)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
#ifdef WIN32
 | 
					#ifdef WIN32
 | 
				
			||||||
 | 
					 | 
				
			||||||
	/*
 | 
						/*
 | 
				
			||||||
	 * Before we execute another program, make sure that we are running with a
 | 
						 * Before we execute another program, make sure that we are running with a
 | 
				
			||||||
	 * restricted token. If not, re-execute ourselves with one.
 | 
						 * restricted token. If not, re-execute ourselves with one.
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -2667,7 +2667,6 @@ makeEmptyPGconn(void)
 | 
				
			|||||||
	PGconn	   *conn;
 | 
						PGconn	   *conn;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef WIN32
 | 
					#ifdef WIN32
 | 
				
			||||||
 | 
					 | 
				
			||||||
	/*
 | 
						/*
 | 
				
			||||||
	 * Make sure socket support is up and running.
 | 
						 * Make sure socket support is up and running.
 | 
				
			||||||
	 */
 | 
						 */
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -697,7 +697,6 @@ plperl_init_interp(void)
 | 
				
			|||||||
	int			nargs = 3;
 | 
						int			nargs = 3;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef WIN32
 | 
					#ifdef WIN32
 | 
				
			||||||
 | 
					 | 
				
			||||||
	/*
 | 
						/*
 | 
				
			||||||
	 * The perl library on startup does horrible things like call
 | 
						 * The perl library on startup does horrible things like call
 | 
				
			||||||
	 * setlocale(LC_ALL,""). We have protected against that on most platforms
 | 
						 * setlocale(LC_ALL,""). We have protected against that on most platforms
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -144,7 +144,6 @@ getaddrinfo(const char *node, const char *service,
 | 
				
			|||||||
	struct addrinfo hints;
 | 
						struct addrinfo hints;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef WIN32
 | 
					#ifdef WIN32
 | 
				
			||||||
 | 
					 | 
				
			||||||
	/*
 | 
						/*
 | 
				
			||||||
	 * If Windows has native IPv6 support, use the native Windows routine.
 | 
						 * If Windows has native IPv6 support, use the native Windows routine.
 | 
				
			||||||
	 * Otherwise, fall through and use our own code.
 | 
						 * Otherwise, fall through and use our own code.
 | 
				
			||||||
@@ -267,7 +266,6 @@ freeaddrinfo(struct addrinfo * res)
 | 
				
			|||||||
	if (res)
 | 
						if (res)
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
#ifdef WIN32
 | 
					#ifdef WIN32
 | 
				
			||||||
 | 
					 | 
				
			||||||
		/*
 | 
							/*
 | 
				
			||||||
		 * If Windows has native IPv6 support, use the native Windows routine.
 | 
							 * If Windows has native IPv6 support, use the native Windows routine.
 | 
				
			||||||
		 * Otherwise, fall through and use our own code.
 | 
							 * Otherwise, fall through and use our own code.
 | 
				
			||||||
@@ -359,7 +357,6 @@ getnameinfo(const struct sockaddr * sa, int salen,
 | 
				
			|||||||
			char *service, int servicelen, int flags)
 | 
								char *service, int servicelen, int flags)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
#ifdef WIN32
 | 
					#ifdef WIN32
 | 
				
			||||||
 | 
					 | 
				
			||||||
	/*
 | 
						/*
 | 
				
			||||||
	 * If Windows has native IPv6 support, use the native Windows routine.
 | 
						 * If Windows has native IPv6 support, use the native Windows routine.
 | 
				
			||||||
	 * Otherwise, fall through and use our own code.
 | 
						 * Otherwise, fall through and use our own code.
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -32,7 +32,6 @@ int
 | 
				
			|||||||
getrusage(int who, struct rusage * rusage)
 | 
					getrusage(int who, struct rusage * rusage)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
#ifdef WIN32
 | 
					#ifdef WIN32
 | 
				
			||||||
 | 
					 | 
				
			||||||
	FILETIME	starttime;
 | 
						FILETIME	starttime;
 | 
				
			||||||
	FILETIME	exittime;
 | 
						FILETIME	exittime;
 | 
				
			||||||
	FILETIME	kerneltime;
 | 
						FILETIME	kerneltime;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -222,7 +222,6 @@ canonicalize_path(char *path)
 | 
				
			|||||||
	int			pending_strips;
 | 
						int			pending_strips;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef WIN32
 | 
					#ifdef WIN32
 | 
				
			||||||
 | 
					 | 
				
			||||||
	/*
 | 
						/*
 | 
				
			||||||
	 * The Windows command processor will accept suitably quoted paths with
 | 
						 * The Windows command processor will accept suitably quoted paths with
 | 
				
			||||||
	 * forward slashes, but barfs badly with mixed forward and back slashes.
 | 
						 * forward slashes, but barfs badly with mixed forward and back slashes.
 | 
				
			||||||
@@ -372,7 +371,6 @@ path_is_relative_and_below_cwd(const char *path)
 | 
				
			|||||||
	else if (path_contains_parent_reference(path))
 | 
						else if (path_contains_parent_reference(path))
 | 
				
			||||||
		return false;
 | 
							return false;
 | 
				
			||||||
#ifdef WIN32
 | 
					#ifdef WIN32
 | 
				
			||||||
 | 
					 | 
				
			||||||
	/*
 | 
						/*
 | 
				
			||||||
	 * On Win32, a drive letter _not_ followed by a slash, e.g. 'E:abc', is
 | 
						 * On Win32, a drive letter _not_ followed by a slash, e.g. 'E:abc', is
 | 
				
			||||||
	 * relative to the cwd on that drive, or the drive's root directory if
 | 
						 * relative to the cwd on that drive, or the drive's root directory if
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -57,7 +57,6 @@ simple_prompt(const char *prompt, int maxlen, bool echo)
 | 
				
			|||||||
		return NULL;
 | 
							return NULL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef WIN32
 | 
					#ifdef WIN32
 | 
				
			||||||
 | 
					 | 
				
			||||||
	/*
 | 
						/*
 | 
				
			||||||
	 * A Windows console has an "input code page" and an "output code page";
 | 
						 * A Windows console has an "input code page" and an "output code page";
 | 
				
			||||||
	 * these usually match each other, but they rarely match the "Windows ANSI
 | 
						 * these usually match each other, but they rarely match the "Windows ANSI
 | 
				
			||||||
@@ -86,7 +85,6 @@ simple_prompt(const char *prompt, int maxlen, bool echo)
 | 
				
			|||||||
#endif
 | 
					#endif
 | 
				
			||||||
	if (!termin || !termout
 | 
						if (!termin || !termout
 | 
				
			||||||
#ifdef WIN32
 | 
					#ifdef WIN32
 | 
				
			||||||
 | 
					 | 
				
			||||||
	/*
 | 
						/*
 | 
				
			||||||
	 * Direct console I/O does not work from the MSYS 1.0.10 console.  Writes
 | 
						 * Direct console I/O does not work from the MSYS 1.0.10 console.  Writes
 | 
				
			||||||
	 * reach nowhere user-visible; reads block indefinitely.  XXX This affects
 | 
						 * reach nowhere user-visible; reads block indefinitely.  XXX This affects
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -438,7 +438,6 @@ convert_sourcefiles_in(char *source_subdir, char *dest_dir, char *dest_subdir, c
 | 
				
			|||||||
	snprintf(testtablespace, MAXPGPATH, "%s/testtablespace", outputdir);
 | 
						snprintf(testtablespace, MAXPGPATH, "%s/testtablespace", outputdir);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef WIN32
 | 
					#ifdef WIN32
 | 
				
			||||||
 | 
					 | 
				
			||||||
	/*
 | 
						/*
 | 
				
			||||||
	 * On Windows only, clean out the test tablespace dir, or create it if it
 | 
						 * On Windows only, clean out the test tablespace dir, or create it if it
 | 
				
			||||||
	 * doesn't exist.  On other platforms we expect the Makefile to take care
 | 
						 * doesn't exist.  On other platforms we expect the Makefile to take care
 | 
				
			||||||
@@ -1195,7 +1194,6 @@ run_diff(const char *cmd, const char *filename)
 | 
				
			|||||||
		exit(2);
 | 
							exit(2);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
#ifdef WIN32
 | 
					#ifdef WIN32
 | 
				
			||||||
 | 
					 | 
				
			||||||
	/*
 | 
						/*
 | 
				
			||||||
	 * On WIN32, if the 'diff' command cannot be found, system() returns 1,
 | 
						 * On WIN32, if the 'diff' command cannot be found, system() returns 1,
 | 
				
			||||||
	 * but produces nothing to stdout, so we check for that here.
 | 
						 * but produces nothing to stdout, so we check for that here.
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -2848,7 +2848,6 @@ mkdirs(char *argname)
 | 
				
			|||||||
	{
 | 
						{
 | 
				
			||||||
		*cp = '\0';
 | 
							*cp = '\0';
 | 
				
			||||||
#ifdef WIN32
 | 
					#ifdef WIN32
 | 
				
			||||||
 | 
					 | 
				
			||||||
		/*
 | 
							/*
 | 
				
			||||||
		 * DOS drive specifier?
 | 
							 * DOS drive specifier?
 | 
				
			||||||
		 */
 | 
							 */
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user