Skip to content

Commit b653693

Browse files
Abseil Teamcopybara-github
authored andcommitted
Import of CCTZ from GitHub.
PiperOrigin-RevId: 838869622 Change-Id: I92047cd4e3ca51afded452316332bded5dc79a3f
1 parent 0cc960e commit b653693

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

absl/time/internal/cctz/src/time_zone_format.cc

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,14 @@
1313
// limitations under the License.
1414

1515
#if !defined(HAS_STRPTIME)
16-
#if !defined(_MSC_VER) && !defined(__MINGW32__) && !defined(__VXWORKS__)
16+
#if defined(_MSC_VER) || defined(__MINGW32__) || defined(__VXWORKS__)
17+
#define HAS_STRPTIME 0
18+
#else
1719
#define HAS_STRPTIME 1 // Assume everyone else has strptime().
1820
#endif
1921
#endif
2022

21-
#if defined(HAS_STRPTIME) && HAS_STRPTIME
23+
#if HAS_STRPTIME
2224
#if !defined(_XOPEN_SOURCE) && !defined(__FreeBSD__) && !defined(__OpenBSD__)
2325
#define _XOPEN_SOURCE 500 // Exposes definitions for SUSv2 (UNIX 98).
2426
#endif
@@ -40,7 +42,7 @@
4042
#include <limits>
4143
#include <string>
4244
#include <vector>
43-
#if !defined(HAS_STRPTIME)
45+
#if !HAS_STRPTIME
4446
#include <iomanip>
4547
#include <sstream>
4648
#endif
@@ -56,7 +58,7 @@ namespace detail {
5658

5759
namespace {
5860

59-
#if !defined(HAS_STRPTIME)
61+
#if !HAS_STRPTIME
6062
// Build a strptime() using C++11's std::get_time().
6163
char* strptime(const char* s, const char* fmt, std::tm* tm) {
6264
std::istringstream input(s);

0 commit comments

Comments
 (0)