]> Dogcows Code - chaz/tar/blob - m4/c-bs-a.m4
ceb26ae596918cadfefead56c4b54d8e94db9ad7
[chaz/tar] / m4 / c-bs-a.m4
1 #serial 1
2
3 dnl From Paul Eggert.
4
5 AC_DEFUN(AC_C_BACKSLASH_A,
6 [
7 AC_CACHE_CHECK([whether backslash-a works in strings], ac_cv_c_backslash_a,
8 [AC_TRY_COMPILE([],
9 [
10 changequote(, ) dnl
11 #if '\a' == 'a'
12 syntax error;
13 #endif
14 char buf['\a' == 'a' ? -1 : 1];
15 buf[0] = '\a';
16 return buf[0] != "\a"[0];
17 changequote([, ])dnl
18 ],
19 ac_cv_c_backslash_a=yes,
20 ac_cv_c_backslash_a=no)])
21 if test $ac_cv_c_backslash_a = yes; then
22 AC_DEFINE(HAVE_C_BACKSLASH_A, 1,
23 [Define if backslash-a works in C strings.])
24 fi
25 ])
This page took 0.033812 seconds and 4 git commands to generate.