summaryrefslogtreecommitdiffstats
path: root/m4/restrict.m4
diff options
context:
space:
mode:
authorTon Voon <tonvoon@users.sourceforge.net>2007-01-24 22:47:25 (GMT)
committerTon Voon <tonvoon@users.sourceforge.net>2007-01-24 22:47:25 (GMT)
commitfe856aa957978504137c1d425815d4ed8a22be40 (patch)
treea5bb46ce0e64b2056f75700eadbf27aba7c39418 /m4/restrict.m4
parent210f39bc84cfbb21cd72dc054e43f13815ee0616 (diff)
downloadmonitoring-plugins-fe856aa957978504137c1d425815d4ed8a22be40.tar.gz
Sync with gnulib - lots of extraneous code removed in preference to GNU code
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1580 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'm4/restrict.m4')
-rw-r--r--m4/restrict.m438
1 files changed, 0 insertions, 38 deletions
diff --git a/m4/restrict.m4 b/m4/restrict.m4
deleted file mode 100644
index 1f3bbb9..0000000
--- a/m4/restrict.m4
+++ /dev/null
@@ -1,38 +0,0 @@
1#serial 1003
2dnl Copyright (C) 2003 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved.
6
7# This macro can be removed once we can rely on Autoconf 2.57a or later,
8# since we can then use its AC_C_RESTRICT.
9
10# gl_C_RESTRICT
11# --------------
12# Determine whether the C/C++ compiler supports the "restrict" keyword
13# introduced in ANSI C99, or an equivalent. Do nothing if the compiler
14# accepts it. Otherwise, if the compiler supports an equivalent,
15# define "restrict" to be that. Here are some variants:
16# - GCC supports both __restrict and __restrict__
17# - older DEC Alpha C compilers support only __restrict
18# - _Restrict is the only spelling accepted by Sun WorkShop 6 update 2 C
19# Otherwise, define "restrict" to be empty.
20AC_DEFUN([gl_C_RESTRICT],
21[AC_CACHE_CHECK([for C/C++ restrict keyword], gl_cv_c_restrict,
22 [gl_cv_c_restrict=no
23 # Try the official restrict keyword, then gcc's __restrict, and
24 # the less common variants.
25 for ac_kw in restrict __restrict __restrict__ _Restrict; do
26 AC_COMPILE_IFELSE([AC_LANG_SOURCE(
27 [float * $ac_kw x;])],
28 [gl_cv_c_restrict=$ac_kw; break])
29 done
30 ])
31 case $gl_cv_c_restrict in
32 restrict) ;;
33 no) AC_DEFINE(restrict,,
34 [Define to equivalent of C99 restrict keyword, or to nothing if this
35 is not supported. Do not define if restrict is supported directly.]) ;;
36 *) AC_DEFINE_UNQUOTED(restrict, $gl_cv_c_restrict) ;;
37 esac
38])