glibc/manual/examples
Collin Funk a8ad2e9e43 manual: Fix missing declaration in inetcli example.
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>
2025-09-29 17:01:54 -07:00
..
README
add.c
argp-ex1.c
argp-ex2.c
argp-ex3.c
argp-ex4.c
atexit.c
db.c manual: Fix missing include in group and user database example. 2025-09-29 17:01:54 -07:00
dir.c
dir2.c
execinfo.c
filecli.c
filesrv.c manual: Fix compiler errors in filesrv example. 2025-09-29 17:01:54 -07:00
fmtmsgexpl.c
inetcli.c manual: Fix missing declaration in inetcli example. 2025-09-29 17:01:54 -07:00
inetsrv.c manual: Fix compiler errors in inetsrv example. 2025-09-29 17:01:54 -07:00
isockad.c
longopt.c
mbstouwcs.c manual: Fix missing includes in the mbstouwcs example. 2025-09-29 17:01:54 -07:00
memopen.c manual: Fix missing include in memopen example. 2025-09-29 17:01:54 -07:00
memstrm.c manual: Add missing free to open_memstream example [BZ #27866] 2025-06-25 14:26:32 +02:00
mkdirent.c
mkfsock.c
mkisock.c
mygetpass.c
ofdlocks.c
pipe.c
popen.c
rprintf.c
search.c
select.c manual: Fix missing declaration in select example. 2025-09-29 17:01:54 -07:00
setjmp.c manual: Fix missing declaration in setjmp example. 2025-09-29 17:01:54 -07:00
sigh1.c manual: fix missing include in sigh1 example. 2025-09-29 17:01:54 -07:00
sigusr.c manual: Fix missing include in sigusr example. 2025-09-29 17:01:54 -07:00
stpcpy.c
strdupa.c manual: Fix missing declaration in strdupa example. 2025-09-29 17:01:54 -07:00
strftim.c
subopt.c manual: Allow getsubopt example to compile with GCC 15. 2025-09-29 17:01:54 -07:00
swapcontext.c
termios.c
testopt.c
timespec_subtract.c
twalk.c manual: Fix missing declaration in twalk example. 2025-09-29 17:01:54 -07:00

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.