we need wcrtomb now too.

This commit is contained in:
christos 2007-02-03 19:55:51 +00:00
parent 288e2b48f6
commit 32b2149aa4
3 changed files with 20 additions and 4 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.18 2005/05/15 10:15:47 dsl Exp $
# $NetBSD: Makefile,v 1.19 2007/02/03 19:55:51 christos Exp $
#
# Stubs to kill off some things from libc:
# This save space on a boot system.
@ -11,7 +11,7 @@ CPPFLAGS+= -DSMALL
LIB= hack
SRCS= getcap.c getgrent.c getnet.c getnetgr.c getpwent.c \
localeconv.c perror.c setlocale.c \
mbrtowc.c \
mbrtowc.c wcrtomb.c \
strerror.c strsignal.c syslog.c utmp.c yplib.c
WARNS= 1

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile.inc,v 1.19 2005/05/15 10:15:47 dsl Exp $
# $NetBSD: Makefile.inc,v 1.20 2007/02/03 19:55:51 christos Exp $
#
# Include this fragment to build libhack.o
# It is .o and not .a to make sure these are the
@ -19,7 +19,7 @@
CPPFLAGS+= -DSMALL
HACKOBJS+= getcap.o getgrent.o getnet.o getnetgr.o getpwent.o \
localeconv.o perror.o setlocale.o \
mbrtowc.o \
mbrtowc.o wcrtomb.o \
strerror.o strsignal.o syslog.o utmp.o yplib.o
libhack.o: ${HACKOBJS}
@ -43,3 +43,4 @@ strsignal.o: ${HACKSRC}/strsignal.c
syslog.o: ${HACKSRC}/syslog.c
utmp.o: ${HACKSRC}/utmp.c
yplib.o: ${HACKSRC}/yplib.c
wcrtomb.o: ${HACKSRC}/wcrtomb.c

View File

@ -0,0 +1,15 @@
/* $NetBSD: wcrtomb.c,v 1.1 2007/02/03 19:55:51 christos Exp $ */
/*
* Ignore all multibyte sequences, removes all the citrus code.
* Probably only used by vfprintf() when parsing the format string.
*/
#include <wchar.h>
size_t
wcrtomb(char *str, wchar_t wc, mbstate_t *ps)
{
*str = wc;
return 1;
}