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

lite: change usage of 'fileno' to allow for msvc implementation #29893

Merged
merged 3 commits into from Jun 28, 2019

Conversation

julie-is-late
Copy link
Contributor

Very straightforward change, just guarding the usage of fileno to sub it with _fileno where needed.

In this case there shouldn't be an instance where the differences in the MSVC definition which fall outside of the POSIX version will matter. See https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/fileno?view=vs-2019 for the specific differences, but it is quite common for libraries to utilize this workaround (see: gtest).

Also yes, you really can build TFLite on Windows if you're brave enough.

@tensorflow-bot tensorflow-bot bot added the size:S CL Change Size: Small label Jun 17, 2019
@rthadur rthadur self-assigned this Jun 17, 2019
@rthadur rthadur added this to Assigned Reviewer in PR Queue via automation Jun 17, 2019
@rthadur rthadur added the comp:lite TF Lite related issues label Jun 17, 2019
@rthadur rthadur requested a review from miaout17 June 17, 2019 21:20
PR Queue automation moved this from Assigned Reviewer to Approved by Reviewer Jun 28, 2019
@tensorflow-bot tensorflow-bot bot added kokoro:force-run Tests on submitted change ready to pull PR ready for merge process labels Jun 28, 2019
@kokoro-team kokoro-team removed the kokoro:force-run Tests on submitted change label Jun 28, 2019
if (fstat(fileno(file.get()), &sb) != 0) {

// support usage of msvc's posix-like fileno symbol
#ifdef _WIN32
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be _MVC_VER

@rthadur rthadur added ready to pull PR ready for merge process and removed ready to pull PR ready for merge process labels Jun 28, 2019
@yifeif yifeif merged commit 8c192f3 into tensorflow:master Jun 28, 2019
PR Queue automation moved this from Approved by Reviewer to Merged Jun 28, 2019
yifeif pushed a commit that referenced this pull request Jun 28, 2019
PiperOrigin-RevId: 255652237
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes comp:lite TF Lite related issues ready to pull PR ready for merge process size:S CL Change Size: Small
Projects
PR Queue
  
Merged
Development

Successfully merging this pull request may close these issues.

None yet

7 participants