From b4feec417c7eae7c4a920986d8c81659ac5c9a79 Mon Sep 17 00:00:00 2001 From: Simon Josefsson Date: Thu, 6 Mar 2008 12:01:44 +0100 Subject: [PATCH] Rename __func__ module to func. Suggested by Eric Blake . --- doc/gnulib.texi | 8 ++++---- m4/{__func__.m4 => func.m4} | 12 ++++++------ modules/__func__-tests | 8 -------- modules/{__func__ => func} | 4 ++-- modules/func-tests | 8 ++++++++ tests/{test-__func__.c => test-func.c} | 0 6 files changed, 20 insertions(+), 20 deletions(-) rename m4/{__func__.m4 => func.m4} (68%) delete mode 100644 modules/__func__-tests rename modules/{__func__ => func} (86%) create mode 100644 modules/func-tests rename tests/{test-__func__.c => test-func.c} (100%) diff --git a/doc/gnulib.texi b/doc/gnulib.texi index 8de6d8ee5..ddccc5c2f 100644 --- a/doc/gnulib.texi +++ b/doc/gnulib.texi @@ -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 similarity index 68% rename from m4/__func__.m4 rename to m4/func.m4 index ee39f42f9..d02bce8a8 100644 --- a/m4/__func__.m4 +++ b/m4/func.m4 @@ -1,4 +1,4 @@ -# __func__.m4 serial 1 +# 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, @@ -6,14 +6,14 @@ dnl with or without modifications, as long as this notice is preserved. # Written by Simon Josefsson -AC_DEFUN([gl___FUNC__], +AC_DEFUN([gl_FUNC], [ - AC_CACHE_CHECK([whether __func__ is available], [gl_cv_var___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 + [gl_cv_var_func=yes], + [gl_cv_var_func=no])) + if test "$gl_cv_var_func" != yes; then AC_DEFINE([__func__], [""], [Define as a replacement for the ISO C99 __func__ variable.]) fi diff --git a/modules/__func__-tests b/modules/__func__-tests deleted file mode 100644 index 4d821a3f8..000000000 --- a/modules/__func__-tests +++ /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 similarity index 86% rename from modules/__func__ rename to modules/func index 79eae7578..ecab6ad2d 100644 --- a/modules/__func__ +++ b/modules/func @@ -2,12 +2,12 @@ Description: Make sure __func__ is usable even on non-C99 platforms. Files: -m4/__func__.m4 +m4/func.m4 Depends-on: configure.ac: -gl___FUNC__ +gl_FUNC Makefile.am: diff --git a/modules/func-tests b/modules/func-tests new file mode 100644 index 000000000..9be33248e --- /dev/null +++ b/modules/func-tests @@ -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 similarity index 100% rename from tests/test-__func__.c rename to tests/test-func.c -- 2.11.0