Date: Wed, 5 Nov 2003 17:15:01 -0800 (PST) From: Peter Wemm <peter@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 41506 for review Message-ID: <200311060115.hA61F159070712@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=41506 Change 41506 by peter@peter_daintree on 2003/11/05 17:14:32 IFC @41505 Affected files ... .. //depot/projects/hammer/UPDATING#23 integrate .. //depot/projects/hammer/contrib/libpcap/gencode.c#3 integrate .. //depot/projects/hammer/contrib/libpcap/pcap.3#3 integrate .. //depot/projects/hammer/contrib/libpcap/scanner.l#2 integrate .. //depot/projects/hammer/etc/mtree/BSD.local.dist#10 integrate .. //depot/projects/hammer/etc/mtree/BSD.usr.dist#11 integrate .. //depot/projects/hammer/games/fortune/datfiles/fortunes2#8 integrate .. //depot/projects/hammer/include/pthread.h#5 integrate .. //depot/projects/hammer/lib/libc/include/libc_private.h#4 integrate .. //depot/projects/hammer/lib/libc/include/spinlock.h#3 integrate .. //depot/projects/hammer/lib/libc/locale/Makefile.inc#12 integrate .. //depot/projects/hammer/lib/libc/locale/gb2312.c#1 branch .. //depot/projects/hammer/lib/libc/locale/gbk.c#2 integrate .. //depot/projects/hammer/lib/libc/locale/setrunelocale.c#8 integrate .. //depot/projects/hammer/lib/libc/stdio/fgetwc.c#4 integrate .. //depot/projects/hammer/lib/libc/stdio/fputwc.c#5 integrate .. //depot/projects/hammer/lib/libc/stdio/ungetwc.c#5 integrate .. //depot/projects/hammer/lib/libc/stdio/vfprintf.c#11 integrate .. //depot/projects/hammer/lib/libc/stdio/vfscanf.c#7 integrate .. //depot/projects/hammer/lib/libc/stdio/vfwprintf.c#8 integrate .. //depot/projects/hammer/lib/libc/stdio/vfwscanf.c#5 integrate .. //depot/projects/hammer/lib/libc/stdio/vswprintf.c#4 integrate .. //depot/projects/hammer/lib/libc/stdio/vswscanf.c#2 integrate .. //depot/projects/hammer/lib/libc/stdlib/malloc.c#11 integrate .. //depot/projects/hammer/lib/libc/string/wcscoll.c#2 integrate .. //depot/projects/hammer/lib/libc/string/wcsxfrm.c#2 integrate .. //depot/projects/hammer/lib/libc/sys/ktrace.2#4 integrate .. //depot/projects/hammer/lib/libdisk/write_ia64_disk.c#7 integrate .. //depot/projects/hammer/lib/libipsec/Makefile#4 integrate .. //depot/projects/hammer/lib/libipsec/ipsec_set_policy.3#4 integrate .. //depot/projects/hammer/lib/libipsec/pfkey.c#2 integrate .. //depot/projects/hammer/lib/libipsec/pfkey_dump.c#4 integrate .. //depot/projects/hammer/lib/libipsec/policy_parse.y#2 integrate .. //depot/projects/hammer/lib/libipsec/policy_token.l#2 integrate .. //depot/projects/hammer/lib/libpcap/Makefile#3 integrate .. //depot/projects/hammer/lib/libpthread/pthread.map#5 integrate .. //depot/projects/hammer/lib/libpthread/sys/lock.c#7 integrate .. //depot/projects/hammer/lib/libpthread/sys/lock.h#6 integrate .. //depot/projects/hammer/lib/libpthread/thread/Makefile.inc#8 integrate .. //depot/projects/hammer/lib/libpthread/thread/thr_atfork.c#1 branch .. //depot/projects/hammer/lib/libpthread/thread/thr_fork.c#4 integrate .. //depot/projects/hammer/lib/libpthread/thread/thr_init.c#13 integrate .. //depot/projects/hammer/lib/libpthread/thread/thr_kern.c#24 integrate .. //depot/projects/hammer/lib/libpthread/thread/thr_mutex.c#11 integrate .. //depot/projects/hammer/lib/libpthread/thread/thr_private.h#18 integrate .. //depot/projects/hammer/lib/libpthread/thread/thr_pspinlock.c#2 integrate .. //depot/projects/hammer/lib/libpthread/thread/thr_rtld.c#4 integrate .. //depot/projects/hammer/lib/libpthread/thread/thr_spinlock.c#6 integrate .. //depot/projects/hammer/release/doc/en_US.ISO8859-1/hardware/common/dev.sgml#32 integrate .. //depot/projects/hammer/sbin/atacontrol/Makefile#3 integrate .. //depot/projects/hammer/sbin/atacontrol/atacontrol.c#8 integrate .. //depot/projects/hammer/sbin/dump/dump.8#7 integrate .. //depot/projects/hammer/sbin/dump/dump.h#6 integrate .. //depot/projects/hammer/sbin/dump/traverse.c#6 integrate .. //depot/projects/hammer/sbin/mksnap_ffs/mksnap_ffs.c#3 integrate .. //depot/projects/hammer/sbin/mount_cd9660/mount_cd9660.c#5 integrate .. //depot/projects/hammer/sbin/mount_udf/Makefile#2 integrate .. //depot/projects/hammer/sbin/mount_udf/mount_udf.8#4 integrate .. //depot/projects/hammer/sbin/mount_udf/mount_udf.c#3 integrate .. //depot/projects/hammer/sbin/newfs/mkfs.c#11 integrate .. //depot/projects/hammer/share/colldef/Makefile#9 integrate .. //depot/projects/hammer/share/doc/IPv6/IMPLEMENTATION#4 integrate .. //depot/projects/hammer/share/man/man4/Makefile#23 integrate .. //depot/projects/hammer/share/man/man4/ata.4#5 integrate .. //depot/projects/hammer/share/man/man4/ath.4#8 integrate .. //depot/projects/hammer/share/man/man4/ath_hal.4#6 integrate .. //depot/projects/hammer/share/man/man4/miibus.4#3 integrate .. //depot/projects/hammer/share/man/man4/xe.4#1 branch .. //depot/projects/hammer/share/man/man9/Makefile#20 integrate .. //depot/projects/hammer/share/man/man9/resource_query_string.9#2 delete .. //depot/projects/hammer/share/mklocale/Makefile#8 integrate .. //depot/projects/hammer/share/mklocale/zh_CN.GB2312.src#1 branch .. //depot/projects/hammer/share/monetdef/Makefile#7 integrate .. //depot/projects/hammer/share/monetdef/zh_CN.GB2312.src#1 branch .. //depot/projects/hammer/share/msgdef/Makefile#7 integrate .. //depot/projects/hammer/share/msgdef/zh_CN.GB2312.src#1 branch .. //depot/projects/hammer/share/numericdef/Makefile#7 integrate .. //depot/projects/hammer/share/timedef/Makefile#7 integrate .. //depot/projects/hammer/share/timedef/zh_CN.GB2312.src#1 branch .. //depot/projects/hammer/sys/coda/coda_subr.c#6 integrate .. //depot/projects/hammer/sys/compat/linux/linux_ipc.c#7 integrate .. //depot/projects/hammer/sys/compat/linux/linux_stats.c#7 integrate .. //depot/projects/hammer/sys/conf/NOTES#28 integrate .. //depot/projects/hammer/sys/conf/files#32 integrate .. //depot/projects/hammer/sys/conf/files.pc98#18 integrate .. //depot/projects/hammer/sys/conf/kern.mk#13 integrate .. //depot/projects/hammer/sys/conf/kern.post.mk#13 integrate .. //depot/projects/hammer/sys/conf/kern.pre.mk#14 integrate .. //depot/projects/hammer/sys/conf/kmod.mk#10 integrate .. //depot/projects/hammer/sys/conf/options#27 integrate .. //depot/projects/hammer/sys/conf/options.pc98#14 integrate .. //depot/projects/hammer/sys/contrib/dev/acpica/dmresrc.c#5 integrate .. //depot/projects/hammer/sys/dev/ata/ata-raid.c#12 integrate .. //depot/projects/hammer/sys/dev/cs/if_cs.c#8 integrate .. //depot/projects/hammer/sys/dev/cs/if_csreg.h#2 integrate .. //depot/projects/hammer/sys/dev/hatm/if_hatm.c#8 integrate .. //depot/projects/hammer/sys/dev/hatm/if_hatm_intr.c#5 integrate .. //depot/projects/hammer/sys/dev/hatm/if_hatm_tx.c#5 integrate .. //depot/projects/hammer/sys/dev/hatm/if_hatmvar.h#5 integrate .. //depot/projects/hammer/sys/dev/pccard/pccard.c#16 integrate .. //depot/projects/hammer/sys/dev/wi/if_wi.c#21 integrate .. //depot/projects/hammer/sys/dev/xe/if_xe.c#9 integrate .. //depot/projects/hammer/sys/dev/xe/if_xe_pccard.c#8 integrate .. //depot/projects/hammer/sys/fs/msdosfs/msdosfs_vfsops.c#14 integrate .. //depot/projects/hammer/sys/fs/udf/osta.c#3 integrate .. //depot/projects/hammer/sys/fs/udf/osta.h#2 integrate .. //depot/projects/hammer/sys/fs/udf/udf.h#4 integrate .. //depot/projects/hammer/sys/fs/udf/udf_iconv.c#1 branch .. //depot/projects/hammer/sys/fs/udf/udf_mount.h#1 branch .. //depot/projects/hammer/sys/fs/udf/udf_vfsops.c#8 integrate .. //depot/projects/hammer/sys/fs/udf/udf_vnops.c#12 integrate .. //depot/projects/hammer/sys/gnu/ext2fs/ext2_vfsops.c#10 integrate .. //depot/projects/hammer/sys/i386/acpica/madt.c#2 integrate .. //depot/projects/hammer/sys/i386/i386/io_apic.c#2 integrate .. //depot/projects/hammer/sys/i386/i386/mptable.c#2 integrate .. //depot/projects/hammer/sys/i386/i386/nexus.c#9 integrate .. //depot/projects/hammer/sys/i386/include/bus_dma.h#9 integrate .. //depot/projects/hammer/sys/i386/isa/atpic.c#2 integrate .. //depot/projects/hammer/sys/i386/isa/if_le.c#9 integrate .. //depot/projects/hammer/sys/i386/isa/if_rdp.c#11 integrate .. //depot/projects/hammer/sys/i386/isa/isa_compat.c#5 integrate .. //depot/projects/hammer/sys/i386/isa/nmi.c#2 integrate .. //depot/projects/hammer/sys/kern/kern_event.c#9 integrate .. //depot/projects/hammer/sys/kern/kern_timeout.c#7 integrate .. //depot/projects/hammer/sys/kern/sched_ule.c#16 integrate .. //depot/projects/hammer/sys/kern/subr_bus.c#13 integrate .. //depot/projects/hammer/sys/kern/sysv_shm.c#9 integrate .. //depot/projects/hammer/sys/kern/vfs_bio.c#21 integrate .. //depot/projects/hammer/sys/kern/vfs_default.c#17 integrate .. //depot/projects/hammer/sys/kern/vfs_mount.c#15 integrate .. //depot/projects/hammer/sys/kern/vfs_subr.c#26 integrate .. //depot/projects/hammer/sys/modules/cs/Makefile#1 branch .. //depot/projects/hammer/sys/modules/ppbus/Makefile#2 integrate .. //depot/projects/hammer/sys/modules/udf/Makefile#2 integrate .. //depot/projects/hammer/sys/net/net_osdep.h#5 integrate .. //depot/projects/hammer/sys/net/netisr.c#4 integrate .. //depot/projects/hammer/sys/net80211/ieee80211_ioctl.c#8 integrate .. //depot/projects/hammer/sys/netgraph/ng_base.c#7 integrate .. //depot/projects/hammer/sys/netinet/in_pcb.c#12 integrate .. //depot/projects/hammer/sys/netinet/ip_input.c#18 integrate .. //depot/projects/hammer/sys/netinet/ip_output.c#19 integrate .. //depot/projects/hammer/sys/netinet/tcp_output.c#7 integrate .. //depot/projects/hammer/sys/netinet/tcp_syncache.c#8 integrate .. //depot/projects/hammer/sys/netinet6/icmp6.c#10 integrate .. //depot/projects/hammer/sys/netinet6/in6.c#5 integrate .. //depot/projects/hammer/sys/netinet6/in6.h#6 integrate .. //depot/projects/hammer/sys/netinet6/in6_pcb.h#3 integrate .. //depot/projects/hammer/sys/netinet6/in6_proto.c#5 integrate .. //depot/projects/hammer/sys/netinet6/in6_src.c#4 integrate .. //depot/projects/hammer/sys/netinet6/ip6_forward.c#7 integrate .. //depot/projects/hammer/sys/netinet6/ip6_output.c#11 integrate .. //depot/projects/hammer/sys/netinet6/ip6_var.h#7 integrate .. //depot/projects/hammer/sys/netinet6/ipsec.c#7 integrate .. //depot/projects/hammer/sys/netinet6/ipsec.h#5 integrate .. //depot/projects/hammer/sys/netinet6/ipsec6.h#3 integrate .. //depot/projects/hammer/sys/netinet6/nd6.c#8 integrate .. //depot/projects/hammer/sys/netinet6/nd6_nbr.c#8 integrate .. //depot/projects/hammer/sys/netinet6/raw_ip6.c#7 integrate .. //depot/projects/hammer/sys/netinet6/udp6_output.c#6 integrate .. //depot/projects/hammer/sys/netinet6/udp6_usrreq.c#8 integrate .. //depot/projects/hammer/sys/netkey/key.c#8 integrate .. //depot/projects/hammer/sys/netkey/key.h#2 integrate .. //depot/projects/hammer/sys/netkey/key_debug.c#5 integrate .. //depot/projects/hammer/sys/netkey/keydb.c#4 integrate .. //depot/projects/hammer/sys/netkey/keydb.h#4 integrate .. //depot/projects/hammer/sys/nfsclient/nfs_subs.c#7 integrate .. //depot/projects/hammer/sys/nfsclient/nfs_vfsops.c#16 integrate .. //depot/projects/hammer/sys/pc98/conf/GENERIC#12 integrate .. //depot/projects/hammer/sys/pc98/conf/NOTES#10 integrate .. //depot/projects/hammer/sys/pc98/i386/busio.s#3 integrate .. //depot/projects/hammer/sys/pc98/i386/machdep.c#21 integrate .. //depot/projects/hammer/sys/pc98/pc98/clock.c#10 integrate .. //depot/projects/hammer/sys/pc98/pc98/nmi.c#1 branch .. //depot/projects/hammer/sys/pci/if_xl.c#23 integrate .. //depot/projects/hammer/sys/sys/iconv.h#3 integrate .. //depot/projects/hammer/sys/sys/mount.h#9 integrate .. //depot/projects/hammer/sys/sys/mutex.h#9 integrate .. //depot/projects/hammer/sys/sys/sched.h#5 integrate .. //depot/projects/hammer/sys/sys/syscallsubr.h#7 integrate .. //depot/projects/hammer/sys/sys/vnode.h#18 integrate .. //depot/projects/hammer/sys/ufs/ffs/ffs_snapshot.c#15 integrate .. //depot/projects/hammer/sys/ufs/ffs/ffs_vfsops.c#15 integrate .. //depot/projects/hammer/sys/ufs/ufs/ufs_quota.c#9 integrate .. //depot/projects/hammer/sys/vm/vm_map.c#25 integrate .. //depot/projects/hammer/tools/debugscripts/dot.gdbinit#2 integrate .. //depot/projects/hammer/usr.bin/mklocale/yacc.y#8 integrate .. //depot/projects/hammer/usr.bin/sed/compile.c#2 integrate .. //depot/projects/hammer/usr.bin/sed/extern.h#2 integrate .. //depot/projects/hammer/usr.bin/sed/main.c#2 integrate .. //depot/projects/hammer/usr.bin/sed/misc.c#3 integrate .. //depot/projects/hammer/usr.bin/sed/process.c#7 integrate .. //depot/projects/hammer/usr.bin/su/su.c#10 integrate .. //depot/projects/hammer/usr.bin/units/units.lib#3 integrate .. //depot/projects/hammer/usr.sbin/asf/asf.8#3 integrate .. //depot/projects/hammer/usr.sbin/asf/asf.c#3 integrate .. //depot/projects/hammer/usr.sbin/mtree/Makefile#3 integrate .. //depot/projects/hammer/usr.sbin/mtree/compare.c#7 integrate .. //depot/projects/hammer/usr.sbin/mtree/create.c#6 integrate .. //depot/projects/hammer/usr.sbin/mtree/extern.h#4 integrate .. //depot/projects/hammer/usr.sbin/mtree/mtree.8#5 integrate .. //depot/projects/hammer/usr.sbin/mtree/mtree.c#5 integrate .. //depot/projects/hammer/usr.sbin/mtree/spec.c#4 integrate .. //depot/projects/hammer/usr.sbin/mtree/specspec.c#1 branch .. //depot/projects/hammer/usr.sbin/mtree/test/test00.sh#2 integrate .. //depot/projects/hammer/usr.sbin/mtree/test/test03.sh#1 branch .. //depot/projects/hammer/usr.sbin/mtree/verify.c#5 integrate .. //depot/projects/hammer/usr.sbin/setkey/Makefile#2 integrate .. //depot/projects/hammer/usr.sbin/setkey/parse.y#2 integrate .. //depot/projects/hammer/usr.sbin/setkey/sample.cf#3 integrate .. //depot/projects/hammer/usr.sbin/setkey/setkey.8#4 integrate .. //depot/projects/hammer/usr.sbin/setkey/setkey.c#4 integrate .. //depot/projects/hammer/usr.sbin/setkey/token.l#3 integrate .. //depot/projects/hammer/usr.sbin/sysinstall/label.c#10 integrate Differences ... ==== //depot/projects/hammer/UPDATING#23 (text+ko) ==== @@ -20,7 +20,7 @@ 20031103: The i386 APIC_IO kernel option has been replaced by 'device apic'. The ACPI module has also been temporarily - disabled, so APCI must be statically compiled into your + disabled, so ACPI must be statically compiled into your kernel using 'device acpi' if you wish to use the ACPI driver. 20031031: @@ -1398,4 +1398,4 @@ Contact Warner Losh if you have any questions about your use of this document. -$FreeBSD: src/UPDATING,v 1.275 2003/11/03 23:02:17 jhb Exp $ +$FreeBSD: src/UPDATING,v 1.276 2003/11/04 19:42:55 ceri Exp $ ==== //depot/projects/hammer/contrib/libpcap/gencode.c#3 (text+ko) ==== @@ -19,7 +19,7 @@ * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $FreeBSD: src/contrib/libpcap/gencode.c,v 1.11 2003/01/26 01:21:53 fenner Exp $ + * $FreeBSD: src/contrib/libpcap/gencode.c,v 1.12 2003/11/04 06:12:21 green Exp $ */ #ifndef lint static const char rcsid[] = @@ -156,6 +156,7 @@ static struct block *gen_ehostop(const u_char *, int); static struct block *gen_fhostop(const u_char *, int); static struct block *gen_thostop(const u_char *, int); +static struct block *gen_whostop(const u_char *, int); static struct block *gen_dnhostop(bpf_u_int32, int, u_int); static struct block *gen_host(bpf_u_int32, bpf_u_int32, int, int); #ifdef INET6 @@ -567,11 +568,6 @@ off_nl = 6; /* XXX in reality, variable! */ return; - case DLT_IEEE802_11: - off_linktype = 30; /* XXX variable */ - off_nl = 32; - return; - case DLT_EN10MB: off_linktype = 12; off_nl = 14; @@ -667,7 +663,6 @@ off_nl = 22; return; -#ifdef notdef case DLT_IEEE802_11: /* * 802.11 doesn't really have a link-level type field. @@ -679,12 +674,13 @@ * * XXX - the header is actually variable-length. We * assume a 24-byte link-layer header, as appears in - * data frames in networks with no bridges. + * data frames in networks with no bridges. If the + * fromds and tods 802.11 header bits are both set, + * it's actually supposed to be 30 bytes. */ off_linktype = 24; - off_nl = 30; + off_nl = 32; return; -#endif case DLT_PRISM_HEADER: /* @@ -959,6 +955,7 @@ break; case DLT_IEEE802_11: + return gen_snap(0x000000, proto, off_linktype); case DLT_PRISM_HEADER: case DLT_FDDI: case DLT_IEEE802: @@ -1681,6 +1678,40 @@ } /* + * Like gen_ehostop, but for DLT_IEEE802_11 (Wireless) + */ +static struct block * +gen_whostop(eaddr, dir) + register const u_char *eaddr; + register int dir; +{ + register struct block *b0, *b1; + + switch (dir) { + case Q_SRC: + return gen_bcmp(10, 6, eaddr); + + case Q_DST: + return gen_bcmp(4, 6, eaddr); + + case Q_AND: + b0 = gen_whostop(eaddr, Q_SRC); + b1 = gen_whostop(eaddr, Q_DST); + gen_and(b0, b1); + return b1; + + case Q_DEFAULT: + case Q_OR: + b0 = gen_whostop(eaddr, Q_SRC); + b1 = gen_whostop(eaddr, Q_DST); + gen_or(b0, b1); + return b1; + } + abort(); + /* NOTREACHED */ +} + +/* * This is quite tricky because there may be pad bytes in front of the * DECNET header, and then there are two possible data packet formats that * carry both src and dst addresses, plus 5 packet types in a format that @@ -2022,6 +2053,8 @@ b0 = gen_fhostop(eaddr, Q_OR); else if (linktype == DLT_IEEE802) b0 = gen_thostop(eaddr, Q_OR); + else if (linktype == DLT_IEEE802_11) + b0 = gen_whostop(eaddr, Q_OR); else bpf_error( "'gateway' supported only on ethernet, FDDI or token ring"); @@ -2976,6 +3009,15 @@ free(eaddr); return b; + case DLT_IEEE802_11: + eaddr = pcap_ether_hostton(name); + if (eaddr == NULL) + bpf_error( + "unknown ether host '%s'", name); + b = gen_whostop(eaddr, dir); + free(eaddr); + return b; + default: bpf_error( "only ethernet/FDDI/token ring supports link-level host name"); @@ -3337,6 +3379,8 @@ return gen_fhostop(eaddr, (int)q.dir); if (linktype == DLT_IEEE802) return gen_thostop(eaddr, (int)q.dir); + if (linktype == DLT_IEEE802_11) + return gen_whostop(eaddr, (int)q.dir); bpf_error("ethernet addresses supported only on ethernet, FDDI or token ring"); } bpf_error("ethernet address used in non-ether expression"); @@ -3746,6 +3790,8 @@ return gen_fhostop(ebroadcast, Q_DST); if (linktype == DLT_IEEE802) return gen_thostop(ebroadcast, Q_DST); + if (linktype == DLT_IEEE802_11) + return gen_whostop(ebroadcast, Q_DST); bpf_error("not a broadcast link"); break; ==== //depot/projects/hammer/contrib/libpcap/pcap.3#3 (text+ko) ==== @@ -19,7 +19,7 @@ .\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. .\" -.\" $FreeBSD: src/contrib/libpcap/pcap.3,v 1.10 2003/01/26 01:21:53 fenner Exp $ +.\" $FreeBSD: src/contrib/libpcap/pcap.3,v 1.11 2003/11/04 06:16:55 green Exp $ .\" .TH PCAP 3 "3 January 2001" .SH NAME @@ -685,16 +685,6 @@ .B \-1 is returned on failure. .PP -.B pcap_datalink_name_to_val() -translates a data link type name, which is a -.B DLT_ -name with the -.B DLT_ -removed, to the corresponding data link type value. The translation -is case-insensitive. -is used to set the current data link type of the pcap descriptor -NULL is returned on failure. -.PP .B pcap_snapshot() returns the snapshot length specified when .B pcap_open_live ==== //depot/projects/hammer/contrib/libpcap/scanner.l#2 (text+ko) ==== @@ -19,7 +19,7 @@ * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $FreeBSD: src/contrib/libpcap/scanner.l,v 1.8 2002/06/21 01:38:14 fenner Exp $ + * $FreeBSD: src/contrib/libpcap/scanner.l,v 1.9 2003/11/04 06:12:21 green Exp $ */ #ifndef lint @@ -69,7 +69,6 @@ #define getc(fp) (*in_buffer == 0 ? EOF : *in_buffer++) #endif -#define yylval pcap_lval extern YYSTYPE yylval; %} ==== //depot/projects/hammer/etc/mtree/BSD.local.dist#10 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/etc/mtree/BSD.local.dist,v 1.101 2003/08/08 13:43:48 ache Exp $ +# $FreeBSD: src/etc/mtree/BSD.local.dist,v 1.102 2003/11/05 23:39:02 davidxu Exp $ # # Please see the file src/etc/mtree/README before making changes to this file. # @@ -453,6 +453,8 @@ .. zh_CN.GB18030 .. + zh_CN.GB2312 + .. zh_CN.GBK .. zh_TW.Big5 ==== //depot/projects/hammer/etc/mtree/BSD.usr.dist#11 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/etc/mtree/BSD.usr.dist,v 1.282 2003/10/27 16:10:05 emax Exp $ +# $FreeBSD: src/etc/mtree/BSD.usr.dist,v 1.283 2003/11/05 23:39:02 davidxu Exp $ # # Please see the file src/etc/mtree/README before making changes to this file. # @@ -517,6 +517,8 @@ .. zh_CN.GB18030 .. + zh_CN.GB2312 + .. zh_CN.GBK .. zh_TW.Big5 @@ -849,6 +851,8 @@ .. zh_CN.GB18030 .. + zh_CN.GB2312 + .. zh_CN.GBK .. zh_TW.Big5 ==== //depot/projects/hammer/games/fortune/datfiles/fortunes2#8 (text+ko) ==== @@ -1,5 +1,5 @@ This fortune brought to you by: -$FreeBSD: src/games/fortune/datfiles/fortunes2,v 1.60 2003/10/06 22:11:03 wilko Exp $ +$FreeBSD: src/games/fortune/datfiles/fortunes2,v 1.61 2003/11/04 09:21:59 roam Exp $ % ======================================================================= || || @@ -34525,7 +34525,8 @@ -- J.D. Watson, "The Double Helix" % One day an elderly Jewish Pole, living in Warsaw, finds an old lamp in his -attic. He starts to polish it and (poof!) a genie appears in cloud of smoke. +attic. He starts to polish it and (poof!) a genie appears in a cloud of +smoke. "Greetings, Mortal!" exclaims the genie, stretching and yawning, "For releasing me I will grant you three wishes." The old man thinks for a moment, then replies, "I want Genghis Khan ==== //depot/projects/hammer/include/pthread.h#5 (text+ko) ==== @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/include/pthread.h,v 1.31 2003/09/09 06:57:51 davidxu Exp $ + * $FreeBSD: src/include/pthread.h,v 1.32 2003/11/04 20:10:15 deischen Exp $ */ #ifndef _PTHREAD_H_ #define _PTHREAD_H_ @@ -196,6 +196,8 @@ * Thread function prototype definitions: */ __BEGIN_DECLS +int pthread_atfork(void (*prepare)(void), void (*parent)(void), + void (*child)(void)); int pthread_attr_destroy(pthread_attr_t *); int pthread_attr_getstack(const pthread_attr_t * __restrict, void ** __restrict stackaddr, ==== //depot/projects/hammer/lib/libc/include/libc_private.h#4 (text+ko) ==== @@ -29,7 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libc/include/libc_private.h,v 1.9 2003/02/27 13:40:00 nectar Exp $ + * $FreeBSD: src/lib/libc/include/libc_private.h,v 1.11 2003/11/05 18:17:30 deischen Exp $ * * Private definitions for libc, libc_r and libpthread. * @@ -120,4 +120,10 @@ */ extern const char *__progname; +/* + * This is the lock to make malloc() thread-safe. It is externalized + * so that thread libraries can protect malloc across fork(). + */ +extern struct _spinlock *__malloc_lock; + #endif /* _LIBC_PRIVATE_H_ */ ==== //depot/projects/hammer/lib/libc/include/spinlock.h#3 (text+ko) ==== @@ -29,7 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libc/include/spinlock.h,v 1.6 2003/03/26 04:02:24 jeff Exp $ + * $FreeBSD: src/lib/libc/include/spinlock.h,v 1.7 2003/11/05 18:17:30 deischen Exp $ * * Lock definitions used in both libc and libpthread. * @@ -43,12 +43,13 @@ /* * Lock structure with room for debugging information. */ -typedef struct { +struct _spinlock { volatile long access_lock; volatile long lock_owner; volatile char *fname; volatile int lineno; -} spinlock_t; +}; +typedef struct _spinlock spinlock_t; #define _SPINLOCK_INITIALIZER { 0, 0, 0, 0 } ==== //depot/projects/hammer/lib/libc/locale/Makefile.inc#12 (text+ko) ==== @@ -1,11 +1,11 @@ # from @(#)Makefile.inc 8.1 (Berkeley) 6/4/93 -# $FreeBSD: src/lib/libc/locale/Makefile.inc,v 1.48 2003/11/01 05:13:12 tjr Exp $ +# $FreeBSD: src/lib/libc/locale/Makefile.inc,v 1.49 2003/11/05 22:52:51 davidxu Exp $ # locale sources .PATH: ${.CURDIR}/${MACHINE_ARCH}/locale ${.CURDIR}/locale SRCS+= big5.c btowc.c collate.c collcmp.c euc.c fix_grouping.c frune.c \ - gb18030.c gbk.c isctype.c iswctype.c \ + gb18030.c gb2312.c gbk.c isctype.c iswctype.c \ ldpart.c lmessages.c lmonetary.c lnumeric.c localeconv.c mblen.c \ mbrlen.c \ mbrtowc.c mbrune.c mbsinit.c mbsrtowcs.c mbtowc.c mbstowcs.c \ ==== //depot/projects/hammer/lib/libc/locale/gbk.c#2 (text+ko) ==== @@ -1,4 +1,5 @@ /*- + * Copyright (c) 2002, 2003 Tim J. Robbins. All rights reserved. * Copyright (c) 1993 * The Regents of the University of California. All rights reserved. * @@ -35,82 +36,78 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/lib/libc/locale/gbk.c,v 1.1 2003/06/01 15:30:56 ache Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/locale/gbk.c,v 1.2 2003/11/05 07:56:45 tjr Exp $"); -#include <rune.h> +#include <sys/types.h> +#include <runetype.h> #include <stddef.h> #include <stdio.h> #include <stdlib.h> -#include <sys/types.h> +#include <wchar.h> + +extern size_t (*__mbrtowc)(wchar_t * __restrict, const char * __restrict, + size_t, mbstate_t * __restrict); +extern size_t (*__wcrtomb)(char * __restrict, wchar_t, mbstate_t * __restrict); -rune_t _GBK_sgetrune(const char *, size_t, char const **); -int _GBK_sputrune(rune_t, char *, size_t, char **); +int _GBK_init(_RuneLocale *); +size_t _GBK_mbrtowc(wchar_t * __restrict, const char * __restrict, size_t, + mbstate_t * __restrict); +size_t _GBK_wcrtomb(char * __restrict, wchar_t, mbstate_t * __restrict); int -_GBK_init(rl) - _RuneLocale *rl; +_GBK_init(_RuneLocale *rl) { - rl->sgetrune = _GBK_sgetrune; - rl->sputrune = _GBK_sputrune; + + __mbrtowc = _GBK_mbrtowc; + __wcrtomb = _GBK_wcrtomb; _CurrentRuneLocale = rl; __mb_cur_max = 2; return (0); } -static inline int -_gbk_check(c) - u_int c; +static __inline int +_gbk_check(u_int c) { + c &= 0xff; return ((c >= 0x80 && c <= 0xfe) ? 2 : 1); } -rune_t -_GBK_sgetrune(string, n, result) - const char *string; - size_t n; - char const **result; +size_t +_GBK_mbrtowc(wchar_t * __restrict pwc, const char * __restrict s, size_t n, + mbstate_t * __restrict ps __unused) { - rune_t rune = 0; - int len; + wchar_t wc; + int i, len; - if (n < 1 || (len = _gbk_check(*string)) > n) { - if (result) - *result = string; - return (_INVALID_RUNE); - } - while (--len >= 0) - rune = (rune << 8) | ((u_int)(*string++) & 0xff); - if (result) - *result = string; - return rune; + if (s == NULL) + /* Reset to initial shift state (no-op) */ + return (0); + if (n == 0 || (size_t)(len = _gbk_check(*s)) > n) + /* Incomplete multibyte sequence */ + return ((size_t)-2); + wc = 0; + i = len; + while (i-- > 0) + wc = (wc << 8) | (unsigned char)*s++; + if (pwc != NULL) + *pwc = wc; + return (wc == L'\0' ? 0 : len); } -int -_GBK_sputrune(c, string, n, result) - rune_t c; - char *string, **result; - size_t n; +size_t +_GBK_wcrtomb(char * __restrict s, wchar_t wc, + mbstate_t * __restrict ps __unused) { - if (c & 0x8000) { - if (n >= 2) { - string[0] = (c >> 8) & 0xff; - string[1] = c & 0xff; - if (result) - *result = string + 2; - return (2); - } + + if (s == NULL) + /* Reset to initial shift state (no-op) */ + return (1); + if (wc & 0x8000) { + *s++ = (wc >> 8) & 0xff; + *s = wc & 0xff; + return (2); } - else { - if (n >= 1) { - *string = c & 0xff; - if (result) - *result = string + 1; - return (1); - } - } - if (result) - *result = string; - return (0); - + *s = wc & 0xff; + return (1); } ==== //depot/projects/hammer/lib/libc/locale/setrunelocale.c#8 (text+ko) ==== @@ -38,7 +38,7 @@ #define OBSOLETE_IN_6 #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/lib/libc/locale/setrunelocale.c,v 1.32 2003/11/01 05:13:13 tjr Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/locale/setrunelocale.c,v 1.33 2003/11/05 22:52:51 davidxu Exp $"); #include <rune.h> #include <errno.h> @@ -56,6 +56,7 @@ extern int _UTF8_init(_RuneLocale *); extern int _EUC_init(_RuneLocale *); extern int _GB18030_init(_RuneLocale *); +extern int _GB2312_init(_RuneLocale *); extern int _GBK_init(_RuneLocale *); extern int _BIG5_init(_RuneLocale *); extern int _MSKanji_init(_RuneLocale *); @@ -157,6 +158,8 @@ ret = _EUC_init(rl); else if (strcmp(rl->encoding, "GB18030") == 0) ret = _GB18030_init(rl); + else if (strcmp(rl->encoding, "GB2312") == 0) + ret = _GB2312_init(rl); else if (strcmp(rl->encoding, "GBK") == 0) ret = _GBK_init(rl); else if (strcmp(rl->encoding, "BIG5") == 0) ==== //depot/projects/hammer/lib/libc/stdio/fgetwc.c#4 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/lib/libc/stdio/fgetwc.c,v 1.6 2002/10/16 12:09:43 tjr Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/stdio/fgetwc.c,v 1.7 2003/11/04 11:05:55 tjr Exp $"); #include "namespace.h" #include <errno.h> @@ -78,7 +78,6 @@ __fgetwc_nbf(FILE *fp) { char buf[MB_LEN_MAX]; - mbstate_t mbs; size_t n, nconv; int c; wchar_t wc; @@ -91,8 +90,7 @@ break; } buf[n++] = (char)c; - memset(&mbs, 0, sizeof(mbs)); - nconv = mbrtowc(&wc, buf, n, &mbs); + nconv = mbrtowc(&wc, buf, n, NULL); if (nconv == n) return (wc); else if (nconv == 0) ==== //depot/projects/hammer/lib/libc/stdio/fputwc.c#5 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/lib/libc/stdio/fputwc.c,v 1.6 2003/11/01 08:18:18 tjr Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/stdio/fputwc.c,v 1.7 2003/11/04 11:05:55 tjr Exp $"); #include "namespace.h" #include <errno.h> @@ -44,7 +44,6 @@ __fputwc(wchar_t wc, FILE *fp) { char buf[MB_LEN_MAX]; - mbstate_t mbs; size_t i, len; if (MB_CUR_MAX == 1 && wc > 0 && wc <= UCHAR_MAX) { @@ -56,8 +55,7 @@ *buf = (unsigned char)wc; len = 1; } else { - memset(&mbs, 0, sizeof(mbs)); - if ((len = wcrtomb(buf, wc, &mbs)) == (size_t)-1) { + if ((len = wcrtomb(buf, wc, NULL)) == (size_t)-1) { fp->_flags |= __SERR; return (WEOF); } ==== //depot/projects/hammer/lib/libc/stdio/ungetwc.c#5 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/lib/libc/stdio/ungetwc.c,v 1.5 2002/10/16 12:09:43 tjr Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/stdio/ungetwc.c,v 1.6 2003/11/04 11:05:55 tjr Exp $"); #include "namespace.h" #include <errno.h> @@ -43,13 +43,11 @@ __ungetwc(wint_t wc, FILE *fp) { char buf[MB_LEN_MAX]; - mbstate_t mbs; size_t len; if (wc == WEOF) return (WEOF); - memset(&mbs, 0, sizeof(mbs)); - if ((len = wcrtomb(buf, wc, &mbs)) == (size_t)-1) { + if ((len = wcrtomb(buf, wc, NULL)) == (size_t)-1) { fp->_flags |= __SERR; return (WEOF); } ==== //depot/projects/hammer/lib/libc/stdio/vfprintf.c#11 (text+ko) ==== @@ -38,7 +38,7 @@ static char sccsid[] = "@(#)vfprintf.c 8.1 (Berkeley) 6/4/93"; #endif /* LIBC_SCCS and not lint */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/lib/libc/stdio/vfprintf.c,v 1.59 2003/04/19 23:53:19 das Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/stdio/vfprintf.c,v 1.60 2003/11/05 08:20:45 tjr Exp $"); /* * Actual printf innards. @@ -345,18 +345,16 @@ wchar_t *p; char *convbuf, *mbp; size_t clen, nbytes; - mbstate_t mbs; /* * Determine the number of bytes to output and allocate space for * the output. */ - memset(&mbs, 0, sizeof(mbs)); if (prec >= 0) { nbytes = 0; p = wcsarg; for (;;) { - clen = wcrtomb(buf, *p++, &mbs); + clen = wcrtomb(buf, *p++, NULL); if (clen == 0 || clen == (size_t)-1 || nbytes + clen > prec) break; @@ -364,7 +362,7 @@ } } else { p = wcsarg; - nbytes = wcsrtombs(NULL, (const wchar_t **)&p, 0, &mbs); + nbytes = wcsrtombs(NULL, (const wchar_t **)&p, 0, NULL); if (nbytes == (size_t)-1) return (NULL); } @@ -377,9 +375,8 @@ */ mbp = convbuf; p = wcsarg; - memset(&mbs, 0, sizeof(mbs)); while (mbp - convbuf < nbytes) { - clen = wcrtomb(mbp, *p++, &mbs); + clen = wcrtomb(mbp, *p++, NULL); if (clen == 0 || clen == (size_t)-1) break; mbp += clen; @@ -795,12 +792,10 @@ /*FALLTHROUGH*/ case 'c': if (flags & LONGINT) { - mbstate_t mbs; size_t mbseqlen; - memset(&mbs, 0, sizeof(mbs)); mbseqlen = wcrtomb(cp = buf, - (wchar_t)GETARG(wint_t), &mbs); + (wchar_t)GETARG(wint_t), NULL); if (mbseqlen == (size_t)-1) { fp->_flags |= __SERR; goto error; ==== //depot/projects/hammer/lib/libc/stdio/vfscanf.c#7 (text+ko) ==== @@ -38,7 +38,7 @@ static char sccsid[] = "@(#)vfscanf.c 8.1 (Berkeley) 6/4/93"; #endif /* LIBC_SCCS and not lint */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/lib/libc/stdio/vfscanf.c,v 1.32 2003/06/28 09:03:05 das Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/stdio/vfscanf.c,v 1.33 2003/11/05 08:20:45 tjr Exp $"); #include "namespace.h" #include <ctype.h> @@ -140,7 +140,6 @@ char buf[BUF]; /* buffer for numeric and mb conversions */ wchar_t *wcp; /* handy wide character pointer */ wchar_t *wcp0; /* saves original value of wcp */ - mbstate_t mbs; /* multibyte conversion state */ size_t nconv; /* length of multibyte sequence converted */ /* `basefix' is used to avoid `if' tests in the integer scanner */ @@ -367,8 +366,7 @@ buf[n++] = *fp->_p; fp->_p++; fp->_r--; - memset(&mbs, 0, sizeof(mbs)); - nconv = mbrtowc(wcp, buf, n, &mbs); + nconv = mbrtowc(wcp, buf, n, NULL); if (nconv == (size_t)-1) { fp->_flags |= __SERR; goto input_failure; @@ -447,8 +445,7 @@ buf[n++] = *fp->_p; fp->_p++; fp->_r--; - memset(&mbs, 0, sizeof(mbs)); - nconv = mbrtowc(wcp, buf, n, &mbs); + nconv = mbrtowc(wcp, buf, n, NULL); if (nconv == (size_t)-1) { fp->_flags |= __SERR; goto input_failure; @@ -548,8 +545,7 @@ buf[n++] = *fp->_p; fp->_p++; fp->_r--; - memset(&mbs, 0, sizeof(mbs)); - nconv = mbrtowc(wcp, buf, n, &mbs); + nconv = mbrtowc(wcp, buf, n, NULL); if (nconv == (size_t)-1) { fp->_flags |= __SERR; goto input_failure; ==== //depot/projects/hammer/lib/libc/stdio/vfwprintf.c#8 (text+ko) ==== @@ -41,7 +41,7 @@ #endif /* LIBC_SCCS and not lint */ __FBSDID("FreeBSD: src/lib/libc/stdio/vfprintf.c,v 1.58 2003/04/14 11:24:53 das Exp"); #endif -__FBSDID("$FreeBSD: src/lib/libc/stdio/vfwprintf.c,v 1.12 2003/04/19 23:53:19 das Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/stdio/vfwprintf.c,v 1.13 2003/11/05 08:20:45 tjr Exp $"); /* * Actual wprintf innards. @@ -328,7 +328,6 @@ wchar_t *convbuf, *wcp; const char *p; size_t insize, nchars, nconv; - mbstate_t mbs; if (mbsarg == NULL) return (NULL); @@ -342,11 +341,10 @@ * String is not guaranteed to be NUL-terminated. Find the * number of characters to print. */ - memset(&mbs, 0, sizeof(mbs)); p = mbsarg; insize = nchars = 0; while (nchars != (size_t)prec) { - nconv = mbrlen(p, MB_CUR_MAX, &mbs); + nconv = mbrlen(p, MB_CUR_MAX, NULL); if (nconv == 0 || nconv == (size_t)-1 || nconv == (size_t)-2) break; @@ -369,9 +367,8 @@ return (NULL); >>> TRUNCATED FOR MAIL (1000 lines) <<<
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200311060115.hA61F159070712>