enh: osSetSystemLocale

This commit is contained in:
facetosea 2024-11-13 13:24:45 +08:00
parent 8e2ded98dd
commit 77ed0ee1c5
1 changed files with 2 additions and 3 deletions

View File

@ -127,9 +127,8 @@ bool osTempSpaceSufficient() { return tsTempSpace.size.avail > tsTempSpace.reser
int32_t osSetTimezone(const char *tz) { return taosSetSystemTimezone(tz, tsTimezoneStr, &tsDaylight, &tsTimezone); } int32_t osSetTimezone(const char *tz) { return taosSetSystemTimezone(tz, tsTimezoneStr, &tsDaylight, &tsTimezone); }
void osSetSystemLocale(const char *inLocale, const char *inCharSet) { void osSetSystemLocale(const char *inLocale, const char *inCharSet) {
if (inLocale == NULL || inCharSet == NULL) return; if (!inLocale) (void)memcpy(tsLocale, inLocale, strlen(inLocale) + 1);
(void)memcpy(tsLocale, inLocale, strlen(inLocale) + 1); if (!inCharSet) (void)memcpy(tsCharset, inCharSet, strlen(inCharSet) + 1);
(void)memcpy(tsCharset, inCharSet, strlen(inCharSet) + 1);
} }
void osSetProcPath(int32_t argc, char **argv) { void osSetProcPath(int32_t argc, char **argv) {