forked from OctaForge/libostd
clean up platform checks
This commit is contained in:
parent
005485f6a6
commit
0925ff3350
|
@ -24,10 +24,6 @@
|
|||
|
||||
#include "ostd/platform.hh"
|
||||
|
||||
#if !defined(OSTD_PLATFORM_POSIX) && !defined(OSTD_PLATFORM_WIN32)
|
||||
# error "Unsupported platform"
|
||||
#endif
|
||||
|
||||
#ifdef OSTD_USE_VALGRIND
|
||||
# include <valgrind/valgrind.h>
|
||||
#endif
|
||||
|
|
|
@ -21,11 +21,6 @@
|
|||
#include <vector>
|
||||
|
||||
#include "ostd/platform.hh"
|
||||
|
||||
#if !defined(OSTD_PLATFORM_POSIX) && !defined(OSTD_PLATFORM_WIN32)
|
||||
# error "Unsupported platform"
|
||||
#endif
|
||||
|
||||
#include "ostd/string.hh"
|
||||
#include "ostd/range.hh"
|
||||
#include "ostd/io.hh"
|
||||
|
|
|
@ -44,10 +44,6 @@
|
|||
|
||||
#include "ostd/platform.hh"
|
||||
|
||||
#if !defined(OSTD_PLATFORM_POSIX) && !defined(OSTD_PLATFORM_WIN32)
|
||||
# error "Unsupported platform"
|
||||
#endif
|
||||
|
||||
#ifndef OSTD_PLATFORM_WIN32
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
@ -62,16 +58,18 @@ namespace ostd {
|
|||
* @{
|
||||
*/
|
||||
|
||||
#ifndef OSTD_PLATFORM_WIN32
|
||||
#if defined(OSTD_PLATFORM_POSIX) || defined(OSTD_GENERATING_DOC)
|
||||
/** @brief The stream offset type.
|
||||
*
|
||||
* This is a signed integer type that can represent file sizes and offsets.
|
||||
* On POSIX systems, it defaults to the POSIX `off_t` type. On Windows, it's
|
||||
* a signed 64-bit integer.
|
||||
* a signed 64-bit integer. On other systems it's `long`.
|
||||
*/
|
||||
using stream_off_t = off_t;
|
||||
#else
|
||||
#elif defined(OSTD_PLATFORM_WIN32)
|
||||
using stream_off_t = __int64;
|
||||
#else
|
||||
using stream_off_t = long;
|
||||
#endif
|
||||
|
||||
/** @brief Reference position for seeking.
|
||||
|
|
|
@ -5,12 +5,10 @@
|
|||
|
||||
#include "ostd/platform.hh"
|
||||
|
||||
#ifdef OSTD_PLATFORM_WIN32
|
||||
#if defined(OSTD_PLATFORM_WIN32)
|
||||
# include "src/win32/context_stack.cc"
|
||||
#else
|
||||
#ifdef OSTD_PLATFORM_POSIX
|
||||
#elif defined(OSTD_PLATFORM_POSIX)
|
||||
# include "src/posix/context_stack.cc"
|
||||
#else
|
||||
# error "Unsupported platform"
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -5,12 +5,10 @@
|
|||
|
||||
#include "ostd/platform.hh"
|
||||
|
||||
#ifdef OSTD_PLATFORM_WIN32
|
||||
#if defined(OSTD_PLATFORM_WIN32)
|
||||
# include "src/win32/process.cc"
|
||||
#else
|
||||
#ifdef OSTD_PLATFORM_POSIX
|
||||
#elif defined(OSTD_PLATFORM_POSIX)
|
||||
# include "src/posix/process.cc"
|
||||
#else
|
||||
# error "Unsupported platform"
|
||||
#endif
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue