mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
util: Migrated osName to libshared
This commit is contained in:
parent
f5bcec66e5
commit
14e047e7c4
4 changed files with 2 additions and 31 deletions
|
@ -33,8 +33,8 @@
|
||||||
#include <Dates.h>
|
#include <Dates.h>
|
||||||
#include <Context.h>
|
#include <Context.h>
|
||||||
#include <Task.h>
|
#include <Task.h>
|
||||||
|
#include <shared.h>
|
||||||
#include <format.h>
|
#include <format.h>
|
||||||
#include <util.h>
|
|
||||||
#include <i18n.h>
|
#include <i18n.h>
|
||||||
|
|
||||||
Context context;
|
Context context;
|
||||||
|
|
|
@ -34,8 +34,8 @@
|
||||||
#include <RX.h>
|
#include <RX.h>
|
||||||
#include <Context.h>
|
#include <Context.h>
|
||||||
#include <i18n.h>
|
#include <i18n.h>
|
||||||
|
#include <shared.h>
|
||||||
#include <format.h>
|
#include <format.h>
|
||||||
#include <util.h>
|
|
||||||
#ifdef HAVE_COMMIT
|
#ifdef HAVE_COMMIT
|
||||||
#include <commit.h>
|
#include <commit.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
28
src/util.cpp
28
src/util.cpp
|
@ -258,34 +258,6 @@ time_t timegm (struct tm *tm)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
std::string osName ()
|
|
||||||
{
|
|
||||||
#if defined (DARWIN)
|
|
||||||
return "Darwin";
|
|
||||||
#elif defined (SOLARIS)
|
|
||||||
return "Solaris";
|
|
||||||
#elif defined (CYGWIN)
|
|
||||||
return "Cygwin";
|
|
||||||
#elif defined (HAIKU)
|
|
||||||
return "Haiku";
|
|
||||||
#elif defined (OPENBSD)
|
|
||||||
return "OpenBSD";
|
|
||||||
#elif defined (FREEBSD)
|
|
||||||
return "FreeBSD";
|
|
||||||
#elif defined (NETBSD)
|
|
||||||
return "NetBSD";
|
|
||||||
#elif defined (LINUX)
|
|
||||||
return "Linux";
|
|
||||||
#elif defined (KFREEBSD)
|
|
||||||
return "GNU/kFreeBSD";
|
|
||||||
#elif defined (GNUHURD)
|
|
||||||
return "GNU/Hurd";
|
|
||||||
#else
|
|
||||||
return STRING_DOM_UNKNOWN;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
bool nontrivial (const std::string& input)
|
bool nontrivial (const std::string& input)
|
||||||
{
|
{
|
||||||
|
|
|
@ -60,7 +60,6 @@ const std::vector <std::string> extractParents (
|
||||||
time_t timegm (struct tm *tm);
|
time_t timegm (struct tm *tm);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
std::string osName ();
|
|
||||||
bool nontrivial (const std::string&);
|
bool nontrivial (const std::string&);
|
||||||
int strippedLength (const std::string&);
|
int strippedLength (const std::string&);
|
||||||
const char* optionalBlankLine ();
|
const char* optionalBlankLine ();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue