mirror of
				https://github.com/postgres/postgres.git
				synced 2025-11-03 09:13:20 +03:00 
			
		
		
		
	Update "pg_regress --no-locale" for Darwin and Windows.
Commit 894459e59f revealed this option to
be broken for NLS builds on Darwin, but "make -C contrib/unaccent check"
and the buildfarm client rely on it.  Fix that configuration by
redefining the option to imply LANG=C on Darwin.  In passing, use LANG=C
instead of LANG=en on Windows; since only postmaster startup uses that
value, testers are unlikely to notice the change.  Back-patch to 9.0,
like the predecessor commit.
			
			
This commit is contained in:
		@@ -789,9 +789,17 @@ initialize_environment(void)
 | 
			
		||||
		unsetenv("LC_NUMERIC");
 | 
			
		||||
		unsetenv("LC_TIME");
 | 
			
		||||
		unsetenv("LANG");
 | 
			
		||||
		/* On Windows the default locale cannot be English, so force it */
 | 
			
		||||
#if defined(WIN32) || defined(__CYGWIN__)
 | 
			
		||||
		putenv("LANG=en");
 | 
			
		||||
 | 
			
		||||
		/*
 | 
			
		||||
		 * Most platforms have adopted the POSIX locale as their
 | 
			
		||||
		 * implementation-defined default locale.  Exceptions include native
 | 
			
		||||
		 * Windows, Darwin with --enable-nls, and Cygwin with --enable-nls.
 | 
			
		||||
		 * (Use of --enable-nls matters because libintl replaces setlocale().)
 | 
			
		||||
		 * Also, PostgreSQL does not support Darwin with locale environment
 | 
			
		||||
		 * variables unset; see PostmasterMain().
 | 
			
		||||
		 */
 | 
			
		||||
#if defined(WIN32) || defined(__CYGWIN__) || defined(__darwin__)
 | 
			
		||||
		putenv("LANG=C");
 | 
			
		||||
#endif
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user