X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/a5bb534ab656e9eaab163c22df0325d3baa3ce40..327ec384624ea69aa0e02f89d5513e31752fef90:/stglibs/common.lib/common.cpp?ds=sidebyside diff --git a/stglibs/common.lib/common.cpp b/stglibs/common.lib/common.cpp index eb39da6a..57b37bdf 100644 --- a/stglibs/common.lib/common.cpp +++ b/stglibs/common.lib/common.cpp @@ -23,8 +23,8 @@ */ /* - $Revision: 1.41 $ - $Date: 2010/11/03 10:26:30 $ + $Revision: 1.42 $ + $Date: 2010/11/08 10:11:19 $ $Author: faust $ */ @@ -54,9 +54,18 @@ #include #endif*/ +#ifdef FREE_BSD +#include +#endif + +#ifdef WIN32 +#include +#else #include #include #include +#endif + #include #include @@ -406,7 +415,7 @@ for (int i = 0; i < maxIP; i++) } struct in_addr in; - if (!inet_aton(p1, &in)) + if (inet_pton(AF_INET, p1, &in) != 1) { //printf("INADDR_NONE\n"); return EINVAL; @@ -779,6 +788,11 @@ const std::string & x2str(unsigned x, std::string & s) return unsigned2str(x, s); } //--------------------------------------------------------------------------- +const std::string & x2str(unsigned long x, std::string & s) +{ +return unsigned2str(x, s); +} +//--------------------------------------------------------------------------- const std::string & x2str(unsigned long long x, std::string & s) { return unsigned2str(x, s);