From 2d45eab99cd7ea56c116a1fba83129a55d724629 Mon Sep 17 00:00:00 2001 From: ADAM David Alan Martin Date: Fri, 10 Nov 2023 01:50:37 -0500 Subject: [PATCH] Remove gnu dependency from `Console`. --- Console.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Console.cc b/Console.cc index b7fd0e1..254ab6d 100644 --- a/Console.cc +++ b/Console.cc @@ -13,9 +13,9 @@ static_assert( __cplusplus > 2020'99 ); #include #include -#include #include +#include #include "Enum.h" #include "ProgramOptions.h" @@ -348,8 +348,7 @@ namespace Alepha::Hydrogen ::detail:: console_m struct Console::Impl { int fd; - // TODO: Do we want to make this not gnu libstdc++ specific? - __gnu_cxx::stdio_filebuf< char > filebuf; + IOStreams::OutUnixFileBuf filebuf; std::ostream stream; std::stack< std::pair< struct termios, ConsoleMode > > modeStack; ConsoleMode mode= cooked; @@ -357,7 +356,7 @@ namespace Alepha::Hydrogen ::detail:: console_m explicit Impl( const int fd ) - : fd( fd ), filebuf( fd, std::ios::out ), stream( &filebuf ) + : fd( fd ), filebuf( fd ), stream( &filebuf ) {} };