Mercurial > hg > gpsynth
comparison third_party/boost/process/config.hpp @ 0:add35537fdbb tip
Initial import
author | irh <ian.r.hobson@gmail.com> |
---|---|
date | Thu, 25 Aug 2011 11:05:55 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:add35537fdbb |
---|---|
1 // | |
2 // Boost.Process | |
3 // ~~~~~~~~~~~~~ | |
4 // | |
5 // Copyright (c) 2006, 2007 Julio M. Merino Vidal | |
6 // Copyright (c) 2008 Ilya Sokolov, Boris Schaeling | |
7 // Copyright (c) 2009 Boris Schaeling | |
8 // Copyright (c) 2010 Felipe Tanus, Boris Schaeling | |
9 // | |
10 // Distributed under the Boost Software License, Version 1.0. (See accompanying | |
11 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) | |
12 // | |
13 | |
14 /** | |
15 * \file boost/process/config.hpp | |
16 * | |
17 * Defines macros that are used by the library to determine the operating | |
18 * system it is running under and the features it supports. | |
19 */ | |
20 | |
21 #ifndef BOOST_PROCESS_CONFIG_HPP | |
22 #define BOOST_PROCESS_CONFIG_HPP | |
23 | |
24 #include <boost/config.hpp> | |
25 #include <boost/system/config.hpp> | |
26 #include <boost/system/system_error.hpp> | |
27 #include <boost/throw_exception.hpp> | |
28 | |
29 #if defined(BOOST_POSIX_API) | |
30 # include <errno.h> | |
31 #elif defined(BOOST_WINDOWS_API) | |
32 # include <windows.h> | |
33 #endif | |
34 | |
35 #if defined(BOOST_POSIX_API) || defined(BOOST_PROCESS_DOXYGEN) | |
36 # if !defined(BOOST_PROCESS_POSIX_PATH_MAX) || defined(BOOST_PROCESS_DOXYGEN) | |
37 /** | |
38 * Specifies the system's maximal supported path length. | |
39 * | |
40 * The macro BOOST_PROCESS_POSIX_PATH_MAX is set to a positive integer | |
41 * value which specifies the system's maximal supported path length. It is | |
42 * only used if neither PATH_MAX nor _PC_PATH_MAX and HAVE_PATHCONF are defined. | |
43 * The maximal supported path length is required by | |
44 * boost::process::self::get_work_dir(). Please note that this function is | |
45 * also called by the constructor of boost::process::context. | |
46 */ | |
47 # define BOOST_PROCESS_POSIX_PATH_MAX 259 | |
48 # endif | |
49 #endif | |
50 | |
51 /** \cond */ | |
52 #define BOOST_PROCESS_SOURCE_LOCATION \ | |
53 "in file '" __FILE__ "', line " BOOST_STRINGIZE(__LINE__) ": " | |
54 | |
55 #if defined(BOOST_POSIX_API) | |
56 # define BOOST_PROCESS_LAST_ERROR errno | |
57 #elif defined(BOOST_WINDOWS_API) | |
58 # define BOOST_PROCESS_LAST_ERROR GetLastError() | |
59 #endif | |
60 | |
61 #define BOOST_PROCESS_THROW_LAST_SYSTEM_ERROR(what) \ | |
62 boost::throw_exception(boost::system::system_error( \ | |
63 boost::system::error_code(BOOST_PROCESS_LAST_ERROR, \ | |
64 boost::system::get_system_category()), \ | |
65 BOOST_PROCESS_SOURCE_LOCATION what)) | |
66 | |
67 #define BOOST_PROCESS_THROW_ERROR(error, what) \ | |
68 boost::throw_exception(boost::system::system_error( \ | |
69 boost::system::error_code(error, \ | |
70 boost::system::get_system_category()), \ | |
71 BOOST_PROCESS_SOURCE_LOCATION what)) | |
72 /** \endcond */ | |
73 | |
74 #endif |