Date: Thu, 16 Apr 2015 03:39:34 +0000 (UTC) From: Garrett Cooper <ngie@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r281585 - in user/ngie/more-tests: . bin/csh contrib/pjdfstest/tests/open contrib/pjdfstest/tests/truncate contrib/smbfs/include/netsmb contrib/smbfs/lib/smb etc etc/rc.d include lib/li... Message-ID: <201504160339.t3G3dYY8082748@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ngie Date: Thu Apr 16 03:39:33 2015 New Revision: 281585 URL: https://svnweb.freebsd.org/changeset/base/281585 Log: MFhead @ r281584 Added: user/ngie/more-tests/sys/arm64/include/psl.h - copied unchanged from r281584, head/sys/arm64/include/psl.h user/ngie/more-tests/sys/boot/Makefile.arm64 - copied unchanged from r281584, head/sys/boot/Makefile.arm64 user/ngie/more-tests/sys/boot/arm64/ - copied from r281584, head/sys/boot/arm64/ user/ngie/more-tests/sys/boot/efi/boot1/fat-arm64.tmpl.bz2.uu - copied unchanged from r281584, head/sys/boot/efi/boot1/fat-arm64.tmpl.bz2.uu user/ngie/more-tests/sys/boot/efi/include/arm64/ - copied from r281584, head/sys/boot/efi/include/arm64/ user/ngie/more-tests/sys/boot/efi/loader/arch/arm64/ - copied from r281584, head/sys/boot/efi/loader/arch/arm64/ Modified: user/ngie/more-tests/UPDATING user/ngie/more-tests/bin/csh/config.h user/ngie/more-tests/contrib/pjdfstest/tests/open/20.t user/ngie/more-tests/contrib/pjdfstest/tests/truncate/11.t user/ngie/more-tests/contrib/smbfs/include/netsmb/smb_lib.h user/ngie/more-tests/contrib/smbfs/lib/smb/nls.c user/ngie/more-tests/contrib/smbfs/lib/smb/print.c user/ngie/more-tests/contrib/smbfs/lib/smb/rq.c user/ngie/more-tests/etc/login.conf user/ngie/more-tests/etc/rc.d/hostid_save user/ngie/more-tests/include/iconv.h user/ngie/more-tests/lib/libarchive/Makefile user/ngie/more-tests/lib/libc/iconv/__iconv.c user/ngie/more-tests/lib/libc/iconv/bsd_iconv.c user/ngie/more-tests/lib/libc/iconv/citrus_iconv.h user/ngie/more-tests/lib/libc/iconv/citrus_iconv_local.h user/ngie/more-tests/lib/libc/iconv/citrus_none.c user/ngie/more-tests/lib/libc/iconv/citrus_stdenc.h user/ngie/more-tests/lib/libc/iconv/citrus_stdenc_local.h user/ngie/more-tests/lib/libc/iconv/citrus_stdenc_template.h user/ngie/more-tests/lib/libc/iconv/iconv-internal.h user/ngie/more-tests/lib/libc/iconv/iconv.3 user/ngie/more-tests/lib/libc/iconv/iconv.c user/ngie/more-tests/lib/libc/iconv/iconv_compat.c user/ngie/more-tests/lib/libc/locale/cXXrtomb_iconv.h user/ngie/more-tests/lib/libc/locale/mbrtocXX_iconv.h user/ngie/more-tests/lib/libiconv_modules/BIG5/citrus_big5.c user/ngie/more-tests/lib/libiconv_modules/DECHanyu/citrus_dechanyu.c user/ngie/more-tests/lib/libiconv_modules/EUC/citrus_euc.c user/ngie/more-tests/lib/libiconv_modules/EUCTW/citrus_euctw.c user/ngie/more-tests/lib/libiconv_modules/GBK2K/citrus_gbk2k.c user/ngie/more-tests/lib/libiconv_modules/HZ/citrus_hz.c user/ngie/more-tests/lib/libiconv_modules/ISO2022/citrus_iso2022.c user/ngie/more-tests/lib/libiconv_modules/JOHAB/citrus_johab.c user/ngie/more-tests/lib/libiconv_modules/MSKanji/citrus_mskanji.c user/ngie/more-tests/lib/libiconv_modules/UES/citrus_ues.c user/ngie/more-tests/lib/libiconv_modules/UTF1632/citrus_utf1632.c user/ngie/more-tests/lib/libiconv_modules/UTF7/citrus_utf7.c user/ngie/more-tests/lib/libiconv_modules/UTF8/citrus_utf8.c user/ngie/more-tests/lib/libiconv_modules/VIQR/citrus_viqr.c user/ngie/more-tests/lib/libiconv_modules/ZW/citrus_zw.c user/ngie/more-tests/lib/libiconv_modules/iconv_none/citrus_iconv_none.c user/ngie/more-tests/lib/libiconv_modules/iconv_std/citrus_iconv_std.c user/ngie/more-tests/lib/libkiconv/xlat16_iconv.c user/ngie/more-tests/libexec/rtld-elf/aarch64/reloc.c user/ngie/more-tests/libexec/rtld-elf/rtld.c user/ngie/more-tests/libexec/rtld-elf/rtld.h user/ngie/more-tests/sys/arm64/arm64/vfp.c user/ngie/more-tests/sys/arm64/arm64/vm_machdep.c user/ngie/more-tests/sys/boot/Makefile.arm user/ngie/more-tests/sys/boot/common/Makefile.inc user/ngie/more-tests/sys/boot/efi/Makefile user/ngie/more-tests/sys/boot/efi/boot1/Makefile user/ngie/more-tests/sys/boot/efi/boot1/generate-fat.sh user/ngie/more-tests/sys/boot/efi/fdt/Makefile user/ngie/more-tests/sys/boot/efi/libefi/Makefile user/ngie/more-tests/sys/boot/efi/loader/Makefile user/ngie/more-tests/sys/boot/efi/loader/arch/arm/start.S user/ngie/more-tests/sys/boot/efi/loader/copy.c user/ngie/more-tests/sys/cam/cam_xpt.c user/ngie/more-tests/sys/compat/freebsd32/freebsd32_misc.c user/ngie/more-tests/sys/compat/linprocfs/linprocfs.c user/ngie/more-tests/sys/dev/sound/pci/hda/hdaa_patches.c user/ngie/more-tests/sys/dev/sound/pci/hda/hdac.c user/ngie/more-tests/sys/dev/sound/pci/hda/hdac.h user/ngie/more-tests/sys/dev/sound/pci/hda/hdacc.c user/ngie/more-tests/sys/dev/vt/vt_font.c user/ngie/more-tests/sys/fs/ext2fs/ext2_vfsops.c user/ngie/more-tests/sys/fs/fuse/fuse_vfsops.c user/ngie/more-tests/sys/fs/msdosfs/msdosfs_vfsops.c user/ngie/more-tests/sys/fs/nandfs/nandfs_vfsops.c user/ngie/more-tests/sys/fs/nfsclient/nfs_clvfsops.c user/ngie/more-tests/sys/fs/nfsserver/nfs_nfsdport.c user/ngie/more-tests/sys/fs/nullfs/null_vfsops.c user/ngie/more-tests/sys/kern/imgact_elf.c user/ngie/more-tests/sys/kern/kern_exec.c user/ngie/more-tests/sys/kern/kern_poll.c user/ngie/more-tests/sys/kern/kern_resource.c user/ngie/more-tests/sys/kern/kern_timeout.c user/ngie/more-tests/sys/kern/subr_bus.c user/ngie/more-tests/sys/kern/vfs_subr.c user/ngie/more-tests/sys/kern/vfs_syscalls.c user/ngie/more-tests/sys/net/if_types.h user/ngie/more-tests/sys/net/pfvar.h user/ngie/more-tests/sys/net/route.c user/ngie/more-tests/sys/netinet/ip_reass.c user/ngie/more-tests/sys/netpfil/pf/pf.c user/ngie/more-tests/sys/netpfil/pf/pf_norm.c user/ngie/more-tests/sys/sys/imgact.h user/ngie/more-tests/sys/sys/mount.h user/ngie/more-tests/sys/sys/param.h user/ngie/more-tests/sys/sys/syscallsubr.h user/ngie/more-tests/sys/ufs/ffs/ffs_vfsops.c user/ngie/more-tests/usr.bin/Makefile user/ngie/more-tests/usr.bin/gzip/gzip.c user/ngie/more-tests/usr.bin/iconv/iconv.c user/ngie/more-tests/usr.bin/ipcs/ipc.c user/ngie/more-tests/usr.bin/ipcs/ipc.h user/ngie/more-tests/usr.bin/lockf/lockf.c user/ngie/more-tests/usr.sbin/bhyve/bhyverun.c user/ngie/more-tests/usr.sbin/bhyvectl/bhyvectl.c user/ngie/more-tests/usr.sbin/ctld/discovery.c user/ngie/more-tests/usr.sbin/ctld/isns.c user/ngie/more-tests/usr.sbin/ctld/keys.c user/ngie/more-tests/usr.sbin/ctld/login.c user/ngie/more-tests/usr.sbin/ctld/parse.y user/ngie/more-tests/usr.sbin/ctld/pdu.c user/ngie/more-tests/usr.sbin/ctld/token.l user/ngie/more-tests/usr.sbin/freebsd-update/freebsd-update.sh user/ngie/more-tests/usr.sbin/vidcontrol/vidcontrol.c Directory Properties: user/ngie/more-tests/ (props changed) user/ngie/more-tests/etc/ (props changed) user/ngie/more-tests/include/ (props changed) user/ngie/more-tests/lib/libc/ (props changed) user/ngie/more-tests/sys/ (props changed) user/ngie/more-tests/sys/boot/ (props changed) user/ngie/more-tests/usr.sbin/bhyve/ (props changed) user/ngie/more-tests/usr.sbin/bhyvectl/ (props changed) Modified: user/ngie/more-tests/UPDATING ============================================================================== --- user/ngie/more-tests/UPDATING Thu Apr 16 03:35:47 2015 (r281584) +++ user/ngie/more-tests/UPDATING Thu Apr 16 03:39:33 2015 (r281585) @@ -31,6 +31,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11 disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20150415: + The const qualifier has been removed from iconv(3) to comply with + POSIX. The ports tree is aware of this from r384038 onwards. + 20150324: From legacy ata(4) driver was removed support for SATA controllers supported by more functional drivers ahci(4), siis(4) and mvs(4). Modified: user/ngie/more-tests/bin/csh/config.h ============================================================================== --- user/ngie/more-tests/bin/csh/config.h Thu Apr 16 03:35:47 2015 (r281584) +++ user/ngie/more-tests/bin/csh/config.h Thu Apr 16 03:39:33 2015 (r281585) @@ -198,7 +198,7 @@ #define HAVE_WCWIDTH 1 /* Define as const if the declaration of iconv() needs const. */ -#define ICONV_CONST const +#define ICONV_CONST /* Support NLS. */ #define NLS 1 Modified: user/ngie/more-tests/contrib/pjdfstest/tests/open/20.t ============================================================================== --- user/ngie/more-tests/contrib/pjdfstest/tests/open/20.t Thu Apr 16 03:35:47 2015 (r281584) +++ user/ngie/more-tests/contrib/pjdfstest/tests/open/20.t Thu Apr 16 03:39:33 2015 (r281585) @@ -14,7 +14,11 @@ n0=`namegen` cp -pf `which sleep` ${n0} ./${n0} 3 & +while ! pkill -0 -f ./${n0}; do + sleep 0.1 +done expect ETXTBSY open ${n0} O_WRONLY expect ETXTBSY open ${n0} O_RDWR expect ETXTBSY open ${n0} O_RDONLY,O_TRUNC +pkill -9 -f ./${n0} expect 0 unlink ${n0} Modified: user/ngie/more-tests/contrib/pjdfstest/tests/truncate/11.t ============================================================================== --- user/ngie/more-tests/contrib/pjdfstest/tests/truncate/11.t Thu Apr 16 03:35:47 2015 (r281584) +++ user/ngie/more-tests/contrib/pjdfstest/tests/truncate/11.t Thu Apr 16 03:39:33 2015 (r281585) @@ -14,5 +14,9 @@ n0=`namegen` cp -pf `which sleep` ${n0} ./${n0} 3 & +while ! pkill -0 -f ./${n0}; do + sleep 0.1 +done expect ETXTBSY truncate ${n0} 123 +pkill -9 -f ./${n0} expect 0 unlink ${n0} Modified: user/ngie/more-tests/contrib/smbfs/include/netsmb/smb_lib.h ============================================================================== --- user/ngie/more-tests/contrib/smbfs/include/netsmb/smb_lib.h Thu Apr 16 03:35:47 2015 (r281584) +++ user/ngie/more-tests/contrib/smbfs/include/netsmb/smb_lib.h Thu Apr 16 03:39:33 2015 (r281585) @@ -191,7 +191,7 @@ int smb_ctx_readrc(struct smb_ctx *); int smb_ctx_resolve(struct smb_ctx *); int smb_ctx_setflags(struct smb_ctx *, int, int, int); -int smb_smb_open_print_file(struct smb_ctx *, int, int, const char *, smbfh*); +int smb_smb_open_print_file(struct smb_ctx *, int, int, char *, smbfh*); int smb_smb_close_print_file(struct smb_ctx *, smbfh); int smb_read(struct smb_ctx *, smbfh, off_t, size_t, char *); @@ -204,8 +204,8 @@ int smb_rq_init(struct smb_ctx *, u_cha void smb_rq_done(struct smb_rq *); void smb_rq_wend(struct smb_rq *); int smb_rq_simple(struct smb_rq *); -int smb_rq_dmem(struct mbdata *, const char *, size_t); -int smb_rq_dstring(struct mbdata *, const char *); +int smb_rq_dmem(struct mbdata *, char *, size_t); +int smb_rq_dstring(struct mbdata *, char *); int smb_t2_request(struct smb_ctx *, int, int, const char *, int, void *, int, void *, int *, void *, int *, void *); @@ -246,10 +246,10 @@ extern u_char nls_lower[256], nls_upper[ int nls_setrecode(const char *, const char *); int nls_setlocale(const char *); -char* nls_str_toext(char *, const char *); -char* nls_str_toloc(char *, const char *); -void* nls_mem_toext(void *, const void *, int); -void* nls_mem_toloc(void *, const void *, int); +char* nls_str_toext(char *, char *); +char* nls_str_toloc(char *, char *); +void* nls_mem_toext(void *, void *, int); +void* nls_mem_toloc(void *, void *, int); char* nls_str_upper(char *, const char *); char* nls_str_lower(char *, const char *); Modified: user/ngie/more-tests/contrib/smbfs/lib/smb/nls.c ============================================================================== --- user/ngie/more-tests/contrib/smbfs/lib/smb/nls.c Thu Apr 16 03:35:47 2015 (r281584) +++ user/ngie/more-tests/contrib/smbfs/lib/smb/nls.c Thu Apr 16 03:39:33 2015 (r281585) @@ -102,7 +102,7 @@ nls_setrecode(const char *local, const c } char * -nls_str_toloc(char *dst, const char *src) +nls_str_toloc(char *dst, char *src) { #ifdef HAVE_ICONV char *p = dst; @@ -125,7 +125,7 @@ nls_str_toloc(char *dst, const char *src } char * -nls_str_toext(char *dst, const char *src) +nls_str_toext(char *dst, char *src) { #ifdef HAVE_ICONV char *p = dst; @@ -148,11 +148,11 @@ nls_str_toext(char *dst, const char *src } void * -nls_mem_toloc(void *dst, const void *src, int size) +nls_mem_toloc(void *dst, void *src, int size) { #ifdef HAVE_ICONV char *p = dst; - const char *s = src; + char *s = src; size_t inlen, outlen; if (size == 0) @@ -174,11 +174,11 @@ nls_mem_toloc(void *dst, const void *src } void * -nls_mem_toext(void *dst, const void *src, int size) +nls_mem_toext(void *dst, void *src, int size) { #ifdef HAVE_ICONV char *p = dst; - const char *s = src; + char *s = src; size_t inlen, outlen; if (size == 0) Modified: user/ngie/more-tests/contrib/smbfs/lib/smb/print.c ============================================================================== --- user/ngie/more-tests/contrib/smbfs/lib/smb/print.c Thu Apr 16 03:35:47 2015 (r281584) +++ user/ngie/more-tests/contrib/smbfs/lib/smb/print.c Thu Apr 16 03:39:33 2015 (r281585) @@ -54,7 +54,7 @@ int smb_smb_open_print_file(struct smb_ctx *ctx, int setuplen, int mode, - const char *ident, smbfh *fhp) + char *ident, smbfh *fhp) { struct smb_rq *rqp; struct mbdata *mbp; Modified: user/ngie/more-tests/contrib/smbfs/lib/smb/rq.c ============================================================================== --- user/ngie/more-tests/contrib/smbfs/lib/smb/rq.c Thu Apr 16 03:35:47 2015 (r281584) +++ user/ngie/more-tests/contrib/smbfs/lib/smb/rq.c Thu Apr 16 03:39:33 2015 (r281585) @@ -86,7 +86,7 @@ smb_rq_wend(struct smb_rq *rqp) } int -smb_rq_dmem(struct mbdata *mbp, const char *src, size_t size) +smb_rq_dmem(struct mbdata *mbp, char *src, size_t size) { struct mbuf *m; char * dst; @@ -118,7 +118,7 @@ smb_rq_dmem(struct mbdata *mbp, const ch } int -smb_rq_dstring(struct mbdata *mbp, const char *s) +smb_rq_dstring(struct mbdata *mbp, char *s) { return smb_rq_dmem(mbp, s, strlen(s) + 1); } Modified: user/ngie/more-tests/etc/login.conf ============================================================================== --- user/ngie/more-tests/etc/login.conf Thu Apr 16 03:35:47 2015 (r281584) +++ user/ngie/more-tests/etc/login.conf Thu Apr 16 03:39:33 2015 (r281585) @@ -26,7 +26,7 @@ default:\ :passwd_format=sha512:\ :copyright=/etc/COPYRIGHT:\ :welcome=/etc/motd:\ - :setenv=MAIL=/var/mail/$,BLOCKSIZE=K:LC_COLLATE=C:\ + :setenv=MAIL=/var/mail/$,BLOCKSIZE=K,LC_COLLATE=C:\ :path=/sbin /bin /usr/sbin /usr/bin /usr/local/sbin /usr/local/bin ~/bin:\ :nologin=/var/run/nologin:\ :cputime=unlimited:\ Modified: user/ngie/more-tests/etc/rc.d/hostid_save ============================================================================== --- user/ngie/more-tests/etc/rc.d/hostid_save Thu Apr 16 03:35:47 2015 (r281584) +++ user/ngie/more-tests/etc/rc.d/hostid_save Thu Apr 16 03:39:33 2015 (r281585) @@ -16,12 +16,19 @@ rcvar="hostid_enable" hostid_save() { - if [ ! -r ${hostid_file} ]; then - $SYSCTL_N kern.hostuuid > ${hostid_file} - if [ $? -ne 0 ]; then - warn "could not store hostuuid in ${hostid_file}." + current_hostid=`$SYSCTL_N kern.hostuuid` + + if [ -r ${hostid_file} ]; then + read saved_hostid < ${hostid_file} + if [ ${saved_hostid} = ${current_hostid} ]; then + exit 0 fi fi + + echo ${current_hostid} > ${hostid_file} + if [ $? -ne 0 ]; then + warn "could not store hostuuid in ${hostid_file}." + fi } load_rc_config $name Modified: user/ngie/more-tests/include/iconv.h ============================================================================== --- user/ngie/more-tests/include/iconv.h Thu Apr 16 03:35:47 2015 (r281584) +++ user/ngie/more-tests/include/iconv.h Thu Apr 16 03:39:33 2015 (r281585) @@ -53,7 +53,7 @@ typedef struct __tag_iconv_t *iconv_t; __BEGIN_DECLS iconv_t iconv_open(const char *, const char *); -size_t iconv(iconv_t, const char ** __restrict, +size_t iconv(iconv_t, char ** __restrict, size_t * __restrict, char ** __restrict, size_t * __restrict); int iconv_close(iconv_t); @@ -62,7 +62,7 @@ int iconv_close(iconv_t); */ int __iconv_get_list(char ***, size_t *, __iconv_bool); void __iconv_free_list(char **, size_t); -size_t __iconv(iconv_t, const char **, size_t *, char **, +size_t __iconv(iconv_t, char **, size_t *, char **, size_t *, __uint32_t, size_t *); #define __ICONV_F_HIDE_INVALID 0x0001 Modified: user/ngie/more-tests/lib/libarchive/Makefile ============================================================================== --- user/ngie/more-tests/lib/libarchive/Makefile Thu Apr 16 03:35:47 2015 (r281584) +++ user/ngie/more-tests/lib/libarchive/Makefile Thu Apr 16 03:39:33 2015 (r281585) @@ -25,7 +25,7 @@ LIBADD+= md .if ${MK_ICONV} != "no" # TODO: This can be changed back to CFLAGS once iconv works correctly # with statically linked binaries. -SHARED_CFLAGS+= -DHAVE_ICONV=1 -DHAVE_ICONV_H=1 -DICONV_CONST=const +SHARED_CFLAGS+= -DHAVE_ICONV=1 -DHAVE_ICONV_H=1 -DICONV_CONST= .endif .if ${MACHINE_ARCH:Marm*} != "" || ${MACHINE_ARCH:Mmips*} != "" || \ Modified: user/ngie/more-tests/lib/libc/iconv/__iconv.c ============================================================================== --- user/ngie/more-tests/lib/libc/iconv/__iconv.c Thu Apr 16 03:35:47 2015 (r281584) +++ user/ngie/more-tests/lib/libc/iconv/__iconv.c Thu Apr 16 03:39:33 2015 (r281585) @@ -31,7 +31,7 @@ #include "iconv-internal.h" size_t -__iconv(iconv_t a, const char **b, size_t *c, char **d, +__iconv(iconv_t a, char **b, size_t *c, char **d, size_t *e, __uint32_t f, size_t *g) { return __bsd___iconv(a, b, c, d, e, f, g); Modified: user/ngie/more-tests/lib/libc/iconv/bsd_iconv.c ============================================================================== --- user/ngie/more-tests/lib/libc/iconv/bsd_iconv.c Thu Apr 16 03:35:47 2015 (r281584) +++ user/ngie/more-tests/lib/libc/iconv/bsd_iconv.c Thu Apr 16 03:39:33 2015 (r281585) @@ -120,7 +120,7 @@ __bsd_iconv_close(iconv_t handle) } size_t -__bsd_iconv(iconv_t handle, const char **in, size_t *szin, char **out, size_t *szout) +__bsd_iconv(iconv_t handle, char **in, size_t *szin, char **out, size_t *szout) { size_t ret; int err; @@ -141,7 +141,7 @@ __bsd_iconv(iconv_t handle, const char * } size_t -__bsd___iconv(iconv_t handle, const char **in, size_t *szin, char **out, +__bsd___iconv(iconv_t handle, char **in, size_t *szin, char **out, size_t *szout, uint32_t flags, size_t *invalids) { size_t ret; Modified: user/ngie/more-tests/lib/libc/iconv/citrus_iconv.h ============================================================================== --- user/ngie/more-tests/lib/libc/iconv/citrus_iconv.h Thu Apr 16 03:35:47 2015 (r281584) +++ user/ngie/more-tests/lib/libc/iconv/citrus_iconv.h Thu Apr 16 03:39:33 2015 (r281585) @@ -52,7 +52,7 @@ __END_DECLS */ static __inline int _citrus_iconv_convert(struct _citrus_iconv * __restrict cv, - const char * __restrict * __restrict in, size_t * __restrict inbytes, + char * __restrict * __restrict in, size_t * __restrict inbytes, char * __restrict * __restrict out, size_t * __restrict outbytes, uint32_t flags, size_t * __restrict nresults) { Modified: user/ngie/more-tests/lib/libc/iconv/citrus_iconv_local.h ============================================================================== --- user/ngie/more-tests/lib/libc/iconv/citrus_iconv_local.h Thu Apr 16 03:35:47 2015 (r281584) +++ user/ngie/more-tests/lib/libc/iconv/citrus_iconv_local.h Thu Apr 16 03:39:33 2015 (r281585) @@ -46,7 +46,7 @@ static void _citrus_##_m_##_iconv_unini (struct _citrus_iconv_shared *); \ static int _citrus_##_m_##_iconv_convert \ (struct _citrus_iconv * __restrict, \ - const char * __restrict * __restrict, \ + char * __restrict * __restrict, \ size_t * __restrict, \ char * __restrict * __restrict, \ size_t * __restrict outbytes, \ @@ -75,7 +75,7 @@ typedef void (*_citrus_iconv_uninit_shar (struct _citrus_iconv_shared *); typedef int (*_citrus_iconv_convert_t) (struct _citrus_iconv * __restrict, - const char *__restrict* __restrict, size_t * __restrict, + char *__restrict* __restrict, size_t * __restrict, char * __restrict * __restrict, size_t * __restrict, uint32_t, size_t * __restrict); typedef int (*_citrus_iconv_init_context_t)(struct _citrus_iconv *); Modified: user/ngie/more-tests/lib/libc/iconv/citrus_none.c ============================================================================== --- user/ngie/more-tests/lib/libc/iconv/citrus_none.c Thu Apr 16 03:35:47 2015 (r281584) +++ user/ngie/more-tests/lib/libc/iconv/citrus_none.c Thu Apr 16 03:39:33 2015 (r281585) @@ -83,7 +83,7 @@ _citrus_NONE_stdenc_init_state(struct _c static int _citrus_NONE_stdenc_mbtocs(struct _citrus_stdenc * __restrict ce __unused, - _csid_t *csid, _index_t *idx, const char **s, size_t n, + _csid_t *csid, _index_t *idx, char **s, size_t n, void *ps __unused, size_t *nresult, struct iconv_hooks *hooks) { @@ -159,7 +159,7 @@ _citrus_NONE_stdenc_cstomb(struct _citru static int _citrus_NONE_stdenc_mbtowc(struct _citrus_stdenc * __restrict ce __unused, - _wc_t * __restrict pwc, const char ** __restrict s, size_t n, + _wc_t * __restrict pwc, char ** __restrict s, size_t n, void * __restrict pspriv __unused, size_t * __restrict nresult, struct iconv_hooks *hooks) { Modified: user/ngie/more-tests/lib/libc/iconv/citrus_stdenc.h ============================================================================== --- user/ngie/more-tests/lib/libc/iconv/citrus_stdenc.h Thu Apr 16 03:35:47 2015 (r281584) +++ user/ngie/more-tests/lib/libc/iconv/citrus_stdenc.h Thu Apr 16 03:39:33 2015 (r281585) @@ -69,7 +69,7 @@ _citrus_stdenc_init_state(struct _citrus static __inline int _citrus_stdenc_mbtocs(struct _citrus_stdenc * __restrict ce, _citrus_csid_t * __restrict csid, _citrus_index_t * __restrict idx, - const char ** __restrict s, size_t n, void * __restrict ps, + char ** __restrict s, size_t n, void * __restrict ps, size_t * __restrict nresult, struct iconv_hooks *hooks) { Modified: user/ngie/more-tests/lib/libc/iconv/citrus_stdenc_local.h ============================================================================== --- user/ngie/more-tests/lib/libc/iconv/citrus_stdenc_local.h Thu Apr 16 03:35:47 2015 (r281584) +++ user/ngie/more-tests/lib/libc/iconv/citrus_stdenc_local.h Thu Apr 16 03:39:33 2015 (r281585) @@ -55,7 +55,7 @@ static int _citrus_##_e_##_stdenc_mbtoc (struct _citrus_stdenc * __restrict, \ _citrus_csid_t * __restrict, \ _citrus_index_t * __restrict, \ - const char ** __restrict, size_t, \ + char ** __restrict, size_t, \ void * __restrict, size_t * __restrict, \ struct iconv_hooks *); \ static int _citrus_##_e_##_stdenc_cstomb \ @@ -66,7 +66,7 @@ static int _citrus_##_e_##_stdenc_cstom static int _citrus_##_e_##_stdenc_mbtowc \ (struct _citrus_stdenc * __restrict, \ _citrus_wc_t * __restrict, \ - const char ** __restrict, size_t, \ + char ** __restrict, size_t, \ void * __restrict, size_t * __restrict, \ struct iconv_hooks *); \ static int _citrus_##_e_##_stdenc_wctomb \ @@ -106,7 +106,7 @@ typedef int (*_citrus_stdenc_init_state_ typedef int (*_citrus_stdenc_mbtocs_t) (struct _citrus_stdenc * __restrict, _citrus_csid_t * __restrict, _citrus_index_t * __restrict, - const char ** __restrict, size_t, + char ** __restrict, size_t, void * __restrict, size_t * __restrict, struct iconv_hooks *); typedef int (*_citrus_stdenc_cstomb_t) @@ -116,7 +116,7 @@ typedef int (*_citrus_stdenc_cstomb_t) typedef int (*_citrus_stdenc_mbtowc_t) (struct _citrus_stdenc * __restrict, _citrus_wc_t * __restrict, - const char ** __restrict, size_t, + char ** __restrict, size_t, void * __restrict, size_t * __restrict, struct iconv_hooks *); typedef int (*_citrus_stdenc_wctomb_t) Modified: user/ngie/more-tests/lib/libc/iconv/citrus_stdenc_template.h ============================================================================== --- user/ngie/more-tests/lib/libc/iconv/citrus_stdenc_template.h Thu Apr 16 03:35:47 2015 (r281584) +++ user/ngie/more-tests/lib/libc/iconv/citrus_stdenc_template.h Thu Apr 16 03:39:33 2015 (r281585) @@ -112,7 +112,7 @@ _FUNCNAME(stdenc_init_state)(struct _cit static int _FUNCNAME(stdenc_mbtocs)(struct _citrus_stdenc * __restrict ce, _citrus_csid_t * __restrict csid, _citrus_index_t * __restrict idx, - const char ** __restrict s, size_t n, void * __restrict ps, + char ** __restrict s, size_t n, void * __restrict ps, size_t * __restrict nresult, struct iconv_hooks *hooks) { wchar_t wc; @@ -151,7 +151,7 @@ _FUNCNAME(stdenc_cstomb)(struct _citrus_ static int _FUNCNAME(stdenc_mbtowc)(struct _citrus_stdenc * __restrict ce, - _citrus_wc_t * __restrict wc, const char ** __restrict s, size_t n, + _citrus_wc_t * __restrict wc, char ** __restrict s, size_t n, void * __restrict ps, size_t * __restrict nresult, struct iconv_hooks *hooks) { Modified: user/ngie/more-tests/lib/libc/iconv/iconv-internal.h ============================================================================== --- user/ngie/more-tests/lib/libc/iconv/iconv-internal.h Thu Apr 16 03:35:47 2015 (r281584) +++ user/ngie/more-tests/lib/libc/iconv/iconv-internal.h Thu Apr 16 03:39:33 2015 (r281585) @@ -29,11 +29,11 @@ /* * Interal prototypes for our back-end functions. */ -size_t __bsd___iconv(iconv_t, const char **, size_t *, char **, +size_t __bsd___iconv(iconv_t, char **, size_t *, char **, size_t *, __uint32_t, size_t *); void __bsd___iconv_free_list(char **, size_t); int __bsd___iconv_get_list(char ***, size_t *, __iconv_bool); -size_t __bsd_iconv(iconv_t, const char ** __restrict, +size_t __bsd_iconv(iconv_t, char ** __restrict, size_t * __restrict, char ** __restrict, size_t * __restrict); const char *__bsd_iconv_canonicalize(const char *); Modified: user/ngie/more-tests/lib/libc/iconv/iconv.3 ============================================================================== --- user/ngie/more-tests/lib/libc/iconv/iconv.3 Thu Apr 16 03:35:47 2015 (r281584) +++ user/ngie/more-tests/lib/libc/iconv/iconv.3 Thu Apr 16 03:39:33 2015 (r281585) @@ -48,7 +48,7 @@ .Ft size_t .Fn iconv "iconv_t cd" "char ** restrict src" "size_t * restrict srcleft" "char ** restrict dst" "size_t * restrict dstleft" .Ft size_t -.Fn __iconv "iconv_t cd" "const char ** restrict src" "size_t * restrict srcleft" "char ** restrict dst" "size_t * restrict dstleft" "uint32_t flags" "size_t * invalids" +.Fn __iconv "iconv_t cd" "char ** restrict src" "size_t * restrict srcleft" "char ** restrict dst" "size_t * restrict dstleft" "uint32_t flags" "size_t * invalids" .Sh DESCRIPTION The .Fn iconv_open Modified: user/ngie/more-tests/lib/libc/iconv/iconv.c ============================================================================== --- user/ngie/more-tests/lib/libc/iconv/iconv.c Thu Apr 16 03:35:47 2015 (r281584) +++ user/ngie/more-tests/lib/libc/iconv/iconv.c Thu Apr 16 03:39:33 2015 (r281585) @@ -31,7 +31,7 @@ #include "iconv-internal.h" size_t -iconv(iconv_t a, const char ** __restrict b, +iconv(iconv_t a, char ** __restrict b, size_t * __restrict c, char ** __restrict d, size_t * __restrict e) { Modified: user/ngie/more-tests/lib/libc/iconv/iconv_compat.c ============================================================================== --- user/ngie/more-tests/lib/libc/iconv/iconv_compat.c Thu Apr 16 03:35:47 2015 (r281584) +++ user/ngie/more-tests/lib/libc/iconv/iconv_compat.c Thu Apr 16 03:39:33 2015 (r281585) @@ -37,7 +37,7 @@ #include "iconv-internal.h" size_t -__iconv_compat(iconv_t a, const char ** b, size_t * c, char ** d, +__iconv_compat(iconv_t a, char ** b, size_t * c, char ** d, size_t * e, __uint32_t f, size_t *g) { return __bsd___iconv(a, b, c, d, e, f, g); @@ -56,7 +56,7 @@ __iconv_get_list_compat(char ***a, size_ } size_t -iconv_compat(iconv_t a, const char ** __restrict b, +iconv_compat(iconv_t a, char ** __restrict b, size_t * __restrict c, char ** __restrict d, size_t * __restrict e) { Modified: user/ngie/more-tests/lib/libc/locale/cXXrtomb_iconv.h ============================================================================== --- user/ngie/more-tests/lib/libc/locale/cXXrtomb_iconv.h Thu Apr 16 03:35:47 2015 (r281584) +++ user/ngie/more-tests/lib/libc/locale/cXXrtomb_iconv.h Thu Apr 16 03:39:33 2015 (r281585) @@ -57,8 +57,7 @@ cXXrtomb_l(char * __restrict s, charXX_t { _ConversionState *cs; struct _citrus_iconv *handle; - const char *src; - char *dst; + char *src, *dst; size_t srcleft, dstleft, invlen; int err; Modified: user/ngie/more-tests/lib/libc/locale/mbrtocXX_iconv.h ============================================================================== --- user/ngie/more-tests/lib/libc/locale/mbrtocXX_iconv.h Thu Apr 16 03:35:47 2015 (r281584) +++ user/ngie/more-tests/lib/libc/locale/mbrtocXX_iconv.h Thu Apr 16 03:39:33 2015 (r281585) @@ -99,8 +99,7 @@ mbrtocXX_l(charXX_t * __restrict pc, con /* Convert as few characters to the dst buffer as possible. */ for (i = 0; ; i++) { - const char *src; - char *dst; + char *src, *dst; size_t srcleft, dstleft, invlen; int err; Modified: user/ngie/more-tests/lib/libiconv_modules/BIG5/citrus_big5.c ============================================================================== --- user/ngie/more-tests/lib/libiconv_modules/BIG5/citrus_big5.c Thu Apr 16 03:35:47 2015 (r281584) +++ user/ngie/more-tests/lib/libiconv_modules/BIG5/citrus_big5.c Thu Apr 16 03:39:33 2015 (r281585) @@ -269,12 +269,12 @@ static int /*ARGSUSED*/ _citrus_BIG5_mbrtowc_priv(_BIG5EncodingInfo * __restrict ei, wchar_t * __restrict pwc, - const char ** __restrict s, size_t n, + char ** __restrict s, size_t n, _BIG5State * __restrict psenc, size_t * __restrict nresult) { wchar_t wchar; - const char *s0; + char *s0; int c, chlenbak; s0 = *s; Modified: user/ngie/more-tests/lib/libiconv_modules/DECHanyu/citrus_dechanyu.c ============================================================================== --- user/ngie/more-tests/lib/libiconv_modules/DECHanyu/citrus_dechanyu.c Thu Apr 16 03:35:47 2015 (r281584) +++ user/ngie/more-tests/lib/libiconv_modules/DECHanyu/citrus_dechanyu.c Thu Apr 16 03:39:33 2015 (r281585) @@ -165,10 +165,10 @@ is_94charset(int c) static int /*ARGSUSED*/ _citrus_DECHanyu_mbrtowc_priv(_DECHanyuEncodingInfo * __restrict ei, - wchar_t * __restrict pwc, const char ** __restrict s, size_t n, + wchar_t * __restrict pwc, char ** __restrict s, size_t n, _DECHanyuState * __restrict psenc, size_t * __restrict nresult) { - const char *s0; + char *s0; wchar_t wc; int ch; Modified: user/ngie/more-tests/lib/libiconv_modules/EUC/citrus_euc.c ============================================================================== --- user/ngie/more-tests/lib/libiconv_modules/EUC/citrus_euc.c Thu Apr 16 03:35:47 2015 (r281584) +++ user/ngie/more-tests/lib/libiconv_modules/EUC/citrus_euc.c Thu Apr 16 03:39:33 2015 (r281585) @@ -190,12 +190,12 @@ _citrus_EUC_unpack_state(_EUCEncodingInf #endif static int -_citrus_EUC_mbrtowc_priv(_EUCEncodingInfo *ei, wchar_t *pwc, const char **s, +_citrus_EUC_mbrtowc_priv(_EUCEncodingInfo *ei, wchar_t *pwc, char **s, size_t n, _EUCState *psenc, size_t *nresult) { wchar_t wchar; int c, chlenbak, cs, len; - const char *s0, *s1 = NULL; + char *s0, *s1 = NULL; s0 = *s; Modified: user/ngie/more-tests/lib/libiconv_modules/EUCTW/citrus_euctw.c ============================================================================== --- user/ngie/more-tests/lib/libiconv_modules/EUCTW/citrus_euctw.c Thu Apr 16 03:35:47 2015 (r281584) +++ user/ngie/more-tests/lib/libiconv_modules/EUCTW/citrus_euctw.c Thu Apr 16 03:39:33 2015 (r281585) @@ -176,10 +176,10 @@ _citrus_EUCTW_encoding_module_uninit(_EU static int _citrus_EUCTW_mbrtowc_priv(_EUCTWEncodingInfo * __restrict ei, - wchar_t * __restrict pwc, const char ** __restrict s, + wchar_t * __restrict pwc, char ** __restrict s, size_t n, _EUCTWState * __restrict psenc, size_t * __restrict nresult) { - const char *s0; + char *s0; wchar_t wchar; int c, chlenbak, cs; Modified: user/ngie/more-tests/lib/libiconv_modules/GBK2K/citrus_gbk2k.c ============================================================================== --- user/ngie/more-tests/lib/libiconv_modules/GBK2K/citrus_gbk2k.c Thu Apr 16 03:35:47 2015 (r281584) +++ user/ngie/more-tests/lib/libiconv_modules/GBK2K/citrus_gbk2k.c Thu Apr 16 03:39:33 2015 (r281585) @@ -149,10 +149,10 @@ _mb_count(wchar_t v) static int _citrus_GBK2K_mbrtowc_priv(_GBK2KEncodingInfo * __restrict ei, - wchar_t * __restrict pwc, const char ** __restrict s, size_t n, + wchar_t * __restrict pwc, char ** __restrict s, size_t n, _GBK2KState * __restrict psenc, size_t * __restrict nresult) { - const char *s0, *s1; + char *s0, *s1; wchar_t wc; int chlenbak, len; Modified: user/ngie/more-tests/lib/libiconv_modules/HZ/citrus_hz.c ============================================================================== --- user/ngie/more-tests/lib/libiconv_modules/HZ/citrus_hz.c Thu Apr 16 03:35:47 2015 (r281584) +++ user/ngie/more-tests/lib/libiconv_modules/HZ/citrus_hz.c Thu Apr 16 03:39:33 2015 (r281585) @@ -175,13 +175,13 @@ _citrus_HZ_unpack_state(_HZEncodingInfo static int _citrus_HZ_mbrtowc_priv(_HZEncodingInfo * __restrict ei, - wchar_t * __restrict pwc, const char ** __restrict s, size_t n, + wchar_t * __restrict pwc, char ** __restrict s, size_t n, _HZState * __restrict psenc, size_t * __restrict nresult) { escape_t *candidate, *init; graphic_t *graphic; const range_t *range; - const char *s0; + char *s0; wchar_t wc; int bit, ch, head, len, tail; Modified: user/ngie/more-tests/lib/libiconv_modules/ISO2022/citrus_iso2022.c ============================================================================== --- user/ngie/more-tests/lib/libiconv_modules/ISO2022/citrus_iso2022.c Thu Apr 16 03:35:47 2015 (r281584) +++ user/ngie/more-tests/lib/libiconv_modules/ISO2022/citrus_iso2022.c Thu Apr 16 03:39:33 2015 (r281585) @@ -574,7 +574,7 @@ terminate: static wchar_t _ISO2022_sgetwchar(_ISO2022EncodingInfo * __restrict ei __unused, - const char * __restrict string, size_t n, const char ** __restrict result, + char * __restrict string, size_t n, char ** __restrict result, _ISO2022State * __restrict psenc) { const struct seqtable *sp; @@ -842,10 +842,10 @@ asis: static int _citrus_ISO2022_mbrtowc_priv(_ISO2022EncodingInfo * __restrict ei, - wchar_t * __restrict pwc, const char ** __restrict s, + wchar_t * __restrict pwc, char ** __restrict s, size_t n, _ISO2022State * __restrict psenc, size_t * __restrict nresult) { - const char *p, *result, *s0; + char *p, *result, *s0; wchar_t wchar; int c, chlenbak; Modified: user/ngie/more-tests/lib/libiconv_modules/JOHAB/citrus_johab.c ============================================================================== --- user/ngie/more-tests/lib/libiconv_modules/JOHAB/citrus_johab.c Thu Apr 16 03:35:47 2015 (r281584) +++ user/ngie/more-tests/lib/libiconv_modules/JOHAB/citrus_johab.c Thu Apr 16 03:39:33 2015 (r281585) @@ -145,10 +145,10 @@ ishanja(int l, int t) static int /*ARGSUSED*/ _citrus_JOHAB_mbrtowc_priv(_JOHABEncodingInfo * __restrict ei, - wchar_t * __restrict pwc, const char ** __restrict s, size_t n, + wchar_t * __restrict pwc, char ** __restrict s, size_t n, _JOHABState * __restrict psenc, size_t * __restrict nresult) { - const char *s0; + char *s0; int l, t; if (*s == NULL) { Modified: user/ngie/more-tests/lib/libiconv_modules/MSKanji/citrus_mskanji.c ============================================================================== --- user/ngie/more-tests/lib/libiconv_modules/MSKanji/citrus_mskanji.c Thu Apr 16 03:35:47 2015 (r281584) +++ user/ngie/more-tests/lib/libiconv_modules/MSKanji/citrus_mskanji.c Thu Apr 16 03:39:33 2015 (r281585) @@ -153,10 +153,10 @@ _citrus_MSKanji_unpack_state(_MSKanjiEnc static int /*ARGSUSED*/ _citrus_MSKanji_mbrtowc_priv(_MSKanjiEncodingInfo * __restrict ei, - wchar_t * __restrict pwc, const char ** __restrict s, size_t n, + wchar_t * __restrict pwc, char ** __restrict s, size_t n, _MSKanjiState * __restrict psenc, size_t * __restrict nresult) { - const char *s0; + char *s0; wchar_t wchar; int chlenbak, len; Modified: user/ngie/more-tests/lib/libiconv_modules/UES/citrus_ues.c ============================================================================== --- user/ngie/more-tests/lib/libiconv_modules/UES/citrus_ues.c Thu Apr 16 03:35:47 2015 (r281584) +++ user/ngie/more-tests/lib/libiconv_modules/UES/citrus_ues.c Thu Apr 16 03:39:33 2015 (r281585) @@ -185,10 +185,10 @@ is_basic(wchar_t wc) static int _citrus_UES_mbrtowc_priv(_UESEncodingInfo * __restrict ei, - wchar_t * __restrict pwc, const char ** __restrict s, size_t n, + wchar_t * __restrict pwc, char ** __restrict s, size_t n, _UESState * __restrict psenc, size_t * __restrict nresult) { - const char *s0; + char *s0; int ch, head, num, tail; wchar_t hi, wc; Modified: user/ngie/more-tests/lib/libiconv_modules/UTF1632/citrus_utf1632.c ============================================================================== --- user/ngie/more-tests/lib/libiconv_modules/UTF1632/citrus_utf1632.c Thu Apr 16 03:35:47 2015 (r281584) +++ user/ngie/more-tests/lib/libiconv_modules/UTF1632/citrus_utf1632.c Thu Apr 16 03:39:33 2015 (r281585) @@ -97,9 +97,9 @@ _citrus_UTF1632_init_state(_UTF1632Encod static int _citrus_UTF1632_mbrtowc_priv(_UTF1632EncodingInfo *ei, wchar_t *pwc, - const char **s, size_t n, _UTF1632State *psenc, size_t *nresult) + char **s, size_t n, _UTF1632State *psenc, size_t *nresult) { - const char *s0; + char *s0; size_t result; wchar_t wc = L'\0'; int chlenbak, endian, needlen; Modified: user/ngie/more-tests/lib/libiconv_modules/UTF7/citrus_utf7.c ============================================================================== --- user/ngie/more-tests/lib/libiconv_modules/UTF7/citrus_utf7.c Thu Apr 16 03:35:47 2015 (r281584) +++ user/ngie/more-tests/lib/libiconv_modules/UTF7/citrus_utf7.c Thu Apr 16 03:39:33 2015 (r281585) @@ -151,11 +151,11 @@ static const char spaces[] = " \t\r\n"; static int _citrus_UTF7_mbtoutf16(_UTF7EncodingInfo * __restrict ei, - uint16_t * __restrict u16, const char ** __restrict s, size_t n, + uint16_t * __restrict u16, char ** __restrict s, size_t n, _UTF7State * __restrict psenc, size_t * __restrict nresult) { _UTF7State sv; - const char *s0; + char *s0; int done, i, len; s0 = *s; @@ -244,7 +244,7 @@ ilseq: static int _citrus_UTF7_mbrtowc_priv(_UTF7EncodingInfo * __restrict ei, - wchar_t * __restrict pwc, const char ** __restrict s, size_t n, + wchar_t * __restrict pwc, char ** __restrict s, size_t n, _UTF7State * __restrict psenc, size_t * __restrict nresult) { uint32_t u32; Modified: user/ngie/more-tests/lib/libiconv_modules/UTF8/citrus_utf8.c ============================================================================== --- user/ngie/more-tests/lib/libiconv_modules/UTF8/citrus_utf8.c Thu Apr 16 03:35:47 2015 (r281584) +++ user/ngie/more-tests/lib/libiconv_modules/UTF8/citrus_utf8.c Thu Apr 16 03:39:33 2015 (r281585) @@ -177,10 +177,10 @@ _citrus_UTF8_unpack_state(_UTF8EncodingI #endif static int -_citrus_UTF8_mbrtowc_priv(_UTF8EncodingInfo *ei, wchar_t *pwc, const char **s, +_citrus_UTF8_mbrtowc_priv(_UTF8EncodingInfo *ei, wchar_t *pwc, char **s, size_t n, _UTF8State *psenc, size_t *nresult) { - const char *s0; + char *s0; wchar_t wchar; int i; uint8_t c; Modified: user/ngie/more-tests/lib/libiconv_modules/VIQR/citrus_viqr.c ============================================================================== --- user/ngie/more-tests/lib/libiconv_modules/VIQR/citrus_viqr.c Thu Apr 16 03:35:47 2015 (r281584) +++ user/ngie/more-tests/lib/libiconv_modules/VIQR/citrus_viqr.c Thu Apr 16 03:39:33 2015 (r281585) @@ -252,11 +252,11 @@ _citrus_VIQR_unpack_state(_VIQREncodingI static int _citrus_VIQR_mbrtowc_priv(_VIQREncodingInfo * __restrict ei, - wchar_t * __restrict pwc, const char ** __restrict s, size_t n, + wchar_t * __restrict pwc, char ** __restrict s, size_t n, _VIQRState * __restrict psenc, size_t * __restrict nresult) { mnemonic_t *m, *m0; - const char *s0; + char *s0; wchar_t wc; ssize_t i; int ch, escape; Modified: user/ngie/more-tests/lib/libiconv_modules/ZW/citrus_zw.c ============================================================================== --- user/ngie/more-tests/lib/libiconv_modules/ZW/citrus_zw.c Thu Apr 16 03:35:47 2015 (r281584) +++ user/ngie/more-tests/lib/libiconv_modules/ZW/citrus_zw.c Thu Apr 16 03:39:33 2015 (r281585) @@ -107,10 +107,10 @@ _citrus_ZW_unpack_state(_ZWEncodingInfo static int _citrus_ZW_mbrtowc_priv(_ZWEncodingInfo * __restrict ei, - wchar_t * __restrict pwc, const char **__restrict s, size_t n, + wchar_t * __restrict pwc, char **__restrict s, size_t n, _ZWState * __restrict psenc, size_t * __restrict nresult) { - const char *s0; + char *s0; wchar_t wc; int ch, len; Modified: user/ngie/more-tests/lib/libiconv_modules/iconv_none/citrus_iconv_none.c ============================================================================== --- user/ngie/more-tests/lib/libiconv_modules/iconv_none/citrus_iconv_none.c Thu Apr 16 03:35:47 2015 (r281584) +++ user/ngie/more-tests/lib/libiconv_modules/iconv_none/citrus_iconv_none.c Thu Apr 16 03:39:33 2015 (r281585) @@ -97,7 +97,7 @@ _citrus_iconv_none_iconv_uninit_context( static int /*ARGSUSED*/ _citrus_iconv_none_iconv_convert(struct _citrus_iconv * __restrict ci __unused, - const char * __restrict * __restrict in, size_t * __restrict inbytes, + char * __restrict * __restrict in, size_t * __restrict inbytes, char * __restrict * __restrict out, size_t * __restrict outbytes, uint32_t flags __unused, size_t * __restrict invalids) { Modified: user/ngie/more-tests/lib/libiconv_modules/iconv_std/citrus_iconv_std.c ============================================================================== --- user/ngie/more-tests/lib/libiconv_modules/iconv_std/citrus_iconv_std.c Thu Apr 16 03:35:47 2015 (r281584) +++ user/ngie/more-tests/lib/libiconv_modules/iconv_std/citrus_iconv_std.c Thu Apr 16 03:39:33 2015 (r281585) @@ -104,7 +104,7 @@ init_encoding_state(struct _citrus_iconv static __inline int mbtocsx(struct _citrus_iconv_std_encoding *se, - _csid_t *csid, _index_t *idx, const char **s, size_t n, size_t *nresult, + _csid_t *csid, _index_t *idx, char **s, size_t n, size_t *nresult, struct iconv_hooks *hooks) { @@ -461,7 +461,7 @@ _citrus_iconv_std_iconv_uninit_context(s static int _citrus_iconv_std_iconv_convert(struct _citrus_iconv * __restrict cv, - const char * __restrict * __restrict in, size_t * __restrict inbytes, + char * __restrict * __restrict in, size_t * __restrict inbytes, char * __restrict * __restrict out, size_t * __restrict outbytes, uint32_t flags, size_t * __restrict invalids) { @@ -469,7 +469,7 @@ _citrus_iconv_std_iconv_convert(struct _ struct _citrus_iconv_std_context *sc = cv->cv_closure; _csid_t csid; _index_t idx; - const char *tmpin; + char *tmpin; size_t inval, szrin, szrout; int ret, state = 0; Modified: user/ngie/more-tests/lib/libkiconv/xlat16_iconv.c ============================================================================== --- user/ngie/more-tests/lib/libkiconv/xlat16_iconv.c Thu Apr 16 03:35:47 2015 (r281584) +++ user/ngie/more-tests/lib/libkiconv/xlat16_iconv.c Thu Apr 16 03:39:33 2015 (r281585) @@ -62,7 +62,7 @@ static int chklocale(int, const char *); typedef void *iconv_t; static int my_iconv_init(void); static iconv_t (*my_iconv_open)(const char *, const char *); -static size_t (*my_iconv)(iconv_t, const char **, size_t *, char **, size_t *); +static size_t (*my_iconv)(iconv_t, char **, size_t *, char **, size_t *); static int (*my_iconv_close)(iconv_t); #else #include <iconv.h> @@ -71,7 +71,7 @@ static int (*my_iconv_close)(iconv_t); #define my_iconv iconv #define my_iconv_close iconv_close #endif -static size_t my_iconv_char(iconv_t, const u_char **, size_t *, u_char **, size_t *); +static size_t my_iconv_char(iconv_t, u_char **, size_t *, u_char **, size_t *); int kiconv_add_xlat16_cspair(const char *tocode, const char *fromcode, int flag) @@ -221,8 +221,8 @@ kiconv_xlat16_open(const char *tocode, c src[0] = (u_char)(c >> 8); src[1] = (u_char)c; - ret = my_iconv_char(cd, (const u_char **)&srcp, - &inbytesleft, &dstp, &outbytesleft); + ret = my_iconv_char(cd, &srcp, &inbytesleft, + &dstp, &outbytesleft); if (ret == -1) { table[us] = 0; continue; @@ -338,11 +338,10 @@ my_iconv_init(void) #endif static size_t -my_iconv_char(iconv_t cd, const u_char **ibuf, size_t * ilen, u_char **obuf, +my_iconv_char(iconv_t cd, u_char **ibuf, size_t * ilen, u_char **obuf, size_t * olen) { - const u_char *sp; - u_char *dp, ilocal[3], olocal[3]; + u_char *sp, *dp, ilocal[3], olocal[3]; u_char c1, c2; int ret; size_t ir, or; @@ -352,7 +351,7 @@ my_iconv_char(iconv_t cd, const u_char * ir = *ilen; bzero(*obuf, *olen); - ret = my_iconv(cd, (const char **)&sp, ilen, (char **)&dp, olen); + ret = my_iconv(cd, (char **)&sp, ilen, (char **)&dp, olen); c1 = (*obuf)[0]; c2 = (*obuf)[1]; @@ -375,7 +374,7 @@ my_iconv_char(iconv_t cd, const u_char * sp = ilocal; dp = olocal; - if ((my_iconv(cd,(const char **)&sp, &ir, (char **)&dp, &or)) != -1) { + if ((my_iconv(cd,(char **)&sp, &ir, (char **)&dp, &or)) != -1) { if (olocal[0] != c1) return (ret); @@ -429,7 +428,7 @@ my_iconv_char(iconv_t cd, const u_char * sp = ilocal + 1; dp = olocal; - if ((my_iconv(cd,(const char **)&sp, &ir, (char **)&dp, &or)) != -1) { + if ((my_iconv(cd,(char **)&sp, &ir, (char **)&dp, &or)) != -1) { if (olocal[0] == c2) /* * inbuf is a single byte char Modified: user/ngie/more-tests/libexec/rtld-elf/aarch64/reloc.c ============================================================================== --- user/ngie/more-tests/libexec/rtld-elf/aarch64/reloc.c Thu Apr 16 03:35:47 2015 (r281584) +++ user/ngie/more-tests/libexec/rtld-elf/aarch64/reloc.c Thu Apr 16 03:39:33 2015 (r281585) @@ -161,7 +161,7 @@ rtld_tlsdesc_handle_locked(struct tls_da if (def == NULL) rtld_die(); - tlsdesc->index = defobj->tlsindex + def->st_value + rela->r_addend; + tlsdesc->index = defobj->tlsoffset + def->st_value + rela->r_addend; return (tlsdesc->index); } @@ -206,7 +206,7 @@ reloc_plt(Obj_Entry *obj) case R_AARCH64_TLSDESC: if (ELF_R_SYM(rela->r_info) == 0) { where[0] = (Elf_Addr)_rtld_tlsdesc; - where[1] = obj->tlsindex + rela->r_addend; + where[1] = obj->tlsoffset + rela->r_addend; } else { where[0] = (Elf_Addr)_rtld_tlsdesc_dynamic; where[1] = (Elf_Addr)reloc_tlsdesc_alloc(obj, Modified: user/ngie/more-tests/libexec/rtld-elf/rtld.c ============================================================================== --- user/ngie/more-tests/libexec/rtld-elf/rtld.c Thu Apr 16 03:35:47 2015 (r281584) +++ user/ngie/more-tests/libexec/rtld-elf/rtld.c Thu Apr 16 03:39:33 2015 (r281585) @@ -1158,8 +1158,8 @@ digest_dynamic1(Obj_Entry *obj, int earl obj->z_noopen = true; if ((dynp->d_un.d_val & DF_1_ORIGIN) && trust) obj->z_origin = true; - /*if (dynp->d_un.d_val & DF_1_GLOBAL) - XXX ;*/ + if (dynp->d_un.d_val & DF_1_GLOBAL) + obj->z_global = true; if (dynp->d_un.d_val & DF_1_BIND_NOW) obj->bind_now = true; if (dynp->d_un.d_val & DF_1_NODELETE) @@ -1790,22 +1790,35 @@ init_dag(Obj_Entry *root) } static void -process_nodelete(Obj_Entry *root) +process_z(Obj_Entry *root) { const Objlist_Entry *elm; + Obj_Entry *obj; /* - * Walk over object DAG and process every dependent object that - * is marked as DF_1_NODELETE. They need to grow their own DAG, - * which then should have its reference upped separately. + * Walk over object DAG and process every dependent object + * that is marked as DF_1_NODELETE or DF_1_GLOBAL. They need + * to grow their own DAG. + * + * For DF_1_GLOBAL, DAG is required for symbol lookups in + * symlook_global() to work. + * + * For DF_1_NODELETE, the DAG should have its reference upped. */ STAILQ_FOREACH(elm, &root->dagmembers, link) { - if (elm->obj != NULL && elm->obj->z_nodelete && - !elm->obj->ref_nodel) { - dbg("obj %s nodelete", elm->obj->path); - init_dag(elm->obj); - ref_dag(elm->obj); - elm->obj->ref_nodel = true; + obj = elm->obj; + if (obj == NULL) + continue; + if (obj->z_nodelete && !obj->ref_nodel) { + dbg("obj %s -z nodelete", obj->path); + init_dag(obj); + ref_dag(obj); + obj->ref_nodel = true; + } + if (obj->z_global && objlist_find(&list_global, obj) == NULL) { + dbg("obj %s -z global", obj->path); + objlist_push_tail(&list_global, obj); + init_dag(obj); } } } @@ -3044,13 +3057,13 @@ dlopen_object(const char *name, int fd, initlist_add_objects(obj, &obj->next, &initlist); } /* - * Process all no_delete objects here, given them own - * DAGs to prevent their dependencies from being unloaded. - * This has to be done after we have loaded all of the - * dependencies, so that we do not miss any. + * Process all no_delete or global objects here, given + * them own DAGs to prevent their dependencies from being + * unloaded. This has to be done after we have loaded all + * of the dependencies, so that we do not miss any. */ if (obj != NULL) - process_nodelete(obj); + process_z(obj); } else { /* * Bump the reference counts for objects on this DAG. If Modified: user/ngie/more-tests/libexec/rtld-elf/rtld.h ============================================================================== --- user/ngie/more-tests/libexec/rtld-elf/rtld.h Thu Apr 16 03:35:47 2015 (r281584) +++ user/ngie/more-tests/libexec/rtld-elf/rtld.h Thu Apr 16 03:39:33 2015 (r281585) @@ -264,6 +264,7 @@ typedef struct Struct_Obj_Entry { bool z_loadfltr : 1; /* Immediately load filtees */ bool z_interpose : 1; /* Interpose all objects but main */ bool z_nodeflib : 1; /* Don't search default library path */ + bool z_global : 1; /* Make the object global */ bool ref_nodel : 1; /* Refcount increased to prevent dlclose */ bool init_scanned: 1; /* Object is already on init list. */ bool on_fini_list: 1; /* Object is already on fini list. */ Modified: user/ngie/more-tests/sys/arm64/arm64/vfp.c ============================================================================== --- user/ngie/more-tests/sys/arm64/arm64/vfp.c Thu Apr 16 03:35:47 2015 (r281584) +++ user/ngie/more-tests/sys/arm64/arm64/vfp.c Thu Apr 16 03:39:33 2015 (r281585) @@ -88,41 +88,42 @@ vfp_save_state(struct thread *td) uint64_t fpcr, fpsr; uint32_t cpacr; + critical_enter(); /* * Only store the registers if the VFP is enabled, * i.e. return if we are trapping on FP access. */ cpacr = READ_SPECIALREG(cpacr_el1); - if ((cpacr & CPACR_FPEN_MASK) != CPACR_FPEN_TRAP_NONE) - return; - - vfp_state = td->td_pcb->pcb_vfp; - __asm __volatile( - "mrs %0, fpcr \n" - "mrs %1, fpsr \n" - "stp q0, q1, [%2, #16 * 0]\n" - "stp q2, q3, [%2, #16 * 2]\n" - "stp q4, q5, [%2, #16 * 4]\n" - "stp q6, q7, [%2, #16 * 6]\n" - "stp q8, q9, [%2, #16 * 8]\n" - "stp q10, q11, [%2, #16 * 10]\n" - "stp q12, q13, [%2, #16 * 12]\n" - "stp q14, q15, [%2, #16 * 14]\n" - "stp q16, q17, [%2, #16 * 16]\n" - "stp q18, q19, [%2, #16 * 18]\n" - "stp q20, q21, [%2, #16 * 20]\n" - "stp q22, q23, [%2, #16 * 22]\n" - "stp q24, q25, [%2, #16 * 24]\n" - "stp q26, q27, [%2, #16 * 26]\n" - "stp q28, q29, [%2, #16 * 28]\n" - "stp q30, q31, [%2, #16 * 30]\n" - : "=&r"(fpcr), "=&r"(fpsr) : "r"(vfp_state)); + if ((cpacr & CPACR_FPEN_MASK) == CPACR_FPEN_TRAP_NONE) { + vfp_state = td->td_pcb->pcb_vfp; + __asm __volatile( + "mrs %0, fpcr \n" + "mrs %1, fpsr \n" + "stp q0, q1, [%2, #16 * 0]\n" + "stp q2, q3, [%2, #16 * 2]\n" + "stp q4, q5, [%2, #16 * 4]\n" + "stp q6, q7, [%2, #16 * 6]\n" + "stp q8, q9, [%2, #16 * 8]\n" + "stp q10, q11, [%2, #16 * 10]\n" + "stp q12, q13, [%2, #16 * 12]\n" + "stp q14, q15, [%2, #16 * 14]\n" + "stp q16, q17, [%2, #16 * 16]\n" + "stp q18, q19, [%2, #16 * 18]\n" + "stp q20, q21, [%2, #16 * 20]\n" + "stp q22, q23, [%2, #16 * 22]\n" + "stp q24, q25, [%2, #16 * 24]\n" + "stp q26, q27, [%2, #16 * 26]\n" + "stp q28, q29, [%2, #16 * 28]\n" + "stp q30, q31, [%2, #16 * 30]\n" + : "=&r"(fpcr), "=&r"(fpsr) : "r"(vfp_state)); - td->td_pcb->pcb_fpcr = fpcr; - td->td_pcb->pcb_fpsr = fpsr; + td->td_pcb->pcb_fpcr = fpcr; *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201504160339.t3G3dYY8082748>