summaryrefslogtreecommitdiffstats
path: root/gl/m4/btowc.m4
diff options
context:
space:
mode:
authorHolger Weiss <holger@zedat.fu-berlin.de>2013-08-19 23:27:12 +0200
committerHolger Weiss <holger@zedat.fu-berlin.de>2013-08-19 23:27:12 +0200
commit26fbe7f1e68bb0c96da32491efcf3696fe6c299b (patch)
treec4d95289187a64e9c7517bf73d8208026c3d2fb3 /gl/m4/btowc.m4
parent5f79e3e9f62ca5487d9881973149136ba1d19d3e (diff)
downloadmonitoring-plugins-26fbe7f1e68bb0c96da32491efcf3696fe6c299b.tar.gz
Sync with the latest Gnulib code (6f2d632)
Diffstat (limited to 'gl/m4/btowc.m4')
-rw-r--r--gl/m4/btowc.m435
1 files changed, 22 insertions, 13 deletions
diff --git a/gl/m4/btowc.m4 b/gl/m4/btowc.m4
index c4ee4e41..978a06e9 100644
--- a/gl/m4/btowc.m4
+++ b/gl/m4/btowc.m4
@@ -1,5 +1,5 @@
1# btowc.m4 serial 6 1# btowc.m4 serial 10
2dnl Copyright (C) 2008-2010 Free Software Foundation, Inc. 2dnl Copyright (C) 2008-2013 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
@@ -26,16 +26,23 @@ AC_DEFUN([gl_FUNC_BTOWC],
26 AC_CACHE_CHECK([whether btowc(0) is correct], 26 AC_CACHE_CHECK([whether btowc(0) is correct],
27 [gl_cv_func_btowc_nul], 27 [gl_cv_func_btowc_nul],
28 [ 28 [
29 AC_TRY_RUN([ 29 AC_RUN_IFELSE(
30#include <stdio.h> 30 [AC_LANG_SOURCE([[
31#include <string.h> 31#include <string.h>
32/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
33 <wchar.h>.
34 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
35 included before <wchar.h>. */
36#include <stddef.h>
37#include <stdio.h>
38#include <time.h>
32#include <wchar.h> 39#include <wchar.h>
33int main () 40int main ()
34{ 41{
35 if (btowc ('\0') != 0) 42 if (btowc ('\0') != 0)
36 return 1; 43 return 1;
37 return 0; 44 return 0;
38}], 45}]])],
39 [gl_cv_func_btowc_nul=yes], 46 [gl_cv_func_btowc_nul=yes],
40 [gl_cv_func_btowc_nul=no], 47 [gl_cv_func_btowc_nul=no],
41 [ 48 [
@@ -65,10 +72,17 @@ changequote(,)dnl
65 esac 72 esac
66changequote([,])dnl 73changequote([,])dnl
67 if test $LOCALE_FR != none; then 74 if test $LOCALE_FR != none; then
68 AC_TRY_RUN([ 75 AC_RUN_IFELSE(
76 [AC_LANG_SOURCE([[
69#include <locale.h> 77#include <locale.h>
70#include <stdio.h>
71#include <string.h> 78#include <string.h>
79/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
80 <wchar.h>.
81 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
82 included before <wchar.h>. */
83#include <stddef.h>
84#include <stdio.h>
85#include <time.h>
72#include <wchar.h> 86#include <wchar.h>
73int main () 87int main ()
74{ 88{
@@ -78,7 +92,7 @@ int main ()
78 return 1; 92 return 1;
79 } 93 }
80 return 0; 94 return 0;
81}], 95}]])],
82 [gl_cv_func_btowc_eof=yes], 96 [gl_cv_func_btowc_eof=yes],
83 [gl_cv_func_btowc_eof=no], 97 [gl_cv_func_btowc_eof=no],
84 [:]) 98 [:])
@@ -94,11 +108,6 @@ int main ()
94 *) REPLACE_BTOWC=1 ;; 108 *) REPLACE_BTOWC=1 ;;
95 esac 109 esac
96 fi 110 fi
97 if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then
98 gl_REPLACE_WCHAR_H
99 AC_LIBOBJ([btowc])
100 gl_PREREQ_BTOWC
101 fi
102]) 111])
103 112
104# Prerequisites of lib/btowc.c. 113# Prerequisites of lib/btowc.c.