]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
New file, taken from gnulib, with support added for __EXTENSIONS__ a la Solaris.
authorJim Meyering <jim@meyering.net>
Thu, 7 Aug 2003 07:36:41 +0000 (07:36 +0000)
committerJim Meyering <jim@meyering.net>
Thu, 7 Aug 2003 07:36:41 +0000 (07:36 +0000)
m4/gnu-source.m4 [new file with mode: 0644]

diff --git a/m4/gnu-source.m4 b/m4/gnu-source.m4
new file mode 100644 (file)
index 0000000..d8332f4
--- /dev/null
@@ -0,0 +1,17 @@
+# AC_GNU_SOURCE
+# --------------
+AC_DEFUN([AC_GNU_SOURCE],
+[AH_VERBATIM([_GNU_SOURCE],
+[/* Enable GNU extensions on systems that have them.  */
+#ifndef _GNU_SOURCE
+# undef _GNU_SOURCE
+#endif
+/* Enable many GNU extensions on Solaris.  */
+#ifndef __EXTENSIONS__
+# undef __EXTENSIONS__
+#endif])dnl
+AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl
+AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
+AC_DEFINE([_GNU_SOURCE])
+AC_DEFINE([__EXTENSIONS__])
+])