[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-gnulib] problem with mbchar module on OpenBSD
From: |
Bruno Haible |
Subject: |
Re: [bug-gnulib] problem with mbchar module on OpenBSD |
Date: |
Mon, 26 Sep 2005 15:55:33 +0200 |
User-agent: |
KMail/1.5 |
Paul Eggert wrote:
> I installed the following patch into coreutils, which is about the
> same as Derek Price's proposed gnulib patch
> <http://lists.gnu.org/archive/html/bug-gnulib/2005-09/msg00242.html>.
Thanks for verifying that this works. (I still don't have access to an
OpenBSD box.)
Actually the problem is worse: The 'Include:' section of the modules
mbchar, mbfile, mbiter, mbuiter was incorrectly specified. It appeared
to allow including mbchar.h, mbfile.h, mbiter.h on any platform, which
does not work.
I committed this fix into gnulib. The mbchar.m4 part should be equivalent
to Yoann's fix.
Bruno
2005-09-26 Bruno Haible <address@hidden>
* modules/mbchar (Include): Mention that HAVE_WCHAR_H && HAVE_WCTYPE_H
is necessary.
(lib_SOURCES): Remove mbchar.c.
* modules/mbfile (Include): Mention that HAVE_MBRTOWC is necessary.
(Files): Add m4/mbrtowc.m4.
* modules/mbiter: Likewise.
* modules/mbuiter: Likewise.
* m4/mbchar.m4 (gl_MBCHAR): Check for wchar.h and wctype.h. Don't
compile mbchar.c if they are not both present.
* m4/mbfile.m4 (gl_MBFILE): Require gl_FUNC_MBRTOWC.
* m4/mbiter.m4 (gl_MBITER): Likewise.
* m4/strstr.m4 (gl_PREREQ_STRSTR): Use AC_REQUIRE.
* m4/strcasestr.m4 (gl_PREREQ_STRCASESTR): Likewise.
* m4/strcase.m4 (gl_PREREQ_STRCASECMP): Likewise.
*** modules/mbchar 16 Aug 2005 12:06:55 -0000 1.1
--- modules/mbchar 26 Sep 2005 13:51:52 -0000
***************
*** 13,22 ****
gl_MBCHAR
Makefile.am:
! lib_SOURCES += mbchar.h mbchar.c
Include:
! "mbchar.h"
License:
LGPL
--- 13,24 ----
gl_MBCHAR
Makefile.am:
! lib_SOURCES += mbchar.h
Include:
! #if HAVE_WCHAR_H && HAVE_WCTYPE_H
! #include "mbchar.h"
! #endif
License:
LGPL
*** modules/mbfile 16 Aug 2005 12:09:52 -0000 1.1
--- modules/mbfile 26 Sep 2005 13:51:52 -0000
***************
*** 4,9 ****
--- 4,10 ----
Files:
lib/mbfile.h
m4/mbfile.m4
+ m4/mbrtowc.m4
Depends-on:
mbchar
***************
*** 16,22 ****
lib_SOURCES += mbfile.h
Include:
! "mbfile.h"
License:
LGPL
--- 17,25 ----
lib_SOURCES += mbfile.h
Include:
! #if HAVE_MBRTOWC
! #include "mbfile.h"
! #endif
License:
LGPL
*** modules/mbiter 16 Aug 2005 12:08:40 -0000 1.1
--- modules/mbiter 26 Sep 2005 13:51:52 -0000
***************
*** 4,9 ****
--- 4,10 ----
Files:
lib/mbiter.h
m4/mbiter.m4
+ m4/mbrtowc.m4
Depends-on:
mbchar
***************
*** 16,22 ****
lib_SOURCES += mbiter.h
Include:
! "mbiter.h"
License:
LGPL
--- 17,25 ----
lib_SOURCES += mbiter.h
Include:
! #if HAVE_MBRTOWC
! #include "mbiter.h"
! #endif
License:
LGPL
*** modules/mbuiter 17 Aug 2005 13:58:33 -0000 1.1
--- modules/mbuiter 26 Sep 2005 13:51:52 -0000
***************
*** 4,9 ****
--- 4,10 ----
Files:
lib/mbuiter.h
m4/mbiter.m4
+ m4/mbrtowc.m4
Depends-on:
mbchar
***************
*** 17,23 ****
lib_SOURCES += mbuiter.h
Include:
! "mbuiter.h"
License:
LGPL
--- 18,26 ----
lib_SOURCES += mbuiter.h
Include:
! #if HAVE_MBRTOWC
! #include "mbuiter.h"
! #endif
License:
LGPL
*** m4/mbchar.m4 16 Aug 2005 12:06:55 -0000 1.1
--- m4/mbchar.m4 26 Sep 2005 13:51:52 -0000
***************
*** 1,4 ****
! # mbchar.m4 serial 1
dnl Copyright (C) 2005 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
--- 1,4 ----
! # mbchar.m4 serial 2
dnl Copyright (C) 2005 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
***************
*** 10,14 ****
AC_DEFUN([gl_MBCHAR],
[
AC_REQUIRE([AC_GNU_SOURCE])
! :
])
--- 10,20 ----
AC_DEFUN([gl_MBCHAR],
[
AC_REQUIRE([AC_GNU_SOURCE])
! dnl The following line is that so the user can test
! dnl HAVE_WCHAR_H && HAVE_WCTYPE_H before #include "mbchar.h".
! AC_CHECK_HEADERS_ONCE(wchar.h wctype.h)
! dnl Compile mbchar.c only if HAVE_WCHAR_H && HAVE_WCTYPE_H.
! if test $ac_cv_header_wchar_h = yes && test $ac_cv_header_wctype_h = yes;
then
! AC_LIBOBJ([mbchar])
! fi
])
*** m4/mbfile.m4 16 Aug 2005 12:09:52 -0000 1.1
--- m4/mbfile.m4 26 Sep 2005 13:51:52 -0000
***************
*** 1,4 ****
! # mbfile.m4 serial 1
dnl Copyright (C) 2005 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
--- 1,4 ----
! # mbfile.m4 serial 2
dnl Copyright (C) 2005 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
***************
*** 10,14 ****
--- 10,17 ----
AC_DEFUN([gl_MBFILE],
[
AC_REQUIRE([AC_TYPE_MBSTATE_T])
+ dnl The following line is that so the user can test HAVE_MBRTOWC before
+ dnl #include "mbfile.h".
+ AC_REQUIRE([gl_FUNC_MBRTOWC])
:
])
*** m4/mbiter.m4 16 Aug 2005 12:08:40 -0000 1.1
--- m4/mbiter.m4 26 Sep 2005 13:51:52 -0000
***************
*** 1,4 ****
! # mbiter.m4 serial 1
dnl Copyright (C) 2005 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
--- 1,4 ----
! # mbiter.m4 serial 2
dnl Copyright (C) 2005 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
***************
*** 10,14 ****
--- 10,17 ----
AC_DEFUN([gl_MBITER],
[
AC_REQUIRE([AC_TYPE_MBSTATE_T])
+ dnl The following line is that so the user can test HAVE_MBRTOWC before
+ dnl #include "mbiter.h" or "mbuiter.h".
+ AC_REQUIRE([gl_FUNC_MBRTOWC])
:
])
*** m4/strstr.m4 15 Sep 2005 16:25:48 -0000 1.5
--- m4/strstr.m4 26 Sep 2005 13:51:52 -0000
***************
*** 1,4 ****
! # strstr.m4 serial 4
dnl Copyright (C) 2002-2003, 2005 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
--- 1,4 ----
! # strstr.m4 serial 5
dnl Copyright (C) 2002-2003, 2005 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
***************
*** 14,18 ****
# Prerequisites of lib/strstr.c.
AC_DEFUN([gl_PREREQ_STRSTR], [
! gl_FUNC_MBRTOWC
])
--- 14,19 ----
# Prerequisites of lib/strstr.c.
AC_DEFUN([gl_PREREQ_STRSTR], [
! AC_REQUIRE([gl_FUNC_MBRTOWC])
! :
])
*** m4/strcasestr.m4 17 Aug 2005 14:09:19 -0000 1.1
--- m4/strcasestr.m4 26 Sep 2005 13:51:52 -0000
***************
*** 1,4 ****
! # strcasestr.m4 serial 1
dnl Copyright (C) 2005 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
--- 1,4 ----
! # strcasestr.m4 serial 2
dnl Copyright (C) 2005 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
***************
*** 15,19 ****
# Prerequisites of lib/strcasestr.c.
AC_DEFUN([gl_PREREQ_STRCASESTR], [
! gl_FUNC_MBRTOWC
])
--- 15,20 ----
# Prerequisites of lib/strcasestr.c.
AC_DEFUN([gl_PREREQ_STRCASESTR], [
! AC_REQUIRE([gl_FUNC_MBRTOWC])
! :
])
*** m4/strcase.m4 16 Aug 2005 12:21:21 -0000 1.3
--- m4/strcase.m4 26 Sep 2005 13:51:52 -0000
***************
*** 1,4 ****
! # strcase.m4 serial 2
dnl Copyright (C) 2002, 2005 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
--- 1,4 ----
! # strcase.m4 serial 3
dnl Copyright (C) 2002, 2005 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
***************
*** 29,35 ****
# Prerequisites of lib/strcasecmp.c.
AC_DEFUN([gl_PREREQ_STRCASECMP], [
! gl_FUNC_MBRTOWC
])
# Prerequisites of lib/strncasecmp.c.
--- 29,36 ----
# Prerequisites of lib/strcasecmp.c.
AC_DEFUN([gl_PREREQ_STRCASECMP], [
! AC_REQUIRE([gl_FUNC_MBRTOWC])
! :
])
# Prerequisites of lib/strncasecmp.c.