Fix for building on msys2; Closes #795

pull/959/head
Cristian Chiru 2 years ago
parent 092af9b694
commit e2fe64e536

@ -98,6 +98,11 @@ Environment Variables
If :envvar:`XDG_CONFIG_HOME` is not set, lnav will use this directory
to store its configuration in a sub-directory named :file:`.lnav`.
.. envvar:: APPDATA
On Windows, lnav will use this directory instead of HOME
to store its configuration in a sub-directory named :file:`.lnav`.
.. envvar:: TZ
The timezone setting is used in some log formats to convert UTC timestamps

@ -37,7 +37,11 @@ namespace paths {
ghc::filesystem::path dotlnav()
{
#ifdef __CYGWIN__
auto home_env = getenv("APPDATA");
#else
auto home_env = getenv("HOME");
#endif
auto xdg_config_home = getenv("XDG_CONFIG_HOME");
if (home_env != nullptr) {

@ -32,6 +32,10 @@
* a bit.
*/
#ifdef __CYGWIN__
#include <alloca.h>
#endif
#include "config.h"
#include <stdio.h>

@ -29,6 +29,10 @@
* @file shlex.cc
*/
#ifdef __CYGWIN__
#include <alloca.h>
#endif
#include "config.h"
#include "shlex.hh"

@ -7,6 +7,10 @@
* commercial or non-commercial, and by any means.
*/
#ifdef __CYGWIN__
#include <alloca.h>
#endif
#include "config.h"
#include <stdlib.h>

@ -7,6 +7,10 @@
// whatever you want with this stuff. If we meet some day, and you think this stuff is
// worth it, you can buy me a beer in return. Sandro Sigala
#ifdef __CYGWIN__
#include <alloca.h>
#endif
#include <ctype.h>
#include <fcntl.h>
#include <stdio.h>

@ -29,6 +29,10 @@
* @file view_curses.cc
*/
#ifdef __CYGWIN__
#include <alloca.h>
#endif
#include "config.h"
#include <cmath>

@ -29,6 +29,10 @@
* @file json_ptr.cc
*/
#ifdef __CYGWIN__
#include <alloca.h>
#endif
#include "config.h"
#include "yajl/api/yajl_gen.h"

@ -27,6 +27,10 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifdef __CYGWIN__
#include <alloca.h>
#endif
#include "config.h"
#include <stdio.h>

Loading…
Cancel
Save