Documented GVF_SAVE_VAR alongside other flags, and removed a query/doubt
[AROS.git] / arch / all-mingw32 / bsdsocket / inet_ntoa.c
blobd8cbf1ada8f2bdd382f90a7ce032411ae95cf391
1 /*
2 Copyright © 2000-2013, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc:
6 Lang: English
7 */
9 #include "bsdsocket_intern.h"
10 #include "netdb_util.h"
12 /*****************************************************************************
14 NAME */
16 AROS_LH1(char *, Inet_NtoA,
18 /* SYNOPSIS */
19 AROS_LHA(unsigned long, in, D0),
21 /* LOCATION */
22 struct TaskBase *, taskBase, 29, BSDSocket)
24 /* FUNCTION
26 INPUTS
28 RESULT
30 NOTES
32 EXAMPLE
34 BUGS
36 SEE ALSO
38 INTERNALS
40 HISTORY
42 *****************************************************************************/
44 AROS_LIBFUNC_INIT
46 struct bsdsocketBase *SocketBase = taskBase->glob;
47 char *res;
48 struct in_addr a;
50 D(bug("[bsdsocket] Inet_NToA(0x%08lX)\n", in));
51 a.s_addr = in;
53 Forbid();
55 res = WSinet_ntoa(a);
56 if (res)
57 res = CopyString(res, taskBase->pool);
59 Permit();
61 if (res)
63 FreeVecPooled(taskBase->inaddr, taskBase->pool);
64 taskBase->inaddr = res;
67 Permit();
69 D(bug("[inet_ntoa] Result: %s\n", res));
70 return res;
72 AROS_LIBFUNC_EXIT
74 } /* Inet_NtoA */