diff --git a/CMakeLists.txt b/CMakeLists.txt index df2a793..13686db 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,7 +5,6 @@ cmake_minimum_required(VERSION 3.22) project(eb VERSION 1.0.0 LANGUAGES C) set(SOURCES - custom_unistd.h appendix.c appendix.h appsub.c diff --git a/build-post.h b/build-post.h index 3f57722..6d6f5e3 100644 --- a/build-post.h +++ b/build-post.h @@ -33,8 +33,8 @@ extern "C" { #endif #include "defs.h" -#if defined( __APPLE__) || defined(__linux__) - #include +#ifndef _WIN32 +#include #else #include "win_dirent.h" #endif diff --git a/build-pre.h b/build-pre.h index 90d3fc6..07f2e50 100644 --- a/build-pre.h +++ b/build-pre.h @@ -40,7 +40,16 @@ #include #include #include -#include "custom_unistd.h" +/* + * Platform abstraction for unistd.h. + * unistd.h maps (roughly) to io.h on Windows. + */ +#if defined(_WIN32) +#include +#include +#else +#include +#endif #include #if defined( _WIN32 ) diff --git a/custom_unistd.h b/custom_unistd.h deleted file mode 100644 index 221988d..0000000 --- a/custom_unistd.h +++ /dev/null @@ -1,14 +0,0 @@ -/** This file is part of the Mingw32 package. - -unistd.h maps (roughly) to io.h -*/ -#ifndef CUSTOM_UNISTD_H -#define CUSTOM_UNISTD_H - -#if defined( __APPLE__) || defined(__linux__) -#include -#else -#include -#include -#endif -#endif /* _UNISTD_H */ diff --git a/filename.c b/filename.c index 62ca2f3..89960e3 100644 --- a/filename.c +++ b/filename.c @@ -32,11 +32,10 @@ #include "build-post.h" - -#if defined( __APPLE__) || defined(__linux__) -#include -#else +#ifdef _WIN32 #include "win_dirent.h" +#else +#include #endif diff --git a/zio.c b/zio.c index e4621ae..a52fda0 100644 --- a/zio.c +++ b/zio.c @@ -27,7 +27,6 @@ */ #include "build-pre.h" -#include "custom_unistd.h" #include #include #include