Commit Graph

120 Commits

Author SHA1 Message Date
erw7
b2f1969f82 option: fix problem with fileignorecase not being set properly 2021-02-25 13:50:30 +09:00
Zachary P. Landau
d4fc7b25e8 basic support for usdt probes 2020-10-10 09:52:12 +02:00
James McCoy
37fa8d3f44
Disable -Wimplicit-fallthrough for funcs.generated.h
This is code generated by gperf, so there's nothing we can do about it.
The code does have /*FALLTHROUGH*/ comments but clang doesn't recognize
them.
2020-08-23 20:59:39 -04:00
Justin M. Keyes
ad4eb18e43 Merge #10098 'win: fix msg_puts_printf()' 2019-08-12 02:42:13 +02:00
erw7
d6f15ccc3c remove DYNAMIC_ICONV 2019-08-06 12:44:22 +09:00
Justin M. Keyes
3b504e7c8d
fileio.c: eliminate set_file_time() #10357
Introduce os_file_settime(), remove cruft.
2019-06-30 16:00:35 +02:00
erw7
1fbc01f4ab Fix problems with message catalog directory
- In appimage, the message catalog is not used because there is no
  message catalog in LOCALE_INSTALL_DIR. Therefore, change to
  exepath/../share/locale instead of LOCALE_INSTALL_DIR.
- The old vim style($runtime/lang) is no longer used. Thus all relevant
  code is removed.
2019-06-09 13:28:10 +09:00
Justin M. Keyes
1de77bbcec
cleanup: remove HAVE_SELINUX #10040
We never define HAVE_SELINUX, and no one has asked for it.
So remove the dead code.
2019-05-21 11:15:10 +02:00
Justin M. Keyes
6cd4ff2ab7
os: remove uv_translate_sys_error impl #9652
Since libuv minimum version is now v1.12, we can use libuv's impl.
2019-03-01 02:34:32 +01:00
Justin M. Keyes
89515304e4 os/env: use libuv v1.12 getenv/setenv API
- Minimum required libuv is now v1.12
- Because `uv_os_getenv` requires allocating, we must manage a map
  (`envmap` in `env.c`) to maintain the old behavior of `os_getenv` .
- free() map-items after removal. khash.h does not make copies of
  anything, so even its keys must be memory-managed by the caller.

closes #8398
closes #9267
2019-02-27 23:29:07 +01:00
Justin M. Keyes
9153062095 os_setenv: use _wputenv_s; remove vestigial code #7920
_putenv_s variant was left over from 810d31a430, should have been
removed in cd5b131575.
2019-02-25 23:47:54 +01:00
James McCoy
7e3300f717
Merge pull request #9526 from jamessan/remove-jemalloc
Remove support for using jemalloc instead of the system allocator
2019-01-20 13:58:38 -05:00
Justin M. Keyes
dbba685c69 build: include auto/config.h explicitly
Otherwise the symbols defined in config/config.h.in may not be defined,
depending on include-order.
2019-01-20 00:18:39 +01:00
James McCoy
c2343180d7
Remove support for using jemalloc instead of the system allocator
There was never any investigation done to determine whether using
jemalloc was actually a net benefit for nvim.  It has been a portability
limitation and adds another factor to consider when triaging issues.
2019-01-19 18:09:52 -05:00
Mahmoud Al-Qudsi
5d2dd2ebe2 win: has("wsl") on Windows Subsystem for Linux #7330
Per CMAKE docs, CMAKE_HOST_SYSTEM_VERSION is the result of `uname -r`:
https://cmake.org/cmake/help/v3.4/variable/CMAKE_HOST_SYSTEM_VERSION.html?highlight=uname

    A numeric version string for the system. On systems that support
    uname, this variable is set to the output of uname -r. On other
    systems this is set to major-minor version numbers.

On Windows it is something like "6.1", so it won't match ".*-Microsoft".

Closes #7329
2018-01-30 21:12:49 +01:00
ZyX
6a1557f2f4 eval/typval: Log list actions
New logging is guarded by cmake LOG_LIST_ACTIONS define. To make it more
efficient it is allocated as a linked list with chunks of length
2^(7+chunk_num); that uses basically the same idea as behind increasing kvec
length (make appending O(1) (amortized)), but reduces constant by not bothering
to move memory around what realloc() would surely do: it is not like we need
random access to log entries here to justify usage of a single continuous memory
block.
2018-01-14 01:33:18 +03:00
Justin M. Keyes
a7538371fe build: linux does not always have execinfo.h (#7101)
Closes #7099
2017-07-30 23:02:41 +02:00
Justin M. Keyes
432e9e5a2e build: Do not check for obsolete <termio.h> 2016-12-24 17:41:06 +01:00
Justin M. Keyes
af2e629be4 tui: check stty/termios for kbs
Requires libtermkey 0.19+

Closes #2048
Closes #5693

See a9b61424aa%5E...c0eb4e4a05f49ad8fee0195c77f2c29d09cc36af
See https://bugzilla.redhat.com/show_bug.cgi?id=142659
See fe4e9470bb/tty-keys.c (L625-L632)
2016-12-23 18:28:54 +01:00
ZyX
516b7071ca file: Add buffered reading and writing
Still no busted tests. Not tested without HAVE_PREADV.
2016-06-23 21:17:51 +03:00
ZyX
11dda658d6 file,os/fs,shada: Separate opening, closing, writing and reading files
Moves low-level functions handling to os/fs.c. Adds file.c with a proxy
interface.

Target: while leaving syscalls handling is os.c (partially handled by libuv),
add buffering for reading and writing to file.c.
2016-06-23 21:17:51 +03:00
Justin M. Keyes
fe0c3999ca do_source: less fuss about fopen_noinh_readbin 2016-05-28 12:48:32 -04:00
Rui Abreu Ferreira
46aac2a09a Windows: Don't build the TUI is systems where it is not supported
The TUI can be enabled/disabled at build time with -DFEAT_TUI, default is ON for
UNIX, and OFF for non UNIX. When off, Neovim prints a message to stderr, along
with a list of the server endpoints.
2016-05-27 23:43:40 +01:00
John Szakmeister
d3a904309b Fix be64toh() detection on BSDs.
This was noticed due to a user issue (#4750) when building Neovim 0.1.4
via ports.  The crux of the issue is that we did not detect the
be64toh() macro, because there is no endian.h on FreeBSD (along with
several other BSDs).  So we were defaulting to our builtin version of
be64toh().  However, it appears that sys/endian.h was being picked up by
an include (likely msgpack.h) and so be64toh() was actually defined and
corrupting our definition of it.

So the answer here was to use the correct include file in our check, and
export that information in the config.h.  Then we use that information
to include the right header in shada.c.

This fixes #4750.
2016-05-14 12:47:20 -04:00
Jun T
1a15cf84c2 build: install *.mo into the "standard" directory
Change POROJECT_NAME to 'nvim', and use it as the gettext
domain name. The *.mo files, previously installed as
$runtime/lang/xx/LC_MESSAGES/nvim.mo, are now installed as
$prefix/locale/xx/LC_MESSAGES/nvim.mo.
2016-02-23 13:39:56 +09:00
Seth Jackson
33321f2c85 config: Remove HAVE_UNISTD_H.
Unix systems must have this header but Windows does not have it at all.

Since src/nvim/os/unix_defs.h includes <unistd.h> without the guard
in order to avoid including this in the numerous places we would
need <unistd.h> on Unix we just include src/nvim/os/os.h which will pull
in <unistd.h> for us.
2016-01-18 13:48:47 -05:00
Seth Jackson
5dfbe6685d config: Remove HAVE_FCNTL_H.
We do not use it and all systems we support have <fcntl.h>.
2016-01-17 09:40:07 -05:00
Seth Jackson
7c79ea70ef config: Cleanup unused identifiers.
HAVE_CRT_EXTERNS_H is unused since a3ec68c.
SIZEOF_OFF_T is unused since f916cf0.
HAVE_LIBGEN_H was never used.
2016-01-12 20:31:18 -05:00
Michael Reed
5db511b6f1 Stop using <stropts.h>
In Vim, at least the constant `I_PUSH` is used from <stropts.h>, but
Neovim doesn't seem to use anything from said header.

Besides that, POSIX.1-2008[1] marks this header as obsolescent, and
there don't seem to be many platforms that even have it.

[1]: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/stropts.h.html#tag_13_52_11
2016-01-12 16:40:22 -05:00
Michael Reed
f65d58907d os/*_defs.h: MAXNAMLEN cleanup
For non-Windows systems, we assume that NAME_MAX is in <limits.h>, as
specified in POSIX.1-2008[1]. For Windows, which doesn't have NAME_MAX,
just define it ourselves to _MAX_PATH[2].

Also, remove two (now unused) HAVE_*_H checks.

[1]: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/limits.h.html
[2]: https://msdn.microsoft.com/en-us/library/930f87yf.aspx

Helped-by: Seth Jackson
2016-01-12 12:26:15 -05:00
Seth Jackson
648aebb8b6 Port fsync() to libuv. 2016-01-01 00:12:28 -05:00
Rui Abreu Ferreira
810d31a430 Windows: Implement os_setenv() using _putenv_s()
Windows does not have setenv(), instead the _putenv_s() function is used - added
a function check and fatal errors. Implemented os_setenv() for Windows.

Vim supports the original putenv() function if no alternative is available.
Neovim only supports systems where safer alternatives exist, so the check for
putenv() was removed from config/CMakeLists.txt.
2015-12-12 22:33:10 -05:00
Michael Reed
0c54dc5528 Remove useless FEAT_BROWSE ifdef
The only thing this affected was the return value of
has('browsefilter').
2015-11-01 14:36:23 -05:00
ZyX
0d15b35d49 shada,config: Use CMake to determine endianess and be64toh existence 2015-10-08 22:00:44 +03:00
Justin M. Keyes
481049e0c9 build: remove USEMAN_S 2015-09-23 00:05:32 -04:00
Michael Reed
2d50a95601 os/os_defs.h cleanup: Remaining signal stuff
RETSIGTYPE, SIGRETURN, and SIGDEFARG are always defined the same, so
inline them for simplicity; SIGDUMMYARG, however, is unused, so remove
it.

Even if these things don't work on windows, the signal handler in
if_cscope.c is already wrapped with '#idef UNIX', as is its only call
site.

Reviewed-by: Justin M. Keyes <justinkz@gmail.com>
2015-08-27 16:56:05 -04:00
Justin M. Keyes
7280e8c365 remove references to <sys/time.h>
Since gettimeofday() was replaced by os_time in
fb5a786bdb we do not need sys/time.h.
2015-08-24 00:27:30 -04:00
Rui Abreu Ferreira
99aacb1429 cmake: Remove unneeded platform checks
Removed unneeded platform checks from config/config.h.in and
config/CMakeLists.txt

- HAVE_OSPEED and HAVE_UP_BC_PC were used by the old UI, and are
  no longer needed.
- sigvec() was used as part of the signal handling code in os_unix.c, but it is
  no longer used in Neovim.
- The function lstat() is no longer used, replaced with libuv.
2015-05-21 23:16:40 +01:00
Michael Reed
c50c831b85 Cleanup 'ttym[ouse]', FEAT_MOUSE, mouse_(dec|gpm|etc.)
Because of 3baba1e7bc, it's dead code.

Helped-by: Justin M. Keyes <justinkz@gmail.com>
2015-05-18 11:06:54 -04:00
Florian Walch
8130eb1191 jemalloc: Force use of prefixed functions.
* Set JEMALLOC_NO_DEMANGLE to be able to use `je_*` functions,
  regardless of how jemalloc was compiled (--with-jemalloc-prefix)
* Show jemalloc information in Neovim's version output.

Resolve #2449.
2015-04-29 22:26:55 +03:00
Rui Abreu Ferreira
71487a935e Implement os_unsetenv()
- In UNIX systems where unsetenv() is available, it is used. Otherwise
  the variables are set with the empty string.
- New check HAVE_UNSETENV for unsetenv()
- Added unit test to env_spec.lua
2015-04-14 15:20:50 -04:00
Thiago de Arruda
8a1a9b9558 deps: Add jemalloc as an optional dependency
Jemalloc will be used if the cmake option `USE_JEMALLOC` is enabled(which is the
default). To avoid trouble with clang's ASAN, it is disabled by default if the
`SANITIZE` option is enabled.

Since jemalloc has thread cache for small objects, it fills the gap created by
removing klib memory pools.

The `xstrdup` funciton(memory.c) had to be reimplemented on top of `xmalloc` to
make it work with a custom allocator.
2015-04-13 08:22:59 -03:00
Scott Prager
feca9624b8 CMakeLists: enable USE_FNAME_CASE on Mac 2015-03-31 11:20:24 -03:00
Jonas Dourado
293a7dc134 Remove platform dependent HAVE_OPENDIR #2010 2015-03-17 23:52:50 -04:00
Björn Linse
4f92178a75 config: split out versiondef.h from config.h
This avoids recompiling every c file after comitting.
2015-03-08 21:54:57 -04:00
Thiago de Arruda
e0e41b30c6 ui: Remove/adapt some old code for a big UI refactor
- Remove abstract_ui global, now it is always active
- Remove some terminal handling code
- Remove unused functions
- Remove HAVE_TGETENT/TERMINFO/TERMIOS/IOCTL #ifdefs
- Remove tgetent/terminfo from version.c
- Remove curses/terminfo dependencies
- Only start/stop termcap when starting/exiting the program
- msg_use_printf will return true if there are no attached UIs(
  messages will be written to stdout)
- Remove `ex_winpos`(implement `:winpos` with `ex_ni`)
2015-02-16 23:17:39 -03:00
Steven Oliver
f3b06ba6d1 globals.h: Remove unused global variable 2015-01-02 21:10:08 -05:00
Eliseo Martínez
516405b601 Remove long_u: Passing-by: put_time(): Refactor implementation.
put_time() had a complicated implementation, because of having to shift
an 8-byte value in a portable way with old means.
That can be greatly simplified now, using a C99 fixed-size type.
2014-12-24 20:00:05 +01:00
John Szakmeister
5714044617 Merge pull request #1441 from jszakmeister/remove-redundant-define
Remove redundant USE_ICONV define from config.h.in.
2014-11-09 14:51:25 -05:00
Florian Walch
176930fa56 version: Add compilation info. 2014-11-09 18:34:57 +01:00