mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-22 22:56:29 +00:00
Prevent use of backend string functions
From PostgreSQL 12, port.h forcibly redefines printf() et al to use the versions defined by PostgreSQL (pg_printf() et al). As this causes linking issues in build environments which build pre-Pg12 versions against Pg12's libpq, ensure relevant macros defined in port.h are undefined.
This commit is contained in:
31
repmgr.h
31
repmgr.h
@@ -21,6 +21,37 @@
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#ifdef vsnprintf
|
||||
#undef vsnprintf
|
||||
#endif
|
||||
#ifdef snprintf
|
||||
#undef snprintf
|
||||
#endif
|
||||
#ifdef vsprintf
|
||||
#undef vsprintf
|
||||
#endif
|
||||
#ifdef sprintf
|
||||
#undef sprintf
|
||||
#endif
|
||||
#ifdef vfprintf
|
||||
#undef vfprintf
|
||||
#endif
|
||||
#ifdef fprintf
|
||||
#undef fprintf
|
||||
#endif
|
||||
#ifdef vprintf
|
||||
#undef vprintf
|
||||
#endif
|
||||
#ifdef printf
|
||||
#undef printf
|
||||
#endif
|
||||
#ifdef strerror
|
||||
#undef strerror
|
||||
#endif
|
||||
#ifdef strerror_r
|
||||
#undef strerror_r
|
||||
#endif
|
||||
|
||||
#ifndef _REPMGR_H_
|
||||
#define _REPMGR_H_
|
||||
|
||||
|
||||
Reference in New Issue
Block a user