static char *buffer;
GETFUNC_NAME (void){  static char *buffer;  static size_t buffer_size;  static LOOKUP_TYPE resbuf;  LOOKUP_TYPE *result;  int save;  /* Get lock.  */  __libc_lock_lock (lock);  if (buffer == NULL)    {      buffer_size = BUFLEN;      buffer = malloc (buffer_size);    }  while (buffer != NULL	 && INTERNAL (REENTRANT_GETNAME) (&resbuf, buffer, buffer_size, &result					  H_ERRNO_VAR) != 0#ifdef NEED_H_ERRNO	 && h_errno == NETDB_INTERNAL#endif	 && errno == ERANGE)    {      char *new_buf;      buffer_size += BUFLEN;      new_buf = realloc (buffer, buffer_size);      if (new_buf == NULL)	{	  /* We are out of memory.  Free the current buffer so that the	     process gets a chance for a normal termination.  */	  save = errno;	  free (buffer);	  __set_errno (save);	}      buffer = new_buf;    }  if (buffer == NULL)    result = NULL;  /* Release lock.  Preserve error value.  */  save = errno;  __libc_lock_unlock (lock);  __set_errno (save);  return result;}