Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/rump/dev/lib/libnetsmb Using host iconv(3) is limited to...
details: https://anonhg.NetBSD.org/src/rev/626fa86ba17d
branches: trunk
changeset: 333760:626fa86ba17d
user: nakayama <nakayama%NetBSD.org@localhost>
date: Sun Nov 16 04:26:46 2014 +0000
description:
Using host iconv(3) is limited to NetBSD host.
diffstat:
sys/rump/dev/lib/libnetsmb/netsmb_user.c | 17 ++++++++++++++++-
1 files changed, 16 insertions(+), 1 deletions(-)
diffs (62 lines):
diff -r d7ab60f285b5 -r 626fa86ba17d sys/rump/dev/lib/libnetsmb/netsmb_user.c
--- a/sys/rump/dev/lib/libnetsmb/netsmb_user.c Sun Nov 16 03:49:09 2014 +0000
+++ b/sys/rump/dev/lib/libnetsmb/netsmb_user.c Sun Nov 16 04:26:46 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: netsmb_user.c,v 1.1 2014/11/15 18:49:04 nakayama Exp $ */
+/* $NetBSD: netsmb_user.c,v 1.2 2014/11/16 04:26:46 nakayama Exp $ */
/*
* Copyright (c) 2014 Takeshi Nakayama.
@@ -36,6 +36,7 @@
int
rumpcomp_netsmb_iconv_open(const char *to, const char *from, void **handle)
{
+#ifdef __NetBSD__
iconv_t cd;
int rv;
@@ -49,11 +50,16 @@
}
return rumpuser_component_errtrans(rv);
+#else
+ /* fallback to use dumb copy function */
+ return 0;
+#endif
}
int
rumpcomp_netsmb_iconv_close(void *handle)
{
+#ifdef __NetBSD__
int rv;
if (iconv_close((iconv_t)handle) == -1)
@@ -62,12 +68,17 @@
rv = 0;
return rumpuser_component_errtrans(rv);
+#else
+ /* do nothing */
+ return 0;
+#endif
}
int
rumpcomp_netsmb_iconv_conv(void *handle, const char **inbuf,
size_t *inbytesleft, char **outbuf, size_t *outbytesleft)
{
+#ifdef __NetBSD__
int rv;
if (iconv((iconv_t)handle, inbuf, inbytesleft, outbuf, outbytesleft)
@@ -77,5 +88,9 @@
rv = 0;
return rumpuser_component_errtrans(rv);
+#else
+ /* do nothing */
+ return 0;
+#endif
}
#endif
Home |
Main Index |
Thread Index |
Old Index