Changeset View
Changeset View
Standalone View
Standalone View
usr.bin/localedef/bootstrap/xlocale.h
Show All 29 Lines | |||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||||
* SUCH DAMAGE. | * SUCH DAMAGE. | ||||
* | * | ||||
* $FreeBSD$ | * $FreeBSD$ | ||||
*/ | */ | ||||
#pragma once | |||||
/* | /* | ||||
* This header only exists to avoid pulling in the host xlocale.h from | * This header only exists to avoid pulling in the host xlocale.h from the | ||||
* the libc-internal headers. This is required since newer Linux GLibc no | * libc-internal headers. New versions of glibc include bits/types/locale.h | ||||
* longer includes xlocale.h and older versions include an incompatible header. | * from stdlib.h and so get their own locale_t (and don't provide xlocale.h), | ||||
* but older versions include xlocale.h and expect to have a __locale_t. Thus | |||||
* we provide dummy definitions of both so the (unused) prototypes don't give | |||||
* errors. | |||||
*/ | */ | ||||
#ifdef locale_t | |||||
#error "Dummy xlocale.h included inside bootstrapping namespace context" | |||||
#endif | |||||
typedef struct __dummy_host_locale *__locale_t; | |||||
typedef __locale_t locale_t; |