Skip to content

Commit 94c745a

Browse files
authored
Merge pull request #246 from grunwaldlab/fix-clang-13
move all headers to the top of the file
2 parents 717e700 + 000c00f commit 94c745a

File tree

9 files changed

+34
-25
lines changed

9 files changed

+34
-25
lines changed

CRAN-RELEASE

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
This package was submitted to CRAN on 2021-05-22.
2-
Once it is accepted, delete this file and tag the release (commit f0601677).
1+
This package was submitted to CRAN on 2021-09-06.
2+
Once it is accepted, delete this file and tag the release (commit 4013eba7).

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: poppr
22
Type: Package
33
Title: Genetic Analysis of Populations with Mixed Reproduction
4-
Version: 2.9.2
4+
Version: 2.9.3
55
Authors@R: c(person(c("Zhian", "N."), "Kamvar", role = c("cre", "aut"),
66
email = "zkamvar@gmail.com", comment = c(ORCID = "0000-0003-1458-7108")),
77
person(c("Javier", "F."), "Tabima", role = "aut",

NEWS.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
poppr 2.9.3
2+
===========
3+
4+
CRAN MAINTENANCE
5+
----------------
6+
7+
* C headers were re-arranged to place R-specific headers _after_ OMP headers to
8+
avoid problems in clang 13 (@zkamvar, https://github.com/grunwaldlab/poppr/pull/246).
9+
110
poppr 2.9.2
211
===========
312

cran-comments.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
# Poppr version 2.9.2
1+
# Poppr version 2.9.3
22

3-
This update fixes a test failure pointed out by CRAN on 2021-05-21
3+
This update rearranges the C files to declare all non-R headers before R headers to address the openmp failures in clang13 as pointed out by Prof. Ripley.
44

55
## Test environments
66

7-
* local macOS install, R 4.1.0
8-
* local ubuntu 20.04 install, R 4.1.0
7+
* local macOS install, R 4.1.1
8+
* local ubuntu 20.04 install, R 4.1.1, R devel
99
* windows R Under development (unstable)
1010

1111
## R CMD check results

src/bitwise_distance.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,19 +36,19 @@
3636

3737
#include <stdio.h>
3838
#include <stdint.h>
39-
#include <Rinternals.h>
40-
#include <R_ext/Utils.h>
41-
#include <Rdefines.h>
42-
#include <R.h>
4339
#include <math.h>
4440
#include <time.h>
4541
#include <string.h>
4642
#include <stdlib.h>
47-
4843
// Include openMP if the compiler supports it
4944
#ifdef _OPENMP
5045
#include <omp.h>
5146
#endif
47+
#include <Rinternals.h>
48+
#include <R_ext/Utils.h>
49+
#include <Rdefines.h>
50+
#include <R.h>
51+
5252

5353
// Assumptions:
5454
// All genotypes have the same number of SNPs available.

src/init.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
#include <stdlib.h> // for NULL
12
#include <R.h>
23
#include <Rinternals.h>
3-
#include <stdlib.h> // for NULL
44
#include <R_ext/Rdynload.h>
55

66
/* FIXME:

src/mlg_clustering.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,14 @@
3535
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
3636

3737
#include <stdio.h>
38-
#include <Rinternals.h>
39-
#include <R_ext/Utils.h>
40-
#include <Rdefines.h>
41-
#include <R.h>
4238
#include <math.h>
4339
#include <time.h>
4440
#include <string.h>
4541
#include <stdlib.h>
42+
#include <Rinternals.h>
43+
#include <R_ext/Utils.h>
44+
#include <Rdefines.h>
45+
#include <R.h>
4646

4747
// Thu Apr 13 08:42:12 2017 ------------------------------
4848
// This code produces bugs when run on Fedora with multiple threads. Because of

src/msn.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,6 @@
3535
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
3636

3737
#include <stdio.h>
38-
#include <Rinternals.h>
39-
#include <R_ext/Utils.h>
40-
#include <Rdefines.h>
41-
#include <R.h>
4238
#include <math.h>
4339
#include <time.h>
4440
#include <string.h>
@@ -47,6 +43,10 @@
4743
#ifdef _OPENMP
4844
#include <omp.h>
4945
#endif
46+
#include <Rinternals.h>
47+
#include <R_ext/Utils.h>
48+
#include <Rdefines.h>
49+
#include <R.h>
5050

5151

5252
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/poppr_distance.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,14 @@
3434
#
3535
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
3636
#include <stdio.h>
37-
#include <Rinternals.h>
38-
#include <Rdefines.h>
39-
#include <R.h>
40-
#include <R_ext/Utils.h>
4137
#include <math.h>
4238
#include <time.h>
4339
#include <string.h>
4440
#include <stdlib.h>
41+
#include <Rinternals.h>
42+
#include <Rdefines.h>
43+
#include <R.h>
44+
#include <R_ext/Utils.h>
4545
int perm_count;
4646

4747
SEXP pairwise_covar(SEXP pair_vec);

0 commit comments

Comments
 (0)