refactor(build): graduate HAVE_LOCALE_H feature

Merge locale.h into os/lang.h
Having a source file with the same name as a system header we use is
considered an anti-pattern.
This commit is contained in:
bfredl
2023-02-27 19:37:43 +01:00
committed by Björn Linse
parent 166b149d5b
commit 1b3c1f6c06
12 changed files with 347 additions and 411 deletions

View File

@@ -41,7 +41,6 @@
#include "nvim/highlight.h"
#include "nvim/highlight_group.h"
#include "nvim/keycodes.h"
#include "nvim/locale.h"
#include "nvim/log.h"
#include "nvim/lua/executor.h"
#include "nvim/macros.h"
@@ -60,6 +59,7 @@
#include "nvim/optionstr.h"
#include "nvim/os/fileio.h"
#include "nvim/os/input.h"
#include "nvim/os/lang.h"
#include "nvim/os/os.h"
#include "nvim/os/stdpaths_defs.h"
#include "nvim/os/time.h"
@@ -192,12 +192,10 @@ void early_init(mparm_T *paramp)
TIME_MSG("early init");
#if defined(HAVE_LOCALE_H)
// Setup to use the current locale (for ctype() and many other things).
// NOTE: Translated messages with encodings other than latin1 will not
// work until set_init_1() has been called!
init_locale();
#endif
// tabpage local options (p_ch) must be set before allocating first tabpage.
set_init_tablocal();