From: Marko Kreen Date: Mon, 11 Jan 2010 05:45:07 +0000 (+0200) Subject: X-Git-Tag: pgbouncer_1_4_rc3~78 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=07ca55bcfe026665f2d080b860e947e2639ff874;p=pgbouncer --- diff --git a/src/system.c b/src/system.c index 5867b7c..abf92c2 100644 --- a/src/system.c +++ b/src/system.c @@ -38,34 +38,6 @@ #include #endif -/* - * Minimal spec-conforming implementations of strlcpy(), strlcat(). - */ - -#ifndef HAVE_STRLCPY -size_t strlcpy(char *dst, const char *src, size_t n) -{ - size_t len = strlen(src); - if (len < n) { - memcpy(dst, src, len + 1); - } else if (n > 0) { - memcpy(dst, src, n - 1); - dst[n - 1] = 0; - } - return len; -} -#endif - -#ifndef HAVE_STRLCAT -size_t strlcat(char *dst, const char *src, size_t n) -{ - size_t pos = 0; - while (pos < n && dst[pos]) - pos++; - return pos + strlcpy(dst + pos, src, n - pos); -} -#endif - /* * Get other side's uid for UNIX socket. * @@ -98,18 +70,6 @@ int getpeereid(int fd, uid_t *uid_p, gid_t *gid_p) } #endif /* !HAVE_GETPEEREID */ -#ifndef HAVE_BASENAME -const char *basename(const char *path) -{ - const char *p; - if (path == NULL || path[0] == 0) - return "."; - if ((p = strrchr(path, '/')) != NULL) - return p[1] ? p + 1 : p; - return path; -} -#endif - void change_user(const char *user) { const struct passwd *pw;