Commit cdf12ee4 authored by Bruno Haible's avatar Bruno Haible

Work around declaration collisions on Minix.

* m4/mbsinit.m4 (gl_FUNC_MBSINIT): If mbsinit is declared but not
defined, set REPLACE_MBSINIT.
* m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): If mbrtowc is declared but not
defined, set REPLACE_MBRTOWC.
* m4/mbrlen.m4 (gl_FUNC_MBRLEN): If mbrlen is declared but not defined,
set REPLACE_MBRLEN.
* m4/mbsrtowcs.m4 (gl_FUNC_MBSRTOWCS): If mbsrtowcs is declared but not
defined, set REPLACE_MBSRTOWCS.
* m4/wcrtomb.m4 (gl_FUNC_WCRTOMB): If wcrtomb is declared but not
defined, set REPLACE_WCRTOMB.
* m4/wcsrtombs.m4 (gl_FUNC_WCSRTOMBS): If wcsrtombs is declared but not
defined, set REPLACE_WCSRTOMBS.
parent 2b148694
2011-07-31 Bruno Haible <bruno@clisp.org>
Work around declaration collisions on Minix.
* m4/mbsinit.m4 (gl_FUNC_MBSINIT): If mbsinit is declared but not
defined, set REPLACE_MBSINIT.
* m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): If mbrtowc is declared but not
defined, set REPLACE_MBRTOWC.
* m4/mbrlen.m4 (gl_FUNC_MBRLEN): If mbrlen is declared but not defined,
set REPLACE_MBRLEN.
* m4/mbsrtowcs.m4 (gl_FUNC_MBSRTOWCS): If mbsrtowcs is declared but not
defined, set REPLACE_MBSRTOWCS.
* m4/wcrtomb.m4 (gl_FUNC_WCRTOMB): If wcrtomb is declared but not
defined, set REPLACE_WCRTOMB.
* m4/wcsrtombs.m4 (gl_FUNC_WCSRTOMBS): If wcsrtombs is declared but not
defined, set REPLACE_WCSRTOMBS.
2011-07-31 Bruno Haible <bruno@clisp.org>
Add support for Minix with ACK compiler.
# mbrlen.m4 serial 7
# mbrlen.m4 serial 8
dnl Copyright (C) 2008, 2010-2011 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
......@@ -13,6 +13,22 @@ AC_DEFUN([gl_FUNC_MBRLEN],
AC_CHECK_FUNCS_ONCE([mbrlen])
if test $ac_cv_func_mbrlen = no; then
HAVE_MBRLEN=0
AC_CHECK_DECLS([mbrlen],,, [[
/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
<wchar.h>.
BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
included before <wchar.h>. */
#include <stddef.h>
#include <stdio.h>
#include <time.h>
#include <wchar.h>
]])
if test $ac_cv_have_decl_mbrlen = yes; then
dnl On Minix 3.1.8, the system's <wchar.h> declares mbrlen() although
dnl it does not have the function. Avoid a collision with gnulib's
dnl replacement.
REPLACE_MBRLEN=1
fi
else
dnl Most bugs affecting the system's mbrtowc function also affect the
dnl mbrlen function. So override mbrlen whenever mbrtowc is overridden.
......
# mbrtowc.m4 serial 24
# mbrtowc.m4 serial 25
dnl Copyright (C) 2001-2002, 2004-2005, 2008-2011 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
......@@ -15,6 +15,22 @@ AC_DEFUN([gl_FUNC_MBRTOWC],
AC_CHECK_FUNCS_ONCE([mbrtowc])
if test $ac_cv_func_mbrtowc = no; then
HAVE_MBRTOWC=0
AC_CHECK_DECLS([mbrtowc],,, [[
/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
<wchar.h>.
BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
included before <wchar.h>. */
#include <stddef.h>
#include <stdio.h>
#include <time.h>
#include <wchar.h>
]])
if test $ac_cv_have_decl_mbrtowc = yes; then
dnl On Minix 3.1.8, the system's <wchar.h> declares mbrtowc() although
dnl it does not have the function. Avoid a collision with gnulib's
dnl replacement.
REPLACE_MBRTOWC=1
fi
else
if test $REPLACE_MBSTATE_T = 1; then
REPLACE_MBRTOWC=1
......
# mbsinit.m4 serial 7
# mbsinit.m4 serial 8
dnl Copyright (C) 2008, 2010-2011 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,6 +15,22 @@ AC_DEFUN([gl_FUNC_MBSINIT],
AC_CHECK_FUNCS_ONCE([mbsinit])
if test $ac_cv_func_mbsinit = no; then
HAVE_MBSINIT=0
AC_CHECK_DECLS([mbsinit],,, [[
/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
<wchar.h>.
BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
included before <wchar.h>. */
#include <stddef.h>
#include <stdio.h>
#include <time.h>
#include <wchar.h>
]])
if test $ac_cv_have_decl_mbsinit = yes; then
dnl On Minix 3.1.8, the system's <wchar.h> declares mbsinit() although
dnl it does not have the function. Avoid a collision with gnulib's
dnl replacement.
REPLACE_MBSINIT=1
fi
else
if test $REPLACE_MBSTATE_T = 1; then
REPLACE_MBSINIT=1
......
# mbsrtowcs.m4 serial 12
# mbsrtowcs.m4 serial 13
dnl Copyright (C) 2008-2011 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,6 +14,22 @@ AC_DEFUN([gl_FUNC_MBSRTOWCS],
AC_CHECK_FUNCS_ONCE([mbsrtowcs])
if test $ac_cv_func_mbsrtowcs = no; then
HAVE_MBSRTOWCS=0
AC_CHECK_DECLS([mbsrtowcs],,, [[
/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
<wchar.h>.
BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
included before <wchar.h>. */
#include <stddef.h>
#include <stdio.h>
#include <time.h>
#include <wchar.h>
]])
if test $ac_cv_have_decl_mbsrtowcs = yes; then
dnl On Minix 3.1.8, the system's <wchar.h> declares mbsrtowcs() although
dnl it does not have the function. Avoid a collision with gnulib's
dnl replacement.
REPLACE_MBSRTOWCS=1
fi
else
if test $REPLACE_MBSTATE_T = 1; then
REPLACE_MBSRTOWCS=1
......
# wcrtomb.m4 serial 10
# wcrtomb.m4 serial 11
dnl Copyright (C) 2008-2011 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,6 +14,22 @@ AC_DEFUN([gl_FUNC_WCRTOMB],
AC_CHECK_FUNCS_ONCE([wcrtomb])
if test $ac_cv_func_wcrtomb = no; then
HAVE_WCRTOMB=0
AC_CHECK_DECLS([wcrtomb],,, [[
/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
<wchar.h>.
BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
included before <wchar.h>. */
#include <stddef.h>
#include <stdio.h>
#include <time.h>
#include <wchar.h>
]])
if test $ac_cv_have_decl_wcrtomb = yes; then
dnl On Minix 3.1.8, the system's <wchar.h> declares wcrtomb() although
dnl it does not have the function. Avoid a collision with gnulib's
dnl replacement.
REPLACE_WCRTOMB=1
fi
else
if test $REPLACE_MBSTATE_T = 1; then
REPLACE_WCRTOMB=1
......
# wcsrtombs.m4 serial 10
# wcsrtombs.m4 serial 11
dnl Copyright (C) 2008-2011 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,6 +14,22 @@ AC_DEFUN([gl_FUNC_WCSRTOMBS],
AC_CHECK_FUNCS_ONCE([wcsrtombs])
if test $ac_cv_func_wcsrtombs = no; then
HAVE_WCSRTOMBS=0
AC_CHECK_DECLS([wcsrtombs],,, [[
/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
<wchar.h>.
BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
included before <wchar.h>. */
#include <stddef.h>
#include <stdio.h>
#include <time.h>
#include <wchar.h>
]])
if test $ac_cv_have_decl_wcsrtombs = yes; then
dnl On Minix 3.1.8, the system's <wchar.h> declares wcsrtombs() although
dnl it does not have the function. Avoid a collision with gnulib's
dnl replacement.
REPLACE_WCSRTOMBS=1
fi
else
if test $REPLACE_MBSTATE_T = 1; then
REPLACE_WCSRTOMBS=1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment