Skip to content

Commit 6dfd912

Browse files
author
Damian Rouson
committed
New header file with version macros
1 parent 35e5402 commit 6dfd912

File tree

3 files changed

+10
-16
lines changed

3 files changed

+10
-16
lines changed

src/libcaf-gfortran-descriptor.h

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
2828
#ifndef LIBCAF_GFORTRAN_DESCRIPTOR_H
2929
#define LIBCAF_GFORTRAN_DESCRIPTOR_H
3030

31-
#include <stdint.h> /* For int32_t. */
32-
33-
#if __GNUC__ >= 8
34-
#define GCC_GE_8 1
35-
#endif
31+
#include "libcaf-version-def.h"
3632

37-
#if __GNUC__ >= 7
38-
#define GCC_GE_7 1
39-
#endif
33+
#include <stdint.h> /* For int32_t. */
4034

4135
/* GNU Fortran's array descriptor. Keep in sync with libgfortran.h. To be
4236
replaced by TS29113's ISO_Fortran_binding.h with CFI_cdesc_t. */

src/libcaf-version-def.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#if __GNUC__ >= 8
2+
#define GCC_GE_8 1
3+
#endif
4+
5+
#if __GNUC__ >= 7
6+
#define GCC_GE_7 1
7+
#endif

src/libcaf.h

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
3232
#include <stddef.h> /* For size_t. */
3333
#include <stdbool.h>
3434

35+
#include "libcaf-version-def.h"
3536
#include "libcaf-gfortran-descriptor.h"
3637

3738
#include <mpi.h>
@@ -45,14 +46,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
4546
#define unlikely(x) __builtin_expect(!!(x), 0)
4647
#endif
4748

48-
#if __GNUC__ >= 8
49-
#define GCC_GE_8 1
50-
#endif
51-
52-
#if __GNUC__ >= 7
53-
#define GCC_GE_7 1
54-
#endif
55-
5649
#ifdef PREFIX_NAME
5750
#define PREFIX3(X,Y) X ## Y
5851
#define PREFIX2(X,Y) PREFIX3(X,Y)

0 commit comments

Comments
 (0)