1*f9448bf3SDimitry Andric// -*- C++ -*-
2*f9448bf3SDimitry Andric//===------------------------ __undef_macros ------------------------------===//
3*f9448bf3SDimitry Andric//
4*f9448bf3SDimitry Andric//                     The LLVM Compiler Infrastructure
5*f9448bf3SDimitry Andric//
6*f9448bf3SDimitry Andric// This file is distributed under the University of Illinois Open Source
7*f9448bf3SDimitry Andric// License. See LICENSE.TXT for details.
8*f9448bf3SDimitry Andric//
9*f9448bf3SDimitry Andric//===----------------------------------------------------------------------===//
10*f9448bf3SDimitry Andric
11*f9448bf3SDimitry Andric
12*f9448bf3SDimitry Andric#ifdef min
13*f9448bf3SDimitry Andric#if !defined(_LIBCPP_DISABLE_MACRO_CONFLICT_WARNINGS)
14*f9448bf3SDimitry Andric#if defined(_LIBCPP_WARNING)
15*f9448bf3SDimitry Andric_LIBCPP_WARNING("macro min is incompatible with C++.  Try #define NOMINMAX "
16*f9448bf3SDimitry Andric                "before any Windows header. #undefing min")
17*f9448bf3SDimitry Andric#else
18*f9448bf3SDimitry Andric#warning: macro min is incompatible with C++.  #undefing min
19*f9448bf3SDimitry Andric#endif
20*f9448bf3SDimitry Andric#endif
21*f9448bf3SDimitry Andric#undef min
22*f9448bf3SDimitry Andric#endif
23*f9448bf3SDimitry Andric
24*f9448bf3SDimitry Andric#ifdef max
25*f9448bf3SDimitry Andric#if !defined(_LIBCPP_DISABLE_MACRO_CONFLICT_WARNINGS)
26*f9448bf3SDimitry Andric#if defined(_LIBCPP_WARNING)
27*f9448bf3SDimitry Andric_LIBCPP_WARNING("macro max is incompatible with C++.  Try #define NOMINMAX "
28*f9448bf3SDimitry Andric                "before any Windows header. #undefing max")
29*f9448bf3SDimitry Andric#else
30*f9448bf3SDimitry Andric#warning: macro max is incompatible with C++.  #undefing max
31*f9448bf3SDimitry Andric#endif
32*f9448bf3SDimitry Andric#endif
33*f9448bf3SDimitry Andric#undef max
34*f9448bf3SDimitry Andric#endif
35