summaryrefslogtreecommitdiffstats
path: root/gl/m4/wctype.m4
diff options
context:
space:
mode:
authorThomas Guyot-Sionnest <dermoth@aei.ca>2010-04-08 01:11:46 (GMT)
committerThomas Guyot-Sionnest <dermoth@aei.ca>2010-04-13 01:26:35 (GMT)
commit74da141e618ef99959d509cb2e7be35a348a39db (patch)
tree88ebc38b381a1021fc2d74864a71e230ae591c3d /gl/m4/wctype.m4
parentc63a4f726a0b6ad8cf6040f947754a81fd4683bb (diff)
downloadmonitoring-plugins-74da141e618ef99959d509cb2e7be35a348a39db.tar.gz
Sync with the latest Gnulib code (177f525)
Signed-off-by: Thomas Guyot-Sionnest <dermoth@aei.ca>
Diffstat (limited to 'gl/m4/wctype.m4')
-rw-r--r--gl/m4/wctype.m474
1 files changed, 0 insertions, 74 deletions
diff --git a/gl/m4/wctype.m4 b/gl/m4/wctype.m4
deleted file mode 100644
index 6a1b6f0..0000000
--- a/gl/m4/wctype.m4
+++ /dev/null
@@ -1,74 +0,0 @@
1# wctype.m4 serial 2
2
3dnl A placeholder for ISO C99 <wctype.h>, for platforms that lack it.
4
5dnl Copyright (C) 2006-2008 Free Software Foundation, Inc.
6dnl This file is free software; the Free Software Foundation
7dnl gives unlimited permission to copy and/or distribute it,
8dnl with or without modifications, as long as this notice is preserved.
9
10dnl Written by Paul Eggert.
11
12AC_DEFUN([gl_WCTYPE_H],
13[
14 AC_REQUIRE([AC_PROG_CC])
15 AC_CHECK_FUNCS_ONCE([iswcntrl])
16 if test $ac_cv_func_iswcntrl = yes; then
17 HAVE_ISWCNTRL=1
18 else
19 HAVE_ISWCNTRL=0
20 fi
21 AC_SUBST([HAVE_ISWCNTRL])
22 AC_CHECK_HEADERS_ONCE([wctype.h])
23 AC_REQUIRE([AC_C_INLINE])
24
25 AC_REQUIRE([gt_TYPE_WINT_T])
26 if test $gt_cv_c_wint_t = yes; then
27 HAVE_WINT_T=1
28 else
29 HAVE_WINT_T=0
30 fi
31 AC_SUBST([HAVE_WINT_T])
32
33 WCTYPE_H=wctype.h
34 if test $ac_cv_header_wctype_h = yes; then
35 if test $ac_cv_func_iswcntrl = yes; then
36 dnl Linux libc5 has an iswprint function that returns 0 for all arguments.
37 dnl The other functions are likely broken in the same way.
38 AC_CACHE_CHECK([whether iswcntrl works], [gl_cv_func_iswcntrl_works],
39 [
40 AC_TRY_RUN([#include <stddef.h>
41 #include <stdio.h>
42 #include <time.h>
43 #include <wchar.h>
44 #include <wctype.h>
45 int main () { return iswprint ('x') == 0; }],
46 [gl_cv_func_iswcntrl_works=yes], [gl_cv_func_iswcntrl_works=no],
47 [AC_TRY_COMPILE([#include <stdlib.h>
48 #if __GNU_LIBRARY__ == 1
49 Linux libc5 i18n is broken.
50 #endif], [],
51 [gl_cv_func_iswcntrl_works=yes], [gl_cv_func_iswcntrl_works=no])
52 ])
53 ])
54 if test $gl_cv_func_iswcntrl_works = yes; then
55 WCTYPE_H=
56 fi
57 fi
58 dnl Compute NEXT_WCTYPE_H even if WCTYPE_H is empty,
59 dnl for the benefit of builds from non-distclean directories.
60 gl_CHECK_NEXT_HEADERS([wctype.h])
61 HAVE_WCTYPE_H=1
62 else
63 HAVE_WCTYPE_H=0
64 fi
65 AC_SUBST([HAVE_WCTYPE_H])
66 AC_SUBST([WCTYPE_H])
67
68 if test "$gl_cv_func_iswcntrl_works" = no; then
69 REPLACE_ISWCNTRL=1
70 else
71 REPLACE_ISWCNTRL=0
72 fi
73 AC_SUBST([REPLACE_ISWCNTRL])
74])