mirror of
				https://github.com/postgres/postgres.git
				synced 2025-11-03 09:13:20 +03:00 
			
		
		
		
	Declare mkdtemp() only if we're providing it.
Follow our usual style of providing an "extern" for a standard library
function only when we're also providing the implementation.  This avoids
issues when the system headers declare the function slightly differently
than we do, as noted by Caleb Welton.
We might have to go to the extent of probing to see if the system headers
declare the function, but let's not do that until it's demonstrated to be
necessary.
Oversight in commit 9e6b1bf258.  Back-patch
to all supported branches, as that was.
			
			
This commit is contained in:
		@@ -426,6 +426,10 @@ extern int	getpeereid(int sock, uid_t *uid, gid_t *gid);
 | 
				
			|||||||
extern int	isinf(double x);
 | 
					extern int	isinf(double x);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifndef HAVE_MKDTEMP
 | 
				
			||||||
 | 
					extern char *mkdtemp(char *path);
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifndef HAVE_RINT
 | 
					#ifndef HAVE_RINT
 | 
				
			||||||
extern double rint(double x);
 | 
					extern double rint(double x);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
@@ -497,7 +501,4 @@ extern int	pg_check_dir(const char *dir);
 | 
				
			|||||||
/* port/pgmkdirp.c */
 | 
					/* port/pgmkdirp.c */
 | 
				
			||||||
extern int	pg_mkdir_p(char *path, int omode);
 | 
					extern int	pg_mkdir_p(char *path, int omode);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* port/mkdtemp.c */
 | 
					 | 
				
			||||||
extern char *mkdtemp(char *path);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#endif   /* PG_PORT_H */
 | 
					#endif   /* PG_PORT_H */
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user