svn commit: r334656 - head/stand/libsa

O. Hartmann ohartmann at walstatt.org
Tue Jun 5 16:18:38 UTC 2018


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Am Tue, 5 Jun 2018 14:47:13 +0000 (UTC)
Ian Lepore <ian at 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 instead 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
> ==============================================================================
> --- 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 = buf;
> +	arg.size = size;
> +
> +	kvprintf(cfmt, &snprint_func, &arg, 10, ap);
> +
> +	if (arg.size >= 1)
> +		*(arg.buf)++ = 0;
> +}
> +
> +void
>  vsprintf(char *buf, const char *cfmt, va_list ap)
>  {
>  	int	retval;
> 
> Modified: head/stand/libsa/stand.h
> ==============================================================================
> --- 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 at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/svn-src-head
> To unsubscribe, send any mail to "svn-src-head-unsubscribe at 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 ---
===> 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 ---
===> rescue/rescue/routed/rtquery (depend)
- --- all_subdir_stand ---
*** [boot1.o] Error code 1

make[5]: stopped in /usr/src/stand/efi/boot1
.ERROR_TARGET='boot1.o'
.ERROR_META_FILE='/usr/obj/usr/src/amd64.amd64/stand/efi/boot1/boot1.o.meta'
.MAKE.LEVEL='5'
MAKEFILE=''
.MAKE.MODE='meta missing-filemon=yes missing-meta=yes silent=yes verbose'
_ERROR_CMD='cc -target x86_64-unknown-freebsd12.0
- --sysroot=/usr/obj/usr/src/amd64.amd64/tmp -B/usr/obj/usr/src/amd64.amd64/tmp/usr/bin
- -O2 -pipe -O3 -march=native  -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=jagged-little-pill -Dfloat=floaty-mcfloatface
- -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=gnu99 -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 Übermittlung meiner Daten für
Werbezwecke oder für die Markt- oder Meinungsforschung (§ 28 Abs. 4 BDSG).
-----BEGIN PGP SIGNATURE-----

iLUEARMKAB0WIQQZVZMzAtwC2T/86TrS528fyFhYlAUCWxa3zgAKCRDS528fyFhY
lHBLAgCP69VupKSyww77gfghKUBS6eoR6jf6OmvMGWOnxemWBS/BAYwiGCK+ZFmk
3ur207rjRoqR/C/jF4ywA2ddQQ5UAgCZ7QxcQD4HClKIn3Mw+W0QvuvXPLv/TBjN
VnvRfwQfKnXUfjNmlmXrHvDTaHS1R7RtTUvQxK5L5PcAmOuPQhRj
=YisO
-----END PGP SIGNATURE-----


More information about the svn-src-head mailing list