mirror of
				https://github.com/postgres/postgres.git
				synced 2025-11-03 09:13:20 +03:00 
			
		
		
		
	Work around stdbool problem in dfmgr.c.
Commit 842cb9fa6 refactored things so that dfmgr.c includes <dlfcn.h>,
which before that had only been directly included in platform-specific
stub files.  It turns out that on macOS, <dlfcn.h> includes <stdbool.h>,
and that causes problems on platforms where _Bool is not char-sized ...
which happens to include the PPC versions of macOS.  Work around it
much as we have in plperl.h, by #undef'ing bool after including the
problematic file, but only if we're not using stdbool-style booleans.
Discussion: https://postgr.es/m/E1fxqjl-0003YS-NS@gemulon.postgresql.org
			
			
This commit is contained in:
		@@ -18,7 +18,17 @@
 | 
			
		||||
 | 
			
		||||
#ifdef HAVE_DLOPEN
 | 
			
		||||
#include <dlfcn.h>
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * On macOS, <dlfcn.h> insists on including <stdbool.h>.  If we're not
 | 
			
		||||
 * using stdbool, undef bool to undo the damage.
 | 
			
		||||
 */
 | 
			
		||||
#ifndef USE_STDBOOL
 | 
			
		||||
#ifdef bool
 | 
			
		||||
#undef bool
 | 
			
		||||
#endif
 | 
			
		||||
#endif
 | 
			
		||||
#endif							/* HAVE_DLOPEN */
 | 
			
		||||
 | 
			
		||||
#include "fmgr.h"
 | 
			
		||||
#include "lib/stringinfo.h"
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user