diff --git a/src/xpdev/ini_file.c b/src/xpdev/ini_file.c index 150244ddfee75ec7eae08dd38c7035db3f961631..dfd2309c1860c8cfd302373699dcba89a10c8a02 100644 --- a/src/xpdev/ini_file.c +++ b/src/xpdev/ini_file.c @@ -38,7 +38,9 @@ #include <stdlib.h> /* strtol */ #include <string.h> /* strlen */ #include <ctype.h> /* isdigit */ -#include "sockwrap.h" /* inet_addr */ +#if !defined(NO_SOCKET_SUPPORT) + #include "sockwrap.h" /* inet_addr */ +#endif #include "filewrap.h" /* chsize */ #include "ini_file.h" @@ -363,6 +365,7 @@ char* iniSetFloat(str_list_t* list, const char* section, const char* key, double return iniSetString(list, section, key, str, style); } +#if !defined(NO_SOCKET_SUPPORT) char* iniSetIpAddress(str_list_t* list, const char* section, const char* key, ulong value ,ini_style_t* style) { @@ -370,6 +373,7 @@ char* iniSetIpAddress(str_list_t* list, const char* section, const char* key, ul in_addr.s_addr=value; return iniSetString(list, section, key, inet_ntoa(in_addr), style); } +#endif char* iniSetBool(str_list_t* list, const char* section, const char* key, BOOL value ,ini_style_t* style) @@ -625,6 +629,7 @@ ushort iniGetShortInt(FILE* fp, const char* section, const char* key, ushort def return((ushort)iniGetInteger(fp, section, key, deflt)); } +#if !defined(NO_SOCKET_SUPPORT) ulong iniGetIpAddress(FILE* fp, const char* section, const char* key, ulong deflt) { char buf[INI_MAX_VALUE_LEN]; @@ -641,6 +646,7 @@ ulong iniGetIpAddress(FILE* fp, const char* section, const char* key, ulong defl return(ntohl(inet_addr(value))); } +#endif double iniGetFloat(FILE* fp, const char* section, const char* key, double deflt) {