1*a8ed63bbSDavid Chisnall /*- 2*a8ed63bbSDavid Chisnall * Copyright (c) 2011, 2012 The FreeBSD Foundation 3*a8ed63bbSDavid Chisnall * All rights reserved. 4*a8ed63bbSDavid Chisnall * 5*a8ed63bbSDavid Chisnall * Redistribution and use in source and binary forms, with or without 6*a8ed63bbSDavid Chisnall * modification, are permitted provided that the following conditions 7*a8ed63bbSDavid Chisnall * are met: 8*a8ed63bbSDavid Chisnall * 1. Redistributions of source code must retain the above copyright 9*a8ed63bbSDavid Chisnall * notice, this list of conditions and the following disclaimer. 10*a8ed63bbSDavid Chisnall * 2. Redistributions in binary form must reproduce the above copyright 11*a8ed63bbSDavid Chisnall * notice, this list of conditions and the following disclaimer in the 12*a8ed63bbSDavid Chisnall * documentation and/or other materials provided with the distribution. 13*a8ed63bbSDavid Chisnall * 14*a8ed63bbSDavid Chisnall * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15*a8ed63bbSDavid Chisnall * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16*a8ed63bbSDavid Chisnall * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17*a8ed63bbSDavid Chisnall * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18*a8ed63bbSDavid Chisnall * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19*a8ed63bbSDavid Chisnall * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20*a8ed63bbSDavid Chisnall * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21*a8ed63bbSDavid Chisnall * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22*a8ed63bbSDavid Chisnall * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23*a8ed63bbSDavid Chisnall * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24*a8ed63bbSDavid Chisnall * SUCH DAMAGE. 25*a8ed63bbSDavid Chisnall * 26*a8ed63bbSDavid Chisnall * $FreeBSD$ 27*a8ed63bbSDavid Chisnall */ 28*a8ed63bbSDavid Chisnall 29*a8ed63bbSDavid Chisnall #ifndef _LOCALE_T_DEFINED 30*a8ed63bbSDavid Chisnall #define _LOCALE_T_DEFINED 31*a8ed63bbSDavid Chisnall typedef struct _xlocale *locale_t; 32*a8ed63bbSDavid Chisnall #endif 33*a8ed63bbSDavid Chisnall 34*a8ed63bbSDavid Chisnall /* 35*a8ed63bbSDavid Chisnall * This file is included from both string.h and xlocale.h. We need to expose 36*a8ed63bbSDavid Chisnall * the declarations unconditionally if we are included from xlocale.h, but only 37*a8ed63bbSDavid Chisnall * if we are in POSIX2008 mode if included from string.h. 38*a8ed63bbSDavid Chisnall */ 39*a8ed63bbSDavid Chisnall 40*a8ed63bbSDavid Chisnall #ifndef _XLOCALE_STRING1_H 41*a8ed63bbSDavid Chisnall #define _XLOCALE_STRING1_H 42*a8ed63bbSDavid Chisnall 43*a8ed63bbSDavid Chisnall /* 44*a8ed63bbSDavid Chisnall * POSIX2008 functions 45*a8ed63bbSDavid Chisnall */ 46*a8ed63bbSDavid Chisnall int strcoll_l(const char *, const char *, locale_t); 47*a8ed63bbSDavid Chisnall size_t strxfrm_l(char *, const char *, size_t, locale_t); 48*a8ed63bbSDavid Chisnall #endif /* _XLOCALE_STRING1_H */ 49*a8ed63bbSDavid Chisnall 50*a8ed63bbSDavid Chisnall /* 51*a8ed63bbSDavid Chisnall * xlocale extensions 52*a8ed63bbSDavid Chisnall */ 53*a8ed63bbSDavid Chisnall #ifdef _XLOCALE_H_ 54*a8ed63bbSDavid Chisnall #ifndef _XLOCALE_STRING2_H 55*a8ed63bbSDavid Chisnall #define _XLOCALE_STRING2_H 56*a8ed63bbSDavid Chisnall int strcasecmp_l(const char *, const char *, locale_t); 57*a8ed63bbSDavid Chisnall char *strcasestr_l(const char *, const char *, locale_t); 58*a8ed63bbSDavid Chisnall int strncasecmp_l(const char *, const char *, size_t, locale_t); 59*a8ed63bbSDavid Chisnall 60*a8ed63bbSDavid Chisnall #endif /* _XLOCALE_STRING2_H */ 61*a8ed63bbSDavid Chisnall #endif /* _XLOCALE_H_ */ 62