mirror of
https://github.com/ksherlock/mpw-shell.git
synced 2024-05-28 13:41:34 +00:00
linux
This commit is contained in:
parent
8fcfba4328
commit
dc76f5addf
|
@ -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
|
||||||
|
|
|
@ -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);
|
||||||
|
|
|
@ -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.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user