VirtualBox

Changeset 18055 in vbox for trunk/src/VBox/Runtime


Ignore:
Timestamp:
Mar 18, 2009 12:01:51 PM (16 years ago)
Author:
vboxsync
Message:

Runtime: call setlocale from RTR3Init, not as a global initialiser

Location:
trunk/src/VBox/Runtime
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/string/string.cpp

    r8245 r18055  
    3838#include <iprt/err.h>
    3939#include "internal/string.h"
    40 
    41 #include <locale.h>
    42 
    43 
    44 /**
    45  * Init C runtime locale
    46  * note: actually where is no need in this global var, use it only for
    47  * auto run of setlocale() func.
    48  */
    49 /** @todo rewrite this to do setlocale() from some proper init function. */
    50 static int g_RTLocaleInited = (setlocale(LC_CTYPE, "") != NULL);
    51 
    5240
    5341/**
  • trunk/src/VBox/Runtime/r3/init.cpp

    r14856 r18055  
    5555# include <stdlib.h>
    5656#endif
     57
     58#include <locale.h>
     59
    5760#include "internal/path.h"
    5861#include "internal/process.h"
     
    260263    g_u64ProgramStartMilliTS = g_u64ProgramStartNanoTS / 1000000;
    261264
     265    /**
     266     * Init C runtime locale
     267     */
     268    char *pcDummy = setlocale(LC_CTYPE, "");
     269
    262270    /*
    263271     * More stuff to come?
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette