cloudy
trunk
Main Page
Related Pages
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
source
cdstd.h
Go to the documentation of this file.
1
/* This file is part of Cloudy and is copyright (C)1978-2022 by Gary J. Ferland and
2
* others. For conditions of distribution and use see copyright notice in license.txt */
3
4
#ifndef CDSTD_H_
5
#define CDSTD_H_
6
7
// cdstd.h: define macros to select library API version.
8
9
// This must be included before all library #includes.
10
// Typically this done as part of cddefines.h, only required
11
// independently when cddefines.h is not first include.
12
13
// We *require* POSIX.1-2008 as a minimum (for strnlen()).
14
// See e.g. Rochkind, Advanced UNIX Programming for more details.
15
16
// There appears to be a bug in the POSIX implementation in FreeBSD that was
17
// imported into Apple Darwin (at least version 11.4.2) where defining _POSIX_SOURCE
18
// will cause compilation errors as a result of missing type definitions (e.g., u_int)
19
// when including certain system header files. See e.g. this report:
20
// http://lists.freebsd.org/pipermail/freebsd-bugs/2011-April/044049.html
21
#if !defined(__APPLE__) && !defined(__FreeBSD__)
22
#define _POSIX_C_SOURCE 200112L
23
#define _XOPEN_SOURCE 600
24
#endif
25
26
#ifdef MPI_GRID_RUN
27
#define MPI_ENABLED
28
#endif
29
30
// the Intel MPI implementation wants this file included before cstdio...
31
// http://www.saii.ull.es/files/doc_intel/doc/HelpMe_FAQ.htm
32
// so we include it here to make really sure that it is in front of
33
// the system includes that may be done before cddefines.h is included
34
//
35
// we define OMPI_SKIP_MPICXX to silence compiler warnings/errors about a
36
// poorly designed C++ interface in openmpi, see this thread for more details:
37
// https://github.com/open-mpi/ompi/issues/5157
38
#ifdef MPI_ENABLED
39
#define OMPI_SKIP_MPICXX 1
40
#include <mpi.h>
41
#endif
42
43
#endif // CDSTD_H_
Generated by
1.8.5