From: Simon Josefsson Date: Thu, 6 Mar 2008 10:16:06 +0000 (+0100) Subject: Minor cleanups of __func__ module, suggested by Eric Blake . X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e2b0fa9ef05ff15dba4f7051e8eede3a27b80589;p=pspp Minor cleanups of __func__ module, suggested by Eric Blake . --- diff --git a/ChangeLog b/ChangeLog index 7b9fa0282a..16caed62cb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2008-03-06 Simon Josefsson + + * doc/gnulib.texi (__func__): Use C99 terminology when talking + about __func__. Make example self-contained. Suggested by Eric + Blake . + + * tests/test-__func__.c (main): Avoid extraneous () around __func. + Suggested by Eric Blake . + 2008-03-05 Simon Josefsson * modules/byteswap (License): Re-license as LGPLv2+. diff --git a/doc/gnulib.texi b/doc/gnulib.texi index 31f51df92d..8de6d8ee59 100644 --- a/doc/gnulib.texi +++ b/doc/gnulib.texi @@ -5829,15 +5829,19 @@ generated automatically. @node __func__ @section __func__ -The @code{__func__} module makes sure that you can use the -@code{__func__} variable as defined by C99 in your code. +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: @smallexample #include -... -printf ("%s: something happened\n", __func__); +#include /* for printf */ + +int main (void) +@{ + printf ("%s: hello world\n", __func__); +@} @end smallexample @node GNU Free Documentation License diff --git a/tests/test-__func__.c b/tests/test-__func__.c index afa6159a2a..7b49026728 100644 --- a/tests/test-__func__.c +++ b/tests/test-__func__.c @@ -36,6 +36,6 @@ int main () { - ASSERT (strlen (__func__) + 1 == sizeof (__func__)); + ASSERT (strlen (__func__) + 1 == sizeof __func__); return 0; }