Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Jun 2018 10:24:22 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        "O. Hartmann" <ohartmann@walstatt.org>
Cc:        Ian Lepore <ian@freebsd.org>, src-committers <src-committers@freebsd.org>, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r334656 - head/stand/libsa
Message-ID:  <CANCZdfpauS3WeJwjeweWv9rwk1aF%2BPFmXpamP-Z-%2BiWFE=q6%2Bg@mail.gmail.com>
In-Reply-To: <20180605181822.661e5cf0@thor.intern.walstatt.dynvpn.de>
References:  <201806051447.w55ElDIt013519@repo.freebsd.org> <20180605181822.661e5cf0@thor.intern.walstatt.dynvpn.de>

next in thread | previous in thread | raw e-mail | index | archive | help
There is no real reason for these to be different. Especially if it causes
problems...

Warner

On Tue, Jun 5, 2018, 10:18 AM O. Hartmann <ohartmann@walstatt.org> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA512
>
> Am Tue, 5 Jun 2018 14:47:13 +0000 (UTC)
> Ian Lepore <ian@FreeBSD.org> schrieb:
>
> > Author: ian
> > Date: Tue Jun  5 14:47:13 2018
> > New Revision: 334656
> > URL: https://svnweb.freebsd.org/changeset/base/334656
> >
> > Log:
> >   Add vsnprintf() to libsa.  Alpha-sort the printf prototypes in stand.=
h.
> >
> >   I'm not sure why the v*printf() functions in libsa return void instea=
d
> of
> >   int, but this maintains that convention for the new function.
> >
> > Modified:
> >   head/stand/libsa/printf.c
> >   head/stand/libsa/stand.h
> >
> > Modified: head/stand/libsa/printf.c
> >
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
> > --- head/stand/libsa/printf.c Tue Jun  5 13:53:37 2018        (r334655)
> > +++ head/stand/libsa/printf.c Tue Jun  5 14:47:13 2018        (r334656)
> > @@ -141,6 +141,20 @@ snprintf(char *buf, size_t size, const char *cfmt,
> ...
> >  }
> >
> >  void
> > +vsnprintf(char *buf, size_t size, const char *cfmt, va_list ap)
> > +{
> > +     struct print_buf arg;
> > +
> > +     arg.buf =3D buf;
> > +     arg.size =3D size;
> > +
> > +     kvprintf(cfmt, &snprint_func, &arg, 10, ap);
> > +
> > +     if (arg.size >=3D 1)
> > +             *(arg.buf)++ =3D 0;
> > +}
> > +
> > +void
> >  vsprintf(char *buf, const char *cfmt, va_list ap)
> >  {
> >       int     retval;
> >
> > Modified: head/stand/libsa/stand.h
> >
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
> > --- head/stand/libsa/stand.h  Tue Jun  5 13:53:37 2018        (r334655)
> > +++ head/stand/libsa/stand.h  Tue Jun  5 14:47:13 2018        (r334656)
> > @@ -268,10 +268,11 @@ extern void     *reallocf(void *ptr, size_t size)=
;
> >  extern void  mallocstats(void);
> >
> >  extern int   printf(const char *fmt, ...) __printflike(1, 2);
> > -extern void  vprintf(const char *fmt, __va_list);
> >  extern int   sprintf(char *buf, const char *cfmt, ...) __printflike(2,
> 3);
> >  extern int   snprintf(char *buf, size_t size, const char *cfmt, ...)
> > __printflike(3, 4); +extern void      vprintf(const char *fmt,
> __va_list);
> >  extern void  vsprintf(char *buf, const char *cfmt, __va_list);
> > +extern void  vsnprintf(char *buf, size_t size, const char *cfmt,
> __va_list);
> >
> >  extern void  twiddle(u_int callerdiv);
> >  extern void  twiddle_divisor(u_int globaldiv);
> > _______________________________________________
> > svn-src-head@freebsd.org mailing list
> > https://lists.freebsd.org/mailman/listinfo/svn-src-head
> > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org"
>
>
> Building world/kernel fails now with the error shown below:
>
>
> [...]
> In file included from /usr/src/stand/efi/boot1/boot1.c:34:
> - --- all_subdir_share ---
> - --- all_subdir_share/i18n/esdb/KAZAKH ---
> =3D=3D=3D> share/i18n/esdb/KAZAKH (all)
> - --- all_subdir_stand ---
> /usr/src/stand/efi/boot1/boot_module.h:109:12: error: conflicting types
> for 'vsnprintf'
> extern int vsnprintf(char *str, size_t sz, const char *fmt, va_list ap);
>            ^
> /usr/src/stand/libsa/stand.h:275:13: note: previous declaration is here
> extern void     vsnprintf(char *buf, size_t size, const char *cfmt,
> __va_list);
>                 ^
> 1 error generated.
> - --- all_subdir_rescue ---
> - --- depend_subdir_rescue/rescue/routed/rtquery ---
> =3D=3D=3D> rescue/rescue/routed/rtquery (depend)
> - --- all_subdir_stand ---
> *** [boot1.o] Error code 1
>
> make[5]: stopped in /usr/src/stand/efi/boot1
> .ERROR_TARGET=3D'boot1.o'
>
> .ERROR_META_FILE=3D'/usr/obj/usr/src/amd64.amd64/stand/efi/boot1/boot1.o.=
meta'
> .MAKE.LEVEL=3D'5'
> MAKEFILE=3D''
> .MAKE.MODE=3D'meta missing-filemon=3Dyes missing-meta=3Dyes silent=3Dyes =
verbose'
> _ERROR_CMD=3D'cc -target x86_64-unknown-freebsd12.0
> - --sysroot=3D/usr/obj/usr/src/amd64.amd64/tmp
> -B/usr/obj/usr/src/amd64.amd64/tmp/usr/bin
> - -O2 -pipe -O3 -march=3Dnative  -Wformat -fshort-wchar -mno-red-zone
> -nostdinc
> - -I/usr/obj/usr/src/amd64.amd64/stand/libsa -I/usr/src/stand/libsa
> -D_STANDALONE
> - -I/usr/src/sys -Ddouble=3Djagged-little-pill -Dfloat=3Dfloaty-mcfloatfa=
ce
> - -DLOADER_DISK_SUPPORT -ffreestanding -mno-mmx -mno-sse -mno-avx
> -mno-avx2 -msoft-float
> - -fPIC -mno-red-zone -I. -DEFI_ZFS_BOOT -I/usr/src/stand/efi/include
> - -I/usr/src/stand/efi/include/amd64
> -I/usr/src/sys/contrib/dev/acpica/include
> - -DEFI_UFS_BOOT -I/usr/src/stand/common -fPIC -DNDEBUG -std=3Dgnu99
> -Wsystem-headers
> - -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int
> -Wno-unused-const-variable
> - -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality
> - -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef
> - -Wno-address-of-packed-member -Wno-switch -Wno-switch-enum
> -Wno-knr-promoted-parameter
> - -Wno-parentheses -Wno-format -Qunused-arguments  -c
> /usr/src/stand/efi/boot1/boot1.c -o
> boot1.o; ;'
>
> ...
>
>
> Sources are at revision 334664.
>
> Kind regards,
>
> oh
> - --
> O. Hartmann
>
> Ich widerspreche der Nutzung oder =C3=9Cbermittlung meiner Daten f=C3=BCr
> Werbezwecke oder f=C3=BCr die Markt- oder Meinungsforschung (=C2=A7 28 Ab=
s. 4 BDSG).
> -----BEGIN PGP SIGNATURE-----
>
> iLUEARMKAB0WIQQZVZMzAtwC2T/86TrS528fyFhYlAUCWxa3zgAKCRDS528fyFhY
> lHBLAgCP69VupKSyww77gfghKUBS6eoR6jf6OmvMGWOnxemWBS/BAYwiGCK+ZFmk
> 3ur207rjRoqR/C/jF4ywA2ddQQ5UAgCZ7QxcQD4HClKIn3Mw+W0QvuvXPLv/TBjN
> VnvRfwQfKnXUfjNmlmXrHvDTaHS1R7RtTUvQxK5L5PcAmOuPQhRj
> =3DYisO
> -----END PGP SIGNATURE-----
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfpauS3WeJwjeweWv9rwk1aF%2BPFmXpamP-Z-%2BiWFE=q6%2Bg>