###  | # Boost.Threads ## Configuration

Introduction
Public Library Defined Macros
Library Defined Implementation Macros

## Introduction

Boost.Threads uses several configuration macros in <boost/config.hpp>, as well as configuration macros meant to be supplied by the application. These macros are documented here.

## Public Library Defined Macros

These macros are defined by Boost.Threads but are expected to be used by application code.

Macro | Meaning
BOOST_HAS_THREADS | Indicates that threading support is available. This means both that there is a platform specific implementation for Boost.Threads and that threading support has been enabled in a platform specific manner. For instance, on the Win32 platform there's an implementation for Boost.Threads but unless the program is compiled against one of the multithreading runtimes (often determined by the compiler predefining the macro _MT) the BOOST_HAS_THREADS macro remains undefined.

## Library Defined Implementation Macros

These macros are defined by Boost.Threads and are implementation details of interest only to implementors.

Macro | Meaning
BOOST_HAS_WINTHREADS | Indicates that the platform has the Microsoft Win32 threading libraries, and that they should be used to implement Boost.Threads.
BOOST_HAS_PTHREADS | Indicates that the platform has the POSIX pthreads libraries, and that they should be used to implement Boost.Threads.
BOOST_HAS_FTIME | Indicates that the implementation should use GetSystemTimeAsFileTime() and the FILETIME type to calculate the current time. This is an implementation detail used by boost::detail::getcurtime().
BOOST_HAS_GETTTIMEOFDAY | Indicates that the implementation should use gettimeofday() to calculate the current time. This is an implementation detail used by boost::detail::getcurtime().

Revised 05 November, 2001

© Copyright William E. Kempf 2001-2002. All Rights Reserved.

Permission to use, copy, modify, distribute and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. William E. Kempf makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty.