Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move all headers to the top of the file #246

Merged
merged 4 commits into from
Sep 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CRAN-RELEASE
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
This package was submitted to CRAN on 2021-05-22.
Once it is accepted, delete this file and tag the release (commit f0601677).
This package was submitted to CRAN on 2021-09-06.
Once it is accepted, delete this file and tag the release (commit 4013eba7).
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: poppr
Type: Package
Title: Genetic Analysis of Populations with Mixed Reproduction
Version: 2.9.2
Version: 2.9.3
Authors@R: c(person(c("Zhian", "N."), "Kamvar", role = c("cre", "aut"),
email = "zkamvar@gmail.com", comment = c(ORCID = "0000-0003-1458-7108")),
person(c("Javier", "F."), "Tabima", role = "aut",
Expand Down
9 changes: 9 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
poppr 2.9.3
===========

CRAN MAINTENANCE
----------------

* C headers were re-arranged to place R-specific headers _after_ OMP headers to
avoid problems in clang 13 (@zkamvar, https://github.com/grunwaldlab/poppr/pull/246).

poppr 2.9.2
===========

Expand Down
8 changes: 4 additions & 4 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Poppr version 2.9.2
# Poppr version 2.9.3

This update fixes a test failure pointed out by CRAN on 2021-05-21
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.

## Test environments

* local macOS install, R 4.1.0
* local ubuntu 20.04 install, R 4.1.0
* local macOS install, R 4.1.1
* local ubuntu 20.04 install, R 4.1.1, R devel
* windows R Under development (unstable)

## R CMD check results
Expand Down
10 changes: 5 additions & 5 deletions src/bitwise_distance.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,19 @@

#include <stdio.h>
#include <stdint.h>
#include <Rinternals.h>
#include <R_ext/Utils.h>
#include <Rdefines.h>
#include <R.h>
#include <math.h>
#include <time.h>
#include <string.h>
#include <stdlib.h>

// Include openMP if the compiler supports it
#ifdef _OPENMP
#include <omp.h>
#endif
#include <Rinternals.h>
#include <R_ext/Utils.h>
#include <Rdefines.h>
#include <R.h>


// Assumptions:
// All genotypes have the same number of SNPs available.
Expand Down
2 changes: 1 addition & 1 deletion src/init.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <stdlib.h> // for NULL
#include <R.h>
#include <Rinternals.h>
#include <stdlib.h> // for NULL
#include <R_ext/Rdynload.h>

/* FIXME:
Expand Down
8 changes: 4 additions & 4 deletions src/mlg_clustering.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/

#include <stdio.h>
#include <Rinternals.h>
#include <R_ext/Utils.h>
#include <Rdefines.h>
#include <R.h>
#include <math.h>
#include <time.h>
#include <string.h>
#include <stdlib.h>
#include <Rinternals.h>
#include <R_ext/Utils.h>
#include <Rdefines.h>
#include <R.h>

// Thu Apr 13 08:42:12 2017 ------------------------------
// This code produces bugs when run on Fedora with multiple threads. Because of
Expand Down
8 changes: 4 additions & 4 deletions src/msn.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,6 @@
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/

#include <stdio.h>
#include <Rinternals.h>
#include <R_ext/Utils.h>
#include <Rdefines.h>
#include <R.h>
#include <math.h>
#include <time.h>
#include <string.h>
Expand All @@ -47,6 +43,10 @@
#ifdef _OPENMP
#include <omp.h>
#endif
#include <Rinternals.h>
#include <R_ext/Utils.h>
#include <Rdefines.h>
#include <R.h>


/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
8 changes: 4 additions & 4 deletions src/poppr_distance.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@
#
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#include <stdio.h>
#include <Rinternals.h>
#include <Rdefines.h>
#include <R.h>
#include <R_ext/Utils.h>
#include <math.h>
#include <time.h>
#include <string.h>
#include <stdlib.h>
#include <Rinternals.h>
#include <Rdefines.h>
#include <R.h>
#include <R_ext/Utils.h>
int perm_count;

SEXP pairwise_covar(SEXP pair_vec);
Expand Down