annotate doc/func.texi @ 17363:5a51fb7777a9

sys_select, sys_time: port 2013-01-30 Solaris 2.6 fix to Cygwin Problem reported by Marco Atzeri in <http://lists.gnu.org/archive/html/bug-gnulib/2013-03/msg00000.html>. * lib/sys_select.in.h [HAVE_SYS_SELECT_H && _CYGWIN_SYS_TIME_H]: Simply delegate to the system <sys/select.h> in this case too. Also, pay attention to _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TIME_H only if OSF/1, since otherwise Cygwin breaks, and it doesn't seem to be needed on Solaris either. * lib/sys_time.in.h [_CYGWIN_SYS_TIME_H]: Simply delgate to the system <sys/time.h> in this case.
author Paul Eggert <eggert@cs.ucla.edu>
date Tue, 19 Mar 2013 09:08:47 -0700
parents 6b25bda86ddb
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
9764
d0febee6878d Move the documentation of module 'func' to its own file.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
1 @node func
d0febee6878d Move the documentation of module 'func' to its own file.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
2 @section func
d0febee6878d Move the documentation of module 'func' to its own file.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
3
d0febee6878d Move the documentation of module 'func' to its own file.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
4 The @code{func} module makes sure that you can use the predefined
d0febee6878d Move the documentation of module 'func' to its own file.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
5 identifier @code{__func__} as defined by C99 in your code.
d0febee6878d Move the documentation of module 'func' to its own file.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
6
d0febee6878d Move the documentation of module 'func' to its own file.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
7 A small example is:
d0febee6878d Move the documentation of module 'func' to its own file.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
8
d0febee6878d Move the documentation of module 'func' to its own file.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
9 @smallexample
d0febee6878d Move the documentation of module 'func' to its own file.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
10 #include <config.h>
d0febee6878d Move the documentation of module 'func' to its own file.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
11 #include <stdio.h> /* for printf */
d0febee6878d Move the documentation of module 'func' to its own file.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
12
d0febee6878d Move the documentation of module 'func' to its own file.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
13 int main (void)
d0febee6878d Move the documentation of module 'func' to its own file.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
14 @{
d0febee6878d Move the documentation of module 'func' to its own file.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
15 printf ("%s: hello world\n", __func__);
d0febee6878d Move the documentation of module 'func' to its own file.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
16 @}
d0febee6878d Move the documentation of module 'func' to its own file.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
17 @end smallexample
11906
6b25bda86ddb Avoid sizeof __func__ == 0 pitfall.
Bruno Haible <bruno@clisp.org>
parents: 9764
diff changeset
18
6b25bda86ddb Avoid sizeof __func__ == 0 pitfall.
Bruno Haible <bruno@clisp.org>
parents: 9764
diff changeset
19 Note that @code{sizeof} cannot be applied to @code{__func__}: On SunPRO C
6b25bda86ddb Avoid sizeof __func__ == 0 pitfall.
Bruno Haible <bruno@clisp.org>
parents: 9764
diff changeset
20 compiler, @code{sizeof __func__} evaluates to 0.