From 2c9fdc9222927965f31120c117084e401a2987be Mon Sep 17 00:00:00 2001 From: yamt Date: Wed, 6 Mar 2013 11:29:01 +0000 Subject: [PATCH] comment and assertion --- lib/libc/compat/locale/compat_setlocale32.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/libc/compat/locale/compat_setlocale32.c b/lib/libc/compat/locale/compat_setlocale32.c index 28cd07e1792a..d06b5c4127bb 100644 --- a/lib/libc/compat/locale/compat_setlocale32.c +++ b/lib/libc/compat/locale/compat_setlocale32.c @@ -1,4 +1,4 @@ -/* $NetBSD: compat_setlocale32.c,v 1.1 2010/06/07 13:52:30 tnozaki Exp $ */ +/* $NetBSD: compat_setlocale32.c,v 1.2 2013/03/06 11:29:01 yamt Exp $ */ /*- * Copyright (c)1999 Citrus Project, @@ -30,7 +30,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: compat_setlocale32.c,v 1.1 2010/06/07 13:52:30 tnozaki Exp $"); +__RCSID("$NetBSD: compat_setlocale32.c,v 1.2 2013/03/06 11:29:01 yamt Exp $"); #endif /* LIBC_SCCS and not lint */ #include @@ -42,6 +42,14 @@ __warn_references(__setlocale_mb_len_max_32, "warning: reference to compatibility __setlocale_mb_len_max_32();" "include for correct reference") +/* + * MB_LEN_MAX used to be a MD macro. it was 32 for most ports but 6 for hppa. + * hppa uses arch/hppa/locale/compat_setlocale32.c instead of this file. + */ +#if defined(__hppa__) +#error using wrong variant of compat_setlocale32.c +#endif /* defined(__hppa__) */ + char * __setlocale_mb_len_max_32(int category, const char *locale) {