Skip to content

Commit 8e85509

Browse files
Merge pull request ClickHouse#1 from TisonKun/port-darwin-platform
poratable conditional compiling on darwin platform
2 parents 8e7e905 + f1b8fe5 commit 8e85509

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

configs/pg_config.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,11 +124,15 @@
124124

125125
/* Define to 1 if you have the declaration of `strlcat', and to 0 if you
126126
don't. */
127-
#define HAVE_DECL_STRLCAT 0
127+
#if OS_DARWIN
128+
#define HAVE_DECL_STRLCAT 1
129+
#endif
128130

129131
/* Define to 1 if you have the declaration of `strlcpy', and to 0 if you
130132
don't. */
131-
#define HAVE_DECL_STRLCPY 0
133+
#if OS_DARWIN
134+
#define HAVE_DECL_STRLCPY 1
135+
#endif
132136

133137
/* Define to 1 if you have the declaration of `sys_siglist', and to 0 if you
134138
don't. */

port/strlcpy.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
3333
*/
3434

35+
#if !OS_DARWIN
36+
3537
#include "c.h"
3638

3739

@@ -69,3 +71,5 @@ strlcpy(char *dst, const char *src, size_t siz)
6971

7072
return (s - src - 1); /* count does not include NUL */
7173
}
74+
75+
#endif

0 commit comments

Comments
 (0)