Date: Tue, 30 Mar 2004 10:34:39 -0800 (PST) From: Peter Wemm <peter@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 49980 for review Message-ID: <200403301834.i2UIYd83082916@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=49980 Change 49980 by peter@peter_overcee on 2004/03/30 10:34:21 IFC @49979 Affected files ... .. //depot/projects/hammer/bin/ps/ps.c#9 integrate .. //depot/projects/hammer/etc/mtree/BSD.local.dist#19 integrate .. //depot/projects/hammer/etc/mtree/BSD.usr.dist#23 integrate .. //depot/projects/hammer/lib/libc/include/nss_tls.h#2 integrate .. //depot/projects/hammer/lib/libc/locale/Makefile.inc#19 integrate .. //depot/projects/hammer/lib/libc/locale/ctype.3#4 integrate .. //depot/projects/hammer/lib/libc/locale/digittoint.3#2 integrate .. //depot/projects/hammer/lib/libc/locale/isdigit.3#3 integrate .. //depot/projects/hammer/lib/libc/locale/isideogram.3#1 branch .. //depot/projects/hammer/lib/libc/locale/isphonogram.3#1 branch .. //depot/projects/hammer/lib/libc/locale/isrune.3#1 branch .. //depot/projects/hammer/lib/libc/locale/isspecial.3#1 branch .. //depot/projects/hammer/lib/libc/locale/isxdigit.3#3 integrate .. //depot/projects/hammer/lib/libc/net/nsdispatch.c#6 integrate .. //depot/projects/hammer/lib/libc/net/nss_compat.c#3 integrate .. //depot/projects/hammer/lib/libdisk/Makefile#7 integrate .. //depot/projects/hammer/lib/libdisk/disk.c#16 integrate .. //depot/projects/hammer/lib/libdisk/libdisk.h#13 integrate .. //depot/projects/hammer/lib/libdisk/open_disk.c#3 integrate .. //depot/projects/hammer/lib/libdisk/rules.c#13 integrate .. //depot/projects/hammer/lib/libdisk/write_i386_disk.c#6 integrate .. //depot/projects/hammer/lib/libdisk/write_pc98_disk.c#6 integrate .. //depot/projects/hammer/secure/lib/libcrypto/Makefile.inc#6 integrate .. //depot/projects/hammer/share/man/man4/ng_sppp.4#1 branch .. //depot/projects/hammer/share/man/man5/rc.conf.5#23 integrate .. //depot/projects/hammer/sys/conf/NOTES#39 integrate .. //depot/projects/hammer/sys/conf/files.i386#26 integrate .. //depot/projects/hammer/sys/contrib/pf/net/pf.c#4 integrate .. //depot/projects/hammer/sys/dev/acpica/acpi.c#29 integrate .. //depot/projects/hammer/sys/dev/nge/if_nge.c#15 integrate .. //depot/projects/hammer/sys/dev/twa/twa.c#1 branch .. //depot/projects/hammer/sys/dev/twa/twa.h#1 branch .. //depot/projects/hammer/sys/dev/twa/twa_cam.c#1 branch .. //depot/projects/hammer/sys/dev/twa/twa_externs.h#1 branch .. //depot/projects/hammer/sys/dev/twa/twa_freebsd.c#1 branch .. //depot/projects/hammer/sys/dev/twa/twa_fwimg.c#1 branch .. //depot/projects/hammer/sys/dev/twa/twa_globals.c#1 branch .. //depot/projects/hammer/sys/dev/twa/twa_includes.h#1 branch .. //depot/projects/hammer/sys/dev/twa/twa_ioctl.h#1 branch .. //depot/projects/hammer/sys/dev/twa/twa_reg.h#1 branch .. //depot/projects/hammer/sys/fs/udf/udf_vfsops.c#9 integrate .. //depot/projects/hammer/sys/fs/udf/udf_vnops.c#15 integrate .. //depot/projects/hammer/sys/i386/conf/GENERIC#21 integrate .. //depot/projects/hammer/sys/kern/subr_param.c#9 integrate .. //depot/projects/hammer/sys/kern/uipc_usrreq.c#10 integrate .. //depot/projects/hammer/sys/modules/twa/Makefile#1 branch .. //depot/projects/hammer/sys/powerpc/powerpc/vm_machdep.c#15 integrate .. //depot/projects/hammer/usr.bin/pkill/pkill.c#2 integrate .. //depot/projects/hammer/usr.sbin/diskinfo/diskinfo.8#4 integrate .. //depot/projects/hammer/usr.sbin/diskinfo/diskinfo.c#2 integrate Differences ... ==== //depot/projects/hammer/bin/ps/ps.c#9 (text+ko) ==== @@ -51,7 +51,7 @@ #endif #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/bin/ps/ps.c,v 1.80 2004/03/29 03:03:28 gad Exp $"); +__FBSDID("$FreeBSD: src/bin/ps/ps.c,v 1.84 2004/03/30 04:20:33 gad Exp $"); #include <sys/param.h> #include <sys/proc.h> @@ -134,7 +134,8 @@ static void add_list(struct listinfo *, const char *); static void dynsizevars(KINFO *); static void *expand_list(struct listinfo *); -static const char *fmt(char **(*)(kvm_t *, const struct kinfo_proc *, int), +static const char * + fmt(char **(*)(kvm_t *, const struct kinfo_proc *, int), KINFO *, char *, int); static void free_list(struct listinfo *); static void init_list(struct listinfo *, addelem_rtn, int, const char *); @@ -254,7 +255,7 @@ break; case 'g': #if 0 - /* + /*- * XXX - This SUSv3 behavior is still under debate * since it conflicts with the (undocumented) * `-g' option. So we skip it for now. @@ -320,7 +321,7 @@ break; #if 0 case 'R': - /* + /*- * XXX - This un-standard option is still under * debate. This is what SUSv3 defines as * the `-U' option, and while it would be @@ -340,7 +341,7 @@ break; #if 0 case 's': - /* + /*- * XXX - This non-standard option is still under * debate. This *is* supported on Solaris, * Linux, and IRIX, but conflicts with `-s' @@ -480,7 +481,7 @@ flag = *ruidlist.uids; nselectors = 0; #if 0 - /* + /*- * XXX - KERN_PROC_SESSION causes error in kvm_getprocs? * For now, always do sid-matching in this routine. */ @@ -628,7 +629,7 @@ struct group *grp; const char *nameorID; char *endp; - intmax_t ltemp; + u_long bigtemp; if (*elem == '\0' || strlen(elem) >= MAXLOGNAME) { if (*elem == '\0') @@ -651,10 +652,10 @@ grp = NULL; nameorID = "named"; errno = 0; - ltemp = strtol(elem, &endp, 10); - if (errno == 0 && *endp == '\0' && ltemp >= 0 && ltemp <= GID_MAX) { + bigtemp = strtoul(elem, &endp, 10); + if (errno == 0 && *endp == '\0' && bigtemp <= GID_MAX) { nameorID = "name or ID matches"; - grp = getgrgid((gid_t)ltemp); + grp = getgrgid((gid_t)bigtemp); } if (grp == NULL) grp = getgrnam(elem); @@ -670,7 +671,7 @@ return (1); } -#define BSD_PID_MAX 99999 /* Copy of PID_MAX from sys/proc.h. */ +#define BSD_PID_MAX 99999 /* Copy of PID_MAX from sys/proc.h. */ static int addelem_pid(struct listinfo *inf, const char *elem) { @@ -741,7 +742,7 @@ { struct passwd *pwd; char *endp; - intmax_t ltemp; + u_long bigtemp; if (*elem == '\0' || strlen(elem) >= MAXLOGNAME) { if (*elem == '\0') @@ -755,13 +756,12 @@ pwd = getpwnam(elem); if (pwd == NULL) { errno = 0; - ltemp = strtol(elem, &endp, 10); - if (errno != 0 || *endp != '\0' || ltemp < 0 || - ltemp > UID_MAX) + bigtemp = strtoul(elem, &endp, 10); + if (errno != 0 || *endp != '\0' || bigtemp > UID_MAX) warnx("No %s named '%s'", inf->lname, elem); else { /* The string is all digits, so it might be a userID. */ - pwd = getpwuid((uid_t)ltemp); + pwd = getpwuid((uid_t)bigtemp); if (pwd == NULL) warnx("No %s name or ID matches '%s'", inf->lname, elem); @@ -814,7 +814,7 @@ */ inf->addelem(inf, elemcopy); #else - /* + /*- * This would add a simple non-standard-but-convienent * feature. * @@ -1024,20 +1024,49 @@ static int pscomp(const void *a, const void *b) { - int i; -#define VSIZE(k) ((k)->ki_p->ki_dsize + (k)->ki_p->ki_ssize + \ - (k)->ki_p->ki_tsize) + const KINFO *ka, *kb; + double cpua, cpub; + segsz_t sizea, sizeb; - if (sortby == SORTCPU) - return (getpcpu((const KINFO *)b) - getpcpu((const KINFO *)a)); - if (sortby == SORTMEM) - return (VSIZE((const KINFO *)b) - VSIZE((const KINFO *)a)); - i = (int)((const KINFO *)a)->ki_p->ki_tdev - - (int)((const KINFO *)b)->ki_p->ki_tdev; - if (i == 0) - i = ((const KINFO *)a)->ki_p->ki_pid - - ((const KINFO *)b)->ki_p->ki_pid; - return (i); + ka = a; + kb = b; + /* SORTCPU and SORTMEM are sorted in descending order. */ + if (sortby == SORTCPU) { + cpua = getpcpu(ka); + cpub = getpcpu(kb); + if (cpua < cpub) + return (1); + if (cpua > cpub) + return (-1); + } + if (sortby == SORTMEM) { + sizea = ka->ki_p->ki_tsize + ka->ki_p->ki_dsize + + ka->ki_p->ki_ssize; + sizeb = kb->ki_p->ki_tsize + kb->ki_p->ki_dsize + + kb->ki_p->ki_ssize; + if (sizea < sizeb) + return (1); + if (sizea > sizeb) + return (-1); + } + /* + * TTY's are sorted in ascending order, except that all NODEV + * processes come before all processes with a device. + */ + if (ka->ki_p->ki_tdev == NODEV && kb->ki_p->ki_tdev != NODEV) + return (-1); + if (ka->ki_p->ki_tdev != NODEV && kb->ki_p->ki_tdev == NODEV) + return (1); + if (ka->ki_p->ki_tdev < kb->ki_p->ki_tdev) + return (-1); + if (ka->ki_p->ki_tdev > kb->ki_p->ki_tdev) + return (1); + /* PID's are sorted in ascending order. */ + if (ka->ki_p->ki_pid < kb->ki_p->ki_pid) + return (-1); + if (ka->ki_p->ki_pid > kb->ki_p->ki_pid) + return (1); + return (0); } /* ==== //depot/projects/hammer/etc/mtree/BSD.local.dist#19 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/etc/mtree/BSD.local.dist,v 1.109 2004/03/29 11:07:35 tjr Exp $ +# $FreeBSD: src/etc/mtree/BSD.local.dist,v 1.110 2004/03/30 14:20:45 des Exp $ # # Please see the file src/etc/mtree/README before making changes to this file. # @@ -273,7 +273,6 @@ nls C .. - POSIX type=link link=C af_ZA.ISO8859-1 .. af_ZA.ISO8859-15 @@ -368,7 +367,6 @@ .. en_US.ISO8859-1 .. - en_US.US-ASCII type=link link=C en_US.ISO8859-15 .. en_US.UTF-8 ==== //depot/projects/hammer/etc/mtree/BSD.usr.dist#23 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/etc/mtree/BSD.usr.dist,v 1.300 2004/03/29 11:07:35 tjr Exp $ +# $FreeBSD: src/etc/mtree/BSD.usr.dist,v 1.301 2004/03/30 14:20:45 des Exp $ # # Please see the file src/etc/mtree/README before making changes to this file. # @@ -801,7 +801,6 @@ nls C .. - POSIX type=link link=C af_ZA.ISO8859-1 .. af_ZA.ISO8859-15 @@ -896,7 +895,6 @@ .. en_US.ISO8859-1 .. - en_US.US-ASCII type=link link=C en_US.ISO8859-15 .. en_US.UTF-8 ==== //depot/projects/hammer/lib/libc/include/nss_tls.h#2 (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/nss_tls.h,v 1.2 2003/04/21 15:44:25 nectar Exp $ + * $FreeBSD: src/lib/libc/include/nss_tls.h,v 1.3 2004/03/30 15:56:15 nectar Exp $ * * Macros which generate thread local storage handling code in NSS modules. */ @@ -75,6 +75,6 @@ return (rv); \ } \ /* allow the macro invocation to end with a semicolon */ \ -typedef int _##name##_bmVjdGFy +struct _clashproof_bmVjdGFy #endif /* _NSS_TLS_H_ */ ==== //depot/projects/hammer/lib/libc/locale/Makefile.inc#19 (text+ko) ==== @@ -1,5 +1,5 @@ # from @(#)Makefile.inc 8.1 (Berkeley) 6/4/93 -# $FreeBSD: src/lib/libc/locale/Makefile.inc,v 1.54 2004/03/29 21:46:52 tjr Exp $ +# $FreeBSD: src/lib/libc/locale/Makefile.inc,v 1.55 2004/03/30 07:23:54 tjr Exp $ # locale sources .PATH: ${.CURDIR}/${MACHINE_ARCH}/locale ${.CURDIR}/locale @@ -21,7 +21,8 @@ MAN+= btowc.3 \ ctype.3 digittoint.3 isalnum.3 isalpha.3 isascii.3 isblank.3 iscntrl.3 \ - isdigit.3 isgraph.3 islower.3 isprint.3 ispunct.3 isspace.3 \ + isdigit.3 isgraph.3 isideogram.3 islower.3 isphonogram.3 isprint.3 \ + ispunct.3 isrune.3 isspace.3 isspecial.3 \ isupper.3 iswalnum.3 isxdigit.3 localeconv.3 mblen.3 mbrlen.3 \ mbrtowc.3 \ mbrune.3 mbsinit.3 \ ==== //depot/projects/hammer/lib/libc/locale/ctype.3#4 (text+ko) ==== @@ -30,9 +30,9 @@ .\" SUCH DAMAGE. .\" .\" @(#)ctype.3 8.1 (Berkeley) 6/4/93 -.\" $FreeBSD: src/lib/libc/locale/ctype.3,v 1.13 2003/09/08 19:57:14 ru Exp $ +.\" $FreeBSD: src/lib/libc/locale/ctype.3,v 1.14 2004/03/30 08:11:57 tjr Exp $ .\" -.Dd June 4, 1993 +.Dd March 30, 2004 .Dt CTYPE 3 .Os .Sh NAME @@ -124,15 +124,20 @@ .Xr iscntrl 3 , .Xr isdigit 3 , .Xr isgraph 3 , +.Xr isideogram 3 , .Xr islower 3 , +.Xr isrune 3 , +.Xr isphonogram 3 , .Xr isprint 3 , .Xr ispunct 3 , .Xr isspace 3 , +.Xr isspecial 3 , .Xr isupper 3 , .Xr isxdigit 3 , .Xr toascii 3 , .Xr tolower 3 , .Xr toupper 3 , +.Xr wctype 3 , .Xr ascii 7 .Sh STANDARDS These functions, except for ==== //depot/projects/hammer/lib/libc/locale/digittoint.3#2 (text+ko) ==== @@ -30,7 +30,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)digittoint.3 8.1 (Berkeley) 6/4/93 -.\" $FreeBSD: src/lib/libc/locale/digittoint.3,v 1.2 2002/03/18 15:44:27 ru Exp $ +.\" $FreeBSD: src/lib/libc/locale/digittoint.3,v 1.3 2004/03/30 07:19:35 tjr Exp $ .\" .Dd April 6, 2001 .Dt DIGITTOINT 3 @@ -58,19 +58,6 @@ .Xr isxdigit 3 , the function will return 0. .Sh SEE ALSO -.Xr isalnum 3 , -.Xr isalpha 3 , -.Xr isascii 3 , -.Xr iscntrl 3 , +.Xr ctype 3 , .Xr isdigit 3 , -.Xr isgraph 3 , -.Xr islower 3 , -.Xr isprint 3 , -.Xr ispunct 3 , -.Xr isspace 3 , -.Xr isupper 3 , -.Xr isxdigit 3 , -.Xr stdio 3 , -.Xr tolower 3 , -.Xr toupper 3 , -.Xr ascii 7 +.Xr isxdigit 3 ==== //depot/projects/hammer/lib/libc/locale/isdigit.3#3 (text+ko) ==== @@ -34,9 +34,9 @@ .\" SUCH DAMAGE. .\" .\" @(#)isdigit.3 8.1 (Berkeley) 6/4/93 -.\" $FreeBSD: src/lib/libc/locale/isdigit.3,v 1.16 2002/10/06 10:15:38 tjr Exp $ +.\" $FreeBSD: src/lib/libc/locale/isdigit.3,v 1.17 2004/03/30 07:02:04 tjr Exp $ .\" -.Dd October 6, 2002 +.Dd March 30, 2004 .Dt ISDIGIT 3 .Os .Sh NAME @@ -53,15 +53,21 @@ .Sh DESCRIPTION The .Fn isdigit -function tests for any decimal-digit character. -For any locale, -this includes the following characters only: +function tests for a decimal digit character. +Regardless of locale, this includes the following characters only: .Pp .Bl -column \&``0''______ \&``0''______ \&``0''______ \&``0''______ \&``0''______ .It "\&``0''\t``1''\t``2''\t``3''\t``4''" .It "\&``5''\t``6''\t``7''\t``8''\t``9''" .El .Pp +The +.Fn isnumber +function behaves similarly to +.Fn isdigit , +but may recognize additional characters, depending on the current locale +setting. +.Pp For single C .Va char Ns s locales (see @@ -74,7 +80,9 @@ .Sh RETURN VALUES The .Fn isdigit -function returns zero if the character tests false and +and +.Fn isnumber +functions return zero if the character tests false and returns non-zero if the character tests true. .Sh COMPATIBILITY Although @@ -97,3 +105,8 @@ .Fn isdigit function conforms to .St -isoC . +.Sh HISTORY +The +.Fn isnumber +function appeared in +.Bx 4.4 . ==== //depot/projects/hammer/lib/libc/locale/isxdigit.3#3 (text+ko) ==== @@ -34,9 +34,9 @@ .\" SUCH DAMAGE. .\" .\" @(#)isxdigit.3 8.1 (Berkeley) 6/4/93 -.\" $FreeBSD: src/lib/libc/locale/isxdigit.3,v 1.16 2002/10/06 10:15:38 tjr Exp $ +.\" $FreeBSD: src/lib/libc/locale/isxdigit.3,v 1.17 2004/03/30 07:02:04 tjr Exp $ .\" -.Dd October 6, 2002 +.Dd March 30, 2004 .Dt ISXDIGIT 3 .Os .Sh NAME @@ -54,7 +54,7 @@ The .Fn isxdigit function tests for any hexadecimal-digit character. -For any locale, this includes the following characters only: +Regardless of locale, this includes the following characters only: .Pp .Bl -column \&``0''______ \&``0''______ \&``0''______ \&``0''______ \&``0''______ .It "\&``0''\t``1''\t``2''\t``3''\t``4''" @@ -64,6 +64,13 @@ .It "\&``e''\t``f''" .El .Pp +The +.Fn ishexnumber +function behaves similarly to +.Fn isxdigit , +but may recognize additional characters, +depennding on the current locale setting. +.Pp For single C .Va char Ns s locales (see @@ -81,18 +88,14 @@ .Sh COMPATIBILITY Although .Fn isxdigit -and -.Fn ishexnumber -accept arguments outside of the range of the +accepts arguments outside of the range of the .Vt "unsigned char" type in locales with large character sets, this is a .Bx 4.4 extension and the .Fn isxwdigit -and -.Fn iswhexnumber -functions should be used instead for maximum portability. +function should be used instead for maximum portability. .Sh SEE ALSO .Xr ctype 3 , .Xr iswxdigit 3 , @@ -103,3 +106,8 @@ .Fn isxdigit function conforms to .St -isoC . +.Sh HISTORY +The +.Fn ishexnumber +function appeared in +.Bx 4.4 . ==== //depot/projects/hammer/lib/libc/net/nsdispatch.c#6 (text+ko) ==== @@ -68,7 +68,7 @@ * */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/lib/libc/net/nsdispatch.c,v 1.10 2004/03/15 08:14:35 des Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/net/nsdispatch.c,v 1.11 2004/03/30 15:56:15 nectar Exp $"); #include "namespace.h" #include <sys/param.h> @@ -316,9 +316,11 @@ static pthread_mutex_t conf_lock = PTHREAD_MUTEX_INITIALIZER; static time_t confmod; struct stat statbuf; - int result; + int result, isthreaded; const char *path; + result = 0; + isthreaded = __isthreaded; #if defined(_NSS_DEBUG) && defined(_NSS_SHOOT_FOOT) /* NOTE WELL: THIS IS A SECURITY HOLE. This must only be built * for debugging purposes and MUST NEVER be used in production. @@ -331,16 +333,20 @@ return (0); if (statbuf.st_mtime <= confmod) return (0); - result = _pthread_mutex_trylock(&conf_lock); - if (result != 0) - return (0); - (void)_pthread_rwlock_unlock(&nss_lock); - result = _pthread_rwlock_wrlock(&nss_lock); - if (result != 0) - goto fin2; + if (isthreaded) { + result = _pthread_mutex_trylock(&conf_lock); + if (result != 0) + return (0); + (void)_pthread_rwlock_unlock(&nss_lock); + result = _pthread_rwlock_wrlock(&nss_lock); + if (result != 0) + goto fin2; + } _nsyyin = fopen(path, "r"); - if (_nsyyin == NULL) + if (_nsyyin == NULL) { + result = errno; goto fin; + } VECTOR_FREE(_nsmap, &_nsmapsize, sizeof(*_nsmap), (vector_free_elem)ns_dbt_free); VECTOR_FREE(_nsmod, &_nsmodsize, sizeof(*_nsmod), @@ -353,10 +359,14 @@ (void)atexit(nss_atexit); confmod = statbuf.st_mtime; fin: - (void)_pthread_rwlock_unlock(&nss_lock); - result = _pthread_rwlock_rdlock(&nss_lock); + if (isthreaded) { + (void)_pthread_rwlock_unlock(&nss_lock); + if (result == 0) + result = _pthread_rwlock_rdlock(&nss_lock); + } fin2: - (void)_pthread_mutex_unlock(&conf_lock); + if (isthreaded) + (void)_pthread_mutex_unlock(&conf_lock); return (result); } @@ -510,12 +520,17 @@ static void nss_atexit(void) { - (void)_pthread_rwlock_wrlock(&nss_lock); + int isthreaded; + + isthreaded = __isthreaded; + if (isthreaded) + (void)_pthread_rwlock_wrlock(&nss_lock); VECTOR_FREE(_nsmap, &_nsmapsize, sizeof(*_nsmap), (vector_free_elem)ns_dbt_free); VECTOR_FREE(_nsmod, &_nsmodsize, sizeof(*_nsmod), (vector_free_elem)ns_mod_free); - (void)_pthread_rwlock_unlock(&nss_lock); + if (isthreaded) + (void)_pthread_rwlock_unlock(&nss_lock); } @@ -568,13 +583,16 @@ const ns_src *srclist; nss_method method; void *mdata; - int serrno, i, result, srclistsize; + int isthreaded, serrno, i, result, srclistsize; + isthreaded = __isthreaded; serrno = errno; - result = _pthread_rwlock_rdlock(&nss_lock); - if (result != 0) { - result = NS_UNAVAIL; - goto fin; + if (isthreaded) { + result = _pthread_rwlock_rdlock(&nss_lock); + if (result != 0) { + result = NS_UNAVAIL; + goto fin; + } } result = nss_configure(); if (result != 0) { @@ -604,7 +622,8 @@ break; } } - (void)_pthread_rwlock_unlock(&nss_lock); + if (isthreaded) + (void)_pthread_rwlock_unlock(&nss_lock); fin: errno = serrno; return (result); ==== //depot/projects/hammer/lib/libc/net/nss_compat.c#3 (text+ko) ==== @@ -32,7 +32,7 @@ * Compatibility shims for the GNU C Library-style nsswitch interface. */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/lib/libc/net/nss_compat.c,v 1.2 2004/01/09 13:43:49 nectar Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/net/nss_compat.c,v 1.3 2004/03/30 15:56:15 nectar Exp $"); #include "namespace.h" #include <sys/param.h> @@ -41,6 +41,7 @@ #include <pthread.h> #include <pthread_np.h> #include "un-namespace.h" +#include "libc_private.h" struct group; @@ -60,7 +61,7 @@ #define SET_TERMINATOR(x, y) \ do { \ - if (_pthread_main_np()) \ + if (!__isthreaded || _pthread_main_np()) \ _term_main_##x = (y); \ else { \ (void)_pthread_once(&_term_once_##x, _term_create_##x); \ @@ -69,7 +70,7 @@ } while (0) #define CHECK_TERMINATOR(x) \ -(_pthread_main_np() ? \ +(!__isthreaded || _pthread_main_np() ? \ (_term_main_##x) : \ ((void)_pthread_once(&_term_once_##x, _term_create_##x), \ _pthread_getspecific(_term_key_##x))) ==== //depot/projects/hammer/lib/libdisk/Makefile#7 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/lib/libdisk/Makefile,v 1.40 2004/02/23 20:07:47 johan Exp $ +# $FreeBSD: src/lib/libdisk/Makefile,v 1.42 2004/03/30 06:16:41 kuriyama Exp $ .if ${MACHINE_ARCH} == "ia64" _open_disk= open_ia64_disk.c ==== //depot/projects/hammer/lib/libdisk/disk.c#16 (text+ko) ==== @@ -8,7 +8,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/lib/libdisk/disk.c,v 1.119 2003/11/02 08:39:08 marcel Exp $"); +__FBSDID("$FreeBSD: src/lib/libdisk/disk.c,v 1.120 2004/03/30 01:38:59 kuriyama Exp $"); #include <stdio.h> #include <stdlib.h> @@ -173,8 +173,8 @@ static int qstrcmp(const void* a, const void* b) { - char *str1 = *(char**)a; - char *str2 = *(char**)b; + const char *str1 = *(char* const*)a; + const char *str2 = *(char* const*)b; return strcmp(str1, str2); } ==== //depot/projects/hammer/lib/libdisk/libdisk.h#13 (text+ko) ==== @@ -6,7 +6,7 @@ * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp * ---------------------------------------------------------------------------- * -* $FreeBSD: src/lib/libdisk/libdisk.h,v 1.60 2004/03/16 17:07:06 jhb Exp $ +* $FreeBSD: src/lib/libdisk/libdisk.h,v 1.61 2004/03/30 01:39:00 kuriyama Exp $ * */ @@ -273,6 +273,7 @@ void Fill_Disklabel(struct disklabel *, const struct disk *, const struct chunk *); void Debug_Chunk(struct chunk *); +struct chunk *New_Chunk(void); void Free_Chunk(struct chunk *); struct chunk *Clone_Chunk(const struct chunk *); int Add_Chunk(struct disk *, daddr_t, daddr_t, const char *, chunk_e, int, ==== //depot/projects/hammer/lib/libdisk/open_disk.c#3 (text+ko) ==== @@ -8,7 +8,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/lib/libdisk/open_disk.c,v 1.2 2004/03/16 17:07:06 jhb Exp $"); +__FBSDID("$FreeBSD: src/lib/libdisk/open_disk.c,v 1.3 2004/03/30 01:39:00 kuriyama Exp $"); #include <stdio.h> #include <stdlib.h> @@ -95,8 +95,9 @@ d->sector_size = s; len /= s; /* media size in number of sectors. */ - if (Add_Chunk(d, 0, len, name, whole, 0, 0, "-")) + if (Add_Chunk(d, 0, len, name, whole, 0, 0, "-")) { DPRINT(("Failed to add 'whole' chunk")); + } for (;;) { a = strsep(&p, " "); @@ -191,14 +192,16 @@ o = d->chunks->size / (hd * sc); o *= (hd * sc); o -= alt * hd * sc; - if (Add_Chunk(d, 0, o, name, freebsd, 0, 0, "-")) + if (Add_Chunk(d, 0, o, name, freebsd, 0, 0, "-")) { DPRINT(("Failed to add 'freebsd' chunk")); + } } if (platform == p_alpha && !strcmp(t, "BSD") && d->chunks->part->part == NULL) { if (Add_Chunk(d, 0, d->chunks->size, name, freebsd, - 0, 0, "-")) + 0, 0, "-")) { DPRINT(("Failed to add 'freebsd' chunk")); + } } if (!strcmp(t, "BSD") && i == RAW_PART) continue; @@ -268,8 +271,9 @@ o = d->chunks->size / (hd * sc); o *= (hd * sc); o -= 2 * hd * sc; - if (Add_Chunk(d, 0, o, name, freebsd, 0, 0, "-")) + if (Add_Chunk(d, 0, o, name, freebsd, 0, 0, "-")) { DPRINT(("Failed to add 'freebsd' chunk")); + } } /* PLATFORM POLICY END --------------------------------------- */ ==== //depot/projects/hammer/lib/libdisk/rules.c#13 (text+ko) ==== @@ -8,7 +8,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/lib/libdisk/rules.c,v 1.33 2004/03/16 17:07:06 jhb Exp $"); +__FBSDID("$FreeBSD: src/lib/libdisk/rules.c,v 1.34 2004/03/30 01:39:00 kuriyama Exp $"); #include <sys/types.h> #include <sys/stdint.h> @@ -103,7 +103,7 @@ * Only one of them can have the "active" flag */ static void -Rule_000(const struct disk *d, const struct chunk *c, char *msg) +Rule_000(__unused const struct disk *d, const struct chunk *c, char *msg) { #ifdef PC98 int i = 0; @@ -180,7 +180,7 @@ * Max one 'fat' as child of 'whole' */ static void -Rule_002(const struct disk *d, const struct chunk *c, char *msg) +Rule_002(__unused const struct disk *d, const struct chunk *c, char *msg) { int i; struct chunk *c1; @@ -203,7 +203,7 @@ * Max one extended as child of 'whole' */ static void -Rule_003(const struct disk *d, const struct chunk *c, char *msg) +Rule_003(__unused const struct disk *d, const struct chunk *c, char *msg) { int i; struct chunk *c1; @@ -227,7 +227,7 @@ * Max one CHUNK_IS_ROOT child per 'freebsd' */ static void -Rule_004(const struct disk *d, const struct chunk *c, char *msg) +Rule_004(__unused const struct disk *d, const struct chunk *c, char *msg) { int i = 0, k = 0; struct chunk *c1; ==== //depot/projects/hammer/lib/libdisk/write_i386_disk.c#6 (text+ko) ==== @@ -8,7 +8,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/lib/libdisk/write_i386_disk.c,v 1.7 2003/04/04 16:35:13 phk Exp $"); +__FBSDID("$FreeBSD: src/lib/libdisk/write_i386_disk.c,v 1.8 2004/03/30 01:39:00 kuriyama Exp $"); #include <stdio.h> #include <stdlib.h> @@ -69,14 +69,14 @@ * Special install-time configuration for the i386 boot0 boot manager. */ static void -Cfg_Boot_Mgr(u_char *mbr, int edd) +Cfg_Boot_Mgr(u_char *mbrblk, int edd) { - if (mbr[0x1b0] == 0x66 && mbr[0x1b1] == 0xbb) { + if (mbrblk[0x1b0] == 0x66 && mbrblk[0x1b1] == 0xbb) { if (edd) - mbr[0x1bb] |= 0x80; /* Packet mode on */ + mbrblk[0x1bb] |= 0x80; /* Packet mode on */ else - mbr[0x1bb] &= 0x7f; /* Packet mode off */ + mbrblk[0x1bb] &= 0x7f; /* Packet mode off */ } } @@ -88,7 +88,7 @@ struct chunk *c1; int ret = 0; char device[64]; - u_char *mbr; + u_char *mbrblk; struct dos_partition *dp,work[NDOSPART]; int s[4]; int need_edd = 0; /* Need EDD (packet interface) */ @@ -101,11 +101,11 @@ return 1; memset(s, 0, sizeof s); - mbr = read_block(fd, 0, d1->sector_size); - dp = (struct dos_partition *)(mbr + DOSPARTOFF); + mbrblk = read_block(fd, 0, d1->sector_size); + dp = (struct dos_partition *)(mbrblk + DOSPARTOFF); memcpy(work, dp, sizeof work); dp = work; - free(mbr); + free(mbrblk); for (c1 = d1->chunks->part; c1; c1 = c1->next) { if (c1->type == unused) continue; @@ -178,15 +178,15 @@ if (dp[i].dp_typ == 0xa5) dp[i].dp_flag = 0x80; - mbr = read_block(fd, 0, d1->sector_size); + mbrblk = read_block(fd, 0, d1->sector_size); if (d1->bootmgr) { - memcpy(mbr, d1->bootmgr, DOSPARTOFF); - Cfg_Boot_Mgr(mbr, need_edd); + memcpy(mbrblk, d1->bootmgr, DOSPARTOFF); + Cfg_Boot_Mgr(mbrblk, need_edd); } - memcpy(mbr + DOSPARTOFF, dp, sizeof *dp * NDOSPART); - mbr[512-2] = 0x55; - mbr[512-1] = 0xaa; - write_block(fd, 0, mbr, d1->sector_size); + memcpy(mbrblk + DOSPARTOFF, dp, sizeof *dp * NDOSPART); + mbrblk[512-2] = 0x55; + mbrblk[512-1] = 0xaa; + write_block(fd, 0, mbrblk, d1->sector_size); if (d1->bootmgr && d1->bootmgr_size > d1->sector_size) for (i = 1; i * d1->sector_size <= d1->bootmgr_size; i++) write_block(fd, i, &d1->bootmgr[i * d1->sector_size], ==== //depot/projects/hammer/lib/libdisk/write_pc98_disk.c#6 (text+ko) ==== @@ -8,7 +8,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/lib/libdisk/write_pc98_disk.c,v 1.9 2003/04/04 16:35:13 phk Exp $"); +__FBSDID("$FreeBSD: src/lib/libdisk/write_pc98_disk.c,v 1.10 2004/03/30 12:22:31 nyan Exp $"); #include <stdio.h> #include <stdlib.h> @@ -64,7 +64,7 @@ struct chunk *c1; int ret = 0; char device[64]; - u_char *mbr; + u_char *mbrblk; struct pc98_partition *dp, work[NDOSPART]; int s[7]; int PC98_EntireDisk = 0; @@ -87,11 +87,11 @@ } memset(s, 0, sizeof s); - mbr = read_block(fd, 1, d1->sector_size); - dp = (struct pc98_partition *)(mbr + DOSPARTOFF); + mbrblk = read_block(fd, 1, d1->sector_size); + dp = (struct pc98_partition *)(mbrblk + DOSPARTOFF); memcpy(work, dp, sizeof work); dp = work; - free(mbr); + free(mbrblk); for (c1 = d1->chunks->part; c1; c1 = c1->next) { if (c1->type == unused) continue; @@ -151,15 +151,15 @@ if (d1->bootipl) write_block(fd, 0, d1->bootipl, d1->sector_size); - mbr = read_block(fd, 1, d1->sector_size); - memcpy(mbr + DOSPARTOFF, dp, sizeof *dp * NDOSPART); + mbrblk = read_block(fd, 1, d1->sector_size); + memcpy(mbrblk + DOSPARTOFF, dp, sizeof *dp * NDOSPART); /* XXX - for entire FreeBSD(98) */ for (c1 = d1->chunks->part; c1; c1 = c1->next) if (((c1->type == freebsd) || (c1->type == fat)) && (c1->offset == 0)) PC98_EntireDisk = 1; if (PC98_EntireDisk == 0) - write_block(fd, 1, mbr, d1->sector_size); + write_block(fd, 1, mbrblk, d1->sector_size); if (d1->bootmenu) for (i = 0; i * d1->sector_size < d1->bootmenu_size; i++) ==== //depot/projects/hammer/secure/lib/libcrypto/Makefile.inc#6 (text+ko) ==== @@ -1,10 +1,11 @@ -# $FreeBSD: src/secure/lib/libcrypto/Makefile.inc,v 1.36 2004/03/17 16:15:45 nectar Exp $ +# $FreeBSD: src/secure/lib/libcrypto/Makefile.inc,v 1.37 2004/03/30 11:30:02 dwmalone Exp $ LCRYPTO_SRC= ${.CURDIR}/../../../crypto/openssl LCRYPTO_DOC= ${.CURDIR}/../../../crypto/openssl/doc CFLAGS+= -DTERMIOS -DANSI_SOURCE CFLAGS+= -I${LCRYPTO_SRC} -I${LCRYPTO_SRC}/crypto -I${.OBJDIR} +CFLAGS+= -DOPENSSL_THREADS -pthread .if !defined(MAKE_IDEA) || ${MAKE_IDEA} != YES CFLAGS+= -DOPENSSL_NO_IDEA @@ -41,7 +42,7 @@ >>> TRUNCATED FOR MAIL (1000 lines) <<<
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200403301834.i2UIYd83082916>