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

Enable building on Windows #1

Merged
merged 1 commit into from
Mar 25, 2017

Conversation

joshuaulrich
Copy link
Sponsor Contributor

@joshuaulrich joshuaulrich commented Mar 25, 2017

An attempt to install the package on Windows (after removing the OS
restriction) resulted in the following warning:

datetime.c:102:14: warning: 'tzname' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
 extern char *tzname[2];
               ^

The fix is to declare tzname with the dllimport attribute, as was done
for Cygwin.

While researching how R itself configures this block of code, I learned
that USE_INTERNAL_MKTIME is set by default. It is unset if configure
determines that the system tools behave reasonably. It's set by default
on MacOS, and it's what is used on Windows.

An attempt to install the package on Windows (after removing the OS
restriction) resulted in the following warning:

datetime.c:102:14: warning: 'tzname' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
 extern char *tzname[2];
               ^

The fix is to declare tzname with the dllimport attribute, as was done
for Cygwin.

While researching how R itself configures this block of code, I learned
that USE_INTERNAL_MKTIME is set by default. It is unset if configure
determines that the system tools behave reasonably. It's set by default
on MacOS, and it's what is used on Windows.
@eddelbuettel eddelbuettel merged commit ecec441 into eddelbuettel:master Mar 25, 2017
@joshuaulrich joshuaulrich deleted the windows_build branch March 25, 2017 15:30
@codecov-io
Copy link

Codecov Report

Merging #1 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master       #1   +/-   ##
=======================================
  Coverage   53.24%   53.24%           
=======================================
  Files           5        5           
  Lines         971      971           
=======================================
  Hits          517      517           
  Misses        454      454
Impacted Files Coverage Δ
src/datetime.c 65.74% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 66d6dbc...b7f4f7b. Read the comment docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants