X-Git-Url: http://biod.pnpi.spb.ru/gitweb/?a=blobdiff_plain;f=src%2Fgmxpre.h;h=3ae077ecb3fe7247b03ad71fb154a0d4d8115aca;hb=2c8e4fac688f51c7b779c13a542f4700a221715d;hp=baccdc1f48d70392adae124bff98658b085824e9;hpb=6d1bc0a87809729252a3e706b6ff24c9df35c57f;p=alexxy%2Fgromacs.git diff --git a/src/gmxpre.h b/src/gmxpre.h index baccdc1f48..3ae077ecb3 100644 --- a/src/gmxpre.h +++ b/src/gmxpre.h @@ -53,12 +53,27 @@ * * \inlibraryapi */ +//! \cond #ifdef HAVE_CONFIG_H #include "gmxpre-config.h" #endif +/* We use a few GNU functions for thread affinity and other low-level stuff. + * However, all such uses should be accompanied by #ifdefs and a feature test + * at CMake level, so that the actual uses will be compiled only when available. + * But since the define affects system headers, it should be defined before + * including any system headers, and this is a robust location to do that. + * If this were defined only in source files that needed it, it would clutter + * the list of includes somewhere close to the beginning and make automatic + * sorting of the includes more difficult. + */ +#ifndef _GNU_SOURCE +#define _GNU_SOURCE 1 +#endif + #ifdef GMX_FAHCORE #define FULLINDIRECT 1 #define USE_FAH_XDR 1 #include "swindirect.h" #endif +//! \endcond