This commit is contained in:
Kelvin Sherlock 2016-01-27 12:35:37 -05:00
parent 8fcfba4328
commit dc76f5addf
3 changed files with 6 additions and 5 deletions

View File

@ -1,3 +1,7 @@
# Ubuntu 14.04 Trusty support for -std=c++14
sudo: required
dist: trusty
language: cpp language: cpp
compiler: compiler:
- clang - clang

View File

@ -1,8 +1,4 @@
#ifdef __linux__
// fopencookie support.
#define _GNU_SOURCE
#endif
#include "mpw-shell.h" #include "mpw-shell.h"
#include "fdset.h" #include "fdset.h"
@ -84,7 +80,7 @@ namespace {
#ifdef __linux__ #ifdef __linux__
/* Linux */ /* Linux */
cookie_io_functions_t io = { readfn, writefn, nullptr, nullptr }; 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 #else
/* *BSD */ /* *BSD */
return funopen((const void *)(std::ptrdiff_t)fd, readfn, writefn, nullptr, nullptr); return funopen((const void *)(std::ptrdiff_t)fd, readfn, writefn, nullptr, nullptr);

View File

@ -4,6 +4,7 @@
#include <unistd.h> #include <unistd.h>
#include <fcntl.h> #include <fcntl.h>
#include <algorithm>
/* /*
* I'm sick of fighting with lemon. Just generate it by hand. * I'm sick of fighting with lemon. Just generate it by hand.