Date: Wed, 20 Apr 2005 16:02:56 GMT From: Sam Leffler <sam@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 75627 for review Message-ID: <200504201602.j3KG2uWK022289@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=75627 Change 75627 by sam@sam_ebb on 2005/04/20 16:02:46 IFC @ 75626 Affected files ... .. //depot/projects/wifi/gnu/usr.bin/groff/tmac/mdoc.local#4 integrate .. //depot/projects/wifi/kerberos5/Makefile.inc#3 integrate .. //depot/projects/wifi/lib/Makefile#6 integrate .. //depot/projects/wifi/lib/libc/net/getproto.c#2 integrate .. //depot/projects/wifi/lib/libc/net/getprotoent.c#3 integrate .. //depot/projects/wifi/lib/libc/net/getprotoname.c#2 integrate .. //depot/projects/wifi/lib/libc/net/getservbyname.c#3 integrate .. //depot/projects/wifi/lib/libc/net/getservbyport.c#3 integrate .. //depot/projects/wifi/lib/libc/net/getservent.c#4 integrate .. //depot/projects/wifi/lib/libc/net/name6.c#4 integrate .. //depot/projects/wifi/lib/libc/net/netdb_private.h#2 integrate .. //depot/projects/wifi/lib/libpmc/Makefile#1 branch .. //depot/projects/wifi/lib/libpmc/libpmc.c#1 branch .. //depot/projects/wifi/lib/libpmc/pmc.3#1 branch .. //depot/projects/wifi/lib/libpmc/pmc.h#1 branch .. //depot/projects/wifi/release/doc/en_US.ISO8859-1/errata/article.sgml#2 integrate .. //depot/projects/wifi/release/doc/en_US.ISO8859-1/hardware/common/artheader.sgml#3 integrate .. //depot/projects/wifi/release/doc/en_US.ISO8859-1/installation/common/artheader.sgml#2 integrate .. //depot/projects/wifi/release/doc/en_US.ISO8859-1/readme/article.sgml#2 integrate .. //depot/projects/wifi/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml#10 integrate .. //depot/projects/wifi/release/doc/zh_CN.GB2312/relnotes/common/new.sgml#4 integrate .. //depot/projects/wifi/sbin/devfs/devfs.8#6 integrate .. //depot/projects/wifi/sbin/ipfw/ipfw.8#9 integrate .. //depot/projects/wifi/sbin/ipfw/ipfw2.c#8 integrate .. //depot/projects/wifi/share/doc/papers/Makefile#2 integrate .. //depot/projects/wifi/share/doc/papers/hwpmc/Makefile#1 branch .. //depot/projects/wifi/share/doc/papers/hwpmc/hwpmc.ms#1 branch .. //depot/projects/wifi/share/examples/hwpmc/README#1 branch .. //depot/projects/wifi/share/man/man4/Makefile#20 integrate .. //depot/projects/wifi/share/man/man4/cpufreq.4#6 integrate .. //depot/projects/wifi/share/man/man4/hwpmc.4#1 branch .. //depot/projects/wifi/share/man/man4/ipw.4#1 branch .. //depot/projects/wifi/share/man/man4/iwi.4#2 integrate .. //depot/projects/wifi/share/man/man4/ohci.4#2 integrate .. //depot/projects/wifi/share/man/man4/ral.4#1 branch .. //depot/projects/wifi/share/man/man4/twe.4#4 integrate .. //depot/projects/wifi/share/man/man4/uhci.4#3 integrate .. //depot/projects/wifi/share/man/man4/ural.4#1 branch .. //depot/projects/wifi/share/man/man4/usb.4#2 integrate .. //depot/projects/wifi/share/man/man9/sleepqueue.9#3 integrate .. //depot/projects/wifi/share/man/man9/taskqueue.9#5 integrate .. //depot/projects/wifi/share/mk/bsd.libnames.mk#5 integrate .. //depot/projects/wifi/sys/alpha/include/_bus.h#1 branch .. //depot/projects/wifi/sys/alpha/include/bus.h#6 integrate .. //depot/projects/wifi/sys/amd64/conf/NOTES#8 integrate .. //depot/projects/wifi/sys/amd64/include/_bus.h#1 branch .. //depot/projects/wifi/sys/amd64/include/bus.h#3 integrate .. //depot/projects/wifi/sys/amd64/include/pmc_mdep.h#1 branch .. //depot/projects/wifi/sys/arm/include/_bus.h#1 branch .. //depot/projects/wifi/sys/arm/include/bus.h#5 integrate .. //depot/projects/wifi/sys/conf/NOTES#19 integrate .. //depot/projects/wifi/sys/conf/files#23 integrate .. //depot/projects/wifi/sys/conf/files.amd64#11 integrate .. //depot/projects/wifi/sys/conf/files.i386#16 integrate .. //depot/projects/wifi/sys/conf/files.pc98#8 integrate .. //depot/projects/wifi/sys/conf/kmod.mk#12 integrate .. //depot/projects/wifi/sys/conf/options#15 integrate .. //depot/projects/wifi/sys/dev/ata/ata-all.c#8 integrate .. //depot/projects/wifi/sys/dev/ata/ata-all.h#6 integrate .. //depot/projects/wifi/sys/dev/ata/ata-chipset.c#9 integrate .. //depot/projects/wifi/sys/dev/ata/ata-disk.c#7 integrate .. //depot/projects/wifi/sys/dev/ata/ata-raid.c#6 integrate .. //depot/projects/wifi/sys/dev/ciss/ciss.c#6 integrate .. //depot/projects/wifi/sys/dev/ciss/cissreg.h#2 integrate .. //depot/projects/wifi/sys/dev/ciss/cissvar.h#2 integrate .. //depot/projects/wifi/sys/dev/if_ndis/if_ndis.c#14 integrate .. //depot/projects/wifi/sys/dev/ipw/if_ipw.c#1 branch .. //depot/projects/wifi/sys/dev/ipw/if_ipwreg.h#1 branch .. //depot/projects/wifi/sys/dev/ipw/if_ipwvar.h#1 branch .. //depot/projects/wifi/sys/dev/iwi/if_iwi.c#3 integrate .. //depot/projects/wifi/sys/dev/iwi/if_iwireg.h#2 integrate .. //depot/projects/wifi/sys/dev/iwi/if_iwivar.h#2 integrate .. //depot/projects/wifi/sys/dev/pccard/pccarddevs#7 integrate .. //depot/projects/wifi/sys/dev/ral/if_ral.c#1 branch .. //depot/projects/wifi/sys/dev/ral/if_ral_pccard.c#1 branch .. //depot/projects/wifi/sys/dev/ral/if_ral_pci.c#1 branch .. //depot/projects/wifi/sys/dev/ral/if_ralrate.c#1 branch .. //depot/projects/wifi/sys/dev/ral/if_ralrate.h#1 branch .. //depot/projects/wifi/sys/dev/ral/if_ralreg.h#1 branch .. //depot/projects/wifi/sys/dev/ral/if_ralvar.h#1 branch .. //depot/projects/wifi/sys/dev/usb/if_ural.c#1 branch .. //depot/projects/wifi/sys/dev/usb/if_uralreg.h#1 branch .. //depot/projects/wifi/sys/dev/usb/if_uralvar.h#1 branch .. //depot/projects/wifi/sys/dev/usb/usbdevs#12 integrate .. //depot/projects/wifi/sys/geom/geom_kern.c#4 integrate .. //depot/projects/wifi/sys/geom/label/g_label_ufs.c#3 integrate .. //depot/projects/wifi/sys/geom/mirror/g_mirror.c#11 integrate .. //depot/projects/wifi/sys/geom/mirror/g_mirror.h#7 integrate .. //depot/projects/wifi/sys/hwpmc/hwpmc_amd.c#1 branch .. //depot/projects/wifi/sys/hwpmc/hwpmc_intel.c#1 branch .. //depot/projects/wifi/sys/hwpmc/hwpmc_mod.c#1 branch .. //depot/projects/wifi/sys/hwpmc/hwpmc_pentium.c#1 branch .. //depot/projects/wifi/sys/hwpmc/hwpmc_piv.c#1 branch .. //depot/projects/wifi/sys/hwpmc/hwpmc_ppro.c#1 branch .. //depot/projects/wifi/sys/i386/conf/NOTES#13 integrate .. //depot/projects/wifi/sys/i386/cpufreq/smist.c#1 branch .. //depot/projects/wifi/sys/i386/i386/local_apic.c#7 integrate .. //depot/projects/wifi/sys/i386/i386/sys_machdep.c#7 integrate .. //depot/projects/wifi/sys/i386/include/_bus.h#1 branch .. //depot/projects/wifi/sys/i386/include/bus.h#3 integrate .. //depot/projects/wifi/sys/i386/include/pmc_mdep.h#1 branch .. //depot/projects/wifi/sys/ia64/include/_bus.h#1 branch .. //depot/projects/wifi/sys/ia64/include/bus.h#5 integrate .. //depot/projects/wifi/sys/kern/kern_exec.c#10 integrate .. //depot/projects/wifi/sys/kern/kern_exit.c#7 integrate .. //depot/projects/wifi/sys/kern/kern_fork.c#9 integrate .. //depot/projects/wifi/sys/kern/kern_pmc.c#1 branch .. //depot/projects/wifi/sys/kern/kern_sig.c#9 integrate .. //depot/projects/wifi/sys/kern/sched_4bsd.c#8 integrate .. //depot/projects/wifi/sys/kern/sched_ule.c#11 integrate .. //depot/projects/wifi/sys/kern/uipc_usrreq.c#8 integrate .. //depot/projects/wifi/sys/kern/vfs_mount.c#19 integrate .. //depot/projects/wifi/sys/kern/vfs_subr.c#22 integrate .. //depot/projects/wifi/sys/modules/Makefile#20 integrate .. //depot/projects/wifi/sys/modules/apm/Makefile#3 integrate .. //depot/projects/wifi/sys/modules/cpufreq/Makefile#6 integrate .. //depot/projects/wifi/sys/modules/hwpmc/Makefile#1 branch .. //depot/projects/wifi/sys/modules/ipw/Makefile#1 branch .. //depot/projects/wifi/sys/modules/iwi/Makefile#2 integrate .. //depot/projects/wifi/sys/modules/ral/Makefile#1 branch .. //depot/projects/wifi/sys/modules/ural/Makefile#1 branch .. //depot/projects/wifi/sys/net/if.c#13 integrate .. //depot/projects/wifi/sys/net/if_var.h#11 integrate .. //depot/projects/wifi/sys/net/if_vlan.c#5 integrate .. //depot/projects/wifi/sys/netgraph/ng_eiface.c#6 integrate .. //depot/projects/wifi/sys/netgraph/ng_message.h#4 integrate .. //depot/projects/wifi/sys/netgraph/ng_vlan.c#2 integrate .. //depot/projects/wifi/sys/netinet/ip_carp.c#5 integrate .. //depot/projects/wifi/sys/netinet/ip_dummynet.c#6 integrate .. //depot/projects/wifi/sys/netinet/ip_dummynet.h#4 integrate .. //depot/projects/wifi/sys/netinet/ip_fw.h#5 integrate .. //depot/projects/wifi/sys/netinet/ip_fw2.c#9 integrate .. //depot/projects/wifi/sys/netinet/ip_fw_pfil.c#9 integrate .. //depot/projects/wifi/sys/netinet/tcp_sack.c#9 integrate .. //depot/projects/wifi/sys/netinet6/ip6_output.c#4 integrate .. //depot/projects/wifi/sys/pc98/apm/apm_bioscall.S#1 branch .. //depot/projects/wifi/sys/pc98/apm/apm_bioscall.s#3 delete .. //depot/projects/wifi/sys/pc98/conf/NOTES#8 integrate .. //depot/projects/wifi/sys/pc98/include/_bus.h#1 branch .. //depot/projects/wifi/sys/pc98/include/bus.h#2 integrate .. //depot/projects/wifi/sys/pc98/include/pmc_mdep.h#1 branch .. //depot/projects/wifi/sys/powerpc/include/_bus.h#1 branch .. //depot/projects/wifi/sys/powerpc/include/bus.h#6 integrate .. //depot/projects/wifi/sys/powerpc/powermac/ata_kauai.c#7 integrate .. //depot/projects/wifi/sys/powerpc/powermac/ata_macio.c#7 integrate .. //depot/projects/wifi/sys/sparc64/include/_bus.h#1 branch .. //depot/projects/wifi/sys/sparc64/include/bus.h#5 integrate .. //depot/projects/wifi/sys/sys/param.h#10 integrate .. //depot/projects/wifi/sys/sys/pmc.h#1 branch .. //depot/projects/wifi/sys/sys/pmckern.h#1 branch .. //depot/projects/wifi/sys/sys/proc.h#13 integrate .. //depot/projects/wifi/sys/sys/sched.h#3 integrate .. //depot/projects/wifi/sys/sys/systm.h#12 integrate .. //depot/projects/wifi/tools/tools/nanobsd/make.conf#9 integrate .. //depot/projects/wifi/usr.bin/tar/bsdtar.1#6 integrate .. //depot/projects/wifi/usr.sbin/Makefile#9 integrate .. //depot/projects/wifi/usr.sbin/pmccontrol/Makefile#1 branch .. //depot/projects/wifi/usr.sbin/pmccontrol/pmccontrol.8#1 branch .. //depot/projects/wifi/usr.sbin/pmccontrol/pmccontrol.c#1 branch .. //depot/projects/wifi/usr.sbin/pmcstat/Makefile#1 branch .. //depot/projects/wifi/usr.sbin/pmcstat/pmcstat.8#1 branch .. //depot/projects/wifi/usr.sbin/pmcstat/pmcstat.c#1 branch Differences ... ==== //depot/projects/wifi/gnu/usr.bin/groff/tmac/mdoc.local#4 (text+ko) ==== @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/gnu/usr.bin/groff/tmac/mdoc.local,v 1.45 2005/01/25 09:37:37 ru Exp $ +.\" $FreeBSD: src/gnu/usr.bin/groff/tmac/mdoc.local,v 1.47 2005/04/19 13:26:58 jkoshy Exp $ .\" .\" %beginstrip% . @@ -48,6 +48,7 @@ .ds doc-str-Lb-libkiconv Kernel side iconv library (libkiconv, \-lkiconv) .ds doc-str-Lb-libmd Message Digest (MD4, MD5, etc.) Support Library (libmd, \-lmd) .ds doc-str-Lb-libnetgraph Netgraph User Library (libnetgraph, \-lnetgraph) +.ds doc-str-Lb-libpmc Performance Monitoring Counters API (libpmc, \-lpmc) .ds doc-str-Lb-librpcsvc RPC Service Library (librpcsvc, \-lrpcsvc) .ds doc-str-Lb-libsdp Bluetooth Service Discovery Protocol User Library (libsdp, \-lsdp) .ds doc-str-Lb-libthr 1:1 Threading Library (libthr, \-lthr) ==== //depot/projects/wifi/kerberos5/Makefile.inc#3 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/kerberos5/Makefile.inc,v 1.24 2004/12/21 09:33:44 ru Exp $ +# $FreeBSD: src/kerberos5/Makefile.inc,v 1.25 2005/04/18 22:03:21 imp Exp $ NO_LINT= @@ -48,4 +48,4 @@ .endfor .endfor -.endif defined(SRCS) +.endif # defined(SRCS) ==== //depot/projects/wifi/lib/Makefile#6 (text+ko) ==== @@ -1,5 +1,5 @@ # @(#)Makefile 8.1 (Berkeley) 6/4/93 -# $FreeBSD: src/lib/Makefile,v 1.203 2005/04/02 01:40:12 davidxu Exp $ +# $FreeBSD: src/lib/Makefile,v 1.204 2005/04/19 04:01:21 jkoshy Exp $ # To satisfy shared library or ELF linkage when only the libraries being # built are visible: @@ -31,7 +31,7 @@ ${_libio} libipsec \ libipx libkiconv libmagic libmenu ${_libmilter} ${_libmp} \ ${_libncp} ${_libngatm} libopie libpam libpanel libpcap \ - ${_libpthread} ${_libsdp} ${_libsm} ${_libsmb} ${_libsmdb} \ + ${_libpmc} ${_libpthread} ${_libsdp} ${_libsm} ${_libsmb} ${_libsmdb} \ ${_libsmutil} libstand libtelnet ${_libthr} ${_libthread_db} libufs \ libugidfw ${_libusbhid} ${_libvgl} libwrap liby libz ${_bind} @@ -59,6 +59,7 @@ .if ${MACHINE_ARCH} == "i386" _libncp= libncp +_libpmc= libpmc _libsmb= libsmb _libvgl= libvgl .endif @@ -89,6 +90,7 @@ .if ${MACHINE_ARCH} == "amd64" _libncp= libncp +_libpmc= libpmc _libsmb= libsmb .endif ==== //depot/projects/wifi/lib/libc/net/getproto.c#2 (text+ko) ==== @@ -35,23 +35,33 @@ static char sccsid[] = "@(#)getproto.c 8.1 (Berkeley) 6/4/93"; #endif /* LIBC_SCCS and not lint */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/lib/libc/net/getproto.c,v 1.3 2002/03/21 18:49:23 obrien Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/net/getproto.c,v 1.4 2005/04/19 14:41:13 ume Exp $"); #include <netdb.h> +#include "netdb_private.h" -extern int _proto_stayopen; +int +getprotobynumber_r(int proto, struct protoent *pe, struct protoent_data *ped) +{ + int error; + + setprotoent_r(ped->stayopen, ped); + while ((error = getprotoent_r(pe, ped)) == 0) + if (pe->p_proto == proto) + break; + if (!ped->stayopen) + endprotoent_r(ped); + return (error); +} struct protoent * -getprotobynumber(proto) - int proto; +getprotobynumber(int proto) { - struct protoent *p; + struct protodata *pd; - setprotoent(_proto_stayopen); - while ( (p = getprotoent()) ) - if (p->p_proto == proto) - break; - if (!_proto_stayopen) - endprotoent(); - return (p); + if ((pd = __protodata_init()) == NULL) + return (NULL); + if (getprotobynumber_r(proto, &pd->proto, &pd->data) != 0) + return (NULL); + return (&pd->proto); } ==== //depot/projects/wifi/lib/libc/net/getprotoent.c#3 (text+ko) ==== @@ -35,7 +35,7 @@ static char sccsid[] = "@(#)getprotoent.c 8.1 (Berkeley) 6/4/93"; #endif /* LIBC_SCCS and not lint */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/lib/libc/net/getprotoent.c,v 1.3 2005/01/03 11:07:45 sobomax Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/net/getprotoent.c,v 1.4 2005/04/19 14:41:13 ume Exp $"); #include <sys/types.h> #include <sys/socket.h> @@ -43,53 +43,101 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> +#include "namespace.h" +#include "reentrant.h" +#include "un-namespace.h" +#include "netdb_private.h" + +static struct protodata protodata; +static thread_key_t protodata_key; +static once_t protodata_init_once = ONCE_INITIALIZER; +static int protodata_thr_keycreated = 0; + +static void +protoent_data_clear(struct protoent_data *ped) +{ + if (ped->fp) { + fclose(ped->fp); + ped->fp = NULL; + } +} + +static void +protodata_free(void *ptr) +{ + struct protodata *pd = ptr; + + if (pd == NULL) + return; + protoent_data_clear(&pd->data); + free(pd); +} + +static void +protodata_keycreate(void) +{ + protodata_thr_keycreated = + (thr_keycreate(&protodata_key, protodata_free) == 0); +} -#define MAXALIASES 35 +struct protodata * +__protodata_init(void) +{ + struct protodata *pd; -static FILE *protof = NULL; -static char line[BUFSIZ+1]; -static struct protoent proto; -static char *proto_aliases[MAXALIASES]; -int _proto_stayopen; + if (thr_main() != 0) + return (&protodata); + if (thr_once(&protodata_init_once, protodata_keycreate) != 0 || + !protodata_thr_keycreated) + return (NULL); + if ((pd = thr_getspecific(protodata_key)) != NULL) + return (pd); + if ((pd = calloc(1, sizeof(*pd))) == NULL) + return (NULL); + if (thr_setspecific(protodata_key, pd) == 0) + return (pd); + free(pd); + return (NULL); +} void -setprotoent(f) - int f; +setprotoent_r(int f, struct protoent_data *ped) { - if (protof == NULL) - protof = fopen(_PATH_PROTOCOLS, "r" ); + if (ped->fp == NULL) + ped->fp = fopen(_PATH_PROTOCOLS, "r"); else - rewind(protof); - _proto_stayopen |= f; + rewind(ped->fp); + ped->stayopen |= f; } void -endprotoent() +endprotoent_r(struct protoent_data *ped) { - if (protof) { - fclose(protof); - protof = NULL; + if (ped->fp) { + fclose(ped->fp); + ped->fp = NULL; } - _proto_stayopen = 0; + ped->stayopen = 0; } -struct protoent * -getprotoent() +int +getprotoent_r(struct protoent *pe, struct protoent_data *ped) { char *p; - char *cp, **q; + char *cp, **q, *endp; + long l; - if (protof == NULL && (protof = fopen(_PATH_PROTOCOLS, "r" )) == NULL) - return (NULL); + if (ped->fp == NULL && (ped->fp = fopen(_PATH_PROTOCOLS, "r")) == NULL) + return (-1); again: - if ((p = fgets(line, BUFSIZ, protof)) == NULL) - return (NULL); + if ((p = fgets(ped->line, BUFSIZ, ped->fp)) == NULL) + return (-1); if (*p == '#') goto again; cp = strpbrk(p, "#\n"); if (cp != NULL) *cp = '\0'; - proto.p_name = p; + pe->p_name = p; cp = strpbrk(p, " \t"); if (cp == NULL) goto again; @@ -99,8 +147,11 @@ p = strpbrk(cp, " \t"); if (p != NULL) *p++ = '\0'; - proto.p_proto = atoi(cp); - q = proto.p_aliases = proto_aliases; + l = strtol(cp, &endp, 10); + if (endp == cp || *endp != '\0' || l < 0 || l > USHRT_MAX) + goto again; + pe->p_proto = l; + q = pe->p_aliases = ped->aliases; if (p != NULL) { cp = p; while (cp && *cp) { @@ -108,7 +159,7 @@ cp++; continue; } - if (q < &proto_aliases[MAXALIASES - 1]) + if (q < &ped->aliases[PROTOENT_MAXALIASES - 1]) *q++ = cp; cp = strpbrk(cp, " \t"); if (cp != NULL) @@ -116,5 +167,37 @@ } } *q = NULL; - return (&proto); + return (0); +} + +void +setprotoent(int f) +{ + struct protodata *pd; + + if ((pd = __protodata_init()) == NULL) + return; + setprotoent_r(f, &pd->data); +} + +void +endprotoent(void) +{ + struct protodata *pd; + + if ((pd = __protodata_init()) == NULL) + return; + endprotoent_r(&pd->data); +} + +struct protoent * +getprotoent(void) +{ + struct protodata *pd; + + if ((pd = __protodata_init()) == NULL) + return (NULL); + if (getprotoent_r(&pd->proto, &pd->data) != 0) + return (NULL); + return (&pd->proto); } ==== //depot/projects/wifi/lib/libc/net/getprotoname.c#2 (text+ko) ==== @@ -35,30 +35,41 @@ static char sccsid[] = "@(#)getprotoname.c 8.1 (Berkeley) 6/4/93"; #endif /* LIBC_SCCS and not lint */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/lib/libc/net/getprotoname.c,v 1.3 2002/03/21 18:49:23 obrien Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/net/getprotoname.c,v 1.4 2005/04/19 14:41:13 ume Exp $"); #include <netdb.h> #include <string.h> +#include "netdb_private.h" -extern int _proto_stayopen; - -struct protoent * -getprotobyname(name) - const char *name; +int +getprotobyname_r(const char *name, struct protoent *pe, + struct protoent_data *ped) { - struct protoent *p; char **cp; + int error; - setprotoent(_proto_stayopen); - while ( (p = getprotoent()) ) { - if (strcmp(p->p_name, name) == 0) + setprotoent_r(ped->stayopen, ped); + while ((error = getprotoent_r(pe, ped)) == 0) { + if (strcmp(pe->p_name, name) == 0) break; - for (cp = p->p_aliases; *cp != 0; cp++) + for (cp = pe->p_aliases; *cp != 0; cp++) if (strcmp(*cp, name) == 0) goto found; } found: - if (!_proto_stayopen) - endprotoent(); - return (p); + if (!ped->stayopen) + endprotoent_r(ped); + return (error); +} + +struct protoent * +getprotobyname(const char *name) +{ + struct protodata *pd; + + if ((pd = __protodata_init()) == NULL) + return (NULL); + if (getprotobyname_r(name, &pd->proto, &pd->data) != 0) + return (NULL); + return (&pd->proto); } ==== //depot/projects/wifi/lib/libc/net/getservbyname.c#3 (text+ko) ==== @@ -35,7 +35,7 @@ static char sccsid[] = "@(#)getservbyname.c 8.1 (Berkeley) 6/4/93"; #endif /* LIBC_SCCS and not lint */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/lib/libc/net/getservbyname.c,v 1.6 2005/04/17 14:42:52 ume Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/net/getservbyname.c,v 1.7 2005/04/18 18:34:58 ume Exp $"); #include <netdb.h> #include <string.h> @@ -49,8 +49,8 @@ int error; #ifdef YP - sed->getservbyname_yp = (char *)name; - sed->getservbyproto_yp = (char *)proto; + sed->yp_name = (char *)name; + sed->yp_proto = (char *)proto; #endif setservent_r(sed->stayopen, sed); @@ -69,8 +69,8 @@ endservent_r(sed); #ifdef YP - sed->getservbyname_yp = NULL; - sed->getservbyproto_yp = NULL; + sed->yp_name = NULL; + sed->yp_proto = NULL; #endif return (error); ==== //depot/projects/wifi/lib/libc/net/getservbyport.c#3 (text+ko) ==== @@ -35,7 +35,7 @@ static char sccsid[] = "@(#)getservbyport.c 8.1 (Berkeley) 6/4/93"; #endif /* LIBC_SCCS and not lint */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/lib/libc/net/getservbyport.c,v 1.6 2005/04/17 14:42:52 ume Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/net/getservbyport.c,v 1.7 2005/04/18 18:34:58 ume Exp $"); #include <netdb.h> #include <string.h> @@ -48,8 +48,8 @@ int error; #ifdef YP - sed->getservbyport_yp = port; - sed->getservbyproto_yp = (char *)proto; + sed->yp_port = port; + sed->yp_proto = (char *)proto; #endif setservent_r(sed->stayopen, sed); @@ -63,8 +63,8 @@ endservent_r(sed); #ifdef YP - sed->getservbyport_yp = 0; - sed->getservbyproto_yp = NULL; + sed->yp_port = 0; + sed->yp_proto = NULL; #endif return (error); ==== //depot/projects/wifi/lib/libc/net/getservent.c#4 (text+ko) ==== @@ -35,7 +35,7 @@ static char sccsid[] = "@(#)getservent.c 8.1 (Berkeley) 6/4/93"; #endif /* LIBC_SCCS and not lint */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/lib/libc/net/getservent.c,v 1.17 2005/04/18 03:45:23 delphij Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/net/getservent.c,v 1.18 2005/04/18 18:34:58 ume Exp $"); #include <sys/types.h> #include <sys/socket.h> @@ -67,8 +67,8 @@ sed->fp = NULL; } #ifdef YP - free(sed->key); - sed->key = NULL; + free(sed->yp_key); + sed->yp_key = NULL; #endif } @@ -119,11 +119,11 @@ char buf[YPMAXRECORD + 2]; int rv; - snprintf(buf, sizeof(buf), "%d/%s", - ntohs(sed->getservbyport_yp), sed->getservbyproto_yp); + snprintf(buf, sizeof(buf), "%d/%s", ntohs(sed->yp_port), + sed->yp_proto); - sed->getservbyport_yp = 0; - sed->getservbyproto_yp = NULL; + sed->yp_port = 0; + sed->yp_proto = NULL; if (!sed->yp_domain) { if (yp_get_default_domain(&sed->yp_domain)) @@ -168,11 +168,10 @@ return (0); } - snprintf(buf, sizeof(buf), "%s/%s", sed->getservbyname_yp, - sed->getservbyproto_yp); + snprintf(buf, sizeof(buf), "%s/%s", sed->yp_name, sed->yp_proto); - sed->getservbyname_yp = 0; - sed->getservbyproto_yp = NULL; + sed->yp_name = 0; + sed->yp_proto = NULL; if (yp_match(sed->yp_domain, "services.byname", buf, strlen(buf), &result, &resultlen)) { @@ -198,22 +197,23 @@ return (0); } - if (!sed->stepping_yp) { - free(sed->key); - rv = yp_first(sed->yp_domain, "services.byname", &sed->key, - &sed->keylen, &result, &resultlen); + if (!sed->yp_stepping) { + free(sed->yp_key); + rv = yp_first(sed->yp_domain, "services.byname", &sed->yp_key, + &sed->yp_keylen, &result, &resultlen); if (rv) { - sed->stepping_yp = 0; + sed->yp_stepping = 0; return(0); } - sed->stepping_yp = 1; + sed->yp_stepping = 1; } else { - lastkey = sed->key; - rv = yp_next(sed->yp_domain, "services.byname", sed->key, - sed->keylen, &sed->key, &sed->keylen, &result, &resultlen); + lastkey = sed->yp_key; + rv = yp_next(sed->yp_domain, "services.byname", sed->yp_key, + sed->yp_keylen, &sed->yp_key, &sed->yp_keylen, &result, + &resultlen); free(lastkey); if (rv) { - sed->stepping_yp = 0; + sed->yp_stepping = 0; return (0); } } @@ -243,7 +243,7 @@ servent_data_clear(sed); sed->stayopen = 0; #ifdef YP - sed->stepping_yp = 0; + sed->yp_stepping = 0; sed->yp_domain = NULL; #endif } @@ -256,7 +256,7 @@ long l; #ifdef YP - if (sed->stepping_yp && _getservent_yp(sed)) { + if (sed->yp_stepping && _getservent_yp(sed)) { p = sed->line; goto unpack; } @@ -269,11 +269,11 @@ return (-1); #ifdef YP if (*p == '+' && _yp_check(NULL)) { - if (sed->getservbyname_yp != NULL) { + if (sed->yp_name != NULL) { if (!_getservbyname_yp(sed)) goto tryagain; } - else if (sed->getservbyport_yp != 0) { + else if (sed->yp_port != 0) { if (!_getservbyport_yp(sed)) goto tryagain; } ==== //depot/projects/wifi/lib/libc/net/name6.c#4 (text+ko) ==== @@ -88,7 +88,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/lib/libc/net/name6.c,v 1.44 2005/04/09 14:20:18 ume Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/net/name6.c,v 1.45 2005/04/19 12:28:17 ume Exp $"); #include "namespace.h" #if defined(YP) || defined(ICMPNL) @@ -453,35 +453,6 @@ free(ptr); } -#if 0 - -/* XXX: should be deprecated */ -struct hostent * -getnodebyname(const char *name, int af, int flags) -{ - return getipnodebyname(name, af, flags, &h_errno); -} - -#ifdef __warn_references -__warn_references(getnodebyname, - "warning: getnodebyname() deprecated, " - "should use getaddrinfo() or getipnodebyname()"); -#endif - -struct hostent * -getnodebyaddr(const void *src, size_t len, int af) -{ - return getipnodebyaddr(src, len, af, &h_errno); -} - -#ifdef __warn_references -__warn_references(getnodebyaddr, - "warning: getnodebyaddr() deprecated, " - "should use getnameinfo() or getipnodebyaddr()"); -#endif - -#endif - /* * Private utility functions */ @@ -1814,7 +1785,6 @@ u_char c, *cp; char *bp; struct hostent hbuf; - int na; #ifdef INET6 static const char hex[] = "0123456789abcdef"; #endif @@ -1861,7 +1831,6 @@ hbuf.h_name = NULL; hbuf.h_addrtype = af; hbuf.h_length = addrlen; - na = 0; buf = malloc(sizeof(*buf)); if (buf == NULL) { ==== //depot/projects/wifi/lib/libc/net/netdb_private.h#2 (text+ko) ==== @@ -22,7 +22,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libc/net/netdb_private.h,v 1.2 2005/04/17 14:42:52 ume Exp $ + * $FreeBSD: src/lib/libc/net/netdb_private.h,v 1.4 2005/04/19 14:41:13 ume Exp $ */ #ifndef _NETDB_PRIVATE_H_ @@ -30,21 +30,34 @@ #include <stdio.h> /* XXX: for BUFSIZ */ +#define PROTOENT_MAXALIASES 35 #define SERVENT_MAXALIASES 35 +struct protoent_data { + FILE *fp; + char *aliases[PROTOENT_MAXALIASES]; + int stayopen; + char line[BUFSIZ + 1]; +}; + +struct protodata { + struct protoent proto; + struct protoent_data data; +}; + struct servent_data { FILE *fp; char *aliases[SERVENT_MAXALIASES]; int stayopen; char line[BUFSIZ + 1]; #ifdef YP - int stepping_yp; - char *getservbyname_yp; - char *getservbyproto_yp; - int getservbyport_yp; + int yp_stepping; + char *yp_name; + char *yp_proto; + int yp_port; char *yp_domain; - char *key; - int keylen; + char *yp_key; + int yp_keylen; #endif }; @@ -53,19 +66,30 @@ struct servent_data data; }; +#define endprotoent_r __endprotoent_r #define endservent_r __endservent_r +#define getprotobyname_r __getprotobyname_r +#define getprotobynumber_r __getprotobynumber_r +#define getprotoent_r __getprotoent_r #define getservbyname_r __getservbyname_r #define getservbyport_r __getservbyport_r #define getservent_r __getservent_r +#define setprotoent_r __setprotoent_r #define setservent_r __setservent_r +struct protodata *__protodata_init(void); struct servdata *__servdata_init(void); +void endprotoent_r(struct protoent_data *); void endservent_r(struct servent_data *); +int getprotobyname_r(const char *, struct protoent *, struct protoent_data *); +int getprotobynumber_r(int, struct protoent *, struct protoent_data *); +int getprotoent_r(struct protoent *, struct protoent_data *); int getservbyname_r(const char *, const char *, struct servent *, struct servent_data *); int getservbyport_r(int, const char *, struct servent *, struct servent_data *); int getservent_r(struct servent *, struct servent_data *); +void setprotoent_r(int, struct protoent_data *); void setservent_r(int, struct servent_data *); #endif /* _NETDB_PRIVATE_H_ */ ==== //depot/projects/wifi/release/doc/en_US.ISO8859-1/errata/article.sgml#2 (text+ko) ==== @@ -37,7 +37,7 @@ The &os; Project </corpauthor> - <pubdate>$FreeBSD: src/release/doc/en_US.ISO8859-1/errata/article.sgml,v 1.72 2004/09/05 14:53:33 hrs Exp $</pubdate> + <pubdate>$FreeBSD: src/release/doc/en_US.ISO8859-1/errata/article.sgml,v 1.73 2005/04/19 09:42:25 hrs Exp $</pubdate> <copyright> <year>2000</year> @@ -45,6 +45,7 @@ <year>2002</year> <year>2003</year> <year>2004</year> + <year>2005</year> <holder role="mailto:doc@FreeBSD.org">The &os; Documentation Project</holder> </copyright> ==== //depot/projects/wifi/release/doc/en_US.ISO8859-1/hardware/common/artheader.sgml#3 (text+ko) ==== @@ -1,9 +1,9 @@ -<!-- $FreeBSD: src/release/doc/en_US.ISO8859-1/hardware/common/artheader.sgml,v 1.6 2005/03/24 12:19:46 den Exp $ --> +<!-- $FreeBSD: src/release/doc/en_US.ISO8859-1/hardware/common/artheader.sgml,v 1.7 2005/04/19 09:43:52 hrs Exp $ --> <articleinfo> <title>&os;/&arch; &release.current; Hardware Notes</title> - <corpauthor>The FreeBSD Documentation Project</corpauthor> + <corpauthor>The &os; Documentation Project</corpauthor> <copyright> <year>2000</year> @@ -12,6 +12,6 @@ <year>2003</year> <year>2004</year> <year>2005</year> - <holder role="mailto:doc@FreeBSD.org">The FreeBSD Documentation Project</holder> + <holder role="mailto:doc@FreeBSD.org">The &os; Documentation Project</holder> </copyright> </articleinfo> ==== //depot/projects/wifi/release/doc/en_US.ISO8859-1/installation/common/artheader.sgml#2 (text+ko) ==== @@ -1,4 +1,4 @@ -<!-- $FreeBSD: src/release/doc/en_US.ISO8859-1/installation/common/artheader.sgml,v 1.6 2004/09/05 14:53:34 hrs Exp $ --> +<!-- $FreeBSD: src/release/doc/en_US.ISO8859-1/installation/common/artheader.sgml,v 1.7 2005/04/19 09:43:53 hrs Exp $ --> <articleinfo> <title>&os;/&arch; &release.current; Installation Instructions</title> @@ -13,6 +13,7 @@ <year>2002</year> <year>2003</year> <year>2004</year> + <year>2005</year> <holder role="mailto:doc@FreeBSD.org">The &os; Documentation Project</holder> </copyright> </articleinfo> ==== //depot/projects/wifi/release/doc/en_US.ISO8859-1/readme/article.sgml#2 (text+ko) ==== @@ -12,7 +12,7 @@ <corpauthor>The &os; Project</corpauthor> - <pubdate>$FreeBSD: src/release/doc/en_US.ISO8859-1/readme/article.sgml,v 1.36 2004/09/17 16:29:46 bmah Exp $</pubdate> + <pubdate>$FreeBSD: src/release/doc/en_US.ISO8859-1/readme/article.sgml,v 1.37 2005/04/19 09:43:53 hrs Exp $</pubdate> <copyright> <year>2000</year> @@ -20,6 +20,7 @@ <year>2002</year> <year>2003</year> <year>2004</year> + <year>2005</year> <holder role="mailto:doc@FreeBSD.org">The &os; Documentation Project</holder> </copyright> ==== //depot/projects/wifi/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml#10 (text+ko) ==== @@ -3,7 +3,7 @@ <corpauthor>The &os; Project</corpauthor> - <pubdate>$FreeBSD: src/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml,v 1.845 2005/04/18 08:29:25 den Exp $</pubdate> + <pubdate>$FreeBSD: src/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml,v 1.848 2005/04/19 18:52:52 brueffer Exp $</pubdate> <copyright> <year>2000</year> @@ -323,6 +323,14 @@ in the &man.acpi.4; driver. These can individually be disabled by setting device hints such as <varname>hint.<replaceable>ichss</replaceable>.0.disabled="1"</varname>.</para> + <para arch="amd64,i386">The &man.hwpmc.4;, hardware performance + monitoring counter driver has been added. + This driver virtualizes the hardware performance monitoring + facilities in modern CPUs and provides support for using + these facilities from user level processes. For more details, + see manual pages of &man.hwpmc.4;, associated libraries, + and associated userland utilities.</para> + <para arch="i386">Support for the OLDCARD subsystem has been removed. The NEWCARD system is now used for all PCCARD device support.</para> @@ -421,6 +429,12 @@ <para>The &man.hme.4; driver is now MPSAFE. &merged;</para> + <para>The &man.ipw.4; (for Intel PRO/Wireless 2100), + &man.iwi.4; (for Intel PRO/Wireless 2200BG/2225BG/2915ABG), + &man.ral.4; (for Ralink Technology RT2500), + and &man.ural.4; (for Ralink Technology RT2500USB) >>> TRUNCATED FOR MAIL (1000 lines) <<<
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200504201602.j3KG2uWK022289>