summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2006-10-02 00:06:18 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2006-10-02 00:06:18 +0000
commit1e05359f4b93627a34b809182f13d759897831c4 (patch)
tree65ec35da5c69a32b69e190b2e294232f1927bd6a /src
parent7ceec34a7302504fd7345c5615645386bd5be716 (diff)
downloadpostgresql-1e05359f4b93627a34b809182f13d759897831c4.tar.gz
Properly handle the case where strlcpy() exists in libc but isn't
declared in the system headers. Per report from Bruce than some BSDen are like this.
Diffstat (limited to 'src')
-rw-r--r--src/include/pg_config.h.in4
-rw-r--r--src/include/port.h4
2 files changed, 6 insertions, 2 deletions
diff --git a/src/include/pg_config.h.in b/src/include/pg_config.h.in
index 7098eafb6f..c6fe887986 100644
--- a/src/include/pg_config.h.in
+++ b/src/include/pg_config.h.in
@@ -87,6 +87,10 @@
don't. */
#undef HAVE_DECL_SNPRINTF
+/* Define to 1 if you have the declaration of `strlcpy', and to 0 if you
+ don't. */
+#undef HAVE_DECL_STRLCPY
+
/* Define to 1 if you have the declaration of `vsnprintf', and to 0 if you
don't. */
#undef HAVE_DECL_VSNPRINTF
diff --git a/src/include/port.h b/src/include/port.h
index 9f79a300b1..eb8b031815 100644
--- a/src/include/port.h
+++ b/src/include/port.h
@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/port.h,v 1.101 2006/09/30 12:06:42 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/port.h,v 1.102 2006/10/02 00:06:18 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -332,7 +332,7 @@ extern int inet_aton(const char *cp, struct in_addr * addr);
extern char *strdup(const char *str);
#endif
-#if !defined(HAVE_STRLCPY) || defined(bsdi) /* bsdi doesn't have the prototype */
+#if !HAVE_DECL_STRLCPY
extern size_t strlcpy(char *dst, const char *src, size_t siz);
#endif