Date: Wed, 19 Dec 2007 23:02:46 GMT From: Kip Macy <kmacy@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 131267 for review Message-ID: <200712192302.lBJN2kAc069883@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=131267 Change 131267 by kmacy@kmacy_home:ethng on 2007/12/19 23:01:58 IFC Affected files ... .. //depot/projects/ethng/src/etc/rc.d/ldconfig#3 integrate .. //depot/projects/ethng/src/games/fortune/datfiles/fortunes#6 integrate .. //depot/projects/ethng/src/games/fortune/datfiles/fortunes-o.real#5 integrate .. //depot/projects/ethng/src/include/complex.h#3 integrate .. //depot/projects/ethng/src/include/pthread_np.h#3 integrate .. //depot/projects/ethng/src/lib/libc/Versions.def#2 integrate .. //depot/projects/ethng/src/lib/libfetch/Makefile#2 integrate .. //depot/projects/ethng/src/lib/libfetch/common.c#2 integrate .. //depot/projects/ethng/src/lib/libfetch/common.h#2 integrate .. //depot/projects/ethng/src/lib/libfetch/fetch.c#2 integrate .. //depot/projects/ethng/src/lib/libfetch/file.c#2 integrate .. //depot/projects/ethng/src/lib/libfetch/ftp.c#2 integrate .. //depot/projects/ethng/src/lib/libfetch/http.c#2 integrate .. //depot/projects/ethng/src/lib/libthr/pthread.map#3 integrate .. //depot/projects/ethng/src/lib/libthr/thread/thr_mutex.c#5 integrate .. //depot/projects/ethng/src/lib/libthr/thread/thr_private.h#5 integrate .. //depot/projects/ethng/src/lib/msun/Makefile#3 integrate .. //depot/projects/ethng/src/lib/msun/Symbol.map#2 integrate .. //depot/projects/ethng/src/lib/msun/man/csqrt.3#1 branch .. //depot/projects/ethng/src/lib/msun/man/sqrt.3#2 integrate .. //depot/projects/ethng/src/lib/msun/src/s_csqrt.c#1 branch .. //depot/projects/ethng/src/lib/msun/src/s_csqrtf.c#1 branch .. //depot/projects/ethng/src/sbin/natd/natd.8#3 integrate .. //depot/projects/ethng/src/share/man/man3/tgmath.3#2 integrate .. //depot/projects/ethng/src/share/man/man4/Makefile#8 integrate .. //depot/projects/ethng/src/share/man/man4/hptrr.4#1 branch .. //depot/projects/ethng/src/sys/amd64/conf/GENERIC#9 integrate .. //depot/projects/ethng/src/sys/amd64/conf/MULTIQ#6 edit .. //depot/projects/ethng/src/sys/amd64/conf/NOTES#5 integrate .. //depot/projects/ethng/src/sys/conf/files.amd64#12 integrate .. //depot/projects/ethng/src/sys/conf/files.i386#10 integrate .. //depot/projects/ethng/src/sys/conf/files.powerpc#4 integrate .. //depot/projects/ethng/src/sys/conf/options#8 integrate .. //depot/projects/ethng/src/sys/conf/options.powerpc#2 integrate .. //depot/projects/ethng/src/sys/dev/ata/ata-all.h#3 integrate .. //depot/projects/ethng/src/sys/dev/ata/ata-chipset.c#9 integrate .. //depot/projects/ethng/src/sys/dev/ata/ata-dma.c#3 integrate .. //depot/projects/ethng/src/sys/dev/ata/ata-lowlevel.c#2 integrate .. //depot/projects/ethng/src/sys/dev/cxgb/cxgb_adapter.h#26 integrate .. //depot/projects/ethng/src/sys/dev/cxgb/cxgb_include.h#4 integrate .. //depot/projects/ethng/src/sys/dev/cxgb/cxgb_l2t.c#5 integrate .. //depot/projects/ethng/src/sys/dev/cxgb/cxgb_l2t.h#5 integrate .. //depot/projects/ethng/src/sys/dev/cxgb/cxgb_main.c#29 integrate .. //depot/projects/ethng/src/sys/dev/cxgb/cxgb_offload.c#8 integrate .. //depot/projects/ethng/src/sys/dev/cxgb/cxgb_offload.h#6 integrate .. //depot/projects/ethng/src/sys/dev/cxgb/cxgb_osdep.h#18 integrate .. //depot/projects/ethng/src/sys/dev/cxgb/cxgb_sge.c#37 integrate .. //depot/projects/ethng/src/sys/dev/cxgb/sys/mbufq.h#4 integrate .. //depot/projects/ethng/src/sys/dev/cxgb/sys/mvec.h#11 edit .. //depot/projects/ethng/src/sys/dev/cxgb/sys/uipc_mvec.c#17 edit .. //depot/projects/ethng/src/sys/dev/cxgb/t3cdev.h#4 edit .. //depot/projects/ethng/src/sys/dev/cxgb/ulp/toecore/cxgb_toedev.h#1 branch .. //depot/projects/ethng/src/sys/dev/cxgb/ulp/toecore/toedev.c#1 branch .. //depot/projects/ethng/src/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c#1 branch .. //depot/projects/ethng/src/sys/dev/cxgb/ulp/tom/cxgb_cpl_socket.c#1 branch .. //depot/projects/ethng/src/sys/dev/cxgb/ulp/tom/cxgb_defs.h#1 branch .. //depot/projects/ethng/src/sys/dev/cxgb/ulp/tom/cxgb_listen.c#1 branch .. //depot/projects/ethng/src/sys/dev/cxgb/ulp/tom/cxgb_t3_ddp.h#1 branch .. //depot/projects/ethng/src/sys/dev/cxgb/ulp/tom/cxgb_toepcb.h#1 branch .. //depot/projects/ethng/src/sys/dev/cxgb/ulp/tom/cxgb_tom.c#1 branch .. //depot/projects/ethng/src/sys/dev/cxgb/ulp/tom/cxgb_tom.h#1 branch .. //depot/projects/ethng/src/sys/dev/cxgb/ulp/tom/cxgb_tom_sysctl.c#1 branch .. //depot/projects/ethng/src/sys/dev/hptrr/amd64-elf.hptrr_lib.o.uu#1 branch .. //depot/projects/ethng/src/sys/dev/hptrr/array.h#1 branch .. //depot/projects/ethng/src/sys/dev/hptrr/him.h#1 branch .. //depot/projects/ethng/src/sys/dev/hptrr/himfuncs.h#1 branch .. //depot/projects/ethng/src/sys/dev/hptrr/hptintf.h#1 branch .. //depot/projects/ethng/src/sys/dev/hptrr/hptrr_config.c#1 branch .. //depot/projects/ethng/src/sys/dev/hptrr/hptrr_config.h#1 branch .. //depot/projects/ethng/src/sys/dev/hptrr/hptrr_os_bsd.c#1 branch .. //depot/projects/ethng/src/sys/dev/hptrr/hptrr_osm_bsd.c#1 branch .. //depot/projects/ethng/src/sys/dev/hptrr/i386-elf.hptrr_lib.o.uu#1 branch .. //depot/projects/ethng/src/sys/dev/hptrr/ldm.h#1 branch .. //depot/projects/ethng/src/sys/dev/hptrr/list.h#1 branch .. //depot/projects/ethng/src/sys/dev/hptrr/os_bsd.h#1 branch .. //depot/projects/ethng/src/sys/dev/hptrr/osm.h#1 branch .. //depot/projects/ethng/src/sys/dev/sound/pci/hda/hdac.c#4 integrate .. //depot/projects/ethng/src/sys/dev/sound/pci/maestro.c#2 integrate .. //depot/projects/ethng/src/sys/i386/conf/GENERIC#7 integrate .. //depot/projects/ethng/src/sys/i386/conf/NOTES#5 integrate .. //depot/projects/ethng/src/sys/i386/conf/PAE#4 integrate .. //depot/projects/ethng/src/sys/kern/Makefile#2 integrate .. //depot/projects/ethng/src/sys/kern/kern_event.c#2 integrate .. //depot/projects/ethng/src/sys/kern/kern_mbuf.c#11 integrate .. //depot/projects/ethng/src/sys/kern/kern_mutex.c#5 integrate .. //depot/projects/ethng/src/sys/kern/kern_rwlock.c#6 integrate .. //depot/projects/ethng/src/sys/kern/kern_sx.c#5 integrate .. //depot/projects/ethng/src/sys/kern/kern_thread.c#6 integrate .. //depot/projects/ethng/src/sys/kern/sched_4bsd.c#8 integrate .. //depot/projects/ethng/src/sys/kern/sched_ule.c#10 integrate .. //depot/projects/ethng/src/sys/kern/subr_lock.c#4 integrate .. //depot/projects/ethng/src/sys/kern/sys_generic.c#3 integrate .. //depot/projects/ethng/src/sys/kern/sys_pipe.c#4 integrate .. //depot/projects/ethng/src/sys/kern/uipc_sockbuf.c#3 integrate .. //depot/projects/ethng/src/sys/modules/Makefile#9 integrate .. //depot/projects/ethng/src/sys/modules/cxgb/Makefile#11 edit .. //depot/projects/ethng/src/sys/modules/cxgb/toecore/Makefile#1 branch .. //depot/projects/ethng/src/sys/modules/cxgb/tom/Makefile#1 branch .. //depot/projects/ethng/src/sys/modules/hptrr/Makefile#1 branch .. //depot/projects/ethng/src/sys/modules/netgraph/Makefile#2 edit .. //depot/projects/ethng/src/sys/net/if.h#4 integrate .. //depot/projects/ethng/src/sys/netinet/if_ether.c#11 integrate .. //depot/projects/ethng/src/sys/netinet/tcp.h#2 integrate .. //depot/projects/ethng/src/sys/netinet/toedev.h#2 integrate .. //depot/projects/ethng/src/sys/netncp/ncp_rq.c#2 integrate .. //depot/projects/ethng/src/sys/netncp/ncp_sock.c#2 integrate .. //depot/projects/ethng/src/sys/netncp/ncp_sock.h#2 integrate .. //depot/projects/ethng/src/sys/netsmb/smb_trantcp.c#2 integrate .. //depot/projects/ethng/src/sys/powerpc/aim/clock.c#1 branch .. //depot/projects/ethng/src/sys/powerpc/aim/copyinout.c#1 branch .. //depot/projects/ethng/src/sys/powerpc/aim/interrupt.c#1 branch .. //depot/projects/ethng/src/sys/powerpc/aim/locore.S#1 branch .. //depot/projects/ethng/src/sys/powerpc/aim/machdep.c#1 branch .. //depot/projects/ethng/src/sys/powerpc/aim/mmu_oea.c#1 branch .. //depot/projects/ethng/src/sys/powerpc/aim/nexus.c#1 branch .. //depot/projects/ethng/src/sys/powerpc/aim/ofw_machdep.c#1 branch .. //depot/projects/ethng/src/sys/powerpc/aim/ofwmagic.S#1 branch .. //depot/projects/ethng/src/sys/powerpc/aim/swtch.S#1 branch .. //depot/projects/ethng/src/sys/powerpc/aim/trap.c#1 branch .. //depot/projects/ethng/src/sys/powerpc/aim/trap_subr.S#1 branch .. //depot/projects/ethng/src/sys/powerpc/aim/uio_machdep.c#1 branch .. //depot/projects/ethng/src/sys/powerpc/aim/uma_machdep.c#1 branch .. //depot/projects/ethng/src/sys/powerpc/aim/vm_machdep.c#1 branch .. //depot/projects/ethng/src/sys/powerpc/conf/GENERIC#5 integrate .. //depot/projects/ethng/src/sys/powerpc/conf/NOTES#3 integrate .. //depot/projects/ethng/src/sys/powerpc/include/fpu.h#2 integrate .. //depot/projects/ethng/src/sys/powerpc/powerpc/clock.c#3 delete .. //depot/projects/ethng/src/sys/powerpc/powerpc/copyinout.c#2 delete .. //depot/projects/ethng/src/sys/powerpc/powerpc/db_memrw.c#2 delete .. //depot/projects/ethng/src/sys/powerpc/powerpc/interrupt.c#4 delete .. //depot/projects/ethng/src/sys/powerpc/powerpc/locore.S#2 delete .. //depot/projects/ethng/src/sys/powerpc/powerpc/machdep.c#4 delete .. //depot/projects/ethng/src/sys/powerpc/powerpc/mmu_oea.c#3 delete .. //depot/projects/ethng/src/sys/powerpc/powerpc/nexus.c#3 delete .. //depot/projects/ethng/src/sys/powerpc/powerpc/ofw_machdep.c#2 delete .. //depot/projects/ethng/src/sys/powerpc/powerpc/ofwmagic.S#2 delete .. //depot/projects/ethng/src/sys/powerpc/powerpc/swtch.S#3 delete .. //depot/projects/ethng/src/sys/powerpc/powerpc/trap.c#4 delete .. //depot/projects/ethng/src/sys/powerpc/powerpc/trap_subr.S#2 delete .. //depot/projects/ethng/src/sys/powerpc/powerpc/uio_machdep.c#2 delete .. //depot/projects/ethng/src/sys/powerpc/powerpc/uma_machdep.c#3 delete .. //depot/projects/ethng/src/sys/powerpc/powerpc/vm_machdep.c#4 delete .. //depot/projects/ethng/src/sys/sys/_lock.h#2 integrate .. //depot/projects/ethng/src/sys/sys/kerneldump.h#2 integrate .. //depot/projects/ethng/src/sys/sys/lock_profile.h#3 integrate .. //depot/projects/ethng/src/sys/sys/pcpu.h#4 integrate .. //depot/projects/ethng/src/sys/sys/proc.h#8 integrate .. //depot/projects/ethng/src/sys/sys/selinfo.h#2 integrate .. //depot/projects/ethng/src/sys/sys/socketvar.h#2 integrate .. //depot/projects/ethng/src/sys/sys/sx.h#2 integrate .. //depot/projects/ethng/src/sys/sys/systm.h#5 integrate .. //depot/projects/ethng/src/sys/sys/tty.h#2 integrate .. //depot/projects/ethng/src/tools/regression/lib/msun/Makefile#2 integrate .. //depot/projects/ethng/src/tools/regression/lib/msun/test-csqrt.c#1 branch .. //depot/projects/ethng/src/tools/regression/lib/msun/test-csqrt.t#1 branch .. //depot/projects/ethng/src/tools/tools/ath/athdebug/athdebug.c#3 integrate .. //depot/projects/ethng/src/tools/tools/ath/athstats/Makefile#2 integrate .. //depot/projects/ethng/src/tools/tools/ath/athstats/athstats.c#3 integrate .. //depot/projects/ethng/src/tools/tools/ath/athstats/main.c#3 integrate .. //depot/projects/ethng/src/tools/tools/ath/athstats/statfoo.c#3 integrate .. //depot/projects/ethng/src/usr.bin/vmstat/Makefile#2 integrate .. //depot/projects/ethng/src/usr.bin/vmstat/vmstat.8#2 integrate .. //depot/projects/ethng/src/usr.bin/vmstat/vmstat.c#2 integrate .. //depot/projects/ethng/src/usr.bin/xinstall/xinstall.c#2 integrate Differences ... ==== //depot/projects/ethng/src/etc/rc.d/ldconfig#3 (text+ko) ==== @@ -1,6 +1,6 @@ #!/bin/sh # -# $FreeBSD: src/etc/rc.d/ldconfig,v 1.18 2007/12/08 07:20:22 dougb Exp $ +# $FreeBSD: src/etc/rc.d/ldconfig,v 1.19 2007/12/13 00:51:01 jhb Exp $ # # PROVIDE: ldconfig @@ -49,8 +49,14 @@ fi fi done - echo '32-bit compatibility ldconfig path:' ${ldconfig32_paths} - ${ldconfig} -32 -m ${_ins} ${ldconfig32_paths} + _LDC="" + for i in ${ldconfig32_paths}; do + if [ -r "${i}" ]; then + _LDC="${_LDC} ${i}" + fi + done + echo '32-bit compatibility ldconfig path:' ${_LDC} + ${ldconfig} -32 -m ${_ins} ${_LDC} ;; esac ==== //depot/projects/ethng/src/games/fortune/datfiles/fortunes#6 (text+ko) ==== @@ -1,5 +1,5 @@ This fortune brought to you by: -$FreeBSD: src/games/fortune/datfiles/fortunes,v 1.249 2007/12/09 01:00:11 dougb Exp $ +$FreeBSD: src/games/fortune/datfiles/fortunes,v 1.250 2007/12/14 01:47:11 wes Exp $ % ======================================================================= || || @@ -56259,6 +56259,9 @@ % Where am I? Who am I? Am I? I % +Where am I, and what am I doing in this handbasket? + -- Mark A. Matthews, to Wes Peters, circa 1996 +% Where are the calculations that go with a calculated risk? % WHERE CAN THE MATTER BE ==== //depot/projects/ethng/src/games/fortune/datfiles/fortunes-o.real#5 (text+ko) ==== @@ -1,4 +1,4 @@ -%% $FreeBSD: src/games/fortune/datfiles/fortunes-o.real,v 1.28 2007/12/09 01:00:11 dougb Exp $ +%% $FreeBSD: src/games/fortune/datfiles/fortunes-o.real,v 1.29 2007/12/14 21:58:58 des Exp $ % PLAYGIRL, Inc. Philadelphia, Pa. 19369 @@ -755,7 +755,7 @@ "What is amiss, my friend?" asked the king. "My lord," gasped Lancelot, "you have given me the wrong key!" % - "Before we get married," said the young woman to her fiancee, + "Before we get married," said the young woman to her fiance, "I want to confess some affairs that I've had in the past." "But you told me all about those a few weeks ago," her young man replied. ==== //depot/projects/ethng/src/include/complex.h#3 (text+ko) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2001 The FreeBSD Project. + * Copyright (c) 2001-2007 The FreeBSD Project. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/include/complex.h,v 1.7 2007/12/12 23:43:51 das Exp $ + * $FreeBSD: src/include/complex.h,v 1.8 2007/12/15 08:38:44 das Exp $ */ #ifndef _COMPLEX_H @@ -57,6 +57,8 @@ double creal(double complex); float crealf(float complex); long double creall(long double complex); +double complex csqrt(double complex); +float complex csqrtf(float complex); __END_DECLS ==== //depot/projects/ethng/src/include/pthread_np.h#3 (text+ko) ==== @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/include/pthread_np.h,v 1.17 2007/10/29 00:31:54 imp Exp $ + * $FreeBSD: src/include/pthread_np.h,v 1.18 2007/12/14 06:25:56 davidxu Exp $ */ #ifndef _PTHREAD_NP_H_ #define _PTHREAD_NP_H_ @@ -49,6 +49,10 @@ void pthread_resume_all_np(void); int pthread_resume_np(pthread_t); void pthread_set_name_np(pthread_t, const char *); +int pthread_mutex_getspinloops_np(pthread_mutex_t *mutex, int *count); +int pthread_mutex_setspinloops_np(pthread_mutex_t *mutex, int count); +int pthread_mutex_getyieldloops_np(pthread_mutex_t *mutex, int *count); +int pthread_mutex_setyieldloops_np(pthread_mutex_t *mutex, int count); int pthread_single_np(void); void pthread_suspend_all_np(void); int pthread_suspend_np(pthread_t); ==== //depot/projects/ethng/src/lib/libc/Versions.def#2 (text) ==== @@ -1,9 +1,14 @@ -# $FreeBSD: src/lib/libc/Versions.def,v 1.3 2007/04/29 16:14:17 kan Exp $ +# $FreeBSD: src/lib/libc/Versions.def,v 1.4 2007/12/14 20:49:06 deischen Exp $ # This is our first version; it depends on no other. +# This version was first added to 7.0-current. FBSD_1.0 { }; +# This version was first added to 8.0-current. +FBSD_1.1 { +} FBSD_1.0; + # This is our private namespace. Any global interfaces that are # strictly for use only by other FreeBSD applications and libraries # are listed here. We use a separate namespace so we can write ==== //depot/projects/ethng/src/lib/libfetch/Makefile#2 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/lib/libfetch/Makefile,v 1.49 2007/05/24 20:28:14 des Exp $ +# $FreeBSD: src/lib/libfetch/Makefile,v 1.50 2007/12/14 10:26:58 des Exp $ .include <bsd.own.mk> @@ -28,7 +28,7 @@ SHLIB_MAJOR= 5 ftperr.h: ftp.errors - @echo "static struct fetcherr _ftp_errlist[] = {" > ${.TARGET} + @echo "static struct fetcherr ftp_errlist[] = {" > ${.TARGET} @cat ${.ALLSRC} \ | grep -v ^# \ | sort \ @@ -39,7 +39,7 @@ @echo "};" >> ${.TARGET} httperr.h: http.errors - @echo "static struct fetcherr _http_errlist[] = {" > ${.TARGET} + @echo "static struct fetcherr http_errlist[] = {" > ${.TARGET} @cat ${.ALLSRC} \ | grep -v ^# \ | sort \ ==== //depot/projects/ethng/src/lib/libfetch/common.c#2 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/lib/libfetch/common.c,v 1.50 2005/02/16 12:46:46 des Exp $"); +__FBSDID("$FreeBSD: src/lib/libfetch/common.c,v 1.51 2007/12/14 10:26:58 des Exp $"); #include <sys/param.h> #include <sys/socket.h> @@ -53,7 +53,7 @@ /* * Error messages for resolver errors */ -static struct fetcherr _netdb_errlist[] = { +static struct fetcherr netdb_errlist[] = { #ifdef EAI_NODATA { EAI_NODATA, FETCH_RESOLV, "Host not found" }, #endif @@ -73,7 +73,7 @@ * Map error code to string */ static struct fetcherr * -_fetch_finderr(struct fetcherr *p, int e) +fetch_finderr(struct fetcherr *p, int e) { while (p->num != -1 && p->num != e) p++; @@ -84,9 +84,9 @@ * Set error code */ void -_fetch_seterr(struct fetcherr *p, int e) +fetch_seterr(struct fetcherr *p, int e) { - p = _fetch_finderr(p, e); + p = fetch_finderr(p, e); fetchLastErrCode = p->cat; snprintf(fetchLastErrString, MAXERRSTRING, "%s", p->string); } @@ -95,7 +95,7 @@ * Set error code according to errno */ void -_fetch_syserr(void) +fetch_syserr(void) { switch (errno) { case 0: @@ -155,7 +155,7 @@ * Emit status message */ void -_fetch_info(const char *fmt, ...) +fetch_info(const char *fmt, ...) { va_list ap; @@ -172,7 +172,7 @@ * Return the default port for a scheme */ int -_fetch_default_port(const char *scheme) +fetch_default_port(const char *scheme) { struct servent *se; @@ -189,7 +189,7 @@ * Return the default proxy port for a scheme */ int -_fetch_default_proxy_port(const char *scheme) +fetch_default_proxy_port(const char *scheme) { if (strcasecmp(scheme, SCHEME_FTP) == 0) return (FTP_DEFAULT_PROXY_PORT); @@ -203,7 +203,7 @@ * Create a connection for an existing descriptor. */ conn_t * -_fetch_reopen(int sd) +fetch_reopen(int sd) { conn_t *conn; @@ -220,7 +220,7 @@ * Bump a connection's reference count. */ conn_t * -_fetch_ref(conn_t *conn) +fetch_ref(conn_t *conn) { ++conn->ref; @@ -232,7 +232,7 @@ * Bind a socket to a specific local address */ int -_fetch_bind(int sd, int af, const char *addr) +fetch_bind(int sd, int af, const char *addr) { struct addrinfo hints, *res, *res0; int err; @@ -254,7 +254,7 @@ * Establish a TCP connection to the specified port on the specified host. */ conn_t * -_fetch_connect(const char *host, int port, int af, int verbose) +fetch_connect(const char *host, int port, int af, int verbose) { conn_t *conn; char pbuf[10]; @@ -265,7 +265,7 @@ DEBUG(fprintf(stderr, "---> %s:%d\n", host, port)); if (verbose) - _fetch_info("looking up %s", host); + fetch_info("looking up %s", host); /* look up host name and set up socket address structure */ snprintf(pbuf, sizeof(pbuf), "%d", port); @@ -274,13 +274,13 @@ hints.ai_socktype = SOCK_STREAM; hints.ai_protocol = 0; if ((err = getaddrinfo(host, pbuf, &hints, &res0)) != 0) { - _netdb_seterr(err); + netdb_seterr(err); return (NULL); } bindaddr = getenv("FETCH_BIND_ADDRESS"); if (verbose) - _fetch_info("connecting to %s:%d", host, port); + fetch_info("connecting to %s:%d", host, port); /* try to connect */ for (sd = -1, res = res0; res; sd = -1, res = res->ai_next) { @@ -288,8 +288,8 @@ res->ai_protocol)) == -1) continue; if (bindaddr != NULL && *bindaddr != '\0' && - _fetch_bind(sd, res->ai_family, bindaddr) != 0) { - _fetch_info("failed to bind to '%s'", bindaddr); + fetch_bind(sd, res->ai_family, bindaddr) != 0) { + fetch_info("failed to bind to '%s'", bindaddr); close(sd); continue; } @@ -299,12 +299,12 @@ } freeaddrinfo(res0); if (sd == -1) { - _fetch_syserr(); + fetch_syserr(); return (NULL); } - if ((conn = _fetch_reopen(sd)) == NULL) { - _fetch_syserr(); + if ((conn = fetch_reopen(sd)) == NULL) { + fetch_syserr(); close(sd); } return (conn); @@ -315,7 +315,7 @@ * Enable SSL on a connection. */ int -_fetch_ssl(conn_t *conn, int verbose) +fetch_ssl(conn_t *conn, int verbose) { #ifdef WITH_SSL @@ -373,7 +373,7 @@ * Read a character from a connection w/ timeout */ ssize_t -_fetch_read(conn_t *conn, char *buf, size_t len) +fetch_read(conn_t *conn, char *buf, size_t len) { struct timeval now, timeout, wait; fd_set readfds; @@ -399,7 +399,7 @@ } if (wait.tv_sec < 0) { errno = ETIMEDOUT; - _fetch_syserr(); + fetch_syserr(); return (-1); } errno = 0; @@ -407,7 +407,7 @@ if (r == -1) { if (errno == EINTR && fetchRestartCalls) continue; - _fetch_syserr(); + fetch_syserr(); return (-1); } } @@ -438,7 +438,7 @@ #define MIN_BUF_SIZE 1024 int -_fetch_getln(conn_t *conn) +fetch_getln(conn_t *conn) { char *tmp; size_t tmpsize; @@ -457,7 +457,7 @@ conn->buflen = 0; do { - len = _fetch_read(conn, &c, 1); + len = fetch_read(conn, &c, 1); if (len == -1) return (-1); if (len == 0) @@ -485,13 +485,13 @@ * Write to a connection w/ timeout */ ssize_t -_fetch_write(conn_t *conn, const char *buf, size_t len) +fetch_write(conn_t *conn, const char *buf, size_t len) { struct iovec iov; iov.iov_base = __DECONST(char *, buf); iov.iov_len = len; - return _fetch_writev(conn, &iov, 1); + return fetch_writev(conn, &iov, 1); } /* @@ -499,7 +499,7 @@ * Note: can modify the iovec. */ ssize_t -_fetch_writev(conn_t *conn, struct iovec *iov, int iovcnt) +fetch_writev(conn_t *conn, struct iovec *iov, int iovcnt) { struct timeval now, timeout, wait; fd_set writefds; @@ -525,7 +525,7 @@ } if (wait.tv_sec < 0) { errno = ETIMEDOUT; - _fetch_syserr(); + fetch_syserr(); return (-1); } errno = 0; @@ -547,7 +547,7 @@ if (wlen == 0) { /* we consider a short write a failure */ errno = EPIPE; - _fetch_syserr(); + fetch_syserr(); return (-1); } if (wlen < 0) { @@ -574,7 +574,7 @@ * Write a line of text to a connection w/ timeout */ int -_fetch_putln(conn_t *conn, const char *str, size_t len) +fetch_putln(conn_t *conn, const char *str, size_t len) { struct iovec iov[2]; int ret; @@ -585,9 +585,9 @@ iov[1].iov_base = __DECONST(char *, ENDL); iov[1].iov_len = sizeof(ENDL); if (len == 0) - ret = _fetch_writev(conn, &iov[1], 1); + ret = fetch_writev(conn, &iov[1], 1); else - ret = _fetch_writev(conn, iov, 2); + ret = fetch_writev(conn, iov, 2); if (ret == -1) return (-1); return (0); @@ -598,7 +598,7 @@ * Close connection */ int -_fetch_close(conn_t *conn) +fetch_close(conn_t *conn) { int ret; @@ -614,7 +614,7 @@ /*** Directory-related utility functions *************************************/ int -_fetch_add_entry(struct url_ent **p, int *size, int *len, +fetch_add_entry(struct url_ent **p, int *size, int *len, const char *name, struct url_stat *us) { struct url_ent *tmp; @@ -628,7 +628,7 @@ tmp = realloc(*p, (*size * 2 + 1) * sizeof(**p)); if (tmp == NULL) { errno = ENOMEM; - _fetch_syserr(); + fetch_syserr(); return (-1); } *size = (*size * 2 + 1); @@ -649,7 +649,7 @@ /*** Authentication-related utility functions ********************************/ static const char * -_fetch_read_word(FILE *f) +fetch_read_word(FILE *f) { static char word[1024]; @@ -662,7 +662,7 @@ * Get authentication data for a URL from .netrc */ int -_fetch_netrc_auth(struct url *url) +fetch_netrc_auth(struct url *url) { char fn[PATH_MAX]; const char *word; @@ -671,7 +671,7 @@ if ((p = getenv("NETRC")) != NULL) { if (snprintf(fn, sizeof(fn), "%s", p) >= (int)sizeof(fn)) { - _fetch_info("$NETRC specifies a file name " + fetch_info("$NETRC specifies a file name " "longer than PATH_MAX"); return (-1); } @@ -689,39 +689,39 @@ if ((f = fopen(fn, "r")) == NULL) return (-1); - while ((word = _fetch_read_word(f)) != NULL) { + while ((word = fetch_read_word(f)) != NULL) { if (strcmp(word, "default") == 0) { - DEBUG(_fetch_info("Using default .netrc settings")); + DEBUG(fetch_info("Using default .netrc settings")); break; } if (strcmp(word, "machine") == 0 && - (word = _fetch_read_word(f)) != NULL && + (word = fetch_read_word(f)) != NULL && strcasecmp(word, url->host) == 0) { - DEBUG(_fetch_info("Using .netrc settings for %s", word)); + DEBUG(fetch_info("Using .netrc settings for %s", word)); break; } } if (word == NULL) goto ferr; - while ((word = _fetch_read_word(f)) != NULL) { + while ((word = fetch_read_word(f)) != NULL) { if (strcmp(word, "login") == 0) { - if ((word = _fetch_read_word(f)) == NULL) + if ((word = fetch_read_word(f)) == NULL) goto ferr; if (snprintf(url->user, sizeof(url->user), "%s", word) > (int)sizeof(url->user)) { - _fetch_info("login name in .netrc is too long"); + fetch_info("login name in .netrc is too long"); url->user[0] = '\0'; } } else if (strcmp(word, "password") == 0) { - if ((word = _fetch_read_word(f)) == NULL) + if ((word = fetch_read_word(f)) == NULL) goto ferr; if (snprintf(url->pwd, sizeof(url->pwd), "%s", word) > (int)sizeof(url->pwd)) { - _fetch_info("password in .netrc is too long"); + fetch_info("password in .netrc is too long"); url->pwd[0] = '\0'; } } else if (strcmp(word, "account") == 0) { - if ((word = _fetch_read_word(f)) == NULL) + if ((word = fetch_read_word(f)) == NULL) goto ferr; /* XXX not supported! */ } else { ==== //depot/projects/ethng/src/lib/libfetch/common.h#2 (text+ko) ==== @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/lib/libfetch/common.h,v 1.28 2004/09/21 18:35:20 des Exp $ + * $FreeBSD: src/lib/libfetch/common.h,v 1.29 2007/12/14 10:26:58 des Exp $ */ #ifndef _COMMON_H_INCLUDED @@ -68,33 +68,33 @@ const char *string; }; -/* for _fetch_writev */ +/* for fetch_writev */ struct iovec; -void _fetch_seterr(struct fetcherr *, int); -void _fetch_syserr(void); -void _fetch_info(const char *, ...); -int _fetch_default_port(const char *); -int _fetch_default_proxy_port(const char *); -int _fetch_bind(int, int, const char *); -conn_t *_fetch_connect(const char *, int, int, int); -conn_t *_fetch_reopen(int); -conn_t *_fetch_ref(conn_t *); -int _fetch_ssl(conn_t *, int); -ssize_t _fetch_read(conn_t *, char *, size_t); -int _fetch_getln(conn_t *); -ssize_t _fetch_write(conn_t *, const char *, size_t); -ssize_t _fetch_writev(conn_t *, struct iovec *, int); -int _fetch_putln(conn_t *, const char *, size_t); -int _fetch_close(conn_t *); -int _fetch_add_entry(struct url_ent **, int *, int *, +void fetch_seterr(struct fetcherr *, int); +void fetch_syserr(void); +void fetch_info(const char *, ...); +int fetch_default_port(const char *); +int fetch_default_proxy_port(const char *); +int fetch_bind(int, int, const char *); +conn_t *fetch_connect(const char *, int, int, int); +conn_t *fetch_reopen(int); +conn_t *fetch_ref(conn_t *); +int fetch_ssl(conn_t *, int); +ssize_t fetch_read(conn_t *, char *, size_t); +int fetch_getln(conn_t *); +ssize_t fetch_write(conn_t *, const char *, size_t); +ssize_t fetch_writev(conn_t *, struct iovec *, int); +int fetch_putln(conn_t *, const char *, size_t); +int fetch_close(conn_t *); +int fetch_add_entry(struct url_ent **, int *, int *, const char *, struct url_stat *); -int _fetch_netrc_auth(struct url *url); +int fetch_netrc_auth(struct url *url); -#define _ftp_seterr(n) _fetch_seterr(_ftp_errlist, n) -#define _http_seterr(n) _fetch_seterr(_http_errlist, n) -#define _netdb_seterr(n) _fetch_seterr(_netdb_errlist, n) -#define _url_seterr(n) _fetch_seterr(_url_errlist, n) +#define ftp_seterr(n) fetch_seterr(ftp_errlist, n) +#define http_seterr(n) fetch_seterr(http_errlist, n) +#define netdb_seterr(n) fetch_seterr(netdb_errlist, n) +#define url_seterr(n) fetch_seterr(url_errlist, n) #ifndef NDEBUG #define DEBUG(x) do { if (fetchDebug) { x; } } while (0) @@ -103,7 +103,7 @@ #endif /* - * I don't really like exporting _http_request() and _ftp_request(), + * I don't really like exporting http_request() and ftp_request(), * but the HTTP and FTP code occasionally needs to cross-call * eachother, and this saves me from adding a lot of special-case code * to handle those cases. @@ -111,9 +111,9 @@ * Note that _*_request() free purl, which is way ugly but saves us a * whole lot of trouble. */ -FILE *_http_request(struct url *, const char *, +FILE *http_request(struct url *, const char *, struct url_stat *, struct url *, const char *); -FILE *_ftp_request(struct url *, const char *, +FILE *ftp_request(struct url *, const char *, struct url_stat *, struct url *, const char *); /* ==== //depot/projects/ethng/src/lib/libfetch/fetch.c#2 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/lib/libfetch/fetch.c,v 1.38 2004/09/21 18:35:20 des Exp $"); +__FBSDID("$FreeBSD: src/lib/libfetch/fetch.c,v 1.39 2007/12/14 10:26:58 des Exp $"); #include <sys/param.h> #include <sys/errno.h> @@ -56,7 +56,7 @@ #define URL_MALFORMED 1 #define URL_BAD_SCHEME 2 #define URL_BAD_PORT 3 -static struct fetcherr _url_errlist[] = { +static struct fetcherr url_errlist[] = { { URL_MALFORMED, FETCH_URL, "Malformed URL" }, { URL_BAD_SCHEME, FETCH_URL, "Invalid URL scheme" }, { URL_BAD_PORT, FETCH_URL, "Invalid server port" }, @@ -89,7 +89,7 @@ return (fetchXGetHTTP(URL, us, flags)); else if (strcasecmp(URL->scheme, SCHEME_HTTPS) == 0) return (fetchXGetHTTP(URL, us, flags)); - _url_seterr(URL_BAD_SCHEME); + url_seterr(URL_BAD_SCHEME); return (NULL); } @@ -121,7 +121,7 @@ return (fetchPutHTTP(URL, flags)); else if (strcasecmp(URL->scheme, SCHEME_HTTPS) == 0) return (fetchPutHTTP(URL, flags)); - _url_seterr(URL_BAD_SCHEME); + url_seterr(URL_BAD_SCHEME); return (NULL); } @@ -147,7 +147,7 @@ return (fetchStatHTTP(URL, us, flags)); else if (strcasecmp(URL->scheme, SCHEME_HTTPS) == 0) return (fetchStatHTTP(URL, us, flags)); - _url_seterr(URL_BAD_SCHEME); + url_seterr(URL_BAD_SCHEME); return (-1); } @@ -169,7 +169,7 @@ return (fetchListHTTP(URL, flags)); else if (strcasecmp(URL->scheme, SCHEME_HTTPS) == 0) return (fetchListHTTP(URL, flags)); - _url_seterr(URL_BAD_SCHEME); + url_seterr(URL_BAD_SCHEME); return (NULL); } @@ -264,23 +264,23 @@ struct url *u; if (!scheme || (!host && !doc)) { - _url_seterr(URL_MALFORMED); + url_seterr(URL_MALFORMED); return (NULL); } if (port < 0 || port > 65535) { - _url_seterr(URL_BAD_PORT); + url_seterr(URL_BAD_PORT); return (NULL); } /* allocate struct url */ if ((u = calloc(1, sizeof(*u))) == NULL) { - _fetch_syserr(); + fetch_syserr(); return (NULL); } if ((u->doc = strdup(doc ? doc : "/")) == NULL) { - _fetch_syserr(); + fetch_syserr(); free(u); return (NULL); } @@ -311,7 +311,7 @@ /* allocate struct url */ if ((u = calloc(1, sizeof(*u))) == NULL) { - _fetch_syserr(); + fetch_syserr(); return (NULL); } @@ -373,7 +373,7 @@ u->port = u->port * 10 + (*q - '0'); else { /* invalid port */ - _url_seterr(URL_BAD_PORT); + url_seterr(URL_BAD_PORT); goto ouch; } p = q; @@ -390,7 +390,7 @@ /* percent-escape whitespace. */ if ((doc = malloc(strlen(p) * 3 + 1)) == NULL) { - _fetch_syserr(); + fetch_syserr(); goto ouch; } u->doc = doc; @@ -406,7 +406,7 @@ } *doc = '\0'; } else if ((u->doc = strdup(p)) == NULL) { - _fetch_syserr(); + fetch_syserr(); goto ouch; } ==== //depot/projects/ethng/src/lib/libfetch/file.c#2 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/lib/libfetch/file.c,v 1.17 2004/09/21 18:35:20 des Exp $"); +__FBSDID("$FreeBSD: src/lib/libfetch/file.c,v 1.18 2007/12/14 10:26:58 des Exp $"); #include <sys/param.h> #include <sys/stat.h> @@ -50,11 +50,11 @@ f = fopen(u->doc, "r"); if (f == NULL) - _fetch_syserr(); + fetch_syserr(); if (u->offset && fseeko(f, u->offset, SEEK_SET) == -1) { fclose(f); - _fetch_syserr(); + fetch_syserr(); } return (f); @@ -77,25 +77,25 @@ f = fopen(u->doc, "w+"); if (f == NULL) - _fetch_syserr(); + fetch_syserr(); if (u->offset && fseeko(f, u->offset, SEEK_SET) == -1) { fclose(f); - _fetch_syserr(); + fetch_syserr(); } return (f); } static int -_fetch_stat_file(const char *fn, struct url_stat *us) +fetch_stat_file(const char *fn, struct url_stat *us) { struct stat sb; us->size = -1; us->atime = us->mtime = 0; if (stat(fn, &sb) == -1) { - _fetch_syserr(); + fetch_syserr(); return (-1); } us->size = sb.st_size; @@ -107,7 +107,7 @@ int fetchStatFile(struct url *u, struct url_stat *us, const char *flags __unused) { - return (_fetch_stat_file(u->doc, us)); + return (fetch_stat_file(u->doc, us)); } struct url_ent * @@ -122,7 +122,7 @@ >>> TRUNCATED FOR MAIL (1000 lines) <<<
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200712192302.lBJN2kAc069883>