Skip to content

Commit

Permalink
macro redefined in fwrite and fread (#6384)
Browse files Browse the repository at this point in the history
* use directive to prevent double definition

* add if to freadR

---------

Co-authored-by: Michael Chirico <chiricom@google.com>
  • Loading branch information
ben-schwen and MichaelChirico authored Aug 20, 2024
1 parent bcf5843 commit f8f9df4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/freadR.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#ifndef dt_FREAD_R_H
#define dt_FREAD_R_H
#define STRICT_R_HEADERS // https://cran.r-project.org/doc/manuals/r-devel/R-exts.html#Error-handling
#ifndef STRICT_R_HEADERS
#define STRICT_R_HEADERS // https://cran.r-project.org/doc/manuals/r-devel/R-exts.html#Error-handling
#endif
#include <R.h>
#include <Rinternals.h>
#include "po.h"
Expand Down
4 changes: 3 additions & 1 deletion src/fwrite.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#ifdef DTPY
#include "py_fread.h"
#else
#define STRICT_R_HEADERS
#ifndef STRICT_R_HEADERS
#define STRICT_R_HEADERS
#endif
#include <R.h>
#include <Rinternals.h> // for SEXP in writeList() prototype
#include "po.h"
Expand Down

0 comments on commit f8f9df4

Please sign in to comment.