Date: Sun, 1 Sep 2002 17:24:12 -0700 (PDT) From: Jonathan Mini <mini@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 16929 for review Message-ID: <200209020024.g820OClW071625@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://people.freebsd.org/~peter/p4db/chv.cgi?CH=16929 Change 16929 by mini@freefall on 2002/09/01 17:23:13 IFC @16924 Affected files ... .. //depot/projects/kse/include/stddef.h#3 integrate .. //depot/projects/kse/include/stdlib.h#4 integrate .. //depot/projects/kse/lib/libc/gen/fmtmsg.c#2 integrate .. //depot/projects/kse/lib/libc/locale/Makefile.inc#4 integrate .. //depot/projects/kse/lib/libc/locale/ansi.c#2 delete .. //depot/projects/kse/lib/libc/locale/collate.c#4 integrate .. //depot/projects/kse/lib/libc/locale/mblen.c#1 branch .. //depot/projects/kse/lib/libc/locale/mbstowcs.c#1 branch .. //depot/projects/kse/lib/libc/locale/mbtowc.c#1 branch .. //depot/projects/kse/lib/libc/locale/multibyte.3#3 integrate .. //depot/projects/kse/lib/libc/locale/wcstombs.c#1 branch .. //depot/projects/kse/lib/libc/locale/wctomb.c#1 branch .. //depot/projects/kse/lib/libc/string/bcmp.3#2 integrate .. //depot/projects/kse/lib/libc/string/bcmp.c#2 integrate .. //depot/projects/kse/lib/libc/string/bcopy.3#2 integrate .. //depot/projects/kse/lib/libc/string/bcopy.c#2 integrate .. //depot/projects/kse/lib/libc/string/bzero.3#2 integrate .. //depot/projects/kse/lib/libc/string/memset.c#2 integrate .. //depot/projects/kse/lib/libc/string/swab.3#2 integrate .. //depot/projects/kse/sys/alpha/alpha/dump_machdep.c#2 integrate .. //depot/projects/kse/sys/alpha/alpha/elf_machdep.c#5 integrate .. //depot/projects/kse/sys/alpha/alpha/machdep.c#41 integrate .. //depot/projects/kse/sys/alpha/linux/linux_sysvec.c#8 integrate .. //depot/projects/kse/sys/alpha/osf1/osf1_sysvec.c#4 integrate .. //depot/projects/kse/sys/boot/ficl/prefix.c#3 integrate .. //depot/projects/kse/sys/boot/ficl/words.c#4 integrate .. //depot/projects/kse/sys/boot/i386/boot2/boot2.c#12 integrate .. //depot/projects/kse/sys/compat/linux/linux_file.c#16 integrate .. //depot/projects/kse/sys/compat/linux/linux_misc.c#19 integrate .. //depot/projects/kse/sys/compat/linux/linux_signal.c#7 integrate .. //depot/projects/kse/sys/compat/linux/linux_stats.c#10 integrate .. //depot/projects/kse/sys/compat/linux/linux_sysctl.c#4 integrate .. //depot/projects/kse/sys/compat/linux/linux_uid16.c#8 integrate .. //depot/projects/kse/sys/compat/linux/linux_util.c#6 integrate .. //depot/projects/kse/sys/compat/linux/linux_util.h#8 integrate .. //depot/projects/kse/sys/compat/pecoff/imgact_pecoff.c#14 integrate .. //depot/projects/kse/sys/compat/svr4/svr4_misc.c#18 integrate .. //depot/projects/kse/sys/compat/svr4/svr4_sysvec.c#7 integrate .. //depot/projects/kse/sys/conf/NOTES#14 integrate .. //depot/projects/kse/sys/conf/files#47 integrate .. //depot/projects/kse/sys/conf/options#25 integrate .. //depot/projects/kse/sys/ddb/db_ps.c#23 integrate .. //depot/projects/kse/sys/dev/aic7xxx/ahc_eisa.c#4 integrate .. //depot/projects/kse/sys/dev/aic7xxx/ahc_pci.c#4 integrate .. //depot/projects/kse/sys/dev/aic7xxx/aic7770.c#3 integrate .. //depot/projects/kse/sys/dev/aic7xxx/aic79xx.c#2 integrate .. //depot/projects/kse/sys/dev/aic7xxx/aic79xx.h#2 integrate .. //depot/projects/kse/sys/dev/aic7xxx/aic79xx.reg#2 integrate .. //depot/projects/kse/sys/dev/aic7xxx/aic79xx.seq#2 integrate .. //depot/projects/kse/sys/dev/aic7xxx/aic79xx_inline.h#2 integrate .. //depot/projects/kse/sys/dev/aic7xxx/aic79xx_osm.c#2 integrate .. //depot/projects/kse/sys/dev/aic7xxx/aic79xx_osm.h#3 integrate .. //depot/projects/kse/sys/dev/aic7xxx/aic79xx_pci.c#2 integrate .. //depot/projects/kse/sys/dev/aic7xxx/aic7xxx.c#6 integrate .. //depot/projects/kse/sys/dev/aic7xxx/aic7xxx.h#3 integrate .. //depot/projects/kse/sys/dev/aic7xxx/aic7xxx.reg#3 integrate .. //depot/projects/kse/sys/dev/aic7xxx/aic7xxx.seq#4 integrate .. //depot/projects/kse/sys/dev/aic7xxx/aic7xxx_93cx6.c#3 integrate .. //depot/projects/kse/sys/dev/aic7xxx/aic7xxx_93cx6.h#3 integrate .. //depot/projects/kse/sys/dev/aic7xxx/aic7xxx_inline.h#3 integrate .. //depot/projects/kse/sys/dev/aic7xxx/aic7xxx_osm.c#3 integrate .. //depot/projects/kse/sys/dev/aic7xxx/aic7xxx_osm.h#4 integrate .. //depot/projects/kse/sys/dev/aic7xxx/aic7xxx_pci.c#4 integrate .. //depot/projects/kse/sys/dev/aic7xxx/aicasm/Makefile#5 integrate .. //depot/projects/kse/sys/dev/aic7xxx/aicasm/aicasm.c#4 integrate .. //depot/projects/kse/sys/dev/aic7xxx/aicasm/aicasm.h#4 integrate .. //depot/projects/kse/sys/dev/aic7xxx/aicasm/aicasm_gram.y#5 integrate .. //depot/projects/kse/sys/dev/aic7xxx/aicasm/aicasm_insformat.h#4 integrate .. //depot/projects/kse/sys/dev/aic7xxx/aicasm/aicasm_macro_gram.y#2 integrate .. //depot/projects/kse/sys/dev/aic7xxx/aicasm/aicasm_macro_scan.l#2 integrate .. //depot/projects/kse/sys/dev/aic7xxx/aicasm/aicasm_scan.l#4 integrate .. //depot/projects/kse/sys/dev/aic7xxx/aicasm/aicasm_symbol.c#4 integrate .. //depot/projects/kse/sys/dev/aic7xxx/aicasm/aicasm_symbol.h#5 integrate .. //depot/projects/kse/sys/dev/drm/drm_drv.h#4 integrate .. //depot/projects/kse/sys/dev/drm/drm_linux.h#2 delete .. //depot/projects/kse/sys/dev/drm/drm_os_freebsd.h#5 integrate .. //depot/projects/kse/sys/dev/ispfw/asm_2100.h#3 integrate .. //depot/projects/kse/sys/dev/ispfw/asm_2200.h#3 integrate .. //depot/projects/kse/sys/dev/ispfw/asm_2300.h#3 integrate .. //depot/projects/kse/sys/dev/mpt/mpt.c#4 integrate .. //depot/projects/kse/sys/dev/mpt/mpt.h#3 integrate .. //depot/projects/kse/sys/dev/mpt/mpt_freebsd.c#4 integrate .. //depot/projects/kse/sys/dev/mpt/mpt_freebsd.h#4 integrate .. //depot/projects/kse/sys/dev/pccard/pccard.c#13 integrate .. //depot/projects/kse/sys/dev/puc/puc.c#7 integrate .. //depot/projects/kse/sys/dev/puc/puc_pccard.c#1 branch .. //depot/projects/kse/sys/dev/puc/puc_pci.c#1 branch .. //depot/projects/kse/sys/dev/puc/pucdata.c#7 integrate .. //depot/projects/kse/sys/dev/puc/pucvar.h#3 integrate .. //depot/projects/kse/sys/fs/nwfs/nwfs_subr.c#5 integrate .. //depot/projects/kse/sys/i386/conf/GENERIC#23 integrate .. //depot/projects/kse/sys/i386/i386/db_interface.c#12 integrate .. //depot/projects/kse/sys/i386/i386/elf_machdep.c#4 integrate .. //depot/projects/kse/sys/i386/i386/machdep.c#56 integrate .. //depot/projects/kse/sys/i386/ibcs2/ibcs2_sysvec.c#4 integrate .. //depot/projects/kse/sys/i386/include/param.h#11 integrate .. //depot/projects/kse/sys/i386/linux/linux_machdep.c#16 integrate .. //depot/projects/kse/sys/i386/linux/linux_sysvec.c#19 integrate .. //depot/projects/kse/sys/ia64/conf/SKI#5 integrate .. //depot/projects/kse/sys/ia64/ia32/ia32_sysvec.c#2 integrate .. //depot/projects/kse/sys/ia64/ia64/elf_machdep.c#5 integrate .. //depot/projects/kse/sys/ia64/ia64/machdep.c#37 integrate .. //depot/projects/kse/sys/ia64/ia64/pmap.c#30 integrate .. //depot/projects/kse/sys/kern/imgact_aout.c#15 integrate .. //depot/projects/kse/sys/kern/init_main.c#47 integrate .. //depot/projects/kse/sys/kern/kern_exec.c#37 integrate .. //depot/projects/kse/sys/kern/kern_sig.c#63 integrate .. //depot/projects/kse/sys/kern/sys_generic.c#33 integrate .. //depot/projects/kse/sys/kern/vfs_syscalls.c#34 integrate .. //depot/projects/kse/sys/modules/Makefile#31 integrate .. //depot/projects/kse/sys/modules/aic7xxx/ahc/Makefile#2 integrate .. //depot/projects/kse/sys/modules/aic7xxx/ahd/Makefile#2 integrate .. //depot/projects/kse/sys/modules/aic7xxx/aicasm/Makefile#2 integrate .. //depot/projects/kse/sys/pc98/i386/machdep.c#32 integrate .. //depot/projects/kse/sys/powerpc/powerpc/elf_machdep.c#4 integrate .. //depot/projects/kse/sys/powerpc/powerpc/machdep.c#23 integrate .. //depot/projects/kse/sys/sparc64/sparc64/elf_machdep.c#8 integrate .. //depot/projects/kse/sys/sys/imgact.h#8 integrate .. //depot/projects/kse/sys/sys/param.h#24 integrate .. //depot/projects/kse/sys/sys/syscallsubr.h#1 branch .. //depot/projects/kse/sys/sys/sysent.h#8 integrate .. //depot/projects/kse/sys/sys/vnode.h#30 integrate .. //depot/projects/kse/sys/ufs/ufs/ufs_inode.c#10 integrate .. //depot/projects/kse/sys/vm/swap_pager.c#13 integrate Differences ... ==== //depot/projects/kse/include/stddef.h#3 (text+ko) ==== @@ -32,7 +32,7 @@ * * @(#)stddef.h 8.1 (Berkeley) 6/2/93 * - * $FreeBSD: src/include/stddef.h,v 1.8 2002/08/21 16:19:55 mike Exp $ + * $FreeBSD: src/include/stddef.h,v 1.9 2002/09/01 17:57:20 mike Exp $ */ #ifndef _STDDEF_H_ @@ -43,7 +43,7 @@ typedef __ptrdiff_t ptrdiff_t; -#if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE) +#if __BSD_VISIBLE #ifndef _RUNE_T_DECLARED typedef __rune_t rune_t; #define _RUNE_T_DECLARED ==== //depot/projects/kse/include/stdlib.h#4 (text+ko) ==== @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)stdlib.h 8.5 (Berkeley) 5/19/95 - * $FreeBSD: src/include/stdlib.h,v 1.39 2002/08/21 16:19:55 mike Exp $ + * $FreeBSD: src/include/stdlib.h,v 1.40 2002/09/01 07:08:22 tjr Exp $ */ #ifndef _STDLIB_H_ @@ -120,10 +120,10 @@ int system(const char *); int mblen(const char *, size_t); -size_t mbstowcs(wchar_t *, const char *, size_t); +size_t mbstowcs(wchar_t *__restrict , const char *__restrict, size_t); int wctomb(char *, wchar_t); -int mbtowc(wchar_t *, const char *, size_t); -size_t wcstombs(char *, const wchar_t *, size_t); +int mbtowc(wchar_t *__restrict, const char *__restrict, size_t); +size_t wcstombs(char *__restrict, const wchar_t *__restrict, size_t); #if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE) extern const char *_malloc_options; ==== //depot/projects/kse/lib/libc/gen/fmtmsg.c#2 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/lib/libc/gen/fmtmsg.c,v 1.2 2002/08/05 19:36:09 mike Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/gen/fmtmsg.c,v 1.3 2002/09/01 01:49:27 mike Exp $"); #include <fmtmsg.h> #include <stdio.h> @@ -72,8 +72,10 @@ } output = printfmt(msgverb, class, label, sev, text, action, tag); - if (output == NULL) + if (output == NULL) { + free(msgverb); return (MM_NOTOK); + } if (*output != '\0') fprintf(stderr, "%s", output); free(msgverb); ==== //depot/projects/kse/lib/libc/locale/Makefile.inc#4 (text+ko) ==== @@ -1,17 +1,18 @@ # from @(#)Makefile.inc 8.1 (Berkeley) 6/4/93 -# $FreeBSD: src/lib/libc/locale/Makefile.inc,v 1.34 2002/08/20 03:42:21 tjr Exp $ +# $FreeBSD: src/lib/libc/locale/Makefile.inc,v 1.35 2002/08/31 11:26:55 tjr Exp $ # locale sources .PATH: ${.CURDIR}/../libc/${MACHINE_ARCH}/locale ${.CURDIR}/../libc/locale -SRCS+= ansi.c big5.c btowc.c collate.c collcmp.c euc.c fix_grouping.c frune.c \ +SRCS+= big5.c btowc.c collate.c collcmp.c euc.c fix_grouping.c frune.c \ isctype.c iswctype.c \ - ldpart.c lmessages.c lmonetary.c lnumeric.c localeconv.c mbrlen.c \ - mbrtowc.c mbrune.c mbsinit.c mbsrtowcs.c \ + ldpart.c lmessages.c lmonetary.c lnumeric.c localeconv.c mblen.c \ + mbrlen.c \ + mbrtowc.c mbrune.c mbsinit.c mbsrtowcs.c mbtowc.c mbstowcs.c \ mskanji.c nl_langinfo.c nomacros.c none.c rune.c \ runetype.c setinvalidrune.c setlocale.c setrunelocale.c table.c \ - tolower.c toupper.c utf2.c wcrtomb.c wcsrtombs.c \ - wctob.c wctrans.c wctype.c wcwidth.c + tolower.c toupper.c utf2.c wcrtomb.c wcsrtombs.c wcstombs.c \ + wctob.c wctomb.c wctrans.c wctype.c wcwidth.c .if ${LIB} == "c" MAN+= btowc.3 \ ==== //depot/projects/kse/lib/libc/locale/collate.c#4 (text+ko) ==== @@ -26,9 +26,10 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/lib/libc/locale/collate.c,v 1.29 2002/08/30 20:26:02 ache Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/locale/collate.c,v 1.31 2002/08/31 01:05:39 ache Exp $"); #include "namespace.h" +#include <arpa/inet.h> #include <rune.h> #include <stdio.h> #include <stdlib.h> @@ -58,6 +59,7 @@ { FILE *fp; int i, saverr, chains; + uint32_t u32; char strbuf[STR_LEN], buf[PATH_MAX]; void *TMP_substitute_table, *TMP_char_pri_table, *TMP_chain_pri_table; static char collate_encoding[ENCODING_LEN + 1]; @@ -106,13 +108,13 @@ return (_LDP_ERROR); } if (chains) { - if (fread(strbuf, sizeof(strbuf), 1, fp) != 1) { + if (fread(&u32, sizeof(u32), 1, fp) != 1) { saverr = errno; (void)fclose(fp); errno = saverr; return (_LDP_ERROR); } - if ((chains = atoi(strbuf)) < 1) { + if ((chains = (int)ntohl(u32)) < 1) { (void)fclose(fp); errno = EFTYPE; return (_LDP_ERROR); @@ -161,7 +163,7 @@ FREAD(TMP_substitute_table, sizeof(__collate_substitute_table), 1, fp); FREAD(TMP_char_pri_table, sizeof(__collate_char_pri_table), 1, fp); FREAD(TMP_chain_pri_table, - sizeof(*__collate_chain_pri_table) * chains, 1, fp); + sizeof(*__collate_chain_pri_table), chains, fp); (void)fclose(fp); (void)strcpy(collate_encoding, encoding); @@ -280,8 +282,8 @@ printf("\t'%c' --> \"%s\"\n", i, __collate_substitute_table[i]); printf("Chain priority table:\n"); - for (p2 = __collate_chain_pri_table; p2->str[0]; p2++) - printf("\t\"%s\" : %d %d\n\n", p2->str, p2->prim, p2->sec); + for (p2 = __collate_chain_pri_table; p2->str[0] != '\0'; p2++) + printf("\t\"%s\" : %d %d\n", p2->str, p2->prim, p2->sec); printf("Char priority table:\n"); for (i = 0; i < UCHAR_MAX + 1; i++) printf("\t'%c' : %d %d\n", i, __collate_char_pri_table[i].prim, ==== //depot/projects/kse/lib/libc/locale/multibyte.3#3 (text+ko) ==== @@ -33,7 +33,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)multibyte.3 8.1 (Berkeley) 6/4/93 -.\" $FreeBSD: src/lib/libc/locale/multibyte.3,v 1.13 2002/08/04 11:02:21 tjr Exp $ +.\" $FreeBSD: src/lib/libc/locale/multibyte.3,v 1.15 2002/09/01 07:21:58 tjr Exp $ .\" .Dd June 4, 1993 .Dt MULTIBYTE 3 @@ -52,11 +52,11 @@ .Ft int .Fn mblen "const char *mbchar" "size_t nbytes" .Ft size_t -.Fn mbstowcs "wchar_t *wcstring" "const char *mbstring" "size_t nwchars" +.Fn mbstowcs "wchar_t *restrict wcstring" "const char *restrict mbstring" "size_t nwchars" .Ft int -.Fn mbtowc "wchar_t *wcharp" "const char *mbchar" "size_t nbytes" +.Fn mbtowc "wchar_t *restrict wcharp" "const char *restrict mbchar" "size_t nbytes" .Ft size_t -.Fn wcstombs "char *mbstring" "const wchar_t *wcstring" "size_t nbytes" +.Fn wcstombs "char *restrict mbstring" "const wchar_t *restrict wcstring" "size_t nbytes" .Ft int .Fn wctomb "char *mbchar" "wchar_t wchar" .Sh DESCRIPTION @@ -78,7 +78,7 @@ .Va char Ns s . Individual basic elements may map into one or more (up to -.Dv MB_CHAR_MAX ) +.Dv MB_LEN_MAX ) bytes in a multibyte character. .Pp The current locale ==== //depot/projects/kse/lib/libc/string/bcmp.3#2 (text+ko) ==== @@ -32,7 +32,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)bcmp.3 8.1 (Berkeley) 6/4/93 -.\" $FreeBSD: src/lib/libc/string/bcmp.3,v 1.8 2001/10/01 16:09:00 ru Exp $ +.\" $FreeBSD: src/lib/libc/string/bcmp.3,v 1.9 2002/08/30 21:07:40 robert Exp $ .\" .Dd June 4, 1993 .Dt BCMP 3 @@ -43,7 +43,7 @@ .Sh LIBRARY .Lb libc .Sh SYNOPSIS -.In string.h +.In strings.h .Ft int .Fn bcmp "const void *b1" "const void *b2" "size_t len" .Sh DESCRIPTION @@ -72,3 +72,10 @@ .Fn bcmp function first appeared in .Bx 4.2 . +Its prototype existed previously in +.Aq Pa string.h +before it was moved to +.Aq Pa strings.h +for +.St -p1003.1-2001 +compliance. ==== //depot/projects/kse/lib/libc/string/bcmp.c#2 (text+ko) ==== @@ -35,27 +35,25 @@ static char sccsid[] = "@(#)bcmp.c 8.1 (Berkeley) 6/4/93"; #endif /* LIBC_SCCS and not lint */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/lib/libc/string/bcmp.c,v 1.4 2002/03/21 18:44:54 obrien Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/string/bcmp.c,v 1.5 2002/08/30 21:07:40 robert Exp $"); -#include <string.h> +#include <strings.h> /* * bcmp -- vax cmpc3 instruction */ int -bcmp(b1, b2, length) - const void *b1, *b2; - size_t length; +bcmp(const void *b1, const void *b2, size_t length) { char *p1, *p2; if (length == 0) - return(0); + return (0); p1 = (char *)b1; p2 = (char *)b2; do if (*p1++ != *p2++) break; while (--length); - return(length); + return (length); } ==== //depot/projects/kse/lib/libc/string/bcopy.3#2 (text+ko) ==== @@ -33,7 +33,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)bcopy.3 8.1 (Berkeley) 6/4/93 -.\" $FreeBSD: src/lib/libc/string/bcopy.3,v 1.7 2001/10/01 16:09:00 ru Exp $ +.\" $FreeBSD: src/lib/libc/string/bcopy.3,v 1.8 2002/09/01 21:53:46 robert Exp $ .\" .Dd June 4, 1993 .Dt BCOPY 3 @@ -44,7 +44,7 @@ .Sh LIBRARY .Lb libc .Sh SYNOPSIS -.In string.h +.In strings.h .Ft void .Fn bcopy "const void *src" "void *dst" "size_t len" .Sh DESCRIPTION @@ -72,3 +72,10 @@ .Fn bcopy function appeared in .Bx 4.2 . +Its prototype existed previously in +.Aq Pa string.h +before it was moved to +.Aq Pa strings.h +for +.St -p1003.1-2001 +compliance. ==== //depot/projects/kse/lib/libc/string/bcopy.c#2 (text+ko) ==== @@ -38,9 +38,7 @@ static char sccsid[] = "@(#)bcopy.c 8.1 (Berkeley) 6/4/93"; #endif /* LIBC_SCCS and not lint */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/lib/libc/string/bcopy.c,v 1.4 2002/03/21 18:44:54 obrien Exp $"); - -#include <string.h> +__FBSDID("$FreeBSD: src/lib/libc/string/bcopy.c,v 1.5 2002/09/01 21:53:46 robert Exp $"); /* * sizeof(word) MUST BE A POWER OF TWO @@ -56,21 +54,22 @@ * This is the routine that actually implements * (the portable versions of) bcopy, memcpy, and memmove. */ +#if defined(MEMCOPY) || defined(MEMMOVE) +#include <string.h> + +void * #ifdef MEMCOPY -void * -memcpy(dst0, src0, length) +memcpy #else -#ifdef MEMMOVE -void * -memmove(dst0, src0, length) +memmove +#endif +(void *dst0, const void *src0, size_t length) #else +#include <strings.h> + void -bcopy(src0, dst0, length) -#endif +bcopy(const void *src0, void *dst0, size_t length) #endif - void *dst0; - const void *src0; - size_t length; { char *dst = dst0; const char *src = src0; ==== //depot/projects/kse/lib/libc/string/bzero.3#2 (text+ko) ==== @@ -33,7 +33,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)bzero.3 8.1 (Berkeley) 6/4/93 -.\" $FreeBSD: src/lib/libc/string/bzero.3,v 1.7 2001/10/01 16:09:00 ru Exp $ +.\" $FreeBSD: src/lib/libc/string/bzero.3,v 1.8 2002/09/01 21:53:46 robert Exp $ .\" .Dd June 4, 1993 .Dt BZERO 3 @@ -44,7 +44,7 @@ .Sh LIBRARY .Lb libc .Sh SYNOPSIS -.In string.h +.In strings.h .Ft void .Fn bzero "void *b" "size_t len" .Sh DESCRIPTION @@ -69,3 +69,10 @@ function appeared in .Bx 4.3 . +Its prototype existed previously in +.Aq Pa string.h +before it was moved to +.Aq Pa strings.h +for +.St -p1003.1-2001 +compliance. ==== //depot/projects/kse/lib/libc/string/memset.c#2 (text+ko) ==== @@ -38,35 +38,33 @@ static char sccsid[] = "@(#)memset.c 8.1 (Berkeley) 6/4/93"; #endif /* LIBC_SCCS and not lint */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/lib/libc/string/memset.c,v 1.7 2002/03/21 18:44:54 obrien Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/string/memset.c,v 1.8 2002/09/01 21:53:46 robert Exp $"); #include <sys/types.h> #include <limits.h> -#include <string.h> #define wsize sizeof(u_int) #define wmask (wsize - 1) #ifdef BZERO +#include <strings.h> + #define RETURN return #define VAL 0 #define WIDEVAL 0 void -bzero(dst0, length) - void *dst0; - size_t length; +bzero(void *dst0, size_t length) #else +#include <string.h> + #define RETURN return (dst0) #define VAL c0 #define WIDEVAL c void * -memset(dst0, c0, length) - void *dst0; - int c0; - size_t length; +memset(void *dst0, int c0, size_t length) #endif { size_t t; ==== //depot/projects/kse/lib/libc/string/swab.3#2 (text+ko) ==== @@ -30,7 +30,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)swab.3 8.1 (Berkeley) 6/4/93 -.\" $FreeBSD: src/lib/libc/string/swab.3,v 1.6 2001/10/01 16:09:00 ru Exp $ +.\" $FreeBSD: src/lib/libc/string/swab.3,v 1.7 2002/08/30 21:18:39 robert Exp $ .\" .Dd June 4, 1993 .Dt SWAB 3 @@ -43,7 +43,7 @@ .Sh SYNOPSIS .In string.h .Ft void -.Fn swab "const void *src" "void *dst" "size_t len" +.Fn swab "const void * restrict src" "void * restrict dst" "size_t len" .Sh DESCRIPTION The function .Fn swab ==== //depot/projects/kse/sys/alpha/alpha/dump_machdep.c#2 (text+ko) ==== @@ -32,7 +32,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/alpha/alpha/dump_machdep.c,v 1.1 2002/05/11 21:53:46 gallatin Exp $ + * $FreeBSD: src/sys/alpha/alpha/dump_machdep.c,v 1.2 2002/08/31 03:21:59 jhb Exp $ */ #include <sys/param.h> @@ -57,7 +57,7 @@ void *va; int i, mb; - printf("Dumping %u MB\n", Maxmem / (1024*1024 / PAGE_SIZE)); + printf("Dumping %ld MB\n", Maxmem / (1024*1024 / PAGE_SIZE)); /* Fill in the kernel dump header */ strcpy(kdh.magic, KERNELDUMPMAGIC); ==== //depot/projects/kse/sys/alpha/alpha/elf_machdep.c#5 (text+ko) ==== @@ -22,12 +22,14 @@ * (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/sys/alpha/alpha/elf_machdep.c,v 1.10 2002/07/20 02:56:09 peter Exp $ + * $FreeBSD: src/sys/alpha/alpha/elf_machdep.c,v 1.11 2002/09/01 21:41:22 jake Exp $ */ #include <sys/param.h> #include <sys/kernel.h> #include <sys/systm.h> +#include <sys/exec.h> +#include <sys/imgact.h> #include <sys/malloc.h> #include <sys/proc.h> #include <sys/namei.h> @@ -38,6 +40,10 @@ #include <sys/signalvar.h> #include <sys/vnode.h> #include <sys/linker.h> + +#include <vm/vm.h> +#include <vm/vm_param.h> + #include <machine/elf.h> #include <machine/md_var.h> @@ -46,11 +52,11 @@ sysent, 0, 0, + NULL, 0, - 0, - 0, - 0, - elf64_freebsd_fixup, + NULL, + NULL, + __elfN(freebsd_fixup), sendsig, sigcode, &szsigcode, @@ -58,7 +64,15 @@ "FreeBSD ELF64", __elfN(coredump), NULL, - MINSIGSTKSZ + MINSIGSTKSZ, + PAGE_SIZE, + VM_MIN_ADDRESS, + VM_MAXUSER_ADDRESS, + USRSTACK, + PS_STRINGS, + VM_PROT_ALL, + exec_copyout_strings, + exec_setregs }; static Elf64_Brandinfo freebsd_brand_info = { ==== //depot/projects/kse/sys/alpha/alpha/machdep.c#41 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/alpha/alpha/machdep.c,v 1.182 2002/08/30 04:04:33 peter Exp $ + * $FreeBSD: src/sys/alpha/alpha/machdep.c,v 1.183 2002/08/31 03:33:30 peter Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -203,32 +203,28 @@ static int sysctl_hw_physmem(SYSCTL_HANDLER_ARGS) { - int error; - unsigned long val; + u_long val; val = alpha_ptob(physmem); - error = sysctl_handle_long(oidp, &val, 0, req); - return (error); + return (sysctl_handle_long(oidp, &val, 0, req)); } -SYSCTL_PROC(_hw, HW_PHYSMEM, physmem, CTLTYPE_ULONG|CTLFLAG_RD, +SYSCTL_PROC(_hw, HW_PHYSMEM, physmem, CTLTYPE_ULONG | CTLFLAG_RD, 0, 0, sysctl_hw_physmem, "LU", ""); static int sysctl_hw_usermem(SYSCTL_HANDLER_ARGS) { - int error; - unsigned long val; + u_long val; val = alpha_ptob(physmem - cnt.v_wire_count); - error = sysctl_handle_long(oidp, &val, 0, req); - return (error); + return (sysctl_handle_long(oidp, &val, 0, req)); } -SYSCTL_PROC(_hw, HW_USERMEM, usermem, CTLTYPE_ULONG|CTLFLAG_RD, +SYSCTL_PROC(_hw, HW_USERMEM, usermem, CTLTYPE_ULONG | CTLFLAG_RD, 0, 0, sysctl_hw_usermem, "LU", ""); -SYSCTL_INT(_hw, OID_AUTO, availpages, CTLFLAG_RD, &physmem, 0, ""); +SYSCTL_ULONG(_hw, OID_AUTO, availpages, CTLFLAG_RD, &physmem, 0, ""); /* must be 2 less so 0 0 can signal end of chunks */ #define PHYS_AVAIL_ARRAY_END ((sizeof(phys_avail) / sizeof(vm_offset_t)) - 2) ==== //depot/projects/kse/sys/alpha/linux/linux_sysvec.c#8 (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/sys/alpha/linux/linux_sysvec.c,v 1.83 2002/07/20 02:56:09 peter Exp $ + * $FreeBSD: src/sys/alpha/linux/linux_sysvec.c,v 1.84 2002/09/01 21:41:22 jake Exp $ */ /* XXX we use functions that might not exist. */ @@ -179,19 +179,27 @@ linux_sysent, 0, 0, + NULL, 0, - 0, - 0, - 0, + NULL, + NULL, elf_linux_fixup, osendsig, linux_sigcode, &linux_szsigcode, - 0, + NULL, "Linux ELF", elf64_coredump, exec_linux_imgact_try, - LINUX_MINSIGSTKSZ + LINUX_MINSIGSTKSZ, + PAGE_SIZE, + VM_MIN_ADDRESS, + VM_MAXUSER_ADDRESS, + USRSTACK, + PS_STRINGS, + VM_PROT_ALL, + exec_copyout_strings, + exec_setregs }; static Elf64_Brandinfo linux_brand = { ==== //depot/projects/kse/sys/alpha/osf1/osf1_sysvec.c#4 (text+ko) ==== @@ -28,7 +28,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/sys/alpha/osf1/osf1_sysvec.c,v 1.7 2002/06/02 20:05:41 schweikh Exp $ + * $FreeBSD: src/sys/alpha/osf1/osf1_sysvec.c,v 1.8 2002/09/01 21:41:22 jake Exp $ */ /* XXX we use functions that might not exist. */ @@ -64,21 +64,29 @@ struct sysentvec osf1_sysvec = { OSF1_SYS_MAXSYSCALL, osf1_sysent, - 0x0, 0, 0, + NULL, 0, - 0, - 0, /* trap-to-signal translation function */ + NULL, + NULL, /* trap-to-signal translation function */ osf1_freebsd_fixup, /* fixup */ osf1_sendsig, sigcode, /* use generic trampoline */ &osf1_szsigcode, /* use generic trampoline size */ - 0, /* prepsyscall */ + NULL, /* prepsyscall */ "OSF/1 ECOFF", NULL, /* we don't have an ECOFF coredump function */ NULL, - OSF1_MINSIGSTKSZ + OSF1_MINSIGSTKSZ, + PAGE_SIZE, + VM_MIN_ADDRESS, + VM_MAXUSER_ADDRESS, + USRSTACK, + PS_STRINGS, + VM_PROT_ALL, + exec_copyout_strings, + exec_setregs }; /* ==== //depot/projects/kse/sys/boot/ficl/prefix.c#3 (text+ko) ==== @@ -41,7 +41,7 @@ ** SUCH DAMAGE. */ -/* $FreeBSD: src/sys/boot/ficl/prefix.c,v 1.2 2002/04/09 17:45:11 dcs Exp $ */ +/* $FreeBSD: src/sys/boot/ficl/prefix.c,v 1.3 2002/08/31 01:04:53 scottl Exp $ */ #include <string.h> #include <ctype.h> @@ -104,7 +104,7 @@ vmSetTibIndex(pVM, si.cp + n - pVM->tib.cp ); vmExecute(pVM, pFW); - return FICL_TRUE; + return (int)FICL_TRUE; } pFW = pFW->link; } ==== //depot/projects/kse/sys/boot/ficl/words.c#4 (text+ko) ==== @@ -41,7 +41,7 @@ ** SUCH DAMAGE. */ -/* $FreeBSD: src/sys/boot/ficl/words.c,v 1.37 2002/04/09 17:45:11 dcs Exp $ */ +/* $FreeBSD: src/sys/boot/ficl/words.c,v 1.38 2002/08/31 01:04:53 scottl Exp $ */ #ifdef TESTMAIN #include <stdlib.h> @@ -732,7 +732,7 @@ int base = 10; int unsignedInteger = FALSE; - int append = FICL_TRUE; + FICL_INT append = FICL_TRUE; while (format < formatStop) { @@ -816,7 +816,7 @@ } } - if (append == FICL_TRUE) + if (append != FICL_FALSE) { if (!desiredLength) desiredLength = actualLength; @@ -1262,7 +1262,7 @@ } else { /* take branch (to else/endif/begin) */ - vmBranchRelative(pVM, *(int *)(pVM->ip)); + vmBranchRelative(pVM, (uintptr_t)*(pVM->ip)); } return; @@ -1311,7 +1311,7 @@ static void branchParen(FICL_VM *pVM) { - vmBranchRelative(pVM, *(int *)(pVM->ip)); + vmBranchRelative(pVM, (uintptr_t)*(pVM->ip)); return; } @@ -1473,7 +1473,7 @@ } vmExecute(pVM, tempFW); - return FICL_TRUE; + return (int)FICL_TRUE; } } @@ -1489,7 +1489,7 @@ { dictAppendCell(dp, LVALUEtoCELL(tempFW)); } - return FICL_TRUE; + return (int)FICL_TRUE; } } @@ -1922,7 +1922,7 @@ else { /* update index, branch to loop head */ stackSetTop(pVM->rStack, LVALUEtoCELL(index)); - vmBranchRelative(pVM, *(int *)(pVM->ip)); + vmBranchRelative(pVM, (uintptr_t)*(pVM->ip)); } return; @@ -1957,7 +1957,7 @@ else { /* update index, branch to loop head */ stackSetTop(pVM->rStack, LVALUEtoCELL(index)); - vmBranchRelative(pVM, *(int *)(pVM->ip)); + vmBranchRelative(pVM, (uintptr_t)*(pVM->ip)); } return; ==== //depot/projects/kse/sys/boot/i386/boot2/boot2.c#12 (text+ko) ==== @@ -14,7 +14,7 @@ */ /* - * $FreeBSD: src/sys/boot/i386/boot2/boot2.c,v 1.43 2002/06/21 06:18:01 mckusick Exp $ + * $FreeBSD: src/sys/boot/i386/boot2/boot2.c,v 1.44 2002/09/01 21:29:10 kan Exp $ */ #include <sys/param.h> @@ -409,7 +409,7 @@ } if (opts & 1 << RBX_PROBEKBD) { i = *(uint8_t *)PTOV(0x496) & 0x10; - printf("Keyboard: %s\n", i ? "yes" : "no"); + /* printf("Keyboard: %s\n", i ? "yes" : "no"); */ if (!i) opts |= 1 << RBX_DUAL | 1 << RBX_SERIAL; opts &= ~(1 << RBX_PROBEKBD); ==== //depot/projects/kse/sys/compat/linux/linux_file.c#16 (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/sys/compat/linux/linux_file.c,v 1.69 2002/08/17 02:36:14 rwatson Exp $ + * $FreeBSD: src/sys/compat/linux/linux_file.c,v 1.70 2002/09/01 22:30:24 iedowse Exp $ */ #include "opt_compat.h" @@ -44,6 +44,7 @@ #include <sys/mount.h> #include <sys/mutex.h> #include <sys/proc.h> +#include <sys/syscallsubr.h> #include <sys/sysproto.h> #include <sys/tty.h> #include <sys/vnode.h> @@ -60,82 +61,68 @@ int linux_creat(struct thread *td, struct linux_creat_args *args) { - struct open_args /* { - char *path; - int flags; - int mode; - } */ bsd_open_args; - caddr_t sg; + char *path; + int error; - sg = stackgap_init(); - CHECKALTCREAT(td, &sg, args->path); + LCONVPATHEXIST(td, args->path, &path); #ifdef DEBUG if (ldebug(creat)) - printf(ARGS(creat, "%s, %d"), args->path, args->mode); + printf(ARGS(creat, "%s, %d"), path, args->mode); #endif - bsd_open_args.path = args->path; - bsd_open_args.mode = args->mode; - bsd_open_args.flags = O_WRONLY | O_CREAT | O_TRUNC; - return open(td, &bsd_open_args); + error = kern_open(td, path, UIO_SYSSPACE, O_WRONLY | O_CREAT | O_TRUNC, + args->mode); + LFREEPATH(path); + return (error); } #endif /*!__alpha__*/ int linux_open(struct thread *td, struct linux_open_args *args) { - struct open_args /* { - char *path; - int flags; - int mode; - } */ bsd_open_args; struct proc *p = td->td_proc; - int error; - caddr_t sg; + char *path; + int bsd_flags, error; - sg = stackgap_init(); - if (args->flags & LINUX_O_CREAT) - CHECKALTCREAT(td, &sg, args->path); + LCONVPATHCREAT(td, args->path, &path); else - CHECKALTEXIST(td, &sg, args->path); >>> TRUNCATED FOR MAIL (1000 lines) <<< To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200209020024.g820OClW071625>