Date: Thu, 29 Jul 2004 11:25:43 GMT From: Doug Rabson <dfr@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 58440 for review Message-ID: <200407291125.i6TBPhBi037792@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=58440 Change 58440 by dfr@dfr_home on 2004/07/29 11:25:13 IFC 58433 Affected files ... .. //depot/projects/kse/include/string.h#4 integrate .. //depot/projects/kse/include/strings.h#5 integrate .. //depot/projects/kse/include/wchar.h#14 integrate .. //depot/projects/kse/lib/libc/amd64/gen/signalcontext.c#3 integrate .. //depot/projects/kse/lib/libc/gen/Makefile.inc#9 integrate .. //depot/projects/kse/lib/libc/gen/fnmatch.c#2 integrate .. //depot/projects/kse/lib/libc/gen/ftw.c#2 integrate .. //depot/projects/kse/lib/libc/gen/getnetgrent.c#3 integrate .. //depot/projects/kse/lib/libc/gen/glob.3#4 integrate .. //depot/projects/kse/lib/libc/gen/glob.c#3 integrate .. //depot/projects/kse/lib/libc/gen/wordexp.3#4 integrate .. //depot/projects/kse/lib/libc/locale/mblen.c#6 integrate .. //depot/projects/kse/lib/libc/locale/mbtowc.c#7 integrate .. //depot/projects/kse/lib/libc/locale/rune.c#4 integrate .. //depot/projects/kse/lib/libc/locale/runetype.c#5 integrate .. //depot/projects/kse/lib/libc/locale/table.c#6 integrate .. //depot/projects/kse/lib/libc/locale/tolower.c#5 integrate .. //depot/projects/kse/lib/libc/locale/toupper.c#5 integrate .. //depot/projects/kse/lib/libc/locale/utf8.c#6 integrate .. //depot/projects/kse/lib/libc/locale/wctomb.c#6 integrate .. //depot/projects/kse/lib/libc/sparc64/fpu/fpu_implode.c#2 integrate .. //depot/projects/kse/lib/libkvm/kvm_proc.c#27 integrate .. //depot/projects/kse/sys/alpha/alpha/autoconf.c#11 integrate .. //depot/projects/kse/sys/alpha/include/critical.h#3 integrate .. //depot/projects/kse/sys/alpha/osf1/osf1_misc.c#16 integrate .. //depot/projects/kse/sys/amd64/amd64/autoconf.c#4 integrate .. //depot/projects/kse/sys/amd64/conf/GENERIC#5 integrate .. //depot/projects/kse/sys/amd64/conf/GENERIC.hints#2 integrate .. //depot/projects/kse/sys/amd64/include/critical.h#2 integrate .. //depot/projects/kse/sys/arm/arm/pmap.c#4 integrate .. //depot/projects/kse/sys/arm/include/critical.h#2 integrate .. //depot/projects/kse/sys/boot/i386/boot2/boot2.c#14 integrate .. //depot/projects/kse/sys/coda/coda_vnops.c#13 integrate .. //depot/projects/kse/sys/compat/linux/linux_file.c#19 integrate .. //depot/projects/kse/sys/compat/linux/linux_misc.c#24 integrate .. //depot/projects/kse/sys/compat/linux/linux_uid16.c#12 integrate .. //depot/projects/kse/sys/conf/NOTES#25 integrate .. //depot/projects/kse/sys/conf/kern.pre.mk#20 integrate .. //depot/projects/kse/sys/conf/options#34 integrate .. //depot/projects/kse/sys/contrib/pf/net/if_pfsync.c#5 integrate .. //depot/projects/kse/sys/contrib/pf/net/pf.c#5 integrate .. //depot/projects/kse/sys/contrib/pf/net/pf_if.c#2 integrate .. //depot/projects/kse/sys/contrib/pf/net/pf_norm.c#4 integrate .. //depot/projects/kse/sys/contrib/pf/net/pf_table.c#3 integrate .. //depot/projects/kse/sys/ddb/db_main.c#2 integrate .. //depot/projects/kse/sys/dev/aac/aac.c#27 integrate .. //depot/projects/kse/sys/dev/aac/aac_disk.c#17 integrate .. //depot/projects/kse/sys/dev/acpica/acpi.c#34 integrate .. //depot/projects/kse/sys/dev/acpica/acpi_video.c#5 integrate .. //depot/projects/kse/sys/dev/ata/ata-lowlevel.c#4 integrate .. //depot/projects/kse/sys/dev/bge/if_bge.c#19 integrate .. //depot/projects/kse/sys/dev/ciss/ciss.c#9 integrate .. //depot/projects/kse/sys/dev/ciss/cissio.h#3 integrate .. //depot/projects/kse/sys/dev/ciss/cissreg.h#5 integrate .. //depot/projects/kse/sys/dev/digi/digi.c#16 integrate .. //depot/projects/kse/sys/dev/fdc/fdc_acpi.c#2 integrate .. //depot/projects/kse/sys/dev/firewire/firewire.c#7 integrate .. //depot/projects/kse/sys/dev/pccbb/pccbb.c#27 integrate .. //depot/projects/kse/sys/dev/pccbb/pccbbdevid.h#9 integrate .. //depot/projects/kse/sys/dev/scd/scd.c#4 integrate .. //depot/projects/kse/sys/dev/si/si.c#10 integrate .. //depot/projects/kse/sys/dev/sio/sio.c#24 integrate .. //depot/projects/kse/sys/dev/sound/pci/emu10k1.c#9 integrate .. //depot/projects/kse/sys/dev/syscons/syscons.c#22 integrate .. //depot/projects/kse/sys/dev/syscons/syscons.h#10 integrate .. //depot/projects/kse/sys/dev/uart/uart_dev_ns8250.c#5 integrate .. //depot/projects/kse/sys/dev/usb/uhub.c#15 integrate .. //depot/projects/kse/sys/fs/devfs/devfs_vnops.c#21 integrate .. //depot/projects/kse/sys/fs/hpfs/hpfs_vfsops.c#15 integrate .. //depot/projects/kse/sys/fs/hpfs/hpfs_vnops.c#15 integrate .. //depot/projects/kse/sys/fs/msdosfs/msdosfs_vfsops.c#15 integrate .. //depot/projects/kse/sys/fs/msdosfs/msdosfs_vnops.c#14 integrate .. //depot/projects/kse/sys/fs/ntfs/ntfs_subr.c#11 integrate .. //depot/projects/kse/sys/fs/ntfs/ntfs_vfsops.c#16 integrate .. //depot/projects/kse/sys/fs/smbfs/smbfs_vnops.c#15 integrate .. //depot/projects/kse/sys/geom/concat/g_concat.c#4 integrate .. //depot/projects/kse/sys/geom/concat/g_concat.h#4 integrate .. //depot/projects/kse/sys/geom/geom_slice.c#9 integrate .. //depot/projects/kse/sys/geom/nop/g_nop.c#4 integrate .. //depot/projects/kse/sys/geom/stripe/g_stripe.c#3 integrate .. //depot/projects/kse/sys/geom/stripe/g_stripe.h#3 integrate .. //depot/projects/kse/sys/geom/vinum/geom_vinum.c#3 integrate .. //depot/projects/kse/sys/geom/vinum/geom_vinum_drive.c#3 integrate .. //depot/projects/kse/sys/geom/vinum/geom_vinum_init.c#2 integrate .. //depot/projects/kse/sys/gnu/ext2fs/ext2_vfsops.c#15 integrate .. //depot/projects/kse/sys/gnu/ext2fs/ext2_vnops.c#12 integrate .. //depot/projects/kse/sys/i386/acpica/acpi_asus.c#4 integrate .. //depot/projects/kse/sys/i386/acpica/acpi_machdep.c#7 integrate .. //depot/projects/kse/sys/i386/acpica/acpi_panasonic.c#2 integrate .. //depot/projects/kse/sys/i386/acpica/acpi_wakeup.c#12 integrate .. //depot/projects/kse/sys/i386/acpica/genwakecode.sh#2 integrate .. //depot/projects/kse/sys/i386/i386/autoconf.c#15 integrate .. //depot/projects/kse/sys/i386/include/critical.h#4 integrate .. //depot/projects/kse/sys/ia64/ia64/autoconf.c#9 integrate .. //depot/projects/kse/sys/ia64/ia64/sal.c#10 integrate .. //depot/projects/kse/sys/ia64/include/critical.h#3 integrate .. //depot/projects/kse/sys/isofs/cd9660/cd9660_vfsops.c#14 integrate .. //depot/projects/kse/sys/kern/init_main.c#53 integrate .. //depot/projects/kse/sys/kern/kern_acl.c#20 integrate .. //depot/projects/kse/sys/kern/kern_descrip.c#44 integrate .. //depot/projects/kse/sys/kern/kern_event.c#18 integrate .. //depot/projects/kse/sys/kern/kern_exec.c#45 integrate .. //depot/projects/kse/sys/kern/kern_exit.c#69 integrate .. //depot/projects/kse/sys/kern/kern_fork.c#86 integrate .. //depot/projects/kse/sys/kern/kern_idle.c#21 integrate .. //depot/projects/kse/sys/kern/kern_ktr.c#11 integrate .. //depot/projects/kse/sys/kern/kern_ktrace.c#20 integrate .. //depot/projects/kse/sys/kern/kern_lock.c#17 integrate .. //depot/projects/kse/sys/kern/kern_mutex.c#39 integrate .. //depot/projects/kse/sys/kern/kern_prot.c#38 integrate .. //depot/projects/kse/sys/kern/kern_resource.c#30 integrate .. //depot/projects/kse/sys/kern/kern_switch.c#72 integrate .. //depot/projects/kse/sys/kern/kern_synch.c#85 integrate .. //depot/projects/kse/sys/kern/kern_sysctl.c#20 integrate .. //depot/projects/kse/sys/kern/kern_xxx.c#10 integrate .. //depot/projects/kse/sys/kern/sched_4bsd.c#5 integrate .. //depot/projects/kse/sys/kern/sched_ule.c#6 integrate .. //depot/projects/kse/sys/kern/subr_turnstile.c#4 integrate .. //depot/projects/kse/sys/kern/subr_witness.c#37 integrate .. //depot/projects/kse/sys/kern/sys_pipe.c#19 integrate .. //depot/projects/kse/sys/kern/sys_process.c#36 integrate .. //depot/projects/kse/sys/kern/sys_socket.c#15 integrate .. //depot/projects/kse/sys/kern/sysv_shm.c#17 integrate .. //depot/projects/kse/sys/kern/uipc_jumbo.c#5 integrate .. //depot/projects/kse/sys/kern/uipc_socket.c#28 integrate .. //depot/projects/kse/sys/kern/uipc_usrreq.c#27 integrate .. //depot/projects/kse/sys/kern/vfs_aio.c#33 integrate .. //depot/projects/kse/sys/kern/vfs_bio.c#29 integrate .. //depot/projects/kse/sys/kern/vfs_cluster.c#14 integrate .. //depot/projects/kse/sys/kern/vfs_init.c#10 integrate .. //depot/projects/kse/sys/kern/vfs_mount.c#8 integrate .. //depot/projects/kse/sys/kern/vfs_subr.c#51 integrate .. //depot/projects/kse/sys/kern/vfs_syscalls.c#43 integrate .. //depot/projects/kse/sys/kern/vfs_vnops.c#37 integrate .. //depot/projects/kse/sys/libkern/iconv.c#4 integrate .. //depot/projects/kse/sys/net/bpf.c#19 integrate .. //depot/projects/kse/sys/net/if.c#26 integrate .. //depot/projects/kse/sys/net/if.h#17 integrate .. //depot/projects/kse/sys/net/if_ef.c#9 integrate .. //depot/projects/kse/sys/net/if_ethersubr.c#25 integrate .. //depot/projects/kse/sys/net/if_loop.c#13 integrate .. //depot/projects/kse/sys/net/if_var.h#20 integrate .. //depot/projects/kse/sys/net/if_vlan.c#12 integrate .. //depot/projects/kse/sys/net/route.c#9 integrate .. //depot/projects/kse/sys/net/route.h#12 integrate .. //depot/projects/kse/sys/net80211/ieee80211_output.c#3 integrate .. //depot/projects/kse/sys/net80211/ieee80211_proto.c#3 integrate .. //depot/projects/kse/sys/netatm/spans/spans_kxdr.c#6 integrate .. //depot/projects/kse/sys/netgraph/atm/ng_atm.c#4 integrate .. //depot/projects/kse/sys/netgraph/netgraph.h#8 integrate .. //depot/projects/kse/sys/netgraph/ng_base.c#14 integrate .. //depot/projects/kse/sys/netgraph/ng_ether.c#13 integrate .. //depot/projects/kse/sys/netgraph/ng_fec.c#5 integrate .. //depot/projects/kse/sys/netgraph/ng_gif.c#7 integrate .. //depot/projects/kse/sys/netgraph/ng_parse.c#12 integrate .. //depot/projects/kse/sys/netgraph/ng_pppoe.c#13 integrate .. //depot/projects/kse/sys/netgraph/ng_pppoe.h#6 integrate .. //depot/projects/kse/sys/netgraph/ng_sample.c#6 integrate .. //depot/projects/kse/sys/netgraph/ng_socket.c#16 integrate .. //depot/projects/kse/sys/netinet/in_pcb.c#26 integrate .. //depot/projects/kse/sys/netinet/raw_ip.c#23 integrate .. //depot/projects/kse/sys/netinet/tcp_output.c#19 integrate .. //depot/projects/kse/sys/netinet/tcp_subr.c#27 integrate .. //depot/projects/kse/sys/netinet/tcp_usrreq.c#18 integrate .. //depot/projects/kse/sys/netinet/udp_usrreq.c#24 integrate .. //depot/projects/kse/sys/netinet6/in6_pcb.c#21 integrate .. //depot/projects/kse/sys/netinet6/raw_ip6.c#15 integrate .. //depot/projects/kse/sys/netinet6/udp6_usrreq.c#18 integrate .. //depot/projects/kse/sys/netipx/ipx_cksum.c#3 integrate .. //depot/projects/kse/sys/netsmb/smb_conn.c#6 integrate .. //depot/projects/kse/sys/nfs4client/nfs4_vnops.c#3 integrate .. //depot/projects/kse/sys/nfsclient/bootp_subr.c#14 integrate .. //depot/projects/kse/sys/nfsclient/nfs_diskless.c#4 integrate .. //depot/projects/kse/sys/nfsclient/nfs_vfsops.c#19 integrate .. //depot/projects/kse/sys/nfsclient/nfs_vnops.c#16 integrate .. //depot/projects/kse/sys/nfsserver/nfs_srvsock.c#13 integrate .. //depot/projects/kse/sys/nfsserver/nfs_srvsubs.c#14 integrate .. //depot/projects/kse/sys/opencrypto/cryptodev.c#5 integrate .. //depot/projects/kse/sys/pc98/pc98/sio.c#24 integrate .. //depot/projects/kse/sys/powerpc/include/critical.h#4 integrate .. //depot/projects/kse/sys/powerpc/include/db_machdep.h#7 integrate .. //depot/projects/kse/sys/powerpc/include/kdb.h#2 integrate .. //depot/projects/kse/sys/powerpc/powerpc/db_interface.c#4 integrate .. //depot/projects/kse/sys/powerpc/powerpc/elf_machdep.c#9 integrate .. //depot/projects/kse/sys/powerpc/powerpc/locore.S#4 integrate .. //depot/projects/kse/sys/powerpc/powerpc/machdep.c#29 integrate .. //depot/projects/kse/sys/powerpc/powerpc/pmap.c#26 integrate .. //depot/projects/kse/sys/powerpc/powerpc/trap_subr.S#8 integrate .. //depot/projects/kse/sys/security/mac_biba/mac_biba.c#8 integrate .. //depot/projects/kse/sys/security/mac_bsdextended/mac_bsdextended.c#4 integrate .. //depot/projects/kse/sys/security/mac_lomac/mac_lomac.c#4 integrate .. //depot/projects/kse/sys/security/mac_mls/mac_mls.c#8 integrate .. //depot/projects/kse/sys/sparc64/include/critical.h#3 integrate .. //depot/projects/kse/sys/sparc64/sparc64/pmap.c#41 integrate .. //depot/projects/kse/sys/sys/_task.h#2 integrate .. //depot/projects/kse/sys/sys/buf.h#19 integrate .. //depot/projects/kse/sys/sys/cdefs.h#23 integrate .. //depot/projects/kse/sys/sys/linker_set.h#6 integrate .. //depot/projects/kse/sys/sys/mount.h#20 integrate .. //depot/projects/kse/sys/sys/param.h#31 integrate .. //depot/projects/kse/sys/sys/proc.h#141 integrate .. //depot/projects/kse/sys/sys/sysctl.h#16 integrate .. //depot/projects/kse/sys/sys/systm.h#36 integrate .. //depot/projects/kse/sys/ufs/ffs/ffs_alloc.c#19 integrate .. //depot/projects/kse/sys/ufs/ffs/ffs_inode.c#15 integrate .. //depot/projects/kse/sys/ufs/ffs/ffs_snapshot.c#19 integrate .. //depot/projects/kse/sys/ufs/ffs/ffs_softdep.c#19 integrate .. //depot/projects/kse/sys/ufs/ffs/ffs_vfsops.c#30 integrate .. //depot/projects/kse/sys/ufs/ffs/ffs_vnops.c#15 integrate .. //depot/projects/kse/sys/ufs/ufs/inode.h#8 integrate .. //depot/projects/kse/sys/ufs/ufs/ufs_acl.c#13 integrate .. //depot/projects/kse/sys/ufs/ufs/ufs_inode.c#13 integrate .. //depot/projects/kse/sys/ufs/ufs/ufs_lookup.c#16 integrate .. //depot/projects/kse/sys/ufs/ufs/ufs_quota.c#16 integrate .. //depot/projects/kse/sys/ufs/ufs/ufs_vnops.c#22 integrate .. //depot/projects/kse/sys/vm/swap_pager.c#17 integrate .. //depot/projects/kse/sys/vm/uma_core.c#20 integrate .. //depot/projects/kse/sys/vm/vm_extern.h#19 integrate .. //depot/projects/kse/sys/vm/vm_glue.c#44 integrate .. //depot/projects/kse/sys/vm/vm_kern.c#16 integrate .. //depot/projects/kse/sys/vm/vm_map.c#32 integrate .. //depot/projects/kse/sys/vm/vm_map.h#22 integrate .. //depot/projects/kse/sys/vm/vm_object.c#22 integrate .. //depot/projects/kse/sys/vm/vm_object.h#12 integrate .. //depot/projects/kse/tools/regression/fsx/fsx.c#2 integrate .. //depot/projects/kse/tools/regression/geom_concat/test-1.sh#2 integrate .. //depot/projects/kse/tools/regression/geom_concat/test-2.sh#2 integrate .. //depot/projects/kse/tools/regression/geom_stripe/test-1.sh#2 integrate .. //depot/projects/kse/tools/regression/geom_stripe/test-2.sh#2 integrate .. //depot/projects/kse/tools/regression/sockets/accf_data_attach/Makefile#1 branch .. //depot/projects/kse/tools/regression/sockets/accf_data_attach/accf_data_attach.c#1 branch Differences ... ==== //depot/projects/kse/include/string.h#4 (text+ko) ==== @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)string.h 8.1 (Berkeley) 6/2/93 - * $FreeBSD: src/include/string.h,v 1.19 2003/12/07 21:10:06 marcel Exp $ + * $FreeBSD: src/include/string.h,v 1.20 2004/07/23 02:20:05 tjr Exp $ */ #ifndef _STRING_H_ @@ -58,21 +58,21 @@ #if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE void *memccpy(void * __restrict, const void * __restrict, int, size_t); #endif -void *memchr(const void *, int, size_t); -int memcmp(const void *, const void *, size_t); +void *memchr(const void *, int, size_t) __pure; +int memcmp(const void *, const void *, size_t) __pure; void *memcpy(void * __restrict, const void * __restrict, size_t); void *memmove(void *, const void *, size_t); void *memset(void *, int, size_t); #if __BSD_VISIBLE char *stpcpy(char *, const char *); -char *strcasestr(const char *, const char *); +char *strcasestr(const char *, const char *) __pure; #endif char *strcat(char * __restrict, const char * __restrict); -char *strchr(const char *, int); -int strcmp(const char *, const char *); +char *strchr(const char *, int) __pure; +int strcmp(const char *, const char *) __pure; int strcoll(const char *, const char *); char *strcpy(char * __restrict, const char * __restrict); -size_t strcspn(const char *, const char *); +size_t strcspn(const char *, const char *) __pure; #if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE char *strdup(const char *); #endif @@ -84,24 +84,24 @@ size_t strlcat(char *, const char *, size_t); size_t strlcpy(char *, const char *, size_t); #endif -size_t strlen(const char *); +size_t strlen(const char *) __pure; #if __BSD_VISIBLE void strmode(int, char *); #endif char *strncat(char * __restrict, const char * __restrict, size_t); -int strncmp(const char *, const char *, size_t); +int strncmp(const char *, const char *, size_t) __pure; char *strncpy(char * __restrict, const char * __restrict, size_t); #if __BSD_VISIBLE -char *strnstr(const char *, const char *, size_t); +char *strnstr(const char *, const char *, size_t) __pure; #endif -char *strpbrk(const char *, const char *); -char *strrchr(const char *, int); +char *strpbrk(const char *, const char *) __pure; +char *strrchr(const char *, int) __pure; #if __BSD_VISIBLE char *strsep(char **, const char *); char *strsignal(int); #endif -size_t strspn(const char *, const char *); -char *strstr(const char *, const char *); +size_t strspn(const char *, const char *) __pure; +char *strstr(const char *, const char *) __pure; char *strtok(char * __restrict, const char * __restrict); #if __POSIX_VISIBLE >= 199506 || __XSI_VISIBLE >= 500 char *strtok_r(char *, const char *, char **); ==== //depot/projects/kse/include/strings.h#5 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/include/strings.h,v 1.5 2004/07/09 13:52:42 des Exp $ + * $FreeBSD: src/include/strings.h,v 1.6 2004/07/23 07:13:35 tjr Exp $ */ #ifndef _STRINGS_H_ @@ -38,19 +38,19 @@ #endif __BEGIN_DECLS -int bcmp(const void *, const void *, size_t); /* LEGACY */ -void bcopy(const void *, void *, size_t); /* LEGACY */ -void bzero(void *, size_t); /* LEGACY */ -int ffs(int); +int bcmp(const void *, const void *, size_t) __pure; /* LEGACY */ +void bcopy(const void *, void *, size_t); /* LEGACY */ +void bzero(void *, size_t); /* LEGACY */ +int ffs(int) __pure2; #ifdef __BSD_VISIBLE -int ffsl(long); -int fls(int); -int flsl(long); +int ffsl(long) __pure2; +int fls(int) __pure2; +int flsl(long) __pure2; #endif -char *index(const char *, int); /* LEGACY */ -char *rindex(const char *, int); /* LEGACY */ -int strcasecmp(const char *, const char *); -int strncasecmp(const char *, const char *, size_t); +char *index(const char *, int) __pure; /* LEGACY */ +char *rindex(const char *, int) __pure; /* LEGACY */ +int strcasecmp(const char *, const char *) __pure; +int strncasecmp(const char *, const char *, size_t) __pure; __END_DECLS #endif /* _STRINGS_H_ */ ==== //depot/projects/kse/include/wchar.h#14 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/include/wchar.h,v 1.43 2004/07/21 10:54:57 tjr Exp $ + * $FreeBSD: src/include/wchar.h,v 1.44 2004/07/23 02:29:37 tjr Exp $ */ /*- @@ -137,24 +137,25 @@ int vwprintf(const wchar_t * __restrict, __va_list); size_t wcrtomb(char * __restrict, wchar_t, mbstate_t * __restrict); wchar_t *wcscat(wchar_t * __restrict, const wchar_t * __restrict); -wchar_t *wcschr(const wchar_t *, wchar_t); -int wcscmp(const wchar_t *, const wchar_t *); +wchar_t *wcschr(const wchar_t *, wchar_t) __pure; +int wcscmp(const wchar_t *, const wchar_t *) __pure; int wcscoll(const wchar_t *, const wchar_t *); wchar_t *wcscpy(wchar_t * __restrict, const wchar_t * __restrict); -size_t wcscspn(const wchar_t *, const wchar_t *); +size_t wcscspn(const wchar_t *, const wchar_t *) __pure; size_t wcsftime(wchar_t * __restrict, size_t, const wchar_t * __restrict, const struct tm * __restrict); -size_t wcslen(const wchar_t *); +size_t wcslen(const wchar_t *) __pure; wchar_t *wcsncat(wchar_t * __restrict, const wchar_t * __restrict, size_t); -int wcsncmp(const wchar_t *, const wchar_t *, size_t); +int wcsncmp(const wchar_t *, const wchar_t *, size_t) __pure; wchar_t *wcsncpy(wchar_t * __restrict , const wchar_t * __restrict, size_t); -wchar_t *wcspbrk(const wchar_t *, const wchar_t *); -wchar_t *wcsrchr(const wchar_t *, wchar_t); +wchar_t *wcspbrk(const wchar_t *, const wchar_t *) __pure; +wchar_t *wcsrchr(const wchar_t *, wchar_t) __pure; size_t wcsrtombs(char * __restrict, const wchar_t ** __restrict, size_t, mbstate_t * __restrict); -size_t wcsspn(const wchar_t *, const wchar_t *); -wchar_t *wcsstr(const wchar_t * __restrict, const wchar_t * __restrict); +size_t wcsspn(const wchar_t *, const wchar_t *) __pure; +wchar_t *wcsstr(const wchar_t * __restrict, const wchar_t * __restrict) + __pure; size_t wcsxfrm(wchar_t * __restrict, const wchar_t * __restrict, size_t); int wctob(wint_t); double wcstod(const wchar_t * __restrict, wchar_t ** __restrict); @@ -163,8 +164,8 @@ long wcstol(const wchar_t * __restrict, wchar_t ** __restrict, int); unsigned long wcstoul(const wchar_t * __restrict, wchar_t ** __restrict, int); -wchar_t *wmemchr(const wchar_t *, wchar_t, size_t); -int wmemcmp(const wchar_t *, const wchar_t *, size_t); +wchar_t *wmemchr(const wchar_t *, wchar_t, size_t) __pure; +int wmemcmp(const wchar_t *, const wchar_t *, size_t) __pure; wchar_t *wmemcpy(wchar_t * __restrict, const wchar_t * __restrict, size_t); wchar_t *wmemmove(wchar_t *, const wchar_t *, size_t); wchar_t *wmemset(wchar_t *, wchar_t, size_t); ==== //depot/projects/kse/lib/libc/amd64/gen/signalcontext.c#3 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/lib/libc/amd64/gen/signalcontext.c,v 1.4 2004/06/15 21:46:36 davidxu Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/amd64/gen/signalcontext.c,v 1.5 2004/07/28 13:08:24 davidxu Exp $"); #include <sys/types.h> #include <sys/ucontext.h> @@ -76,6 +76,8 @@ * Setup the ucontext of the signal handler. */ bzero(&ucp->uc_mcontext, sizeof(ucp->uc_mcontext)); + ucp->uc_mcontext.mc_fpformat = _MC_FPFMT_NODEV; + ucp->uc_mcontext.mc_ownedfp = _MC_FPOWNED_NONE; ucp->uc_link = sig_uc; sigdelset(&ucp->uc_sigmask, sig); ==== //depot/projects/kse/lib/libc/gen/Makefile.inc#9 (text+ko) ==== @@ -1,5 +1,5 @@ # @(#)Makefile.inc 8.6 (Berkeley) 5/4/95 -# $FreeBSD: src/lib/libc/gen/Makefile.inc,v 1.114 2004/07/19 08:16:10 das Exp $ +# $FreeBSD: src/lib/libc/gen/Makefile.inc,v 1.115 2004/07/25 11:17:54 tjr Exp $ # machine-independent gen sources .PATH: ${.CURDIR}/${MACHINE_ARCH}/gen ${.CURDIR}/gen @@ -80,6 +80,7 @@ fpclassify.3 isnormal.3 MLINKS+=fts.3 fts_children.3 fts.3 fts_close.3 fts.3 fts_open.3 \ fts.3 fts_read.3 fts.3 fts_set.3 +MLINKS+=ftw.3 nftw.3 MLINKS+=getcap.3 cgetcap.3 getcap.3 cgetclose.3 getcap.3 cgetent.3 \ getcap.3 cgetfirst.3 getcap.3 cgetmatch.3 getcap.3 cgetnext.3 \ getcap.3 cgetnum.3 getcap.3 cgetset.3 getcap.3 cgetstr.3 \ ==== //depot/projects/kse/lib/libc/gen/fnmatch.c#2 (text+ko) ==== @@ -38,17 +38,29 @@ static char sccsid[] = "@(#)fnmatch.c 8.2 (Berkeley) 4/16/94"; #endif /* LIBC_SCCS and not lint */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/lib/libc/gen/fnmatch.c,v 1.15 2002/02/01 01:32:19 obrien Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/gen/fnmatch.c,v 1.16 2004/07/29 03:13:10 tjr Exp $"); /* * Function fnmatch() as specified in POSIX 1003.2-1992, section B.6. * Compares a filename or pathname to a pattern. */ -#include <ctype.h> +/* + * Some notes on multibyte character support: + * 1. Patterns with illegal byte sequences match nothing. + * 2. Illegal byte sequences in the "string" argument are handled by treating + * them as single-byte characters with a value of the first byte of the + * sequence cast to wchar_t. + * 3. Multibyte conversion state objects (mbstate_t) are passed around and + * used for most, but not all, conversions. Further work will be required + * to support state-dependent encodings. + */ + #include <fnmatch.h> +#include <limits.h> #include <string.h> -#include <stdio.h> +#include <wchar.h> +#include <wctype.h> #include "collate.h" @@ -58,33 +70,57 @@ #define RANGE_NOMATCH 0 #define RANGE_ERROR (-1) -static int rangematch(const char *, char, int, char **); +static int rangematch(const char *, wchar_t, int, char **, mbstate_t *); +static int fnmatch1(const char *, const char *, int, mbstate_t, mbstate_t); int fnmatch(pattern, string, flags) const char *pattern, *string; int flags; { + static const mbstate_t initial; + + return (fnmatch1(pattern, string, flags, initial, initial)); +} + +static int +fnmatch1(pattern, string, flags, patmbs, strmbs) + const char *pattern, *string; + int flags; + mbstate_t patmbs, strmbs; +{ const char *stringstart; char *newp; - char c, test; + char c; + wchar_t pc, sc; + size_t pclen, sclen; - for (stringstart = string;;) - switch (c = *pattern++) { + for (stringstart = string;;) { + pclen = mbrtowc(&pc, pattern, MB_LEN_MAX, &patmbs); + if (pclen == (size_t)-1 || pclen == (size_t)-2) + return (FNM_NOMATCH); + pattern += pclen; + sclen = mbrtowc(&sc, string, MB_LEN_MAX, &strmbs); + if (sclen == (size_t)-1 || sclen == (size_t)-2) { + sc = (unsigned char)*string; + sclen = 1; + memset(&strmbs, 0, sizeof(strmbs)); + } + switch (pc) { case EOS: - if ((flags & FNM_LEADING_DIR) && *string == '/') + if ((flags & FNM_LEADING_DIR) && sc == '/') return (0); - return (*string == EOS ? 0 : FNM_NOMATCH); + return (sc == EOS ? 0 : FNM_NOMATCH); case '?': - if (*string == EOS) + if (sc == EOS) return (FNM_NOMATCH); - if (*string == '/' && (flags & FNM_PATHNAME)) + if (sc == '/' && (flags & FNM_PATHNAME)) return (FNM_NOMATCH); - if (*string == '.' && (flags & FNM_PERIOD) && + if (sc == '.' && (flags & FNM_PERIOD) && (string == stringstart || ((flags & FNM_PATHNAME) && *(string - 1) == '/'))) return (FNM_NOMATCH); - ++string; + string += sclen; break; case '*': c = *pattern; @@ -92,7 +128,7 @@ while (c == '*') c = *++pattern; - if (*string == '.' && (flags & FNM_PERIOD) && + if (sc == '.' && (flags & FNM_PERIOD) && (string == stringstart || ((flags & FNM_PATHNAME) && *(string - 1) == '/'))) return (FNM_NOMATCH); @@ -112,25 +148,35 @@ } /* General case, use recursion. */ - while ((test = *string) != EOS) { - if (!fnmatch(pattern, string, flags & ~FNM_PERIOD)) + while (sc != EOS) { + if (!fnmatch1(pattern, string, + flags & ~FNM_PERIOD, patmbs, strmbs)) return (0); - if (test == '/' && flags & FNM_PATHNAME) + sclen = mbrtowc(&sc, string, MB_LEN_MAX, + &strmbs); + if (sclen == (size_t)-1 || + sclen == (size_t)-2) { + sc = (unsigned char)*string; + sclen = 1; + memset(&strmbs, 0, sizeof(strmbs)); + } + if (sc == '/' && flags & FNM_PATHNAME) break; - ++string; + string += sclen; } return (FNM_NOMATCH); case '[': - if (*string == EOS) + if (sc == EOS) return (FNM_NOMATCH); - if (*string == '/' && (flags & FNM_PATHNAME)) + if (sc == '/' && (flags & FNM_PATHNAME)) return (FNM_NOMATCH); - if (*string == '.' && (flags & FNM_PERIOD) && + if (sc == '.' && (flags & FNM_PERIOD) && (string == stringstart || ((flags & FNM_PATHNAME) && *(string - 1) == '/'))) return (FNM_NOMATCH); - switch (rangematch(pattern, *string, flags, &newp)) { + switch (rangematch(pattern, sc, flags, &newp, + &patmbs)) { case RANGE_ERROR: goto norm; case RANGE_MATCH: @@ -139,41 +185,47 @@ case RANGE_NOMATCH: return (FNM_NOMATCH); } - ++string; + string += sclen; break; case '\\': if (!(flags & FNM_NOESCAPE)) { - if ((c = *pattern++) == EOS) { - c = '\\'; - --pattern; - } + pclen = mbrtowc(&pc, pattern, MB_LEN_MAX, + &patmbs); + if (pclen == (size_t)-1 || pclen == (size_t)-2) + return (FNM_NOMATCH); + if (pclen == 0) + pc = '\\'; + pattern += pclen; } /* FALLTHROUGH */ default: norm: - if (c == *string) + if (pc == sc) ; else if ((flags & FNM_CASEFOLD) && - (tolower((unsigned char)c) == - tolower((unsigned char)*string))) + (towlower(pc) == towlower(sc))) ; else return (FNM_NOMATCH); - string++; + string += sclen; break; } + } /* NOTREACHED */ } static int -rangematch(pattern, test, flags, newp) +rangematch(pattern, test, flags, newp, patmbs) const char *pattern; - char test; + wchar_t test; int flags; char **newp; + mbstate_t *patmbs; { int negate, ok; - char c, c2; + wchar_t c, c2; + size_t pclen; + const char *origpat; /* * A bracket expression starting with an unquoted circumflex @@ -186,7 +238,7 @@ ++pattern; if (flags & FNM_CASEFOLD) - test = tolower((unsigned char)test); + test = towlower(test); /* * A right bracket shall lose its special meaning and represent @@ -194,29 +246,40 @@ * -- POSIX.2 2.8.3.2 */ ok = 0; - c = *pattern++; - do { - if (c == '\\' && !(flags & FNM_NOESCAPE)) - c = *pattern++; - if (c == EOS) + origpat = pattern; + for (;;) { + if (*pattern == ']' && pattern > origpat) { + pattern++; + break; + } else if (*pattern == '\0') { return (RANGE_ERROR); - - if (c == '/' && (flags & FNM_PATHNAME)) + } else if (*pattern == '/' && (flags & FNM_PATHNAME)) { + pattern++; + return (RANGE_NOMATCH); + } else if (*pattern == '\\' && !(flags & FNM_NOESCAPE)) + pattern++; + pclen = mbrtowc(&c, pattern, MB_LEN_MAX, patmbs); + if (pclen == (size_t)-1 || pclen == (size_t)-2) return (RANGE_NOMATCH); + pattern += pclen; if (flags & FNM_CASEFOLD) - c = tolower((unsigned char)c); + c = towlower(c); - if (*pattern == '-' - && (c2 = *(pattern+1)) != EOS && c2 != ']') { - pattern += 2; - if (c2 == '\\' && !(flags & FNM_NOESCAPE)) - c2 = *pattern++; + if (*pattern == '-' && *(pattern + 1) != EOS && + *(pattern + 1) != ']') { + if (*++pattern == '\\' && !(flags & FNM_NOESCAPE)) + if (*pattern != EOS) + pattern++; + pclen = mbrtowc(&c2, pattern, MB_LEN_MAX, patmbs); + if (pclen == (size_t)-1 || pclen == (size_t)-2) + return (RANGE_NOMATCH); + pattern += pclen; if (c2 == EOS) return (RANGE_ERROR); if (flags & FNM_CASEFOLD) - c2 = tolower((unsigned char)c2); + c2 = towlower(c2); if (__collate_load_error ? c <= test && test <= c2 : @@ -226,7 +289,7 @@ ok = 1; } else if (c == test) ok = 1; - } while ((c = *pattern++) != ']'); + } *newp = (char *)pattern; return (ok == negate ? RANGE_NOMATCH : RANGE_MATCH); ==== //depot/projects/kse/lib/libc/gen/ftw.c#2 (text+ko) ==== @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libc/gen/ftw.c,v 1.1 2004/07/05 23:13:16 das Exp $ + * $FreeBSD: src/lib/libc/gen/ftw.c,v 1.2 2004/07/23 06:01:00 das Exp $ */ #include <sys/types.h> /* Because fts(3) says so */ @@ -78,7 +78,6 @@ const char *paths[2]; int ftw_flag, func_ret; struct FTW ftw_st; - int skip_entry; __ftw_func_t ftw_func; __nftw_func_t nftw_func; int saved_errno; @@ -120,15 +119,11 @@ /* The main loop. Is it not nifty? Worship the loop. */ while ((entry = fts_read(hierarchy))) { - skip_entry = 0; - switch (entry->fts_info) { case FTS_D: if ((MODE_NFTW != mode) || !(flags & FTW_DEPTH)) { ftw_flag = FTW_D; - } else { - skip_entry = 1; } break; @@ -161,8 +156,6 @@ case FTS_DP: if ((MODE_NFTW == mode) && (flags & FTW_DEPTH)) { ftw_flag = FTW_D; - } else { - skip_entry = 1; } break; @@ -171,8 +164,7 @@ * type to call with, so cowardice seems the better part of * guessing. */ - - skip_entry = 1; + break; } if (MODE_FTW == mode) { ==== //depot/projects/kse/lib/libc/gen/getnetgrent.c#3 (text+ko) ==== @@ -38,7 +38,7 @@ static char sccsid[] = "@(#)getnetgrent.c 8.2 (Berkeley) 4/27/95"; #endif /* LIBC_SCCS and not lint */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/lib/libc/gen/getnetgrent.c,v 1.30 2003/01/03 23:55:58 tjr Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/gen/getnetgrent.c,v 1.31 2004/07/28 11:56:03 des Exp $"); #include <ctype.h> #include <stdio.h> @@ -136,10 +136,13 @@ (char *)0, }; static FILE *netf = (FILE *)0; -static int parse_netgrp(); -static struct linelist *read_for_group(); -void setnetgrent(), endnetgrent(); -int getnetgrent(), innetgr(); + +static int parse_netgrp(const char *); +static struct linelist *read_for_group(const char *); +void setnetgrent(const char *); +void endnetgrent(void); +int getnetgrent(char **, char **, char **); +int innetgr(const char *, const char *, const char *, const char *); #define LINSIZ 1024 /* Length of netgroup file line */ @@ -150,8 +153,7 @@ * most of the work. */ void -setnetgrent(group) - char *group; +setnetgrent(const char *group) { #ifdef YP struct stat _yp_statp; @@ -220,8 +222,7 @@ * Get the next netgroup off the list. */ int -getnetgrent(hostp, userp, domp) - char **hostp, **userp, **domp; +getnetgrent(char **hostp, char **userp, char **domp) { #ifdef YP _yp_innetgr = 0; @@ -241,7 +242,7 @@ * endnetgrent() - cleanup */ void -endnetgrent() +endnetgrent(void) { struct linelist *lp, *olp; struct netgrp *gp, *ogp; @@ -278,11 +279,11 @@ } #ifdef YP -static int _listmatch(list, group, len) - char *list, *group; - int len; +static int +_listmatch(const char *list, const char *group, int len) { - char *ptr = list, *cptr; + const char *ptr = list; + const char *cptr; int glen = strlen(group); /* skip possible leading whitespace */ @@ -302,9 +303,8 @@ return(0); } -static int _buildkey(key, str, dom, rotation) -char *key, *str, *dom; -int *rotation; +static int +_buildkey(char *key, const char *str, const char *dom, int *rotation) { (*rotation)++; if (*rotation > 4) @@ -327,8 +327,7 @@ * Search for a match in a netgroup. */ int -innetgr(group, host, user, dom) - const char *group, *host, *user, *dom; +innetgr(const char *group, const char *host, const char *user, const char *dom) { char *hst, *usr, *dm; #ifdef YP @@ -409,8 +408,7 @@ * Parse the netgroup file setting up the linked lists. */ static int -parse_netgrp(group) - char *group; +parse_netgrp(const char *group) { char *spos, *epos; int len, strpos; @@ -520,8 +518,7 @@ * is found. Return 1 if eof is encountered. */ static struct linelist * -read_for_group(group) - char *group; +read_for_group(const char *group) { char *pos, *spos, *linep, *olinep; int len, olen; ==== //depot/projects/kse/lib/libc/gen/glob.3#4 (text+ko) ==== @@ -32,7 +32,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)glob.3 8.3 (Berkeley) 4/16/94 -.\" $FreeBSD: src/lib/libc/gen/glob.3,v 1.26 2004/07/18 10:11:27 tjr Exp $ +.\" $FreeBSD: src/lib/libc/gen/glob.3,v 1.27 2004/07/29 03:41:24 tjr Exp $ .\" .Dd July 18, 2004 .Dt GLOB 3 @@ -431,6 +431,7 @@ .St -p1003.2 . Collating symbol expressions, equivalence class expressions and character class expressions are not supported. +.Pp The flags .Dv GLOB_ALTDIRFUNC , .Dv GLOB_BRACE , ==== //depot/projects/kse/lib/libc/gen/glob.c#3 (text+ko) ==== @@ -38,7 +38,7 @@ static char sccsid[] = "@(#)glob.c 8.3 (Berkeley) 10/13/93"; #endif /* LIBC_SCCS and not lint */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/lib/libc/gen/glob.c,v 1.21 2003/10/29 10:45:01 tjr Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/gen/glob.c,v 1.22 2004/07/29 03:48:52 tjr Exp $"); /* * glob(3) -- a superset of the one defined in POSIX 1003.2. @@ -65,6 +65,16 @@ * Number of matches in the current invocation of glob. */ +/* + * Some notes on multibyte character support: + * 1. Patterns with illegal byte sequences match nothing - even if + * GLOB_NOCHECK is specified. + * 2. Illegal byte sequences in filenames are handled by treating them as + * single-byte characters with a value of the first byte of the sequence + * cast to wchar_t. + * 3. State-dependent encodings are not currently supported. + */ + #include <sys/param.h> #include <sys/stat.h> @@ -72,11 +82,14 @@ #include <dirent.h> #include <errno.h> #include <glob.h> +#include <limits.h> #include <pwd.h> +#include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> +#include <wchar.h> #include "collate.h" @@ -100,26 +113,26 @@ #ifndef DEBUG -#define M_QUOTE 0x8000 -#define M_PROTECT 0x4000 -#define M_MASK 0xffff -#define M_ASCII 0x00ff +#define M_QUOTE 0x8000000000ULL +#define M_PROTECT 0x4000000000ULL +#define M_MASK 0xffffffffffULL +#define M_CHAR 0x00ffffffffULL -typedef u_short Char; +typedef uint_fast64_t Char; #else #define M_QUOTE 0x80 #define M_PROTECT 0x40 #define M_MASK 0xff -#define M_ASCII 0x7f +#define M_CHAR 0x7f >>> TRUNCATED FOR MAIL (1000 lines) <<<
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200407291125.i6TBPhBi037792>