"Fossies" - the Fresh Open Source Software Archive

Member "stress-ng-0.09.56/stress-version.h" (15 Mar 2019, 2186 Bytes) of package /linux/privat/stress-ng-0.09.56.tar.xz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "stress-version.h" see the Fossies "Dox" file reference documentation and the last Fossies "Diffs" side-by-side code changes report: 0.09.49_vs_0.09.50.

    1 /*
    2  * Copyright (C) 2013-2019 Canonical, Ltd.
    3  *
    4  * This program is free software; you can redistribute it and/or
    5  * modify it under the terms of the GNU General Public License
    6  * as published by the Free Software Foundation; either version 2
    7  * of the License, or (at your option) any later version.
    8  *
    9  * This program is distributed in the hope that it will be useful,
   10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
   11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   12  * GNU General Public License for more details.
   13  *
   14  * You should have received a copy of the GNU General Public License
   15  * along with this program; if not, write to the Free Software
   16  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
   17  *
   18  * This code is a complete clean re-write of the stress tool by
   19  * Colin Ian King <colin.king@canonical.com> and attempts to be
   20  * backwardly compatible with the stress tool by Amos Waterland
   21  * <apw@rossby.metr.ou.edu> but has more stress tests and more
   22  * functionality.
   23  *
   24  */
   25 #if !defined(STRESS_VERSION_H)
   26 #define STRESS_VERSION_H
   27 
   28 #define _VER_(major, minor, patchlevel)         \
   29     ((major * 10000) + (minor * 100) + patchlevel)
   30 
   31 #if defined(__GLIBC__) && defined(__GLIBC_MINOR__)
   32 #define NEED_GLIBC(major, minor, patchlevel)            \
   33     _VER_(major, minor, patchlevel) <= _VER_(__GLIBC__, __GLIBC_MINOR__, 0)
   34 #else
   35 #define NEED_GLIBC(major, minor, patchlevel)    (0)
   36 #endif
   37 
   38 #if defined(__GNUC__) && defined(__GNUC_MINOR__)
   39 #if defined(__GNUC_PATCHLEVEL__)
   40 #define NEED_GNUC(major, minor, patchlevel)             \
   41     _VER_(major, minor, patchlevel) <= _VER_(__GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__)
   42 #else
   43 #define NEED_GNUC(major, minor, patchlevel)             \
   44     _VER_(major, minor, patchlevel) <= _VER_(__GNUC__, __GNUC_MINOR__, 0)
   45 #endif
   46 #else
   47 #define NEED_GNUC(major, minor, patchlevel)     (0)
   48 #endif
   49 
   50 #if defined(__clang__) && defined(__clang_major__) && defined(__clang_minor__) && \
   51     defined(__clang_patchlevel__)
   52 #define NEED_CLANG(major, minor, patchlevel)    \
   53     _VER_(major, minor, patchlevel) <= _VER_(__clang_major__, __clang_minor__, __clang_patchlevel__)
   54 #else
   55 #define NEED_CLANG(major, minor, patchlevel)    (0)
   56 #endif
   57 #endif