include-what-you-use/port.h

38 lines
1.2 KiB
C
Raw Normal View History

2011-02-16 01:40:07 +00:00
//===--- port.h - OS/cpu specific stuff for include-what-you-use ----------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// Source file for architecture-specific logic.
#ifndef DEVTOOLS_MAINTENANCE_INCLUDE_WHAT_YOU_USE_PORT_H_
#define DEVTOOLS_MAINTENANCE_INCLUDE_WHAT_YOU_USE_PORT_H_
#include <assert.h>
#define CHECK_(x) assert(x)
#if defined(_MSC_VER)
# define NOMINMAX
# include <windows.h>
# define getcwd _getcwd
# define snprintf _snprintf
// Get a windows-equivalent fnmatch()
# include "Shlwapi.h" // For PathMatchSpec
# pragma comment(lib, "Shlwapi.lib")
# define fnmatch(pattern, filepath, flags) (!PathMatchSpec(filepath, pattern))
// FIXME: This undef is necessary to prevent conflicts between llvm
// and Windows headers. Eventually fnmatch functionality
// should be wrapped inside llvm's PathV2 library.
# undef interface // used in Shlwapi.h
#endif // #if defined(_MSC_VER)
#endif // DEVTOOLS_MAINTENANCE_INCLUDE_WHAT_YOU_USE_PORT_H_