Rename __func__ module to func.
authorSimon Josefsson <simon@josefsson.org>
Thu, 6 Mar 2008 11:01:44 +0000 (12:01 +0100)
committerSimon Josefsson <simon@josefsson.org>
Thu, 6 Mar 2008 11:01:44 +0000 (12:01 +0100)
Suggested by Eric Blake <ebb9@byu.net>.

doc/gnulib.texi
m4/__func__.m4 [deleted file]
m4/func.m4 [new file with mode: 0644]
modules/__func__ [deleted file]
modules/__func__-tests [deleted file]
modules/func [new file with mode: 0644]
modules/func-tests [new file with mode: 0644]
tests/test-__func__.c [deleted file]
tests/test-func.c [new file with mode: 0644]

index 8de6d8e..ddccc5c 100644 (file)
@@ -5746,7 +5746,7 @@ This list of functions is sorted according to the header that declares them.
 * gcd::
 * Regular expressions::
 * Supporting Relocation::
-* __func__::
+* func::
 @end menu
 
 @node alloca
@@ -5826,10 +5826,10 @@ generated automatically.
 
 @include regexprops-generic.texi
 
-@node __func__
-@section __func__
+@node func
+@section func
 
-The @code{__func__} module makes sure that you can use the predefined
+The @code{func} module makes sure that you can use the predefined
 identifier @code{__func__} as defined by C99 in your code.
 
 A small example is:
diff --git a/m4/__func__.m4 b/m4/__func__.m4
deleted file mode 100644 (file)
index ee39f42..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-# __func__.m4 serial 1
-dnl Copyright (C) 2008 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-# Written by Simon Josefsson
-
-AC_DEFUN([gl___FUNC__],
-[
-  AC_CACHE_CHECK([whether __func__ is available], [gl_cv_var___func__],
-     AC_COMPILE_IFELSE(
-       [AC_LANG_PROGRAM([[]], [[const char *str = __func__;]])],
-       [gl_cv_var___func__=yes],
-       [gl_cv_var___func__=no]))
-  if test "$gl_cv_var___func__" != yes; then
-    AC_DEFINE([__func__], ["<unknown function>"],
-              [Define as a replacement for the ISO C99 __func__ variable.])
-  fi
-])
diff --git a/m4/func.m4 b/m4/func.m4
new file mode 100644 (file)
index 0000000..d02bce8
--- /dev/null
@@ -0,0 +1,20 @@
+# func.m4 serial 2
+dnl Copyright (C) 2008 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+# Written by Simon Josefsson
+
+AC_DEFUN([gl_FUNC],
+[
+  AC_CACHE_CHECK([whether __func__ is available], [gl_cv_var_func],
+     AC_COMPILE_IFELSE(
+       [AC_LANG_PROGRAM([[]], [[const char *str = __func__;]])],
+       [gl_cv_var_func=yes],
+       [gl_cv_var_func=no]))
+  if test "$gl_cv_var_func" != yes; then
+    AC_DEFINE([__func__], ["<unknown function>"],
+              [Define as a replacement for the ISO C99 __func__ variable.])
+  fi
+])
diff --git a/modules/__func__ b/modules/__func__
deleted file mode 100644 (file)
index 79eae75..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-Description:
-Make sure __func__ is usable even on non-C99 platforms.
-
-Files:
-m4/__func__.m4
-
-Depends-on:
-
-configure.ac:
-gl___FUNC__
-
-Makefile.am:
-
-Include:
-
-License:
-LGPL
-
-Maintainer:
-Simon Josefsson
diff --git a/modules/__func__-tests b/modules/__func__-tests
deleted file mode 100644 (file)
index 4d821a3..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-Files:
-tests/test-__func__.c
-
-configure.ac:
-
-Makefile.am:
-TESTS += test-__func__
-check_PROGRAMS += test-__func__
diff --git a/modules/func b/modules/func
new file mode 100644 (file)
index 0000000..ecab6ad
--- /dev/null
@@ -0,0 +1,20 @@
+Description:
+Make sure __func__ is usable even on non-C99 platforms.
+
+Files:
+m4/func.m4
+
+Depends-on:
+
+configure.ac:
+gl_FUNC
+
+Makefile.am:
+
+Include:
+
+License:
+LGPL
+
+Maintainer:
+Simon Josefsson
diff --git a/modules/func-tests b/modules/func-tests
new file mode 100644 (file)
index 0000000..9be3324
--- /dev/null
@@ -0,0 +1,8 @@
+Files:
+tests/test-func.c
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-func
+check_PROGRAMS += test-func
diff --git a/tests/test-__func__.c b/tests/test-__func__.c
deleted file mode 100644 (file)
index 7b49026..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-/* Test whether __func__ is available
-   Copyright (C) 2008 Free Software Foundation, Inc.
-
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-/* Written by Bruno Haible <bruno@clisp.org>, 2008.  */
-
-#include <config.h>
-
-#include <string.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#define ASSERT(expr)                                                   \
-  do                                                                   \
-    {                                                                  \
-      if (!(expr))                                                     \
-       {                                                               \
-         fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
-         abort ();                                                     \
-       }                                                               \
-    }                                                                  \
-  while (0)
-
-int
-main ()
-{
-  ASSERT (strlen (__func__) + 1 == sizeof __func__);
-  return 0;
-}
diff --git a/tests/test-func.c b/tests/test-func.c
new file mode 100644 (file)
index 0000000..7b49026
--- /dev/null
@@ -0,0 +1,41 @@
+/* Test whether __func__ is available
+   Copyright (C) 2008 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2008.  */
+
+#include <config.h>
+
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+#define ASSERT(expr)                                                   \
+  do                                                                   \
+    {                                                                  \
+      if (!(expr))                                                     \
+       {                                                               \
+         fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
+         abort ();                                                     \
+       }                                                               \
+    }                                                                  \
+  while (0)
+
+int
+main ()
+{
+  ASSERT (strlen (__func__) + 1 == sizeof __func__);
+  return 0;
+}