From dc76f5addf634e48a06aaa25a9f19aeee1b03a82 Mon Sep 17 00:00:00 2001 From: Kelvin Sherlock Date: Wed, 27 Jan 2016 12:35:37 -0500 Subject: [PATCH] linux --- .travis.yml | 4 ++++ mpw-shell-builtins.cpp | 6 +----- mpw-shell-parser.cpp | 1 + 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2320a28..3bd1981 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,7 @@ +# Ubuntu 14.04 Trusty support for -std=c++14 +sudo: required +dist: trusty + language: cpp compiler: - clang diff --git a/mpw-shell-builtins.cpp b/mpw-shell-builtins.cpp index 56d15fd..9e63ead 100644 --- a/mpw-shell-builtins.cpp +++ b/mpw-shell-builtins.cpp @@ -1,8 +1,4 @@ -#ifdef __linux__ -// fopencookie support. -#define _GNU_SOURCE -#endif #include "mpw-shell.h" #include "fdset.h" @@ -84,7 +80,7 @@ namespace { #ifdef __linux__ /* Linux */ cookie_io_functions_t io = { readfn, writefn, nullptr, nullptr }; - return fopencookie((const void *)(std::ptrdiff_t)fd, "w+", io); + return fopencookie((void *)(std::ptrdiff_t)fd, "w+", io); #else /* *BSD */ return funopen((const void *)(std::ptrdiff_t)fd, readfn, writefn, nullptr, nullptr); diff --git a/mpw-shell-parser.cpp b/mpw-shell-parser.cpp index ccfcf85..0fcb134 100644 --- a/mpw-shell-parser.cpp +++ b/mpw-shell-parser.cpp @@ -4,6 +4,7 @@ #include #include +#include /* * I'm sick of fighting with lemon. Just generate it by hand.