dcp::locale_convert (long int x, int, bool)
{
char buffer[64];
+#ifdef LIBDCP_WINDOWS
+ __mingw_snprintf (buffer, sizeof(buffer), "%ld", x);
+#else
snprintf (buffer, sizeof(buffer), "%ld", x);
+#endif
return buffer;
}
}
template<>
-int64_t
+long
+dcp::locale_convert (string x, int, bool)
+{
+ long int y = 0;
+ sscanf (x.c_str(), "%ld", &y);
+ return y;
+}
+
+template<>
+long long
dcp::locale_convert (string x, int, bool)
{
- int64_t y = 0;
- sscanf (x.c_str(), "%" PRId64, &y);
+ long long y = 0;
+#ifdef LIBDCP_WINDOWS
+ __mingw_sscanf (x.c_str(), "%lld", &y);
+#else
+ sscanf (x.c_str(), "%lld", &y);
+#endif
return y;
}