Introduce nvim namespace: Fix unmasked strings.h issue.

Problem:  Now that nvim/strings.h is correctly namespaced, an issue
          that had been masked until now arises:

          When compiling, we get a lot of errors because of everywhere
          the functions in nvim/strings.h are used, there's no include
          to import them.

          But, how could this compile and work previously, then? It
          turns out that:
          - In every such case, we are also including vim.h, which in
            turn includes os_unix_defs.h.
          - os_unix_defs.h includes <string.h> and also <strings.h> in
            some systems (e.g. OSX).
          - Build had been modified previously to (even when importing
            system headers), prefer equally-named local ones. That was
            in fact done as a previous attempt to solve the same issue
            we are trying to solve another way now.

          So, we were including our "strings.h" as a side-effect of
          including <strings.h> through "vim.h" --> "os_unix_defs.h".

Solution: Correctly include "nvim/strings.h" in every file needing it.
This commit is contained in:
Eliseo Martínez 2014-05-12 12:12:27 +02:00
parent 409cc138f2
commit 762a8ad0f3
53 changed files with 53 additions and 1 deletions

View File

@ -60,6 +60,7 @@
#include "nvim/regexp.h"
#include "nvim/screen.h"
#include "nvim/spell.h"
#include "nvim/strings.h"
#include "nvim/syntax.h"
#include "nvim/term.h"
#include "nvim/ui.h"

View File

@ -18,6 +18,7 @@
#include "nvim/garray.h"
#include "nvim/move.h"
#include "nvim/os_unix.h"
#include "nvim/strings.h"
static int win_chartabsize(win_T *wp, char_u *p, colnr_T col);

View File

@ -17,6 +17,7 @@
#include "nvim/ex_getln.h"
#include "nvim/message.h"
#include "nvim/option.h"
#include "nvim/strings.h"
static void make_crc_tab(void);

View File

@ -3,6 +3,7 @@
#include "nvim/misc2.h"
#include "nvim/ex_getln.h"
#include "nvim/charset.h"
#include "nvim/strings.h"
#include "nvim/syntax.h"
/*

View File

@ -23,6 +23,7 @@
#include "nvim/option.h"
#include "nvim/path.h"
#include "nvim/screen.h"
#include "nvim/strings.h"
#include "nvim/undo.h"
#include "nvim/window.h"
#include "nvim/os/os.h"

View File

@ -16,6 +16,7 @@
#include "nvim/garray.h"
#include "nvim/normal.h"
#include "nvim/screen.h"
#include "nvim/strings.h"
#include "nvim/ui.h"
typedef int result_T;

View File

@ -45,6 +45,7 @@
#include "nvim/screen.h"
#include "nvim/search.h"
#include "nvim/spell.h"
#include "nvim/strings.h"
#include "nvim/syntax.h"
#include "nvim/tag.h"
#include "nvim/term.h"

View File

@ -54,6 +54,7 @@
#include "nvim/search.h"
#include "nvim/sha256.h"
#include "nvim/spell.h"
#include "nvim/strings.h"
#include "nvim/syntax.h"
#include "nvim/tag.h"
#include "nvim/term.h"

View File

@ -51,6 +51,7 @@
#include "nvim/screen.h"
#include "nvim/search.h"
#include "nvim/spell.h"
#include "nvim/strings.h"
#include "nvim/syntax.h"
#include "nvim/tag.h"
#include "nvim/term.h"

View File

@ -39,6 +39,7 @@
#include "nvim/quickfix.h"
#include "nvim/regexp.h"
#include "nvim/screen.h"
#include "nvim/strings.h"
#include "nvim/term.h"
#include "nvim/undo.h"
#include "nvim/window.h"

View File

@ -54,6 +54,7 @@
#include "nvim/screen.h"
#include "nvim/search.h"
#include "nvim/spell.h"
#include "nvim/strings.h"
#include "nvim/syntax.h"
#include "nvim/tag.h"
#include "nvim/term.h"

View File

@ -20,6 +20,7 @@
#include "nvim/misc2.h"
#include "nvim/memory.h"
#include "nvim/regexp.h"
#include "nvim/strings.h"
static void free_msglist(struct msglist *l);

View File

@ -49,6 +49,7 @@
#include "nvim/regexp.h"
#include "nvim/screen.h"
#include "nvim/search.h"
#include "nvim/strings.h"
#include "nvim/syntax.h"
#include "nvim/tag.h"
#include "nvim/term.h"

View File

@ -15,6 +15,7 @@
#include "nvim/misc1.h"
#include "nvim/misc2.h"
#include "nvim/screen.h"
#include "nvim/strings.h"
#include "nvim/vim.h"

View File

@ -56,6 +56,7 @@
#include "nvim/misc2.h"
#include "nvim/os_unix.h"
#include "nvim/path.h"
#include "nvim/strings.h"
#include "nvim/tag.h"
#include "nvim/ui.h"
#include "nvim/window.h"

View File

@ -45,6 +45,7 @@
#include "nvim/screen.h"
#include "nvim/search.h"
#include "nvim/sha256.h"
#include "nvim/strings.h"
#include "nvim/term.h"
#include "nvim/ui.h"
#include "nvim/undo.h"

View File

@ -30,6 +30,7 @@
#include "nvim/move.h"
#include "nvim/option.h"
#include "nvim/screen.h"
#include "nvim/strings.h"
#include "nvim/syntax.h"
#include "nvim/undo.h"

View File

@ -10,6 +10,7 @@
#include "nvim/memory.h"
#include "nvim/path.h"
#include "nvim/garray.h"
#include "nvim/strings.h"
// #include "nvim/globals.h"
#include "nvim/memline.h"

View File

@ -40,6 +40,7 @@
#include "nvim/option.h"
#include "nvim/regexp.h"
#include "nvim/screen.h"
#include "nvim/strings.h"
#include "nvim/term.h"
#include "nvim/ui.h"
#include "nvim/undo.h"

View File

@ -31,6 +31,7 @@
#include "nvim/option.h"
#include "nvim/path.h"
#include "nvim/screen.h"
#include "nvim/strings.h"
#include "nvim/syntax.h"
#include "nvim/term.h"
#include "nvim/ui.h"

View File

@ -20,6 +20,7 @@
#include "nvim/os/time.h"
#include "nvim/path.h"
#include "nvim/quickfix.h"
#include "nvim/strings.h"
#include "nvim/tag.h"
#include "nvim/ui.h"
#include "nvim/window.h"

View File

@ -8,6 +8,7 @@
#include "nvim/option.h"
#include "nvim/regexp.h"
#include "nvim/search.h"
#include "nvim/strings.h"
#include "nvim/undo.h"
static int lisp_match(char_u *p);

View File

@ -9,6 +9,7 @@
#include "nvim/misc2.h"
#include "nvim/option.h"
#include "nvim/search.h"
#include "nvim/strings.h"
static char_u *skip_string(char_u *p);

View File

@ -43,6 +43,7 @@
#include "nvim/path.h"
#include "nvim/quickfix.h"
#include "nvim/screen.h"
#include "nvim/strings.h"
#include "nvim/syntax.h"
#include "nvim/term.h"
#include "nvim/ui.h"

View File

@ -32,6 +32,7 @@
#include "nvim/path.h"
#include "nvim/quickfix.h"
#include "nvim/search.h"
#include "nvim/strings.h"
#include "nvim/term.h"
#include "nvim/ui.h"
#include "nvim/os/os.h"

View File

@ -91,6 +91,7 @@
#include "nvim/option.h"
#include "nvim/screen.h"
#include "nvim/spell.h"
#include "nvim/strings.h"
#include "nvim/ui.h"
#include "nvim/os/os.h"

View File

@ -64,6 +64,7 @@
#include "nvim/screen.h"
#include "nvim/sha256.h"
#include "nvim/spell.h"
#include "nvim/strings.h"
#include "nvim/term.h"
#include "nvim/ui.h"
#include "nvim/undo.h"

View File

@ -25,6 +25,7 @@
#include "nvim/misc2.h"
#include "nvim/keymap.h"
#include "nvim/garray.h"
#include "nvim/strings.h"
#include "nvim/term.h"

View File

@ -31,6 +31,7 @@
#include "nvim/option.h"
#include "nvim/normal.h"
#include "nvim/screen.h"
#include "nvim/strings.h"
#include "nvim/term.h"
#include "nvim/ui.h"
#include "nvim/os/os.h"

View File

@ -43,6 +43,7 @@
#include "nvim/regexp.h"
#include "nvim/screen.h"
#include "nvim/search.h"
#include "nvim/strings.h"
#include "nvim/tag.h"
#include "nvim/term.h"
#include "nvim/ui.h"

View File

@ -43,6 +43,7 @@
#include "nvim/screen.h"
#include "nvim/search.h"
#include "nvim/spell.h"
#include "nvim/strings.h"
#include "nvim/syntax.h"
#include "nvim/tag.h"
#include "nvim/term.h"

View File

@ -28,6 +28,7 @@
#include "nvim/misc2.h"
#include "nvim/popupmnu.h"
#include "nvim/screen.h"
#include "nvim/strings.h"
static void comp_botline(win_T *wp);
static void redraw_for_cursorline(win_T *wp);

View File

@ -47,6 +47,7 @@
#include "nvim/screen.h"
#include "nvim/search.h"
#include "nvim/spell.h"
#include "nvim/strings.h"
#include "nvim/syntax.h"
#include "nvim/tag.h"
#include "nvim/term.h"

View File

@ -38,6 +38,7 @@
#include "nvim/path.h"
#include "nvim/screen.h"
#include "nvim/search.h"
#include "nvim/strings.h"
#include "nvim/term.h"
#include "nvim/ui.h"
#include "nvim/undo.h"

View File

@ -69,6 +69,7 @@
#include "nvim/regexp.h"
#include "nvim/screen.h"
#include "nvim/spell.h"
#include "nvim/strings.h"
#include "nvim/syntax.h"
#include "nvim/term.h"
#include "nvim/ui.h"

View File

@ -4,6 +4,7 @@
#include "nvim/os/os.h"
#include "nvim/misc2.h"
#include "nvim/strings.h"
#ifdef HAVE__NSGETENVIRON
#include <crt_externs.h>

View File

@ -6,6 +6,7 @@
#include "nvim/misc1.h"
#include "nvim/misc2.h"
#include "nvim/path.h"
#include "nvim/strings.h"
static bool is_executable(const char_u *name);
static bool is_executable_in_path(const char_u *name);

View File

@ -17,6 +17,7 @@
#include "nvim/memline.h"
#include "nvim/option_defs.h"
#include "nvim/charset.h"
#include "nvim/strings.h"
#define BUFFER_LENGTH 1024

View File

@ -5,6 +5,7 @@
#include "nvim/os/os.h"
#include "nvim/garray.h"
#include "nvim/misc2.h"
#include "nvim/strings.h"
#ifdef HAVE_PWD_H
# include <pwd.h>
#endif

View File

@ -45,6 +45,7 @@
#include "nvim/garray.h"
#include "nvim/path.h"
#include "nvim/screen.h"
#include "nvim/strings.h"
#include "nvim/syntax.h"
#include "nvim/term.h"
#include "nvim/ui.h"

View File

@ -22,6 +22,7 @@
#include "nvim/quickfix.h"
#include "nvim/regexp.h"
#include "nvim/screen.h"
#include "nvim/strings.h"
#include "nvim/tag.h"
#include "nvim/types.h"
#include "nvim/ui.h"

View File

@ -12,6 +12,7 @@
#include "nvim/option.h"
#include "nvim/screen.h"
#include "nvim/search.h"
#include "nvim/strings.h"
#include "nvim/window.h"
static pumitem_T *pum_array = NULL; // items of displayed pum

View File

@ -40,6 +40,7 @@
#include "nvim/regexp.h"
#include "nvim/screen.h"
#include "nvim/search.h"
#include "nvim/strings.h"
#include "nvim/term.h"
#include "nvim/ui.h"
#include "nvim/window.h"

View File

@ -57,6 +57,7 @@
#include "nvim/misc1.h"
#include "nvim/misc2.h"
#include "nvim/garray.h"
#include "nvim/strings.h"
#ifdef REGEXP_DEBUG
/* show/save debugging data when BT engine is used */

View File

@ -120,6 +120,7 @@
#include "nvim/regexp.h"
#include "nvim/search.h"
#include "nvim/spell.h"
#include "nvim/strings.h"
#include "nvim/syntax.h"
#include "nvim/term.h"
#include "nvim/ui.h"

View File

@ -38,6 +38,7 @@
#include "nvim/path.h"
#include "nvim/regexp.h"
#include "nvim/screen.h"
#include "nvim/strings.h"
#include "nvim/term.h"
#include "nvim/ui.h"
#include "nvim/window.h"

View File

@ -313,6 +313,7 @@
#include "nvim/regexp.h"
#include "nvim/screen.h"
#include "nvim/search.h"
#include "nvim/strings.h"
#include "nvim/syntax.h"
#include "nvim/term.h"
#include "nvim/ui.h"

View File

@ -36,6 +36,7 @@
#include "nvim/path.h"
#include "nvim/regexp.h"
#include "nvim/screen.h"
#include "nvim/strings.h"
#include "nvim/term.h"
#include "nvim/ui.h"
#include "nvim/os/os.h"

View File

@ -41,6 +41,7 @@
#include "nvim/regexp.h"
#include "nvim/screen.h"
#include "nvim/search.h"
#include "nvim/strings.h"
#include "nvim/term.h"
#include "nvim/ui.h"
#include "nvim/window.h"

View File

@ -44,6 +44,7 @@
#include "nvim/os_unix.h"
#include "nvim/popupmnu.h"
#include "nvim/screen.h"
#include "nvim/strings.h"
#include "nvim/syntax.h"
#include "nvim/ui.h"
#include "nvim/window.h"

View File

@ -102,6 +102,7 @@
#include "nvim/quickfix.h"
#include "nvim/screen.h"
#include "nvim/sha256.h"
#include "nvim/strings.h"
#include "nvim/os/os.h"
#include "nvim/os/time.h"

View File

@ -17,7 +17,7 @@
#include "nvim/message.h"
#include "nvim/misc2.h"
#include "nvim/screen.h"
#include "nvim/strings.h"
#include "nvim/version_defs.h"
char *Version = VIM_VERSION_SHORT;

View File

@ -41,6 +41,7 @@
#include "nvim/regexp.h"
#include "nvim/screen.h"
#include "nvim/search.h"
#include "nvim/strings.h"
#include "nvim/syntax.h"
#include "nvim/term.h"
#include "nvim/undo.h"