diff options
author | obrien <obrien@FreeBSD.org> | 2004-10-19 17:39:15 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 2004-10-19 17:39:15 +0000 |
commit | d3916bf95c75a9d63c91d1f2c290a097ef044ecb (patch) | |
tree | e9c3d395d025e2f5be2a5691017254825e684f9e /contrib/smbfs/lib | |
parent | baf68d6ae6059fa429a1db0fc44f4140b1cf404d (diff) | |
download | FreeBSD-src-d3916bf95c75a9d63c91d1f2c290a097ef044ecb.zip FreeBSD-src-d3916bf95c75a9d63c91d1f2c290a097ef044ecb.tar.gz |
Size matters. Correctly use a size_t so 64-bit hosts can mount SMB FS's
when using character set conversions.
Also include POSIX <string.h> vs. BSD <strings.h> now that we've broken
traditional BSD behavior [and compatibility with our BSD brethren].
PR: 72445
Submitted by: Vladimir Nechitailo <nechit@lpi.ru>
Patch by: Stasys Smailys <ssmailys@komvista.lt>
Diffstat (limited to 'contrib/smbfs/lib')
-rw-r--r-- | contrib/smbfs/lib/smb/nls.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/contrib/smbfs/lib/smb/nls.c b/contrib/smbfs/lib/smb/nls.c index 19c3123..3274428 100644 --- a/contrib/smbfs/lib/smb/nls.c +++ b/contrib/smbfs/lib/smb/nls.c @@ -32,6 +32,9 @@ * $Id: nls.c,v 1.10 2002/07/22 08:33:59 bp Exp $ */ +#include <sys/cdefs.h> +__FBSDID("$FreeBSD$"); + #include <sys/types.h> #include <sys/iconv.h> #include <sys/sysctl.h> @@ -41,7 +44,7 @@ #endif #include <errno.h> #include <stdio.h> -#include <strings.h> +#include <string.h> #include <stdlib.h> #include <locale.h> #include <err.h> @@ -125,7 +128,7 @@ char * nls_str_toloc(char *dst, const char *src) { char *p = dst; - int inlen, outlen; + size_t inlen, outlen; if (!iconv_loaded) return strcpy(dst, src); @@ -147,7 +150,7 @@ char * nls_str_toext(char *dst, const char *src) { char *p = dst; - int inlen, outlen; + size_t inlen, outlen; if (!iconv_loaded) return strcpy(dst, src); @@ -170,7 +173,7 @@ nls_mem_toloc(void *dst, const void *src, int size) { char *p = dst; const char *s = src; - int inlen, outlen; + size_t inlen, outlen; if (!iconv_loaded) return memcpy(dst, src, size); @@ -195,7 +198,7 @@ nls_mem_toext(void *dst, const void *src, int size) { char *p = dst; const char *s = src; - int inlen, outlen; + size_t inlen, outlen; if (size == 0) return NULL; |