Blame m4/iswblank.m4

Packit 709fb3
# iswblank.m4 serial 4
Packit 709fb3
dnl Copyright (C) 2011-2017 Free Software Foundation, Inc.
Packit 709fb3
dnl This file is free software; the Free Software Foundation
Packit 709fb3
dnl gives unlimited permission to copy and/or distribute it,
Packit 709fb3
dnl with or without modifications, as long as this notice is preserved.
Packit 709fb3
Packit 709fb3
AC_DEFUN([gl_FUNC_ISWBLANK],
Packit 709fb3
[
Packit 709fb3
  AC_REQUIRE([gl_WCTYPE_H_DEFAULTS])
Packit 709fb3
  AC_REQUIRE([gl_WCTYPE_H])
Packit 709fb3
  dnl Persuade glibc <wctype.h> to declare iswblank().
Packit 709fb3
  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
Packit 709fb3
  AC_CHECK_FUNCS_ONCE([iswblank])
Packit 709fb3
  AC_CHECK_DECLS([iswblank], , , [[
Packit 709fb3
/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
Packit 709fb3
   <wchar.h>.
Packit 709fb3
   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
Packit 709fb3
   before <wchar.h>.  */
Packit 709fb3
#include <stddef.h>
Packit 709fb3
#include <stdio.h>
Packit 709fb3
#include <time.h>
Packit 709fb3
#include <wchar.h>
Packit 709fb3
#include <wctype.h>
Packit 709fb3
]])
Packit 709fb3
  if test $ac_cv_func_iswblank = no; then
Packit 709fb3
    HAVE_ISWBLANK=0
Packit 709fb3
    if test $ac_cv_have_decl_iswblank = yes; then
Packit 709fb3
      REPLACE_ISWBLANK=1
Packit 709fb3
    fi
Packit 709fb3
  fi
Packit 709fb3
  if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
Packit 709fb3
    dnl Redefine all of iswcntrl, ..., towupper in <wctype.h>.
Packit 709fb3
    :
Packit 709fb3
  else
Packit 709fb3
    if test $HAVE_ISWBLANK = 0 || test $REPLACE_ISWBLANK = 1; then
Packit 709fb3
      dnl Redefine only iswblank.
Packit 709fb3
      :
Packit 709fb3
    fi
Packit 709fb3
  fi
Packit 709fb3
Packit 709fb3
])