summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Joye <pajoye@php.net>2009-12-09 00:32:14 +0000
committerPierre Joye <pajoye@php.net>2009-12-09 00:32:14 +0000
commit1d505449ef03789504b1878d0b0029db2923df4c (patch)
treeafb3009e6fb3bb6f6b0a77b0cd9762948123c312
parenta8c9e893b6911c785f698d724b2ff61e7aebb737 (diff)
downloadphp-git-1d505449ef03789504b1878d0b0029db2923df4c.tar.gz
- drop non used code and fix warning
-rw-r--r--ext/standard/crypt_sha512.c21
1 files changed, 5 insertions, 16 deletions
diff --git a/ext/standard/crypt_sha512.c b/ext/standard/crypt_sha512.c
index 7bc648d7fa..065721a5ef 100644
--- a/ext/standard/crypt_sha512.c
+++ b/ext/standard/crypt_sha512.c
@@ -39,24 +39,13 @@
# include <strings.h>
# endif
#endif
-#if 0
-#ifndef stpncpy
-char * stpncpy(char *dst, const char *src, size_t len)
-{
- size_t n = strlen(src);
- if (n > len) {
- n = len;
- }
- return strncpy(dst, src, len) + n;
-}
-#endif
-#ifndef mempcpy
-void * mempcpy(void * dst, const void * src, size_t len)
-{
- return (((char *)memcpy(dst, src, len)) + len);
-}
+#ifndef HAVE_MEMPCPY
+extern void * mempcpy(void * dst, const void * src, size_t len);
#endif
+
+#ifndef HAVE_STRPNCPY
+extern char * stpncpy(char *dst, const char *src, size_t len);
#endif
#ifndef MIN