forked from HowardHinnant/date
Exclude expand_path when INSTALL is not defined
This commit is contained in:
committed by
Howard Hinnant
parent
3a9880999d
commit
c1034550d2
10
tz.cpp
10
tz.cpp
@@ -4,6 +4,7 @@
|
||||
// Copyright (c) 2015 Ville Voutilainen
|
||||
// Copyright (c) 2016 Alexander Kormanovsky
|
||||
// Copyright (c) 2016, 2017 Jiangang Zhuang
|
||||
// Copyright (c) 2017 Nicolas Veloz Savino
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
@@ -189,23 +190,26 @@ get_download_folder()
|
||||
|
||||
#else // !_WIN32
|
||||
|
||||
# ifndef INSTALL
|
||||
|
||||
static
|
||||
std::string
|
||||
expand_path(std::string path)
|
||||
{
|
||||
#if TARGET_OS_IPHONE
|
||||
# if TARGET_OS_IPHONE
|
||||
return date::iOSUtils::get_tzdata_path();
|
||||
#else
|
||||
# else
|
||||
::wordexp_t w{};
|
||||
::wordexp(path.c_str(), &w, 0);
|
||||
assert(w.we_wordc == 1);
|
||||
path = w.we_wordv[0];
|
||||
::wordfree(&w);
|
||||
return path;
|
||||
#endif
|
||||
# endif
|
||||
}
|
||||
|
||||
# endif // !INSTALL
|
||||
|
||||
#endif // !_WIN32
|
||||
|
||||
namespace date
|
||||
|
Reference in New Issue
Block a user