diff --git a/src/compat/pipe-internal.h b/src/compat/pipe-internal.h new file mode 100644 index 0000000..54a5242 --- /dev/null +++ b/src/compat/pipe-internal.h @@ -0,0 +1,38 @@ +/* + * The MIT License (MIT) + * + * Copyright © 2015 Franklin "Snaipe" Mathieu + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +#ifndef PIPE_INTERNAL_H_ +# define PIPE_INTERNAL_H_ + +# include "internal.h" +# include "pipe.h" + +struct pipe_handle { +#ifdef VANILLA_WIN32 + HANDLE fhs[2]; +#else + int fds[2]; +#endif +}; + +#endif /* !PIPE_INTERNAL_H_ */ diff --git a/src/compat/pipe.c b/src/compat/pipe.c index 02c2257..0a7e4e9 100644 --- a/src/compat/pipe.c +++ b/src/compat/pipe.c @@ -25,16 +25,7 @@ #include #include "criterion/assert.h" -#include "pipe.h" -#include "internal.h" - -struct pipe_handle { -#ifdef VANILLA_WIN32 - HANDLE fhs[2]; -#else - int fds[2]; -#endif -}; +#include "pipe-internal.h" FILE *pipe_in(s_pipe_handle *p, int do_close) { #ifdef VANILLA_WIN32 diff --git a/src/compat/process.c b/src/compat/process.c index f13af29..fd03d3b 100644 --- a/src/compat/process.c +++ b/src/compat/process.c @@ -24,7 +24,7 @@ #include #include "process.h" #include "internal.h" -#include "pipe.h" +#include "pipe-internal.h" #ifdef VANILLA_WIN32 # define CREATE_SUSPENDED_(Filename, CmdLine, StartupInfo, Info) \