File tree Expand file tree Collapse file tree 1 file changed +1
-2
lines changed Expand file tree Collapse file tree 1 file changed +1
-2
lines changed Original file line number Diff line number Diff line change 13451345thread safe. That said, it does not make it totally safe to use.
13461346(not mentioning that a program relying on this behavior is not portable)
13471347see example \example {reentrant/gethostbyname.c}.
1348- A bit better is to use reentrantní version of this function called
1348+ A bit better is to use reentrant version of this function called
13491349\texttt {gethostbyname\_ r } (if it is available on given system),
13501350which takes the address of where the result will be stored as parameter,
13511351which makes it reentrant. Much better is to use standard function
13521352\texttt {getaddrinfo } (see page) \pageref {GETADDRINFO }, which is reentrant
13531353by itself.
13541354
1355-
13561355\item Example: \example {reentrant/inet\_ ntoa.c} -- shows that even
13571356function written like so does not help if it is called twice within
13581357the same call of \texttt {printf }. Each time it returns pointer with
You can’t perform that action at this time.
0 commit comments