https://github.com/JuliaLang/julia
Raw File
Tip revision: e58d3ecfbd48ac457ca3b5ef64653d47f2a6a8aa authored by Valentin Churavy on 13 October 2016, 05:26:14 UTC
workaround 32bit platforms not having support for 128bit integers
Tip revision: e58d3ec
libsupportinit.c
// This file is a part of Julia. License is MIT: http://julialang.org/license

#include <locale.h>
#include "libsupport.h"

#ifdef __cplusplus
extern "C" {
#endif

static int isInitialized = 0;

void libsupport_init(void)
{
    if (!isInitialized) {
#ifdef _OS_WINDOWS_
        SetConsoleCP(1252); // ANSI Latin1; Western European (Windows)
#endif
        setlocale(LC_ALL, ""); // set to user locale
        setlocale(LC_NUMERIC, "C"); // use locale-independent numeric formats

        ios_init_stdstreams();

        isInitialized=1;
    }
}

#ifdef __cplusplus
}
#endif
back to top