mirror of git://sourceware.org/git/glibc.git
Previously this file failed to compile with the following errors:
$ gcc manual/examples/inetcli.c
manual/examples/inetcli.c: In function ‘write_to_server’:
manual/examples/inetcli.c:36:37: error: implicit declaration of function ‘strlen’ [-Wimplicit-function-declaration]
36 | nbytes = write (filedes, MESSAGE, strlen (MESSAGE) + 1);
| ^~~~~~
manual/examples/inetcli.c:26:1: note: include ‘<string.h>’ or provide a declaration of ‘strlen’
25 | #include <netdb.h>
+++ |+#include <string.h>
26 |
manual/examples/inetcli.c:36:37: warning: incompatible implicit declaration of built-in function ‘strlen’ [-Wbuiltin-declaration-mismatch]
36 | nbytes = write (filedes, MESSAGE, strlen (MESSAGE) + 1);
| ^~~~~~
manual/examples/inetcli.c:36:37: note: include ‘<string.h>’ or provide a declaration of ‘strlen’
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
|
||
|---|---|---|
| .. | ||
| README | ||
| add.c | ||
| argp-ex1.c | ||
| argp-ex2.c | ||
| argp-ex3.c | ||
| argp-ex4.c | ||
| atexit.c | ||
| db.c | ||
| dir.c | ||
| dir2.c | ||
| execinfo.c | ||
| filecli.c | ||
| filesrv.c | ||
| fmtmsgexpl.c | ||
| inetcli.c | ||
| inetsrv.c | ||
| isockad.c | ||
| longopt.c | ||
| mbstouwcs.c | ||
| memopen.c | ||
| memstrm.c | ||
| mkdirent.c | ||
| mkfsock.c | ||
| mkisock.c | ||
| mygetpass.c | ||
| ofdlocks.c | ||
| pipe.c | ||
| popen.c | ||
| rprintf.c | ||
| search.c | ||
| select.c | ||
| setjmp.c | ||
| sigh1.c | ||
| sigusr.c | ||
| stpcpy.c | ||
| strdupa.c | ||
| strftim.c | ||
| subopt.c | ||
| swapcontext.c | ||
| termios.c | ||
| testopt.c | ||
| timespec_subtract.c | ||
| twalk.c | ||
README
These are source files for example code that appears in The GNU C Library Reference Manual. While the manual itself is licensed under the terms of the GNU Free Documentation License, you can use these source files on their own under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License, or (at your option) any later version.