netdb: improve documentation of LWIP_DNS_API_HOSTENT_STORAGE

This commit is contained in:
Simon Goldschmidt 2021-03-05 13:04:59 +01:00
parent 8a900aa81f
commit 0056522cc9

View File

@ -61,13 +61,18 @@ struct gethostbyname_r_helper {
int h_errno;
#endif /* LWIP_DNS_API_DECLARE_H_ERRNO */
/** define "hostent" variables storage: 0 if we use a static (but unprotected)
* set of variables for lwip_gethostbyname, 1 if we use a local storage */
/** LWIP_DNS_API_HOSTENT_STORAGE: if set to 0 (default), lwip_gethostbyname()
* returns the same global variabe for all calls (in all threads).
* When set to 1, your port should provide a function
* struct hostent* sys_thread_hostent( struct hostent* h);
* which have to do a copy of "h" and return a pointer ont the "per-thread"
* copy.
*/
#ifndef LWIP_DNS_API_HOSTENT_STORAGE
#define LWIP_DNS_API_HOSTENT_STORAGE 0
#endif
/** define "hostent" variables storage */
/* define "hostent" variables storage */
#if LWIP_DNS_API_HOSTENT_STORAGE
#define HOSTENT_STORAGE
#else