compat_setlocale32.c revision 1.1
11.1Stnozaki/* $NetBSD: compat_setlocale32.c,v 1.1 2010/06/07 13:52:30 tnozaki Exp $ */
21.1Stnozaki
31.1Stnozaki/*-
41.1Stnozaki * Copyright (c)1999 Citrus Project,
51.1Stnozaki * All rights reserved.
61.1Stnozaki *
71.1Stnozaki * Redistribution and use in source and binary forms, with or without
81.1Stnozaki * modification, are permitted provided that the following conditions
91.1Stnozaki * are met:
101.1Stnozaki * 1. Redistributions of source code must retain the above copyright
111.1Stnozaki *    notice, this list of conditions and the following disclaimer.
121.1Stnozaki * 2. Redistributions in binary form must reproduce the above copyright
131.1Stnozaki *    notice, this list of conditions and the following disclaimer in the
141.1Stnozaki *    documentation and/or other materials provided with the distribution.
151.1Stnozaki *
161.1Stnozaki * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
171.1Stnozaki * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
181.1Stnozaki * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
191.1Stnozaki * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
201.1Stnozaki * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
211.1Stnozaki * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
221.1Stnozaki * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
231.1Stnozaki * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
241.1Stnozaki * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
251.1Stnozaki * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
261.1Stnozaki * SUCH DAMAGE.
271.1Stnozaki *
281.1Stnozaki * NetBSD: setlocale32.c,v 1.6 2010/05/22 13:50:02 tnozaki Exp
291.1Stnozaki */
301.1Stnozaki
311.1Stnozaki#include <sys/cdefs.h>
321.1Stnozaki#if defined(LIBC_SCCS) && !defined(lint)
331.1Stnozaki__RCSID("$NetBSD: compat_setlocale32.c,v 1.1 2010/06/07 13:52:30 tnozaki Exp $");
341.1Stnozaki#endif /* LIBC_SCCS and not lint */
351.1Stnozaki
361.1Stnozaki#include <sys/types.h>
371.1Stnozaki#include <compat/include/locale.h>
381.1Stnozaki
391.1Stnozaki#include "setlocale_local.h"
401.1Stnozaki
411.1Stnozaki__warn_references(__setlocale_mb_len_max_32,
421.1Stnozaki    "warning: reference to compatibility __setlocale_mb_len_max_32();"
431.1Stnozaki    "include <locale.h> for correct reference")
441.1Stnozaki
451.1Stnozakichar *
461.1Stnozaki__setlocale_mb_len_max_32(int category, const char *locale)
471.1Stnozaki{
481.1Stnozaki
491.1Stnozaki	/* locale may be NULL */
501.1Stnozaki
511.1Stnozaki	__mb_len_max_runtime = 32;
521.1Stnozaki	return __setlocale(category, locale);
531.1Stnozaki}
54